修复寤寐会吞掉赵直技能的bug

This commit is contained in:
copcap 2024-02-06 23:53:32 +08:00
parent bf81930fc9
commit f63e9ad376
No known key found for this signature in database
GPG Key ID: 30E7AB6699451AEE
1 changed files with 25 additions and 12 deletions

View File

@ -6059,6 +6059,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.finish(); trigger.finish();
trigger.untrigger(true); trigger.untrigger(true);
trigger._triggered=5; trigger._triggered=5;
game.players.slice().concat(game.dead).forEach(current=>{
current.getHistory().isSkipped=true;
current.getStat().isSkipped=true;
});
var evt=player.insertPhase(); var evt=player.insertPhase();
delete evt.skill; delete evt.skill;
game.broadcastAll(function(player){ game.broadcastAll(function(player){
@ -6140,18 +6144,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dczhanmeng:{ dczhanmeng:{
audio:2, audio:2,
trigger:{player:'useCard'}, trigger:{player:'useCard'},
filter:function(event,player){ filter(event,player){
return !player.hasSkill('dczhanmeng_choice1')||!player.hasSkill('dczhanmeng_choice2')|| return !player.hasSkill('dczhanmeng_choice1')||!player.hasSkill('dczhanmeng_choice2')||
!player.hasSkill('dczhanmeng_choice0')&&!game.hasPlayer2(current=>{ !player.hasSkill('dczhanmeng_choice0')&&!game.hasPlayer2(current=>{
var history=current.actionHistory; const history=current.actionHistory;
if(history.length<2) return false; if(history.length<2) return false;
var list=history[history.length-2].useCard.map(evt=>evt.card.name); for(let i=history.length-2;i>=0;i--){
if(list.includes(event.card.name)) return true; if(history[i].isSkipped) continue;
const list=history[i].useCard.map(evt=>evt.card.name);
return list.includes(event.card.name);
}
return false; return false;
}); },true);
}, },
direct:true, direct:true,
content:function(){ content(){
'step 0' 'step 0'
var list=[]; var list=[];
var choiceList=[ var choiceList=[
@ -6162,10 +6169,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var used=game.hasPlayer2(current=>{ var used=game.hasPlayer2(current=>{
var history=current.actionHistory; var history=current.actionHistory;
if(history.length<2) return false; if(history.length<2) return false;
var list=history[history.length-2].useCard.map(evt=>evt.card.name); for(let i=history.length-2;i>=0;i--){
if(list.includes(trigger.card.name)) return true; if(history[i].isSkipped) continue;
const list=history[i].useCard.map(evt=>evt.card.name);
return list.includes(trigger.card.name);
}
return false; return false;
}); },true);
if(!player.hasSkill('dczhanmeng_choice0')&&!used) list.push('选项一'); if(!player.hasSkill('dczhanmeng_choice0')&&!used) list.push('选项一');
else choiceList[0]='<span style="opacity:0.5; ">'+choiceList[0]+(used?'(同名牌被使用过)':'(已选择)')+'</span>'; else choiceList[0]='<span style="opacity:0.5; ">'+choiceList[0]+(used?'(同名牌被使用过)':'(已选择)')+'</span>';
if(!player.hasSkill('dczhanmeng_choice1')) list.push('选项二'); if(!player.hasSkill('dczhanmeng_choice1')) list.push('选项二');
@ -6244,7 +6254,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
charlotte:true, charlotte:true,
forced:true, forced:true,
popup:false, popup:false,
filter:function(event,player,name){ silent:true,
filter(event,player,name){
var history=player.actionHistory; var history=player.actionHistory;
if(history.length<2) return false; if(history.length<2) return false;
var list=history[history.length-2].useCard; var list=history[history.length-2].useCard;
@ -6258,7 +6269,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
return false; return false;
}, },
content:function(){ content(){
if(event.triggername!='phaseBeginStart'){ if(event.triggername!='phaseBeginStart'){
player.logSkill('dczhanmeng_delay'); player.logSkill('dczhanmeng_delay');
var card=get.cardPile2(card=>{ var card=get.cardPile2(card=>{
@ -7006,7 +7017,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
global:'phaseBegin', global:'phaseBegin',
}, },
filter:function(event,player){ filter:function(event,player){
return event.player.phaseNumber==1&&lib.skill.dctongguan.derivation.some(i=>{ return event.player.getAllHistory().filter(history=>{
return history.isMe&&!history.isSkipped;
}).indexOf(event.player.getHistory())===0&&lib.skill.dctongguan.derivation.some(i=>{
return (player.getStorage('dctongguan')[i]||0)<2; return (player.getStorage('dctongguan')[i]||0)<2;
}); });
}, },