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 825faafa0..39b299b16 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'; } }, }, diff --git a/game/game.js b/game/game.js index 2fbed03e3..727a9ff7f 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; }