优化徐荣技能filter判定
This commit is contained in:
parent
7e42021b82
commit
bbee88a2a7
|
@ -24760,12 +24760,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player:'enterGame',
|
player:'enterGame',
|
||||||
},
|
},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
|
if(player.countMark('xinfu_xionghuo')>=3) return false;
|
||||||
return event.name!='phase'||game.phaseNumber==0;
|
return event.name!='phase'||game.phaseNumber==0;
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
locked:false,
|
locked:false,
|
||||||
content:function(){
|
content:function(){
|
||||||
player.addMark('xinfu_xionghuo',3);
|
player.addMark('xinfu_xionghuo',3-player.countMark('xinfu_xionghuo'));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
damage:{
|
damage:{
|
||||||
|
@ -24853,13 +24854,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{global:'dying'},
|
trigger:{global:'dying'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.player!=player;
|
if(event.player==player) return false;
|
||||||
|
const bool1=(!player.hasSkill('xinfu_xionghuo')||player.countMark('xinfu_xionghuo')<3);
|
||||||
|
const bool2=(event.player.hp<0&&get.itemtype(event.parent.cards)=='cards'&&event.parent.cards.some(card=>get.position(card,true)=='o'));
|
||||||
|
return bool1||bool2;
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
if(player.countMark('xinfu_xionghuo')<3) player.addMark('xinfu_xionghuo',1);
|
if(!player.hasSkill('xinfu_xionghuo')||player.countMark('xinfu_xionghuo')<3) player.addMark('xinfu_xionghuo',1);
|
||||||
if(trigger.player.hp<0&&get.itemtype(trigger.parent.cards)=='cards'&&get.position(trigger.parent.cards[0],true)=='o'){
|
if(trigger.player.hp<0&&get.itemtype(trigger.parent.cards)=='cards'&&trigger.parent.cards.some(card=>get.position(card,true)=='o')){
|
||||||
player.gain(trigger.parent.cards,'gain2');
|
player.gain(trigger.parent.cards.filter(card=>get.position(card,true)=='o'),'gain2');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue