From dc35acf0d2d3410fb626c3b2207a16c76351042f Mon Sep 17 00:00:00 2001 From: IceCola <739201322@qq.com> Date: Thu, 11 Apr 2024 18:55:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=BAremoveGlobalSkill=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E5=8F=82=E6=95=B0player=EF=BC=8C=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E4=BA=86player.js=E7=9A=84=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/game/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/noname/game/index.js b/noname/game/index.js index e971b0536..1cfe8d9ec 100644 --- a/noname/game/index.js +++ b/noname/game/index.js @@ -4653,8 +4653,14 @@ export class Game extends Uninstantable { } /** * @param { string } skill + * @param { lib.element.Player } player */ - static removeGlobalSkill(skill) { + static removeGlobalSkill(skill, player) { + const players = lib.skill.globalmap[skill]; + if(player && Array.isArray(players)) { + lib.skill.globalmap[skill].remove(player); + if(players.length) return; + } lib.skill.global.remove(skill); delete lib.skill.globalmap[skill]; for (let i in lib.hook.globalskill) { From 8fa1c0673d15e1c955e724d45f1ea6e3d32caa8b Mon Sep 17 00:00:00 2001 From: IceCola <739201322@qq.com> Date: Thu, 11 Apr 2024 18:56:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=BA=A0=E6=AD=A3attaclTo=E4=B8=BAattackTo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/get/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/noname/get/index.js b/noname/get/index.js index cbb0946c6..e7fb4f235 100644 --- a/noname/get/index.js +++ b/noname/get/index.js @@ -2012,8 +2012,8 @@ export class Get extends Uninstantable { if (info.globalTo) { n += info.globalTo; } - if (info.attaclTo) { - m += info.attaclTo; + if (info.attackTo) { + m += info.attackTo; } } if (method == 'attack') { @@ -2026,8 +2026,8 @@ export class Get extends Uninstantable { // for(let i=0;i Date: Thu, 11 Apr 2024 18:57:00 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=BA=A0=E6=AD=A3attaclTo=E4=B8=BAattackTo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/library/element/player.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/noname/library/element/player.js b/noname/library/element/player.js index 0307122c3..10ccbee12 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -1970,8 +1970,8 @@ export class Player extends HTMLDivElement { m += info.globalTo; n += info.globalTo; } - if (info.attaclTo) { - m += info.attaclTo; + if (info.attackTo) { + m += info.attackTo; } } return m <= range; @@ -10661,4 +10661,4 @@ export class Player extends HTMLDivElement { } CacheContext.inject(Player.prototype, - ['hasCard','hasValueTarget','getModableSkills','getCardIndex','countCards','getSkills','getUseValue','canUse']); \ No newline at end of file + ['hasCard','hasValueTarget','getModableSkills','getCardIndex','countCards','getSkills','getUseValue','canUse']);