From ebb09dda34f0d5a369939684c36665332404baf5 Mon Sep 17 00:00:00 2001 From: "Amani H." <109637146+xsn34kzx@users.noreply.github.com> Date: Tue, 10 Sep 2024 05:37:23 -0400 Subject: [PATCH] [Hotfix] Fix Lures Refreshing on Reload (#4146) --- src/system/version-converter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/system/version-converter.ts b/src/system/version-converter.ts index 0aa2b16b695..d54238812c8 100644 --- a/src/system/version-converter.ts +++ b/src/system/version-converter.ts @@ -31,7 +31,7 @@ export function applySessionDataPatches(data: SessionSaveData) { // From [ stat, battlesLeft ] to [ stat, maxBattles, battleCount ] m.args = [ newStat, 5, m.args[1] ]; - } else if (m.className === "DoubleBattleChanceBoosterModifier") { + } else if (m.className === "DoubleBattleChanceBoosterModifier" && m.args.length === 1) { let maxBattles: number; switch (m.typeId) { case "MAX_LURE": @@ -53,6 +53,8 @@ export function applySessionDataPatches(data: SessionSaveData) { data.enemyModifiers.forEach((m) => { if (m.className === "PokemonBaseStatModifier") { m.className = "BaseStatModifier"; + } else if (m.className === "PokemonResetNegativeStatStageModifier") { + m.className = "ResetNegativeStatStageModifier"; } }); }