From e88139d1b54cf448c6ed73baf2508b61a9593364 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 29 Dec 2022 11:22:53 -0500 Subject: [PATCH] Add fix for Battle Tower cloning bug --- data/maps/BattleFrontier_BattleTowerLobby/scripts.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index 4e7284fd0..e99c7f88e 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -411,7 +411,13 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeLinkMultisChallenge:: special LoadPlayerParty closemessage delay 2 +@ The command tower_save ultimately calls TrySavingData(SAVE_LINK), which writes data in SaveBlock1 and SaveBlock2 +@ to the flash, but not data in PokemonStorage. The SaveGame script that follows asks the player to do a full save, +@ which they can opt out of. As a result the player can save their party and quit without having saved the PC. +@ This allows players to clone pokemon and their held items by withdrawing them (or erase them by despositing). +.ifndef BUGFIX tower_save 0 +.endif call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed