Add fix for Battle Tower cloning bug

This commit is contained in:
GriffinR 2022-12-29 11:22:53 -05:00
parent 2aa6a9c164
commit e88139d1b5

View File

@ -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