Decomp ten more move-effect wrappers in overlay_29

DoMoveRebound, DoMoveStayAway, DoMovePowerEars, DoMoveSlowDown,
DoMoveSearchlight, DoMovePetrify, DoMovePounce, DoMoveTrawl, DoMoveDrought and
DoMoveHpGauge.

Two of them give a second data point for a helper argument seen earlier:
SetReflectStatus takes 10 here where DoMoveCounter passes 4, and TryWarp takes 1
where DoMoveWarp passes 0. Both third arguments are therefore selectors of some
kind; nothing here establishes what they select.

DoMoveSlowDown forwards to LowerSpeed with the same arguments as
DoMoveLowerSpeed1. The remaining helpers are undeclared in the tree and take
provisional externs written from the call site.

Authored by Claude (Opus 5) under human direction. All ten matched on the first
candidate. Confirmed by a matching build: build/pmdsky.us/pmdsky.us.nds: OK.
None carries a region conditional, so US alone is sufficient.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
cecilarmitais
2026-08-19 16:03:43 -07:00
parent dada4f8dbb
commit edd80366e3
25 changed files with 673 additions and 589 deletions

View File

@@ -0,0 +1,2 @@
#pragma once
.public TrySwitchPlace

View File

@@ -8,9 +8,6 @@
.public GetMoveCategory
.public LogMessageByIdWithPopupCheckUserTarget
.public SLEEP_TURN_RANGE
.public SetReflectStatus
.public TryInflictSleepStatus
.public TrySwitchPlace
.public TryWarp
.public ov29_022E8104
.public ov29_022E81F8

View File

@@ -0,0 +1,15 @@
#pragma once
.public FixedRoomIsSubstituteRoom
.public GetBodySize
.public GetMonsterIdToSpawn
.public GetNameWithGender
.public GetSize0x80Buffer
.public IsMonsterLoneOutlaw
.public LogMessageByIdWithPopupCheckUserTarget
.public MewSpawnCheck
.public SetMessageLogPreprocessorArgsString
.public SubstitutePlaceholderStringTags
.public ov29_022E1AAC
.public ov29_022E1AD4
.public ov29_022E1EF8
.public ov29_022FD7A0

View File

@@ -0,0 +1,7 @@
#pragma once
.public DUNGEON_PTR
.public IsSecretBazaarNpc
.public LogMessageByIdWithPopupCheckUserTarget
.public SetDungeonEscapeFields
.public SubstitutePlaceholderStringTags
.public WaitUntilAlertBoxPauseIsOver

View File

@@ -0,0 +1,22 @@
#pragma once
.public CalcDamageFixedWrapper
.public DUNGEON_PTR
.public EntityIsValidMoveEffects__0232C500
.public GetDamageSourceWrapper
.public GetMoveCategory
.public GetMoveType
.public GetTileAtEntity
.public GetTileSafe
.public GetTrapInfo
.public GetTreatmentBetweenMonsters
.public GetVisibilityRange
.public HasDropeyeStatus
.public IsFullFloorFixedRoom
.public LogMessageByIdWithPopupCheckUser
.public LogMessageByIdWithPopupCheckUserTarget
.public TryInflictInvisibleStatus
.public TryRemoveTrap
.public TryWarp
.public UpdateMinimap
.public UpdateTrapsVisibility
.public ov29_02352B38

View File

