From 4aa593bf636d517f211dacea13a7b5739ea7fd47 Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Sat, 31 Jan 2026 22:43:34 -0500 Subject: [PATCH] Renamed IsMonsterCornered --- include/dungeon_capabilities_4.h | 2 +- src/dungeon_ai_itcm.c | 4 ++-- src/dungeon_capabilities_4.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/dungeon_capabilities_4.h b/include/dungeon_capabilities_4.h index 013cd5bf..c9d1edbd 100644 --- a/include/dungeon_capabilities_4.h +++ b/include/dungeon_capabilities_4.h @@ -4,7 +4,7 @@ #include "dungeon_mode.h" // True if the given monster is cornered (it can't move in any direction) -bool8 IsMonsterCornered(struct entity *monster); +bool8 CanMonsterMoveOrSwapWithAllyInAnyDirection(struct entity *monster); // Checks if the given monster can move in the specified direction. Includes if an allied or neutral monster is standing on an adjacent tile, as the monsters can swap places. // Returns false if an enemy monster is standing on the target tile bool8 CanMonsterMoveOrSwapWithAllyInDirection(struct entity *monster, s32 direction); diff --git a/src/dungeon_ai_itcm.c b/src/dungeon_ai_itcm.c index 42b43559..98883382 100644 --- a/src/dungeon_ai_itcm.c +++ b/src/dungeon_ai_itcm.c @@ -38,7 +38,7 @@ void ChooseAiMove(struct entity *monster) if (!AreMovesEnabled(DUNGEON_PTR[0]->gen_info.fixed_room_id) || MonsterCannotAttack(monster, FALSE) || ShouldMonsterRunAwayAndShowEffect(monster, TRUE) || - GetEntInfo(monster)->monster_behavior == BEHAVIOR_FLEEING_OUTLAW && IsMonsterCornered(monster) || + GetEntInfo(monster)->monster_behavior == BEHAVIOR_FLEEING_OUTLAW && CanMonsterMoveOrSwapWithAllyInAnyDirection(monster) || IsTacticSet(monster, TACTIC_KEEP_YOUR_DISTANCE) || (pokemon_info->cringe_class_status.cringe == STATUS_CRINGE_CONFUSED && DungeonRandOutcome__022EAB20(AI_CONFUSED_NO_ATTACK_CHANCE))) return; @@ -327,7 +327,7 @@ asm void ChooseAiMove(struct entity *monster) cmp r0, #3 bne _01FFB6CC mov r0, r10 - bl IsMonsterCornered + bl CanMonsterMoveOrSwapWithAllyInAnyDirection cmp r0, #0 bne _01FFBD0C _01FFB6CC: diff --git a/src/dungeon_capabilities_4.c b/src/dungeon_capabilities_4.c index 8f61b2cd..1ad90b87 100644 --- a/src/dungeon_capabilities_4.c +++ b/src/dungeon_capabilities_4.c @@ -16,7 +16,7 @@ #include "secondary_terrain_types.h" #include "targeting.h" -bool8 IsMonsterCornered(struct entity *monster) +bool8 CanMonsterMoveOrSwapWithAllyInAnyDirection(struct entity *monster) { for (u8 i = 0; i < NUM_DIRECTIONS; i++) {