From fe7e5c7f44d5c713366e350ea065668df382deb6 Mon Sep 17 00:00:00 2001 From: Tipx-L <138244655+Tipx-L@users.noreply.github.com> Date: Thu, 24 Aug 2023 06:25:45 -0700 Subject: [PATCH] Fix the return value type to make sure it is a boolean value. --- game/game.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/game/game.js b/game/game.js index 4df2d094f..e6d59835a 100644 --- a/game/game.js +++ b/game/game.js @@ -28627,7 +28627,7 @@ if(!lib.filter.cardUsable2(card,player)&&!game.checkMod(card,player,target,false,'cardUsableTarget',player)) return false; } var info=get.info(card); - if(info.singleCard&&info.filterAddedTarget&&ui.selected.targets.length) return info.filterAddedTarget(card,player,target,ui.selected.targets[ui.selected.targets.length-1]); + if(info.singleCard&&info.filterAddedTarget&&ui.selected.targets.length) return Boolean(info.filterAddedTarget(card,player,target,ui.selected.targets[ui.selected.targets.length-1])); return lib.filter.targetEnabled.apply(this,arguments); }, targetEnabled:function(card,player,target){ @@ -28641,7 +28641,7 @@ if(mod!='unchanged') return mod; } if(typeof filter=='boolean') return filter; - if(typeof filter=='function') return filter(card,player,target); + if(typeof filter=='function') return Boolean(filter(card,player,target)); }, targetEnabled2:function(card,player,target){ if(lib.filter.targetEnabled(card,player,target)) return true; @@ -28652,7 +28652,7 @@ var filter=get.info(card).modTarget; if(typeof filter=='boolean') return filter; - if(typeof filter=='function') return filter(card,player,target); + if(typeof filter=='function') return Boolean(filter(card,player,target)); return false; }, targetEnabled3:function(card,player,target){