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){
return target==player;
},
modTarget:true,
content:function(){
'step 0'
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';
}
else{
var e2=player.get('e','2');
var e3=player.get('e','3');
if((e2&&e3)||((e2||e3)&&player.needsToDiscard()<=1)||Math.random()<0.5){
var e2=target.get('e','2');
var e3=target.get('e','3');
if((e2&&e3)||((e2||e3)&&target.needsToDiscard()<=1)||Math.random()<0.5){
choice='trick';
}
else{
choice='equip';
}
}
player.chooseControl('basic','trick','equip',function(){
target.chooseControl('basic','trick','equip',function(){
return choice;
}).set('prompt','选择一种卡牌类型');
'step 1'
@ -33,12 +34,12 @@ card.swd={
list[i]=[get.translation(result.control),'',list[i]];
}
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]});
};
'step 2'
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,

View File

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

View File

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