mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-23 13:09:56 +00:00
finish decomp of code_8075BA4.s
This commit is contained in:
parent
9befb0ef4e
commit
0d02904c9b
@ -5,98 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8042A84
|
||||
sub_8042A84:
|
||||
push {r4-r7,lr}
|
||||
adds r4, r1, 0
|
||||
adds r7, r2, 0
|
||||
lsls r0, 16
|
||||
asrs r5, r0, 16
|
||||
movs r6, 0x80
|
||||
lsls r6, 2
|
||||
adds r0, r4, 0
|
||||
bl sub_8042768
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08042AF8
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl sub_804151C
|
||||
adds r0, r7, 0
|
||||
movs r1, 0x42
|
||||
bl sub_803E708
|
||||
adds r5, r4, 0
|
||||
adds r5, 0x20
|
||||
_08042AB4:
|
||||
ldr r1, [r4, 0x1C]
|
||||
ldr r0, _08042B00
|
||||
cmp r1, r0
|
||||
bgt _08042AF0
|
||||
movs r0, 0x42
|
||||
bl sub_803E46C
|
||||
ldr r1, [r4, 0x1C]
|
||||
adds r1, r6
|
||||
str r1, [r4, 0x1C]
|
||||
movs r0, 0x80
|
||||
lsls r0, 1
|
||||
adds r6, r0
|
||||
ldr r0, [r4, 0x10]
|
||||
subs r0, r1
|
||||
cmp r0, 0
|
||||
bge _08042AD8
|
||||
adds r0, 0xFF
|
||||
_08042AD8:
|
||||
asrs r1, r0, 8
|
||||
ldr r0, _08042B04
|
||||
ldr r0, [r0]
|
||||
ldr r2, _08042B08
|
||||
adds r0, r2
|
||||
movs r2, 0
|
||||
ldrsh r0, [r0, r2]
|
||||
subs r1, r0
|
||||
movs r0, 0x8
|
||||
negs r0, r0
|
||||
cmp r1, r0
|
||||
bge _08042AB4
|
||||
_08042AF0:
|
||||
movs r0, 0
|
||||
strb r0, [r5]
|
||||
bl sub_804178C
|
||||
_08042AF8:
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08042B00: .4byte 0x0000c7ff
|
||||
_08042B04: .4byte gDungeonGlobalData
|
||||
_08042B08: .4byte 0x000181f2
|
||||
thumb_func_end sub_8042A84
|
||||
|
||||
thumb_func_start sub_8042B0C
|
||||
sub_8042B0C:
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
movs r0, 0x9F
|
||||
lsls r0, 1
|
||||
movs r2, 0x5
|
||||
bl sub_8042A84
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8042B0C
|
||||
|
||||
thumb_func_start sub_8042B20
|
||||
sub_8042B20:
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
movs r0, 0xDE
|
||||
lsls r0, 1
|
||||
movs r2, 0xE
|
||||
bl sub_8042A84
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8042B20
|
||||
|
||||
thumb_func_start sub_8042B34
|
||||
sub_8042B34:
|
||||
push {r4-r7,lr}
|
||||
@ -2828,4 +2736,4 @@ _080441B4: .4byte gTeamInventory_203B460
|
||||
_080441B8: .4byte gRecruitedPokemonRef
|
||||
thumb_func_end sub_8044124
|
||||
|
||||
.align 2, 0
|
||||
.align 2, 0
|
||||
|
@ -5073,14 +5073,14 @@ _0805502E:
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
mov r3, r9
|
||||
bl sub_805C480
|
||||
bl LongtossOrbAction
|
||||
b _080554BA
|
||||
_0805503C:
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
mov r3, r9
|
||||
bl sub_805C48C
|
||||
bl PierceOrbAction
|
||||
b _080554BA
|
||||
_0805504A:
|
||||
adds r0, r7, 0
|
||||
@ -5115,7 +5115,7 @@ _08055082:
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
mov r3, r9
|
||||
bl sub_805C1F8
|
||||
bl ShockerOrbAction
|
||||
b _080554BA
|
||||
_08055090:
|
||||
adds r0, r7, 0
|
||||
@ -5138,7 +5138,7 @@ _080550B0:
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
mov r3, r9
|
||||
bl sub_805B2F0
|
||||
bl ProtectMoveAction
|
||||
b _080554BA
|
||||
_080550BE:
|
||||
adds r0, r7, 0
|
||||
@ -5229,7 +5229,7 @@ _08055166:
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
mov r3, r9
|
||||
bl sub_805991C
|
||||
bl StockpileMoveAction
|
||||
b _080554BA
|
||||
_08055174:
|
||||
adds r0, r7, 0
|
||||
@ -5607,7 +5607,7 @@ _0805545A:
|
||||
adds r1, r5, 0
|
||||
mov r2, r8
|
||||
mov r3, r9
|
||||
bl sub_805C1B0
|
||||
bl IdentifyOrbAction
|
||||
b _080554BA
|
||||
_08055468:
|
||||
adds r0, r7, 0
|
||||
@ -5808,7 +5808,7 @@ _080555D6:
|
||||
adds r0, r7, 0
|
||||
adds r1, r7, 0
|
||||
movs r3, 0x2
|
||||
bl sub_8076E20
|
||||
bl LowerAttackStageTarget
|
||||
_08055604:
|
||||
add sp, 0x48
|
||||
pop {r3-r5}
|
||||
@ -6777,7 +6777,7 @@ _08055D54:
|
||||
adds r0, r5, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x1
|
||||
bl sub_8076090
|
||||
bl PausedStatusTarget
|
||||
adds r4, 0xFB
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0
|
||||
@ -6869,7 +6869,7 @@ _08055E48:
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x1
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
_08055E66:
|
||||
ldrh r1, [r5]
|
||||
movs r0, 0x10
|
||||
@ -6883,7 +6883,7 @@ _08055E66:
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x1
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
_08055E84:
|
||||
ldrh r1, [r5]
|
||||
movs r0, 0x20
|
||||
@ -6897,7 +6897,7 @@ _08055E84:
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x1
|
||||
bl sub_80763F8
|
||||
bl PoisonedStatusTarget
|
||||
_08055EA2:
|
||||
ldrh r1, [r5]
|
||||
movs r0, 0x40
|
||||
@ -6911,7 +6911,7 @@ _08055EA2:
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x1
|
||||
bl sub_80763F8
|
||||
bl PoisonedStatusTarget
|
||||
_08055EC0:
|
||||
ldrh r1, [r5]
|
||||
movs r0, 0x80
|
||||
@ -6946,7 +6946,7 @@ _08055EEA:
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x1
|
||||
movs r3, 0x1
|
||||
bl sub_8076210
|
||||
bl BurnedStatusTarget
|
||||
_08055F0C:
|
||||
ldrh r1, [r5]
|
||||
movs r0, 0x80
|
||||
@ -6961,7 +6961,7 @@ _08055F0C:
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x1
|
||||
bl sub_807614C
|
||||
bl InfatuateStatusTarget
|
||||
_08055F2C:
|
||||
adds r5, r6, r7
|
||||
ldrh r1, [r5]
|
||||
@ -7557,7 +7557,7 @@ _08056418:
|
||||
adds r0, r5, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl sub_8077AE4
|
||||
bl ConfuseStatusTarget
|
||||
adds r4, 0xFB
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0
|
||||
|
@ -305,13 +305,13 @@ sub_8057FCC:
|
||||
adds r4, r0, 0
|
||||
adds r5, r1, 0
|
||||
movs r2, 0x1
|
||||
bl sub_8077AE4
|
||||
bl ConfuseStatusTarget
|
||||
ldr r0, _08057FF0
|
||||
ldr r2, [r0]
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
@ -366,7 +366,7 @@ _08058048:
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076210
|
||||
bl BurnedStatusTarget
|
||||
_08058054:
|
||||
movs r0, 0x1
|
||||
pop {r4-r6}
|
||||
@ -553,7 +553,7 @@ sub_805816C:
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_8076210
|
||||
bl BurnedStatusTarget
|
||||
_080581BE:
|
||||
mov r0, r8
|
||||
add sp, 0x4
|
||||
@ -604,7 +604,7 @@ sub_80581D0:
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_8076210
|
||||
bl BurnedStatusTarget
|
||||
_08058222:
|
||||
mov r0, r8
|
||||
add sp, 0x4
|
||||
@ -631,7 +631,7 @@ sub_8058234:
|
||||
_08058246:
|
||||
adds r0, r3, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_8078FDC
|
||||
bl ExposeStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
@ -692,7 +692,7 @@ sub_80582AC:
|
||||
ldr r2, _080582C0
|
||||
ldr r2, [r2]
|
||||
movs r3, 0x1
|
||||
bl sub_8077160
|
||||
bl RaiseDefenseStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -704,7 +704,7 @@ _080582C0: .4byte gUnknown_8106A4C
|
||||
sub_80582C4:
|
||||
push {lr}
|
||||
movs r2, 0x1
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -716,7 +716,7 @@ sub_80582D4:
|
||||
ldr r2, _080582E8
|
||||
ldr r2, [r2]
|
||||
movs r3, 0x1
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -878,7 +878,7 @@ sub_80583D8:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076F80
|
||||
bl LowerDefenseStageTarget
|
||||
_0805841C:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x8
|
||||
@ -917,7 +917,7 @@ sub_8058430:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80776C0
|
||||
bl CringeStatusTarget
|
||||
_0805846A:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -955,7 +955,7 @@ sub_8058478:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
_080584B2:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -1444,7 +1444,7 @@ sub_8058838:
|
||||
str r3, [sp]
|
||||
str r3, [sp, 0x4]
|
||||
movs r3, 0x3
|
||||
bl sub_8076F80
|
||||
bl LowerDefenseStageTarget
|
||||
movs r0, 0x1
|
||||
add sp, 0x8
|
||||
pop {r1}
|
||||
@ -1469,14 +1469,14 @@ sub_8058858:
|
||||
adds r0, r6, 0
|
||||
adds r2, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076E20
|
||||
bl LowerAttackStageTarget
|
||||
str r4, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
adds r0, r6, 0
|
||||
mov r1, r8
|
||||
adds r2, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076F80
|
||||
bl LowerDefenseStageTarget
|
||||
movs r0, 0x1
|
||||
add sp, 0x8
|
||||
pop {r3}
|
||||
@ -1610,24 +1610,24 @@ sub_8058930:
|
||||
adds r1, r7, 0
|
||||
adds r2, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
ldr r0, _080589D0
|
||||
ldr r4, [r0]
|
||||
adds r0, r7, 0
|
||||
adds r1, r7, 0
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
adds r0, r7, 0
|
||||
adds r1, r7, 0
|
||||
adds r2, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077160
|
||||
bl RaiseDefenseStageTarget
|
||||
adds r0, r7, 0
|
||||
adds r1, r7, 0
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077160
|
||||
bl RaiseDefenseStageTarget
|
||||
adds r6, 0xFB
|
||||
ldrb r0, [r6]
|
||||
cmp r0, 0
|
||||
@ -1749,13 +1749,13 @@ sub_8058A7C:
|
||||
ldr r2, [r0]
|
||||
adds r0, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077160
|
||||
bl RaiseDefenseStageTarget
|
||||
ldr r0, _08058AA8
|
||||
ldr r2, [r0]
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077160
|
||||
bl RaiseDefenseStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
@ -1806,7 +1806,7 @@ SkyAttackMoveAction:
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80776C0
|
||||
bl CringeStatusTarget
|
||||
_08058B04:
|
||||
adds r0, r4, 0
|
||||
bl sub_8079764
|
||||
@ -1864,7 +1864,7 @@ sub_8058B3C:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80767B0
|
||||
bl FrozenStatusTarget
|
||||
_08058B76:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -1904,7 +1904,7 @@ sub_8058B84:
|
||||
adds r0, r5, 0
|
||||
adds r1, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
adds r4, 0xFB
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0
|
||||
@ -1969,7 +1969,7 @@ sub_8058C00:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077AE4
|
||||
bl ConfuseStatusTarget
|
||||
_08058C3A:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -2057,7 +2057,7 @@ sub_8058C98:
|
||||
adds r1, r5, 0
|
||||
adds r2, r7, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076F80
|
||||
bl LowerDefenseStageTarget
|
||||
_08058CDE:
|
||||
adds r0, r6, 0
|
||||
add sp, 0x8
|
||||
@ -2096,7 +2096,7 @@ sub_8058CEC:
|
||||
adds r0, r5, 0
|
||||
adds r1, r5, 0
|
||||
movs r3, 0x2
|
||||
bl sub_8076E20
|
||||
bl LowerAttackStageTarget
|
||||
_08058D28:
|
||||
adds r0, r6, 0
|
||||
add sp, 0x8
|
||||
@ -2110,7 +2110,7 @@ _08058D34: .4byte gUnknown_8106A50
|
||||
thumb_func_start sub_8058D38
|
||||
sub_8058D38:
|
||||
push {lr}
|
||||
bl sub_8075FCC
|
||||
bl SleeplessStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -2476,7 +2476,7 @@ sub_8058FBC:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
_08058FF6:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -2530,7 +2530,7 @@ sub_8059004:
|
||||
sub_8059050:
|
||||
push {lr}
|
||||
movs r2, 0x1
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -2581,7 +2581,7 @@ sub_8059080:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
_080590BA:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -2722,7 +2722,7 @@ sub_8059190:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80776C0
|
||||
bl CringeStatusTarget
|
||||
_080591CA:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -3062,7 +3062,7 @@ sub_8059424:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80776C0
|
||||
bl CringeStatusTarget
|
||||
_0805945E:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -3210,7 +3210,7 @@ sub_8059540:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80763F8
|
||||
bl PoisonedStatusTarget
|
||||
_0805957A:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -3227,7 +3227,7 @@ sub_8059588:
|
||||
ldr r2, _0805959C
|
||||
ldr r2, [r2]
|
||||
movs r3, 0x1
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -3263,7 +3263,7 @@ sub_80595A0:
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_8076210
|
||||
bl BurnedStatusTarget
|
||||
_080595DC:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -3684,14 +3684,14 @@ _08059914: .4byte gUnknown_80F4E00
|
||||
_08059918: .4byte gUnknown_8106A4C
|
||||
thumb_func_end sub_80598CC
|
||||
|
||||
thumb_func_start sub_805991C
|
||||
sub_805991C:
|
||||
thumb_func_start StockpileMoveAction
|
||||
StockpileMoveAction:
|
||||
push {lr}
|
||||
bl sub_80787E4
|
||||
bl HandleStockpile
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_805991C
|
||||
thumb_func_end StockpileMoveAction
|
||||
|
||||
thumb_func_start sub_8059928
|
||||
sub_8059928:
|
||||
@ -3732,7 +3732,7 @@ _08059948:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_80776C0
|
||||
bl CringeStatusTarget
|
||||
_08059978:
|
||||
adds r0, r6, 0
|
||||
add sp, 0x4
|
||||
@ -3781,7 +3781,7 @@ _080599A8:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80763F8
|
||||
bl PoisonedStatusTarget
|
||||
_080599D6:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -3899,7 +3899,7 @@ _08059A90:
|
||||
sub_8059AA8:
|
||||
push {lr}
|
||||
movs r2, 0x1
|
||||
bl sub_8077AE4
|
||||
bl ConfuseStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -4027,7 +4027,7 @@ sub_8059B94:
|
||||
ldr r2, _08059BA8
|
||||
ldr r2, [r2]
|
||||
movs r3, 0x2
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -4172,13 +4172,13 @@ _08059CA8:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
ldr r0, _08059CD4
|
||||
ldr r2, [r0]
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
movs r6, 0x1
|
||||
_08059CC6:
|
||||
adds r0, r6, 0
|
||||
@ -4196,7 +4196,7 @@ sub_8059CD8:
|
||||
ldr r2, _08059CEC
|
||||
ldr r2, [r2]
|
||||
movs r3, 0x2
|
||||
bl sub_8077160
|
||||
bl RaiseDefenseStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -4242,7 +4242,7 @@ sub_8059D00:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
_08059D3A:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -4257,7 +4257,7 @@ _08059D44: .4byte gUnknown_80F4DE2
|
||||
sub_8059D48:
|
||||
push {lr}
|
||||
movs r2, 0x1
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -4288,7 +4288,7 @@ sub_8059D58:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
_08059D8E:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -4310,7 +4310,7 @@ sub_8059D98:
|
||||
sub_8059DA4:
|
||||
push {lr}
|
||||
movs r2, 0x1
|
||||
bl sub_80763F8
|
||||
bl PoisonedStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -4320,7 +4320,7 @@ sub_8059DA4:
|
||||
sub_8059DB4:
|
||||
push {lr}
|
||||
movs r2, 0x1
|
||||
bl sub_80765E0
|
||||
bl BadlyPoisonedStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -4353,7 +4353,7 @@ sub_8059DC4:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80765E0
|
||||
bl BadlyPoisonedStatusTarget
|
||||
_08059DFE:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -4391,7 +4391,7 @@ sub_8059E0C:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80763F8
|
||||
bl PoisonedStatusTarget
|
||||
_08059E46:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -4553,7 +4553,7 @@ sub_8059F38:
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
_08059F90:
|
||||
adds r0, r4, 0
|
||||
bl sub_8079764
|
||||
@ -4730,7 +4730,7 @@ _0805A0EA:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
b _0805A114
|
||||
.align 2, 0
|
||||
_0805A0F8: .4byte gUnknown_80F4DFC
|
||||
@ -4739,13 +4739,13 @@ _0805A0FC:
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_8076210
|
||||
bl BurnedStatusTarget
|
||||
b _0805A114
|
||||
_0805A10A:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80767B0
|
||||
bl FrozenStatusTarget
|
||||
_0805A114:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -4971,7 +4971,7 @@ sub_805A2B0:
|
||||
ldr r2, _0805A2C4
|
||||
ldr r2, [r2]
|
||||
movs r3, 0x2
|
||||
bl sub_8077160
|
||||
bl RaiseDefenseStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -4988,7 +4988,7 @@ sub_805A2C8:
|
||||
movs r3, 0x1
|
||||
str r3, [sp]
|
||||
str r3, [sp, 0x4]
|
||||
bl sub_8076E20
|
||||
bl LowerAttackStageTarget
|
||||
movs r0, 0x1
|
||||
add sp, 0x8
|
||||
pop {r1}
|
||||
@ -5134,7 +5134,7 @@ sub_805A3DC:
|
||||
movs r3, 0x1
|
||||
str r3, [sp]
|
||||
str r3, [sp, 0x4]
|
||||
bl sub_8076F80
|
||||
bl LowerDefenseStageTarget
|
||||
movs r0, 0x1
|
||||
add sp, 0x8
|
||||
pop {r1}
|
||||
@ -5179,7 +5179,7 @@ sub_805A408:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80776C0
|
||||
bl CringeStatusTarget
|
||||
_0805A442:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -5273,7 +5273,7 @@ sub_805A4D4:
|
||||
adds r2, r0, 0
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_8075E74
|
||||
bl NappingStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
@ -5285,7 +5285,7 @@ _0805A4F8: .4byte gUnknown_80F4E94
|
||||
thumb_func_start sub_805A4FC
|
||||
sub_805A4FC:
|
||||
push {lr}
|
||||
bl sub_8076AA4
|
||||
bl IngrainedStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
@ -5393,14 +5393,14 @@ sub_805A588:
|
||||
adds r1, r6, 0
|
||||
adds r2, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076E20
|
||||
bl LowerAttackStageTarget
|
||||
str r4, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
adds r0, r6, 0
|
||||
adds r1, r6, 0
|
||||
adds r2, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076F80
|
||||
bl LowerDefenseStageTarget
|
||||
_0805A5D8:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x8
|
||||
@ -5441,7 +5441,7 @@ sub_805A5E8:
|
||||
adds r1, r5, 0
|
||||
adds r2, r7, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077160
|
||||
bl RaiseDefenseStageTarget
|
||||
adds r4, 0xFB
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0
|
||||
@ -5521,7 +5521,7 @@ sub_805A688:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077AE4
|
||||
bl ConfuseStatusTarget
|
||||
_0805A6BE:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -6055,7 +6055,7 @@ sub_805AAE0:
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r3, 0x63
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
mov r0, sp
|
||||
movs r1, 0x1
|
||||
bl sub_80943A0
|
||||
@ -6160,7 +6160,7 @@ _0805ABE0:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80763F8
|
||||
bl PoisonedStatusTarget
|
||||
b _0805AC86
|
||||
_0805ABEC:
|
||||
ldr r1, _0805AC04
|
||||
@ -6192,7 +6192,7 @@ _0805AC16:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076E20
|
||||
bl LowerAttackStageTarget
|
||||
b _0805AC86
|
||||
.align 2, 0
|
||||
_0805AC30: .4byte gUnknown_8106A4C
|
||||
@ -6206,7 +6206,7 @@ _0805AC34:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076F80
|
||||
bl LowerDefenseStageTarget
|
||||
b _0805AC86
|
||||
.align 2, 0
|
||||
_0805AC4C: .4byte gUnknown_8106A4C
|
||||
@ -6224,19 +6224,19 @@ _0805AC64:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077AE4
|
||||
bl ConfuseStatusTarget
|
||||
b _0805AC86
|
||||
_0805AC70:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80776C0
|
||||
bl CringeStatusTarget
|
||||
b _0805AC86
|
||||
_0805AC7C:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077780
|
||||
bl ParalyzeStatusTarget
|
||||
_0805AC86:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x8
|
||||
@ -6272,7 +6272,7 @@ sub_805AC90:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_8077AE4
|
||||
bl ConfuseStatusTarget
|
||||
_0805ACCA:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
@ -6293,12 +6293,12 @@ sub_805ACD8:
|
||||
adds r0, r5, 0
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077160
|
||||
bl RaiseDefenseStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
@ -6323,7 +6323,7 @@ sub_805AD04:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x1
|
||||
bl sub_8076090
|
||||
bl PausedStatusTarget
|
||||
movs r0, 0x1
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
@ -6343,7 +6343,7 @@ sub_805AD34:
|
||||
str r3, [sp]
|
||||
str r3, [sp, 0x4]
|
||||
movs r3, 0x2
|
||||
bl sub_8076E20
|
||||
bl LowerAttackStageTarget
|
||||
movs r0, 0x1
|
||||
add sp, 0x8
|
||||
pop {r1}
|
||||
@ -6536,7 +6536,7 @@ sub_805AE74:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076F80
|
||||
bl LowerDefenseStageTarget
|
||||
_0805AEB8:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x8
|
||||
@ -6586,7 +6586,7 @@ sub_805AECC:
|
||||
adds r1, r7, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_8076210
|
||||
bl BurnedStatusTarget
|
||||
_0805AF1E:
|
||||
mov r0, r8
|
||||
add sp, 0x4
|
||||
|
@ -416,7 +416,7 @@ _0806A608:
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x1
|
||||
movs r3, 0
|
||||
bl sub_8076210
|
||||
bl BurnedStatusTarget
|
||||
b _0806A6D2
|
||||
.align 2, 0
|
||||
_0806A640: .4byte gDungeonWaterType
|
||||
|
@ -139,7 +139,7 @@ _0806D100:
|
||||
adds r0, r6, 0
|
||||
adds r1, r5, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8077084
|
||||
bl RaiseAttackStageTarget
|
||||
_0806D118:
|
||||
adds r0, r6, 0
|
||||
bl EntityExists
|
||||
|
2625
asm/code_8075BA4.s
2625
asm/code_8075BA4.s
File diff suppressed because it is too large
Load Diff
@ -515,7 +515,7 @@ _0807D1A4:
|
||||
bl sub_80522F4
|
||||
mov r0, r8
|
||||
adds r1, r5, 0
|
||||
bl sub_8076D10
|
||||
bl PetrifiedStatusTarget
|
||||
b _0807D3A8
|
||||
.align 2, 0
|
||||
_0807D1D0: .4byte gDungeonGlobalData
|
||||
@ -708,7 +708,7 @@ _0807D35C:
|
||||
bne _0807D36A
|
||||
mov r0, r8
|
||||
adds r1, r5, 0
|
||||
bl sub_8076D10
|
||||
bl PetrifiedStatusTarget
|
||||
_0807D36A:
|
||||
mov r1, r10
|
||||
ldrb r0, [r1, 0x7]
|
||||
|
@ -653,7 +653,7 @@ _080801F2:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076E20
|
||||
bl LowerAttackStageTarget
|
||||
b _08080240
|
||||
.align 2, 0
|
||||
_08080208: .4byte gUnknown_8106A50
|
||||
@ -668,7 +668,7 @@ _0808020C:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076F80
|
||||
bl LowerDefenseStageTarget
|
||||
b _08080240
|
||||
.align 2, 0
|
||||
_08080228: .4byte gUnknown_8106A4C
|
||||
@ -681,7 +681,7 @@ _0808022C:
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_8076F80
|
||||
bl LowerDefenseStageTarget
|
||||
_08080240:
|
||||
add sp, 0x8
|
||||
pop {r4,r5}
|
||||
@ -837,7 +837,7 @@ sub_8080364:
|
||||
cmp r1, 0
|
||||
beq _08080370
|
||||
movs r2, 0x1
|
||||
bl sub_8077AE4
|
||||
bl ConfuseStatusTarget
|
||||
_08080370:
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -899,7 +899,7 @@ sub_80803C8:
|
||||
cmp r1, 0
|
||||
beq _080803D4
|
||||
movs r2, 0x1
|
||||
bl sub_80763F8
|
||||
bl PoisonedStatusTarget
|
||||
_080803D4:
|
||||
pop {r0}
|
||||
bx r0
|
||||
|
@ -1,9 +0,0 @@
|
||||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
.align 2,0
|
||||
|
@ -4,7 +4,7 @@
|
||||
void MuzzleTarget(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
void sub_8078E18(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void sub_8078F50(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void sub_8078FDC(struct DungeonEntity * pokemon, struct DungeonEntity * target, s16 param_3);
|
||||
void ExposeStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target, s16 param_3);
|
||||
void IdentityItemHolders(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
void BlindTarget(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
void CrossEyeVisionTarget(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
|
@ -116,7 +116,8 @@ struct DungeonEntityData
|
||||
/* 0xAE */ u8 nonVolatileStatusDamageTimer;
|
||||
u8 fillAF;
|
||||
/* 0xB0 */ u8 immobilizeStatus;
|
||||
u8 fillB1[0xB8 - 0xB1];
|
||||
u8 fillB1[0xB4 - 0xB1];
|
||||
/* 0xB4 */ s32 unkB4;
|
||||
/* 0xB8 */ u8 immobilizeStatusTurnsLeft;
|
||||
/* 0xB9 */ u8 immobilizeStatusDamageTimer;
|
||||
u8 fillBA[0xBC - 0xBA];
|
||||
@ -211,7 +212,10 @@ struct DungeonEntityData
|
||||
u8 unk15D;
|
||||
u8 unk15E;
|
||||
u8 unk15F;
|
||||
u8 fill160[0x169 - 0x160];
|
||||
u8 fill160[0x164 - 0x160];
|
||||
/* 0x164 */ u8 unk164;
|
||||
/* 0x165 */ u8 unk165;
|
||||
u8 fill166[0x169 - 0x166];
|
||||
u8 turnsSinceWarpScarfActivation;
|
||||
/* 0x16C */ struct Position targetPosition;
|
||||
/* 0x170 */ struct Position posPixel;
|
||||
@ -246,7 +250,7 @@ struct DungeonEntity
|
||||
// X = (posWorld * 24 + 16) * 256, while Y = (posWorld * 24 + 12) * 256.
|
||||
/* 0xC */ struct Position32 posPixel;
|
||||
/* 0x14 */ struct Position32 prevPosPixel;
|
||||
u8 fill1C[0x20 - 0x1C];
|
||||
s32 unk1C;
|
||||
/* 0x20 */ bool8 visible; // Turned off when a Pokémon faints.
|
||||
u8 fill21[0x25 - 0x21];
|
||||
/* 0x25 */ u8 roomIndex;
|
||||
|
@ -77,7 +77,8 @@ struct DungeonGlobalData
|
||||
/* 0x68A */ u8 unk68A;
|
||||
u8 fill68B[0x363C - 0x68B];
|
||||
/* 0x363C */ u8 expYieldRankings[NUM_SPECIES];
|
||||
u8 fill37E3[0x37F8 - 0x37D9];
|
||||
u8 fill37E3[0x37F4 - 0x37D9];
|
||||
/* 0x37F4 */ s32 unk37F4;
|
||||
/* 0x37F8 */ bool8 hasPlus[2]; // Index 0: Enemy , Index 1: Team
|
||||
/* 0x37FA */ bool8 hasMinus[2]; // Index 0: Enemy , Index 1: Team
|
||||
/* 0x37FC */ bool8 decoyActive;
|
||||
|
@ -13,16 +13,27 @@ void sub_80772C0(struct DungeonEntity *pokemon, struct DungeonEntity *target, u3
|
||||
void sub_8077434(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32 statStage, s32 param_4, bool8 displayMessage);
|
||||
void sub_8077540(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 statStage);
|
||||
void sub_80775DC(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 statStage, bool8 displayMessage);
|
||||
void sub_80776C0(struct DungeonEntity * pokemon,struct DungeonEntity * target, bool8 displayMessage);
|
||||
void sub_8077780(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage);
|
||||
void CringeStatusTarget(struct DungeonEntity * pokemon,struct DungeonEntity * target, bool8 displayMessage);
|
||||
void ParalyzeStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage);
|
||||
void sub_8077910(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 turns, bool8 diplayMessage);
|
||||
void sub_80779F0(struct DungeonEntity * pokemon, struct DungeonEntity * target, s32 param_3, bool8 displayMessage);
|
||||
void sub_8077AE4(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage);
|
||||
void sub_8077BB4(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage);
|
||||
void ConfuseStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage);
|
||||
void CowerStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage);
|
||||
void HealTargetHP(struct DungeonEntity *pokemon, struct DungeonEntity *target, s32 param_3, s32 param_4, u32 displayMessage);
|
||||
void HandleScannerOrb(struct DungeonEntity* pokemon, struct DungeonEntity* target);
|
||||
void HandleStairsOrb(struct DungeonEntity* pokemon, struct DungeonEntity* target);
|
||||
void HandleRadarOrb(struct DungeonEntity* pokemon, struct DungeonEntity* target);
|
||||
void HandleLeechSeed(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage);
|
||||
void DestinyBondStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void SureShotStatusTarget(struct DungeonEntity *pokemon, struct DungeonEntity * target, s32 turns);
|
||||
void WhifferStatusTarget(struct DungeonEntity *pokemon, struct DungeonEntity * target, s32 turns);
|
||||
void FixedDamageStatusTarget(struct DungeonEntity *pokemon, struct DungeonEntity * target);
|
||||
void FocusEnergyStatusTarget(struct DungeonEntity *pokemon, struct DungeonEntity * target);
|
||||
void CurseStatusTarget(struct DungeonEntity *pokemon, struct DungeonEntity * target);
|
||||
void SnatchStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void TauntStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void HandleStockpile(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void InvisibleStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
void PerishSongTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target);
|
||||
|
||||
#endif
|
||||
|
@ -37,10 +37,10 @@ bool8 TrapbustOrbAction(struct DungeonEntity *pokemon,struct DungeonEntity *targ
|
||||
bool8 sub_805C080(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 sub_805C128(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 sub_805C138(struct DungeonEntity *pokemon, struct DungeonEntity *target, struct PokemonMove *move, s32 param_4);
|
||||
bool8 sub_805C1B0(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 IdentifyOrbAction(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
u32 sub_805C1BC(struct DungeonEntity *pokemon, struct DungeonEntity *target, struct PokemonMove *move, s32 param_4);
|
||||
bool8 sub_805C1E4(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 sub_805C1F8(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 ShockerOrbAction(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 sub_805C208(struct DungeonEntity *pokemon, struct DungeonEntity *target, struct PokemonMove *move, u32 param_4);
|
||||
bool8 sub_805C288(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 sub_805C2A0(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
@ -50,8 +50,8 @@ bool8 sub_805C3F8(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 sub_805C45C(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 sub_805C468(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 StairsOrbAction(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 sub_805C480(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 sub_805C48C(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 LongtossOrbAction(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 PierceOrbAction(struct DungeonEntity *pokemon, struct DungeonEntity *target);
|
||||
bool8 CanUseOnSelfWithStatusChecker(struct DungeonEntity *pokemon, struct PokemonMove *move);
|
||||
bool8 CanUseOnTargetWithStatusChecker(struct DungeonEntity *user, struct DungeonEntity *target, struct PokemonMove *move);
|
||||
bool8 HasDisabledMove(struct PokemonMove *moves);
|
||||
|
@ -248,7 +248,6 @@ SECTIONS {
|
||||
src/code_8073CF0.o(.text);
|
||||
asm/code_8073CF0.o(.text);
|
||||
src/dungeon_ai.o(.text);
|
||||
asm/code_8075BA4.o(.text);
|
||||
src/status.o(.text);
|
||||
asm/code_8077274.o(.text);
|
||||
src/code_8077274_1.o(.text);
|
||||
|
@ -1,12 +1,15 @@
|
||||
#include "global.h"
|
||||
#include "dungeon_entity.h"
|
||||
|
||||
#include "dungeon_global_data.h"
|
||||
|
||||
extern void sub_804151C(struct DungeonEntity *r0, u32 r1, u8 r2);
|
||||
extern void sub_803E708(u32 r0, u32 r1);
|
||||
extern void sub_80416A4(struct DungeonEntity *r0, u32 r1, u32 r2);
|
||||
extern void sub_80421C0(struct DungeonEntity *r0, u16 r1);
|
||||
|
||||
extern u8 sub_8042768(struct DungeonEntity *pokemon);
|
||||
extern void sub_804178C(u32);
|
||||
extern void sub_804151C(struct DungeonEntity *pokemon, u32 r1, u8 r2);
|
||||
extern void sub_803E46C(u32);
|
||||
|
||||
void sub_80428A0(struct DungeonEntity *r0)
|
||||
{
|
||||
@ -146,3 +149,42 @@ void sub_8042A74(struct DungeonEntity *r0)
|
||||
{
|
||||
sub_804151C(r0, 0x18, 1);
|
||||
}
|
||||
|
||||
void sub_8042A84(s16 param_1, struct DungeonEntity *entity, u32 param_3)
|
||||
{
|
||||
s32 iVar2;
|
||||
s32 iVar3;
|
||||
s32 r6;
|
||||
s32 param_1_s16;
|
||||
|
||||
param_1_s16 = param_1;
|
||||
|
||||
r6 = 0x200;
|
||||
if (sub_8042768(entity) != 0) {
|
||||
sub_804151C(entity,param_1_s16,0);
|
||||
sub_803E708(param_3,0x42);
|
||||
do {
|
||||
if (0xc7ff < entity->unk1C) break;
|
||||
sub_803E46C(0x42);
|
||||
iVar2 = entity->unk1C + r6;
|
||||
entity->unk1C = iVar2;
|
||||
r6 += 0x100;
|
||||
iVar3 = entity->posPixel.y - iVar2;
|
||||
if (iVar3 < 0) {
|
||||
iVar3 += 0xff;
|
||||
}
|
||||
} while (-8 <= (iVar3 >> 8) - gDungeonGlobalData->posScreenPixel.y);
|
||||
entity->visible = 0;
|
||||
sub_804178C(0);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8042B0C(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_8042A84(0x13e, entity, 5);
|
||||
}
|
||||
|
||||
void sub_8042B20(struct DungeonEntity *entity)
|
||||
{
|
||||
sub_8042A84(0x1BC, entity, 0xE);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "number_util.h"
|
||||
#include "moves.h"
|
||||
#include "code_8077274_1.h"
|
||||
#include "status.h"
|
||||
|
||||
extern u8 *gUnknown_80F89F4[];
|
||||
extern u8 gAvailablePokemonNames[0x58];
|
||||
@ -34,16 +35,13 @@ extern u8 *gUnknown_80F9740[];
|
||||
extern u8 *gUnknown_80F9760[];
|
||||
|
||||
extern void sub_807D148(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32 r2, u32 r3);
|
||||
extern void sub_8075FCC(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void sub_8077AE4(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32 r2);
|
||||
extern void SleeplessStatusTarget(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void sub_8072008(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32 r2, u8 r3, u32);
|
||||
extern void sub_8076D10(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void PetrifiedStatusTarget(struct DungeonEntity *pokemon, struct DungeonEntity *r1);
|
||||
extern void LevelDownTarget(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32 r2);
|
||||
extern void sub_8078B5C(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32);
|
||||
extern void SetMessageArgument(u8 *buffer, struct DungeonEntity *r1, u32);
|
||||
extern void sub_80522F4(struct DungeonEntity *pokemon, struct DungeonEntity *r1, const char[]);
|
||||
extern void sub_8077910(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32, u32);
|
||||
extern void HealTargetHP(struct DungeonEntity *pokemon, struct DungeonEntity *r1, s16, s16, u32);
|
||||
extern void sub_806F370(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32);
|
||||
extern void sub_8078A58(struct DungeonEntity *, struct DungeonEntity *, s16, u32);
|
||||
extern s32 sub_8042520(struct DungeonEntity *);
|
||||
@ -126,12 +124,12 @@ void sub_8048480(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
|
||||
void sub_8048490(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8075FCC(pokemon, target);
|
||||
SleeplessStatusTarget(pokemon, target);
|
||||
}
|
||||
|
||||
void sub_804849C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8077AE4(pokemon, target, 1);
|
||||
ConfuseStatusTarget(pokemon, target, TRUE);
|
||||
}
|
||||
|
||||
void sub_80484A8(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
@ -141,7 +139,7 @@ void sub_80484A8(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
|
||||
void sub_80484BC(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8076D10(pokemon, target);
|
||||
PetrifiedStatusTarget(pokemon, target);
|
||||
}
|
||||
|
||||
void sub_80484C8(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
|
@ -3,15 +3,15 @@
|
||||
#include "code_80521D0.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "item.h"
|
||||
#include "status.h"
|
||||
|
||||
extern void sub_803E708(u32, u32);
|
||||
extern void sub_80421C0(struct DungeonEntity *r0, u16 r1);
|
||||
extern void sub_8078B5C(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32);
|
||||
extern void sub_80763F8(struct DungeonEntity *, struct DungeonEntity *, u32);
|
||||
extern void PoisonedStatusTarget(struct DungeonEntity *, struct DungeonEntity *, u32);
|
||||
extern void sub_80769CC(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_8076210(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void sub_8077780(struct DungeonEntity *, struct DungeonEntity *, u32);
|
||||
extern void sub_8076E20(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32, u32);
|
||||
extern void BurnedStatusTarget(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void LowerAttackStageTarget(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32, u32);
|
||||
|
||||
extern u8 gAvailablePokemonNames[];
|
||||
extern u8 gUnknown_202DE58[];
|
||||
@ -69,20 +69,20 @@ void sub_8048E04(struct DungeonEntity *pokemon, struct DungeonEntity * target)
|
||||
switch(DungeonRandomCapped(5))
|
||||
{
|
||||
case 0:
|
||||
sub_80763F8(pokemon, target, 1);
|
||||
PoisonedStatusTarget(pokemon, target, TRUE);
|
||||
break;
|
||||
case 1:
|
||||
sub_80769CC(pokemon, target);
|
||||
break;
|
||||
case 2:
|
||||
sub_8076210(pokemon, target, 1, 1);
|
||||
BurnedStatusTarget(pokemon, target, 1, TRUE);
|
||||
break;
|
||||
case 3:
|
||||
sub_8077780(pokemon, target, 1);
|
||||
ParalyzeStatusTarget(pokemon, target, TRUE);
|
||||
break;
|
||||
case 4:
|
||||
sub_8076E20(pokemon, target, gUnknown_8106A4C, 3, 1, 1);
|
||||
sub_8076E20(pokemon, target, gUnknown_8106A50, 3, 1, 1);
|
||||
LowerAttackStageTarget(pokemon, target, gUnknown_8106A4C, 3, 1, 1);
|
||||
LowerAttackStageTarget(pokemon, target, gUnknown_8106A50, 3, 1, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "code_808417C.h"
|
||||
#include "map.h"
|
||||
#include "moves.h"
|
||||
#include "status.h"
|
||||
#include "status_checks_1.h"
|
||||
#include "tile_types.h"
|
||||
#include "weather.h"
|
||||
@ -54,26 +55,19 @@ struct unkStruct_80928C0
|
||||
|
||||
void sub_80928C0(u8 *buffer, struct PokemonMove *move, struct unkStruct_80928C0 *param_3);
|
||||
|
||||
extern void sub_80775DC(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32);
|
||||
extern void sub_80768DC(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void sub_80772C0(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32, u32);
|
||||
extern void SqueezedStatusTarget(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern u8 sub_807EAA0(u32, u32);
|
||||
extern void sub_80522F4(struct DungeonEntity *r1, struct DungeonEntity *r2, const char[]);
|
||||
extern void sub_8077434(struct DungeonEntity *r0, struct DungeonEntity *r1, u32 , u32, u32);
|
||||
extern s32 sub_80556BC(struct DungeonEntity *, struct DungeonEntity *, u8, struct PokemonMove *, u32, u32);
|
||||
extern u8 sub_805727C(struct DungeonEntity *, struct DungeonEntity *, s16);
|
||||
extern void sub_80779F0(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void sub_8078968(struct DungeonEntity *r0, struct DungeonEntity *r1);
|
||||
extern void sub_8077AE4(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32);
|
||||
extern void sub_8077084(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32, u32);
|
||||
extern u8 sub_80776C0(struct DungeonEntity *, struct DungeonEntity *, u8);
|
||||
extern void sub_8076F80(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32, u32);
|
||||
extern void RaiseAttackStageTarget(struct DungeonEntity *pokemon, struct DungeonEntity *target, u32, u32);
|
||||
extern void LowerDefenseStageTarget(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32, u32);
|
||||
extern void sub_806F370(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32);
|
||||
extern void SetMessageArgument(char[], struct DungeonEntity*, u32);
|
||||
extern u32 sub_8055640(struct DungeonEntity *, struct DungeonEntity *, struct PokemonMove *, u32, u32);
|
||||
extern void HealTargetHP(struct DungeonEntity *pokemon, struct DungeonEntity *r1, s16, s16, u32);
|
||||
extern void sub_8075DBC(struct DungeonEntity *, struct DungeonEntity *, s32);
|
||||
extern void sub_8075F34(struct DungeonEntity *, struct DungeonEntity *, s32);
|
||||
extern void NightmareStatusTarget(struct DungeonEntity *, struct DungeonEntity *, s32);
|
||||
extern void YawnedStatusTarget(struct DungeonEntity *, struct DungeonEntity *, s32);
|
||||
extern void sub_8075C58(struct DungeonEntity *, struct DungeonEntity *, s32, s32);
|
||||
u8 sub_8057620(u32 param_1);
|
||||
extern s16 sub_8094828(u16, u8);
|
||||
@ -148,7 +142,7 @@ bool8 sub_8057634(struct DungeonEntity *pokemon, struct DungeonEntity *target, s
|
||||
if (sub_8055640(pokemon, target, move, 0x100, param_4) != 0) {
|
||||
uVar3 = TRUE;
|
||||
if (sub_805727C(pokemon, target, gUnknown_80F4DB4) != 0) {
|
||||
sub_8076F80(pokemon, target, gUnknown_8106A4C, 1, 1, 0);
|
||||
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1, 1, 0);
|
||||
}
|
||||
}
|
||||
return uVar3;
|
||||
@ -170,7 +164,7 @@ bool8 sub_805768C(struct DungeonEntity *pokemon, struct DungeonEntity *target, s
|
||||
|
||||
bool8 sub_80576D0(struct DungeonEntity * pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8075F34(pokemon, target, CalculateStatusTurns(target,gUnknown_80F4F28,TRUE) + 1);
|
||||
YawnedStatusTarget(pokemon, target, CalculateStatusTurns(target,gUnknown_80F4F28,TRUE) + 1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -182,7 +176,7 @@ bool8 sub_80576F8(struct DungeonEntity * pokemon, struct DungeonEntity *target)
|
||||
|
||||
bool8 sub_8057720(struct DungeonEntity * pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8075DBC(pokemon, target, CalculateStatusTurns(target,gUnknown_80F4E78,TRUE));
|
||||
NightmareStatusTarget(pokemon, target, CalculateStatusTurns(target,gUnknown_80F4E78,TRUE));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -405,8 +399,8 @@ bool8 sub_8057BB4(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
|
||||
bool8 sub_8057BC4(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8077AE4(pokemon, target, 1);
|
||||
sub_8077084(pokemon, target, gUnknown_8106A4C, 2);
|
||||
ConfuseStatusTarget(pokemon, target, 1);
|
||||
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -419,7 +413,7 @@ bool8 sub_8057BEC(struct DungeonEntity *pokemon, struct DungeonEntity *target, s
|
||||
if (sub_8055640(pokemon,target,move,0x100,param_4) != 0) {
|
||||
uVar3 = TRUE;
|
||||
if (sub_805727C(pokemon,target,gUnknown_80F4E0A) != 0) {
|
||||
sub_80776C0(pokemon,target,0);
|
||||
CringeStatusTarget(pokemon,target,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -443,7 +437,7 @@ bool8 sub_8057C88(struct DungeonEntity *pokemon, struct DungeonEntity *target, s
|
||||
if (sub_8055640(pokemon, target, move, 0x100, param_4) != 0) {
|
||||
uVar3 = TRUE;
|
||||
if (sub_805727C(pokemon,target,gUnknown_80F4DF6) != 0) {
|
||||
sub_80776C0(pokemon,target,0);
|
||||
CringeStatusTarget(pokemon,target,0);
|
||||
}
|
||||
}
|
||||
return uVar3;
|
||||
@ -478,7 +472,7 @@ bool8 sub_8057D20(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
if (sub_8055640(pokemon,target,move,uVar3,param_4) != 0) {
|
||||
uVar4 = TRUE;
|
||||
if (sub_805727C(pokemon,target,gUnknown_80F4E08) != 0) {
|
||||
sub_80768DC(pokemon,target,0x3b,0);
|
||||
SqueezedStatusTarget(pokemon,target,0x3b,0);
|
||||
}
|
||||
}
|
||||
return uVar4;
|
||||
@ -486,6 +480,6 @@ bool8 sub_8057D20(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
|
||||
bool8 sub_8057D7C(struct DungeonEntity * param_1, struct DungeonEntity * param_2)
|
||||
{
|
||||
sub_8076F80(param_1, param_2, gUnknown_8106A50, 2, 1, 1);
|
||||
LowerDefenseStageTarget(param_1, param_2, gUnknown_8106A50, 2, 1, 1);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ void sub_80522F4(struct DungeonEntity *r0, struct DungeonEntity *r1, const char
|
||||
extern void sub_8042900(struct DungeonEntity *r0);
|
||||
extern void sub_8042968(struct DungeonEntity *r0);
|
||||
extern void sub_806ABAC(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_8076090(struct DungeonEntity *, struct DungeonEntity *,u32,u32,u32);
|
||||
extern void PausedStatusTarget(struct DungeonEntity *, struct DungeonEntity *,u32,u32,u32);
|
||||
void sub_8041BBC(struct DungeonEntity *r0);
|
||||
extern u8 sub_8045888(struct DungeonEntity *);
|
||||
extern void sub_806A2BC(struct DungeonEntity *, u8);
|
||||
@ -69,15 +69,15 @@ void sub_8069E0C(struct DungeonEntity *pokemon)
|
||||
void TriggerWeatherAbilities(void)
|
||||
{
|
||||
struct DungeonEntity *entity;
|
||||
s32 iVar5;
|
||||
s32 index;
|
||||
|
||||
if (gDungeonGlobalData->unkC != 0) {
|
||||
gDungeonGlobalData->unkC = 0;
|
||||
gDungeonGlobalData->negateWeatherEffects = FALSE;
|
||||
|
||||
for(iVar5 = 0; iVar5 < DUNGEON_MAX_POKEMON; iVar5++)
|
||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||
{
|
||||
entity = gDungeonGlobalData->allPokemon[iVar5];
|
||||
entity = gDungeonGlobalData->allPokemon[index];
|
||||
if (EntityExists(entity)) {
|
||||
if (HasAbility(entity, ABILITY_DRIZZLE)) {
|
||||
gDungeonGlobalData->startingWeather[WEATHER_RAIN] = 1;
|
||||
@ -225,20 +225,20 @@ void sub_806A120(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
void sub_806A1B0(struct DungeonEntity *pokemon)
|
||||
{
|
||||
if ((EntityExists(pokemon)) && (HasAbility(pokemon, ABILITY_TRUANT))) {
|
||||
sub_8076090(pokemon,pokemon,0,1,0);
|
||||
PausedStatusTarget(pokemon,pokemon,0,1,0);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_806A1E8(struct DungeonEntity *pokemon)
|
||||
{
|
||||
bool8 bVar3;
|
||||
struct DungeonEntityData *iVar1;
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
bVar3 = FALSE;
|
||||
if (EntityExists(pokemon)) {
|
||||
if (GetEntityType(pokemon) == ENTITY_POKEMON) {
|
||||
iVar1 = pokemon->entityData;
|
||||
bVar3 = (!iVar1->isEnemy);
|
||||
entityData = pokemon->entityData;
|
||||
bVar3 = (!entityData->isEnemy);
|
||||
}
|
||||
if (gUnknown_203B46C->unk1 == '\0') {
|
||||
bVar3 = FALSE;
|
||||
|
@ -321,7 +321,7 @@ void sub_8078F50(struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8078FDC(struct DungeonEntity * pokemon, struct DungeonEntity * target, s16 param_3)
|
||||
void ExposeStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target, s16 param_3)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
s32 param_3_s16;
|
||||
|
1065
src/dungeon_ai.c
1065
src/dungeon_ai.c
File diff suppressed because it is too large
Load Diff
@ -384,23 +384,23 @@ static inline bool8 JoinLocationCannotUseItems_1(struct DungeonEntityData *pokem
|
||||
|
||||
u8 sub_807167C(struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
{
|
||||
bool8 bVar1;
|
||||
struct DungeonEntityData * iVar3;
|
||||
struct DungeonEntityData * iVar4;
|
||||
bool8 cannotUseItems;
|
||||
struct DungeonEntityData * targetEntityData;
|
||||
struct DungeonEntityData * pokemonEntityData;
|
||||
|
||||
iVar4 = pokemon->entityData;
|
||||
iVar3 = target->entityData;
|
||||
if (iVar4->clientType != CLIENT_TYPE_CLIENT) {
|
||||
bVar1 = JoinLocationCannotUseItems_1(iVar4);
|
||||
if (!bVar1 && (iVar4->shopkeeperMode == SHOPKEEPER_NONE) && (iVar3->clientType != CLIENT_TYPE_CLIENT)) {
|
||||
bVar1 = JoinLocationCannotUseItems_1(iVar3);
|
||||
if (bVar1 || (iVar3->shopkeeperMode != SHOPKEEPER_NONE)) {
|
||||
pokemonEntityData = pokemon->entityData;
|
||||
targetEntityData = target->entityData;
|
||||
if (pokemonEntityData->clientType != CLIENT_TYPE_CLIENT) {
|
||||
cannotUseItems = JoinLocationCannotUseItems_1(pokemonEntityData);
|
||||
if (!cannotUseItems && (pokemonEntityData->shopkeeperMode == SHOPKEEPER_NONE) && (targetEntityData->clientType != CLIENT_TYPE_CLIENT)) {
|
||||
cannotUseItems = JoinLocationCannotUseItems_1(targetEntityData);
|
||||
if (cannotUseItems || (targetEntityData->shopkeeperMode != SHOPKEEPER_NONE)) {
|
||||
error:
|
||||
return TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((iVar4->isEnemy) != (iVar3->isEnemy)) {
|
||||
if ((pokemonEntityData->isEnemy) != (targetEntityData->isEnemy)) {
|
||||
return TARGET_CAPABILITY_CAN_TARGET;
|
||||
}
|
||||
else {
|
||||
|
22
src/status.c
22
src/status.c
@ -118,8 +118,8 @@ extern s32 gUnknown_202DE30[10];
|
||||
extern void sub_8041D84(struct DungeonEntity *);
|
||||
extern void sub_804178C(u32);
|
||||
extern void sub_8041D5C(struct DungeonEntity *);
|
||||
extern void sub_8077084(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void sub_8077160(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void RaiseAttackStageTarget(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void RaiseDefenseStageTarget(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void sub_8041D48(struct DungeonEntity *);
|
||||
extern u8 sub_806CEBC(struct DungeonEntity *);
|
||||
extern void sub_8041D38(struct DungeonEntity * pokemon);
|
||||
@ -385,7 +385,7 @@ void sub_80775DC(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80776C0(struct DungeonEntity * pokemon,struct DungeonEntity * target, bool8 displayMessage)
|
||||
void CringeStatusTarget(struct DungeonEntity * pokemon,struct DungeonEntity * target, bool8 displayMessage)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
@ -416,7 +416,7 @@ void sub_80776C0(struct DungeonEntity * pokemon,struct DungeonEntity * target, b
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8077780(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
void ParalyzeStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
{
|
||||
struct MapTile *mapTile;
|
||||
register struct DungeonEntityData *entityData;
|
||||
@ -464,7 +464,7 @@ void sub_8077780(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FF01C);
|
||||
}
|
||||
if (sub_807167C(target,mapPokemonEntity) == 1) {
|
||||
sub_8077780(pokemon, mapPokemonEntity, displayMessage);
|
||||
ParalyzeStatusTarget(pokemon, mapPokemonEntity, displayMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -564,7 +564,7 @@ void sub_80779F0(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
}
|
||||
|
||||
void sub_8077AE4(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
void ConfuseStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
@ -604,7 +604,7 @@ void sub_8077AE4(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8077BB4(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
void CowerStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target, bool8 displayMessage)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
@ -1060,8 +1060,8 @@ void CurseStatusTarget(struct DungeonEntity *pokemon, struct DungeonEntity * tar
|
||||
}
|
||||
else {
|
||||
uVar1 = gUnknown_8106A4C;
|
||||
sub_8077084(pokemon,pokemon,uVar1,1);
|
||||
sub_8077160(pokemon,pokemon,uVar1,1);
|
||||
RaiseAttackStageTarget(pokemon,pokemon,uVar1,1);
|
||||
RaiseDefenseStageTarget(pokemon,pokemon,uVar1,1);
|
||||
sub_80779F0(pokemon,pokemon,1,1);
|
||||
}
|
||||
DungeonEntityUpdateStatusSprites(target);
|
||||
@ -1123,7 +1123,7 @@ void TauntStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * ta
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80787E4(struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
void HandleStockpile(struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
{
|
||||
struct DungeonEntityData *entityData;
|
||||
|
||||
@ -1144,7 +1144,7 @@ void sub_80787E4(struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_807885C(struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
void InvisibleStatusTarget(struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
{
|
||||
struct DungeonEntityData * targetEntityData;
|
||||
struct DungeonEntityData * targetEntityData_1;
|
||||
|
@ -33,9 +33,7 @@
|
||||
extern void sub_807F43C(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_8078F50(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_807DC68(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_8077BB4(struct DungeonEntity *, struct DungeonEntity *, u8);
|
||||
extern void sub_8078A58(struct DungeonEntity *, struct DungeonEntity *, s16, u32);
|
||||
extern void sub_807885C(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern u32 sub_803D73C(u32);
|
||||
extern void sub_8045C28(struct ItemSlot *, u8 , u8 *);
|
||||
extern void sub_80464C8(struct DungeonEntity *, struct Position *, struct ItemSlot *);
|
||||
@ -57,7 +55,7 @@ extern void sub_807FE04(u32 *, u32);
|
||||
extern void sub_807DB74(struct DungeonEntity *);
|
||||
extern void SetMessageArgument(char[], struct DungeonEntity*, u32);
|
||||
extern void HandleLuminousOrbAction(struct DungeonEntity *pokemon);
|
||||
extern void sub_8076D10(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void PetrifiedStatusTarget(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_807D510(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_807DA14(struct DungeonEntity *, struct DungeonEntity *, s32);
|
||||
extern s16 sub_803D970(u32);
|
||||
@ -72,20 +70,17 @@ extern void sub_807D3CC(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern u8 sub_8069D18(s32 *);
|
||||
extern u8 sub_804AD34(s32 *);
|
||||
extern u8 sub_8057308(struct DungeonEntity *, u32);
|
||||
extern void sub_8076F80(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32, u32);
|
||||
extern void sub_8077084(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void SnatchStatusTarget(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void LowerDefenseStageTarget(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32, u32);
|
||||
extern void RaiseAttackStageTarget(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void sub_806F324(struct DungeonEntity *, s32, u32, u32);
|
||||
extern void sub_8077160(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern void RaiseDefenseStageTarget(struct DungeonEntity *, struct DungeonEntity *, u32, u32);
|
||||
extern bool8 sub_805755C(struct DungeonEntity* pokemon,u16 moveID);
|
||||
extern void sub_807614C(struct DungeonEntity *, struct DungeonEntity *, u32);
|
||||
extern void DestinyBondStatusTarget(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_8076E20(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32, u32);
|
||||
extern void InfatuateStatusTarget(struct DungeonEntity *, struct DungeonEntity *, u32);
|
||||
extern void LowerAttackStageTarget(struct DungeonEntity *, struct DungeonEntity *, u32, u32, u32, u32);
|
||||
extern void sub_80783C4(struct DungeonEntity *, struct DungeonEntity *, u32);
|
||||
extern bool8 sub_807FCD4(struct Position *, u32, u8);
|
||||
extern void PerishSongTarget(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void WrapTarget(struct DungeonEntity *, struct DungeonEntity *);
|
||||
extern void sub_80768DC(struct DungeonEntity *, struct DungeonEntity *, s32, s32);
|
||||
extern void SqueezedStatusTarget(struct DungeonEntity *, struct DungeonEntity *, s32, s32);
|
||||
extern void sub_807CD9C(struct DungeonEntity *, struct DungeonEntity *, u8 facingDir);
|
||||
|
||||
|
||||
@ -236,7 +231,7 @@ const u8 gDungeonCamouflageTypes[76] = {
|
||||
|
||||
extern s16 gUnknown_80F4DC6;
|
||||
extern u8 *gUnknown_80FEFF4[];
|
||||
extern void sub_80763F8(struct DungeonEntity *, struct DungeonEntity *, u32);
|
||||
extern void PoisonedStatusTarget(struct DungeonEntity *, struct DungeonEntity *, u32);
|
||||
|
||||
extern u32 gUnknown_80F51C4[];
|
||||
|
||||
@ -282,7 +277,7 @@ bool8 sub_805AFA4(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
|
||||
bool8 sub_805B028(struct DungeonEntity * pokemon,struct DungeonEntity * target,struct PokemonMove *move)
|
||||
{
|
||||
sub_8077780(pokemon,target, 1);
|
||||
ParalyzeStatusTarget(pokemon,target, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -307,7 +302,7 @@ bool8 sub_805B074(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
if (sub_8055640(pokemon,target,move,0x100,param_4) != 0) {
|
||||
uVar5 = TRUE;
|
||||
if (sub_805727C(pokemon,target,gUnknown_80F4DC6) != 0) {
|
||||
sub_80763F8(pokemon,target,0);
|
||||
PoisonedStatusTarget(pokemon,target,FALSE);
|
||||
}
|
||||
}
|
||||
return uVar5;
|
||||
@ -345,7 +340,7 @@ bool8 HandleColorChange(struct DungeonEntity * pokemon, struct DungeonEntity * t
|
||||
|
||||
bool8 sub_805B164(struct DungeonEntity * pokemon, struct DungeonEntity * target, struct PokemonMove *move, s32 param_4)
|
||||
{
|
||||
sub_8077084(pokemon,target,gUnknown_8106A50, 2);
|
||||
RaiseAttackStageTarget(pokemon,target,gUnknown_8106A50, 2);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -368,7 +363,7 @@ bool8 sub_805B17C(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
if (sub_8055640(pokemon,target,move,0x100,param_4) != 0) {
|
||||
uVar5 = TRUE;
|
||||
if (sub_805727C(pokemon,target,gUnknown_80F4E08) != 0) {
|
||||
sub_80768DC(pokemon,target,uVar4,0);
|
||||
SqueezedStatusTarget(pokemon,target,uVar4,0);
|
||||
}
|
||||
}
|
||||
return uVar5;
|
||||
@ -439,7 +434,7 @@ bool8 sub_805B2E4(struct DungeonEntity * pokemon,struct DungeonEntity * target,s
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_805B2F0(struct DungeonEntity * pokemon,struct DungeonEntity * target,struct PokemonMove *move, s32 param_4)
|
||||
bool8 ProtectMoveAction(struct DungeonEntity * pokemon,struct DungeonEntity * target,struct PokemonMove *move, s32 param_4)
|
||||
{
|
||||
ProtectStatusTarget(pokemon, target);
|
||||
return TRUE;
|
||||
@ -447,7 +442,7 @@ bool8 sub_805B2F0(struct DungeonEntity * pokemon,struct DungeonEntity * target,s
|
||||
|
||||
bool8 sub_805B2FC(struct DungeonEntity * pokemon,struct DungeonEntity * target,struct PokemonMove *move, s32 param_4)
|
||||
{
|
||||
sub_8077160(pokemon,target,gUnknown_8106A4C,1);
|
||||
RaiseDefenseStageTarget(pokemon,target,gUnknown_8106A4C,1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -465,7 +460,7 @@ bool8 sub_805B324(struct DungeonEntity * pokemon,struct DungeonEntity * target,s
|
||||
if (sub_8055640(pokemon,target,move,0x100,param_4) != 0) {
|
||||
uVar3 = TRUE;
|
||||
if (sub_805727C(pokemon,target,gUnknown_80F4DD8) != 0) {
|
||||
sub_8076E20(pokemon,target,gUnknown_8106A50,1,1,0);
|
||||
LowerAttackStageTarget(pokemon,target,gUnknown_8106A50,1,1,0);
|
||||
}
|
||||
}
|
||||
return uVar3;
|
||||
@ -491,8 +486,8 @@ bool8 sub_805B3A8(struct DungeonEntity * pokemon,struct DungeonEntity * target,s
|
||||
bool8 sub_805B3B4(struct DungeonEntity * pokemon,struct DungeonEntity * target,struct PokemonMove *move, s32 param_4)
|
||||
{
|
||||
u32 uVar1 = gUnknown_8106A50;
|
||||
sub_8077084(pokemon,target,uVar1,1);
|
||||
sub_8077160(pokemon,target,uVar1,1);
|
||||
RaiseAttackStageTarget(pokemon,target,uVar1,1);
|
||||
RaiseDefenseStageTarget(pokemon,target,uVar1,1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -504,17 +499,17 @@ bool8 sub_805B3E0(struct DungeonEntity * pokemon,struct DungeonEntity * target,s
|
||||
|
||||
bool8 sub_805B3FC(struct DungeonEntity * pokemon,struct DungeonEntity * target,struct PokemonMove *move, s32 param_4, s32 param_5)
|
||||
{
|
||||
struct DungeonEntityData *iVar2;
|
||||
struct DungeonEntityData *entityData;
|
||||
bool8 uVar4;
|
||||
|
||||
uVar4 = FALSE;
|
||||
if (sub_8055640(pokemon,target,move,0x100,param_5) != 0) {
|
||||
uVar4 = TRUE;
|
||||
if (sub_805727C(pokemon,pokemon,gUnknown_80F4DCE) != 0) {
|
||||
iVar2 = pokemon->entityData;
|
||||
sub_8077084(pokemon,pokemon,param_4,1);
|
||||
if (iVar2->unkFB == 0) {
|
||||
iVar2->unkFB = 1;
|
||||
entityData = pokemon->entityData;
|
||||
RaiseAttackStageTarget(pokemon,pokemon,param_4,1);
|
||||
if (entityData->unkFB == 0) {
|
||||
entityData->unkFB = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -523,7 +518,7 @@ bool8 sub_805B3FC(struct DungeonEntity * pokemon,struct DungeonEntity * target,s
|
||||
|
||||
bool8 sub_805B454(struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
{
|
||||
sub_807614C(pokemon, target, 1);
|
||||
InfatuateStatusTarget(pokemon, target, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -747,7 +742,7 @@ bool8 sub_805B808(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
|
||||
bool8 sub_805B884( struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
{
|
||||
sub_8077084(pokemon, target, gUnknown_8106A4C, 1);
|
||||
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1);
|
||||
sub_8077910(pokemon, target, 0, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
@ -776,7 +771,7 @@ bool8 sub_805B910(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
flag = TRUE;
|
||||
if(sub_805727C(pokemon, target, gUnknown_80F4DDC))
|
||||
{
|
||||
sub_8076F80(pokemon, target, gUnknown_8106A50, 1, 1, 0);
|
||||
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50, 1, 1, 0);
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
@ -1082,7 +1077,7 @@ bool8 LuminousOrbAction(struct DungeonEntity * pokemon, struct DungeonEntity * t
|
||||
|
||||
bool8 sub_805BEAC(struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
{
|
||||
sub_8076D10(pokemon, target);
|
||||
PetrifiedStatusTarget(pokemon, target);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1206,7 +1201,7 @@ bool8 sub_805C080(struct DungeonEntity * pokemon, struct DungeonEntity *target)
|
||||
|
||||
bool8 sub_805C128(struct DungeonEntity * pokemon, struct DungeonEntity * target)
|
||||
{
|
||||
sub_807885C(pokemon, pokemon);
|
||||
InvisibleStatusTarget(pokemon, pokemon);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1220,7 +1215,7 @@ bool8 sub_805C138(struct DungeonEntity * pokemon, struct DungeonEntity * target,
|
||||
return local_20;
|
||||
}
|
||||
|
||||
bool8 sub_805C1B0(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
bool8 IdentifyOrbAction(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
IdentityItemHolders(pokemon, target);
|
||||
return TRUE;
|
||||
@ -1240,9 +1235,9 @@ bool8 sub_805C1E4(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_805C1F8(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
bool8 ShockerOrbAction(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
sub_8077BB4(pokemon, target, 1);
|
||||
CowerStatusTarget(pokemon, target, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1372,13 +1367,13 @@ bool8 StairsOrbAction(struct DungeonEntity *pokemon, struct DungeonEntity *targe
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_805C480(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
bool8 LongtossOrbAction(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
LongTossStatusTarget(pokemon, target);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_805C48C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
bool8 PierceOrbAction(struct DungeonEntity *pokemon, struct DungeonEntity *target)
|
||||
{
|
||||
PierceStatusTarget(pokemon, target);
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user