修复助战弃牌视为非自己弃置的bug

This commit is contained in:
copcap 2023-07-23 02:59:01 +08:00
parent 539aa1ab41
commit 7984f74a43
4 changed files with 21 additions and 6 deletions

View File

@ -678,7 +678,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(event.zhuzhanresult){ if(event.zhuzhanresult){
var target=event.zhuzhanresult; var target=event.zhuzhanresult;
target.line(player,'green'); target.line(player,'green');
target.discard(event.zhuzhanresult2.cards); target.discard(event.zhuzhanresult2.cards).discarder=target;
target.popup('助战','wood'); target.popup('助战','wood');
game.log(target,'响应了',player,'发起的助战'); game.log(target,'响应了',player,'发起的助战');
target.addExpose(0.2); target.addExpose(0.2);

View File

@ -2275,7 +2275,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(event.zhuzhanresult){ if(event.zhuzhanresult){
var target=event.zhuzhanresult; var target=event.zhuzhanresult;
target.line(player,'green'); target.line(player,'green');
target.discard(event.zhuzhanresult2.cards); target.discard(event.zhuzhanresult2.cards).discarder=target;
target.draw(2); target.draw(2);
target.popup('助战','wood'); target.popup('助战','wood');
game.log(target,'响应了',player,'发起的助战'); game.log(target,'响应了',player,'发起的助战');

View File

@ -763,10 +763,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'将势力改为任意一个势力' '将势力改为任意一个势力'
].map((text,ind)=>{ ].map((text,ind)=>{
var hint=''; var hint='';
if(list.contains(ind+1)){ if(list2.contains(ind+1)){
return text; return text;
} }
else{ else if(!list.contains(ind+1)){
hint+='已被执行过且'; hint+='已被执行过且';
} }
if(ind==1&&nochai&&!list2.contains(ind+1)) hint+='无有手牌角色且'; if(ind==1&&nochai&&!list2.contains(ind+1)) hint+='无有手牌角色且';
@ -841,7 +841,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
选项三:function(){ 选项三:function(){
player.chooseUseTarget('sha',true,false).set('logSkill','olgoude'); player.chooseUseTarget('sha',true,false).set('logSkill','olgoude').set('prompt','苟得:选择【杀】的目标');
}, },
选项四:function(){ 选项四:function(){
'step 0' 'step 0'

View File

@ -10545,6 +10545,7 @@
}, },
changeGroup:function(){ changeGroup:function(){
'step 0' 'step 0'
event.originGroup=player.group;
if(!event.group) event.group=player.group; if(!event.group) event.group=player.group;
var group=event.group; var group=event.group;
player.getHistory('custom').push(event); player.getHistory('custom').push(event);
@ -16210,6 +16211,7 @@
game.log(player,'弃置了',cards); game.log(player,'弃置了',cards);
event.done=player.lose(cards,event.position,'visible'); event.done=player.lose(cards,event.position,'visible');
event.done.type='discard'; event.done.type='discard';
if(event.discarder) event.done.discarder=event.discarder;
"step 1" "step 1"
event.trigger('discard'); event.trigger('discard');
}, },
@ -23662,7 +23664,7 @@
this.addSkill(skill,checkConflict,true,true); this.addSkill(skill,checkConflict,true,true);
if(!expire){ if(!expire){
expire='phaseAfter'; expire=['phaseAfter','phaseBefore'];
} }
this.tempSkills[skill]=expire; this.tempSkills[skill]=expire;
@ -29055,6 +29057,19 @@
content:function(){ content:function(){
player.removeSkill('counttrigger'); player.removeSkill('counttrigger');
delete player.storage.counttrigger; delete player.storage.counttrigger;
},
group:'counttrigger_2',
subSkill:{
2:{
trigger:{global:'phaseBefore'},
silent:true,
charlotte:true,
priority:100,
content:function(){
player.removeSkill('counttrigger');
delete player.storage.counttrigger;
},
}
} }
}, },
_recovercheck:{ _recovercheck:{