@@ -23,39 +23,25 @@
.public EndProtectStatus
.public EndReflectClassStatus
.public EndTwoTurnMove
.public EntityIsValidMoveEffects__0232C500
.public EntityIsValidMoveEffects__0232E250
.public FLARE_BLITZ_BURN_CHANCE
.public FixedRoomIsSubstituteRoom
.public GenerateStandardItem
.public GetApparentWeather
.public GetBodySize
.public GetDamageSourceWrapper
.public GetEntityNaturalGiftInfo
.public GetItemIdToSpawn
.public GetMaxPp
.public GetMonsterIdToSpawn
.public GetMoveCategory
.public GetMoveType
.public GetNameWithGender
.public GetSize
.public GetSize0x80Buffer
.public GetTileAtEntity
.public GetTileSafe
.public GetTrapInfo
.public GetTreatmentBetweenMonsters
.public GetVisibilityRange
.public HEALING_WISH_HP_RESTORATION
.public HEAL_ORDER_HP_RESTORATION
.public HandleFaint
.public HasDropeyeStatus
.public ICE_FANG_CRINGE_CHANCE
.public ICE_FANG_FREEZE_CHANCE
.public IsChargingTwoTurnMove
.public IsCurrentFixedRoomBossFight
.public IsFullFloorFixedRoom
.public IsMonsterLoneOutlaw
.public IsSecretBazaarNpc
.public LAST_RESORT_DAMAGE_MULT_TABLE
.public LogMessageByIdWithPopupCheckUser
.public LogMessageByIdWithPopupCheckUserTarget
@@ -63,17 +49,12 @@
.public LowerHitChanceStat
.public LowerSpeed
.public MakeFloorOneRoom
.public MewSpawnCheck
.public MistIsActive
.public PrepareTrapperTrap
.public ROOST_HP_RESTORATION_TABLE
.public RevealEnemies
.public RevealStairs
.public RevealWholeFloor
.public SHADOW_FORCE_DAMAGE_MULTIPLIER
.public SPATK_STAT_IDX
.public SetDungeonEscapeFields
.public SetMessageLogPreprocessorArgsString
.public SetPreprocessorArgsIdVal
.public SpawnDroppedItemWrapper
.public StringFromId
@@ -88,10 +69,8 @@
.public THUNDER_FANG_PARALYZE_CHANCE
.public TransferNegativeStatusCondition
.public TryActivateGravity
.public TryActivateIdentifyCondition
.public TryActivateWeather
.public TryDecreaseBelly
.public TryDrought
.public TryEatItem
.public TryHurl
.public TryIncreaseHp
@@ -103,36 +82,24 @@
.public TryInflictFrozenStatus
.public TryInflictGastroAcidStatus
.public TryInflictHealBlockStatus
.public TryInflictInvisibleStatus
.public TryInflictLongTossStatus
.public TryInflictLuckyChantStatus
.public TryInflictMagnetRiseStatus
.public TryInflictMobileStatus
.public TryInflictParalysisStatus
.public TryInflictPetrifiedStatus
.public TryInflictPierceStatus
.public TryInflictSleeplessStatus
.public TryPounce
.public TryRemoveTrap
.public TrySpawnTrap
.public TryTrawl
.public TryWarp
.public UpdateMinimap
.public UpdateTrapsVisibility
.public WEATHER_MOVE_TURN_COUNT
.public WRING_OUT_DAMAGE_MULT_TABLE
.public WaitUntilAlertBoxPauseIsOver
.public _s32_div_f
.public ov10_022C456C
.public ov10_022C45BC
.public ov29_022E1AAC
.public ov29_022E1AD4
.public ov29_022E1EF8
.public ov29_022E34A8_EU
.public ov29_022E6770
.public ov29_022E6784
.public ov29_022FD7A0
.public ov29_02332F18
.public ov29_02336694
.public ov29_02352B38
.public ov29_02352B3C

25
asm/overlay_29_0232C538.s Normal file
View File

