From 804f00be6797f3de105287a284ffac08490ed5f3 Mon Sep 17 00:00:00 2001 From: PZ157 <3619242020@qq.com> Date: Mon, 20 Nov 2023 16:19:53 +0800 Subject: [PATCH 1/2] bugfix --- character/shiji.js | 12 ++++++------ character/tw.js | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/character/shiji.js b/character/shiji.js index 49ba9a114..577e2814e 100644 --- a/character/shiji.js +++ b/character/shiji.js @@ -4222,13 +4222,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{content:'上次受到伤害的花色:$'}, ai:{ effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - var color=get.suit(card); - if(color=='none') return; - var all=target.getAllHistory('damage'); + target:(card,player,target)=>{ + if(typeof card==='object'&&get.tag(card,'damage')){ + let suit=get.suit(card); + if(suit==='none') return; + let all=target.getAllHistory('damage'); if(!all.length||!all[all.length-1].card) return; - if(get.suit(all[all.length-1].card)==color) return 'zerotarget'; + if(get.suit(all[all.length-1].card)===suit) return 'zeroplayertarget'; } }, }, diff --git a/character/tw.js b/character/tw.js index 5cb3b4060..3355222d7 100644 --- a/character/tw.js +++ b/character/tw.js @@ -4976,13 +4976,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - var color=get.color(card); - if(color=='none') return; - var all=target.getAllHistory('damage'); + target:(card,player,target)=>{ + if(typeof card==='object'&&get.tag(card,'damage')){ + let color=get.color(card); + if(color==='none') return; + let all=target.getAllHistory('damage'); if(!all.length||!all[all.length-1].card) return; - if(get.color(all[all.length-1].card)==color) return 'zerotarget'; + if(get.color(all[all.length-1].card)===color) return 'zeroplayertarget'; } }, }, From b52bac5f47b3f4f110ba726c34516d12d23156fa Mon Sep 17 00:00:00 2001 From: PZ157 <3619242020@qq.com> Date: Tue, 21 Nov 2023 22:37:00 +0800 Subject: [PATCH 2/2] bugfix --- game/game.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/game.js b/game/game.js index d9c8f11d2..92e2e3768 100644 --- a/game/game.js +++ b/game/game.js @@ -28761,7 +28761,7 @@ new Promise(resolve=>{ if(selected.includes(card)) return false; let name=get.name(card,this); if(name==='shan'||name==='hufu'){ - if(type==='use') return lib.filter.cardEnabled(card,this); + if(type==='use') return lib.filter.cardEnabled(card,this,'forceEnable'); if(type==='respond') return lib.filter.cardRespondable(card,this); return true; }