This commit is contained in:
parent
39d148567c
commit
137c375d13
27
game/game.js
27
game/game.js
|
@ -5169,6 +5169,21 @@
|
||||||
if(!game.online) player.discard(event.result.cards);
|
if(!game.online) player.discard(event.result.cards);
|
||||||
if(event.dialog&&event.dialog.close) event.dialog.close();
|
if(event.dialog&&event.dialog.close) event.dialog.close();
|
||||||
},
|
},
|
||||||
|
chooseToCompareMultiple:function(){
|
||||||
|
if(player.num('h')==0){
|
||||||
|
event.result={cancelled:true,bool:false}
|
||||||
|
event.finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for(var i=0;i<targets.length;i++){
|
||||||
|
if(targets[i].num('h')==0){
|
||||||
|
event.result={cancelled:true,bool:false}
|
||||||
|
event.finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
game.log(player,'对',target,'发起拼点');
|
||||||
|
},
|
||||||
chooseToCompare:function(){
|
chooseToCompare:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
if(player.num('h')==0||target.num('h')==0){
|
if(player.num('h')==0||target.num('h')==0){
|
||||||
|
@ -8349,6 +8364,17 @@
|
||||||
chooseToCompare:function(target,check){
|
chooseToCompare:function(target,check){
|
||||||
var next=game.createEvent('chooseToCompare');
|
var next=game.createEvent('chooseToCompare');
|
||||||
next.player=this;
|
next.player=this;
|
||||||
|
if(Array.isArray(target)){
|
||||||
|
next.targets=target;
|
||||||
|
if(check) next.ai=check;
|
||||||
|
else next.ai=function(card){
|
||||||
|
var addi=(ai.get.value(card)>=8&&get.type(card)!='equip')?-10:0;
|
||||||
|
if(card.name=='du') addi+=5;
|
||||||
|
return get.number(card)-ai.get.value(card)/2+addi;
|
||||||
|
}
|
||||||
|
next.content=lib.element.playerproto.chooseToCompareMultiple;
|
||||||
|
}
|
||||||
|
else{
|
||||||
next.target=target;
|
next.target=target;
|
||||||
if(check) next.ai=check;
|
if(check) next.ai=check;
|
||||||
else next.ai=function(card){
|
else next.ai=function(card){
|
||||||
|
@ -8371,6 +8397,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
next.content=lib.element.playerproto.chooseToCompare;
|
next.content=lib.element.playerproto.chooseToCompare;
|
||||||
|
}
|
||||||
next._args=Array.from(arguments);
|
next._args=Array.from(arguments);
|
||||||
return next;
|
return next;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue