refresh
This commit is contained in:
parent
a0dbc01f98
commit
18442f0d7c
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"node": true,
|
||||||
|
"es6": true,
|
||||||
|
"worker": true
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"no-console": 0,
|
||||||
|
"no-unused-vars": 0,
|
||||||
|
"no-undef": 0,
|
||||||
|
"no-redeclare": 0
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
.DS_Store
|
||||||
|
.DS_Store?
|
||||||
|
._*
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
ehthumbs.db
|
||||||
|
Thumbs.db
|
|
@ -785,7 +785,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
order:4.5,
|
order:4.5,
|
||||||
value:[5,1],
|
value:[5,1],
|
||||||
tag:{
|
tag:{
|
||||||
gain:1
|
gain:1,
|
||||||
|
norepeat:1
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
|
|
@ -361,7 +361,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!ok) return 0;
|
if(!ok) return 0;
|
||||||
if(ui.selected.targets.length==1) return 2;
|
if(ui.selected.targets.length==1){
|
||||||
|
if(target.hasSkillTag('nogain')) return 0;
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
if(target.countCards('he')==0) return 0;
|
if(target.countCards('he')==0) return 0;
|
||||||
if(player.hasFriend()) return -1;
|
if(player.hasFriend()) return -1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -117,6 +117,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
forced:true,
|
forced:true,
|
||||||
mark:true,
|
mark:true,
|
||||||
audio:2,
|
audio:2,
|
||||||
|
unique:true,
|
||||||
filter:function(event){
|
filter:function(event){
|
||||||
return event.num>0;
|
return event.num>0;
|
||||||
},
|
},
|
||||||
|
|
|
@ -1022,6 +1022,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
order:2.1,
|
order:2.1,
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
if(target.hasSkillTag('nogain')) return 0;
|
||||||
if(get.attitude(player,target)<3) return 0;
|
if(get.attitude(player,target)<3) return 0;
|
||||||
if(target.hasJudge('lebu')) return 0;
|
if(target.hasJudge('lebu')) return 0;
|
||||||
if(target.hasSkill('aqianghua2')) return 0.1;
|
if(target.hasSkill('aqianghua2')) return 0.1;
|
||||||
|
|
|
@ -189,9 +189,11 @@ window.noname_character_rank={
|
||||||
'hs_kalimosi',
|
'hs_kalimosi',
|
||||||
'hs_zhihuanhua',
|
'hs_zhihuanhua',
|
||||||
'xizhicai',
|
'xizhicai',
|
||||||
|
'maliang',
|
||||||
],
|
],
|
||||||
am:[
|
am:[
|
||||||
'gw_oudimu',
|
'gw_oudimu',
|
||||||
|
'guanyinping',
|
||||||
'dongyun',
|
'dongyun',
|
||||||
'gw_xigedelifa',
|
'gw_xigedelifa',
|
||||||
'gw_laomaotou',
|
'gw_laomaotou',
|
||||||
|
@ -437,7 +439,6 @@ window.noname_character_rank={
|
||||||
'swd_hupo',
|
'swd_hupo',
|
||||||
'caopi',
|
'caopi',
|
||||||
'jiaxu',
|
'jiaxu',
|
||||||
'maliang',
|
|
||||||
'zhangchunhua',
|
'zhangchunhua',
|
||||||
'xushu',
|
'xushu',
|
||||||
'xin_xushu',
|
'xin_xushu',
|
||||||
|
@ -482,7 +483,7 @@ window.noname_character_rank={
|
||||||
'hs_nozdormu',
|
'hs_nozdormu',
|
||||||
'zhoucang',
|
'zhoucang',
|
||||||
'hs_shifazhe',
|
'hs_shifazhe',
|
||||||
'guanyinping',
|
'huanghao',
|
||||||
],
|
],
|
||||||
b:[
|
b:[
|
||||||
'xinxianying',
|
'xinxianying',
|
||||||
|
@ -492,7 +493,6 @@ window.noname_character_rank={
|
||||||
'hs_jiawodun',
|
'hs_jiawodun',
|
||||||
'yxs_weizhongxian',
|
'yxs_weizhongxian',
|
||||||
'cenhun',
|
'cenhun',
|
||||||
'huanghao',
|
|
||||||
'panzhangmazhong',
|
'panzhangmazhong',
|
||||||
'jsp_guanyu',
|
'jsp_guanyu',
|
||||||
'wenpin',
|
'wenpin',
|
||||||
|
|
|
@ -168,6 +168,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
if(target.hasSkillTag('nogain')) return 0;
|
||||||
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){
|
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){
|
||||||
if(target.hasSkillTag('nodu')) return 0;
|
if(target.hasSkillTag('nodu')) return 0;
|
||||||
return -10;
|
return -10;
|
||||||
|
|
134
character/sp.js
134
character/sp.js
|
@ -26,7 +26,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
sp_caoren:['male','wei',4,['weikui','lizhan']],
|
sp_caoren:['male','wei',4,['weikui','lizhan']],
|
||||||
zhangbao:['male','qun',3,['zhoufu','yingbin']],
|
zhangbao:['male','qun',3,['zhoufu','yingbin']],
|
||||||
zhangliang:['male','qun',3,['fulu','fuji']],
|
zhangliang:['male','qun',3,['fulu','fuji']],
|
||||||
maliang:['male','shu',3,['xiemu','naman']],
|
maliang:['male','shu',3,['zishu','yingyuan']],
|
||||||
sp_pangtong:['male','qun',3,['manjuan','zuixiang']],
|
sp_pangtong:['male','qun',3,['manjuan','zuixiang']],
|
||||||
zhugedan:['male','wei',4,['gongao','juyi']],
|
zhugedan:['male','wei',4,['gongao','juyi']],
|
||||||
sp_jiangwei:['male','wei',4,['kunfen','fengliang']],
|
sp_jiangwei:['male','wei',4,['kunfen','fengliang']],
|
||||||
|
@ -319,6 +319,133 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
zishu:{
|
||||||
|
subSkill:{
|
||||||
|
discard:{
|
||||||
|
trigger:{player:'gainAfter'},
|
||||||
|
silent:true,
|
||||||
|
filter:function(event,player){
|
||||||
|
return _status.currentPhase!=player;
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
if(!player.storage.zishu){
|
||||||
|
player.storage.zishu=[];
|
||||||
|
}
|
||||||
|
player.storage.zishu.addArray(trigger.cards);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
discard2:{
|
||||||
|
trigger:{global:'phaseAfter'},
|
||||||
|
forced:true,
|
||||||
|
filter:function(event,player){
|
||||||
|
if(_status.currentPhase!=player&&player.storage.zishu){
|
||||||
|
var he=player.getCards('he');
|
||||||
|
for(var i=0;i<player.storage.zishu.length;i++){
|
||||||
|
if(he.contains(player.storage.zishu[i])){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
var he=player.getCards('he');
|
||||||
|
var list=[];
|
||||||
|
for(var i=0;i<player.storage.zishu.length;i++){
|
||||||
|
if(he.contains(player.storage.zishu[i])){
|
||||||
|
list.push(player.storage.zishu[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
player.$throw(list);
|
||||||
|
player.lose(list,ui.discardPile);
|
||||||
|
game.log(player,'将',list,'置入弃牌堆');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
discard3:{
|
||||||
|
trigger:{global:'phaseBegin'},
|
||||||
|
silent:true,
|
||||||
|
content:function(){
|
||||||
|
delete player.storage.zishu;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
draw:{
|
||||||
|
trigger:{player:'gainAfter'},
|
||||||
|
forced:true,
|
||||||
|
filter:function(event,player){
|
||||||
|
if(_status.currentPhase!=player) return false;
|
||||||
|
return event.getParent(2).name!='zishu_draw';
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
player.draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
nogain:1
|
||||||
|
},
|
||||||
|
group:['zishu_draw','zishu_discard','zishu_discard2','zishu_discard3']
|
||||||
|
},
|
||||||
|
yingyuan:{
|
||||||
|
trigger:{player:'useCardAfter'},
|
||||||
|
direct:true,
|
||||||
|
filter:function(event,player){
|
||||||
|
if(_status.currentPhase!=player) return false;
|
||||||
|
if(player.storage.yingyuan&&player.storage.yingyuan.contains(event.card.name)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(event.cards){
|
||||||
|
for(var i=0;i<event.cards.length;i++){
|
||||||
|
if(event.cards[i].isInPile()) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
player.chooseTarget(get.prompt('yingyuan'),function(card,player,target){
|
||||||
|
return target!=player;
|
||||||
|
}).set('ai',function(target){
|
||||||
|
if(target.hasJudge('lebu')) return 0;
|
||||||
|
var att=get.attitude(_status.event.player,target);
|
||||||
|
if(att<3) return 0;
|
||||||
|
if(target.hasSha()&&_status.event.sha){
|
||||||
|
att/=5;
|
||||||
|
}
|
||||||
|
if(event.wuxie&&target.needsToDiscard(1)){
|
||||||
|
att/=5;
|
||||||
|
}
|
||||||
|
return att/(1+get.distance(player,target,'absolute'));
|
||||||
|
}).set('sha',trigger.cards[0].name=='sha').set('wuxie',trigger.cards[0].name=='wuxie');
|
||||||
|
'step 1'
|
||||||
|
if(result.bool){
|
||||||
|
var list=[];
|
||||||
|
for(var i=0;i<trigger.cards.length;i++){
|
||||||
|
if(trigger.cards[i].isInPile()){
|
||||||
|
list.push(trigger.cards[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
player.logSkill('yingyuan',result.targets[0]);
|
||||||
|
result.targets[0].gain(list,'gain2');
|
||||||
|
if(!player.storage.yingyuan){
|
||||||
|
player.storage.yingyuan=[];
|
||||||
|
}
|
||||||
|
player.storage.yingyuan.push(trigger.card.name);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
group:'yingyuan_clear',
|
||||||
|
subSkill:{
|
||||||
|
clear:{
|
||||||
|
trigger:{player:'phaseAfter'},
|
||||||
|
silent:true,
|
||||||
|
content:function(){
|
||||||
|
delete player.storage.yingyuan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
threaten:1.5
|
||||||
|
}
|
||||||
|
},
|
||||||
choulve:{
|
choulve:{
|
||||||
trigger:{player:'phaseUseBegin'},
|
trigger:{player:'phaseUseBegin'},
|
||||||
direct:true,
|
direct:true,
|
||||||
|
@ -9236,6 +9363,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
result:{
|
result:{
|
||||||
player:0,
|
player:0,
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
if(target.hasSkillTag('nogain')) return 0;
|
||||||
if(player.countCards('h')>1){
|
if(player.countCards('h')>1){
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -9572,6 +9700,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
quyi:'麹义',
|
quyi:'麹义',
|
||||||
liuye:'刘晔',
|
liuye:'刘晔',
|
||||||
|
|
||||||
|
zishu:'自书',
|
||||||
|
zishu_info:'锁定技,你的回合外,你获得的牌均会在当前回合结束后置入弃牌堆;你的回合内,当你不因此技能效果获得牌时,额外摸一张牌。',
|
||||||
|
yingyuan:'应援',
|
||||||
|
yingyuan_info:'当你于回合内使用的牌置入弃牌堆后,你可以将之交给一名其他角色(相同牌名的牌每回合限一次)。',
|
||||||
ly_piliche:'霹雳车',
|
ly_piliche:'霹雳车',
|
||||||
ly_piliche_info:'当你对其他角色造成伤害后,若造成伤害牌不为延时锦囊牌,你可以弃置其装备区里的防具牌与+1坐骑牌;当你失去此装备时,销毁之',
|
ly_piliche_info:'当你对其他角色造成伤害后,若造成伤害牌不为延时锦囊牌,你可以弃置其装备区里的防具牌与+1坐骑牌;当你失去此装备时,销毁之',
|
||||||
polu:'破橹',
|
polu:'破橹',
|
||||||
|
|
|
@ -564,6 +564,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
if(target.hasSkillTag('nogain')) return 0;
|
||||||
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){
|
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){
|
||||||
if(target.hasSkillTag('nodu')) return 0;
|
if(target.hasSkillTag('nodu')) return 0;
|
||||||
return -10;
|
return -10;
|
||||||
|
|
|
@ -1100,7 +1100,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hujing:{
|
hujing:{
|
||||||
trigger:{player:'phaseBegin'},
|
trigger:{player:'phaseEnd'},
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return get.cardPile('lianyaohu')?true:false;
|
return get.cardPile('lianyaohu')?true:false;
|
||||||
|
@ -10037,7 +10037,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
xiangu:'仙骨',
|
xiangu:'仙骨',
|
||||||
xiangu_info:'锁定技,你的手牌上限不会因体力值的减少而减少。',
|
xiangu_info:'锁定技,你的手牌上限不会因体力值的减少而减少。',
|
||||||
hujing:'壶境',
|
hujing:'壶境',
|
||||||
hujing_info:'锁定技,准备阶段,若牌堆或弃牌堆中有炼妖壶,你装备之;当你的装备区内有炼妖壶时,你的手牌上限+2',
|
hujing_info:'锁定技,结束阶段,若牌堆或弃牌堆中有炼妖壶,你装备之;当你的装备区内有炼妖壶时,你的手牌上限+2',
|
||||||
huajian:'化剑',
|
huajian:'化剑',
|
||||||
huajian_info:'出牌阶段结束时,你可以将一张牌当作杀对任意一名角色使用',
|
huajian_info:'出牌阶段结束时,你可以将一张牌当作杀对任意一名角色使用',
|
||||||
xuanyuan:'轩辕',
|
xuanyuan:'轩辕',
|
||||||
|
|
|
@ -31,7 +31,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
liufeng:['male','shu',4,['xiansi']],
|
liufeng:['male','shu',4,['xiansi']],
|
||||||
manchong:['male','wei',3,['junxing','yuce']],
|
manchong:['male','wei',3,['junxing','yuce']],
|
||||||
guanzhang:['male','shu',4,['fuhun']],
|
guanzhang:['male','shu',4,['fuhun']],
|
||||||
chenqun:['male','wei',3,['dingpin','faen']],
|
chenqun:['male','wei',3,['pindi','faen']],
|
||||||
sunluban:['female','wu',3,['chanhui','jiaojin']],
|
sunluban:['female','wu',3,['chanhui','jiaojin']],
|
||||||
guyong:['male','wu',3,['shenxing','bingyi']],
|
guyong:['male','wu',3,['shenxing','bingyi']],
|
||||||
caifuren:['female','qun',3,['qieting','xianzhou']],
|
caifuren:['female','qun',3,['qieting','xianzhou']],
|
||||||
|
@ -170,6 +170,76 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
liuchen:['liushan'],
|
liuchen:['liushan'],
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
pindi:{
|
||||||
|
enable:'phaseUse',
|
||||||
|
filterTarget:function(card,player,target){
|
||||||
|
if(player==target) return false;
|
||||||
|
if(player.storage.pindi_target&&
|
||||||
|
player.storage.pindi_target.contains(target)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
filterCard:function(card,player){
|
||||||
|
if(player.storage.pindi_type&&
|
||||||
|
player.storage.pindi_type.contains(get.type2(card))){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
subSkill:{
|
||||||
|
clear:{
|
||||||
|
trigger:{player:'phaseAfter'},
|
||||||
|
silent:true,
|
||||||
|
content:function(){
|
||||||
|
delete player.storage.pindi_target;
|
||||||
|
delete player.storage.pindi_type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
group:'pindi_clear',
|
||||||
|
check:function(card){
|
||||||
|
var num=_status.event.player.getStat('skill').pindi||0;
|
||||||
|
return 6+num-get.value(card);
|
||||||
|
},
|
||||||
|
position:'he',
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
if(!player.storage.pindi_target){
|
||||||
|
player.storage.pindi_target=[];
|
||||||
|
}
|
||||||
|
if(!player.storage.pindi_type){
|
||||||
|
player.storage.pindi_type=[];
|
||||||
|
}
|
||||||
|
player.storage.pindi_target.push(target);
|
||||||
|
player.storage.pindi_type.push(get.type2(cards[0]));
|
||||||
|
event.num=player.getStat('skill').pindi;
|
||||||
|
player.chooseControlList([
|
||||||
|
'令'+get.translation(target)+'摸'+get.cnNumber(event.num)+'张牌',
|
||||||
|
'令'+get.translation(target)+'弃置'+get.cnNumber(event.num)+'张牌'
|
||||||
|
],function(){
|
||||||
|
return _status.event.choice;
|
||||||
|
}).set('choice',get.attitude(player,target)>0?0:1);
|
||||||
|
'step 1'
|
||||||
|
if(result.index==0){
|
||||||
|
target.draw(event.num);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
target.chooseToDiscard(event.num,'he',true);
|
||||||
|
}
|
||||||
|
'step 2'
|
||||||
|
if(target.isDamaged()){
|
||||||
|
player.link(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
order:8,
|
||||||
|
threaten:1.8,
|
||||||
|
result:{
|
||||||
|
player:1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
funan:{
|
funan:{
|
||||||
trigger:{global:['respondAfter','useCardAfter']},
|
trigger:{global:['respondAfter','useCardAfter']},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
|
@ -2167,10 +2237,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
direct:true,
|
direct:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!player.countCards('he')) return false;
|
if(!player.countCards('he')) return false;
|
||||||
if(!event.source||event.source.isDead()) return false;
|
if(!event.source||!event.source.isIn()) return false;
|
||||||
if(event.source.storage.huisheng&&event.source.storage.huisheng.contains(player)) return false;
|
if(player.storage.huisheng.contains(event.source)) return false;
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
init:function(player){
|
||||||
|
player.storage.huisheng=[];
|
||||||
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var att=(get.attitude(player,trigger.source)>0);
|
var att=(get.attitude(player,trigger.source)>0);
|
||||||
|
@ -2190,18 +2263,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.chooseCard('he',[1,player.countCards('he')],get.prompt('huisheng',trigger.source)).set('ai',function(card){
|
player.chooseCard('he',[1,player.countCards('he')],get.prompt2('huisheng',trigger.source)).set('ai',function(card){
|
||||||
if(_status.event.att){
|
if(_status.event.att){
|
||||||
return 10-get.value(card);
|
return 10-get.value(card);
|
||||||
}
|
}
|
||||||
if(_status.event.goon){
|
if(_status.event.goon){
|
||||||
return 8-get.value(card);
|
return 8-get.value(card);
|
||||||
}
|
}
|
||||||
|
if(!ui.selected.cards.length){
|
||||||
|
return 7-get.value(card);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}).set('goon',goon).set('att',att);
|
}).set('goon',goon).set('att',att);
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('huisheng');
|
player.logSkill('huisheng',trigger.source);
|
||||||
|
game.delay();
|
||||||
event.num=result.cards.length;
|
event.num=result.cards.length;
|
||||||
var goon=false;
|
var goon=false;
|
||||||
if(event.num>2||get.attitude(trigger.source,player)>=0){
|
if(event.num>2||get.attitude(trigger.source,player)>=0){
|
||||||
|
@ -2215,10 +2292,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
str+=',或取消并弃置'+get.cnNumber(result.cards.length)+'张牌';
|
str+=',或取消并弃置'+get.cnNumber(result.cards.length)+'张牌';
|
||||||
}
|
}
|
||||||
if(!trigger.source.storage.huisheng){
|
|
||||||
trigger.source.storage.huisheng=[];
|
|
||||||
}
|
|
||||||
trigger.source.storage.huisheng.push(player);
|
|
||||||
trigger.source.chooseButton([str,result.cards],forced).set('ai',function(button){
|
trigger.source.chooseButton([str,result.cards],forced).set('ai',function(button){
|
||||||
if(_status.event.goon){
|
if(_status.event.goon){
|
||||||
return get.value(button.link);
|
return get.value(button.link);
|
||||||
|
@ -2240,6 +2313,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.$giveAuto(card,trigger.source);
|
player.$giveAuto(card,trigger.source);
|
||||||
}
|
}
|
||||||
trigger.cancel();
|
trigger.cancel();
|
||||||
|
player.storage.huisheng.push(trigger.source);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
trigger.source.chooseToDiscard(event.num,true,'he');
|
trigger.source.chooseToDiscard(event.num,true,'he');
|
||||||
|
@ -2247,50 +2321,67 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
qinqing:{
|
qinqing:{
|
||||||
mode:['identity'],
|
mode:['identity','versus'],
|
||||||
|
available:function(mode){
|
||||||
|
if(mode=='versus'&&_status.mode!='four') return false;
|
||||||
|
},
|
||||||
trigger:{player:'phaseEnd'},
|
trigger:{player:'phaseEnd'},
|
||||||
direct:true,
|
direct:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
var zhu=get.zhu(player);
|
var zhu=get.zhu(player);
|
||||||
if(!zhu||!zhu.isZhu) return false;
|
if(!zhu||!zhu.isZhu) return false;
|
||||||
var players=game.filterPlayer();
|
return game.hasPlayer(function(current){
|
||||||
for(var i=0;i<players.length;i++){
|
return current!=player&¤t!=zhu&&get.distance(current,zhu,'attack')<=1;
|
||||||
if(players[i]==zhu||players[i]==player) continue;
|
});
|
||||||
if(get.distance(players[i],zhu,'attack')<=1&&players[i].countCards('he')){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.chooseTarget(get.prompt('qinqing'),function(card,player,target){
|
player.chooseTarget(get.prompt('qinqing'),[1,Infinity],function(card,player,target){
|
||||||
if(target==player||target==get.zhu(player)) return false;
|
var zhu=get.zhu(player);
|
||||||
return get.distance(target,get.zhu(player),'attack')<=1&&target.countCards('he')>0;
|
if(target==player||target==zhu) return false;
|
||||||
|
return get.distance(target,zhu,'attack')<=1;
|
||||||
}).set('ai',function(target){
|
}).set('ai',function(target){
|
||||||
var player=_status.event.player;
|
var he=target.countCards('he')
|
||||||
var zhu=_status.event.zhu;
|
if(get.attitude(_status.event.player,target)>0){
|
||||||
if(get.attitude(player,target)>0) return 0;
|
if(he==0) return 1;
|
||||||
var nh=target.countCards('h');
|
if(target.countCards('h')>get.zhu(player).countCards('h')) return 1;
|
||||||
var nh2=zhu.countCards('h');
|
}
|
||||||
if(nh>nh2) return 2;
|
else{
|
||||||
if(nh==nh2&&target.countCards('e')) return 1.5;
|
if(he>0) return 1;
|
||||||
return 1;
|
}
|
||||||
}).set('zhu',get.zhu(player));
|
return 0;
|
||||||
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
event.target=result.targets[0];
|
event.targets=result.targets.slice(0).sortBySeat();
|
||||||
player.logSkill('qinqing',event.target);
|
event.list=event.targets.slice(0);
|
||||||
player.discardPlayerCard(event.target,'he',true);
|
player.logSkill('qinqing',event.targets);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.finish();
|
event.finish();
|
||||||
}
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
event.target.draw();
|
if(event.targets.length){
|
||||||
|
var target=event.targets.shift();
|
||||||
|
if(target.countCards('he')){
|
||||||
|
player.discardPlayerCard(target,'he',true);
|
||||||
|
}
|
||||||
|
target.draw();
|
||||||
|
event.redo();
|
||||||
|
}
|
||||||
'step 3'
|
'step 3'
|
||||||
if(event.target.countCards('h')>get.zhu(player).countCards('h')){
|
var num=0;
|
||||||
player.draw();
|
var zhu=get.zhu(player);
|
||||||
|
if(zhu){
|
||||||
|
var nh=zhu.countCards('h');
|
||||||
|
for(var i=0;i<event.list.length;i++){
|
||||||
|
if(event.list[i].countCards('h')>nh){
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(num){
|
||||||
|
player.draw(num);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -5159,6 +5250,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
order:1,
|
order:1,
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
if(target.hasSkillTag('nogain')) return 0;
|
||||||
if(player.countCards('h')==1&&player.countCards('h','du')) return -1;
|
if(player.countCards('h')==1&&player.countCards('h','du')) return -1;
|
||||||
if(player.hp<=2&&player.countCards('h','shan')) return 0;
|
if(player.hp<=2&&player.countCards('h','shan')) return 0;
|
||||||
if(target.countCards('h')+player.countCards('h')>target.hp+2) return 0;
|
if(target.countCards('h')+player.countCards('h')>target.hp+2) return 0;
|
||||||
|
@ -6273,7 +6365,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{global:['turnOverAfter','linkAfter']},
|
trigger:{global:['turnOverAfter','linkAfter']},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.name=='link') return event.player.isLinked();
|
if(event.name=='link') return event.player.isLinked();
|
||||||
return true;
|
return !event.player.isTurnedOver();
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
return get.attitude(player,event.player)>0;
|
return get.attitude(player,event.player)>0;
|
||||||
|
@ -9143,6 +9235,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
qinmi:'秦宓',
|
qinmi:'秦宓',
|
||||||
caiyong:'蔡邕',
|
caiyong:'蔡邕',
|
||||||
|
|
||||||
|
pindi:'品第',
|
||||||
|
pindi_info:'出牌阶段,你可以弃置一张牌并选择一名其他角色(不能弃置相同类型牌且不能指定相同的角色),然后令其执行一项:摸X张牌;弃置X张牌(X为本回合此技能发动次数)。若其已受伤,你须横置自身。',
|
||||||
funan_jiexun:'诫训',
|
funan_jiexun:'诫训',
|
||||||
bizhuan:'辟撰',
|
bizhuan:'辟撰',
|
||||||
bizhuan_bg:'书',
|
bizhuan_bg:'书',
|
||||||
|
@ -9201,9 +9295,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
jiyu:'讥谀',
|
jiyu:'讥谀',
|
||||||
jiyu_info:'出牌阶段每名角色限一次,若你有可以使用的手牌,你可以令一名角色弃置一张手牌。若如此做,你不能使用与之相同花色的牌,直到回合结束。若其以此法弃置的牌为黑桃,你翻面并令其失去1点体力',
|
jiyu_info:'出牌阶段每名角色限一次,若你有可以使用的手牌,你可以令一名角色弃置一张手牌。若如此做,你不能使用与之相同花色的牌,直到回合结束。若其以此法弃置的牌为黑桃,你翻面并令其失去1点体力',
|
||||||
qinqing:'寝情',
|
qinqing:'寝情',
|
||||||
qinqing_info:'结束阶段开始时,你可以弃置攻击范围内含有主公的一名其他角色的一张牌,令其摸一张牌,然后若其手牌比主公多,你摸一张牌',
|
qinqing_info:'结束阶段,你可以选择任意名攻击范围内含有主公的角色,然后弃置这些角色各一张牌并令其摸一张牌(无牌则不弃),若如此做,你摸X张牌(X为其中手牌比主公多的角色数)',
|
||||||
huisheng:'贿生',
|
huisheng:'贿生',
|
||||||
huisheng_info:'每名角色限一次,当你受到其他角色造成的伤害时,你可选你的任意数量的牌令该角色观看,然后该角色选择:1.获得这些牌中的一张,然后防止伤害。2.弃置等量的牌',
|
huisheng_info:'当你受到其他角色对你造成的伤害时,你可以令其观看你任意数量的牌并令其选择一项:1.获得这些牌中的一张,防止此伤害,然后你不能再对其发动“贿生”;2.弃置等量的牌',
|
||||||
jishe:'极奢',
|
jishe:'极奢',
|
||||||
jishe_info:'出牌阶段,若你的手牌上限大于0,你可以摸一张牌,然后你本回合的手牌上限-1。结束阶段开始时,若你没有手牌,则你可以横置至多X名角色的武将牌(X为你的体力值)',
|
jishe_info:'出牌阶段,若你的手牌上限大于0,你可以摸一张牌,然后你本回合的手牌上限-1。结束阶段开始时,若你没有手牌,则你可以横置至多X名角色的武将牌(X为你的体力值)',
|
||||||
lianhuo:'链祸',
|
lianhuo:'链祸',
|
||||||
|
@ -9382,7 +9476,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
dingpin:'定品',
|
dingpin:'定品',
|
||||||
dingpin_info:'出牌阶段限三次,你可以弃置一张手牌,然后令一名已受伤的角色进行一次判定,若结果为黑色,该角色摸X张牌(X为该角色已损失的体力值),然后你本回合不能再对其发动“定品”;若结果为红色,将你的武将牌翻面。',
|
dingpin_info:'出牌阶段限三次,你可以弃置一张手牌,然后令一名已受伤的角色进行一次判定,若结果为黑色,该角色摸X张牌(X为该角色已损失的体力值),然后你本回合不能再对其发动“定品”;若结果为红色,将你的武将牌翻面。',
|
||||||
faen:'法恩',
|
faen:'法恩',
|
||||||
faen_info:'每当一名角色的武将牌翻面或横置时,你可以令其摸一张牌。',
|
faen_info:'当一名角色翻至正面或横置后,你可以令其摸一张牌。',
|
||||||
jyzongshi:'纵适',
|
jyzongshi:'纵适',
|
||||||
jyzongshi_info:'每当你拼点赢,你可以获得对方此次拼点的牌;每当你拼点没赢,你可以收回你此次拼点的牌',
|
jyzongshi_info:'每当你拼点赢,你可以获得对方此次拼点的牌;每当你拼点没赢,你可以收回你此次拼点的牌',
|
||||||
qiaoshui:'巧说',
|
qiaoshui:'巧说',
|
||||||
|
|
18
game/game.js
18
game/game.js
|
@ -6534,7 +6534,9 @@
|
||||||
game.saveConfigValue('brokenFile');
|
game.saveConfigValue('brokenFile');
|
||||||
if(!lib.node.http) lib.node.http=require('http');
|
if(!lib.node.http) lib.node.http=require('http');
|
||||||
if(!lib.node.https) lib.node.https=require('https');
|
if(!lib.node.https) lib.node.https=require('https');
|
||||||
var request = (url.indexOf('https')==0?lib.node.https:lib.node.http).get(encodeURI(url), function(response) {
|
var opts = require('url').parse(encodeURI(url));
|
||||||
|
opts.headers={'User-Agent': navigator.userAgent};
|
||||||
|
var request = (url.indexOf('https')==0?lib.node.https:lib.node.http).get(opts, function(response) {
|
||||||
var stream=response.pipe(file);
|
var stream=response.pipe(file);
|
||||||
stream.on('finish',function(){
|
stream.on('finish',function(){
|
||||||
lib.config.brokenFile.remove(folder);
|
lib.config.brokenFile.remove(folder);
|
||||||
|
@ -28630,6 +28632,13 @@
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(info.available&&info.available(mode)==false){
|
||||||
|
lib.skill[i]={};
|
||||||
|
if(lib.translate[i+'_info']){
|
||||||
|
lib.translate[i+'_info']='此模式下不可用';
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(info.viewAs){
|
if(info.viewAs){
|
||||||
if(typeof info.viewAs=='string'){
|
if(typeof info.viewAs=='string'){
|
||||||
info.viewAs={name:info.viewAs};
|
info.viewAs={name:info.viewAs};
|
||||||
|
@ -35873,7 +35882,7 @@
|
||||||
else{
|
else{
|
||||||
updatep1.style.display='';
|
updatep1.style.display='';
|
||||||
updatep2.style.display='';
|
updatep2.style.display='';
|
||||||
updatep3.style.display='none'; // coding
|
// updatep3.style.display='none'; // coding
|
||||||
updatepx.style.display='none';
|
updatepx.style.display='none';
|
||||||
updatep4.innerHTML='更新';
|
updatep4.innerHTML='更新';
|
||||||
}
|
}
|
||||||
|
@ -35897,7 +35906,7 @@
|
||||||
|
|
||||||
var button6=document.createElement('button');
|
var button6=document.createElement('button');
|
||||||
button6.innerHTML='设为国内镜像';
|
button6.innerHTML='设为国内镜像';
|
||||||
button6.style.display='none';// coding
|
// button6.style.display='none';// coding
|
||||||
// button6.style.marginLeft='5px';
|
// button6.style.marginLeft='5px';
|
||||||
button6.onclick=function(){
|
button6.onclick=function(){
|
||||||
game.saveConfig('updateURL',lib.mirrorURL);
|
game.saveConfig('updateURL',lib.mirrorURL);
|
||||||
|
@ -44129,6 +44138,9 @@
|
||||||
if(method=='trick'&&lib.card[obj.name].type=='delay') return 'trick';
|
if(method=='trick'&&lib.card[obj.name].type=='delay') return 'trick';
|
||||||
return lib.card[obj.name].type;
|
return lib.card[obj.name].type;
|
||||||
},
|
},
|
||||||
|
type2:function(card){
|
||||||
|
return get.type(card,'trick');
|
||||||
|
},
|
||||||
subtype:function(obj){
|
subtype:function(obj){
|
||||||
if(typeof obj=='string') obj={name:obj};
|
if(typeof obj=='string') obj={name:obj};
|
||||||
if(typeof obj!='object') return;
|
if(typeof obj!='object') return;
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
window.noname_update={
|
window.noname_update={
|
||||||
version:'1.9.48.1',
|
version:'1.9.49',
|
||||||
update:'1.9.48',
|
// update:'1.9.48',
|
||||||
changeLog:[
|
changeLog:[
|
||||||
'bug修复'
|
// '祭天祀地模式(在 选项-开始-身份 中开启)',
|
||||||
|
'修复国内镜像更新问题',
|
||||||
|
'武将修改',
|
||||||
|
'毛玻璃主题(仅Safari可用)',
|
||||||
|
'players://["chenqun","lifeng","maliang","huanghao"]'
|
||||||
],
|
],
|
||||||
files:[
|
files:[
|
||||||
'game/game.js',
|
// 'game/game.js',
|
||||||
// 'game/package.js',
|
// 'game/package.js',
|
||||||
// 'game/config.js',
|
// 'game/config.js',
|
||||||
// 'game/source.js',
|
// 'game/source.js',
|
||||||
|
@ -22,7 +26,7 @@ window.noname_update={
|
||||||
// 'character/gwent.js',
|
// 'character/gwent.js',
|
||||||
// 'character/diy.js',
|
// 'character/diy.js',
|
||||||
// 'character/standard.js',
|
// 'character/standard.js',
|
||||||
'character/shenhua.js',
|
// 'character/shenhua.js',
|
||||||
// 'character/refresh.js',
|
// 'character/refresh.js',
|
||||||
// 'character/yijiang.js',
|
// 'character/yijiang.js',
|
||||||
// 'character/yxs.js',
|
// 'character/yxs.js',
|
||||||
|
|
|
@ -5773,7 +5773,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
else if(_status.mode=='2v2'){
|
else if(_status.mode=='2v2'){
|
||||||
if(_status.replacetwo){
|
if(_status.replacetwo){
|
||||||
|
// later ?
|
||||||
}
|
}
|
||||||
var friend;
|
var friend;
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
|
Loading…
Reference in New Issue