From b2901c51b0a589de6a1b8bd5971ee244a9c62b80 Mon Sep 17 00:00:00 2001 From: PSF Date: Tue, 27 Jun 2023 15:32:49 -0700 Subject: [PATCH] Added bugfix for SaveBeforeLinkMultisChallenge to remove extra incrementgamestat --- data/maps/BattleFrontier_BattleTowerLobby/scripts.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index e99c7f88e..8d60105bd 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -421,7 +421,12 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeLinkMultisChallenge:: call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed +@ GAME_STAT_ENTERED_BATTLE_TOWER should not be incremented here, for two reasons: +@ 1. It is incremented again in BattleFrontier_BattleTowerLobby_EventScript_CableLinkSuccessful or BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful +@ 2. If the player tries to save, but fails, the counter will still be incremented even if the player never enters the tower. +.ifndef BUGFIX incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER +.endif specialvar VAR_RESULT, IsWirelessAdapterConnected goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_TryWirelessLink goto BattleFrontier_BattleTowerLobby_EventScript_TryCableLink