mirror of
https://github.com/pret/pmd-sky.git
synced 2026-03-21 17:25:15 -05:00
Decomped RunMonsterAi
This commit is contained in:
parent
3381485da6
commit
3d77bd90ea
|
|
@ -1,66 +1,5 @@
|
|||
#pragma once
|
||||
.public abs
|
||||
.public AiDecideUseItem
|
||||
.public AiMovement
|
||||
.public ApplyDamage
|
||||
.public ApplyDamageAndEffectsWrapper
|
||||
.public ATK_STAT_IDX
|
||||
.public BoostOffensiveStat
|
||||
.public CanSeeTarget
|
||||
.public CanTargetEntity
|
||||
.public CategoryIsNotPhysical
|
||||
.public CheckVariousConditions
|
||||
.public ChooseAiMove
|
||||
.public ClearMonsterActionFields
|
||||
.public DefenderAbilityIsActive__0230A940
|
||||
.public DoesTacticFollowLeader
|
||||
.public DUNGEON_PTR
|
||||
.public DungeonRandInt
|
||||
.public EndFrozenClassStatus
|
||||
.public EntityIsValid__02308FBC
|
||||
.public ExclusiveItemEffectIsActive__0230A9B8
|
||||
.public GendersNotEqualNotGenderless
|
||||
.public GetCanMoveFlag
|
||||
.public GetLeader
|
||||
.public GetTreatmentBetweenMonsters
|
||||
.public GravityIsActive
|
||||
.public HasLowHealth
|
||||
.public HasStatusThatPreventsActing
|
||||
.public HasTypeAffectedByGravity
|
||||
.public IqSkillIsEnabled
|
||||
.public LevitateIsActive
|
||||
.public LogMessageByIdWithPopupCheckUser
|
||||
.public LogMessageByIdWithPopupCheckUserTarget
|
||||
.public MonsterIsType
|
||||
.public ov10_022C442C
|
||||
.public ov10_022C4460
|
||||
.public ov10_022C4464
|
||||
.public ov10_022C44C0
|
||||
.public ov10_022C4524
|
||||
.public ov10_022C4550
|
||||
.public ov10_022C4564
|
||||
.public ov10_022C45AC
|
||||
.public ov10_022C45B0
|
||||
.public ov10_022C45B4
|
||||
.public ov10_022C45C0
|
||||
.public ov10_022C4638
|
||||
.public ov10_022C467C
|
||||
.public ov10_022C468C
|
||||
.public ov29_022E3F24
|
||||
.public ov29_022E40C0
|
||||
.public ov29_022E45D0
|
||||
.public ov29_022E57D4
|
||||
.public ov29_022E5E84
|
||||
.public ov29_02300D50
|
||||
.public ov29_0230D654
|
||||
.public ov29_0230F728
|
||||
.public ov29_0231EDFC
|
||||
.public ov29_023380FC
|
||||
.public ov29_023535DC
|
||||
.public ov29_0237CA6D
|
||||
.public ResetDamageData
|
||||
.public SetActionPassTurnOrWalk
|
||||
.public SetDecoyAiTracker
|
||||
.public ShouldRunMonsterAi
|
||||
.public SubstitutePlaceholderStringTags
|
||||
.public UpdateAiTargetPos
|
||||
|
|
|
|||
48
asm/include/overlay_29_023085DC.inc
Normal file
48
asm/include/overlay_29_023085DC.inc
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#pragma once
|
||||
.public ATK_STAT_IDX
|
||||
.public ApplyDamage
|
||||
.public ApplyDamageAndEffectsWrapper
|
||||
.public BoostOffensiveStat
|
||||
.public CategoryIsNotPhysical
|
||||
.public DUNGEON_PTR
|
||||
.public DefenderAbilityIsActive__0230A940
|
||||
.public DungeonRandInt
|
||||
.public EntityIsValid__02308FBC
|
||||
.public ExclusiveItemEffectIsActive__0230A9B8
|
||||
.public GendersNotEqualNotGenderless
|
||||
.public GravityIsActive
|
||||
.public HasLowHealth
|
||||
.public HasTypeAffectedByGravity
|
||||
.public IqSkillIsEnabled
|
||||
.public LevitateIsActive
|
||||
.public LogMessageByIdWithPopupCheckUserTarget
|
||||
.public MonsterIsType
|
||||
.public ResetDamageData
|
||||
.public UpdateAiTargetPos
|
||||
.public abs
|
||||
.public ov10_022C442C
|
||||
.public ov10_022C4460
|
||||
.public ov10_022C4464
|
||||
.public ov10_022C44C0
|
||||
.public ov10_022C4524
|
||||
.public ov10_022C4550
|
||||
.public ov10_022C4564
|
||||
.public ov10_022C45AC
|
||||
.public ov10_022C45B0
|
||||
.public ov10_022C45B4
|
||||
.public ov10_022C45C0
|
||||
.public ov10_022C4638
|
||||
.public ov10_022C467C
|
||||
.public ov10_022C468C
|
||||
.public ov29_022E3F24
|
||||
.public ov29_022E40C0
|
||||
.public ov29_022E45D0
|
||||
.public ov29_022E57D4
|
||||
.public ov29_022E5E84
|
||||
.public ov29_02300D50
|
||||
.public ov29_0230D654
|
||||
.public ov29_0230F728
|
||||
.public ov29_0231EDFC
|
||||
.public ov29_023380FC
|
||||
.public ov29_023535DC
|
||||
.public ov29_0237CA6D
|
||||
File diff suppressed because it is too large
Load Diff
726
asm/overlay_29_023085DC.s
Normal file
726
asm/overlay_29_023085DC.s
Normal file
|
|
@ -0,0 +1,726 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "overlay_29_023085DC.inc"
|
||||
|
||||
.text
|
||||
|
||||
arm_func_start ov29_023085DC
|
||||
ov29_023085DC: ; 0x023085DC
|
||||
stmdb sp!, {r3, r4, r5, lr}
|
||||
mov r5, r0
|
||||
cmp r1, #0
|
||||
ldr r4, [r5, #0xb4]
|
||||
beq _02308618
|
||||
ldrb r1, [r4, #0xd0]
|
||||
cmp r1, #4
|
||||
bne _02308618
|
||||
ldrb r1, [r4, #0x4c]
|
||||
add r2, r1, #4
|
||||
and r1, r2, #0xff
|
||||
and r1, r1, #7
|
||||
strb r1, [r4, #0x4c]
|
||||
bl UpdateAiTargetPos
|
||||
ldmia sp!, {r3, r4, r5, pc}
|
||||
_02308618:
|
||||
ldrb r0, [r4, #0xd0]
|
||||
cmp r0, #2
|
||||
ldmneia sp!, {r3, r4, r5, pc}
|
||||
mov r0, #8
|
||||
bl DungeonRandInt
|
||||
strb r0, [r4, #0x4c]
|
||||
mov r0, r5
|
||||
bl UpdateAiTargetPos
|
||||
ldmia sp!, {r3, r4, r5, pc}
|
||||
arm_func_end ov29_023085DC
|
||||
|
||||
arm_func_start ApplyDamageAndEffects
|
||||
ApplyDamageAndEffects: ; 0x0230863C
|
||||
#ifdef JAPAN
|
||||
#define APPLY_DAMAGE_AND_EFFECTS_OFFSET -4
|
||||
#else
|
||||
#define APPLY_DAMAGE_AND_EFFECTS_OFFSET 0
|
||||
#endif
|
||||
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr}
|
||||
sub sp, sp, #0x40
|
||||
ldr r7, [sp, #0x68]
|
||||
ldrsh r4, [sp, #0x6c]
|
||||
ldr r6, [sp, #0x74]
|
||||
str r7, [sp]
|
||||
stmib sp, {r4, r6}
|
||||
mov r8, r2
|
||||
mov sl, r0
|
||||
mov sb, r1
|
||||
bl ApplyDamage
|
||||
cmp r0, #0
|
||||
ldreqb r0, [r8, #0x10]
|
||||
cmpeq r0, #0
|
||||
bne _02308F68
|
||||
mov r0, sl
|
||||
bl EntityIsValid__02308FBC
|
||||
cmp r0, #0
|
||||
beq _02308F68
|
||||
mov r0, sb
|
||||
bl EntityIsValid__02308FBC
|
||||
cmp r0, #0
|
||||
beq _02308F68
|
||||
ldr r0, [sl]
|
||||
cmp r0, #1
|
||||
ldreq r0, [sb]
|
||||
cmpeq r0, #1
|
||||
bne _02308F68
|
||||
ldr r0, [sb, #0xb4]
|
||||
ldrb r0, [r0, #0xd2]
|
||||
cmp r0, #0xc
|
||||
bne _023086D4
|
||||
ldr r1, _02308F70 ; =ATK_STAT_IDX
|
||||
mov r0, sl
|
||||
ldr r2, [r1]
|
||||
mov r1, sb
|
||||
mov r3, #1
|
||||
bl BoostOffensiveStat
|
||||
_023086D4:
|
||||
ldr r0, [sp, #0x70]
|
||||
cmp r0, #0
|
||||
beq _02308F68
|
||||
mov r0, sb
|
||||
bl ov29_02300D50
|
||||
cmp r0, #0
|
||||
ldreq r0, [sb, #0xb4]
|
||||
ldreqb r0, [r0, #0xd2]
|
||||
cmpeq r0, #0
|
||||
movne r0, #0
|
||||
bne _02308F64
|
||||
mov r0, sl
|
||||
mov r1, #0x29
|
||||
bl IqSkillIsEnabled
|
||||
cmp r0, #0
|
||||
beq _02308730
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308F74 ; =ov10_022C442C
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
movlt r0, #0
|
||||
blt _02308F64
|
||||
_02308730:
|
||||
ldrb r0, [r8, #0xd]
|
||||
bl CategoryIsNotPhysical
|
||||
cmp r0, #0
|
||||
bne _02308778
|
||||
cmp sl, sb
|
||||
beq _02308778
|
||||
ldrsh r1, [sl, #4]
|
||||
ldrsh r0, [sb, #4]
|
||||
sub r0, r1, r0
|
||||
bl abs
|
||||
cmp r0, #1
|
||||
bgt _02308778
|
||||
ldrsh r1, [sl, #6]
|
||||
ldrsh r0, [sb, #6]
|
||||
sub r0, r1, r0
|
||||
bl abs
|
||||
cmp r0, #1
|
||||
ble _02308780
|
||||
_02308778:
|
||||
mov r0, #0
|
||||
b _023087B4
|
||||
_02308780:
|
||||
ldr r0, [sb, #0xb4]
|
||||
ldrb r0, [r0, #0xd5]
|
||||
cmp r0, #0xd
|
||||
bne _023087A8
|
||||
mov r0, sb
|
||||
mov r1, sl
|
||||
bl ov29_022E5E84
|
||||
mov r0, sb
|
||||
mov r1, sl
|
||||
bl ov29_0231EDFC
|
||||
_023087A8:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
bl ov29_0230D654
|
||||
_023087B4:
|
||||
cmp r0, #0
|
||||
movne r0, #1
|
||||
bne _02308F64
|
||||
ldrb r0, [r8, #0xd]
|
||||
bl CategoryIsNotPhysical
|
||||
mov r4, r0
|
||||
cmp sl, sb
|
||||
mov r5, #0
|
||||
beq _02308808
|
||||
ldrsh r1, [sl, #4]
|
||||
ldrsh r0, [sb, #4]
|
||||
sub r0, r1, r0
|
||||
bl abs
|
||||
cmp r0, #1
|
||||
bgt _02308808
|
||||
ldrsh r1, [sl, #6]
|
||||
ldrsh r0, [sb, #6]
|
||||
sub r0, r1, r0
|
||||
bl abs
|
||||
cmp r0, #1
|
||||
ble _02308810
|
||||
_02308808:
|
||||
mov r0, #0
|
||||
b _02308A28
|
||||
_02308810:
|
||||
add r0, sp, #0x2c
|
||||
bl ResetDamageData
|
||||
ldr r0, [sb, #0xb4]
|
||||
cmp r4, #0
|
||||
ldrb r0, [r0, #0xd5]
|
||||
bne _023088E4
|
||||
cmp r0, #4
|
||||
bne _0230883C
|
||||
mov r0, sb
|
||||
bl ov29_022E3F24
|
||||
add r5, r5, #4
|
||||
_0230883C:
|
||||
ldr r0, [sb, #0xb4]
|
||||
ldrb r0, [r0, #0xd5]
|
||||
cmp r0, #0xa
|
||||
bne _02308858
|
||||
mov r0, sb
|
||||
bl ov29_022E3F24
|
||||
add r5, r5, #1
|
||||
_02308858:
|
||||
mov r0, sb
|
||||
mov r1, #0x20
|
||||
bl ExclusiveItemEffectIsActive__0230A9B8
|
||||
cmp r0, #0
|
||||
mov r0, sb
|
||||
mov r1, #0x23
|
||||
addne r5, r5, #4
|
||||
bl ExclusiveItemEffectIsActive__0230A9B8
|
||||
cmp r0, #0
|
||||
mov r0, sb
|
||||
mov r1, #0x31
|
||||
addne r5, r5, #1
|
||||
bl IqSkillIsEnabled
|
||||
cmp r0, #0
|
||||
beq _023088B0
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308F78 ; =ov10_022C44C0
|
||||
mov r0, r0, lsl #0x10
|
||||
ldrsh r1, [r1]
|
||||
cmp r1, r0, asr #16
|
||||
addgt r5, r5, #4
|
||||
_023088B0:
|
||||
mov r0, sb
|
||||
mov r1, #0x27
|
||||
bl IqSkillIsEnabled
|
||||
cmp r0, #0
|
||||
beq _023088F8
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308F7C ; =ov10_022C4464
|
||||
mov r0, r0, lsl #0x10
|
||||
ldrsh r1, [r1]
|
||||
cmp r1, r0, asr #16
|
||||
addgt r5, r5, #1
|
||||
b _023088F8
|
||||
_023088E4:
|
||||
cmp r0, #8
|
||||
bne _023088F8
|
||||
mov r0, sb
|
||||
bl ov29_022E40C0
|
||||
add r5, r5, #4
|
||||
_023088F8:
|
||||
ldr r0, [sb, #0xb4]
|
||||
ldrb r0, [r0, #0xd5]
|
||||
cmp r0, #0xf
|
||||
bne _02308914
|
||||
mov r0, sb
|
||||
bl ov29_022E57D4
|
||||
add r5, r5, #2
|
||||
_02308914:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #0x12
|
||||
#ifndef JAPAN
|
||||
mov r3, #1
|
||||
#endif
|
||||
bl DefenderAbilityIsActive__0230A940
|
||||
cmp r0, #0
|
||||
addne r5, r5, #2
|
||||
cmp r5, #0
|
||||
beq _02308A1C
|
||||
ldr r2, _02308F80 ; =0x00000C3F
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
bl LogMessageByIdWithPopupCheckUserTarget
|
||||
ldr r0, [r8]
|
||||
mov r1, #6
|
||||
mul r2, r0, r5
|
||||
mov r0, r2, asr #1
|
||||
add r0, r2, r0, lsr #30
|
||||
mov r0, r0, asr #2
|
||||
str r0, [sp, #0x2c]
|
||||
ldrb r2, [r8, #0xc]
|
||||
mov r0, #2
|
||||
mov r3, #0
|
||||
strb r2, [sp, #0x38]
|
||||
str r1, [sp, #0x30]
|
||||
str r0, [sp, #0x34]
|
||||
ldrb r0, [r8, #0xd]
|
||||
strb r0, [sp, #0x39]
|
||||
strb r3, [sp, #0x3a]
|
||||
strb r3, [sp, #0x3b]
|
||||
strb r3, [sp, #0x3c]
|
||||
ldr r0, [sb, #0xb4]
|
||||
ldrb r0, [r0, #0xd5]
|
||||
cmp r0, #0xf
|
||||
bne _023089FC
|
||||
mov r2, #1
|
||||
add r1, sp, #0xc
|
||||
mov r0, sb
|
||||
strb r2, [sp, #0x39]
|
||||
bl ov29_023380FC
|
||||
mov fp, r0
|
||||
ldrsh r5, [sp, #0x6c]
|
||||
mov r4, #0
|
||||
b _023089F0
|
||||
_023089C4:
|
||||
str r7, [sp]
|
||||
stmib sp, {r5, r6}
|
||||
add r0, sp, #0xc
|
||||
ldr r1, [r0, r4, lsl #2]
|
||||
mov r0, sb
|
||||
add r2, sp, #0x2c
|
||||
mov r3, #0
|
||||
bl ApplyDamage
|
||||
add r0, r4, #1
|
||||
mov r0, r0, lsl #0x10
|
||||
mov r4, r0, asr #0x10
|
||||
_023089F0:
|
||||
cmp r4, fp
|
||||
blt _023089C4
|
||||
b _02308A1C
|
||||
_023089FC:
|
||||
ldrsh r0, [sp, #0x6c]
|
||||
str r7, [sp]
|
||||
add r2, sp, #0x2c
|
||||
str r0, [sp, #4]
|
||||
mov r0, sb
|
||||
mov r1, sl
|
||||
str r6, [sp, #8]
|
||||
bl ApplyDamage
|
||||
_02308A1C:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
bl ov29_0230D654
|
||||
_02308A28:
|
||||
cmp r0, #0
|
||||
movne r0, #1
|
||||
bne _02308F64
|
||||
cmp sl, sb
|
||||
beq _02308A6C
|
||||
ldrsh r1, [sl, #4]
|
||||
ldrsh r0, [sb, #4]
|
||||
sub r0, r1, r0
|
||||
bl abs
|
||||
cmp r0, #1
|
||||
bgt _02308A6C
|
||||
ldrsh r1, [sl, #6]
|
||||
ldrsh r0, [sb, #6]
|
||||
sub r0, r1, r0
|
||||
bl abs
|
||||
cmp r0, #1
|
||||
ble _02308A74
|
||||
_02308A6C:
|
||||
mov r0, #0
|
||||
b _02308ECC
|
||||
_02308A74:
|
||||
ldrb r0, [r8, #0xd]
|
||||
bl CategoryIsNotPhysical
|
||||
mov r4, r0
|
||||
mov r0, sb
|
||||
mov r1, #0xb
|
||||
ldr r6, [sl, #0xb4]
|
||||
bl ExclusiveItemEffectIsActive__0230A9B8
|
||||
cmp r0, #0
|
||||
beq _02308B04
|
||||
cmp r4, #0
|
||||
bne _02308B04
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308F84 ; =ov10_022C45B4
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
bge _02308B04
|
||||
mov r0, #0x12c
|
||||
bl DungeonRandInt
|
||||
cmp r0, #0x64
|
||||
mov r2, #0xb
|
||||
bge _02308AE0
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r3, #0x40
|
||||
bl ov29_0230F728
|
||||
b _02308B04
|
||||
_02308AE0:
|
||||
cmp r0, #0xc8
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
bge _02308AFC
|
||||
mov r3, #0x10
|
||||
bl ov29_0230F728
|
||||
b _02308B04
|
||||
_02308AFC:
|
||||
mov r3, #0x80
|
||||
bl ov29_0230F728
|
||||
_02308B04:
|
||||
ldr r5, _02308F88 ; =ov29_023535DC
|
||||
b _02308B54
|
||||
_02308B0C:
|
||||
ldrb r1, [r5]
|
||||
mov r0, sb
|
||||
bl ExclusiveItemEffectIsActive__0230A9B8
|
||||
cmp r0, #0
|
||||
beq _02308B50
|
||||
ldr r3, [r5, #8]
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, r4
|
||||
blx r3
|
||||
cmp r0, #0
|
||||
beq _02308B50
|
||||
ldrb r2, [r5]
|
||||
ldr r3, [r5, #4]
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
bl ov29_0230F728
|
||||
_02308B50:
|
||||
add r5, r5, #0x10
|
||||
_02308B54:
|
||||
ldrb r0, [r5]
|
||||
cmp r0, #0
|
||||
bne _02308B0C
|
||||
mov r0, sb
|
||||
mov r1, #0x1b
|
||||
bl ExclusiveItemEffectIsActive__0230A9B8
|
||||
cmp r0, #0
|
||||
beq _02308BB0
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308F8C ; =ov10_022C45B0
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
bge _02308BB0
|
||||
mov r0, sb
|
||||
bl HasLowHealth
|
||||
cmp r0, #0
|
||||
beq _02308BB0
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #0x1b
|
||||
mov r3, #0x40000
|
||||
bl ov29_0230F728
|
||||
_02308BB0:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #5
|
||||
#ifndef JAPAN
|
||||
mov r3, #1
|
||||
#endif
|
||||
bl DefenderAbilityIsActive__0230A940
|
||||
cmp r0, #0
|
||||
beq _02308C38
|
||||
ldrb r0, [r6, #0xf7]
|
||||
mov r5, #0
|
||||
cmp r0, #1
|
||||
beq _02308C00
|
||||
mov r0, sl
|
||||
mov r1, #0xa
|
||||
bl HasTypeAffectedByGravity
|
||||
cmp r0, #0
|
||||
bne _02308C00
|
||||
mov r0, sl
|
||||
bl LevitateIsActive
|
||||
cmp r0, #0
|
||||
beq _02308C0C
|
||||
_02308C00:
|
||||
bl GravityIsActive
|
||||
cmp r0, #0
|
||||
moveq r5, #1
|
||||
_02308C0C:
|
||||
cmp r5, #0
|
||||
bne _02308C38
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308F90 ; =ov10_022C4564
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
addlt r0, r6, #0x100
|
||||
ldrlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
orrlt r1, r1, #1
|
||||
strlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
_02308C38:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #0xa
|
||||
#ifndef JAPAN
|
||||
mov r3, #1
|
||||
#endif
|
||||
bl DefenderAbilityIsActive__0230A940
|
||||
cmp r0, #0
|
||||
beq _02308C88
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308F94 ; =ov10_022C468C
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
bge _02308C88
|
||||
add r0, r6, #0x100
|
||||
ldrh r3, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
ldr r1, _02308F98 ; =ov29_0237CA6D
|
||||
mov r2, #0
|
||||
orr r3, r3, #2
|
||||
strh r3, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
strb r2, [r1]
|
||||
_02308C88:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #0x17
|
||||
#ifndef JAPAN
|
||||
mov r3, #1
|
||||
#endif
|
||||
bl DefenderAbilityIsActive__0230A940
|
||||
cmp r0, #0
|
||||
beq _02308CDC
|
||||
mov r0, sl
|
||||
mov r1, #0x11
|
||||
bl MonsterIsType
|
||||
cmp r0, #0
|
||||
beq _02308CDC
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308F9C ; =ov10_022C4460
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
addlt r0, r6, #0x100
|
||||
ldrlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
orrlt r1, r1, #4
|
||||
strlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
_02308CDC:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #0x20
|
||||
#ifndef JAPAN
|
||||
mov r3, #1
|
||||
#endif
|
||||
bl DefenderAbilityIsActive__0230A940
|
||||
cmp r0, #0
|
||||
beq _02308D24
|
||||
cmp r4, #0
|
||||
bne _02308D24
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308FA0 ; =ov10_022C4550
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
addlt r0, r6, #0x100
|
||||
ldrlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
orrlt r1, r1, #8
|
||||
strlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
_02308D24:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #0x27
|
||||
#ifndef JAPAN
|
||||
mov r3, #1
|
||||
#endif
|
||||
bl DefenderAbilityIsActive__0230A940
|
||||
cmp r0, #0
|
||||
beq _02308D64
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308FA4 ; =ov10_022C45C0
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
addlt r0, r6, #0x100
|
||||
ldrlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
orrlt r1, r1, #0x20
|
||||
strlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
_02308D64:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #0x3d
|
||||
#ifndef JAPAN
|
||||
mov r3, #1
|
||||
#endif
|
||||
bl DefenderAbilityIsActive__0230A940
|
||||
cmp r0, #0
|
||||
beq _02308DE0
|
||||
cmp r4, #0
|
||||
bne _02308DE0
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308FA8 ; =ov10_022C45AC
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
bge _02308DE0
|
||||
mov r0, #3
|
||||
bl DungeonRandInt
|
||||
cmp r0, #1
|
||||
addlt r0, r6, #0x100
|
||||
ldrlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
orrlt r1, r1, #0x40
|
||||
strlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
blt _02308DE0
|
||||
cmp r0, #2
|
||||
add r0, r6, #0x100
|
||||
ldrlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
orrlt r1, r1, #0x10
|
||||
strlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
ldrgeh r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
orrge r1, r1, #0x80
|
||||
strgeh r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
_02308DE0:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #0x3e
|
||||
#ifndef JAPAN
|
||||
mov r3, #1
|
||||
#endif
|
||||
bl DefenderAbilityIsActive__0230A940
|
||||
cmp r0, #0
|
||||
beq _02308E20
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308FAC ; =ov10_022C467C
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
addlt r0, r6, #0x100
|
||||
ldrlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
orrlt r1, r1, #0x100
|
||||
strlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
_02308E20:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #0x44
|
||||
#ifndef JAPAN
|
||||
mov r3, #1
|
||||
#endif
|
||||
bl DefenderAbilityIsActive__0230A940
|
||||
cmp r0, #0
|
||||
beq _02308E80
|
||||
ldr r1, [sb, #0xb4]
|
||||
ldrsh r0, [r6, #2]
|
||||
ldrsh r1, [r1, #2]
|
||||
bl GendersNotEqualNotGenderless
|
||||
cmp r0, #0
|
||||
beq _02308E80
|
||||
cmp r4, #0
|
||||
bne _02308E80
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308FB0 ; =ov10_022C4524
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
addlt r0, r6, #0x100
|
||||
ldrlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
orrlt r1, r1, #0x200
|
||||
strlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
_02308E80:
|
||||
#ifdef JAPAN
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r2, #1
|
||||
#else
|
||||
mov r2, #1
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
mov r3, r2
|
||||
#endif
|
||||
bl DefenderAbilityIsActive__0230A940
|
||||
cmp r0, #0
|
||||
beq _02308EC0
|
||||
mov r0, #0x64
|
||||
bl DungeonRandInt
|
||||
ldr r1, _02308FB4 ; =ov10_022C4638
|
||||
ldrsh r1, [r1]
|
||||
cmp r0, r1
|
||||
addlt r0, r6, #0x100
|
||||
ldrlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
orrlt r1, r1, #0x400
|
||||
strlth r1, [r0, #0x92 + APPLY_DAMAGE_AND_EFFECTS_OFFSET]
|
||||
_02308EC0:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
bl ov29_0230D654
|
||||
_02308ECC:
|
||||
cmp r0, #0
|
||||
movne r0, #1
|
||||
bne _02308F64
|
||||
ldr r0, [sb, #0xb4]
|
||||
ldrb r1, [r0, #0xe0]
|
||||
cmp r1, #2
|
||||
bne _02308F4C
|
||||
ldr r1, _02308FB8 ; =DUNGEON_PTR
|
||||
ldrb r2, [r0, #0xe8]
|
||||
ldr r1, [r1]
|
||||
add r1, r1, r2, lsl #2
|
||||
add r1, r1, #0x12000
|
||||
#ifdef JAPAN
|
||||
ldr r4, [r1, #0xad4]
|
||||
#else
|
||||
ldr r4, [r1, #0xb78]
|
||||
#endif
|
||||
cmp r4, #0
|
||||
moveq r1, #0
|
||||
streqb r1, [r0, #0xe0]
|
||||
beq _02308F4C
|
||||
ldr r1, [r4, #0xb4]
|
||||
ldr r2, [r0, #0xe4]
|
||||
ldr r1, [r1, #0xb0]
|
||||
cmp r2, r1
|
||||
movne r1, #0
|
||||
strneb r1, [r0, #0xe0]
|
||||
bne _02308F4C
|
||||
mov r0, r4
|
||||
mov r1, sb
|
||||
bl ov29_022E45D0
|
||||
ldr r1, [r8]
|
||||
mov r0, r4
|
||||
mov r2, #0xc
|
||||
mov r3, #0x238
|
||||
bl ApplyDamageAndEffectsWrapper
|
||||
_02308F4C:
|
||||
mov r0, sl
|
||||
mov r1, sb
|
||||
bl ov29_0230D654
|
||||
cmp r0, #0
|
||||
movne r0, #1
|
||||
moveq r0, #0
|
||||
_02308F64:
|
||||
cmp r0, #0
|
||||
_02308F68:
|
||||
add sp, sp, #0x40
|
||||
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
|
||||
.align 2, 0
|
||||
_02308F70: .word ATK_STAT_IDX
|
||||
_02308F74: .word ov10_022C442C
|
||||
_02308F78: .word ov10_022C44C0
|
||||
_02308F7C: .word ov10_022C4464
|
||||
#ifdef JAPAN
|
||||
_02308F80: .word 0x0000097E
|
||||
#else
|
||||
_02308F80: .word 0x00000C3F
|
||||
#endif
|
||||
_02308F84: .word ov10_022C45B4
|
||||
_02308F88: .word ov29_023535DC
|
||||
_02308F8C: .word ov10_022C45B0
|
||||
_02308F90: .word ov10_022C4564
|
||||
_02308F94: .word ov10_022C468C
|
||||
_02308F98: .word ov29_0237CA6D
|
||||
_02308F9C: .word ov10_022C4460
|
||||
_02308FA0: .word ov10_022C4550
|
||||
_02308FA4: .word ov10_022C45C0
|
||||
_02308FA8: .word ov10_022C45AC
|
||||
_02308FAC: .word ov10_022C467C
|
||||
_02308FB0: .word ov10_022C4524
|
||||
_02308FB4: .word ov10_022C4638
|
||||
_02308FB8: .word DUNGEON_PTR
|
||||
arm_func_end ApplyDamageAndEffects
|
||||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022E0354(struct entity *entity);
|
||||
bool EntityIsValid__022E0354(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022E0354_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022E32E8(struct entity *entity);
|
||||
bool EntityIsValid__022E32E8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022E32E8_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022E37B8(struct entity *entity);
|
||||
bool EntityIsValid__022E37B8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022E37B8_H
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022E1A1C(struct entity *entity);
|
||||
bool EntityIsValid__022E1A1C(struct entity *entity);
|
||||
void UpdateEntityPixelPos(struct entity *entity, struct pixel_position *pixel_pos);
|
||||
void SetEntityPixelPosXY(struct entity *entity, u32 x, u32 y);
|
||||
void IncrementEntityPixelPosXY(struct entity *entity, u32 x, u32 y);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022E95F4(struct entity *entity);
|
||||
bool EntityIsValid__022E95F4(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022E95F4_H
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ struct statuses {
|
|||
u8 curse; // 0x2F: STATUS_CURSED if 1
|
||||
// 0x30: Set to monster::is_not_team_member of the attacker (the one causing the decoy status).
|
||||
u8 curse_applier_non_team_member_flag;
|
||||
// 0x31: Set to 1 on a Pokemon when inflicted with the Decoy status.
|
||||
u8 unk_decoy_tracker;
|
||||
// 0x31: True if the Pokémon is a decoy and a wild Pokémon (i.e., not an allied Pokémon).
|
||||
bool enemy_decoy;
|
||||
u8 curse_turns; // 0x32: Turns left for the status in statuses::curse
|
||||
// 0x33: Turns left until residual damage for the status in statuses::curse, if applicable
|
||||
u8 curse_damage_countdown;
|
||||
|
|
@ -205,7 +205,7 @@ struct statuses {
|
|||
u8 two_turn_move_invincible;
|
||||
// 0x63: Related to handling AI when a decoy is present on the floor?
|
||||
// Seems to only be 0, 1, 2
|
||||
u8 decoy_ai_tracker;
|
||||
enum decoy_ai decoy_ai_tracker;
|
||||
#ifndef JAPAN
|
||||
u8 field_0x64;
|
||||
u8 field_0x65;
|
||||
|
|
@ -283,7 +283,7 @@ struct action_parameter {
|
|||
// Contains data used to describe an action taken by a monster.
|
||||
struct action_data {
|
||||
enum action action_id; // 0x0: Action ID
|
||||
enum direction_id direction : 8; // 0x2: Direction in which the action will be performed
|
||||
enum direction_id direction; // 0x2: Direction in which the action will be performed
|
||||
u8 field_0x3;
|
||||
struct action_parameter action_parameters[2]; // 0x4: Parameters for the action
|
||||
s16 field_0x10;
|
||||
|
|
@ -294,19 +294,9 @@ struct action_data {
|
|||
// Monster info
|
||||
struct monster {
|
||||
// 0x0: flags: 2-byte bitfield
|
||||
// If true, the AI will skip this monster's turn. There's also an unresearched
|
||||
// check related to constriction that reads this flag
|
||||
bool f_ai_unk : 1;
|
||||
bool f_ai_skip_turn : 1; // If true, the AI will skip this monster's turn and reset the flag.
|
||||
u8 flags_unk2 : 3;
|
||||
bool f_swapping_places : 1; // Swapping places with another monster
|
||||
u8 flags_unk6 : 2;
|
||||
bool flags_unk8 : 1;
|
||||
bool f_walking : 1; // Walking (but not dashing)
|
||||
u8 flags_unk10 : 5;
|
||||
bool f_swapping_places_petrified_ally : 1; // Swapping places with a petrified ally
|
||||
u16 flags;
|
||||
|
||||
enum monster_id id : 16; // 0x2:
|
||||
enum monster_id id; // 0x2:
|
||||
enum monster_id apparent_id : 16; // 0x4: What's outwardly displayed if Transformed
|
||||
bool is_not_team_member; // 0x6: true for enemies and allied NPCs that aren't on the team
|
||||
bool is_team_leader; // 0x7
|
||||
|
|
@ -499,7 +489,7 @@ struct monster {
|
|||
// 0 = 0.5x, 1 = 1.0x, 2 = 1.5x
|
||||
u8 exp_yield;
|
||||
// 0x109 / 0x60: Appears to be set when the held item of the monster is going to be used?
|
||||
bool unk_item_use_action;
|
||||
bool use_held_item;
|
||||
// 0x10A / 0x61: Is initalized to 0x63 (99). Changing it from this value causes the monster to
|
||||
// begin rendering differently? For example, it causes entity::0xB3 to be 1 and forces
|
||||
// entity::0x28 to be 0.
|
||||
|
|
@ -540,7 +530,7 @@ struct monster {
|
|||
bool ai_next_to_target; // 0x14F: This NPC monster is next to its current target
|
||||
// 0x150: Set if monster::is_team_leader is true and belly is empty.
|
||||
bool famished;
|
||||
u8 field_0x151;
|
||||
bool waiting;
|
||||
// 0x152: Seems to be true if the monster has already acted this turn: attacked, used an item,
|
||||
// or seemingly anything other than moving/resting. Also true when the monster faints.
|
||||
bool already_acted;
|
||||
|
|
@ -1469,5 +1459,4 @@ struct damage_calc_diag {
|
|||
u8 field_0x53;
|
||||
};
|
||||
|
||||
|
||||
#endif //PMDSKY_DUNGEON_MODE_H
|
||||
|
|
|
|||
|
|
@ -4120,5 +4120,98 @@ enum forced_loss_reason {
|
|||
FORCED_LOSS_PADDING = 0xffffffff,
|
||||
};
|
||||
|
||||
// IQ skill ID. These are usually encoded as bitvectors.
|
||||
enum iq_skill_id {
|
||||
IQ_NONE = 0,
|
||||
IQ_TYPE_ADVANTAGE_MASTER = 1,
|
||||
IQ_ITEM_CATCHER = 2,
|
||||
IQ_COURSE_CHECKER = 3,
|
||||
IQ_SURE_HIT_ATTACKER = 4,
|
||||
IQ_QUICK_DODGER = 5,
|
||||
IQ_PP_CHECKER = 6,
|
||||
IQ_NONTRAITOR = 7,
|
||||
IQ_STATUS_CHECKER = 8,
|
||||
IQ_EXP_GO_GETTER = 9,
|
||||
IQ_EFFICIENCY_EXPERT = 10,
|
||||
IQ_WEAK_TYPE_PICKER = 11,
|
||||
IQ_ALL_TERRAIN_HIKER = 12,
|
||||
IQ_ABSOLUTE_MOVER = 13,
|
||||
IQ_TRAP_AVOIDER = 14,
|
||||
IQ_HOUSE_AVOIDER = 15,
|
||||
IQ_ENERGY_SAVER = 16,
|
||||
IQ_NONSLEEPER = 17,
|
||||
IQ_SELF_CURER = 18,
|
||||
IQ_TRAP_SEER = 19,
|
||||
IQ_LAVA_EVADER = 20,
|
||||
IQ_DEDICATED_TRAVELER = 21,
|
||||
IQ_ITEM_MASTER = 22,
|
||||
IQ_EXCLUSIVE_MOVE_USER = 23,
|
||||
IQ_ESCAPIST = 24,
|
||||
IQ_LOCK_PICKER = 25,
|
||||
IQ_STAIR_SENSOR = 26,
|
||||
IQ_COIN_WATCHER = 27,
|
||||
IQ_EXP_ELITE = 28,
|
||||
IQ_SHARPSHOOTER = 29,
|
||||
IQ_FAST_FRIEND = 30,
|
||||
IQ_PP_SAVER = 31,
|
||||
IQ_BODYGUARD = 32,
|
||||
IQ_CAUTIOUS_CREEPER = 33,
|
||||
IQ_AGGRESSOR = 34,
|
||||
IQ_DEFENDER = 35,
|
||||
IQ_INTIMIDATOR = 36,
|
||||
IQ_SURVIVALIST = 37,
|
||||
IQ_TRAP_BUSTER = 38,
|
||||
IQ_COUNTER_HITTER = 39,
|
||||
IQ_EXTRA_STRIKER = 40,
|
||||
IQ_HIT_AND_RUNNER = 41,
|
||||
IQ_PARRY_EXPERT = 42,
|
||||
IQ_QUICK_STRIKER = 43,
|
||||
IQ_NO_CHARGER = 44,
|
||||
IQ_WARY_FIGHTER = 45,
|
||||
IQ_GAP_PROBER = 46,
|
||||
IQ_POWER_PITCHER = 47,
|
||||
IQ_CONCENTRATOR = 48,
|
||||
IQ_COUNTER_BASHER = 49,
|
||||
IQ_CHEERLEADER = 50,
|
||||
IQ_NATURE_GIFTER = 51,
|
||||
IQ_WISE_HEALER = 52,
|
||||
IQ_QUICK_HEALER = 53,
|
||||
IQ_ACUTE_SNIFFER = 54,
|
||||
IQ_DEEP_BREATHER = 55,
|
||||
IQ_BRICK_TOUGH = 56,
|
||||
IQ_MULTITALENT = 57,
|
||||
IQ_TIME_TRIPPER = 58,
|
||||
IQ_ERRATIC_PLAYER = 59,
|
||||
IQ_PRACTICE_SWINGER = 60,
|
||||
IQ_NO_DEFEATIST = 61,
|
||||
IQ_HAGGLER = 62,
|
||||
IQ_CLUTCH_PERFORMER = 63,
|
||||
IQ_CRITICAL_DODGER = 64,
|
||||
IQ_MAP_SURVEYOR = 65,
|
||||
IQ_PIERCE_HURLER = 66,
|
||||
IQ_COLLECTOR = 67,
|
||||
IQ_TRUE_POWERIST = 68,
|
||||
};
|
||||
|
||||
enum movement_flag
|
||||
{
|
||||
MOVEMENT_FLAG_SWAPPING_PLACES = 1 << 5,
|
||||
MOVEMENT_FLAG_WALKING = 1 << 9,
|
||||
MOVEMENT_FLAG_UNK_14 = 1 << 14,
|
||||
MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY = 1 << 15, // Set if the Pokémon is petrified and the leader cures them by swapping places.
|
||||
};
|
||||
|
||||
#define STATUS_INDEX_PETRIFIED 6
|
||||
|
||||
#define STATUS_INDEX_CONFUSED 2
|
||||
|
||||
#define STATUS_INDEX_DECOY 2
|
||||
|
||||
enum decoy_ai
|
||||
{
|
||||
DECOY_AI_NONE = 0,
|
||||
DECOY_AI_TEAM = 1,
|
||||
DECOY_AI_WILD = 2,
|
||||
};
|
||||
|
||||
#endif //PMDSKY_ENUMS_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022EC608(struct entity *entity);
|
||||
bool EntityIsValid__022EC608(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022EC608_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022ECDC0(struct entity *entity);
|
||||
bool EntityIsValid__022ECDC0(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022ECDC0_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022EE348(struct entity *entity);
|
||||
bool EntityIsValid__022EE348(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022EE348_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022EF7A0(struct entity *entity);
|
||||
bool EntityIsValid__022EF7A0(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022EF7A0_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022F0590(struct entity *entity);
|
||||
bool EntityIsValid__022F0590(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022F0590_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022F528C(struct entity *entity);
|
||||
bool EntityIsValid__022F528C(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022F528C_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022F62A8(struct entity *entity);
|
||||
bool EntityIsValid__022F62A8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022F62A8_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022F7364(struct entity *entity);
|
||||
bool EntityIsValid__022F7364(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022F7364_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022FC99C(struct entity *entity);
|
||||
bool EntityIsValid__022FC99C(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022FC99C_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__022FED98(struct entity *entity);
|
||||
bool EntityIsValid__022FED98(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_022FED98_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__023000E4(struct entity *entity);
|
||||
bool EntityIsValid__023000E4(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_023000E4_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02302A38(struct entity *entity);
|
||||
bool EntityIsValid__02302A38(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02302A38_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__023047B8(struct entity *entity);
|
||||
bool EntityIsValid__023047B8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_023047B8_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0230558C(struct entity *entity);
|
||||
bool EntityIsValid__0230558C(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0230558C_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02305C04(struct entity *entity);
|
||||
bool EntityIsValid__02305C04(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02305C04_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02307EF8(struct entity *entity);
|
||||
bool EntityIsValid__02307EF8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02307EF8_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0230827C(struct entity *entity);
|
||||
bool EntityIsValid__0230827C(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0230827C_H
|
||||
|
|
|
|||
8
include/overlay_29_02308340.h
Normal file
8
include/overlay_29_02308340.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef PMDSKY_OVERLAY_29_02308340_H
|
||||
#define PMDSKY_OVERLAY_29_02308340_H
|
||||
|
||||
#include "dungeon_mode.h"
|
||||
|
||||
void RunMonsterAi(struct entity *pokemon, u32 unused);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02308340_H
|
||||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02308FBC(struct entity *entity);
|
||||
bool EntityIsValid__02308FBC(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02308FBC_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0230E8F0(struct entity *entity);
|
||||
bool EntityIsValid__0230E8F0(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0230E8F0_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0230F008(struct entity *entity);
|
||||
bool EntityIsValid__0230F008(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0230F008_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02311010(struct entity *entity);
|
||||
bool EntityIsValid__02311010(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02311010_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__023118B4(struct entity *entity);
|
||||
bool EntityIsValid__023118B4(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_023118B4_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02315118(struct entity *entity);
|
||||
bool EntityIsValid__02315118(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02315118_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02318D34(struct entity *entity);
|
||||
bool EntityIsValid__02318D34(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02318D34_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02318E4C(struct entity *entity);
|
||||
bool EntityIsValid__02318E4C(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02318E4C_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02319F8C(struct entity *entity);
|
||||
bool EntityIsValid__02319F8C(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02319F8C_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0231B194(struct entity *entity);
|
||||
bool EntityIsValid__0231B194(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0231B194_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0231CBC8(struct entity *entity);
|
||||
bool EntityIsValid__0231CBC8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0231CBC8_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0231EDD8(struct entity *entity);
|
||||
bool EntityIsValid__0231EDD8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0231EDD8_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0231F570(struct entity *entity);
|
||||
bool EntityIsValid__0231F570(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0231F570_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0231FBFC(struct entity *entity);
|
||||
bool EntityIsValid__0231FBFC(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0231FBFC_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0232017C(struct entity *entity);
|
||||
bool EntityIsValid__0232017C(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0232017C_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02320764(struct entity *entity);
|
||||
bool EntityIsValid__02320764(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02320764_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02321438(struct entity *entity);
|
||||
bool EntityIsValid__02321438(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02321438_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02325620(struct entity *entity);
|
||||
bool EntityIsValid__02325620(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02325620_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValidMoveEffects__0232800C(struct entity *entity);
|
||||
bool EntityIsValidMoveEffects__0232800C(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0232800C_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValidMoveEffects__0232A3D8(struct entity *entity);
|
||||
bool EntityIsValidMoveEffects__0232A3D8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0232A3D8_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValidMoveEffects__0232C500(struct entity *entity);
|
||||
bool EntityIsValidMoveEffects__0232C500(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0232C500_H
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValidMoveEffects__0232E250(struct entity *entity);
|
||||
bool EntityIsValidMoveEffects__0232E250(struct entity *entity);
|
||||
BOOL DoMoveDefendOrder(s32 param_1, s32 param_2, s32 param_3, s32 param_4);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0232E250_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0232E840(struct entity *entity);
|
||||
bool EntityIsValid__0232E840(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0232E840_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02333FAC(struct entity *entity);
|
||||
bool EntityIsValid__02333FAC(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02333FAC_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__023350D8(struct entity *entity);
|
||||
bool EntityIsValid__023350D8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_023350D8_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02337CA8(struct entity *entity);
|
||||
bool EntityIsValid__02337CA8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02337CA8_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02344AF8(struct entity *entity);
|
||||
bool EntityIsValid__02344AF8(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02344AF8_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02345698(struct entity *entity);
|
||||
bool EntityIsValid__02345698(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02345698_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__02347BA4(struct entity *entity);
|
||||
bool EntityIsValid__02347BA4(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_02347BA4_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0234987C(struct entity *entity);
|
||||
bool EntityIsValid__0234987C(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0234987C_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0234DDD0(struct entity *entity);
|
||||
bool EntityIsValid__0234DDD0(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0234DDD0_H
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
|
||||
// entity: entity pointer
|
||||
// return: bool
|
||||
u8 EntityIsValid__0234EC14(struct entity *entity);
|
||||
bool EntityIsValid__0234EC14(struct entity *entity);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_29_0234EC14_H
|
||||
|
|
|
|||
2
main.lsf
2
main.lsf
|
|
@ -266,6 +266,8 @@ Overlay OVY_29
|
|||
Object asm/overlay_29_02307F1C.o
|
||||
Object src/overlay_29_0230827C.o
|
||||
Object asm/overlay_29_023082A0.o
|
||||
Object src/overlay_29_02308340.o
|
||||
Object asm/overlay_29_023085DC.o
|
||||
Object src/overlay_29_02308FBC.o
|
||||
Object asm/overlay_29_02308FE0.o
|
||||
Object src/overlay_29_0230E8F0.o
|
||||
|
|
|
|||
2
src/dg.c
2
src/dg.c
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// file starts at 0x022dea5c
|
||||
|
||||
u8 EntityIsValid__022E0354(struct entity *entity)
|
||||
bool EntityIsValid__022E0354(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// file starts at 0x022e26b68
|
||||
|
||||
u8 EntityIsValid__022E32E8(struct entity *entity)
|
||||
bool EntityIsValid__022E32E8(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// file starts at 0x022e35e4
|
||||
|
||||
u8 EntityIsValid__022E37B8(struct entity *entity)
|
||||
bool EntityIsValid__022E37B8(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// file starts at 0x022e1608
|
||||
|
||||
u8 EntityIsValid__022E1A1C(struct entity *entity)
|
||||
bool EntityIsValid__022E1A1C(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// file starts at 0x022e9020
|
||||
|
||||
u8 EntityIsValid__022E95F4(struct entity *entity)
|
||||
bool EntityIsValid__022E95F4(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_022EC608.h"
|
||||
|
||||
u8 EntityIsValid__022EC608(struct entity *entity)
|
||||
bool EntityIsValid__022EC608(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_022ECDC0.h"
|
||||
|
||||
u8 EntityIsValid__022ECDC0(struct entity *entity)
|
||||
bool EntityIsValid__022ECDC0(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_022EE348.h"
|
||||
|
||||
u8 EntityIsValid__022EE348(struct entity *entity)
|
||||
bool EntityIsValid__022EE348(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_022EF7A0.h"
|
||||
|
||||
u8 EntityIsValid__022EF7A0(struct entity *entity)
|
||||
bool EntityIsValid__022EF7A0(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_022F0590.h"
|
||||
|
||||
u8 EntityIsValid__022F0590(struct entity *entity)
|
||||
bool EntityIsValid__022F0590(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_022F528C.h"
|
||||
|
||||
u8 EntityIsValid__022F528C(struct entity *entity)
|
||||
bool EntityIsValid__022F528C(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_022F62A8.h"
|
||||
|
||||
u8 EntityIsValid__022F62A8(struct entity *entity)
|
||||
bool EntityIsValid__022F62A8(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_022F7364.h"
|
||||
|
||||
u8 EntityIsValid__022F7364(struct entity *entity)
|
||||
bool EntityIsValid__022F7364(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_022FC99C.h"
|
||||
|
||||
u8 EntityIsValid__022FC99C(struct entity *entity)
|
||||
bool EntityIsValid__022FC99C(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "overlay_29_022FED98.h"
|
||||
|
||||
#ifndef EUROPE
|
||||
u8 EntityIsValid__022FED98(struct entity *entity)
|
||||
bool EntityIsValid__022FED98(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "overlay_29_022FED98.h"
|
||||
|
||||
#ifdef EUROPE
|
||||
u8 EntityIsValid__022FED98(struct entity *entity)
|
||||
bool EntityIsValid__022FED98(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_023000E4.h"
|
||||
|
||||
u8 EntityIsValid__023000E4(struct entity *entity)
|
||||
bool EntityIsValid__023000E4(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_02302A38.h"
|
||||
|
||||
u8 EntityIsValid__02302A38(struct entity *entity)
|
||||
bool EntityIsValid__02302A38(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_023047B8.h"
|
||||
|
||||
u8 EntityIsValid__023047B8(struct entity *entity)
|
||||
bool EntityIsValid__023047B8(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_0230558C.h"
|
||||
|
||||
u8 EntityIsValid__0230558C(struct entity *entity)
|
||||
bool EntityIsValid__0230558C(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_02305C04.h"
|
||||
|
||||
u8 EntityIsValid__02305C04(struct entity *entity)
|
||||
bool EntityIsValid__02305C04(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_02307EF8.h"
|
||||
|
||||
u8 EntityIsValid__02307EF8(struct entity *entity)
|
||||
bool EntityIsValid__02307EF8(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_0230827C.h"
|
||||
|
||||
u8 EntityIsValid__0230827C(struct entity *entity)
|
||||
bool EntityIsValid__0230827C(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
163
src/overlay_29_02308340.c
Normal file
163
src/overlay_29_02308340.c
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
#include "overlay_29_02308340.h"
|
||||
#include "dungeon.h"
|
||||
|
||||
#ifdef JAPAN
|
||||
#define CANNOT_USE_ITEM_MESSAGE 0xB2D
|
||||
#define WATCHING_CAREFULLY_MESSAGE 0xB2E
|
||||
#else
|
||||
#define CANNOT_USE_ITEM_MESSAGE 0xDED
|
||||
#define WATCHING_CAREFULLY_MESSAGE 0xDEE
|
||||
#endif
|
||||
|
||||
extern struct dungeon *DUNGEON_PTR[];
|
||||
|
||||
extern void EndFrozenClassStatus(struct entity * pokemon, struct entity *target, bool log);
|
||||
extern bool ShouldRunMonsterAi(struct entity *pokemon);
|
||||
extern bool CheckVariousConditions(struct entity *pokemon);
|
||||
extern void SubstitutePlaceholderStringTags(u8 *buffer, struct entity *entity, u32 param_3);
|
||||
extern void LogMessageByIdWithPopupCheckUser(struct entity *pokemon, u32 message_id);
|
||||
extern void AiDecideUseItem(struct entity *pokemon);
|
||||
extern bool HasStatusThatPreventsActing(struct entity *pokemon);
|
||||
extern void ClearMonsterActionFields(struct action_data *action_pointer);
|
||||
extern void SetActionPassTurnOrWalk(struct action_data *action_pointer, s16 species);
|
||||
extern u32 DungeonRandInt(u32 cap);
|
||||
extern bool IqSkillIsEnabled(struct entity *pokemon, enum iq_skill_id iq_skill);
|
||||
extern void ChooseAiMove(struct entity *pokemon);
|
||||
extern bool GetCanMoveFlag(s16 index);
|
||||
extern void AiMovement(struct entity *pokemon, bool show_run_away_effect);
|
||||
extern void SetDecoyAiTracker(struct entity* entity);
|
||||
extern bool CanSeeTarget(struct entity *entity, struct entity *target_entity);
|
||||
|
||||
static inline struct monster *GetEntInfo(struct entity *ent)
|
||||
{
|
||||
return ent->info;
|
||||
}
|
||||
|
||||
void RunMonsterAi(struct entity *pokemon, u32 unused)
|
||||
{
|
||||
struct monster *pokemon_info = GetEntInfo(pokemon);
|
||||
if (pokemon_info->flags & MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY)
|
||||
{
|
||||
if (pokemon_info->freeze == STATUS_INDEX_PETRIFIED)
|
||||
{
|
||||
EndFrozenClassStatus(pokemon, pokemon, TRUE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
pokemon_info->decoy_ai_tracker = DECOY_AI_NONE;
|
||||
if (pokemon_info->monster_behavior <= BEHAVIOR_FIXED_ENEMY || ShouldRunMonsterAi(pokemon))
|
||||
{
|
||||
if (pokemon_info->monster_behavior != BEHAVIOR_RESCUE_TARGET && pokemon_info->use_held_item)
|
||||
{
|
||||
if (CheckVariousConditions(pokemon))
|
||||
{
|
||||
pokemon_info->use_held_item = FALSE;
|
||||
SubstitutePlaceholderStringTags(0, pokemon, 0);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, CANNOT_USE_ITEM_MESSAGE);
|
||||
return;
|
||||
}
|
||||
AiDecideUseItem(pokemon);
|
||||
if (pokemon_info->action.action_id != ACTION_NOTHING)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!HasStatusThatPreventsActing(pokemon))
|
||||
{
|
||||
#ifdef JAPAN
|
||||
if (DUNGEON_PTR[0]->decoy_is_active)
|
||||
{
|
||||
for (s32 i = 0; i < DUNGEON_MAX_POKEMON; i++)
|
||||
{
|
||||
struct entity *target = DUNGEON_PTR[0]->active_monster_ptrs[i];
|
||||
bool entity_is_valid;
|
||||
if (target == NULL)
|
||||
{
|
||||
entity_is_valid = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
entity_is_valid = target->type != ENTITY_NOTHING;
|
||||
}
|
||||
if (entity_is_valid &&
|
||||
GetEntInfo(target)->curse == STATUS_INDEX_DECOY &&
|
||||
CanSeeTarget(pokemon, target))
|
||||
{
|
||||
pokemon_info->decoy_ai_tracker = GetEntInfo(target)->curse_applier_non_team_member_flag ? DECOY_AI_WILD : DECOY_AI_TEAM;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
SetDecoyAiTracker(pokemon);
|
||||
#endif
|
||||
ClearMonsterActionFields(&pokemon_info->action);
|
||||
if (pokemon_info->monster_behavior == BEHAVIOR_RESCUE_TARGET)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemon_info->action, pokemon_info->id);
|
||||
pokemon_info->action.direction = (enum direction_id) DungeonRandInt(DIR_CURRENT);
|
||||
pokemon_info->target_pos.x = pokemon->pos.x;
|
||||
pokemon_info->target_pos.y = pokemon->pos.y - 1;
|
||||
return;
|
||||
}
|
||||
AiDecideUseItem(pokemon);
|
||||
if (pokemon_info->action.action_id == ACTION_NOTHING)
|
||||
{
|
||||
if (!IqSkillIsEnabled(pokemon, IQ_DEDICATED_TRAVELER))
|
||||
{
|
||||
ChooseAiMove(pokemon);
|
||||
if (pokemon_info->action.action_id != ACTION_NOTHING)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (pokemon_info->cringe == STATUS_INDEX_CONFUSED)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemon_info->action, pokemon_info->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!GetCanMoveFlag(pokemon_info->id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
AiMovement(pokemon, TRUE);
|
||||
if (pokemon_info->is_not_team_member && IqSkillIsEnabled(pokemon, IQ_EXCLUSIVE_MOVE_USER) && pokemon_info->action.action_id <= ACTION_PASS_TURN)
|
||||
{
|
||||
SubstitutePlaceholderStringTags(0, pokemon, 0);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, WATCHING_CAREFULLY_MESSAGE);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (pokemon_info->cringe == STATUS_INDEX_CONFUSED)
|
||||
{
|
||||
SetActionPassTurnOrWalk(&pokemon_info->action, pokemon_info->id);
|
||||
return;
|
||||
}
|
||||
if (GetCanMoveFlag(pokemon_info->id))
|
||||
{
|
||||
AiMovement(pokemon, TRUE);
|
||||
}
|
||||
if (pokemon_info->action.action_id != ACTION_NOTHING && pokemon_info->action.action_id != ACTION_PASS_TURN)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ChooseAiMove(pokemon);
|
||||
if (GetCanMoveFlag(pokemon_info->id) &&
|
||||
pokemon_info->is_not_team_member &&
|
||||
IqSkillIsEnabled(pokemon, IQ_EXCLUSIVE_MOVE_USER) &&
|
||||
pokemon_info->action.action_id <= ACTION_PASS_TURN)
|
||||
{
|
||||
SubstitutePlaceholderStringTags(0, pokemon, 0);
|
||||
LogMessageByIdWithPopupCheckUser(pokemon, WATCHING_CAREFULLY_MESSAGE);
|
||||
}
|
||||
if (pokemon_info->action.action_id != ACTION_NOTHING && pokemon_info->action.action_id != ACTION_PASS_TURN)
|
||||
{
|
||||
pokemon_info->ai_not_next_to_target = FALSE;
|
||||
pokemon_info->ai_ally_skip = FALSE;
|
||||
pokemon_info->waiting = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_02308FBC.h"
|
||||
|
||||
u8 EntityIsValid__02308FBC(struct entity *entity)
|
||||
bool EntityIsValid__02308FBC(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_0230E8F0.h"
|
||||
|
||||
u8 EntityIsValid__0230E8F0(struct entity *entity)
|
||||
bool EntityIsValid__0230E8F0(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_0230F008.h"
|
||||
|
||||
u8 EntityIsValid__0230F008(struct entity *entity)
|
||||
bool EntityIsValid__0230F008(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_02311010.h"
|
||||
|
||||
u8 EntityIsValid__02311010(struct entity *entity)
|
||||
bool EntityIsValid__02311010(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_023118B4.h"
|
||||
|
||||
u8 EntityIsValid__023118B4(struct entity *entity)
|
||||
bool EntityIsValid__023118B4(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_02315118.h"
|
||||
|
||||
u8 EntityIsValid__02315118(struct entity *entity)
|
||||
bool EntityIsValid__02315118(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_02318D34.h"
|
||||
|
||||
u8 EntityIsValid__02318D34(struct entity *entity)
|
||||
bool EntityIsValid__02318D34(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_02318E4C.h"
|
||||
|
||||
u8 EntityIsValid__02318E4C(struct entity *entity)
|
||||
bool EntityIsValid__02318E4C(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_02319F8C.h"
|
||||
|
||||
u8 EntityIsValid__02319F8C(struct entity *entity)
|
||||
bool EntityIsValid__02319F8C(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_0231B194.h"
|
||||
|
||||
u8 EntityIsValid__0231B194(struct entity *entity)
|
||||
bool EntityIsValid__0231B194(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_0231CBC8.h"
|
||||
|
||||
u8 EntityIsValid__0231CBC8(struct entity *entity)
|
||||
bool EntityIsValid__0231CBC8(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_0231EDD8.h"
|
||||
|
||||
u8 EntityIsValid__0231EDD8(struct entity *entity)
|
||||
bool EntityIsValid__0231EDD8(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_0231F570.h"
|
||||
|
||||
u8 EntityIsValid__0231F570(struct entity *entity)
|
||||
bool EntityIsValid__0231F570(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "overlay_29_0231FBFC.h"
|
||||
|
||||
u8 EntityIsValid__0231FBFC(struct entity *entity)
|
||||
bool EntityIsValid__0231FBFC(struct entity *entity)
|
||||
{
|
||||
if (entity == NULL)
|
||||
{
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user