From 24a3f0ad191db4f6ec3c41d155c916a6771da6ab Mon Sep 17 00:00:00 2001 From: darsh Date: Wed, 1 Oct 2025 15:52:03 -0400 Subject: [PATCH] IsBossFight() -> IsFloorwideFixedRoom() --- include/run_dungeon.h | 2 +- src/code_8041AD0.c | 2 +- src/dungeon_ai_attack.c | 2 +- src/dungeon_map_access.c | 2 +- src/dungeon_menu_others.c | 8 ++++---- src/dungeon_misc.c | 2 +- src/dungeon_mon_spawn.c | 2 +- src/dungeon_move.c | 2 +- src/move_checks.c | 2 +- src/move_orb_actions_3.c | 2 +- src/move_orb_actions_4.c | 2 +- src/move_orb_actions_5.c | 2 +- src/one_room_orb.c | 2 +- src/run_dungeon.c | 4 ++-- src/trap.c | 6 +++--- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/run_dungeon.h b/include/run_dungeon.h index 67f962e87..c6f8e90ac 100644 --- a/include/run_dungeon.h +++ b/include/run_dungeon.h @@ -24,7 +24,7 @@ void sub_8043D50(s32 *a0, s32 *a1); void sub_8043D60(void); bool8 TryForcedLoss(bool8 a0); void EnforceMaxItemsAndMoney(void); -bool8 IsBossFight(void); +bool8 IsFloorwideFixedRoom(void); bool8 IsCurrentFixedRoomBossFight(void); bool8 IsMakuhitaTrainingMaze(void); diff --git a/src/code_8041AD0.c b/src/code_8041AD0.c index 97c2751fd..697a2cf17 100644 --- a/src/code_8041AD0.c +++ b/src/code_8041AD0.c @@ -1370,7 +1370,7 @@ void sub_8042818(u8 a0, bool8 a1) if (gUnknown_80F67EC[a0] < 0) return; - if (a1 && !IsBossFight()) + if (a1 && !IsFloorwideFixedRoom()) sub_804151C(en, gUnknown_80F67EC[a0], 0); else sub_804151C(en, gUnknown_80F680C[a0], 0); diff --git a/src/dungeon_ai_attack.c b/src/dungeon_ai_attack.c index d69f26602..f10d08bca 100644 --- a/src/dungeon_ai_attack.c +++ b/src/dungeon_ai_attack.c @@ -964,7 +964,7 @@ void HandleUseOrbAction(Entity *pokemon) act = entityInfo->action; - if (IsBossFight()) { + if (IsFloorwideFixedRoom()) { LogMessageByIdWithPopupCheckUser(pokemon, gPtrMysteriousPowerPreventedUseMessage); r4 = TRUE; } diff --git a/src/dungeon_map_access.c b/src/dungeon_map_access.c index 40744845a..64f96d91c 100644 --- a/src/dungeon_map_access.c +++ b/src/dungeon_map_access.c @@ -319,7 +319,7 @@ void sub_80498A8(s32 x,s32 y) if (r4 == 3) { r4 = 0; } - if (IsBossFight()) { + if (IsFloorwideFixedRoom()) { r4 = 0; } GetTileMut(x,y)->unk8 = gDungeon->unk12C24[r4 + r7 * 3]; diff --git a/src/dungeon_menu_others.c b/src/dungeon_menu_others.c index a96af0300..3f80d1407 100644 --- a/src/dungeon_menu_others.c +++ b/src/dungeon_menu_others.c @@ -32,7 +32,7 @@ #include "text_3.h" #include "run_dungeon.h" -extern bool8 IsBossFight(void); +extern bool8 IsFloorwideFixedRoom(void); extern u16 GetLeaderActionId(void); @@ -96,7 +96,7 @@ void ShowDungeonOthersMenu(void) } if ((gRealInputs.pressed & A_BUTTON) || gDungeonMenu.touchScreen.a_button) { - if (gDungeonMenu.menuIndex != OTHERS_RECRUITMENT_SEARCH || (gDungeon->unk644.canRecruit && !IsBossFight())) { + if (gDungeonMenu.menuIndex != OTHERS_RECRUITMENT_SEARCH || (gDungeon->unk644.canRecruit && !IsFloorwideFixedRoom())) { PlayDungeonConfirmationSE(); } else { @@ -131,7 +131,7 @@ void ShowDungeonOthersMenu(void) if (sOthersCursorId == OTHERS_MISSION_OBJECTIVES) { ShowMissionObjectivesMenu(); } - if (gDungeon->unk644.canRecruit && !IsBossFight() && sOthersCursorId == OTHERS_RECRUITMENT_SEARCH) { + if (gDungeon->unk644.canRecruit && !IsFloorwideFixedRoom() && sOthersCursorId == OTHERS_RECRUITMENT_SEARCH) { ShowRecruitmentSearchMenu(); } if (sOthersCursorId == hintsMenuId) { @@ -499,7 +499,7 @@ static void PrintOthersMenuOptions(void) PrintFormattedStringOnWindow(8, GetMenuEntryYCoord(&gDungeonMenu, currOptionId++), gUnknown_80FE9F8, 0, '\0'); PrintFormattedStringOnWindow(8, GetMenuEntryYCoord(&gDungeonMenu, currOptionId++), gUnknown_80FEA10, 0, '\0'); if (gDungeon->unk644.canRecruit) { - if (!IsBossFight()) { + if (!IsFloorwideFixedRoom()) { PrintFormattedStringOnWindow(8, GetMenuEntryYCoord(&gDungeonMenu, currOptionId++), gUnknown_80FEA28, 0, '\0'); } else { diff --git a/src/dungeon_misc.c b/src/dungeon_misc.c index b070901a9..43e7731cb 100644 --- a/src/dungeon_misc.c +++ b/src/dungeon_misc.c @@ -601,7 +601,7 @@ void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3) if (GetLeader() != NULL && dungeonExitReason != DUNGEON_EXIT_DELETED_FOR_EVENT && !entInfo->isTeamLeader && !gDungeon->unk10) { sub_8084E00(entity,entInfo->monsterBehavior, dungeonExitReason == DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND); - if (IS_DEOXYS_FORM_MONSTER(entInfo->apparentID) && !IsBossFight() && entInfo->isNotTeamMember) { + if (IS_DEOXYS_FORM_MONSTER(entInfo->apparentID) && !IsFloorwideFixedRoom() && entInfo->isNotTeamMember) { gDungeon->deoxysDefeat = 1; DisplayDungeonLoggableMessageTrue(entity,gUnknown_80FA580); sub_803E178(); diff --git a/src/dungeon_mon_spawn.c b/src/dungeon_mon_spawn.c index 879cba879..7d1c76714 100644 --- a/src/dungeon_mon_spawn.c +++ b/src/dungeon_mon_spawn.c @@ -629,7 +629,7 @@ bool8 SpawnTeamMember(s16 _species, s32 x, s32 y, DungeonMon *monPtr, Entity **a // Pickup Check if (gDungeon->unk644.dungeonLocation.id != DUNGEON_TINY_WOODS - && !IsBossFight() + && !IsFloorwideFixedRoom() && (entityInfo->abilities[0] == ABILITY_PICKUP || entityInfo->abilities[1] == ABILITY_PICKUP) && !ItemExists(&entityInfo->heldItem)) { diff --git a/src/dungeon_move.c b/src/dungeon_move.c index 66aebd748..fec602f47 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -142,7 +142,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, { s32 direction1 = targetInfo->action.direction; s32 direction2 = targetInfo->action.direction; - if (IsBossFight()) { + if (IsFloorwideFixedRoom()) { TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDD88); // A mysterious force prevents moves from being passed off! } else { diff --git a/src/move_checks.c b/src/move_checks.c index a0c63310f..220b29a19 100644 --- a/src/move_checks.c +++ b/src/move_checks.c @@ -386,7 +386,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move) case MOVE_VITAL_THROW: case MOVE_WARP: case MOVE_WHIRLWIND: - if (IsBossFight()) + if (IsFloorwideFixedRoom()) { return FALSE; } diff --git a/src/move_orb_actions_3.c b/src/move_orb_actions_3.c index c6861ff80..5abbc869c 100644 --- a/src/move_orb_actions_3.c +++ b/src/move_orb_actions_3.c @@ -905,7 +905,7 @@ bool8 GlareMoveAction(Entity * pokemon,Entity * target,Move *move,s32 itemId) bool8 TransformMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId) { - if (IsBossFight()) { + if (IsFloorwideFixedRoom()) { TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEFF4); return FALSE; } diff --git a/src/move_orb_actions_4.c b/src/move_orb_actions_4.c index e4d0c7aeb..7180fa66b 100644 --- a/src/move_orb_actions_4.c +++ b/src/move_orb_actions_4.c @@ -662,7 +662,7 @@ bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 itemId DungeonPos pos; bool8 foundTrap = FALSE; tile = GetTileAtEntitySafe(target); - if (IsBossFight()) { + if (IsFloorwideFixedRoom()) { LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD1EC); return FALSE; } diff --git a/src/move_orb_actions_5.c b/src/move_orb_actions_5.c index e4c443f37..6ba61b924 100644 --- a/src/move_orb_actions_5.c +++ b/src/move_orb_actions_5.c @@ -33,7 +33,7 @@ bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId) filledInTile = FALSE; targetInfo = GetEntInfo(target); - if (IsBossFight()) { + if (IsFloorwideFixedRoom()) { LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD0B8); return FALSE; } diff --git a/src/one_room_orb.c b/src/one_room_orb.c index 96ad43912..5d0ad32d5 100644 --- a/src/one_room_orb.c +++ b/src/one_room_orb.c @@ -47,7 +47,7 @@ void HandleOneRoomOrb(Entity *pokemon, Entity *target) return; } - if (IsBossFight()) { + if (IsFloorwideFixedRoom()) { LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD3D0); return; } diff --git a/src/run_dungeon.c b/src/run_dungeon.c index f79d3d6f8..50d997be8 100644 --- a/src/run_dungeon.c +++ b/src/run_dungeon.c @@ -700,7 +700,7 @@ u8 GetFloorType(void) { if (gDungeon->unk644.unk34 == 1 && gDungeon->unk644.dungeonSeed.location.floor == gDungeon->unk644.dungeonLocation.floor) return FLOOR_TYPE_RESCUE; - else if (IsBossFight()) + else if (IsFloorwideFixedRoom()) return FLOOR_TYPE_FIXED; else return FLOOR_TYPE_NORMAL; @@ -906,7 +906,7 @@ void EnforceMaxItemsAndMoney(void) } } -bool8 IsBossFight(void) +bool8 IsFloorwideFixedRoom(void) { if (gDungeon->fixedRoomNumber != 0 && gDungeon->fixedRoomNumber <= LAST_FLOORWIDE_FIXED_ROOM) { diff --git a/src/trap.c b/src/trap.c index e816aab89..3911ee3fb 100644 --- a/src/trap.c +++ b/src/trap.c @@ -575,7 +575,7 @@ void HandlePitfallTrap(Entity *pokemon, Entity *target, Tile *tile) flag = FALSE; if (target != NULL) { - if (IsBossFight()) { + if (IsFloorwideFixedRoom()) { LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FED0C); // But nothing happened... } else @@ -628,7 +628,7 @@ void HandleSummonTrap(Entity *pokemon,DungeonPos *pos) r4 = DungeonRandInt(3) + 2; direction = DungeonRandInt(NUM_DIRECTIONS); - if (IsBossFight()) { + if (IsFloorwideFixedRoom()) { goto _ret; } else @@ -763,7 +763,7 @@ void HandlePokemonTrap(Entity *param_1,DungeonPos *pos) s32 counter = 0; s32 range = gDungeon->unk181e8.visibilityRange; - if (IsBossFight()) { + if (IsFloorwideFixedRoom()) { LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80FED08); return; }