【生息】“取消”按钮也写入chooseButton,增加美观性
This commit is contained in:
parent
eadcf6ecb4
commit
477a71284a
|
@ -4061,18 +4061,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.chooseButton([
|
player.chooseButton([
|
||||||
'###'+get.prompt('mjshengxi')+'###获得一张智囊或摸一张牌',
|
'###'+get.prompt('mjshengxi')+'###获得一张智囊或摸一张牌',
|
||||||
[list,'vcard'],
|
[list,'vcard'],
|
||||||
[['摸一张牌'],'tdnodes'],
|
[['摸一张牌','取消'],'tdnodes'],
|
||||||
]).set('ai',function(card){
|
],true).set('ai',function(card){
|
||||||
if(card.link[2]&&get.zhinangs().contains(card.link[2])){
|
if(card.link[2]){
|
||||||
if(!get.cardPile2(function(cardx){
|
if(!get.cardPile2(function(cardx){
|
||||||
return cardx.name==card.link[2];
|
return cardx.name==card.link[2];
|
||||||
})) return 0;
|
})) return 0;
|
||||||
return (Math.random()+1.5)*get.value({name:card.link[2]},_status.event.player);
|
return (Math.random()+1.5)*get.value({name:card.link[2]},_status.event.player);
|
||||||
}
|
}
|
||||||
return 1;
|
if(card.link=='摸一张牌') return 1;
|
||||||
|
return 0;
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool&&result.links[0]!='取消'){
|
||||||
player.logSkill('mjshengxi');
|
player.logSkill('mjshengxi');
|
||||||
if(result.links[0]=='摸一张牌') player.draw();
|
if(result.links[0]=='摸一张牌') player.draw();
|
||||||
else{
|
else{
|
||||||
|
|
Loading…
Reference in New Issue