From 8a99f0f8bc76163bde6bacab4c8bdd66fa3fbec1 Mon Sep 17 00:00:00 2001 From: Hisuian Zoroark <96159984+HisuianZoroark@users.noreply.github.com> Date: Mon, 24 Jan 2022 00:13:58 -0500 Subject: [PATCH] Shared Power: Fix sharing weather suppression (#8637) * Shared Power: Fix weather suppresion sharing * Update scripts.ts Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com> --- data/mods/sharedpower/scripts.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/mods/sharedpower/scripts.ts b/data/mods/sharedpower/scripts.ts index 24d15b3454..4623a1a5df 100644 --- a/data/mods/sharedpower/scripts.ts +++ b/data/mods/sharedpower/scripts.ts @@ -5,7 +5,9 @@ export const Scripts: ModdedBattleScriptsData = { for (const pokemon of this.battle.getAllActive()) { const innates = Object.keys(pokemon.volatiles).filter(x => x.startsWith('ability:')); if (pokemon && !pokemon.ignoringAbility() && - (pokemon.getAbility().suppressWeather || innates.some(x => this.battle.dex.abilities.get(x).suppressWeather))) { + (pokemon.getAbility().suppressWeather || innates.some(x => ( + this.battle.dex.abilities.get(x.replace('ability:', '')).suppressWeather + )))) { return true; } }