v1.9.89.4(part1)

This commit is contained in:
Spmario233 2019-07-14 18:57:05 +08:00 committed by GitHub
parent a81312076e
commit d05dbce020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 9 deletions

View File

@ -659,6 +659,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
selectTarget:-1, selectTarget:-1,
cardcolor:'red', cardcolor:'red',
reverseOrder:true, reverseOrder:true,
global:'taoyuan_nowuxie',
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
//return target.hp<target.maxHp; //return target.hp<target.maxHp;
return true; return true;
@ -855,10 +856,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
"step 0" "step 0"
if(event.turn==undefined) event.turn=target; if(event.turn==undefined) event.turn=target;
var evt=event.getParent('useCard') var evt=event.getParent('useCard')
if(typeof event.baseDamage!='number'||!evt.baseDamage){ if(evt&&(typeof evt.baseDamage=='number'&&evt.baseDamage>0)){
evt.baseDamage=1; event.baseDamage=evt.baseDamage;
event.evt=evt;
} }
else event.baseDamage=1;
if(typeof event.extraDamage!='number'){
event.extraDamage=0;
}
event.playerCards=[];
event.targetCards=[];
"step 1" "step 1"
event.trigger('juedou'); event.trigger('juedou');
"step 2" "step 2"
@ -904,18 +910,22 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
else{ else{
if(result.bool){ if(result.bool){
if(event.turn==target) event.turn=player; if(event.turn==target){
else event.turn=target; if(result.cards) event.targetCards.addArray(result.cards);
event.turn=player;
}
else{
if(result.cards) event.playerCards.addArray(result.cards);
event.turn=target;
}
event.goto(1); event.goto(1);
} }
else{ else{
var num=1;
if(event.evt&&event.evt.baseDamage) num=event.evt.baseDamage;
if(event.turn==target){ if(event.turn==target){
target.damage(num); target.damage(event.baseDamage+event.extraDamage);
} }
else{ else{
player.damage(target,num); player.damage(target,event.baseDamage+event.extraDamage);
} }
} }
} }
@ -1688,6 +1698,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
} }
}, },
taoyuan_nowuxie:{
mod:{
wuxieRespondable:function(card,player,target){
if(card.name=='taoyuan'&&target.isHealthy()) return false;
}
}
},
_wuxie:{ _wuxie:{
trigger:{player:['useCardToBefore','phaseJudge']}, trigger:{player:['useCardToBefore','phaseJudge']},
priority:5, priority:5,