diff --git a/data/contest_ai_scripts.s b/data/contest_ai_scripts.s index ecd3103ae2..affaf31d6d 100644 --- a/data/contest_ai_scripts.s +++ b/data/contest_ai_scripts.s @@ -1,3 +1,4 @@ +#include "config.h" #include "constants/global.h" #include "constants/contest.h" .include "asm/macros.inc" @@ -435,11 +436,11 @@ AI_CGM_BetterWhenAudienceExcited: AI_CGM_BetterWhenAudienceExcited_1stUp: @ BUG: Should be if_appeal_num_eq 0 @ 1st up on 1st appeal excitement will always be 0 -.ifdef BUGFIX +#ifdef BUGFIX if_appeal_num_eq 0, AI_CGM_BetterWhenAudienceExcited_1stAppeal -.else +#else if_appeal_num_not_eq 0, AI_CGM_BetterWhenAudienceExcited_1stAppeal -.endif +#endif if_excitement_eq 4, AI_CGM_BetterWhenAudienceExcited_1AwayFromMax if_excitement_eq 3, AI_CGM_BetterWhenAudienceExcited_2AwayFromMax end @@ -546,11 +547,11 @@ AI_CGM_TargetMonWithJudgesAttention: end AI_CGM_TargetMonWithJudgesAttention_CheckMon1: if_cannot_participate MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2 -.ifdef BUGFIX +#ifdef BUGFIX if_not_used_combo_starter MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2 -.else +#else if_used_combo_starter MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2 -.endif +#endif if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon2 score +2 if_not_completed_combo MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2 @@ -559,11 +560,11 @@ AI_CGM_TargetMonWithJudgesAttention_CheckMon1: AI_CGM_TargetMonWithJudgesAttention_CheckMon2: if_user_order_eq MON_2, AI_CGM_End if_cannot_participate MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3 -.ifdef BUGFIX +#ifdef BUGFIX if_not_used_combo_starter MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3 -.else +#else if_used_combo_starter MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3 -.endif +#endif if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon3 score +2 if_not_completed_combo MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3 @@ -572,11 +573,11 @@ AI_CGM_TargetMonWithJudgesAttention_CheckMon2: AI_CGM_TargetMonWithJudgesAttention_CheckMon3: if_user_order_eq MON_3, AI_CGM_End if_cannot_participate MON_3, AI_CGM_End -.ifdef BUGFIX +#ifdef BUGFIX if_not_used_combo_starter MON_3, AI_CGM_End -.else +#else if_used_combo_starter MON_3, AI_CGM_End -.endif +#endif if_random_less_than 125, AI_CGM_End score +2 if_not_completed_combo MON_3, AI_CGM_End diff --git a/data/event_scripts.s b/data/event_scripts.s index 35d0cae2f9..a376866181 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1,3 +1,4 @@ +#include "config.h" #include "config/battle.h" #include "config/item.h" #include "constants/global.h" diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index fdbf2a5e75..a216055b5b 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -415,18 +415,18 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeLinkMultisChallenge:: @ 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 +#ifndef BUGFIX tower_save 0 -.endif +#endif call Common_EventScript_SaveGame setvar VAR_TEMP_CHALLENGE_STATUS, 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 connect, but fails, the counter will still be incremented even if the player never enters the tower. -.ifndef BUGFIX +#ifndef BUGFIX incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER -.endif +#endif specialvar VAR_RESULT, IsWirelessAdapterConnected goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_TryWirelessLink goto BattleFrontier_BattleTowerLobby_EventScript_TryCableLink diff --git a/data/scripts/trainer_hill.inc b/data/scripts/trainer_hill.inc index b7f8153514..04bbe05e5a 100644 --- a/data/scripts/trainer_hill.inc +++ b/data/scripts/trainer_hill.inc @@ -13,9 +13,9 @@ TrainerHill_OnWarp: TrainerHill_1F_EventScript_DummyOnWarp:: setvar VAR_TEMP_3, 1 -.ifdef BUGFIX +#ifdef BUGFIX end @ Missing end. By chance, the next byte (0x02 of VAR_TEMP_2) is also the id for the end cmd -.endif +#endif TrainerHill_OnFrame: map_script_2 VAR_TEMP_2, 0, TrainerHill_1F_EventScript_DummyWarpToEntranceCounter diff --git a/src/battle_factory.c b/src/battle_factory.c index f2bcc16d26..4543bfbad4 100644 --- a/src/battle_factory.c +++ b/src/battle_factory.c @@ -745,8 +745,7 @@ u8 GetFactoryMonFixedIV(u8 challengeNum, bool8 isLastBattle) // or the "elevated" rentals from round 8 (challengeNum+1==8) // This happens to land on a number higher than 31, which is interpreted as "random IVs" #ifdef BUGFIX - //if (challengeNum >= ARRAY_COUNT(sFixedIVTable)) //TODOMERGE - if (challengeNum > ARRAY_COUNT(sFixedIVTable)) + if (challengeNum >= ARRAY_COUNT(sFixedIVTable)) #else if (challengeNum > ARRAY_COUNT(sFixedIVTable)) #endif