Decomped MonsterHasImmobilizingStatus

This commit is contained in:
AnonymousRandomPerson 2025-05-10 21:18:15 -04:00
parent 9ff8cc1f81
commit e5ddcdd1c2
6 changed files with 16 additions and 16 deletions

View File

@ -1,20 +1,8 @@
.include "asm/macros.inc"
.include "overlay_29_02300500.inc"
.include "overlay_29_02300520.inc"
.text
arm_func_start MonsterHasImmobilizingStatus
MonsterHasImmobilizingStatus: ; 0x02300500
ldr r0, [r0, #0xb4]
ldrb r0, [r0, #0xc4]
cmp r0, #3
cmpne r0, #5
cmpne r0, #0
movne r0, #1
moveq r0, #0
bx lr
arm_func_end MonsterHasImmobilizingStatus
arm_func_start MonsterHasAttackInterferingStatus
MonsterHasAttackInterferingStatus: ; 0x02300520
ldr r0, [r0, #0xb4]

View File

@ -5,8 +5,10 @@
// Checks if a monster has the sleep, nightmare, or yawning status. Note that this excludes the napping status.
bool8 IsMonsterDrowsy(struct entity *monster);
//Checks if a monster has one of the statuses in the "burn" group, which includes the traditionally non-volatile status conditions (except sleep) in the main series: STATUS_BURN, STATUS_POISONED, STATUS_BADLY_POISONED, STATUS_PARALYSIS, and STATUS_IDENTIFYING.
// Checks if a monster has one of the statuses in the "burn" group, which includes the traditionally non-volatile status conditions (except sleep) in the main series: STATUS_BURN, STATUS_POISONED, STATUS_BADLY_POISONED, STATUS_PARALYSIS, and STATUS_IDENTIFYING.
// STATUS_IDENTIFYING is probably included based on enum status_id? Unless it's handled differently somehow.
bool8 MonsterHasNonvolatileNonsleepStatus(struct entity *monster);
// Checks if a monster has one of the non-self-inflicted statuses in the "freeze" group, which includes status conditions that immobilize the monster: STATUS_FROZEN, STATUS_SHADOW_HOLD, STATUS_WRAPPED, STATUS_PETRIFIED, STATUS_CONSTRICTION, and STATUS_FAMISHED.
bool8 MonsterHasImmobilizingStatus(struct entity *monster);
#endif //PMDSKY_DUNGEON_LOGIC_0_H

View File

@ -297,7 +297,7 @@ Overlay OVY_29
Object src/overlay_29_023000E4.o
Object asm/overlay_29_02300108.o
Object src/dungeon_logic_0.o
Object asm/overlay_29_02300500.o
Object asm/overlay_29_02300520.o
Object src/dungeon_logic.o
Object asm/overlay_29_023007A8.o
Object src/dungeon_capabilities.o

View File

@ -2,7 +2,6 @@
#include "dungeon_logic_0.h"
#include "dungeon_util_static.h"
extern bool8 MonsterHasImmobilizingStatus(struct entity *monster);
extern bool8 MonsterHasAttackInterferingStatus(struct entity *monster);
extern bool8 MonsterHasSkillInterferingStatus(struct entity *monster);
extern bool8 MonsterHasLeechSeedStatus(struct entity *monster);

View File

@ -20,3 +20,14 @@ bool8 MonsterHasNonvolatileNonsleepStatus(struct entity *monster)
{
return GetEntInfo(monster)->burn_class_status.burn != STATUS_BURN_NONE;
}
bool8 MonsterHasImmobilizingStatus(struct entity *monster)
{
struct monster *pokemon_info = GetEntInfo(monster);
if (pokemon_info->frozen_class_status.freeze != STATUS_FROZEN_WRAP &&
pokemon_info->frozen_class_status.freeze != STATUS_FROZEN_INGRAIN &&
pokemon_info->frozen_class_status.freeze != STATUS_FROZEN_NONE)
return TRUE;
return FALSE;
}