IsBossFight() -> IsFloorwideFixedRoom()

This commit is contained in:
darsh
2025-10-01 15:52:03 -04:00
parent 08da5d5cf5
commit 24a3f0ad19
15 changed files with 21 additions and 21 deletions

View File

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

View File

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

View File

@@ -964,7 +964,7 @@ void HandleUseOrbAction(Entity *pokemon)
act = entityInfo->action;
if (IsBossFight()) {
if (IsFloorwideFixedRoom()) {
LogMessageByIdWithPopupCheckUser(pokemon, gPtrMysteriousPowerPreventedUseMessage);
r4 = TRUE;
}

View File

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

View File

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

View File

@@ -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();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -47,7 +47,7 @@ void HandleOneRoomOrb(Entity *pokemon, Entity *target)
return;
}
if (IsBossFight()) {
if (IsFloorwideFixedRoom()) {
LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD3D0);
return;
}

View File

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

View File

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