From e018c343c92789972254b594867cb09b3a404b7c Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Mon, 31 Jul 2023 00:40:53 +0800 Subject: [PATCH] various fix --- character/offline.js | 4 ++-- character/shiji.js | 2 +- character/sp.js | 2 +- game/game.js | 27 ++++++++++++++++++--------- mode/guozhan.js | 14 +++++++++++--- 5 files changed, 33 insertions(+), 16 deletions(-) diff --git a/character/offline.js b/character/offline.js index 580ccb94b..bc9da88dd 100644 --- a/character/offline.js +++ b/character/offline.js @@ -282,8 +282,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.source!=player&&event.card&&event.card.name=='sha'&&event.source.isIn(); }, check:function(event,player){ - return get.attitude(player,event.source)>=0|| - get.attitude(player,event.source)>=-4&&get.distance(_status.currentPhase,player,'absolute')>get.distance(_status.currentPhase,event.source,'absolute'); + return get.attitude(player,event.source)>=0||get.attitude(player,event.source)>=-4 + &&get.distance(_status.currentPhase,player,'absolute')>get.distance(_status.currentPhase,event.source,'absolute'); }, content:function(){ 'step 0' diff --git a/character/shiji.js b/character/shiji.js index 76dfc633f..ac0562839 100644 --- a/character/shiji.js +++ b/character/shiji.js @@ -6397,7 +6397,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zaoli_info:'锁定技。①你不能于回合内使用你手牌中不为本回合获得的牌。②当你使用或打出手牌时,你获得一个“厉”(至多4个)。③回合开始时,若你有“厉”,则你移去所有“厉”并弃置任意张牌,然后摸X+Y张牌。若X大于2,你失去1点体力(X为你移去的标记数,Y为你弃置的牌数)。', sp_gaolan:'手杀高览', spjungong:'峻攻', - spjungong_info:'出牌阶段,你可失去X+1点体力或弃置X+1张牌,视为对一名其他角色使用【杀】(不计入次数和距离限制,X为你本回合内发动过〖等力〗的次数)。若你因此【杀】造成了伤害,则你令此技能失效直到回合结束。', + spjungong_info:'出牌阶段,你可失去X+1点体力或弃置X+1张牌,视为对一名其他角色使用【杀】(不计入次数和距离限制,X为你本回合内发动过〖峻攻〗的次数)。若你因此【杀】造成了伤害,则你令此技能失效直到回合结束。', spdengli:'等力', spdengli_info:'当你使用【杀】指定目标后,或成为【杀】的目标后,若使用者和目标的体力值相等,则你摸一张牌。', sp_huaman:'手杀花蔓', diff --git a/character/sp.js b/character/sp.js index 29cc1ad06..55c577cc3 100755 --- a/character/sp.js +++ b/character/sp.js @@ -2430,7 +2430,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.markAuto('oljianhe_chosen',[target]); 'step 1' var type=get.type2(cards[0]); - target.chooseCard(get.translation(player)+'对你发动了【剑合】','请重铸'+get.cnNumber(cards.length)+'张'+get.translation(type)+'牌,或点“取消”受到1点雷电伤害',cards.length,'he',(card,player,target)=>{ + target.chooseCard(get.translation(player)+'对你发动了【剑合】','请重铸'+get.cnNumber(cards.length)+'张'+get.translation(type)+'牌,或点“取消”受到1点雷电伤害',cards.length,'he',(card,player)=>{ return get.type2(card)==_status.event.type; }).set('ai',card=>{ if(_status.event.goon) return (get.type(card)=='equip'?15:7)-get.value(card); diff --git a/game/game.js b/game/game.js index c1b546850..7f0c506ef 100644 --- a/game/game.js +++ b/game/game.js @@ -15838,7 +15838,10 @@ if(target){ event.triggeredTargets1.push(target); var next=game.createEvent('useCardToPlayer',false); - if(event.triggeredTargets1.length==1) next.isFirstTarget=true; + if(!event.isFirstTarget1){ + event.isFirstTarget1=true; + next.isFirstTarget=true; + } next.setContent('emptyEvent'); next.targets=targets; next.target=target; @@ -15859,7 +15862,10 @@ if(target){ event.triggeredTargets2.push(target); var next=game.createEvent('useCardToTarget',false); - if(event.triggeredTargets2.length==1) next.isFirstTarget=true; + if(!event.isFirstTarget2){ + event.isFirstTarget2=true; + next.isFirstTarget=true; + } next.setContent('emptyEvent'); next.targets=targets; next.target=target; @@ -15893,7 +15899,10 @@ if(target){ event.triggeredTargets3.push(target); var next=game.createEvent('useCardToPlayered',false); - if(event.triggeredTargets3.length==1) next.isFirstTarget=true; + if(!event.isFirstTarget3){ + event.isFirstTarget3=true; + next.isFirstTarget=true; + } next.setContent('emptyEvent'); next.targets=targets; next.target=target; @@ -15914,7 +15923,10 @@ if(target){ event.triggeredTargets4.push(target); var next=game.createEvent('useCardToTargeted',false); - if(event.triggeredTargets4.length==1) next.isFirstTarget=true; + if(!event.isFirstTarget4){ + event.isFirstTarget4=true; + next.isFirstTarget=true; + } next.setContent('emptyEvent'); next.targets=targets; next.target=target; @@ -24781,11 +24793,8 @@ return false; }, canEquip:function(name,replace){ - if(get.type(name)=='card'){ - name=get.equiptype(name); - } var range=get.subtype(name); - if(this.isDisabled(range)) return false; + if(!range||this.isDisabled(range)) return false; if(['equip3','equip4'].contains(range)&&this.getEquip(6)) return false; if(!replace&&!this.isEmpty(range)) return false; return true; @@ -46049,7 +46058,7 @@ bool2=true; } if(!bool4&&get.is.double(i)) bool4=true; - if(bool1&&bool2&&bool4) break; + if(bool1&&bool2&&bool4&&bool5) break; } if(bool1) groups.add('shen'); if(bool2&&!bool3) groups.add('key'); diff --git a/mode/guozhan.js b/mode/guozhan.js index bccbf0f64..c061c64b2 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -13262,10 +13262,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.choosen=[name1,name2]; if(get.is.double(name1,true)){ if(!get.is.double(name2,true)) event._result={control:lib.character[name2][1]}; - else if(get.is.double(name1,true).removeArray(get.is.double(name2,true)).length==0||get.is.double(name2,true).removeArray(get.is.double(name1,true)).length==0) game.me.chooseControl(get.is.double(name2,true).filter(group=>get.is.double(name1,true).contains(group))).set('prompt','请选择你代表的势力').set('ai',()=>_status.event.controls.randomGet()); + else if(get.is.double(name1,true).removeArray(get.is.double(name2,true)).length==0||get.is.double(name2,true).removeArray(get.is.double(name1,true)).length==0){ + var listg=get.is.double(name2,true).filter(group=>get.is.double(name1,true).contains(group)); + listg.sort((a,b)=>lib.group.indexOf(a)-lib.group.indexOf(b)) + game.me.chooseControl(listg).set('prompt','请选择你代表的势力').set('ai',()=>_status.event.controls.randomGet()); + } else event._result={control:get.is.double(name1,true).find(group=>get.is.double(name2,true).contains(group))}; } - else if(lib.character[name1][1]=='ye'&&get.is.double(name2,true)) game.me.chooseControl(get.is.double(name2,true)).set('prompt','请选择副将代表的势力').set('ai',()=>_status.event.controls.randomGet()); + else if(lib.character[name1][1]=='ye'&&get.is.double(name2,true)){ + var listg=get.is.double(name2,true); + listg.sort((a,b)=>lib.group.indexOf(a)-lib.group.indexOf(b)) + game.me.chooseControl(listg).set('prompt','请选择副将代表的势力').set('ai',()=>_status.event.controls.randomGet()); + } } 'step 2' if(result&&result.control) game.me.trueIdentity=result.control; @@ -13465,7 +13473,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.result2=result; if(chosen.length){ for(var i=0;iget.is.double(name1,true).contains(group));