修改南蛮、万箭让其支持和杀/决斗一样需要额外打出一张牌响应

This commit is contained in:
BauxiteAl 2023-10-02 20:58:34 +08:00
parent d04957377f
commit 4d0987119a
1 changed files with 24 additions and 2 deletions

View File

@ -888,10 +888,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
reverseOrder:true,
content:function(){
"step 0"
if(!event.shaReq) event.shaReq={};
if(typeof event.shaReq[target.playerid]!='number') event.shaReq[target.playerid]=1;
event.shaRequired=event.shaReq[target.playerid];
if(typeof event.baseDamage!='number') event.baseDamage=1;
"step 1"
if(event.directHit) event._result={bool:false};
else{
var next=target.chooseToRespond({name:'sha'});
if(event.shaRequired>1){
next.set('prompt2','共需打出'+event.shaRequired+'张杀');
}
next.set('ai',function(card){
var evt=_status.event.getParent();
if(get.damageEffect(evt.target,evt.player,evt.target)>=0) return 0;
@ -901,10 +908,14 @@ game.import('card',function(lib,game,ui,get,ai,_status){
});
next.autochoose=lib.filter.autoRespondSha;
}
"step 1"
"step 2"
if(result.bool==false){
target.damage();
}
else{
event.shaRequired--;
if(event.shaRequired>0) event.goto(1);
}
},
ai:{
wuxie:function(target,card,player,viewer){
@ -960,10 +971,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
content:function(){
"step 0"
if(!event.shanReq) event.shanReq={};
if(typeof event.shanReq[target.playerid]!='number') event.shanReq[target.playerid]=1;
event.shanRequired=event.shanReq[target.playerid];
if(typeof event.baseDamage!='number') event.baseDamage=1;
"step 1"
if(event.directHit) event._result={bool:false};
else{
var next=target.chooseToRespond({name:'shan'});
if(event.shanRequired>1){
next.set('prompt2','共需打出'+event.shanRequired+'张闪');
}
next.set('ai',function(card){
var evt=_status.event.getParent();
if(get.damageEffect(evt.target,evt.player,evt.target)>=0) return 0;
@ -976,10 +994,14 @@ game.import('card',function(lib,game,ui,get,ai,_status){
});
next.autochoose=lib.filter.autoRespondShan;
}
"step 1"
"step 2"
if(result.bool==false){
target.damage();
}
else{
event.shanRequired--;
if(event.shanRequired>0) event.goto(1);
}
},
ai:{
wuxie:function(target,card,player,viewer){