Skip to content

Commit

Permalink
1.9.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
libccy authored and libccy committed Jan 30, 2017
1 parent 0cac819 commit c91b2f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
15 changes: 8 additions & 7 deletions card/swd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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,
Expand Down
7 changes: 4 additions & 3 deletions game/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -6353,7 +6353,7 @@
}
}
else{
get.card().aiexclude();
get.card(true).aiexclude();
game.uncheck();
}
event.redo();
Expand Down Expand Up @@ -7153,7 +7153,7 @@
_status.event.aiexclude.length=0;
}
else{
get.card().aiexclude();
get.card(true).aiexclude();
game.uncheck();
event.redo();
game.resume();
Expand Down Expand Up @@ -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;
Expand All @@ -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){
Expand Down
2 changes: 1 addition & 1 deletion game/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ window.noname_update={
'bug修复',
],
files:[
// 'game/game.js',
'game/game.js',
// 'game/package.js',
// 'game/asset.js',
// 'card/hearth.js',
Expand Down

0 comments on commit c91b2f5

Please sign in to comment.