@@ -0,0 +1,25 @@
.include "asm/macros.inc"
.include "overlay_29_0232C538.inc"
.text
arm_func_start DoMoveSwitchPositions
DoMoveSwitchPositions: ; 0x0232C538
stmdb sp!, {r3, lr}
ldr r3, [r0, #0xb4]
#ifdef JAPAN
ldrb r2, [r3, #0x107]
cmp r2, #1
movlo r2, #1
strlob r2, [r3, #0x107]
#else
ldrb r2, [r3, #0x108]
cmp r2, #1
movlo r2, #1
strlob r2, [r3, #0x108]
#endif
mov r2, #1
bl TrySwitchPlace
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveSwitchPositions

View File

@@ -1,48 +1,8 @@
.include "asm/macros.inc"
.include "overlay_29_0232C524.inc"
.include "overlay_29_0232C578.inc"
.text
arm_func_start DoMoveRebound
DoMoveRebound: ; 0x0232C524
stmdb sp!, {r3, lr}
mov r2, #0xa
bl SetReflectStatus
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveRebound
arm_func_start DoMoveSwitchPositions
DoMoveSwitchPositions: ; 0x0232C538
stmdb sp!, {r3, lr}
ldr r3, [r0, #0xb4]
#ifdef JAPAN
ldrb r2, [r3, #0x107]
cmp r2, #1
movlo r2, #1
strlob r2, [r3, #0x107]
#else
ldrb r2, [r3, #0x108]
cmp r2, #1
movlo r2, #1
strlob r2, [r3, #0x108]
#endif
mov r2, #1
bl TrySwitchPlace
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveSwitchPositions
arm_func_start DoMoveStayAway
DoMoveStayAway: ; 0x0232C560
stmdb sp!, {r3, lr}
mov r2, #1
mov r3, #0
bl TryWarp
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveStayAway
arm_func_start DoMoveCleanse
DoMoveCleanse: ; 0x0232C578
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr}

137
asm/overlay_29_0232C84C.s Normal file
View File

@@ -0,0 +1,137 @@
.include "asm/macros.inc"
.include "overlay_29_0232C84C.inc"
.text
arm_func_start DoMoveTransfer
DoMoveTransfer: ; 0x0232C84C
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr}
mov sb, r0
mov r8, r1
mov fp, #0
bl FixedRoomIsSubstituteRoom
cmp r0, #0
beq _0232C890
mov r0, fp
mov r1, r8
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r2, _0232CA0C ; =0x00000F02
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, fp
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
_0232C890:
ldr r7, [r8, #0xb4]
ldrb r0, [r7, #6]
cmp r0, #0
beq _0232C9E4
ldrsh r4, [r7, #2]
mov r0, fp
mov r1, r8
mov r2, r0
mov r5, r4
bl SubstitutePlaceholderStringTags
ldrb r0, [r7, #0xbc]
cmp r0, #6
bls _0232C8DC
ldr r2, _0232CA0C ; =0x00000F02
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, fp
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
_0232C8DC:
mov r6, fp
b _0232C970
_0232C8E4:
mov r0, #0
bl GetMonsterIdToSpawn
mov r1, #0
mov r4, r0
bl MewSpawnCheck
cmp r0, #0
beq _0232C96C
mov r0, r7
bl IsMonsterLoneOutlaw
cmp r0, #0
bne _0232C96C
ldrb r0, [r7, #6]
cmp r0, #0
cmpne r5, r4
beq _0232C96C
mov r0, r4
bl GetBodySize
mov sl, r0
mov r0, r5
bl GetBodySize
cmp sl, r0
bne _0232C96C
ldrb r1, [r8, #0xaa]
mov r0, r4
bl ov29_022E1AAC
str r0, [sp]
mov r0, r8
bl ov29_022E1AD4
mov sl, r0
bl ov29_022E1EF8
add r1, sl, r0
ldr r0, [sp]
cmp r1, r0
bge _0232C978
_0232C96C:
add r6, r6, #1
_0232C970:
cmp r6, #0x1e
blt _0232C8E4
_0232C978:
cmp r6, #0x1e
ldrnesh r0, [r7, #2]
cmpne r0, r4
bne _0232C99C
ldr r2, _0232CA0C ; =0x00000F02
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _0232CA04
_0232C99C:
mov r0, #1
bl GetSize0x80Buffer
mov r5, r0
mov r1, r4
mov r2, #0x4e
bl GetNameWithGender
mov r1, r5
mov r0, #1
bl SetMessageLogPreprocessorArgsString
ldr r2, _0232CA10 ; =0x00000F01
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, r8
mov r1, r4
bl ov29_022FD7A0
mov fp, #1
b _0232CA04
_0232C9E4:
mov r0, fp
mov r1, r8
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r2, _0232CA0C ; =0x00000F02
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
_0232CA04:
mov r0, fp
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
.align 2, 0
#ifdef JAPAN
_0232CA0C: .word 0x00000C44
_0232CA10: .word 0x00000C43
#else
_0232CA0C: .word 0x00000F02
_0232CA10: .word 0x00000F01
#endif
arm_func_end DoMoveTransfer

55
asm/overlay_29_0232CA70.s Normal file
View File

@@ -0,0 +1,55 @@
.include "asm/macros.inc"
.include "overlay_29_0232CA70.inc"
.text
arm_func_start DoMoveEscape
DoMoveEscape: ; 0x0232CA70
stmdb sp!, {r3, r4, r5, lr}
mov r5, r0
mov r0, #0
mov r4, r1
mov r1, r5
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r0, _0232CAFC ; =DUNGEON_PTR
ldr r0, [r0]
ldrb r0, [r0, #0x790]
cmp r0, #0
beq _0232CAB4
ldr r2, _0232CB00 ; =0x00000F04
mov r0, r5
mov r1, r4
bl LogMessageByIdWithPopupCheckUserTarget
b _0232CAF4
_0232CAB4:
mov r0, r5
bl IsSecretBazaarNpc
cmp r0, #0
moveq r0, #1
movne r0, #0
tst r0, #0xff
beq _0232CAE8
ldr r2, _0232CB04 ; =0x00000F03
mov r0, r5
mov r1, r4
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, #0xa
bl WaitUntilAlertBoxPauseIsOver
_0232CAE8:
mov r0, #1
mov r1, r0
bl SetDungeonEscapeFields
_0232CAF4:
mov r0, #0
ldmia sp!, {r3, r4, r5, pc}
.align 2, 0
_0232CAFC: .word DUNGEON_PTR
#ifdef JAPAN
_0232CB00: .word 0x00000C46
_0232CB04: .word 0x00000C45
#else
_0232CB00: .word 0x00000F04
_0232CB04: .word 0x00000F03
#endif
arm_func_end DoMoveEscape

262
asm/overlay_29_0232CB18.s Normal file
View File

@@ -0,0 +1,262 @@
.include "asm/macros.inc"
.include "overlay_29_0232CB18.inc"
.text
arm_func_start DoMoveTrapBuster
DoMoveTrapBuster: ; 0x0232CB18
stmdb sp!, {r4, r5, r6, r7, r8, sb, sl, fp, lr}
sub sp, sp, #0xc
mov sb, r1
mov sl, r0
mov r0, sb
mov r7, #0
bl GetTileAtEntity
mov r4, r0
bl IsFullFloorFixedRoom
cmp r0, #0
beq _0232CB58
ldr r1, _0232CCB0 ; =0x00000F07
mov r0, sl
bl LogMessageByIdWithPopupCheckUser
mov r0, r7
b _0232CCA8
_0232CB58:
ldrb r0, [r4, #7]
cmp r0, #0xff
beq _0232CB74
mov r0, sb
bl HasDropeyeStatus
cmp r0, #0
beq _0232CB94
_0232CB74:
bl GetVisibilityRange
ldrsh r2, [sb, #4]
ldrsh r1, [sb, #6]
sub r8, r2, r0
sub fp, r1, r0
add r4, r2, r0
add r5, r1, r0
b _0232CBD0
_0232CB94:
ldr r0, _0232CCB4 ; =DUNGEON_PTR
ldrb r2, [r4, #7]
ldr r0, [r0]
mov r1, #0x1c
#ifdef JAPAN
add r0, r0, #0x244
#else
add r0, r0, #0x2e8
#endif
add r0, r0, #0xec00
mla r0, r2, r1, r0
ldrsh r3, [r0, #2]
ldrsh r2, [r0, #4]
ldrsh r1, [r0, #6]
ldrsh r0, [r0, #8]
sub r8, r3, #1
sub fp, r2, #1
add r4, r1, #1
add r5, r0, #1
_0232CBD0:
ldr r0, _0232CCB8 ; =ov29_02352B38
ldrh r1, [r0]
ldrh r0, [r0, #2]
strh r1, [sp, #4]
strh r0, [sp, #6]
b _0232CC68
_0232CBE8:
mov r0, r8, lsl #0x10
mov r0, r0, asr #0x10
mov r6, fp
str r0, [sp]
b _0232CC5C
_0232CBFC:
mov r0, r8
mov r1, r6
bl GetTileSafe
ldr r0, [r0, #0x10]
cmp r0, #0
beq _0232CC58
ldr r1, [r0]
cmp r1, #2
bne _0232CC58
bl GetTrapInfo
ldrb r1, [r0, #2]
tst r1, #1
bne _0232CC58
ldrb r0, [r0]
cmp r0, #0x11
beq _0232CC58
ldr r2, [sp]
add r0, sp, #8
mov r1, #0
strh r2, [sp, #8]
strh r6, [sp, #0xa]
bl TryRemoveTrap
mov r7, #1
_0232CC58:
add r6, r6, #1
_0232CC5C:
cmp r6, r5
ble _0232CBFC
add r8, r8, #1
_0232CC68:
cmp r8, r4
ble _0232CBE8
cmp r7, #0
beq _0232CC94
ldr r2, _0232CCBC ; =0x00000F05
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
bl UpdateMinimap
bl UpdateTrapsVisibility
b _0232CCA4
_0232CC94:
ldr r2, _0232CCC0 ; =0x00000F06
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_0232CCA4:
mov r0, r7
_0232CCA8:
add sp, sp, #0xc
ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc}
.align 2, 0
#ifdef JAPAN
#define DO_MOVE_TRAP_BUSTER_OFFSET -0x2Be
#else
#define DO_MOVE_TRAP_BUSTER_OFFSET 0
#endif
_0232CCB0: .word 0x00000F07 + DO_MOVE_TRAP_BUSTER_OFFSET
_0232CCB4: .word DUNGEON_PTR
_0232CCB8: .word ov29_02352B38
_0232CCBC: .word 0x00000F05 + DO_MOVE_TRAP_BUSTER_OFFSET
_0232CCC0: .word 0x00000F06 + DO_MOVE_TRAP_BUSTER_OFFSET
arm_func_end DoMoveTrapBuster
arm_func_start DoMoveWildCall
DoMoveWildCall: ; 0x0232CCC4
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr}
mov sl, r0
ldr r0, [sl, #0xb4]
mov sb, r1
ldrb r0, [r0, #6]
mov r6, #0
mov r4, #0
cmp r0, #0
ldrne r0, _0232CD88 ; =DUNGEON_PTR
movne r5, #0x10
ldrne r0, [r0]
moveq r5, #4
#ifdef JAPAN
addne r0, r0, #0x294
#else
addne r0, r0, #0x338
#endif
ldreq r0, _0232CD88 ; =DUNGEON_PTR
mov fp, #1
ldreq r0, [r0]
#ifdef JAPAN
addeq r0, r0, #0x284
#else
addeq r0, r0, #0x328
#endif
add r7, r0, #0x12800
b _0232CD60
_0232CD10:
ldr r8, [r7, r4, lsl #2]
mov r0, r8
bl EntityIsValidMoveEffects__0232C500
cmp r0, #0
cmpne sl, r8
beq _0232CD5C
mov r0, sl
mov r1, r8
mov r2, fp
mov r3, #0
bl GetTreatmentBetweenMonsters
cmp r0, #0
bne _0232CD5C
mov r0, sl
mov r1, r8
mov r2, #2
add r3, sl, #4
bl TryWarp
mov r6, #1
_0232CD5C:
add r4, r4, #1
_0232CD60:
cmp r4, r5
blt _0232CD10
cmp r6, #0
bne _0232CD80
ldr r2, _0232CD8C ; =0x00000F08
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_0232CD80:
mov r0, r6
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
.align 2, 0
_0232CD88: .word DUNGEON_PTR
#ifdef JAPAN
_0232CD8C: .word 0x00000C4A
#else
_0232CD8C: .word 0x00000F08
#endif
arm_func_end DoMoveWildCall
arm_func_start DoMoveInvisify
DoMoveInvisify: ; 0x0232CD90
stmdb sp!, {r3, lr}
mov r1, r0
bl TryInflictInvisibleStatus
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveInvisify
arm_func_start DoMoveOneShot
DoMoveOneShot: ; 0x0232CDA4
stmdb sp!, {r4, r5, r6, r7, r8, lr}
sub sp, sp, #0x20
mov r5, #0
strb r5, [sp, #0x1c]
mov r7, r2
mov r4, r0
mov r0, r7
mov r8, r1
mov r5, r3
bl GetMoveType
mov r6, r0
ldrh r0, [r7, #4]
bl GetMoveCategory
mov r1, r5
mov r5, r0
mov r0, r7
bl GetDamageSourceWrapper
add r3, sp, #0x1c
stmia sp, {r3, r6}
str r5, [sp, #8]
str r0, [sp, #0xc]
mov r2, #0
str r2, [sp, #0x10]
mov r3, #1
str r3, [sp, #0x14]
str r2, [sp, #0x18]
ldr r2, _0232CE3C ; =0x0000270F
mov r1, r8
mov r0, r4
bl CalcDamageFixedWrapper
ldrb r0, [sp, #0x1c]
cmp r0, #0
moveq r0, #1
movne r0, #0
strb r0, [sp, #0x1c]
and r0, r0, #0xff
add sp, sp, #0x20
ldmia sp!, {r4, r5, r6, r7, r8, pc}
.align 2, 0
_0232CE3C: .word 0x0000270F
arm_func_end DoMoveOneShot

View File

@@ -1,517 +1,8 @@
.include "asm/macros.inc"
.include "overlay_29_0232C83C.inc"
.include "overlay_29_0232CE50.inc"
.text
arm_func_start DoMovePowerEars
DoMovePowerEars: ; 0x0232C83C
stmdb sp!, {r3, lr}
bl RevealEnemies
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMovePowerEars
arm_func_start DoMoveTransfer
DoMoveTransfer: ; 0x0232C84C
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr}
mov sb, r0
mov r8, r1
mov fp, #0
bl FixedRoomIsSubstituteRoom
cmp r0, #0
beq _0232C890
mov r0, fp
mov r1, r8
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r2, _0232CA0C ; =0x00000F02
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, fp
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
_0232C890:
ldr r7, [r8, #0xb4]
ldrb r0, [r7, #6]
cmp r0, #0
beq _0232C9E4
ldrsh r4, [r7, #2]
mov r0, fp
mov r1, r8
mov r2, r0
mov r5, r4
bl SubstitutePlaceholderStringTags
ldrb r0, [r7, #0xbc]
cmp r0, #6
bls _0232C8DC
ldr r2, _0232CA0C ; =0x00000F02
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, fp
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
_0232C8DC:
mov r6, fp
b _0232C970
_0232C8E4:
mov r0, #0
bl GetMonsterIdToSpawn
mov r1, #0
mov r4, r0
bl MewSpawnCheck
cmp r0, #0
beq _0232C96C
mov r0, r7
bl IsMonsterLoneOutlaw
cmp r0, #0
bne _0232C96C
ldrb r0, [r7, #6]
cmp r0, #0
cmpne r5, r4
beq _0232C96C
mov r0, r4
bl GetBodySize
mov sl, r0
mov r0, r5
bl GetBodySize
cmp sl, r0
bne _0232C96C
ldrb r1, [r8, #0xaa]
mov r0, r4
bl ov29_022E1AAC
str r0, [sp]
mov r0, r8
bl ov29_022E1AD4
mov sl, r0
bl ov29_022E1EF8
add r1, sl, r0
ldr r0, [sp]
cmp r1, r0
bge _0232C978
_0232C96C:
add r6, r6, #1
_0232C970:
cmp r6, #0x1e
blt _0232C8E4
_0232C978:
cmp r6, #0x1e
ldrnesh r0, [r7, #2]
cmpne r0, r4
bne _0232C99C
ldr r2, _0232CA0C ; =0x00000F02
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
b _0232CA04
_0232C99C:
mov r0, #1
bl GetSize0x80Buffer
mov r5, r0
mov r1, r4
mov r2, #0x4e
bl GetNameWithGender
mov r1, r5
mov r0, #1
bl SetMessageLogPreprocessorArgsString
ldr r2, _0232CA10 ; =0x00000F01
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, r8
mov r1, r4
bl ov29_022FD7A0
mov fp, #1
b _0232CA04
_0232C9E4:
mov r0, fp
mov r1, r8
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r2, _0232CA0C ; =0x00000F02
mov r0, sb
mov r1, r8
bl LogMessageByIdWithPopupCheckUserTarget
_0232CA04:
mov r0, fp
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
.align 2, 0
#ifdef JAPAN
_0232CA0C: .word 0x00000C44
_0232CA10: .word 0x00000C43
#else
_0232CA0C: .word 0x00000F02
_0232CA10: .word 0x00000F01
#endif
arm_func_end DoMoveTransfer
arm_func_start DoMoveSlowDown
DoMoveSlowDown: ; 0x0232CA14
stmdb sp!, {r3, lr}
mov r2, #1
mov r3, r2
bl LowerSpeed
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveSlowDown
arm_func_start DoMoveSearchlight
DoMoveSearchlight: ; 0x0232CA2C
stmdb sp!, {r3, lr}
bl RevealWholeFloor
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveSearchlight
arm_func_start DoMovePetrify
DoMovePetrify: ; 0x0232CA3C
stmdb sp!, {r3, lr}
bl TryInflictPetrifiedStatus
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMovePetrify
arm_func_start DoMovePounce
DoMovePounce: ; 0x0232CA4C
stmdb sp!, {r3, lr}
mov r2, #8
bl TryPounce
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMovePounce
arm_func_start DoMoveTrawl
DoMoveTrawl: ; 0x0232CA60
stmdb sp!, {r3, lr}
bl TryTrawl
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveTrawl
arm_func_start DoMoveEscape
DoMoveEscape: ; 0x0232CA70
stmdb sp!, {r3, r4, r5, lr}
mov r5, r0
mov r0, #0
mov r4, r1
mov r1, r5
mov r2, r0
bl SubstitutePlaceholderStringTags
ldr r0, _0232CAFC ; =DUNGEON_PTR
ldr r0, [r0]
ldrb r0, [r0, #0x790]
cmp r0, #0
beq _0232CAB4
ldr r2, _0232CB00 ; =0x00000F04
mov r0, r5
mov r1, r4
bl LogMessageByIdWithPopupCheckUserTarget
b _0232CAF4
_0232CAB4:
mov r0, r5
bl IsSecretBazaarNpc
cmp r0, #0
moveq r0, #1
movne r0, #0
tst r0, #0xff
beq _0232CAE8
ldr r2, _0232CB04 ; =0x00000F03
mov r0, r5
mov r1, r4
bl LogMessageByIdWithPopupCheckUserTarget
mov r0, #0xa
bl WaitUntilAlertBoxPauseIsOver
_0232CAE8:
mov r0, #1
mov r1, r0
bl SetDungeonEscapeFields
_0232CAF4:
mov r0, #0
ldmia sp!, {r3, r4, r5, pc}
.align 2, 0
_0232CAFC: .word DUNGEON_PTR
#ifdef JAPAN
_0232CB00: .word 0x00000C46
_0232CB04: .word 0x00000C45
#else
_0232CB00: .word 0x00000F04
_0232CB04: .word 0x00000F03
#endif
arm_func_end DoMoveEscape
arm_func_start DoMoveDrought
DoMoveDrought: ; 0x0232CB08
stmdb sp!, {r3, lr}
bl TryDrought
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveDrought
arm_func_start DoMoveTrapBuster
DoMoveTrapBuster: ; 0x0232CB18
stmdb sp!, {r4, r5, r6, r7, r8, sb, sl, fp, lr}
sub sp, sp, #0xc
mov sb, r1
mov sl, r0
mov r0, sb
mov r7, #0
bl GetTileAtEntity
mov r4, r0
bl IsFullFloorFixedRoom
cmp r0, #0
beq _0232CB58
ldr r1, _0232CCB0 ; =0x00000F07
mov r0, sl
bl LogMessageByIdWithPopupCheckUser
mov r0, r7
b _0232CCA8
_0232CB58:
ldrb r0, [r4, #7]
cmp r0, #0xff
beq _0232CB74
mov r0, sb
bl HasDropeyeStatus
cmp r0, #0
beq _0232CB94
_0232CB74:
bl GetVisibilityRange
ldrsh r2, [sb, #4]
ldrsh r1, [sb, #6]
sub r8, r2, r0
sub fp, r1, r0
add r4, r2, r0
add r5, r1, r0
b _0232CBD0
_0232CB94:
ldr r0, _0232CCB4 ; =DUNGEON_PTR
ldrb r2, [r4, #7]
ldr r0, [r0]
mov r1, #0x1c
#ifdef JAPAN
add r0, r0, #0x244
#else
add r0, r0, #0x2e8
#endif
add r0, r0, #0xec00
mla r0, r2, r1, r0
ldrsh r3, [r0, #2]
ldrsh r2, [r0, #4]
ldrsh r1, [r0, #6]
ldrsh r0, [r0, #8]
sub r8, r3, #1
sub fp, r2, #1
add r4, r1, #1
add r5, r0, #1
_0232CBD0:
ldr r0, _0232CCB8 ; =ov29_02352B38
ldrh r1, [r0]
ldrh r0, [r0, #2]
strh r1, [sp, #4]
strh r0, [sp, #6]
b _0232CC68
_0232CBE8:
mov r0, r8, lsl #0x10
mov r0, r0, asr #0x10
mov r6, fp
str r0, [sp]
b _0232CC5C
_0232CBFC:
mov r0, r8
mov r1, r6
bl GetTileSafe
ldr r0, [r0, #0x10]
cmp r0, #0
beq _0232CC58
ldr r1, [r0]
cmp r1, #2
bne _0232CC58
bl GetTrapInfo
ldrb r1, [r0, #2]
tst r1, #1
bne _0232CC58
ldrb r0, [r0]
cmp r0, #0x11
beq _0232CC58
ldr r2, [sp]
add r0, sp, #8
mov r1, #0
strh r2, [sp, #8]
strh r6, [sp, #0xa]
bl TryRemoveTrap
mov r7, #1
_0232CC58:
add r6, r6, #1
_0232CC5C:
cmp r6, r5
ble _0232CBFC
add r8, r8, #1
_0232CC68:
cmp r8, r4
ble _0232CBE8
cmp r7, #0
beq _0232CC94
ldr r2, _0232CCBC ; =0x00000F05
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
bl UpdateMinimap
bl UpdateTrapsVisibility
b _0232CCA4
_0232CC94:
ldr r2, _0232CCC0 ; =0x00000F06
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_0232CCA4:
mov r0, r7
_0232CCA8:
add sp, sp, #0xc
ldmia sp!, {r4, r5, r6, r7, r8, sb, sl, fp, pc}
.align 2, 0
#ifdef JAPAN
#define DO_MOVE_TRAP_BUSTER_OFFSET -0x2Be
#else
#define DO_MOVE_TRAP_BUSTER_OFFSET 0
#endif
_0232CCB0: .word 0x00000F07 + DO_MOVE_TRAP_BUSTER_OFFSET
_0232CCB4: .word DUNGEON_PTR
_0232CCB8: .word ov29_02352B38
_0232CCBC: .word 0x00000F05 + DO_MOVE_TRAP_BUSTER_OFFSET
_0232CCC0: .word 0x00000F06 + DO_MOVE_TRAP_BUSTER_OFFSET
arm_func_end DoMoveTrapBuster
arm_func_start DoMoveWildCall
DoMoveWildCall: ; 0x0232CCC4
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr}
mov sl, r0
ldr r0, [sl, #0xb4]
mov sb, r1
ldrb r0, [r0, #6]
mov r6, #0
mov r4, #0
cmp r0, #0
ldrne r0, _0232CD88 ; =DUNGEON_PTR
movne r5, #0x10
ldrne r0, [r0]
moveq r5, #4
#ifdef JAPAN
addne r0, r0, #0x294
#else
addne r0, r0, #0x338
#endif
ldreq r0, _0232CD88 ; =DUNGEON_PTR
mov fp, #1
ldreq r0, [r0]
#ifdef JAPAN
addeq r0, r0, #0x284
#else
addeq r0, r0, #0x328
#endif
add r7, r0, #0x12800
b _0232CD60
_0232CD10:
ldr r8, [r7, r4, lsl #2]
mov r0, r8
bl EntityIsValidMoveEffects__0232C500
cmp r0, #0
cmpne sl, r8
beq _0232CD5C
mov r0, sl
mov r1, r8
mov r2, fp
mov r3, #0
bl GetTreatmentBetweenMonsters
cmp r0, #0
bne _0232CD5C
mov r0, sl
mov r1, r8
mov r2, #2
add r3, sl, #4
bl TryWarp
mov r6, #1
_0232CD5C:
add r4, r4, #1
_0232CD60:
cmp r4, r5
blt _0232CD10
cmp r6, #0
bne _0232CD80
ldr r2, _0232CD8C ; =0x00000F08
mov r0, sl
mov r1, sb
bl LogMessageByIdWithPopupCheckUserTarget
_0232CD80:
mov r0, r6
ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc}
.align 2, 0
_0232CD88: .word DUNGEON_PTR
#ifdef JAPAN
_0232CD8C: .word 0x00000C4A
#else
_0232CD8C: .word 0x00000F08
#endif
arm_func_end DoMoveWildCall
arm_func_start DoMoveInvisify
DoMoveInvisify: ; 0x0232CD90
stmdb sp!, {r3, lr}
mov r1, r0
bl TryInflictInvisibleStatus
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveInvisify
arm_func_start DoMoveOneShot
DoMoveOneShot: ; 0x0232CDA4
stmdb sp!, {r4, r5, r6, r7, r8, lr}
sub sp, sp, #0x20
mov r5, #0
strb r5, [sp, #0x1c]
mov r7, r2
mov r4, r0
mov r0, r7
mov r8, r1
mov r5, r3
bl GetMoveType
mov r6, r0
ldrh r0, [r7, #4]
bl GetMoveCategory
mov r1, r5
mov r5, r0
mov r0, r7
bl GetDamageSourceWrapper
add r3, sp, #0x1c
stmia sp, {r3, r6}
str r5, [sp, #8]
str r0, [sp, #0xc]
mov r2, #0
str r2, [sp, #0x10]
mov r3, #1
str r3, [sp, #0x14]
str r2, [sp, #0x18]
ldr r2, _0232CE3C ; =0x0000270F
mov r1, r8
mov r0, r4
bl CalcDamageFixedWrapper
ldrb r0, [sp, #0x1c]
cmp r0, #0
moveq r0, #1
movne r0, #0
strb r0, [sp, #0x1c]
and r0, r0, #0xff
add sp, sp, #0x20
ldmia sp!, {r4, r5, r6, r7, r8, pc}
.align 2, 0
_0232CE3C: .word 0x0000270F
arm_func_end DoMoveOneShot
arm_func_start DoMoveHpGauge
DoMoveHpGauge: ; 0x0232CE40
stmdb sp!, {r3, lr}
bl TryActivateIdentifyCondition
mov r0, #1
ldmia sp!, {r3, pc}
arm_func_end DoMoveHpGauge
arm_func_start DoMoveVacuumCut
DoMoveVacuumCut: ; 0x0232CE50
stmdb sp!, {r3, lr}

View File

@@ -5,5 +5,6 @@
// Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity).
bool8 EntityIsValidMoveEffects__0232C500(struct entity *entity);
bool8 DoMoveRebound(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
#endif //PMDSKY_OVERLAY_29_0232C500_H

View File

@@ -0,0 +1,10 @@
#ifndef PMDSKY_OVERLAY_29_0232C560_H
#define PMDSKY_OVERLAY_29_0232C560_H
#include "dungeon_mode.h"
#include "item.h"
#include "move.h"
bool8 DoMoveStayAway(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
#endif

View File

@@ -7,5 +7,6 @@
bool8 DoMoveNoMove(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
bool8 DoMoveScan(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
bool8 DoMovePowerEars(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
#endif

View File

@@ -0,0 +1,14 @@
#ifndef PMDSKY_OVERLAY_29_0232CA14_H
#define PMDSKY_OVERLAY_29_0232CA14_H
#include "dungeon_mode.h"
#include "item.h"
#include "move.h"
bool8 DoMoveSlowDown(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
bool8 DoMoveSearchlight(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
bool8 DoMovePetrify(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
bool8 DoMovePounce(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
bool8 DoMoveTrawl(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
#endif

View File

@@ -0,0 +1,10 @@
#ifndef PMDSKY_OVERLAY_29_0232CB08_H
#define PMDSKY_OVERLAY_29_0232CB08_H
#include "dungeon_mode.h"
#include "item.h"
#include "move.h"
bool8 DoMoveDrought(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
#endif

View File

@@ -0,0 +1,10 @@
#ifndef PMDSKY_OVERLAY_29_0232CE40_H
#define PMDSKY_OVERLAY_29_0232CE40_H
#include "dungeon_mode.h"
#include "item.h"
#include "move.h"
bool8 DoMoveHpGauge(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id);
#endif

View File

@@ -1064,9 +1064,17 @@ Overlay OVY_29
Object src/overlay_29_0232C300.o
Object asm/overlay_29_0232C310.o
Object src/overlay_29_0232C500.o
Object asm/overlay_29_0232C524.o
Object asm/overlay_29_0232C538.o
Object src/overlay_29_0232C560.o
Object asm/overlay_29_0232C578.o
Object src/overlay_29_0232C82C.o
Object asm/overlay_29_0232C83C.o
Object asm/overlay_29_0232C84C.o
Object src/overlay_29_0232CA14.o
Object asm/overlay_29_0232CA70.o
Object src/overlay_29_0232CB08.o
Object asm/overlay_29_0232CB18.o
Object src/overlay_29_0232CE40.o
Object asm/overlay_29_0232CE50.o
Object src/overlay_29_0232E250.o
Object asm/overlay_29_0232E2B8.o
Object src/overlay_29_0232E840.o

View File

@@ -1,4 +1,6 @@
#include "overlay_29_0232C500.h"
extern void SetReflectStatus(struct entity *user, struct entity *target, s32 status);
#include "dungeon_util_static.h"
bool8 EntityIsValidMoveEffects__0232C500(struct entity *entity)
@@ -8,3 +10,10 @@ bool8 EntityIsValidMoveEffects__0232C500(struct entity *entity)
return GetEntityType(entity) != ENTITY_NOTHING;
}
bool8 DoMoveRebound(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id)
{
SetReflectStatus(attacker, defender, 10);
return TRUE;
}

10
src/overlay_29_0232C560.c Normal file
View File

@@ -0,0 +1,10 @@
#include "overlay_29_0232C560.h"
extern void TryWarp(struct entity *user, struct entity *target, s32, s32);
bool8 DoMoveStayAway(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id)
{
TryWarp(attacker, defender, 1, 0);
return TRUE;
}

View File

@@ -1,5 +1,7 @@
#include "overlay_29_0232C82C.h"
extern void RevealEnemies(struct entity *user, struct entity *target);
extern void RevealItems(struct entity *user, struct entity *target);
extern void TryInflictMuzzledStatus(struct entity *user, struct entity *target, bool8 onlyCheck);
@@ -16,3 +18,10 @@ bool8 DoMoveScan(struct entity* attacker, struct entity* defender, struct move*
return TRUE;
}
bool8 DoMovePowerEars(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id)
{
RevealEnemies(attacker, defender);
return TRUE;
}

42
src/overlay_29_0232CA14.c Normal file
View File

@@ -0,0 +1,42 @@
#include "overlay_29_0232CA14.h"
#include "move_orb_effects.h"
extern void RevealWholeFloor(struct entity *user, struct entity *target);
extern void TryInflictPetrifiedStatus(struct entity *user, struct entity *target);
extern void TryPounce(struct entity *user, struct entity *target, s32);
extern void TryTrawl(struct entity *user, struct entity *target);
bool8 DoMoveSlowDown(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id)
{
LowerSpeed(attacker, defender, 1, TRUE);
return TRUE;
}
bool8 DoMoveSearchlight(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id)
{
RevealWholeFloor(attacker, defender);
return TRUE;
}
bool8 DoMovePetrify(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id)
{
TryInflictPetrifiedStatus(attacker, defender);
return TRUE;
}
bool8 DoMovePounce(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id)
{
TryPounce(attacker, defender, 8);
return TRUE;
}
bool8 DoMoveTrawl(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id)
{
TryTrawl(attacker, defender);
return TRUE;
}

10
src/overlay_29_0232CB08.c Normal file
View File

@@ -0,0 +1,10 @@
#include "overlay_29_0232CB08.h"
extern void TryDrought(struct entity *user, struct entity *target);
bool8 DoMoveDrought(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id)
{
TryDrought(attacker, defender);
return TRUE;
}

10
src/overlay_29_0232CE40.c Normal file
View File

@@ -0,0 +1,10 @@
#include "overlay_29_0232CE40.h"
extern void TryActivateIdentifyCondition(struct entity *user, struct entity *target);
bool8 DoMoveHpGauge(struct entity* attacker, struct entity* defender, struct move* move, enum item_id item_id)
{
TryActivateIdentifyCondition(attacker, defender);
return TRUE;
}