This commit is contained in:
libccy 2017-01-30 14:40:22 +08:00
parent 0cac8196ca
commit c91b2f5b6f
3 changed files with 13 additions and 11 deletions

View File

@ -7,23 +7,24 @@ card.swd={
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return target==player; return target==player;
}, },
modTarget:true,
content:function(){ content:function(){
'step 0' 'step 0'
var choice; var choice;
if(player.num('h','shan')==0||player.num('h','sha')==0||player.hp<=1){ if(target.num('h','shan')==0||target.num('h','sha')==0||target.hp<=1){
choice='basic'; choice='basic';
} }
else{ else{
var e2=player.get('e','2'); var e2=target.get('e','2');
var e3=player.get('e','3'); var e3=target.get('e','3');
if((e2&&e3)||((e2||e3)&&player.needsToDiscard()<=1)||Math.random()<0.5){ if((e2&&e3)||((e2||e3)&&target.needsToDiscard()<=1)||Math.random()<0.5){
choice='trick'; choice='trick';
} }
else{ else{
choice='equip'; choice='equip';
} }
} }
player.chooseControl('basic','trick','equip',function(){ target.chooseControl('basic','trick','equip',function(){
return choice; return choice;
}).set('prompt','选择一种卡牌类型'); }).set('prompt','选择一种卡牌类型');
'step 1' 'step 1'
@ -33,12 +34,12 @@ card.swd={
list[i]=[get.translation(result.control),'',list[i]]; list[i]=[get.translation(result.control),'',list[i]];
} }
var dialog=ui.create.dialog('选择一张加入你的手牌',[list,'vcard'],'hidden'); var dialog=ui.create.dialog('选择一张加入你的手牌',[list,'vcard'],'hidden');
player.chooseButton(dialog,true).ai=function(button){ target.chooseButton(dialog,true).ai=function(button){
return ai.get.value({name:button.link[2]}); return ai.get.value({name:button.link[2]});
}; };
'step 2' 'step 2'
if(result.buttons){ if(result.buttons){
player.gain(game.createCard(result.buttons[0].link[2]),'draw'); target.gain(game.createCard(result.buttons[0].link[2]),'draw');
} }
}, },
selectTarget:-1, selectTarget:-1,

View File

@ -6353,7 +6353,7 @@
} }
} }
else{ else{
get.card().aiexclude(); get.card(true).aiexclude();
game.uncheck(); game.uncheck();
} }
event.redo(); event.redo();
@ -7153,7 +7153,7 @@
_status.event.aiexclude.length=0; _status.event.aiexclude.length=0;
} }
else{ else{
get.card().aiexclude(); get.card(true).aiexclude();
game.uncheck(); game.uncheck();
event.redo(); event.redo();
game.resume(); game.resume();
@ -32704,7 +32704,7 @@
if(typeof select=='function') return get.select(select()); if(typeof select=='function') return get.select(select());
return [1,1] return [1,1]
}, },
card:function(){ card:function(original){
if(_status.event.skill){ if(_status.event.skill){
var card=get.info(_status.event.skill).viewAs; var card=get.info(_status.event.skill).viewAs;
if(card) return card; if(card) return card;
@ -32713,6 +32713,7 @@
return _status.event._get_card; return _status.event._get_card;
} }
var card=ui.selected.cards[0]; var card=ui.selected.cards[0];
if(original) return card;
if(card){ if(card){
var info=get.info(card); var info=get.info(card);
if(info.autoViewAs){ if(info.autoViewAs){

View File

@ -5,7 +5,7 @@ window.noname_update={
'bug修复', 'bug修复',
], ],
files:[ files:[
// 'game/game.js', 'game/game.js',
// 'game/package.js', // 'game/package.js',
// 'game/asset.js', // 'game/asset.js',
// 'card/hearth.js', // 'card/hearth.js',