From 14b36b88cef7eed4c8557395268821ffd2699b5f Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Thu, 16 May 2024 12:00:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8A=A0=E5=9B=BAget.info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/get/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noname/get/index.js b/noname/get/index.js index 5e223e177..567ec9696 100644 --- a/noname/get/index.js +++ b/noname/get/index.js @@ -2125,12 +2125,12 @@ export class Get { */ info(item, player) { if (typeof item == "string") { - return lib.skill[item]; + return lib.skill[item] || {}; } if (typeof item == "object") { var name = item.name; if (player !== false) name = get.name(item, player); - return lib.card[name]; + return lib.card[name] || {}; } } /** From 526a71e5ef5de045910534ddb42273e122be4119 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Thu, 16 May 2024 15:42:49 +0800 Subject: [PATCH 2/2] fix lib.element.player.hasWuxie --- noname/get/index.js | 4 ++-- noname/library/element/player.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/noname/get/index.js b/noname/get/index.js index 567ec9696..5e223e177 100644 --- a/noname/get/index.js +++ b/noname/get/index.js @@ -2125,12 +2125,12 @@ export class Get { */ info(item, player) { if (typeof item == "string") { - return lib.skill[item] || {}; + return lib.skill[item]; } if (typeof item == "object") { var name = item.name; if (player !== false) name = get.name(item, player); - return lib.card[name] || {}; + return lib.card[name]; } } /** diff --git a/noname/library/element/player.js b/noname/library/element/player.js index 27f4d5ba7..41e074e0f 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -9067,6 +9067,7 @@ export class Player extends HTMLDivElement { game.expandSkills(skills); for (var i = 0; i < skills.length; i++) { var ifo = get.info(skills[i]); + if (!ifo) continue; if (ifo.hiddenWuxie && info) { if (typeof ifo.hiddenWuxie == "function" && ifo.hiddenWuxie(this, info)) { return true;