mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-23 13:09:56 +00:00
commit
cf96b51987
1047
asm/code_8046CE4.s
1047
asm/code_8046CE4.s
File diff suppressed because it is too large
Load Diff
@ -4497,7 +4497,7 @@ _08054B88:
|
|||||||
adds r1, r5, 0
|
adds r1, r5, 0
|
||||||
mov r2, r8
|
mov r2, r8
|
||||||
mov r3, r9
|
mov r3, r9
|
||||||
bl sub_805B214
|
bl WrapMoveAction
|
||||||
bl _080554BA
|
bl _080554BA
|
||||||
_08054B98:
|
_08054B98:
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
@ -4644,7 +4644,7 @@ _08054CD4:
|
|||||||
adds r1, r5, 0
|
adds r1, r5, 0
|
||||||
mov r2, r8
|
mov r2, r8
|
||||||
mov r3, r9
|
mov r3, r9
|
||||||
bl sub_805815C
|
bl CounterMoveAction
|
||||||
b _080554BA
|
b _080554BA
|
||||||
_08054CE2:
|
_08054CE2:
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
@ -4751,7 +4751,7 @@ _08054DAA:
|
|||||||
adds r1, r5, 0
|
adds r1, r5, 0
|
||||||
mov r2, r8
|
mov r2, r8
|
||||||
mov r3, r9
|
mov r3, r9
|
||||||
bl sub_805A23C
|
bl MudWaterSportMoveAction
|
||||||
b _080554BA
|
b _080554BA
|
||||||
_08054DB8:
|
_08054DB8:
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
@ -4989,7 +4989,7 @@ _08054F86:
|
|||||||
adds r1, r5, 0
|
adds r1, r5, 0
|
||||||
mov r2, r8
|
mov r2, r8
|
||||||
mov r3, r9
|
mov r3, r9
|
||||||
bl sub_80585CC
|
bl BrickBreakMoveAction
|
||||||
b _080554BA
|
b _080554BA
|
||||||
_08054F94:
|
_08054F94:
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
@ -5446,7 +5446,7 @@ _08055318:
|
|||||||
adds r1, r5, 0
|
adds r1, r5, 0
|
||||||
mov r2, r8
|
mov r2, r8
|
||||||
mov r3, r9
|
mov r3, r9
|
||||||
bl sub_805BB64
|
bl ReboundOrbAction
|
||||||
b _080554BA
|
b _080554BA
|
||||||
_08055326:
|
_08055326:
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
@ -5551,7 +5551,7 @@ _080553EA:
|
|||||||
adds r1, r5, 0
|
adds r1, r5, 0
|
||||||
mov r2, r8
|
mov r2, r8
|
||||||
mov r3, r9
|
mov r3, r9
|
||||||
bl sub_805B734
|
bl SnatchMoveAction
|
||||||
b _080554BA
|
b _080554BA
|
||||||
_080553F8:
|
_080553F8:
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
|
@ -476,8 +476,8 @@ GetWeatherName:
|
|||||||
_0807EA2C: .4byte gWeatherNames
|
_0807EA2C: .4byte gWeatherNames
|
||||||
thumb_func_end GetWeatherName
|
thumb_func_end GetWeatherName
|
||||||
|
|
||||||
thumb_func_start sub_807EA30
|
thumb_func_start MudWaterSportEffect
|
||||||
sub_807EA30:
|
MudWaterSportEffect:
|
||||||
push {lr}
|
push {lr}
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
@ -523,7 +523,7 @@ _0807EA90: .4byte gUnknown_80F4EAC
|
|||||||
_0807EA94: .4byte gDungeon
|
_0807EA94: .4byte gDungeon
|
||||||
_0807EA98: .4byte 0x0000e278
|
_0807EA98: .4byte 0x0000e278
|
||||||
_0807EA9C: .4byte gUnknown_80FADB0
|
_0807EA9C: .4byte gUnknown_80FADB0
|
||||||
thumb_func_end sub_807EA30
|
thumb_func_end MudWaterSportEffect
|
||||||
|
|
||||||
thumb_func_start sub_807EAA0
|
thumb_func_start sub_807EAA0
|
||||||
sub_807EAA0:
|
sub_807EAA0:
|
||||||
|
@ -5,806 +5,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_8081454
|
|
||||||
sub_8081454:
|
|
||||||
push {r4-r7,lr}
|
|
||||||
mov r7, r10
|
|
||||||
mov r6, r9
|
|
||||||
mov r5, r8
|
|
||||||
push {r5-r7}
|
|
||||||
adds r7, r0, 0
|
|
||||||
ldr r1, _08081600
|
|
||||||
bl sub_808300C
|
|
||||||
ldr r4, _08081604
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081608
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r2, _0808160C
|
|
||||||
adds r0, r2
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081610
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r2, _08081614
|
|
||||||
adds r0, r2
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081618
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r2, _0808161C
|
|
||||||
adds r0, r2
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081620
|
|
||||||
adds r0, r1
|
|
||||||
movs r2, 0
|
|
||||||
ldrsh r1, [r0, r2]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8083048
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081624
|
|
||||||
adds r0, r1
|
|
||||||
movs r2, 0
|
|
||||||
ldrsh r1, [r0, r2]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8083048
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081628
|
|
||||||
adds r0, r1
|
|
||||||
movs r2, 0
|
|
||||||
ldrsh r1, [r0, r2]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8083048
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _0808162C
|
|
||||||
adds r0, r1
|
|
||||||
movs r2, 0
|
|
||||||
ldrsh r1, [r0, r2]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8083048
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081630
|
|
||||||
adds r0, r1
|
|
||||||
movs r2, 0
|
|
||||||
ldrsh r1, [r0, r2]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8083048
|
|
||||||
movs r1, 0
|
|
||||||
mov r9, r4
|
|
||||||
_08081510:
|
|
||||||
lsls r0, r1, 2
|
|
||||||
adds r2, r1, 0x1
|
|
||||||
mov r8, r2
|
|
||||||
adds r0, r1
|
|
||||||
lsls r0, 2
|
|
||||||
adds r0, r1
|
|
||||||
lsls r0, 6
|
|
||||||
ldr r1, _08081634
|
|
||||||
adds r6, r0, r1
|
|
||||||
movs r5, 0
|
|
||||||
movs r4, 0x37
|
|
||||||
_08081526:
|
|
||||||
mov r2, r9
|
|
||||||
ldr r1, [r2]
|
|
||||||
adds r1, r6
|
|
||||||
adds r1, r5
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8081B60
|
|
||||||
adds r5, 0x18
|
|
||||||
subs r4, 0x1
|
|
||||||
cmp r4, 0
|
|
||||||
bge _08081526
|
|
||||||
mov r1, r8
|
|
||||||
cmp r1, 0x1F
|
|
||||||
ble _08081510
|
|
||||||
ldr r4, _08081604
|
|
||||||
ldr r1, [r4]
|
|
||||||
ldr r0, _08081638
|
|
||||||
adds r1, r0
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl SavePosition
|
|
||||||
ldr r1, [r4]
|
|
||||||
ldr r2, _0808163C
|
|
||||||
adds r1, r2
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl SavePosition
|
|
||||||
ldr r6, _08081640
|
|
||||||
movs r5, 0x7
|
|
||||||
_08081560:
|
|
||||||
ldr r1, [r4]
|
|
||||||
adds r1, r6
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl SavePosition
|
|
||||||
adds r6, 0x4
|
|
||||||
subs r5, 0x1
|
|
||||||
cmp r5, 0
|
|
||||||
bge _08081560
|
|
||||||
ldr r4, _08081604
|
|
||||||
ldr r1, [r4]
|
|
||||||
ldr r0, _08081644
|
|
||||||
adds r1, r0
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_80830F8
|
|
||||||
ldr r1, [r4]
|
|
||||||
ldr r2, _08081648
|
|
||||||
adds r1, r2
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_80830F8
|
|
||||||
ldr r1, [r4]
|
|
||||||
ldr r0, _0808164C
|
|
||||||
adds r1, r0
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_808312C
|
|
||||||
movs r1, 0
|
|
||||||
mov r10, r4
|
|
||||||
_0808159C:
|
|
||||||
movs r4, 0
|
|
||||||
adds r2, r1, 0x1
|
|
||||||
mov r8, r2
|
|
||||||
lsls r0, r1, 1
|
|
||||||
lsls r2, r1, 3
|
|
||||||
mov r9, r2
|
|
||||||
adds r0, r1
|
|
||||||
lsls r0, 6
|
|
||||||
ldr r1, _08081650
|
|
||||||
adds r6, r0, r1
|
|
||||||
movs r5, 0
|
|
||||||
_080815B2:
|
|
||||||
mov r2, r10
|
|
||||||
ldr r1, [r2]
|
|
||||||
adds r1, r6
|
|
||||||
adds r1, r5
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8081B60
|
|
||||||
mov r1, r10
|
|
||||||
ldr r0, [r1]
|
|
||||||
mov r2, r9
|
|
||||||
adds r1, r4, r2
|
|
||||||
ldr r2, _08081654
|
|
||||||
adds r0, r2
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8083060
|
|
||||||
adds r5, 0x18
|
|
||||||
adds r4, 0x1
|
|
||||||
cmp r4, 0x7
|
|
||||||
ble _080815B2
|
|
||||||
mov r1, r8
|
|
||||||
cmp r1, 0x7
|
|
||||||
ble _0808159C
|
|
||||||
ldr r0, _08081604
|
|
||||||
ldr r1, [r0]
|
|
||||||
ldr r0, _08081658
|
|
||||||
adds r1, r0
|
|
||||||
adds r0, r7, 0
|
|
||||||
bl sub_8081B94
|
|
||||||
pop {r3-r5}
|
|
||||||
mov r8, r3
|
|
||||||
mov r9, r4
|
|
||||||
mov r10, r5
|
|
||||||
pop {r4-r7}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_08081600: .4byte gUnknown_81071E0
|
|
||||||
_08081604: .4byte gDungeon
|
|
||||||
_08081608: .4byte 0x00003a08
|
|
||||||
_0808160C: .4byte 0x00003a09
|
|
||||||
_08081610: .4byte 0x00003a0a
|
|
||||||
_08081614: .4byte 0x00003a0b
|
|
||||||
_08081618: .4byte 0x00003a0c
|
|
||||||
_0808161C: .4byte 0x00003a0d
|
|
||||||
_08081620: .4byte 0x00003a0e
|
|
||||||
_08081624: .4byte 0x00003a10
|
|
||||||
_08081628: .4byte 0x00003a12
|
|
||||||
_0808162C: .4byte 0x00003a14
|
|
||||||
_08081630: .4byte 0x00003a16
|
|
||||||
_08081634: .4byte 0x00003a18
|
|
||||||
_08081638: .4byte 0x0000e218
|
|
||||||
_0808163C: .4byte 0x0000e21c
|
|
||||||
_08081640: .4byte 0x0000e220
|
|
||||||
_08081644: .4byte 0x0000e240
|
|
||||||
_08081648: .4byte 0x0000e250
|
|
||||||
_0808164C: .4byte 0x0000e260
|
|
||||||
_08081650: .4byte 0x0000e27c
|
|
||||||
_08081654: .4byte 0x0000e87c
|
|
||||||
_08081658: .4byte 0x0000e264
|
|
||||||
thumb_func_end sub_8081454
|
|
||||||
|
|
||||||
thumb_func_start sub_808165C
|
|
||||||
sub_808165C:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
ldr r1, _08081708
|
|
||||||
bl sub_808300C
|
|
||||||
ldr r4, _0808170C
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081710
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081714
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081718
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _0808171C
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081720
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081724
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081728
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _0808172C
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081730
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081734
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081738
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r1, [r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_08081708: .4byte gUnknown_81071E0
|
|
||||||
_0808170C: .4byte gDungeon
|
|
||||||
_08081710: .4byte 0x00018208
|
|
||||||
_08081714: .4byte 0x00018209
|
|
||||||
_08081718: .4byte 0x0001820a
|
|
||||||
_0808171C: .4byte 0x0001820b
|
|
||||||
_08081720: .4byte 0x0001820c
|
|
||||||
_08081724: .4byte 0x0001820d
|
|
||||||
_08081728: .4byte 0x0001820e
|
|
||||||
_0808172C: .4byte 0x0001820f
|
|
||||||
_08081730: .4byte 0x00018210
|
|
||||||
_08081734: .4byte 0x00018211
|
|
||||||
_08081738: .4byte 0x00018213
|
|
||||||
thumb_func_end sub_808165C
|
|
||||||
|
|
||||||
thumb_func_start sub_808173C
|
|
||||||
sub_808173C:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
ldr r4, _08081778
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _0808177C
|
|
||||||
adds r0, r1
|
|
||||||
movs r2, 0
|
|
||||||
ldrsh r1, [r0, r2]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083048
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081780
|
|
||||||
adds r0, r1
|
|
||||||
movs r2, 0
|
|
||||||
ldrsh r1, [r0, r2]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083048
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, _08081784
|
|
||||||
adds r0, r1
|
|
||||||
movs r2, 0
|
|
||||||
ldrsh r1, [r0, r2]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083048
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_08081778: .4byte gDungeon
|
|
||||||
_0808177C: .4byte 0x0001ced6
|
|
||||||
_08081780: .4byte 0x0001ced8
|
|
||||||
_08081784: .4byte 0x0001ceda
|
|
||||||
thumb_func_end sub_808173C
|
|
||||||
|
|
||||||
thumb_func_start sub_8081788
|
|
||||||
sub_8081788:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r4, r0, 0
|
|
||||||
adds r5, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
adds r1, r5, 0x1
|
|
||||||
adds r0, r4, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
adds r5, 0x2
|
|
||||||
adds r0, r4, 0
|
|
||||||
adds r1, r5, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081788
|
|
||||||
|
|
||||||
thumb_func_start sub_80817B0
|
|
||||||
sub_80817B0:
|
|
||||||
push {lr}
|
|
||||||
sub sp, 0x4
|
|
||||||
mov r2, sp
|
|
||||||
strb r1, [r2]
|
|
||||||
mov r1, sp
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
add sp, 0x4
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_80817B0
|
|
||||||
|
|
||||||
thumb_func_start sub_80817C8
|
|
||||||
sub_80817C8:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
adds r1, r4, 0x2
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
adds r1, r4, 0
|
|
||||||
adds r1, 0x14
|
|
||||||
adds r0, r5, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
adds r4, 0x16
|
|
||||||
adds r0, r5, 0
|
|
||||||
adds r1, r4, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_80817C8
|
|
||||||
|
|
||||||
thumb_func_start sub_80817F4
|
|
||||||
sub_80817F4:
|
|
||||||
push {lr}
|
|
||||||
sub sp, 0x4
|
|
||||||
mov r2, sp
|
|
||||||
strh r1, [r2]
|
|
||||||
mov r1, sp
|
|
||||||
movs r2, 0x2
|
|
||||||
bl sub_8082FA8
|
|
||||||
add sp, 0x4
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_80817F4
|
|
||||||
|
|
||||||
thumb_func_start sub_808180C
|
|
||||||
sub_808180C:
|
|
||||||
push {lr}
|
|
||||||
sub sp, 0x4
|
|
||||||
mov r2, sp
|
|
||||||
strb r1, [r2]
|
|
||||||
mov r1, sp
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
add sp, 0x4
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_808180C
|
|
||||||
|
|
||||||
thumb_func_start sub_8081824
|
|
||||||
sub_8081824:
|
|
||||||
push {lr}
|
|
||||||
sub sp, 0x4
|
|
||||||
mov r2, sp
|
|
||||||
strb r1, [r2]
|
|
||||||
mov r1, sp
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
add sp, 0x4
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081824
|
|
||||||
|
|
||||||
thumb_func_start sub_808183C
|
|
||||||
sub_808183C:
|
|
||||||
push {lr}
|
|
||||||
sub sp, 0x4
|
|
||||||
mov r2, sp
|
|
||||||
strb r1, [r2]
|
|
||||||
mov r1, sp
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
add sp, 0x4
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_808183C
|
|
||||||
|
|
||||||
thumb_func_start sub_8081854
|
|
||||||
sub_8081854:
|
|
||||||
push {lr}
|
|
||||||
sub sp, 0x4
|
|
||||||
mov r2, sp
|
|
||||||
strb r1, [r2]
|
|
||||||
mov r1, sp
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
add sp, 0x4
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081854
|
|
||||||
|
|
||||||
thumb_func_start sub_808186C
|
|
||||||
sub_808186C:
|
|
||||||
push {lr}
|
|
||||||
sub sp, 0x4
|
|
||||||
str r1, [sp]
|
|
||||||
mov r1, sp
|
|
||||||
movs r2, 0x4
|
|
||||||
bl sub_8082FA8
|
|
||||||
add sp, 0x4
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_808186C
|
|
||||||
|
|
||||||
thumb_func_start sub_8081880
|
|
||||||
sub_8081880:
|
|
||||||
push {lr}
|
|
||||||
sub sp, 0x4
|
|
||||||
mov r2, sp
|
|
||||||
strb r1, [r2]
|
|
||||||
mov r1, sp
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
add sp, 0x4
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081880
|
|
||||||
|
|
||||||
thumb_func_start sub_8081898
|
|
||||||
sub_8081898:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r0, 0
|
|
||||||
ldrsh r1, [r4, r0]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083048
|
|
||||||
ldrb r1, [r4, 0x2]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_808180C
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081898
|
|
||||||
|
|
||||||
thumb_func_start sub_80818B8
|
|
||||||
sub_80818B8:
|
|
||||||
push {lr}
|
|
||||||
lsls r1, 24
|
|
||||||
lsrs r1, 24
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_80818B8
|
|
||||||
|
|
||||||
thumb_func_start sub_80818C8
|
|
||||||
sub_80818C8:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
ldrb r1, [r4]
|
|
||||||
bl sub_8083060
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_80818C8
|
|
||||||
|
|
||||||
thumb_func_start sub_80818E4
|
|
||||||
sub_80818E4:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldrb r1, [r4, 0x2]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldrb r1, [r4, 0x3]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldrh r1, [r4, 0x4]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083030
|
|
||||||
adds r4, 0x10
|
|
||||||
adds r0, r5, 0
|
|
||||||
adds r1, r4, 0
|
|
||||||
bl SavePosition
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_80818E4
|
|
||||||
|
|
||||||
thumb_func_start sub_8081920
|
|
||||||
sub_8081920:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081920
|
|
||||||
|
|
||||||
thumb_func_start sub_808193C
|
|
||||||
sub_808193C:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldrb r1, [r4, 0x2]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldrb r1, [r4, 0x3]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_808193C
|
|
||||||
|
|
||||||
thumb_func_start sub_8081968
|
|
||||||
sub_8081968:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x8]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldrb r1, [r4, 0x9]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldr r1, [r4, 0x4]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083078
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081968
|
|
||||||
|
|
||||||
thumb_func_start sub_8081994
|
|
||||||
sub_8081994:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081994
|
|
||||||
|
|
||||||
thumb_func_start sub_80819B0
|
|
||||||
sub_80819B0:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldrb r1, [r4, 0x2]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_80819B0
|
|
||||||
|
|
||||||
thumb_func_start sub_80819D4
|
|
||||||
sub_80819D4:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_80819D4
|
|
||||||
|
|
||||||
thumb_func_start sub_80819F0
|
|
||||||
sub_80819F0:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldrb r1, [r4, 0x2]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_80830B4
|
|
||||||
ldrb r1, [r4, 0x3]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldrb r1, [r4, 0x4]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_80819F0
|
|
||||||
|
|
||||||
thumb_func_start sub_8081A24
|
|
||||||
sub_8081A24:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldr r1, [r4, 0x4]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083078
|
|
||||||
ldrb r1, [r4, 0x8]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldrb r1, [r4, 0x9]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
ldrb r1, [r4, 0xA]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081A24
|
|
||||||
|
|
||||||
thumb_func_start sub_8081A58
|
|
||||||
sub_8081A58:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081A58
|
|
||||||
|
|
||||||
thumb_func_start sub_8081A74
|
|
||||||
sub_8081A74:
|
|
||||||
push {lr}
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081A74
|
|
||||||
|
|
||||||
thumb_func_start sub_8081A80
|
|
||||||
sub_8081A80:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081A80
|
|
||||||
|
|
||||||
thumb_func_start sub_8081A9C
|
|
||||||
sub_8081A9C:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081A9C
|
|
||||||
|
|
||||||
thumb_func_start sub_8081AB8
|
|
||||||
sub_8081AB8:
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r4, r1, 0
|
|
||||||
movs r2, 0x1
|
|
||||||
bl sub_8082FA8
|
|
||||||
ldrb r1, [r4, 0x1]
|
|
||||||
adds r0, r5, 0
|
|
||||||
bl sub_8083060
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8081AB8
|
|
||||||
|
|
||||||
thumb_func_start sub_8081AD4
|
thumb_func_start sub_8081AD4
|
||||||
sub_8081AD4:
|
sub_8081AD4:
|
||||||
push {r4,r5,lr}
|
push {r4,r5,lr}
|
||||||
@ -2762,6 +1962,8 @@ _08082BB8: .4byte gDungeon
|
|||||||
_08082BBC: .4byte 0x000135cc
|
_08082BBC: .4byte 0x000135cc
|
||||||
thumb_func_end sub_8082B40
|
thumb_func_end sub_8082B40
|
||||||
|
|
||||||
|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
|
||||||
thumb_func_start sub_8082BC0
|
thumb_func_start sub_8082BC0
|
||||||
sub_8082BC0:
|
sub_8082BC0:
|
||||||
push {lr}
|
push {lr}
|
||||||
|
188
data/data.s
188
data/data.s
@ -1941,191 +1941,3 @@ gUnknown_80B88CC: @ 80B88CC
|
|||||||
@ code_8009804.s
|
@ code_8009804.s
|
||||||
.string "pksdir0\0"
|
.string "pksdir0\0"
|
||||||
|
|
||||||
@ file_system
|
|
||||||
.string "pksdir0\0"
|
|
||||||
|
|
||||||
.global gFastMod3Lookup
|
|
||||||
gFastMod3Lookup: @ 80B88E4
|
|
||||||
x = 0
|
|
||||||
.rept 0x100
|
|
||||||
.byte x % 3
|
|
||||||
x = x + 1
|
|
||||||
.endr
|
|
||||||
|
|
||||||
.global gFastDiv3Lookup
|
|
||||||
gFastDiv3Lookup: @ 80B89E4
|
|
||||||
x = 0
|
|
||||||
.rept 0x100
|
|
||||||
.byte x / 3
|
|
||||||
x = x + 1
|
|
||||||
.endr
|
|
||||||
|
|
||||||
@ gFastSinLookup[i] = floor(256 * sin(iπ / 2048))
|
|
||||||
.global gFastSinLookup
|
|
||||||
gFastSinLookup: @ 80B8AE4
|
|
||||||
.2byte 0, 0, 0, 1, 1, 1, 2, 2
|
|
||||||
.2byte 3, 3, 3, 4, 4, 5, 5, 5
|
|
||||||
.2byte 6, 6, 7, 7, 7, 8, 8, 9
|
|
||||||
.2byte 9, 9, 10, 10, 10, 11, 11, 12
|
|
||||||
.2byte 12, 12, 13, 13, 14, 14, 14, 15
|
|
||||||
.2byte 15, 16, 16, 16, 17, 17, 18, 18
|
|
||||||
.2byte 18, 19, 19, 20, 20, 20, 21, 21
|
|
||||||
.2byte 21, 22, 22, 23, 23, 23, 24, 24
|
|
||||||
.2byte 25, 25, 25, 26, 26, 27, 27, 27
|
|
||||||
.2byte 28, 28, 28, 29, 29, 30, 30, 30
|
|
||||||
.2byte 31, 31, 32, 32, 32, 33, 33, 34
|
|
||||||
.2byte 34, 34, 35, 35, 36, 36, 36, 37
|
|
||||||
.2byte 37, 37, 38, 38, 39, 39, 39, 40
|
|
||||||
.2byte 40, 41, 41, 41, 42, 42, 42, 43
|
|
||||||
.2byte 43, 44, 44, 44, 45, 45, 46, 46
|
|
||||||
.2byte 46, 47, 47, 48, 48, 48, 49, 49
|
|
||||||
.2byte 49, 50, 50, 51, 51, 51, 52, 52
|
|
||||||
.2byte 53, 53, 53, 54, 54, 54, 55, 55
|
|
||||||
.2byte 56, 56, 56, 57, 57, 58, 58, 58
|
|
||||||
.2byte 59, 59, 59, 60, 60, 61, 61, 61
|
|
||||||
.2byte 62, 62, 62, 63, 63, 64, 64, 64
|
|
||||||
.2byte 65, 65, 66, 66, 66, 67, 67, 67
|
|
||||||
.2byte 68, 68, 69, 69, 69, 70, 70, 70
|
|
||||||
.2byte 71, 71, 72, 72, 72, 73, 73, 73
|
|
||||||
.2byte 74, 74, 75, 75, 75, 76, 76, 76
|
|
||||||
.2byte 77, 77, 78, 78, 78, 79, 79, 79
|
|
||||||
.2byte 80, 80, 81, 81, 81, 82, 82, 82
|
|
||||||
.2byte 83, 83, 84, 84, 84, 85, 85, 85
|
|
||||||
.2byte 86, 86, 86, 87, 87, 88, 88, 88
|
|
||||||
.2byte 89, 89, 89, 90, 90, 91, 91, 91
|
|
||||||
.2byte 92, 92, 92, 93, 93, 93, 94, 94
|
|
||||||
.2byte 95, 95, 95, 96, 96, 96, 97, 97
|
|
||||||
.2byte 97, 98, 98, 99, 99, 99, 100, 100
|
|
||||||
.2byte 100, 101, 101, 101, 102, 102, 103, 103
|
|
||||||
.2byte 103, 104, 104, 104, 105, 105, 105, 106
|
|
||||||
.2byte 106, 106, 107, 107, 108, 108, 108, 109
|
|
||||||
.2byte 109, 109, 110, 110, 110, 111, 111, 111
|
|
||||||
.2byte 112, 112, 112, 113, 113, 114, 114, 114
|
|
||||||
.2byte 115, 115, 115, 116, 116, 116, 117, 117
|
|
||||||
.2byte 117, 118, 118, 118, 119, 119, 119, 120
|
|
||||||
.2byte 120, 121, 121, 121, 122, 122, 122, 123
|
|
||||||
.2byte 123, 123, 124, 124, 124, 125, 125, 125
|
|
||||||
.2byte 126, 126, 126, 127, 127, 127, 128, 128
|
|
||||||
.2byte 128, 129, 129, 129, 130, 130, 130, 131
|
|
||||||
.2byte 131, 131, 132, 132, 132, 133, 133, 133
|
|
||||||
.2byte 134, 134, 134, 135, 135, 135, 136, 136
|
|
||||||
.2byte 136, 137, 137, 137, 138, 138, 138, 139
|
|
||||||
.2byte 139, 139, 140, 140, 140, 141, 141, 141
|
|
||||||
.2byte 142, 142, 142, 143, 143, 143, 144, 144
|
|
||||||
.2byte 144, 145, 145, 145, 146, 146, 146, 147
|
|
||||||
.2byte 147, 147, 148, 148, 148, 149, 149, 149
|
|
||||||
.2byte 149, 150, 150, 150, 151, 151, 151, 152
|
|
||||||
.2byte 152, 152, 153, 153, 153, 154, 154, 154
|
|
||||||
.2byte 155, 155, 155, 155, 156, 156, 156, 157
|
|
||||||
.2byte 157, 157, 158, 158, 158, 159, 159, 159
|
|
||||||
.2byte 159, 160, 160, 160, 161, 161, 161, 162
|
|
||||||
.2byte 162, 162, 163, 163, 163, 163, 164, 164
|
|
||||||
.2byte 164, 165, 165, 165, 166, 166, 166, 166
|
|
||||||
.2byte 167, 167, 167, 168, 168, 168, 168, 169
|
|
||||||
.2byte 169, 169, 170, 170, 170, 171, 171, 171
|
|
||||||
.2byte 171, 172, 172, 172, 173, 173, 173, 173
|
|
||||||
.2byte 174, 174, 174, 175, 175, 175, 175, 176
|
|
||||||
.2byte 176, 176, 177, 177, 177, 177, 178, 178
|
|
||||||
.2byte 178, 179, 179, 179, 179, 180, 180, 180
|
|
||||||
.2byte 181, 181, 181, 181, 182, 182, 182, 182
|
|
||||||
.2byte 183, 183, 183, 184, 184, 184, 184, 185
|
|
||||||
.2byte 185, 185, 185, 186, 186, 186, 187, 187
|
|
||||||
.2byte 187, 187, 188, 188, 188, 188, 189, 189
|
|
||||||
.2byte 189, 189, 190, 190, 190, 190, 191, 191
|
|
||||||
.2byte 191, 192, 192, 192, 192, 193, 193, 193
|
|
||||||
.2byte 193, 194, 194, 194, 194, 195, 195, 195
|
|
||||||
.2byte 195, 196, 196, 196, 196, 197, 197, 197
|
|
||||||
.2byte 197, 198, 198, 198, 198, 199, 199, 199
|
|
||||||
.2byte 199, 200, 200, 200, 200, 201, 201, 201
|
|
||||||
.2byte 201, 202, 202, 202, 202, 203, 203, 203
|
|
||||||
.2byte 203, 203, 204, 204, 204, 204, 205, 205
|
|
||||||
.2byte 205, 205, 206, 206, 206, 206, 207, 207
|
|
||||||
.2byte 207, 207, 207, 208, 208, 208, 208, 209
|
|
||||||
.2byte 209, 209, 209, 209, 210, 210, 210, 210
|
|
||||||
.2byte 211, 211, 211, 211, 211, 212, 212, 212
|
|
||||||
.2byte 212, 213, 213, 213, 213, 213, 214, 214
|
|
||||||
.2byte 214, 214, 215, 215, 215, 215, 215, 216
|
|
||||||
.2byte 216, 216, 216, 216, 217, 217, 217, 217
|
|
||||||
.2byte 217, 218, 218, 218, 218, 218, 219, 219
|
|
||||||
.2byte 219, 219, 219, 220, 220, 220, 220, 220
|
|
||||||
.2byte 221, 221, 221, 221, 221, 222, 222, 222
|
|
||||||
.2byte 222, 222, 223, 223, 223, 223, 223, 224
|
|
||||||
.2byte 224, 224, 224, 224, 225, 225, 225, 225
|
|
||||||
.2byte 225, 225, 226, 226, 226, 226, 226, 227
|
|
||||||
.2byte 227, 227, 227, 227, 227, 228, 228, 228
|
|
||||||
.2byte 228, 228, 229, 229, 229, 229, 229, 229
|
|
||||||
.2byte 230, 230, 230, 230, 230, 230, 231, 231
|
|
||||||
.2byte 231, 231, 231, 231, 232, 232, 232, 232
|
|
||||||
.2byte 232, 232, 233, 233, 233, 233, 233, 233
|
|
||||||
.2byte 234, 234, 234, 234, 234, 234, 234, 235
|
|
||||||
.2byte 235, 235, 235, 235, 235, 236, 236, 236
|
|
||||||
.2byte 236, 236, 236, 236, 237, 237, 237, 237
|
|
||||||
.2byte 237, 237, 237, 238, 238, 238, 238, 238
|
|
||||||
.2byte 238, 238, 239, 239, 239, 239, 239, 239
|
|
||||||
.2byte 239, 240, 240, 240, 240, 240, 240, 240
|
|
||||||
.2byte 241, 241, 241, 241, 241, 241, 241, 241
|
|
||||||
.2byte 242, 242, 242, 242, 242, 242, 242, 242
|
|
||||||
.2byte 243, 243, 243, 243, 243, 243, 243, 243
|
|
||||||
.2byte 244, 244, 244, 244, 244, 244, 244, 244
|
|
||||||
.2byte 244, 245, 245, 245, 245, 245, 245, 245
|
|
||||||
.2byte 245, 245, 246, 246, 246, 246, 246, 246
|
|
||||||
.2byte 246, 246, 246, 247, 247, 247, 247, 247
|
|
||||||
.2byte 247, 247, 247, 247, 247, 248, 248, 248
|
|
||||||
.2byte 248, 248, 248, 248, 248, 248, 248, 248
|
|
||||||
.2byte 249, 249, 249, 249, 249, 249, 249, 249
|
|
||||||
.2byte 249, 249, 249, 250, 250, 250, 250, 250
|
|
||||||
.2byte 250, 250, 250, 250, 250, 250, 250, 251
|
|
||||||
.2byte 251, 251, 251, 251, 251, 251, 251, 251
|
|
||||||
.2byte 251, 251, 251, 251, 251, 252, 252, 252
|
|
||||||
.2byte 252, 252, 252, 252, 252, 252, 252, 252
|
|
||||||
.2byte 252, 252, 252, 252, 252, 253, 253, 253
|
|
||||||
.2byte 253, 253, 253, 253, 253, 253, 253, 253
|
|
||||||
.2byte 253, 253, 253, 253, 253, 253, 253, 254
|
|
||||||
.2byte 254, 254, 254, 254, 254, 254, 254, 254
|
|
||||||
.2byte 254, 254, 254, 254, 254, 254, 254, 254
|
|
||||||
.2byte 254, 254, 254, 254, 254, 254, 254, 255
|
|
||||||
.2byte 255, 255, 255, 255, 255, 255, 255, 255
|
|
||||||
.2byte 255, 255, 255, 255, 255, 255, 255, 255
|
|
||||||
.2byte 255, 255, 255, 255, 255, 255, 255, 255
|
|
||||||
.2byte 255, 255, 255, 255, 255, 255, 255, 255
|
|
||||||
.2byte 255, 255, 255, 255, 255, 255, 255, 255
|
|
||||||
.2byte 255, 255, 255, 255, 255, 255, 255, 255
|
|
||||||
.2byte 255, 255, 255, 255, 255, 255, 255, 255
|
|
||||||
|
|
||||||
@ Need to figure out what function this actually is.
|
|
||||||
.global gFastUnknownFn1Lookup
|
|
||||||
gFastUnknownFn1Lookup: @ 80B92E4
|
|
||||||
.4byte 0, 0, 0, 0, 0, 0, 0, 1
|
|
||||||
.4byte 1, 1, 1, 1, 1, 2, 2, 2
|
|
||||||
.4byte 2, 2, 2, 3, 3, 3, 3, 3
|
|
||||||
.4byte 3, 3, 4, 4, 4, 4, 4, 4
|
|
||||||
.4byte 5, 5, 5, 5, 5, 5, 6, 6
|
|
||||||
.4byte 6, 6, 6, 6, 6, 7, 7, 7
|
|
||||||
.4byte 7, 7, 7, 8, 8, 8, 8, 8
|
|
||||||
.4byte 8, 8, 9, 9, 9, 9, 9, 9
|
|
||||||
.4byte 9, 10, 10, 10, 10, 10, 10, 11
|
|
||||||
.4byte 11, 11, 11, 11, 11, 11, 12, 12
|
|
||||||
.4byte 12, 12, 12, 12, 12, 13, 13, 13
|
|
||||||
.4byte 13, 13, 13, 13, 14, 14, 14, 14
|
|
||||||
.4byte 14, 14, 14, 15, 15, 15, 15, 15
|
|
||||||
.4byte 15, 15, 15, 16, 16, 16, 16, 16
|
|
||||||
.4byte 16, 16, 17, 17, 17, 17, 17, 17
|
|
||||||
.4byte 17, 17, 18, 18, 18, 18, 18, 18
|
|
||||||
.4byte 18, 19, 19, 19, 19, 19, 19, 19
|
|
||||||
.4byte 19, 20, 20, 20, 20, 20, 20, 20
|
|
||||||
.4byte 20, 20, 21, 21, 21, 21, 21, 21
|
|
||||||
.4byte 21, 21, 22, 22, 22, 22, 22, 22
|
|
||||||
.4byte 22, 22, 22, 23, 23, 23, 23, 23
|
|
||||||
.4byte 23, 23, 23, 23, 24, 24, 24, 24
|
|
||||||
.4byte 24, 24, 24, 24, 24, 25, 25, 25
|
|
||||||
.4byte 25, 25, 25, 25, 25, 25, 26, 26
|
|
||||||
.4byte 26, 26, 26, 26, 26, 26, 26, 26
|
|
||||||
.4byte 27, 27, 27, 27, 27, 27, 27, 27
|
|
||||||
.4byte 27, 27, 27, 28, 28, 28, 28, 28
|
|
||||||
.4byte 28, 28, 28, 28, 28, 29, 29, 29
|
|
||||||
.4byte 29, 29, 29, 29, 29, 29, 29, 29
|
|
||||||
.4byte 29, 30, 30, 30, 30, 30, 30, 30
|
|
||||||
.4byte 30, 30, 30, 30, 31, 31, 31, 31
|
|
||||||
.4byte 31, 31, 31, 31, 31, 31, 31, 31
|
|
||||||
|
|
||||||
@ END file_system
|
|
||||||
|
@ -1,98 +1,7 @@
|
|||||||
.section .rodata
|
.section .rodata
|
||||||
|
|
||||||
@ START menu_input
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global UnkData_80D47C4
|
|
||||||
UnkData_80D47C4:
|
|
||||||
.byte 0x01, 0x00, 0x10, 0x00
|
|
||||||
|
|
||||||
.global gUnknown_80D47C8
|
|
||||||
gUnknown_80D47C8: @ 80D47C8
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x06, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x02, 0x00, 0x02, 0x00
|
|
||||||
.byte 0x1a, 0x00, 0x0c, 0x00
|
|
||||||
.byte 0x0c, 0x00, 0x00, 0x00
|
|
||||||
.4byte UnkData_80D47C4
|
|
||||||
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x03, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x03, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x03, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
|
|
||||||
.global gUnknown_80D4828
|
|
||||||
gUnknown_80D4828: @ 80D4828
|
|
||||||
.string "{COLOR_1}%c%s\0"
|
|
||||||
.align 2,0
|
|
||||||
|
|
||||||
.global gUnknown_80D4830
|
|
||||||
gUnknown_80D4830: @ 80D4830
|
|
||||||
.4byte 1
|
|
||||||
.4byte 10
|
|
||||||
.4byte 100
|
|
||||||
.4byte 1000
|
|
||||||
.4byte 10000
|
|
||||||
.4byte 100000
|
|
||||||
.4byte 1000000
|
|
||||||
.4byte 10000000
|
|
||||||
.4byte 100000000
|
|
||||||
|
|
||||||
@ END menu_input
|
|
||||||
|
|
||||||
@ START code_80130A8
|
@ START code_80130A8
|
||||||
.asciz "pksdir0"
|
|
||||||
|
|
||||||
.global gUnknown_80D485C
|
|
||||||
gUnknown_80D485C: @ 80D485C
|
|
||||||
.4byte Yes_80D4878
|
|
||||||
.byte 0x01, 0x00, 0x00, 0x00
|
|
||||||
.4byte No_80D4874
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.4byte -1
|
|
||||||
|
|
||||||
.global No_80D4874
|
|
||||||
No_80D4874:
|
|
||||||
.string "No\0"
|
|
||||||
.align 2,0
|
|
||||||
.global Yes_80D4878
|
|
||||||
Yes_80D4878:
|
|
||||||
.string "*Yes\0"
|
|
||||||
.align 2,0
|
|
||||||
|
|
||||||
.global gUnknown_80D4880
|
|
||||||
gUnknown_80D4880: @ 80D4880
|
|
||||||
.4byte Yes_80D489C
|
|
||||||
.byte 0x01, 0x00, 0x00, 0x00
|
|
||||||
.4byte No_80D4898
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00
|
|
||||||
.byte 0x00, 0x00, 0x00, 0x00 @ End of table
|
|
||||||
.4byte -1
|
|
||||||
|
|
||||||
.global No_80D4898
|
|
||||||
No_80D4898:
|
|
||||||
.string "*No\0"
|
|
||||||
.global Yes_80D489C
|
|
||||||
Yes_80D489C:
|
|
||||||
.string "Yes\0"
|
|
||||||
.align 2,0
|
|
||||||
|
|
||||||
.global gUnknown_80D48A0
|
.global gUnknown_80D48A0
|
||||||
gUnknown_80D48A0: @ 80D48A0
|
gUnknown_80D48A0: @ 80D48A0
|
||||||
|
@ -58,7 +58,7 @@ gUnknown_80F59C8: @ 80F59C8
|
|||||||
.byte 0x47, 0x00, 0x00, 0x00
|
.byte 0x47, 0x00, 0x00, 0x00
|
||||||
.4byte sub_8058580
|
.4byte sub_8058580
|
||||||
.byte 0x48, 0x00, 0x00, 0x00
|
.byte 0x48, 0x00, 0x00, 0x00
|
||||||
.4byte sub_80585CC
|
.4byte BrickBreakMoveAction
|
||||||
.byte 0x49, 0x00, 0x00, 0x00
|
.byte 0x49, 0x00, 0x00, 0x00
|
||||||
.4byte sub_8058638
|
.4byte sub_8058638
|
||||||
.byte 0x4c, 0x00, 0x00, 0x00
|
.byte 0x4c, 0x00, 0x00, 0x00
|
||||||
@ -188,7 +188,7 @@ gUnknown_80F59C8: @ 80F59C8
|
|||||||
.byte 0x23, 0x01, 0x00, 0x00
|
.byte 0x23, 0x01, 0x00, 0x00
|
||||||
.4byte sub_805B17C
|
.4byte sub_805B17C
|
||||||
.byte 0x26, 0x01, 0x00, 0x00
|
.byte 0x26, 0x01, 0x00, 0x00
|
||||||
.4byte sub_805B214
|
.4byte WrapMoveAction
|
||||||
.byte 0x28, 0x01, 0x00, 0x00
|
.byte 0x28, 0x01, 0x00, 0x00
|
||||||
.4byte sub_805B264
|
.4byte sub_805B264
|
||||||
.byte 0x35, 0x01, 0x00, 0x00
|
.byte 0x35, 0x01, 0x00, 0x00
|
||||||
|
@ -1621,274 +1621,3 @@ gUnknown_8109930: @ 8109930
|
|||||||
@ ???
|
@ ???
|
||||||
.string "pksdir0\0"
|
.string "pksdir0\0"
|
||||||
.align 2,0
|
.align 2,0
|
||||||
@ game_options.c
|
|
||||||
.string "pksdir0\0"
|
|
||||||
.align 2,0
|
|
||||||
|
|
||||||
.global gWindowBGColors
|
|
||||||
gWindowBGColors: @ 8109954
|
|
||||||
.byte 0x20, 0x48, 0x68, 0x00
|
|
||||||
.byte 0x80, 0x38, 0x20, 0x00
|
|
||||||
.byte 0x28, 0x80, 0x48, 0x00
|
|
||||||
.byte 0x28, 0x80, 0x48, 0x00
|
|
||||||
@ ???
|
|
||||||
.string "pksdir0\0"
|
|
||||||
.align 2,0
|
|
||||||
@ ???
|
|
||||||
.string "pksdir0\0"
|
|
||||||
.align 2,0
|
|
||||||
@ ???
|
|
||||||
.string "pksdir0\0"
|
|
||||||
.align 2,0
|
|
||||||
@ ???
|
|
||||||
.string "pksdir0\0"
|
|
||||||
.align 2,0
|
|
||||||
|
|
||||||
.global gUnknown_8109984
|
|
||||||
gUnknown_8109984: @ 8109984
|
|
||||||
.byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x00
|
|
||||||
@ ???
|
|
||||||
.string "pksdir0\0"
|
|
||||||
.align 2,0
|
|
||||||
|
|
||||||
.global gStoryMissionText
|
|
||||||
gStoryMissionText: @ 8109994
|
|
||||||
@ replacing .incbin "baserom.gba", 0x109994, 0x314
|
|
||||||
.4byte gUnknown_8109C94
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C80
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C70
|
|
||||||
.byte 0x00, 0x01, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C60
|
|
||||||
.byte 0x02, 0x03, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C4C
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C3C
|
|
||||||
.byte 0x04, 0x05, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C30
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C24
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C24
|
|
||||||
.byte 0x06, 0x07, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C24
|
|
||||||
.byte 0x08, 0x09, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C14
|
|
||||||
.byte 0xff, 0x0a, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C00
|
|
||||||
.byte 0x0b, 0x0c, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109BE8
|
|
||||||
.byte 0x0e, 0x0f, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109BC8
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109BB4
|
|
||||||
.byte 0x10, 0x11, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109BA0
|
|
||||||
.byte 0xff, 0x21, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109B8C
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109B78
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109B60
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C30
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109B4C
|
|
||||||
.byte 0x14, 0x15, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109B38
|
|
||||||
.byte 0x16, 0x17, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109B24
|
|
||||||
.byte 0x18, 0x19, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109B10
|
|
||||||
.byte 0xff, 0x1a, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109AF8
|
|
||||||
.byte 0x12, 0x13, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109AE8
|
|
||||||
.byte 0x1b, 0x1c, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109AD8
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109AC4
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109AB0
|
|
||||||
.byte 0xff, 0x20, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109C14
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00
|
|
||||||
.4byte gUnknown_8109A94
|
|
||||||
.byte 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00
|
|
||||||
|
|
||||||
.global gUnknown_8109A94
|
|
||||||
gUnknown_8109A94: @ 8109A94
|
|
||||||
.string "Break Gardevoir{APOSTROPHE}s curse.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109AB0
|
|
||||||
gUnknown_8109AB0: @ 8109AB0
|
|
||||||
.string "Rescue Medicham.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109AC4
|
|
||||||
gUnknown_8109AC4: @ 8109AC4
|
|
||||||
.string "Investigate Relic.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109AD8
|
|
||||||
gUnknown_8109AD8: @ 8109AD8
|
|
||||||
.string "Rescue Latias.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109AE8
|
|
||||||
gUnknown_8109AE8: @ 8109AE8
|
|
||||||
.string "Catch thief.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109AF8
|
|
||||||
gUnknown_8109AF8: @ 8109AF8
|
|
||||||
.string "Meet toughest Pokémon.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109B10
|
|
||||||
gUnknown_8109B10: @ 8109B10
|
|
||||||
.string "Mirage Pokémon 4\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109B24
|
|
||||||
gUnknown_8109B24: @ 8109B24
|
|
||||||
.string "Mirage Pokémon 3\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109B38
|
|
||||||
gUnknown_8109B38: @ 8109B38
|
|
||||||
.string "Mirage Pokémon 2\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109B4C
|
|
||||||
gUnknown_8109B4C: @ 8109B4C
|
|
||||||
.string "Mirage Pokémon 1\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109B60
|
|
||||||
gUnknown_8109B60: @ 8109B60
|
|
||||||
.string "Check mystery Pokémon.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109B78
|
|
||||||
gUnknown_8109B78: @ 8109B78
|
|
||||||
.string "Meet sea guardian.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109B8C
|
|
||||||
gUnknown_8109B8C: @ 8109B8C
|
|
||||||
.string "Explore seafloor.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109BA0
|
|
||||||
gUnknown_8109BA0: @ 8109BA0
|
|
||||||
.string "Rescue Smeargle.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109BB4
|
|
||||||
gUnknown_8109BB4: @ 8109BB4
|
|
||||||
.string "Punish bad Mankey.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109BC8
|
|
||||||
gUnknown_8109BC8: @ 8109BC8
|
|
||||||
.string "{COLOR_1 YELLOW_3}Scenario Progress Dummy{END_COLOR_TEXT_1}\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109BE8
|
|
||||||
gUnknown_8109BE8: @ 8109BE8
|
|
||||||
.string "Seek Rayquaza{APOSTROPHE}s help.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109C00
|
|
||||||
gUnknown_8109C00: @ 8109C00
|
|
||||||
.string "Rescue Alakazam.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109C14
|
|
||||||
gUnknown_8109C14: @ 8109C14
|
|
||||||
.string "Meet Ninetales.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109C24
|
|
||||||
gUnknown_8109C24: @ 8109C24
|
|
||||||
.string "Fugitive\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109C30
|
|
||||||
gUnknown_8109C30: @ 8109C30
|
|
||||||
.string "Meet Xatu.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109C3C
|
|
||||||
gUnknown_8109C3C: @ 8109C3C
|
|
||||||
.string "Rescue Shiftry.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109C4C
|
|
||||||
gUnknown_8109C4C: @ 8109C4C
|
|
||||||
.string "Rescue Jumpluff.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109C60
|
|
||||||
gUnknown_8109C60: @ 8109C60
|
|
||||||
.string "Rescue Metapod.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109C70
|
|
||||||
gUnknown_8109C70: @ 8109C70
|
|
||||||
.string "Rescue Diglett.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109C80
|
|
||||||
gUnknown_8109C80: @ 8109C80
|
|
||||||
.string "Rescue Magnemite.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gUnknown_8109C94
|
|
||||||
gUnknown_8109C94: @ 8109C94
|
|
||||||
.string "Rescue Caterpie.\0"
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
.global gDummyScenarioText
|
|
||||||
gDummyScenarioText: @ 8109CA8
|
|
||||||
.string "{COLOR_1 YELLOW_3}Scenario try dummy{END_COLOR_TEXT_1}\0"
|
|
||||||
.align 2,0
|
|
||||||
|
|
||||||
.global gUnknown_8109CC0
|
|
||||||
gUnknown_8109CC0: @ 8109CC0
|
|
||||||
.string "{COLOR_1 RED_2}???{END_COLOR_TEXT_1}\0"
|
|
||||||
.align 2,0
|
|
||||||
@ code_80972F4.c
|
|
||||||
.string "pksdir0\0"
|
|
||||||
|
|
||||||
.global gMeetNinetalesText
|
|
||||||
gMeetNinetalesText: @ 8109CD4
|
|
||||||
.string "Meet Ninetales.\0"
|
|
||||||
.align 2,0
|
|
||||||
|
|
||||||
.global gAvoidCaptureText
|
|
||||||
gAvoidCaptureText: @ 8109CE4
|
|
||||||
.string "Avoid capture.\0"
|
|
||||||
.align 2,0
|
|
||||||
|
|
||||||
.global gFinalScenarioText
|
|
||||||
gFinalScenarioText: @ 8109CF4
|
|
||||||
@ replacing .incbin "baserom.gba", 0x109CF4, 0x3C
|
|
||||||
.string "Defeat the final Pokémon.\0"
|
|
||||||
.align 2, 0
|
|
||||||
@ ???
|
|
||||||
.string "pksdir0\0"
|
|
||||||
@ ???
|
|
||||||
.string "pksdir0\0"
|
|
||||||
@ ???
|
|
||||||
.string "pksdir0\0"
|
|
||||||
@ ???.c
|
|
||||||
.string "pksdir0\0"
|
|
||||||
@ 8109D30
|
|
||||||
#include "dungeon/dungeon_data.inc"
|
|
||||||
|
|
||||||
.align 2,0
|
|
||||||
|
|
||||||
|
23
data/data_8109964.s
Normal file
23
data/data_8109964.s
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
.section .rodata
|
||||||
|
|
||||||
|
@ ???
|
||||||
|
.string "pksdir0\0"
|
||||||
|
.align 2,0
|
||||||
|
@ ???
|
||||||
|
.string "pksdir0\0"
|
||||||
|
.align 2,0
|
||||||
|
@ ???
|
||||||
|
.string "pksdir0\0"
|
||||||
|
.align 2,0
|
||||||
|
@ ???
|
||||||
|
.string "pksdir0\0"
|
||||||
|
.align 2,0
|
||||||
|
|
||||||
|
.global gUnknown_8109984
|
||||||
|
gUnknown_8109984: @ 8109984
|
||||||
|
.byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x00
|
||||||
|
|
||||||
|
@ ???
|
||||||
|
.string "pksdir0\0"
|
||||||
|
.align 2,0
|
||||||
|
|
15
data/data_8109D10.s
Normal file
15
data/data_8109D10.s
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
.section .rodata
|
||||||
|
|
||||||
|
@ ???
|
||||||
|
.string "pksdir0\0"
|
||||||
|
@ ???
|
||||||
|
.string "pksdir0\0"
|
||||||
|
@ ???
|
||||||
|
.string "pksdir0\0"
|
||||||
|
@ ???.c
|
||||||
|
.string "pksdir0\0"
|
||||||
|
@ 8109D30
|
||||||
|
#include "dungeon/dungeon_data.inc"
|
||||||
|
|
||||||
|
.align 2,0
|
||||||
|
|
@ -6,7 +6,7 @@
|
|||||||
// size: 0x8
|
// size: 0x8
|
||||||
typedef struct MissionText
|
typedef struct MissionText
|
||||||
{
|
{
|
||||||
/* 0x0 */ u8 *text;
|
/* 0x0 */ const u8 *text;
|
||||||
u8 unk4;
|
u8 unk4;
|
||||||
u8 unk5;
|
u8 unk5;
|
||||||
u8 unk6;
|
u8 unk6;
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
|
|
||||||
#define TOTAL_OBJ_TILE_COUNT 1024
|
#define TOTAL_OBJ_TILE_COUNT 1024
|
||||||
|
|
||||||
|
#define RGB_U32(r, g, b) ((r) | ((g) << 8) | ((b) << 16)) // 32 bit RGB color
|
||||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||||
|
|
||||||
#define RGB_BLACK RGB(0, 0, 0)
|
#define RGB_BLACK RGB(0, 0, 0)
|
||||||
|
@ -5,52 +5,52 @@
|
|||||||
#include "structs/dungeon_entity.h"
|
#include "structs/dungeon_entity.h"
|
||||||
|
|
||||||
bool8 sub_805B668(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 sub_805B668(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805B734(Entity *pokemon, Entity *target);
|
bool8 sub_805B734(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 RecycleMoveAction(Entity *pokemon, Entity *target);
|
bool8 RecycleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 ReflectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 ReflectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805B808(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 sub_805B808(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805B884(Entity *pokemon, Entity *target);
|
bool8 sub_805B884(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 SkullBashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 SkullBashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805B910(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 sub_805B910(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805B968(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 sub_805B968(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BA44(Entity *pokemon, Entity *target);
|
bool8 sub_805BA44(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BA50(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 sub_805BA50(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BB64(Entity *pokemon, Entity *target);
|
bool8 sub_805BB64(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BB74(Entity *pokemon, Entity *target);
|
bool8 sub_805BB74(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BB98(Entity *pokemon, Entity *target);
|
bool8 sub_805BB98(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 CleanseOrbAction(Entity *pokemon,Entity *target);
|
bool8 CleanseOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BC70(Entity *pokemon, Entity *target);
|
bool8 sub_805BC70(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BC98(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 sub_805BC98(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 SilenceOrbAction(Entity *pokemon,Entity *target);
|
bool8 SilenceOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
|
||||||
bool8 ScannerOrbAction(Entity *pokemon, Entity *target);
|
bool8 ScannerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 RadarOrbAction(Entity *pokemon, Entity *target);
|
bool8 RadarOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 TransferOrbAction(Entity *pokemon,Entity *target);
|
bool8 TransferOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BE90(Entity *pokemon, Entity *target);
|
bool8 sub_805BE90(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 LuminousOrbAction(Entity *pokemon,Entity *target);
|
bool8 LuminousOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
|
||||||
bool8 PetrifyOrbAction(Entity *pokemon, Entity *target);
|
bool8 PetrifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BEB8(Entity *pokemon, Entity *target);
|
bool8 sub_805BEB8(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BEC8(Entity *pokemon, Entity *target);
|
bool8 sub_805BEC8(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 EscapeOrbAction(Entity *pokemon,Entity *target);
|
bool8 EscapeOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805BF34(Entity *pokemon, Entity *target);
|
bool8 sub_805BF34(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 TrapbustOrbAction(Entity *pokemon,Entity *target);
|
bool8 TrapbustOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805C080(Entity *pokemon, Entity *target);
|
bool8 sub_805C080(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805C128(Entity *pokemon, Entity *target);
|
bool8 sub_805C128(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805C138(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 sub_805C138(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 IdentifyOrbAction(Entity *pokemon, Entity *target);
|
bool8 IdentifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805C1BC(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
bool8 sub_805C1BC(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805C1E4(Entity *pokemon, Entity *target);
|
bool8 sub_805C1E4(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 ShockerOrbAction(Entity *pokemon, Entity *target);
|
bool8 ShockerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 param_4);
|
bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 param_4);
|
||||||
bool8 sub_805C288(Entity *pokemon, Entity *target);
|
bool8 sub_805C288(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805C2A0(Entity *pokemon, Entity *target);
|
bool8 sub_805C2A0(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 FillInOrbAction(Entity *pokemon,Entity *target);
|
bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805C3DC(Entity *pokemon, Entity *target);
|
bool8 sub_805C3DC(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805C3F8(Entity *pokemon, Entity *target);
|
bool8 sub_805C3F8(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 sub_805C45C(Entity *pokemon, Entity *target);
|
bool8 sub_805C45C(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 MobileOrbAction(Entity *pokemon, Entity *target);
|
bool8 MobileOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 StairsOrbAction(Entity *pokemon, Entity *target);
|
bool8 StairsOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 LongtossOrbAction(Entity *pokemon, Entity *target);
|
bool8 LongtossOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
bool8 PierceOrbAction(Entity *pokemon, Entity *target);
|
bool8 PierceOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -41,6 +41,121 @@ typedef struct ActionContainer
|
|||||||
/* 0x14 */ Position itemTargetPosition;
|
/* 0x14 */ Position itemTargetPosition;
|
||||||
} ActionContainer;
|
} ActionContainer;
|
||||||
|
|
||||||
|
typedef struct HiddenPower
|
||||||
|
{
|
||||||
|
/* 0x0 */ s16 hiddenPowerBasePower;
|
||||||
|
/* 0x2 */ u8 hiddenPowerType;
|
||||||
|
} HiddenPower;
|
||||||
|
|
||||||
|
typedef struct JoinedAt
|
||||||
|
{
|
||||||
|
/* 0x0 */ u8 joinedAt;
|
||||||
|
/* 0x1 */ u8 unk1;
|
||||||
|
} JoinedAt;
|
||||||
|
|
||||||
|
typedef struct AITarget
|
||||||
|
{
|
||||||
|
/* 0x0 */ u8 aiObjective;
|
||||||
|
/* 0x1 */ bool8 aiNotNextToTarget;
|
||||||
|
/* 0x2 */ bool8 aiTargetingEnemy;
|
||||||
|
/* 0x3 */ bool8 aiTurningAround;
|
||||||
|
/* 0x4 */ u16 aiTargetSpawnGenID;
|
||||||
|
/* 0x8 */ struct Entity *aiTarget;
|
||||||
|
/* 0xC */ u8 fillC[4];
|
||||||
|
/* 0x10 */ Position aiTargetPos;
|
||||||
|
|
||||||
|
} AITarget;
|
||||||
|
|
||||||
|
typedef struct Sleep
|
||||||
|
{
|
||||||
|
/* 0x0 */ u8 sleep;
|
||||||
|
/* 0x1 */ u8 sleepTurns;
|
||||||
|
} Sleep;
|
||||||
|
|
||||||
|
typedef struct NonVolatile
|
||||||
|
{
|
||||||
|
/* 0x0 */ u8 nonVolatileStatus;
|
||||||
|
/* 0x1 */ u8 nonVolatileStatusTurns;
|
||||||
|
/* 0x2 */ u8 nonVolatileStatusDamageCountdown;
|
||||||
|
/* 0x3 */ u8 unk4;
|
||||||
|
} NonVolatile;
|
||||||
|
|
||||||
|
typedef struct Immobilize
|
||||||
|
{
|
||||||
|
/* 0x0 */ u8 immobilizeStatus;
|
||||||
|
/* 0x4 */ s32 unk4;
|
||||||
|
/* 0x8 */ u8 immobilizeStatusTurns;
|
||||||
|
/* 0x9 */ u8 immobilizeStatusDamageCountdown;
|
||||||
|
} Immobilize;
|
||||||
|
|
||||||
|
typedef struct Volatile
|
||||||
|
{
|
||||||
|
/* 0x0 */ u8 volatileStatus;
|
||||||
|
/* 0x1 */ u8 volatileStatusTurns;
|
||||||
|
} Volatile;
|
||||||
|
|
||||||
|
typedef struct Charging
|
||||||
|
{
|
||||||
|
/* 0x0 */ u8 chargingStatus;
|
||||||
|
/* 0x1 */ u8 chargingStatusTurns;
|
||||||
|
/* 0x2 */ u8 chargingStatusMoveIndex; // The position of the move in the Pokémon's moveset that triggered the status.
|
||||||
|
} Charging;
|
||||||
|
|
||||||
|
typedef struct Protection
|
||||||
|
{
|
||||||
|
/* 0x0 */ u8 protectionStatus;
|
||||||
|
/* 0x1 */ u8 protectionStatusTurns;
|
||||||
|
} Protection;
|
||||||
|
|
||||||
|
typedef struct Waiting
|
||||||
|
{
|
||||||
|
/* 0xC8 */ u8 waitingStatus;
|
||||||
|
/* 0xC9 */ bool8 enemyDecoy; // True if the Pokémon is a decoy and a wild Pokémon (i.e., not an allied Pokémon).
|
||||||
|
u8 unkCA;
|
||||||
|
/* 0xCB */ u8 waitingStatusTurns;
|
||||||
|
/* 0xCC */ u8 curseDamageCountdown;
|
||||||
|
} Waiting;
|
||||||
|
|
||||||
|
typedef struct Linked
|
||||||
|
{
|
||||||
|
/* 0xD0 */ u8 linkedStatus;
|
||||||
|
/* 0xD4 */ u32 unkD4;
|
||||||
|
/* 0xD8 */ u8 unkD8;
|
||||||
|
/* 0xD9 */ u8 linkedStatusTurns;
|
||||||
|
/* 0xDA */ u8 linkedStatusDamageCountdown;
|
||||||
|
} Linked;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct MoveStatus
|
||||||
|
{
|
||||||
|
/* 0xDC */ u8 moveStatus;
|
||||||
|
/* 0xDD */ u8 moveStatusTurns;
|
||||||
|
} MoveStatus;
|
||||||
|
|
||||||
|
typedef struct ItemStatus
|
||||||
|
{
|
||||||
|
/* 0xE0 */ u8 itemStatus;
|
||||||
|
} ItemStatus;
|
||||||
|
|
||||||
|
typedef struct TransformStatus
|
||||||
|
{
|
||||||
|
/* 0xE4 */ u8 transformStatus;
|
||||||
|
/* 0xE5 */ u8 transformStatusTurns;
|
||||||
|
} TransformStatus;
|
||||||
|
|
||||||
|
typedef struct EyesightStatus
|
||||||
|
{
|
||||||
|
/* 0xE8 */ u8 eyesightStatus;
|
||||||
|
/* 0xE9 */ u8 eyesightStatusTurns;
|
||||||
|
} EyesightStatus;
|
||||||
|
|
||||||
|
typedef struct Muzzled
|
||||||
|
{
|
||||||
|
/* 0xEC */ bool8 muzzled;
|
||||||
|
/* 0xED */ u8 muzzledTurns;
|
||||||
|
} Muzzled;
|
||||||
|
|
||||||
|
|
||||||
// size: 0x208
|
// size: 0x208
|
||||||
typedef struct EntityInfo
|
typedef struct EntityInfo
|
||||||
{
|
{
|
||||||
@ -82,24 +197,15 @@ typedef struct EntityInfo
|
|||||||
/* 0x2C */ s32 offensiveMultipliers[2];
|
/* 0x2C */ s32 offensiveMultipliers[2];
|
||||||
// Index 0 is Defense. Index 1 is Special Defense.
|
// Index 0 is Defense. Index 1 is Special Defense.
|
||||||
/* 0x34 */ s32 defensiveMultipliers[2];
|
/* 0x34 */ s32 defensiveMultipliers[2];
|
||||||
/* 0x3C */ s16 hiddenPowerBasePower;
|
/* 0x3C */ HiddenPower hiddenPower;
|
||||||
/* 0x3E */ u8 hiddenPowerType;
|
/* 0x40 */ JoinedAt joinedAt; // Uses the dungeon index in dungeon.h.
|
||||||
u8 fill3F;
|
|
||||||
/* 0x40 */ u8 joinedAt; // Uses the dungeon index in dungeon.h.
|
|
||||||
/* 0x44 */ ActionContainer action;
|
/* 0x44 */ ActionContainer action;
|
||||||
/* 0x5C */ u8 types[2];
|
/* 0x5C */ u8 types[2];
|
||||||
/* 0x5E */ u8 abilities[2];
|
/* 0x5E */ u8 abilities[2];
|
||||||
/* 0x60 */ Item heldItem;
|
/* 0x60 */ Item heldItem;
|
||||||
u8 fill64[0x68 - 0x64];
|
u8 fill64[0x68 - 0x64];
|
||||||
/* 0x68 */ Position prevPos[NUM_PREV_POS];
|
/* 0x68 */ Position prevPos[NUM_PREV_POS];
|
||||||
/* 0x78 */ u8 aiObjective;
|
/* 0x78 */ AITarget aiTarget;
|
||||||
/* 0x79 */ bool8 aiNotNextToTarget;
|
|
||||||
/* 0x7A */ bool8 aiTargetingEnemy;
|
|
||||||
/* 0x7B */ bool8 aiTurningAround;
|
|
||||||
/* 0x7C */ u16 aiTargetSpawnGenID;
|
|
||||||
/* 0x80 */ struct Entity *aiTarget;
|
|
||||||
u8 fill84[0x88 - 0x84];
|
|
||||||
/* 0x88 */ Position aiTargetPos;
|
|
||||||
// Bitwise flags corresponding to selected IQ skills.
|
// Bitwise flags corresponding to selected IQ skills.
|
||||||
/* 0x8C */ u8 IQSkillMenuFlags[4]; // IQ skills selected in the IQ skills menu.
|
/* 0x8C */ u8 IQSkillMenuFlags[4]; // IQ skills selected in the IQ skills menu.
|
||||||
/* 0x90 */ u8 IQSkillFlags[4];
|
/* 0x90 */ u8 IQSkillFlags[4];
|
||||||
@ -112,57 +218,19 @@ typedef struct EntityInfo
|
|||||||
u8 fillA5[0xA8 - 0xA5];
|
u8 fillA5[0xA8 - 0xA5];
|
||||||
// Statuses are split into groups based on which ones can't overlap.
|
// Statuses are split into groups based on which ones can't overlap.
|
||||||
// See status.h for which statuses are in each group.
|
// See status.h for which statuses are in each group.
|
||||||
/* 0xA8 */ u8 sleep;
|
/* 0xA8 */ Sleep sleep;
|
||||||
/* 0xA9 */ u8 sleepTurns;
|
/* 0xAC */ NonVolatile nonVolatile;
|
||||||
u8 fillAA[0xAC - 0xAA];
|
/* 0xB0 */ Immobilize immobilize;
|
||||||
/* 0xAC */ u8 nonVolatileStatus;
|
/* 0xBC */ Volatile volatileStatus;
|
||||||
/* 0xAD */ u8 nonVolatileStatusTurns;
|
/* 0xC0 */ Charging charging;
|
||||||
/* 0xAE */ u8 nonVolatileStatusDamageCountdown;
|
/* 0xC4 */ Protection protection;
|
||||||
u8 fillAF;
|
/* 0xC8 */ Waiting waitingStruct;
|
||||||
/* 0xB0 */ u8 immobilizeStatus;
|
/* 0xD0 */ Linked linked;
|
||||||
u8 fillB1[0xB4 - 0xB1];
|
/* 0xDC */ MoveStatus moveStatus;
|
||||||
/* 0xB4 */ s32 unkB4;
|
/* 0xE0 */ ItemStatus itemStatus;
|
||||||
/* 0xB8 */ u8 immobilizeStatusTurns;
|
/* 0xE4 */ TransformStatus transformStatus;
|
||||||
/* 0xB9 */ u8 immobilizeStatusDamageCountdown;
|
/* 0xE8 */ EyesightStatus eyesightStatus;
|
||||||
u8 fillBA[0xBC - 0xBA];
|
/* 0xEC */ Muzzled muzzled;
|
||||||
/* 0xBC */ u8 volatileStatus;
|
|
||||||
/* 0xBD */ u8 volatileStatusTurns;
|
|
||||||
u8 fillBE[0xC0 - 0xBE];
|
|
||||||
/* 0xC0 */ u8 chargingStatus;
|
|
||||||
/* 0xC1 */ u8 chargingStatusTurns;
|
|
||||||
/* 0xC2 */ u8 chargingStatusMoveIndex; // The position of the move in the Pokémon's moveset that triggered the status.
|
|
||||||
u8 fillC3;
|
|
||||||
/* 0xC4 */ u8 protectionStatus;
|
|
||||||
/* 0xC5 */ u8 protectionStatusTurns;
|
|
||||||
u8 fillC6[0xC8 - 0xC6];
|
|
||||||
/* 0xC8 */ u8 waitingStatus;
|
|
||||||
/* 0xC9 */ bool8 enemyDecoy; // True if the Pokémon is a decoy and a wild Pokémon (i.e., not an allied Pokémon).
|
|
||||||
u8 fillCA;
|
|
||||||
/* 0xCB */ u8 waitingStatusTurns;
|
|
||||||
/* 0xCC */ u8 curseDamageCountdown;
|
|
||||||
u8 fillCD[0xD0 - 0xCD];
|
|
||||||
/* 0xD0 */ u8 linkedStatus;
|
|
||||||
u8 fillD1[0xD4 - 0xD1];
|
|
||||||
/* 0xD4 */ u32 unkD4;
|
|
||||||
/* 0xD8 */ u8 unkD8;
|
|
||||||
/* 0xD9 */ u8 linkedStatusTurns;
|
|
||||||
/* 0xDA */ u8 linkedStatusDamageCountdown;
|
|
||||||
u8 fillDB;
|
|
||||||
/* 0xDC */ u8 moveStatus;
|
|
||||||
/* 0xDD */ u8 moveStatusTurns;
|
|
||||||
u8 fillDE[0xE0 - 0xDE];
|
|
||||||
/* 0xE0 */ u8 itemStatus;
|
|
||||||
u8 fillE1[0xE4 - 0xE1];
|
|
||||||
/* 0xE4 */ u8 transformStatus;
|
|
||||||
/* 0xE5 */ u8 transformStatusTurns;
|
|
||||||
u8 fillE6[0xE8 - 0xE6];
|
|
||||||
/* 0xE8 */ u8 eyesightStatus;
|
|
||||||
/* 0xE9 */ u8 eyesightStatusTurns;
|
|
||||||
/* 0xEA */ u8 unkEA;
|
|
||||||
u8 fillEB;
|
|
||||||
/* 0xEC */ bool8 muzzled;
|
|
||||||
/* 0xED */ u8 muzzledTurns;
|
|
||||||
u8 fillEE[0xF0 - 0xEE];
|
|
||||||
/* 0xF0 */ bool8 powerEars;
|
/* 0xF0 */ bool8 powerEars;
|
||||||
/* 0xF1 */ bool8 scanning;
|
/* 0xF1 */ bool8 scanning;
|
||||||
/* 0xF2 */ bool8 stairSpotter;
|
/* 0xF2 */ bool8 stairSpotter;
|
||||||
|
@ -126,7 +126,11 @@ typedef struct Dungeon
|
|||||||
s16 unk686;
|
s16 unk686;
|
||||||
s16 unk688;
|
s16 unk688;
|
||||||
/* 0x68A */ u8 unk68A;
|
/* 0x68A */ u8 unk68A;
|
||||||
u8 fill68B[0x699 - 0x68B];
|
u8 fill68B;
|
||||||
|
s32 unk68C;
|
||||||
|
s32 unk690;
|
||||||
|
s32 unk694;
|
||||||
|
u8 fill698;
|
||||||
u8 unk699;
|
u8 unk699;
|
||||||
u8 fill69A[0x69C - 0x69A];
|
u8 fill69A[0x69C - 0x69A];
|
||||||
/* 0x69C */ EntityInfo unk69C[4];
|
/* 0x69C */ EntityInfo unk69C[4];
|
||||||
@ -146,22 +150,25 @@ typedef struct Dungeon
|
|||||||
/* 0x3904 */ s16 unk3904;
|
/* 0x3904 */ s16 unk3904;
|
||||||
u8 fill3906[0x3A08 - 0x3906];
|
u8 fill3906[0x3A08 - 0x3906];
|
||||||
/* 0x3A08 */ u8 unk3A08;
|
/* 0x3A08 */ u8 unk3A08;
|
||||||
u8 fill3A09[0x3A0C - 0x3A09];
|
/* 0x3A09 */ u8 unk3A09;
|
||||||
|
/* 0x3A0A */ u8 unk3A0A;
|
||||||
|
/* 0x3A0B */ u8 unk3A0B;
|
||||||
u8 unk3A0C;
|
u8 unk3A0C;
|
||||||
/* 0x3A0D */ u8 unk3A0D;
|
/* 0x3A0D */ u8 unk3A0D;
|
||||||
/* 0x3A0E */ s16 tileset;
|
/* 0x3A0E */ s16 tileset;
|
||||||
/* 0x3A10 */ u16 unk3A10;
|
/* 0x3A10 */ s16 unk3A10;
|
||||||
u8 fill3A10[0x3A14 - 0x3A12];
|
/* 0x3A12 */ s16 unk3A12;
|
||||||
/* 0x3A14 */ s16 bossBattleIndex;
|
/* 0x3A14 */ s16 bossBattleIndex;
|
||||||
|
/* 0x3A16 */ s16 unk3A16;
|
||||||
/* 0x3A18 */ Tile tiles[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X];
|
/* 0x3A18 */ Tile tiles[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X];
|
||||||
u8 fillE218[0xE21C - 0xE218];
|
Position unkE218;
|
||||||
u16 unkE21C;
|
Position unkE21C;
|
||||||
u16 unkE21E;
|
Position unkE220[8];
|
||||||
Position unkE220[4];
|
u32 unkE240;
|
||||||
u8 unkE230[0xE23C - 0xE230];
|
u8 fillE244[0xE250 - 0xE244];
|
||||||
s16 unkE23C; // x coord of some kind
|
u32 unkE250;
|
||||||
s16 unkE23E; // y coord of some kind
|
u8 fillE254[0xE260 - 0xE254];
|
||||||
u8 fillE240[0xE264 - 0xE240];
|
u32 unkE260;
|
||||||
/* 0xE264 */ u8 weather; // Uses the weather constants in weather.h.
|
/* 0xE264 */ u8 weather; // Uses the weather constants in weather.h.
|
||||||
u8 unkE265; // Uses the weather constants in weather.h
|
u8 unkE265; // Uses the weather constants in weather.h
|
||||||
/* 0xE266 */ u8 weatherDamageCounter; // Timer for applying sandstorm/hail damage periodically.
|
/* 0xE266 */ u8 weatherDamageCounter; // Timer for applying sandstorm/hail damage periodically.
|
||||||
@ -177,7 +184,8 @@ typedef struct Dungeon
|
|||||||
/* 0xE279 */ bool8 nullifyWeather; // Air Lock and Cloud Nine toggle this to disable weather effects
|
/* 0xE279 */ bool8 nullifyWeather; // Air Lock and Cloud Nine toggle this to disable weather effects
|
||||||
u8 fillE27A[0xE27C - 0xE27A];
|
u8 fillE27A[0xE27C - 0xE27A];
|
||||||
/* 0xE27C */ Tile unkE27C[8][8];
|
/* 0xE27C */ Tile unkE27C[8][8];
|
||||||
/* 0xE87C */ u8 fillE87C[68];
|
/* 0xE87C */ u8 unkE87C[8][8];
|
||||||
|
u32 fillE8BC;
|
||||||
/* 0xE8C0 */ Tile *tilePointers[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X];
|
/* 0xE8C0 */ Tile *tilePointers[DUNGEON_MAX_SIZE_Y][DUNGEON_MAX_SIZE_X];
|
||||||
u8 unk104C0;
|
u8 unk104C0;
|
||||||
/* 0x104C4 */ RoomData roomData[MAX_ROOM_COUNT];
|
/* 0x104C4 */ RoomData roomData[MAX_ROOM_COUNT];
|
||||||
@ -229,7 +237,10 @@ typedef struct Dungeon
|
|||||||
u8 unk1820E;
|
u8 unk1820E;
|
||||||
u8 unk1820F;
|
u8 unk1820F;
|
||||||
/* 0x18210 */ bool8 hallucinating; // Displays Substitute and flower sprites when the player has the Cross-Eyed status.
|
/* 0x18210 */ bool8 hallucinating; // Displays Substitute and flower sprites when the player has the Cross-Eyed status.
|
||||||
u8 fill18211[0x18217 - 0x18211];
|
u8 unk18211;
|
||||||
|
u8 unk18212;
|
||||||
|
u8 unk18213;
|
||||||
|
u8 fill18214[3];
|
||||||
u8 unk18217;
|
u8 unk18217;
|
||||||
u8 fill18218[0x1821A - 0x18218];
|
u8 fill18218[0x1821A - 0x18218];
|
||||||
u8 unk1821A;
|
u8 unk1821A;
|
||||||
|
@ -69,7 +69,7 @@ SECTIONS {
|
|||||||
src/code_8009804.o(.text);
|
src/code_8009804.o(.text);
|
||||||
asm/code_8009804.o(.text);
|
asm/code_8009804.o(.text);
|
||||||
src/math.o(.text);
|
src/math.o(.text);
|
||||||
asm/file_system.o(.text);
|
asm/math.o(.text);
|
||||||
src/file_system.o(.text);
|
src/file_system.o(.text);
|
||||||
src/decompress.o(.text);
|
src/decompress.o(.text);
|
||||||
src/main.o(.text);
|
src/main.o(.text);
|
||||||
@ -322,6 +322,7 @@ SECTIONS {
|
|||||||
src/code_80958E8_1.o(.text);
|
src/code_80958E8_1.o(.text);
|
||||||
asm/code_8096AF8.o(.text);
|
asm/code_8096AF8.o(.text);
|
||||||
src/code_80972F4.o(.text);
|
src/code_80972F4.o(.text);
|
||||||
|
src/code_8097504.o(.text);
|
||||||
src/code_8097670.o(.text);
|
src/code_8097670.o(.text);
|
||||||
asm/code_8097670.o(.text);
|
asm/code_8097670.o(.text);
|
||||||
src/code_8097DD0.o(.text);
|
src/code_8097DD0.o(.text);
|
||||||
@ -435,6 +436,7 @@ SECTIONS {
|
|||||||
src/quick_save_read.o(.rodata);
|
src/quick_save_read.o(.rodata);
|
||||||
src/quick_save_write.o(.rodata);
|
src/quick_save_write.o(.rodata);
|
||||||
src/menu_input.o(.rodata);
|
src/menu_input.o(.rodata);
|
||||||
|
src/code_80140DC.o(.rodata);
|
||||||
data/data_80D47B8.o(.rodata);
|
data/data_80D47B8.o(.rodata);
|
||||||
src/common_strings.o(.rodata);
|
src/common_strings.o(.rodata);
|
||||||
data/data_80DAF70.o(.rodata);
|
data/data_80DAF70.o(.rodata);
|
||||||
@ -545,6 +547,11 @@ SECTIONS {
|
|||||||
src/dungeon_capabilities.o(.rodata);
|
src/dungeon_capabilities.o(.rodata);
|
||||||
src/dungeon_ai_targeting.o(.rodata);
|
src/dungeon_ai_targeting.o(.rodata);
|
||||||
data/data_8107010.o(.rodata);
|
data/data_8107010.o(.rodata);
|
||||||
|
src/game_options.o(.rodata);
|
||||||
|
data/data_8109964.o(.rodata);
|
||||||
|
src/code_80972F4.o(.rodata);
|
||||||
|
src/code_8097504.o(.rodata);
|
||||||
|
data/data_8109D10.o(.rodata);
|
||||||
src/pokemon_3.o(.rodata);
|
src/pokemon_3.o(.rodata);
|
||||||
src/items.o(.rodata);
|
src/items.o(.rodata);
|
||||||
src/code_8048480.o(.rodata);
|
src/code_8048480.o(.rodata);
|
||||||
|
@ -76,7 +76,7 @@ bool8 MoveMatchesChargingStatus(Entity *pokemon, Move *move)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (move->id == gMultiTurnChargeMoves[i].moveID &&
|
if (move->id == gMultiTurnChargeMoves[i].moveID &&
|
||||||
pokemonInfo->chargingStatus == gMultiTurnChargeMoves[i].chargingStatus)
|
pokemonInfo->charging.chargingStatus == gMultiTurnChargeMoves[i].chargingStatus)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ bool8 IsCharging(Entity *pokemon, bool8 checkCharge)
|
|||||||
{
|
{
|
||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
u8 *chargingStatusPointer = &pokemonInfo->chargingStatus;
|
u8 *chargingStatusPointer = &pokemonInfo->charging.chargingStatus;
|
||||||
u8 *chargingStatusPointer2;
|
u8 *chargingStatusPointer2;
|
||||||
u8 chargeStatus = STATUS_CHARGING;
|
u8 chargeStatus = STATUS_CHARGING;
|
||||||
for (; i < 100; i++)
|
for (; i < 100; i++)
|
||||||
@ -107,7 +107,7 @@ bool8 IsCharging(Entity *pokemon, bool8 checkCharge)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
chargingStatus = *chargingStatusPointer;
|
chargingStatus = *chargingStatusPointer;
|
||||||
chargingStatusPointer2 = &pokemonInfo->chargingStatus;
|
chargingStatusPointer2 = &pokemonInfo->charging.chargingStatus;
|
||||||
if (chargingStatus == currentStatus)
|
if (chargingStatus == currentStatus)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
#include "constants/input.h"
|
#include "constants/input.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#include "globaldata.h"
|
||||||
#include "menu_input.h"
|
#include "menu_input.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
#include "code_80118A4.h"
|
#include "code_80118A4.h"
|
||||||
#include "code_80130A8.h"
|
#include "code_80130A8.h"
|
||||||
|
|
||||||
extern s32 gUnknown_202E744;
|
|
||||||
extern s32 gUnknown_202E738;
|
extern s32 gUnknown_202E738;
|
||||||
extern s32 gUnknown_202E73C;
|
extern s32 gUnknown_202E73C;
|
||||||
extern s32 gUnknown_202E740;
|
extern s32 gUnknown_202E740;
|
||||||
|
extern s32 gUnknown_202E744;
|
||||||
|
|
||||||
extern MenuItem gUnknown_80D485C[];
|
#include "data/code_80140DC.h"
|
||||||
extern MenuItem gUnknown_80D4880[];
|
|
||||||
|
|
||||||
|
// TODO: move to menu_input
|
||||||
extern UnkTextStruct2 gUnknown_80D47C8[4];
|
extern UnkTextStruct2 gUnknown_80D47C8[4];
|
||||||
|
|
||||||
void sub_80140B4(UnkTextStruct2 *a0)
|
void sub_80140B4(UnkTextStruct2 *a0)
|
||||||
|
@ -204,27 +204,27 @@ void EntityUpdateStatusSprites(Entity *entity)
|
|||||||
|
|
||||||
if (entityInfo->id == 0xb9) {
|
if (entityInfo->id == 0xb9) {
|
||||||
// NOTE: clean this up sometime
|
// NOTE: clean this up sometime
|
||||||
temp = entityInfo->sleepTurns;
|
temp = entityInfo->sleep.sleepTurns;
|
||||||
flag = 0x7f;
|
flag = 0x7f;
|
||||||
temp ^= flag;
|
temp ^= flag;
|
||||||
flag = (temp) != 0;
|
flag = (temp) != 0;
|
||||||
}
|
}
|
||||||
if (flag) {
|
if (flag) {
|
||||||
spriteStatus = gStatusSpriteMasks_SleepStatus[entityInfo->sleep];
|
spriteStatus = gStatusSpriteMasks_SleepStatus[entityInfo->sleep.sleep];
|
||||||
}
|
}
|
||||||
spriteStatus = spriteStatus |
|
spriteStatus = spriteStatus |
|
||||||
gStatusSpriteMasks_NonVolatileStatus[entityInfo->nonVolatileStatus] |
|
gStatusSpriteMasks_NonVolatileStatus[entityInfo->nonVolatile.nonVolatileStatus] |
|
||||||
gStatusSpriteMasks_ImmobilizeStatus[entityInfo->immobilizeStatus] |
|
gStatusSpriteMasks_ImmobilizeStatus[entityInfo->immobilize.immobilizeStatus] |
|
||||||
gStatusSpriteMasks_VolatileStatus[entityInfo->volatileStatus] |
|
gStatusSpriteMasks_VolatileStatus[entityInfo->volatileStatus.volatileStatus] |
|
||||||
gStatusSpriteMasks_ChargingStatus[entityInfo->chargingStatus] |
|
gStatusSpriteMasks_ChargingStatus[entityInfo->charging.chargingStatus] |
|
||||||
gStatusSpriteMasks_ProtectionStatus[entityInfo->protectionStatus] |
|
gStatusSpriteMasks_ProtectionStatus[entityInfo->protection.protectionStatus] |
|
||||||
gStatusSpriteMasks_WaitingStatus[entityInfo->waitingStatus] |
|
gStatusSpriteMasks_WaitingStatus[entityInfo->waitingStruct.waitingStatus] |
|
||||||
gStatusSpriteMasks_LinkedStatus[entityInfo->linkedStatus] |
|
gStatusSpriteMasks_LinkedStatus[entityInfo->linked.linkedStatus] |
|
||||||
gStatusSpriteMasks_MoveStatus[entityInfo->moveStatus] |
|
gStatusSpriteMasks_MoveStatus[entityInfo->moveStatus.moveStatus] |
|
||||||
gStatusSpriteMasks_ItemStatus[entityInfo->itemStatus] |
|
gStatusSpriteMasks_ItemStatus[entityInfo->itemStatus.itemStatus] |
|
||||||
gStatusSpriteMasks_TransformStatus[entityInfo->transformStatus] |
|
gStatusSpriteMasks_TransformStatus[entityInfo->transformStatus.transformStatus] |
|
||||||
gStatusSpriteMasks_EyesightStatus[entityInfo->eyesightStatus] |
|
gStatusSpriteMasks_EyesightStatus[entityInfo->eyesightStatus.eyesightStatus] |
|
||||||
gStatusSpriteMasks_MuzzledStatus[entityInfo->muzzled];
|
gStatusSpriteMasks_MuzzledStatus[entityInfo->muzzled.muzzled];
|
||||||
|
|
||||||
if (entityInfo->grudge) {
|
if (entityInfo->grudge) {
|
||||||
spriteStatus = spriteStatus | STATUS_SPRITE_GRUDGE;
|
spriteStatus = spriteStatus | STATUS_SPRITE_GRUDGE;
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
#include "constants/type.h"
|
#include "constants/type.h"
|
||||||
#include "dungeon_action.h"
|
#include "dungeon_action.h"
|
||||||
#include "structs/dungeon_entity.h"
|
#include "structs/dungeon_entity.h"
|
||||||
|
#include "dungeon_items.h"
|
||||||
|
#include "dungeon_music.h"
|
||||||
#include "dungeon_util.h"
|
#include "dungeon_util.h"
|
||||||
#include "structs/str_dungeon.h"
|
#include "structs/str_dungeon.h"
|
||||||
#include "move_effects_target.h"
|
#include "move_effects_target.h"
|
||||||
@ -16,6 +18,7 @@
|
|||||||
#include "moves.h"
|
#include "moves.h"
|
||||||
#include "code_8077274_1.h"
|
#include "code_8077274_1.h"
|
||||||
#include "code_80521D0.h"
|
#include "code_80521D0.h"
|
||||||
|
#include "code_808417C.h"
|
||||||
#include "pokemon.h"
|
#include "pokemon.h"
|
||||||
#include "structs/str_position.h"
|
#include "structs/str_position.h"
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
@ -33,14 +36,29 @@ extern s16 gUnknown_80F4FBA;
|
|||||||
extern s16 gUnknown_80F4FBC;
|
extern s16 gUnknown_80F4FBC;
|
||||||
extern s16 gUnknown_80F4FBE;
|
extern s16 gUnknown_80F4FBE;
|
||||||
extern s16 gUnknown_80F4F46; // 0xC
|
extern s16 gUnknown_80F4F46; // 0xC
|
||||||
extern s16 gUnknown_80F4FAA; // 0x1E
|
extern s16 gUnknown_80F4FA2;
|
||||||
extern s16 gUnknown_80F4FA8; // 0xF
|
|
||||||
extern s16 gUnknown_80F4FA4; // 0x14
|
extern s16 gUnknown_80F4FA4; // 0x14
|
||||||
extern s16 gUnknown_80F4FA6; // 0x2D
|
extern s16 gUnknown_80F4FA6; // 0x2D
|
||||||
|
extern s16 gUnknown_80F4FA8; // 0xF
|
||||||
|
extern s16 gUnknown_80F4FAA; // 0x1E
|
||||||
extern u32 gUnknown_8106A4C;
|
extern u32 gUnknown_8106A4C;
|
||||||
extern u32 gUnknown_8106A50;
|
extern u32 gUnknown_8106A50;
|
||||||
extern s16 gUnknown_80F4FAC;
|
extern s16 gUnknown_80F4FAC;
|
||||||
|
extern s16 gUnknown_80F503A;
|
||||||
|
extern s16 gUnknown_80F503C;
|
||||||
|
extern s16 gUnknown_80F503E;
|
||||||
|
extern s16 gUnknown_80F5040;
|
||||||
|
extern s16 gUnknown_80F5042;
|
||||||
|
extern s16 gUnknown_80F5044;
|
||||||
|
extern s16 gUnknown_80F5046;
|
||||||
|
extern s16 gUnknown_80F5048;
|
||||||
|
extern s16 gUnknown_80F4FAE;
|
||||||
|
extern s16 gUnknown_80F4FAC;
|
||||||
|
extern s16 gUnknown_80F4E74[];
|
||||||
|
|
||||||
|
extern u8 *gUnknown_80FDBB8[];
|
||||||
|
extern u8 *gUnknown_80FE458[];
|
||||||
|
extern u8 *gUnknown_80FE3E8[];
|
||||||
extern u8 *gUnknown_80FEAE8[];
|
extern u8 *gUnknown_80FEAE8[];
|
||||||
extern u8 *gUnknown_80FDBA0[];
|
extern u8 *gUnknown_80FDBA0[];
|
||||||
extern u8 *gUnknown_80FE434[];
|
extern u8 *gUnknown_80FE434[];
|
||||||
@ -84,8 +102,8 @@ extern void sub_803EAF0(u32, u32);
|
|||||||
extern void sub_8044C10(bool8);
|
extern void sub_8044C10(bool8);
|
||||||
Entity *DrawFieldGiveItemMenu(u32, u32);
|
Entity *DrawFieldGiveItemMenu(u32, u32);
|
||||||
extern void PrintFieldMessage(u32, u8 *, u32);
|
extern void PrintFieldMessage(u32, u8 *, u32);
|
||||||
extern void sub_8044E24(u32, u32, u32);
|
extern void sub_8044E24(Entity *, u32, u32);
|
||||||
extern void sub_804245C(u32, Item *);
|
extern void sub_804245C(Entity *, Item *);
|
||||||
extern u8 sub_8072938(Entity *, u16);
|
extern u8 sub_8072938(Entity *, u16);
|
||||||
extern void sub_807D148(Entity *pokemon, Entity *r1, u32 r2, Position *r3);
|
extern void sub_807D148(Entity *pokemon, Entity *r1, u32 r2, Position *r3);
|
||||||
extern void sub_8072008(Entity *pokemon, Entity *r1, u32 r2, u8 r3, u32);
|
extern void sub_8072008(Entity *pokemon, Entity *r1, u32 r2, u8 r3, u32);
|
||||||
@ -99,115 +117,489 @@ Entity *sub_80696FC(Entity *);
|
|||||||
extern void sub_80943A0(void*, s32);
|
extern void sub_80943A0(void*, s32);
|
||||||
extern void sub_803E708(u32 r0, u32 r1);
|
extern void sub_803E708(u32 r0, u32 r1);
|
||||||
extern void sub_806A7E8(EntityInfo *, s32);
|
extern void sub_806A7E8(EntityInfo *, s32);
|
||||||
|
extern u32 sub_8055640(struct Entity *, struct Entity *, struct Move *, u32, u32);
|
||||||
|
|
||||||
|
void StunSeedItemAction(Entity *, Entity *);
|
||||||
|
void MaxElixirAction(Entity *, Entity *);
|
||||||
|
void ProteinItemAction(Entity *, Entity *);
|
||||||
|
void CalciumItemAction(Entity *, Entity *);
|
||||||
|
void IronItemAction(Entity *, Entity *);
|
||||||
|
void ZincItemAction(Entity *, Entity *);
|
||||||
|
void sub_80487CC(Entity *, Entity *, u32, u32);
|
||||||
|
void GrimyFoodItemAction(Entity *, Entity *);
|
||||||
|
void HandleGummiItemAction(Entity *, Entity *, u8);
|
||||||
|
void IcePartItemAction(Entity *, Entity *, u8);
|
||||||
|
void SteelPartItemAction(Entity *, Entity *, u8);
|
||||||
|
void RockPartItemAction(Entity *, Entity *, u8);
|
||||||
|
void MusicBoxItemAction(Entity *, Entity *, u8);
|
||||||
|
void nullsub_94(Entity *, Entity *, u8);
|
||||||
|
void KeyItemAction(Entity *, Entity *, u8);
|
||||||
|
void sub_8078B5C(Entity *, Entity *, u32, u32, u32);
|
||||||
|
void sub_8048340(Entity *, Entity *, u32);
|
||||||
|
void HealSeedItemAction(Entity *, Entity *, u8);
|
||||||
|
void WishStoneItemAction(Entity *, Entity *, u8);
|
||||||
|
void OranBerryItemAction(Entity *, Entity *);
|
||||||
|
void ChestoBerryItemAction(Entity *, Entity *);
|
||||||
|
void JoySeedItemAction(Entity *, Entity *);
|
||||||
|
void GinsengItemAction(Entity *, Entity *);
|
||||||
|
void BlastSeedItemAction(Entity *, Entity *, u8);
|
||||||
|
void SitrusBerryItemAction(Entity *, Entity *);
|
||||||
|
void WarpSeedItemAction(Entity *, Entity *);
|
||||||
|
void PlainSeedItemAction(Entity *, Entity *);
|
||||||
|
void SleepSeedItemAction(Entity *, Entity *);
|
||||||
|
void TotterSeedItemAction(Entity *, Entity *);
|
||||||
|
void CheriBerryItemAction(Entity *, Entity *);
|
||||||
|
void PechaBerryItemAction(Entity *, Entity *);
|
||||||
|
void QuickSeedItemAction(Entity *, Entity *);
|
||||||
|
void HungerSeedItemAction(Entity *, Entity *);
|
||||||
|
void RawstBerryItemAction(Entity *, Entity *);
|
||||||
|
void LifeSeedItemAction(Entity *, Entity *);
|
||||||
|
void AllureSeedItemAction(Entity *, Entity *);
|
||||||
|
void EyedropSeedItemAction(Entity *, Entity *);
|
||||||
|
void BlinkerSeedItemAction(Entity *, Entity *);
|
||||||
|
void DoomSeedItemAction(Entity *, Entity *);
|
||||||
|
void sub_80482FC(Entity *, Entity *, u32, u8);
|
||||||
|
|
||||||
|
extern void sub_8071DA4(Entity *);
|
||||||
|
extern void SetShopkeeperAggression(Entity *, Entity *);
|
||||||
|
extern void sub_80464C8(Entity *, Position *, Item *);
|
||||||
|
extern void sub_806A6E8(Entity *);
|
||||||
|
extern void sub_8042390(Entity *, Item *);
|
||||||
|
|
||||||
|
bool8 sub_8047930(Entity *pokemon, Entity *target)
|
||||||
|
{
|
||||||
|
bool8 flag;
|
||||||
|
|
||||||
|
if (((target->info->shopkeeper == TRUE) ||
|
||||||
|
(target->info->clientType == 4)) || (target->info->clientType == CLIENT_TYPE_CLIENT)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(DungeonRandInt(100) < gUnknown_80F4FA2)
|
||||||
|
flag = TRUE;
|
||||||
|
else
|
||||||
|
flag = FALSE;
|
||||||
|
if (GetEntityType(pokemon) == ENTITY_MONSTER) {
|
||||||
|
if (HasHeldItem(pokemon, ITEM_WHIFF_SPECS)) {
|
||||||
|
flag = FALSE;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (HasHeldItem(pokemon, ITEM_LOCKON_SPECS)) {
|
||||||
|
flag = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((GetEntityType(target) == ENTITY_MONSTER) && (HasHeldItem(target, ITEM_DODGE_SCARF))) {
|
||||||
|
flag = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_80479B8(char param_1, char param_2, u8 param_3, Entity *pokemon, Entity *target, Item *item)
|
||||||
|
{
|
||||||
|
EntityInfo *info;
|
||||||
|
u32 flag;
|
||||||
|
u8 uStack_24;
|
||||||
|
u8 uStack_23;
|
||||||
|
u8 auStack_22;
|
||||||
|
|
||||||
|
if (param_1 != '\0') {
|
||||||
|
if (param_2 == '\0') {
|
||||||
|
flag = FALSE;
|
||||||
|
info = target->info;
|
||||||
|
if (info->isNotTeamMember) {
|
||||||
|
if ((GetItemCategory(item->id) != CATEGORY_THROWN_LINE) && (GetItemCategory(item->id) != CATEGORY_BERRIES_SEEDS_VITAMINS)) {
|
||||||
|
flag = GetItemCategory(item->id) == CATEGORY_THROWN_ARC ? FALSE : TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (GetItemCategory(item->id) != CATEGORY_BERRIES_SEEDS_VITAMINS) {
|
||||||
|
flag = IQSkillIsEnabled(target, IQ_ITEM_CATCHER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CannotUseItems(target)) {
|
||||||
|
flag = FALSE;
|
||||||
|
}
|
||||||
|
if (flag && ((info->heldItem.flags & ITEM_FLAG_EXISTS) == 0)) {
|
||||||
|
if (info->shopkeeper == TRUE) {
|
||||||
|
sub_80464C8(pokemon,&target->pos,item);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
PlaySoundEffect(0x14d);
|
||||||
|
sub_8045BF8(gUnknown_202DE58,item);
|
||||||
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
|
sub_80522F4(pokemon,target,*gUnknown_80FDBB8); // $m0 caught the $i0
|
||||||
|
info->heldItem = *item;
|
||||||
|
sub_806A6E8(target);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (param_1 != '\0') {
|
||||||
|
sub_8042390(target,item);
|
||||||
|
SetShopkeeperAggression(pokemon,target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((item->flags & ITEM_FLAG_STICKY)) {
|
||||||
|
sub_8045BF8(gUnknown_202DE58,item);
|
||||||
|
sub_80522F4(pokemon,target,*gUnknown_80FE3E8);
|
||||||
|
if (param_1 != '\0') {
|
||||||
|
sub_806F370(pokemon,target,gUnknown_80F4FAE,1,&uStack_24,0,0x217,0,0,0);
|
||||||
|
sub_8071DA4(pokemon);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else goto _jump;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (param_1 == 0)
|
||||||
|
_jump:
|
||||||
|
sub_804245C(target,item);
|
||||||
|
}
|
||||||
|
if (GetItemCategory(item->id) == CATEGORY_BERRIES_SEEDS_VITAMINS) {
|
||||||
|
sub_8078B5C(pokemon,target,5,0,0);
|
||||||
|
}
|
||||||
|
if ((GetItemCategory(item->id) == CATEGORY_TMS_HMS) || (GetItemCategory(item->id) == CATEGORY_LINK_BOX)) {
|
||||||
|
if (param_1 != '\0') {
|
||||||
|
sub_806F370(pokemon,target,gUnknown_80F4FAC,1,&uStack_23,0,0x217,0,0,0);
|
||||||
|
goto _080482B4;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sub_80522F4(pokemon,target,*gUnknown_80FE458);
|
||||||
|
goto _080482B4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switch(item->id) {
|
||||||
|
case ITEM_STICK:
|
||||||
|
sub_80482FC(pokemon,target,gUnknown_80F503A,1);
|
||||||
|
break;
|
||||||
|
case ITEM_IRON_THORN:
|
||||||
|
sub_80482FC(pokemon,target,gUnknown_80F503C,2);
|
||||||
|
break;
|
||||||
|
case ITEM_SILVER_SPIKE:
|
||||||
|
sub_80482FC(pokemon,target,gUnknown_80F503E,3);
|
||||||
|
break;
|
||||||
|
case ITEM_GOLD_FANG:
|
||||||
|
sub_80482FC(pokemon,target,gUnknown_80F5040,4);
|
||||||
|
break;
|
||||||
|
case ITEM_CACNEA_SPIKE:
|
||||||
|
sub_80482FC(pokemon,target,gUnknown_80F5042,5);
|
||||||
|
break;
|
||||||
|
case ITEM_CORSOLA_TWIG:
|
||||||
|
sub_80482FC(pokemon,target,gUnknown_80F5044,6);
|
||||||
|
break;
|
||||||
|
case ITEM_GEO_PEBBLE:
|
||||||
|
sub_8048340(pokemon,target,gUnknown_80F5048);
|
||||||
|
break;
|
||||||
|
case ITEM_GRAVELEROCK:
|
||||||
|
sub_8048340(pokemon,target,gUnknown_80F5046);
|
||||||
|
break;
|
||||||
|
case ITEM_HEAL_SEED:
|
||||||
|
HealSeedItemAction(pokemon,target,param_3);
|
||||||
|
break;
|
||||||
|
case ITEM_ORAN_BERRY:
|
||||||
|
OranBerryItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_SITRUS_BERRY:
|
||||||
|
SitrusBerryItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_LIFE_SEED:
|
||||||
|
LifeSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_BLINKER_SEED:
|
||||||
|
BlinkerSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_ALLURE_SEED:
|
||||||
|
AllureSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_QUICK_SEED:
|
||||||
|
QuickSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_EYEDROP_SEED:
|
||||||
|
EyedropSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_TOTTER_SEED:
|
||||||
|
TotterSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_CHERI_BERRY:
|
||||||
|
CheriBerryItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_PECHA_BERRY:
|
||||||
|
PechaBerryItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_WARP_SEED:
|
||||||
|
WarpSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_SLEEP_SEED:
|
||||||
|
SleepSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_CHESTO_BERRY:
|
||||||
|
ChestoBerryItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_JOY_SEED:
|
||||||
|
JoySeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_DOOM_SEED:
|
||||||
|
DoomSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_STUN_SEED:
|
||||||
|
StunSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_PLAIN_SEED:
|
||||||
|
PlainSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_RAWST_BERRY:
|
||||||
|
RawstBerryItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_HUNGER_SEED:
|
||||||
|
HungerSeedItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_GINSENG:
|
||||||
|
GinsengItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_BLAST_SEED:
|
||||||
|
BlastSeedItemAction(pokemon,target,param_1);
|
||||||
|
break;
|
||||||
|
case ITEM_MAX_ELIXIR:
|
||||||
|
MaxElixirAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_PROTEIN:
|
||||||
|
ProteinItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_CALCIUM:
|
||||||
|
CalciumItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_IRON:
|
||||||
|
IronItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_ZINC:
|
||||||
|
ZincItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case 0xe9:
|
||||||
|
nullsub_94(pokemon,target,param_1);
|
||||||
|
break;
|
||||||
|
case ITEM_BIG_APPLE:
|
||||||
|
sub_80487CC(pokemon,target,100,10);
|
||||||
|
break;
|
||||||
|
case ITEM_HUGE_APPLE:
|
||||||
|
sub_80487CC(pokemon,target,999,10);
|
||||||
|
break;
|
||||||
|
case ITEM_GRIMY_FOOD:
|
||||||
|
GrimyFoodItemAction(pokemon,target);
|
||||||
|
break;
|
||||||
|
case ITEM_WHITE_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,1);
|
||||||
|
break;
|
||||||
|
case ITEM_RED_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,2);
|
||||||
|
break;
|
||||||
|
case ITEM_BLUE_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,3);
|
||||||
|
break;
|
||||||
|
case ITEM_GRASS_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,4);
|
||||||
|
break;
|
||||||
|
case ITEM_YELLOW_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,5);
|
||||||
|
break;
|
||||||
|
case ITEM_CLEAR_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,6);
|
||||||
|
break;
|
||||||
|
case ITEM_ORANGE_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,7);
|
||||||
|
break;
|
||||||
|
case ITEM_PINK_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,8);
|
||||||
|
break;
|
||||||
|
case ITEM_BROWN_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,9);
|
||||||
|
break;
|
||||||
|
case ITEM_SKY_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,10);
|
||||||
|
break;
|
||||||
|
case ITEM_GOLD_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,0xb);
|
||||||
|
break;
|
||||||
|
case ITEM_GREEN_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,0xc);
|
||||||
|
break;
|
||||||
|
case ITEM_GRAY_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,0xd);
|
||||||
|
break;
|
||||||
|
case ITEM_PURPLE_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,0xe);
|
||||||
|
break;
|
||||||
|
case ITEM_ROYAL_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,0xf);
|
||||||
|
break;
|
||||||
|
case ITEM_BLACK_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,0x10);
|
||||||
|
break;
|
||||||
|
case ITEM_SILVER_GUMMI:
|
||||||
|
HandleGummiItemAction(pokemon,target,0x11);
|
||||||
|
break;
|
||||||
|
case ITEM_APPLE:
|
||||||
|
case ITEM_BANANA:
|
||||||
|
sub_80487CC(pokemon,target,0x32,5);
|
||||||
|
break;
|
||||||
|
case ITEM_CHESTNUT:
|
||||||
|
sub_80487CC(pokemon,target,10,0);
|
||||||
|
break;
|
||||||
|
case ITEM_KEY:
|
||||||
|
KeyItemAction(pokemon,target,param_1);
|
||||||
|
break;
|
||||||
|
case ITEM_ICE_PART:
|
||||||
|
IcePartItemAction(pokemon,target,param_1);
|
||||||
|
break;
|
||||||
|
case ITEM_ROCK_PART:
|
||||||
|
RockPartItemAction(pokemon,target,param_1);
|
||||||
|
break;
|
||||||
|
case ITEM_STEEL_PART:
|
||||||
|
SteelPartItemAction(pokemon,target,param_1);
|
||||||
|
break;
|
||||||
|
case ITEM_WISH_STONE:
|
||||||
|
WishStoneItemAction(pokemon,target,param_1);
|
||||||
|
break;
|
||||||
|
case ITEM_MUSIC_BOX:
|
||||||
|
MusicBoxItemAction(pokemon,target,param_1);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (param_1 != '\0') {
|
||||||
|
sub_806F370(pokemon,target,gUnknown_80F4FAC,1,&auStack_22,0,0x217,0,0,0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sub_80522F4(pokemon,target,*gUnknown_80FE458);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
_080482B4:
|
||||||
|
sub_8071DA4(pokemon);
|
||||||
|
}
|
||||||
|
|
||||||
|
UNUSED void nullsub_205(void) { }
|
||||||
|
|
||||||
|
void SleepSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
|
{
|
||||||
|
sub_8075C58(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_80482FC(Entity *pokemon, Entity *target, u32 pp, u8 param_4)
|
||||||
|
{
|
||||||
|
Move move;
|
||||||
|
|
||||||
|
InitPokemonMove(&move, MOVE_PROJECTILE);
|
||||||
|
move.PP = pp;
|
||||||
|
sub_8055640(pokemon, target, &move, 0x100, param_4);
|
||||||
|
}
|
||||||
|
|
||||||
void sub_8048340(Entity *pokemon, Entity *target, u32 r2)
|
void sub_8048340(Entity *pokemon, Entity *target, u32 r2)
|
||||||
{
|
{
|
||||||
sub_806F370(pokemon, target, r2, 1, 0, 0, 528, 0, 0, 0);
|
sub_806F370(pokemon, target, r2, 1, 0, 0, 528, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048364(Entity *pokemon, Entity *target, u8 r2)
|
void HealSeedItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||||
{
|
{
|
||||||
sub_8079F20(pokemon, target, 1, r2);
|
sub_8079F20(pokemon, target, 1, r2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048374(Entity *pokemon, Entity *target)
|
void OranBerryItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
HealTargetHP(pokemon, target, gUnknown_80F4FB6, gUnknown_80F4FB8, TRUE);
|
HealTargetHP(pokemon, target, gUnknown_80F4FB6, gUnknown_80F4FB8, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_804839C(Entity *pokemon, Entity *target)
|
void SitrusBerryItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
HealTargetHP(pokemon, target, gUnknown_80F4FBA, gUnknown_80F4FBC, TRUE);
|
HealTargetHP(pokemon, target, gUnknown_80F4FBA, gUnknown_80F4FBC, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80483C4(Entity *pokemon, Entity *target)
|
void MaxElixirAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
RestorePPTarget(pokemon, target, 999);
|
RestorePPTarget(pokemon, target, 999);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80483D4(Entity *pokemon, Entity *target)
|
void LifeSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
HealTargetHP(pokemon, target, 0, gUnknown_80F4FBE, TRUE);
|
HealTargetHP(pokemon, target, 0, gUnknown_80F4FBE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80483F4(Entity *pokemon, Entity *target)
|
void BlinkerSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
BlindTarget(pokemon, target);
|
BlindTarget(pokemon, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
void XEyeSeedAction(Entity *pokemon, Entity *target)
|
void AllureSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
CrossEyeVisionTarget(pokemon, target);
|
CrossEyeVisionTarget(pokemon, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_804840C(Entity *pokemon, Entity *target)
|
void QuickSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
RaiseMovementSpeedTarget(pokemon, target, 0, TRUE);
|
RaiseMovementSpeedTarget(pokemon, target, 0, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_804841C(Entity *pokemon, Entity *target)
|
void EyedropSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
RestoreVisionTarget(pokemon, target);
|
RestoreVisionTarget(pokemon, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048428(Entity *pokemon, Entity *target)
|
void CheriBerryItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
if(target->info->nonVolatileStatus == STATUS_PARALYSIS)
|
if(target->info->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS)
|
||||||
SendNonVolatileEndMessage(pokemon, target);
|
SendNonVolatileEndMessage(pokemon, target);
|
||||||
else
|
else
|
||||||
// Pointer to "But nothing happened!"
|
// Pointer to "But nothing happened!"
|
||||||
sub_80522F4(pokemon, target, *gUnknown_80F89F4);
|
sub_80522F4(pokemon, target, *gUnknown_80F89F4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048450(Entity *pokemon, Entity *target)
|
void PechaBerryItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
if((u8)(target->info->nonVolatileStatus - 2) <= 1)
|
if((u8)(target->info->nonVolatile.nonVolatileStatus - 2) <= 1)
|
||||||
SendNonVolatileEndMessage(pokemon, target);
|
SendNonVolatileEndMessage(pokemon, target);
|
||||||
else
|
else
|
||||||
// Pointer to "But nothing happened!"
|
// Pointer to "But nothing happened!"
|
||||||
sub_80522F4(pokemon, target, *gUnknown_80F89F4);
|
sub_80522F4(pokemon, target, *gUnknown_80F89F4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048480(Entity *pokemon, Entity *target)
|
void WarpSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
sub_807D148(pokemon, target, 0, NULL);
|
sub_807D148(pokemon, target, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048490(Entity *pokemon, Entity *target)
|
void ChestoBerryItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
SleeplessStatusTarget(pokemon, target);
|
SleeplessStatusTarget(pokemon, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_804849C(Entity *pokemon, Entity *target)
|
void TotterSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
ConfuseStatusTarget(pokemon, target, TRUE);
|
ConfuseStatusTarget(pokemon, target, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80484A8(Entity *pokemon, Entity *target)
|
void JoySeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
sub_8072008(pokemon, target, 1, 1, 1);
|
sub_8072008(pokemon, target, 1, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80484BC(Entity *pokemon, Entity *target)
|
void StunSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
PetrifiedStatusTarget(pokemon, target);
|
PetrifiedStatusTarget(pokemon, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80484C8(Entity *pokemon, Entity *target)
|
void PlainSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
// Pointer to "But nothing happened!"
|
// Pointer to "But nothing happened!"
|
||||||
sub_80522F4(pokemon, target, *gUnknown_80F89F4);
|
sub_80522F4(pokemon, target, *gUnknown_80F89F4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80484DC(Entity *pokemon, Entity *target)
|
void DoomSeedItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
LevelDownTarget(pokemon, target, 1);
|
LevelDownTarget(pokemon, target, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80484E8(Entity *pokemon, Entity *target)
|
void RawstBerryItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
if(target->info->nonVolatileStatus == STATUS_BURN)
|
if(target->info->nonVolatile.nonVolatileStatus == STATUS_BURN)
|
||||||
SendNonVolatileEndMessage(pokemon, target);
|
SendNonVolatileEndMessage(pokemon, target);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -217,7 +609,7 @@ void sub_80484E8(Entity *pokemon, Entity *target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048524(Entity *pokemon, Entity * target)
|
void HungerSeedItemAction(Entity *pokemon, Entity * target)
|
||||||
{
|
{
|
||||||
EntityInfo *entityInfo;
|
EntityInfo *entityInfo;
|
||||||
EntityInfo *entityInfo_1;
|
EntityInfo *entityInfo_1;
|
||||||
@ -247,7 +639,7 @@ void sub_8048524(Entity *pokemon, Entity * target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80485B0(Entity *pokemon, Entity * target)
|
void GinsengItemAction(Entity *pokemon, Entity * target)
|
||||||
{
|
{
|
||||||
bool8 isMoveBoosted;
|
bool8 isMoveBoosted;
|
||||||
s32 moveIndex;
|
s32 moveIndex;
|
||||||
@ -298,7 +690,7 @@ void sub_80485B0(Entity *pokemon, Entity * target)
|
|||||||
sub_80522F4(pokemon,target,*gUnknown_80FE40C);
|
sub_80522F4(pokemon,target,*gUnknown_80FE40C);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_804869C(Entity *pokemon, Entity * target, u8 param_3)
|
void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
|
||||||
{
|
{
|
||||||
s32 uVar1;
|
s32 uVar1;
|
||||||
EntityInfo *entityInfo;
|
EntityInfo *entityInfo;
|
||||||
@ -316,7 +708,7 @@ void sub_804869C(Entity *pokemon, Entity * target, u8 param_3)
|
|||||||
else {
|
else {
|
||||||
uVar1 = gUnknown_80F4FA4;
|
uVar1 = gUnknown_80F4FA4;
|
||||||
}
|
}
|
||||||
if (entityInfo_1->immobilizeStatus == STATUS_FROZEN) {
|
if (entityInfo_1->immobilize.immobilizeStatus == STATUS_FROZEN) {
|
||||||
SendImmobilizeEndMessage(pokemon, target);
|
SendImmobilizeEndMessage(pokemon, target);
|
||||||
}
|
}
|
||||||
sub_806F370(pokemon, target, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
sub_806F370(pokemon, target, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
||||||
@ -339,7 +731,7 @@ void sub_804869C(Entity *pokemon, Entity * target, u8 param_3)
|
|||||||
else {
|
else {
|
||||||
uVar1 = gUnknown_80F4FA6;
|
uVar1 = gUnknown_80F4FA6;
|
||||||
}
|
}
|
||||||
if (entityInfo->immobilizeStatus == STATUS_FROZEN) {
|
if (entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN) {
|
||||||
SendImmobilizeEndMessage(pokemon, entity);
|
SendImmobilizeEndMessage(pokemon, entity);
|
||||||
}
|
}
|
||||||
sub_806F370(pokemon, entity, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
sub_806F370(pokemon, entity, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0);
|
||||||
@ -354,16 +746,16 @@ void sub_80487CC(Entity *pokemon, Entity * target, u32 param_3, u32 param_4)
|
|||||||
|
|
||||||
static inline bool8 JoinLocationCannotUseItems_1(EntityInfo *pokemonInfo)
|
static inline bool8 JoinLocationCannotUseItems_1(EntityInfo *pokemonInfo)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80487E0(Entity *pokemon, Entity *target, u8 gummiIndex)
|
void HandleGummiItemAction(Entity *pokemon, Entity *target, u8 gummiIndex)
|
||||||
{
|
{
|
||||||
s32 iVar3;
|
s32 iVar3;
|
||||||
EntityInfo *targetInfo;
|
EntityInfo *targetInfo;
|
||||||
@ -413,43 +805,43 @@ void sub_80487E0(Entity *pokemon, Entity *target, u8 gummiIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_804891C(Entity *pokemon, Entity *target)
|
void ProteinItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
RaiseAtkStatTarget(pokemon, target, 3);
|
RaiseAtkStatTarget(pokemon, target, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048928(Entity *pokemon, Entity *target)
|
void CalciumItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
RaiseSpAtkStatTarget(pokemon, target, 3);
|
RaiseSpAtkStatTarget(pokemon, target, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048934(Entity *pokemon, Entity *target)
|
void IronItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
RaiseDefStatTarget(pokemon, target, 3);
|
RaiseDefStatTarget(pokemon, target, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048940(Entity *pokemon, Entity *target)
|
void ZincItemAction(Entity *pokemon, Entity *target)
|
||||||
{
|
{
|
||||||
RaiseSpDefStatTarget(pokemon, target, 3);
|
RaiseSpDefStatTarget(pokemon, target, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nullsub_94(void)
|
void nullsub_94(Entity *pokemon, Entity *target, u8 r2)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
static inline bool8 JoinLocationCannotUseItems_2(EntityInfo *pokemonInfo)
|
static inline bool8 JoinLocationCannotUseItems_2(EntityInfo *pokemonInfo)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8048950(u32 param_1,Item *item)
|
bool8 sub_8048950(Entity *param_1,Item *item)
|
||||||
{
|
{
|
||||||
u8 flag;
|
u8 flag;
|
||||||
u16 moveID;
|
u16 moveID;
|
||||||
@ -503,18 +895,18 @@ bool8 sub_8048950(u32 param_1,Item *item)
|
|||||||
|
|
||||||
static inline bool8 JoinLocationCannotUseItems_3(EntityInfo *pokemonInfo)
|
static inline bool8 JoinLocationCannotUseItems_3(EntityInfo *pokemonInfo)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8048A68(u32 param_1,Item *item)
|
bool8 sub_8048A68(Entity *param_1,Item *item)
|
||||||
{
|
{
|
||||||
u8 flag;
|
u8 flag;
|
||||||
Entity *entity2;
|
Entity *entity2;
|
||||||
@ -580,11 +972,11 @@ bool8 sub_8048A68(u32 param_1,Item *item)
|
|||||||
|
|
||||||
static inline bool8 JoinLocationCannotUseItems_4(EntityInfo *pokemonInfo)
|
static inline bool8 JoinLocationCannotUseItems_4(EntityInfo *pokemonInfo)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -711,7 +1103,7 @@ bool8 sub_8048D50(Entity * pokemon, Item *item)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((entityInfo->muzzled == TRUE) && (IsEdibleItem(item->id))) {
|
if ((entityInfo->muzzled.muzzled == TRUE) && (IsEdibleItem(item->id))) {
|
||||||
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
||||||
SendMessage(pokemon,*gUnknown_80FDCA4);
|
SendMessage(pokemon,*gUnknown_80FDCA4);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -720,7 +1112,7 @@ bool8 sub_8048D50(Entity * pokemon, Item *item)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048DB8(Entity *pokemon, Entity *target, u8 r2)
|
void KeyItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||||
{
|
{
|
||||||
u8 temp;
|
u8 temp;
|
||||||
if(r2 != 0)
|
if(r2 != 0)
|
||||||
@ -729,7 +1121,7 @@ void sub_8048DB8(Entity *pokemon, Entity *target, u8 r2)
|
|||||||
sub_8051E7C(pokemon);
|
sub_8051E7C(pokemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048E04(Entity *pokemon, Entity * target)
|
void GrimyFoodItemAction(Entity *pokemon, Entity * target)
|
||||||
{
|
{
|
||||||
sub_8078B5C(pokemon, target, 0x1E, 0, 1);
|
sub_8078B5C(pokemon, target, 0x1E, 0, 1);
|
||||||
switch(DungeonRandInt(5))
|
switch(DungeonRandInt(5))
|
||||||
@ -753,27 +1145,27 @@ void sub_8048E04(Entity *pokemon, Entity * target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048EB0(Entity *pokemon)
|
void IcePartItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||||
{
|
{
|
||||||
SendMessage(pokemon, *gPtrIcePartCrumbledMessage);
|
SendMessage(pokemon, *gPtrIcePartCrumbledMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048EC4(Entity *pokemon)
|
void RockPartItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||||
{
|
{
|
||||||
SendMessage(pokemon, *gPtrRockPartCrumbledMessage);
|
SendMessage(pokemon, *gPtrRockPartCrumbledMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048ED8(Entity *pokemon)
|
void SteelPartItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||||
{
|
{
|
||||||
SendMessage(pokemon, *gPtrSteelPartCrumbledMessage);
|
SendMessage(pokemon, *gPtrSteelPartCrumbledMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048EEC(Entity *pokemon)
|
void WishStoneItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||||
{
|
{
|
||||||
SendMessage(pokemon, *gPtrWishStoneCrumbledMessage);
|
SendMessage(pokemon, *gPtrWishStoneCrumbledMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8048F00(Entity *pokemon)
|
void MusicBoxItemAction(Entity *pokemon, Entity *target, u8 r2)
|
||||||
{
|
{
|
||||||
sub_80421C0(pokemon, 0xD6);
|
sub_80421C0(pokemon, 0xD6);
|
||||||
SendMessage(pokemon, *gPtrMusicBoxPlayedCrumbledMessage);
|
SendMessage(pokemon, *gPtrMusicBoxPlayedCrumbledMessage);
|
||||||
|
@ -3815,7 +3815,7 @@ void CreateJirachiWishWarpTile(void)
|
|||||||
{
|
{
|
||||||
struct Tile *tile;
|
struct Tile *tile;
|
||||||
|
|
||||||
tile = GetTileSafe(gDungeon->unkE23C, gDungeon->unkE23E);
|
tile = GetTileSafe(gDungeon->unkE220[7].x, gDungeon->unkE220[7].y);
|
||||||
tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||||
tile->terrainType |= TERRAIN_TYPE_IMPASSABLE_WALL;
|
tile->terrainType |= TERRAIN_TYPE_IMPASSABLE_WALL;
|
||||||
tile->terrainType &= ~TERRAIN_TYPE_STAIRS;
|
tile->terrainType &= ~TERRAIN_TYPE_STAIRS;
|
||||||
@ -3829,7 +3829,7 @@ void EnableJirachiWishWarpTile(void)
|
|||||||
{
|
{
|
||||||
struct Tile *tile;
|
struct Tile *tile;
|
||||||
|
|
||||||
tile = GetTileSafe(gDungeon->unkE23C, gDungeon->unkE23E);
|
tile = GetTileSafe(gDungeon->unkE220[7].x, gDungeon->unkE220[7].y);
|
||||||
tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
tile->terrainType &= ~(TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||||
tile->terrainType |= TERRAIN_TYPE_NORMAL;
|
tile->terrainType |= TERRAIN_TYPE_NORMAL;
|
||||||
tile->terrainType &= ~TERRAIN_TYPE_IMPASSABLE_WALL;
|
tile->terrainType &= ~TERRAIN_TYPE_IMPASSABLE_WALL;
|
||||||
|
@ -209,7 +209,7 @@ void sub_806A120(Entity * pokemon, Entity * target, Move* move)
|
|||||||
EntityInfo *entityInfo;
|
EntityInfo *entityInfo;
|
||||||
|
|
||||||
if ((((EntityExists(pokemon)) && (EntityExists(target))) && (pokemon != target))
|
if ((((EntityExists(pokemon)) && (EntityExists(target))) && (pokemon != target))
|
||||||
&& (entityInfo = target->info, entityInfo->protectionStatus == STATUS_CONVERSION2)) {
|
&& (entityInfo = target->info, entityInfo->protection.protectionStatus == STATUS_CONVERSION2)) {
|
||||||
moveType = GetMoveTypeForMonster(pokemon, move);
|
moveType = GetMoveTypeForMonster(pokemon, move);
|
||||||
uVar2_u32 = sub_8092364(moveType);
|
uVar2_u32 = sub_8092364(moveType);
|
||||||
if (uVar2_u32 != TYPE_NONE) {
|
if (uVar2_u32 != TYPE_NONE) {
|
||||||
|
@ -70,7 +70,7 @@ void sub_806CCB4(Entity *entity, u8 a1)
|
|||||||
entity->unk6F = 0;
|
entity->unk6F = 0;
|
||||||
sVar1 = entity->unk68;
|
sVar1 = entity->unk68;
|
||||||
|
|
||||||
if (info->waitingStatus != STATUS_DECOY && !flag)
|
if (info->waitingStruct.waitingStatus != STATUS_DECOY && !flag)
|
||||||
sub_80053AC(&entity->spriteInfo, entity->sprite, entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE);
|
sub_80053AC(&entity->spriteInfo, entity->sprite, entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE);
|
||||||
else
|
else
|
||||||
sub_80053AC(&entity->spriteInfo, sub_80687D0(MONSTER_DECOY), entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE);
|
sub_80053AC(&entity->spriteInfo, sub_80687D0(MONSTER_DECOY), entity->unk6A, entity->direction, sVar1, Rand32Bit() & 3, FALSE);
|
||||||
@ -151,15 +151,15 @@ u8 sub_806CEBC(Entity *entity)
|
|||||||
// NOTE: copy needed to match
|
// NOTE: copy needed to match
|
||||||
entityInfo1 = entity->info;
|
entityInfo1 = entity->info;
|
||||||
entityInfo2 = entity->info;
|
entityInfo2 = entity->info;
|
||||||
sleep = entityInfo1->sleep;
|
sleep = entityInfo1->sleep.sleep;
|
||||||
|
|
||||||
if (sleep == STATUS_SLEEP || sleep == STATUS_NAPPING || sleep == STATUS_NIGHTMARE) {
|
if (sleep == STATUS_SLEEP || sleep == STATUS_NAPPING || sleep == STATUS_NIGHTMARE) {
|
||||||
if (entityInfo2->apparentID != MONSTER_SUDOWOODO || entityInfo2->sleepTurns != 0x7F)
|
if (entityInfo2->apparentID != MONSTER_SUDOWOODO || entityInfo2->sleep.sleepTurns != 0x7F)
|
||||||
return 5;
|
return 5;
|
||||||
else
|
else
|
||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
if (entityInfo2->chargingStatus == STATUS_BIDE)
|
if (entityInfo2->charging.chargingStatus == STATUS_BIDE)
|
||||||
return 11;
|
return 11;
|
||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
|
@ -132,11 +132,11 @@ void sub_8071B48(void)
|
|||||||
|
|
||||||
static inline bool8 JoinLocationCannotUseItems(EntityInfo *pokemonInfo)
|
static inline bool8 JoinLocationCannotUseItems(EntityInfo *pokemonInfo)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ void sub_8075708(Entity *entity)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tile = GetTileAtEntitySafe(entity);
|
tile = GetTileAtEntitySafe(entity);
|
||||||
if (((IQSkillIsEnabled(entity, IQ_SUPER_MOBILE)) && (info->transformStatus != STATUS_MOBILE)) &&
|
if (((IQSkillIsEnabled(entity, IQ_SUPER_MOBILE)) && (info->transformStatus.transformStatus != STATUS_MOBILE)) &&
|
||||||
(!HasHeldItem(entity, ITEM_MOBILE_SCARF))) {
|
(!HasHeldItem(entity, ITEM_MOBILE_SCARF))) {
|
||||||
sub_804AE84(&entity->pos);
|
sub_804AE84(&entity->pos);
|
||||||
}
|
}
|
||||||
|
@ -220,9 +220,9 @@ void MuzzleTarget(Entity *pokemon, Entity *target)
|
|||||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) {
|
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->muzzled != TRUE) {
|
if (entityInfo->muzzled.muzzled != TRUE) {
|
||||||
entityInfo->muzzled = TRUE;
|
entityInfo->muzzled.muzzled = TRUE;
|
||||||
entityInfo->muzzledTurns = CalculateStatusTurns(target,gUnknown_80F4F1C, TRUE) + 1;
|
entityInfo->muzzled.muzzledTurns = CalculateStatusTurns(target,gUnknown_80F4F1C, TRUE) + 1;
|
||||||
nullsub_86(target);
|
nullsub_86(target);
|
||||||
sub_80522F4(pokemon, target, *gUnknown_80FBF68);
|
sub_80522F4(pokemon, target, *gUnknown_80FBF68);
|
||||||
}
|
}
|
||||||
@ -250,7 +250,7 @@ void TransformStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
|
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
|
|
||||||
if (entityInfo->transformStatus == STATUS_TRANSFORMED)
|
if (entityInfo->transformStatus.transformStatus == STATUS_TRANSFORMED)
|
||||||
sub_80522F4(pokemon, target, *gUnknown_80FBF04);
|
sub_80522F4(pokemon, target, *gUnknown_80FBF04);
|
||||||
else {
|
else {
|
||||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||||
@ -278,8 +278,8 @@ void TransformStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
else {
|
else {
|
||||||
entityInfo->apparentID = apparentID;
|
entityInfo->apparentID = apparentID;
|
||||||
target->sprite = sprite;
|
target->sprite = sprite;
|
||||||
entityInfo->transformStatus = STATUS_TRANSFORMED;
|
entityInfo->transformStatus.transformStatus = STATUS_TRANSFORMED;
|
||||||
entityInfo->transformStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EFC, TRUE) + 1;
|
entityInfo->transformStatus.transformStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EFC, TRUE) + 1;
|
||||||
sub_806CF98(target);
|
sub_806CF98(target);
|
||||||
nullsub_87(target);
|
nullsub_87(target);
|
||||||
sub_806CCB4(target, sub_806CEBC(target));
|
sub_806CCB4(target, sub_806CEBC(target));
|
||||||
@ -301,13 +301,13 @@ void MobileStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
entityInfo_1 = target->info;
|
entityInfo_1 = target->info;
|
||||||
entityInfo = entityInfo_1;
|
entityInfo = entityInfo_1;
|
||||||
|
|
||||||
if (entityInfo->transformStatus == STATUS_TRANSFORMED) {
|
if (entityInfo->transformStatus.transformStatus == STATUS_TRANSFORMED) {
|
||||||
SendTransformEndMessage(pokemon,target);
|
SendTransformEndMessage(pokemon,target);
|
||||||
}
|
}
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->transformStatus != STATUS_MOBILE) {
|
if (entityInfo->transformStatus.transformStatus != STATUS_MOBILE) {
|
||||||
entityInfo->transformStatus = STATUS_MOBILE;
|
entityInfo->transformStatus.transformStatus = STATUS_MOBILE;
|
||||||
entityInfo->transformStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F04, FALSE) + 1;
|
entityInfo->transformStatus.transformStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F04, FALSE) + 1;
|
||||||
nullsub_88(target);
|
nullsub_88(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FBF28);
|
sub_80522F4(pokemon,target,*gUnknown_80FBF28);
|
||||||
}
|
}
|
||||||
@ -390,9 +390,9 @@ void BlindTarget(Entity *pokemon, Entity *target)
|
|||||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) {
|
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->eyesightStatus != STATUS_BLINKER) {
|
if (entityInfo->eyesightStatus.eyesightStatus != STATUS_BLINKER) {
|
||||||
entityInfo->eyesightStatus = STATUS_BLINKER;
|
entityInfo->eyesightStatus.eyesightStatus = STATUS_BLINKER;
|
||||||
entityInfo->eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F08, TRUE) + 1;
|
entityInfo->eyesightStatus.eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F08, TRUE) + 1;
|
||||||
sub_8041E0C(target);
|
sub_8041E0C(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB7F4);
|
sub_80522F4(pokemon,target,*gUnknown_80FB7F4);
|
||||||
sub_803E46C(0x31);
|
sub_803E46C(0x31);
|
||||||
@ -417,11 +417,11 @@ void CrossEyeVisionTarget(Entity *pokemon, Entity *target)
|
|||||||
{
|
{
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->eyesightStatus != STATUS_CROSS_EYED) {
|
if (entityInfo->eyesightStatus.eyesightStatus != STATUS_CROSS_EYED) {
|
||||||
sub_8041E1C(target);
|
sub_8041E1C(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB834);
|
sub_80522F4(pokemon,target,*gUnknown_80FB834);
|
||||||
entityInfo->eyesightStatus = STATUS_CROSS_EYED;
|
entityInfo->eyesightStatus.eyesightStatus = STATUS_CROSS_EYED;
|
||||||
entityInfo->eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F0C, TRUE) + 1;
|
entityInfo->eyesightStatus.eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F0C, TRUE) + 1;
|
||||||
sub_803F580(0x1);
|
sub_803F580(0x1);
|
||||||
sub_8049ED4();
|
sub_8049ED4();
|
||||||
sub_8040A84();
|
sub_8040A84();
|
||||||
@ -443,9 +443,9 @@ void RestoreVisionTarget(Entity *pokemon, Entity *target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->eyesightStatus != STATUS_EYEDROPS) {
|
if (entityInfo->eyesightStatus.eyesightStatus != STATUS_EYEDROPS) {
|
||||||
entityInfo->eyesightStatus = STATUS_EYEDROPS;
|
entityInfo->eyesightStatus.eyesightStatus = STATUS_EYEDROPS;
|
||||||
entityInfo->eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F10, FALSE) + 1;
|
entityInfo->eyesightStatus.eyesightStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F10, FALSE) + 1;
|
||||||
sub_8041E3C(target);
|
sub_8041E3C(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB880);
|
sub_80522F4(pokemon,target,*gUnknown_80FB880);
|
||||||
sub_803E46C(0x31);
|
sub_803E46C(0x31);
|
||||||
@ -640,8 +640,8 @@ void LongTossStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
|
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gUnknown_202DFE8,target,0);
|
SetMessageArgument(gUnknown_202DFE8,target,0);
|
||||||
if (entityInfo->itemStatus != STATUS_LONG_TOSS) {
|
if (entityInfo->itemStatus.itemStatus != STATUS_LONG_TOSS) {
|
||||||
entityInfo->itemStatus = STATUS_LONG_TOSS;
|
entityInfo->itemStatus.itemStatus = STATUS_LONG_TOSS;
|
||||||
sub_8041EA4(target);
|
sub_8041EA4(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FD20C);
|
sub_80522F4(pokemon,target,*gUnknown_80FD20C);
|
||||||
}
|
}
|
||||||
@ -657,8 +657,8 @@ void PierceStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
|
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gUnknown_202DFE8,target,0);
|
SetMessageArgument(gUnknown_202DFE8,target,0);
|
||||||
if (entityInfo->itemStatus != STATUS_PIERCE) {
|
if (entityInfo->itemStatus.itemStatus != STATUS_PIERCE) {
|
||||||
entityInfo->itemStatus = STATUS_PIERCE;
|
entityInfo->itemStatus.itemStatus = STATUS_PIERCE;
|
||||||
sub_8041EB4(target);
|
sub_8041EB4(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FD254);
|
sub_80522F4(pokemon,target,*gUnknown_80FD254);
|
||||||
}
|
}
|
||||||
@ -681,18 +681,18 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if ((entityInfo->chargingStatus == newStatus) && (newStatus == STATUS_ENRAGED)) {
|
if ((entityInfo->charging.chargingStatus == newStatus) && (newStatus == STATUS_ENRAGED)) {
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FC074);
|
sub_80522F4(pokemon,target,*gUnknown_80FC074);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
entityInfo->chargingStatus = newStatus;
|
entityInfo->charging.chargingStatus = newStatus;
|
||||||
|
|
||||||
for(index = 0; index < MAX_MON_MOVES; index++)
|
for(index = 0; index < MAX_MON_MOVES; index++)
|
||||||
{
|
{
|
||||||
movePtr = &entityInfo->moves[index];
|
movePtr = &entityInfo->moves[index];
|
||||||
if(movePtr == move)
|
if(movePtr == move)
|
||||||
{
|
{
|
||||||
entityInfo->chargingStatusMoveIndex = index;
|
entityInfo->charging.chargingStatusMoveIndex = index;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -707,11 +707,11 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *
|
|||||||
entityInfo->unkFF = 2;
|
entityInfo->unkFF = 2;
|
||||||
}
|
}
|
||||||
if (newStatus == STATUS_BIDE) {
|
if (newStatus == STATUS_BIDE) {
|
||||||
entityInfo->chargingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E9C, FALSE) + 1;
|
entityInfo->charging.chargingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E9C, FALSE) + 1;
|
||||||
entityInfo->unkA0 = 0;
|
entityInfo->unkA0 = 0;
|
||||||
}
|
}
|
||||||
if (newStatus == STATUS_ENRAGED) {
|
if (newStatus == STATUS_ENRAGED) {
|
||||||
entityInfo->chargingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EA0, FALSE) + 1;
|
entityInfo->charging.chargingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EA0, FALSE) + 1;
|
||||||
}
|
}
|
||||||
sub_8041BD0(target,uVar5);
|
sub_8041BD0(target,uVar5);
|
||||||
sub_80522F4(pokemon,target,message);
|
sub_80522F4(pokemon,target,message);
|
||||||
@ -740,8 +740,8 @@ void sub_8079764(Entity * pokemon)
|
|||||||
|
|
||||||
if (EntityExists(pokemon)) {
|
if (EntityExists(pokemon)) {
|
||||||
entityInfo = pokemon->info;
|
entityInfo = pokemon->info;
|
||||||
if ((entityInfo->chargingStatus != STATUS_BIDE) && (entityInfo->chargingStatus != STATUS_ENRAGED)) {
|
if ((entityInfo->charging.chargingStatus != STATUS_BIDE) && (entityInfo->charging.chargingStatus != STATUS_ENRAGED)) {
|
||||||
entityInfo->chargingStatus = STATUS_NONE;
|
entityInfo->charging.chargingStatus = STATUS_NONE;
|
||||||
entityInfo->unk14A = 0;
|
entityInfo->unk14A = 0;
|
||||||
entityInfo->unkFF = 0;
|
entityInfo->unkFF = 0;
|
||||||
}
|
}
|
||||||
@ -756,15 +756,15 @@ void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus == newStatus) {
|
if (entityInfo->protection.protectionStatus == newStatus) {
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB10C);
|
sub_80522F4(pokemon,target,*gUnknown_80FB10C);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nullsub_57(target);
|
nullsub_57(target);
|
||||||
if ((entityInfo->protectionStatus != STATUS_COUNTER) && (entityInfo->protectionStatus != STATUS_MINI_COUNTER)) {
|
if ((entityInfo->protection.protectionStatus != STATUS_COUNTER) && (entityInfo->protection.protectionStatus != STATUS_MINI_COUNTER)) {
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E98, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E98, FALSE) + 1;
|
||||||
}
|
}
|
||||||
entityInfo->protectionStatus = newStatus;
|
entityInfo->protection.protectionStatus = newStatus;
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB0E0);
|
sub_80522F4(pokemon,target,*gUnknown_80FB0E0);
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
}
|
}
|
||||||
@ -778,9 +778,9 @@ void SafeguardStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_SAFEGUARD) {
|
if (entityInfo->protection.protectionStatus != STATUS_SAFEGUARD) {
|
||||||
entityInfo->protectionStatus = STATUS_SAFEGUARD;
|
entityInfo->protection.protectionStatus = STATUS_SAFEGUARD;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E88, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E88, FALSE) + 1;
|
||||||
nullsub_58(target);
|
nullsub_58(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB048);
|
sub_80522F4(pokemon,target,*gUnknown_80FB048);
|
||||||
}
|
}
|
||||||
@ -798,9 +798,9 @@ void MistStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_MIST) {
|
if (entityInfo->protection.protectionStatus != STATUS_MIST) {
|
||||||
entityInfo->protectionStatus = STATUS_MIST;
|
entityInfo->protection.protectionStatus = STATUS_MIST;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E8C, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E8C, FALSE) + 1;
|
||||||
nullsub_59(target);
|
nullsub_59(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB09C);
|
sub_80522F4(pokemon,target,*gUnknown_80FB09C);
|
||||||
}
|
}
|
||||||
@ -818,9 +818,9 @@ void WishStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_WISH) {
|
if (entityInfo->protection.protectionStatus != STATUS_WISH) {
|
||||||
entityInfo->protectionStatus = STATUS_WISH;
|
entityInfo->protection.protectionStatus = STATUS_WISH;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EB4, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EB4, FALSE) + 1;
|
||||||
sub_8041B34(target);
|
sub_8041B34(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FAE1C);
|
sub_80522F4(pokemon,target,*gUnknown_80FAE1C);
|
||||||
}
|
}
|
||||||
@ -838,9 +838,9 @@ void MagicCoatStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_MAGIC_COAT) {
|
if (entityInfo->protection.protectionStatus != STATUS_MAGIC_COAT) {
|
||||||
entityInfo->protectionStatus = STATUS_MAGIC_COAT;
|
entityInfo->protection.protectionStatus = STATUS_MAGIC_COAT;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E90, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E90, FALSE) + 1;
|
||||||
nullsub_60(target);
|
nullsub_60(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FAF5C);
|
sub_80522F4(pokemon,target,*gUnknown_80FAF5C);
|
||||||
}
|
}
|
||||||
@ -858,9 +858,9 @@ void LightScreenStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_LIGHT_SCREEN) {
|
if (entityInfo->protection.protectionStatus != STATUS_LIGHT_SCREEN) {
|
||||||
entityInfo->protectionStatus = STATUS_LIGHT_SCREEN;
|
entityInfo->protection.protectionStatus = STATUS_LIGHT_SCREEN;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E84, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E84, FALSE) + 1;
|
||||||
nullsub_61(target);
|
nullsub_61(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB130);
|
sub_80522F4(pokemon,target,*gUnknown_80FB130);
|
||||||
}
|
}
|
||||||
@ -878,9 +878,9 @@ void ReflectStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_REFLECT) {
|
if (entityInfo->protection.protectionStatus != STATUS_REFLECT) {
|
||||||
entityInfo->protectionStatus = STATUS_REFLECT;
|
entityInfo->protection.protectionStatus = STATUS_REFLECT;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E80, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E80, FALSE) + 1;
|
||||||
nullsub_62(target);
|
nullsub_62(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB17C);
|
sub_80522F4(pokemon,target,*gUnknown_80FB17C);
|
||||||
}
|
}
|
||||||
@ -898,9 +898,9 @@ void ProtectStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
nullsub_63(target);
|
nullsub_63(target);
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
if (entityInfo->protectionStatus != STATUS_PROTECT) {
|
if (entityInfo->protection.protectionStatus != STATUS_PROTECT) {
|
||||||
entityInfo->protectionStatus = STATUS_PROTECT;
|
entityInfo->protection.protectionStatus = STATUS_PROTECT;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4ED4, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4ED4, FALSE) + 1;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB9B0);
|
sub_80522F4(pokemon,target,*gUnknown_80FB9B0);
|
||||||
}
|
}
|
||||||
@ -919,9 +919,9 @@ void MirrorCoatStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_MIRROR_COAT) {
|
if (entityInfo->protection.protectionStatus != STATUS_MIRROR_COAT) {
|
||||||
entityInfo->protectionStatus = STATUS_MIRROR_COAT;
|
entityInfo->protection.protectionStatus = STATUS_MIRROR_COAT;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EE8, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EE8, FALSE) + 1;
|
||||||
nullsub_64(target);
|
nullsub_64(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FBAC0);
|
sub_80522F4(pokemon,target,*gUnknown_80FBAC0);
|
||||||
}
|
}
|
||||||
@ -939,9 +939,9 @@ void EndureStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_ENDURING) {
|
if (entityInfo->protection.protectionStatus != STATUS_ENDURING) {
|
||||||
entityInfo->protectionStatus = STATUS_ENDURING;
|
entityInfo->protection.protectionStatus = STATUS_ENDURING;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EF8, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EF8, FALSE) + 1;
|
||||||
nullsub_65(target);
|
nullsub_65(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FBBF0);
|
sub_80522F4(pokemon,target,*gUnknown_80FBBF0);
|
||||||
}
|
}
|
||||||
@ -959,9 +959,9 @@ void MirrorMoveStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_MIRROR_MOVE) {
|
if (entityInfo->protection.protectionStatus != STATUS_MIRROR_MOVE) {
|
||||||
entityInfo->protectionStatus = STATUS_MIRROR_MOVE;
|
entityInfo->protection.protectionStatus = STATUS_MIRROR_MOVE;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F18, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F18, FALSE) + 1;
|
||||||
nullsub_66(target);
|
nullsub_66(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FBC38);
|
sub_80522F4(pokemon,target,*gUnknown_80FBC38);
|
||||||
}
|
}
|
||||||
@ -984,9 +984,9 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_CONVERSION2) {
|
if (entityInfo->protection.protectionStatus != STATUS_CONVERSION2) {
|
||||||
entityInfo->protectionStatus = STATUS_CONVERSION2;
|
entityInfo->protection.protectionStatus = STATUS_CONVERSION2;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F20, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F20, FALSE) + 1;
|
||||||
nullsub_67(target);
|
nullsub_67(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FBC7C);
|
sub_80522F4(pokemon,target,*gUnknown_80FBC7C);
|
||||||
}
|
}
|
||||||
@ -1005,9 +1005,9 @@ void VitalThrowStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->protectionStatus != STATUS_VITAL_THROW) {
|
if (entityInfo->protection.protectionStatus != STATUS_VITAL_THROW) {
|
||||||
entityInfo->protectionStatus = STATUS_VITAL_THROW;
|
entityInfo->protection.protectionStatus = STATUS_VITAL_THROW;
|
||||||
entityInfo->protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F24, FALSE) + 1;
|
entityInfo->protection.protectionStatusTurns = CalculateStatusTurns(target, gUnknown_80F4F24, FALSE) + 1;
|
||||||
nullsub_68(target);
|
nullsub_68(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FBCC8);
|
sub_80522F4(pokemon,target,*gUnknown_80FBCC8);
|
||||||
}
|
}
|
||||||
@ -1175,7 +1175,7 @@ void SendSleepEndMessage(Entity * pokemon, Entity * target, bool8 param_3, bool8
|
|||||||
}
|
}
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->sleep) {
|
switch(entityInfo->sleep.sleep) {
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
case 6:
|
case 6:
|
||||||
break;
|
break;
|
||||||
@ -1197,19 +1197,19 @@ void SendSleepEndMessage(Entity * pokemon, Entity * target, bool8 param_3, bool8
|
|||||||
isAsleep = TRUE;
|
isAsleep = TRUE;
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FA710);
|
sub_80522F4(pokemon,target,*gUnknown_80FA710);
|
||||||
HealTargetHP(pokemon,target,gUnknown_80F4F7A, 0, FALSE);
|
HealTargetHP(pokemon,target,gUnknown_80F4F7A, 0, FALSE);
|
||||||
entityInfo->sleep = 0;
|
entityInfo->sleep.sleep = 0;
|
||||||
sub_8079F20(pokemon,target,1,1);
|
sub_8079F20(pokemon,target,1,1);
|
||||||
break;
|
break;
|
||||||
case STATUS_YAWNING:
|
case STATUS_YAWNING:
|
||||||
if (param_3) {
|
if (param_3) {
|
||||||
entityInfo->sleep = STATUS_NONE;
|
entityInfo->sleep.sleep = STATUS_NONE;
|
||||||
sub_8075C58(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4F2C, TRUE) + 1, TRUE);
|
sub_8075C58(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4F2C, TRUE) + 1, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FA734);
|
sub_80522F4(pokemon,target,*gUnknown_80FA734);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
entityInfo->sleep = STATUS_NONE;
|
entityInfo->sleep.sleep = STATUS_NONE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
if (isAsleep) {
|
if (isAsleep) {
|
||||||
sub_806CE68(target,8);
|
sub_806CE68(target,8);
|
||||||
@ -1225,7 +1225,7 @@ void SendNonVolatileEndMessage(Entity * pokemon, Entity * target)
|
|||||||
}
|
}
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->nonVolatileStatus) {
|
switch(entityInfo->nonVolatile.nonVolatileStatus) {
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
case 5:
|
case 5:
|
||||||
break;
|
break;
|
||||||
@ -1241,7 +1241,7 @@ void SendNonVolatileEndMessage(Entity * pokemon, Entity * target)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
entityInfo->nonVolatileStatus = STATUS_NONE;
|
entityInfo->nonVolatile.nonVolatileStatus = STATUS_NONE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1256,7 +1256,7 @@ void SendImmobilizeEndMessage(Entity * pokemon, Entity *target)
|
|||||||
}
|
}
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->immobilizeStatus) {
|
switch(entityInfo->immobilize.immobilizeStatus) {
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
case 8:
|
case 8:
|
||||||
break;
|
break;
|
||||||
@ -1280,7 +1280,7 @@ void SendImmobilizeEndMessage(Entity * pokemon, Entity *target)
|
|||||||
sub_80522F4(pokemon,target, *gPtrMonNoLongerPetrifiedMessage);
|
sub_80522F4(pokemon,target, *gPtrMonNoLongerPetrifiedMessage);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
entityInfo->immobilizeStatus = STATUS_NONE;
|
entityInfo->immobilize.immobilizeStatus = STATUS_NONE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
if (isFrozen) {
|
if (isFrozen) {
|
||||||
sub_8042A74(target);
|
sub_8042A74(target);
|
||||||
@ -1296,7 +1296,7 @@ void SendVolatileEndMessage(Entity * pokemon, Entity *target)
|
|||||||
}
|
}
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->volatileStatus) {
|
switch(entityInfo->volatileStatus.volatileStatus) {
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
case 8:
|
case 8:
|
||||||
break;
|
break;
|
||||||
@ -1322,7 +1322,7 @@ void SendVolatileEndMessage(Entity * pokemon, Entity *target)
|
|||||||
sub_80522F4(pokemon,target, *gPtrMonNoLongerCringingMessage);
|
sub_80522F4(pokemon,target, *gPtrMonNoLongerCringingMessage);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
entityInfo->volatileStatus = STATUS_NONE;
|
entityInfo->volatileStatus.volatileStatus = STATUS_NONE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
CalcSpeedStage(target);
|
CalcSpeedStage(target);
|
||||||
}
|
}
|
||||||
@ -1336,7 +1336,7 @@ void SendProtectionEndMessage(Entity * pokemon, Entity *target)
|
|||||||
}
|
}
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->protectionStatus) {
|
switch(entityInfo->protection.protectionStatus) {
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
case 0xF:
|
case 0xF:
|
||||||
break;
|
break;
|
||||||
@ -1381,7 +1381,7 @@ void SendProtectionEndMessage(Entity * pokemon, Entity *target)
|
|||||||
SendMessage(target,*gUnknown_80FAB40);
|
SendMessage(target,*gUnknown_80FAB40);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
entityInfo->protectionStatus = STATUS_NONE;
|
entityInfo->protection.protectionStatus = STATUS_NONE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1393,7 +1393,7 @@ void SendWaitingEndMessage(Entity * pokemon, Entity * target, u8 waitingStatus)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->waitingStatus) {
|
switch(entityInfo->waitingStruct.waitingStatus) {
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
case 4:
|
case 4:
|
||||||
break;
|
break;
|
||||||
@ -1410,7 +1410,7 @@ void SendWaitingEndMessage(Entity * pokemon, Entity * target, u8 waitingStatus)
|
|||||||
gDungeon->unk17B3C = 0;
|
gDungeon->unk17B3C = 0;
|
||||||
break;
|
break;
|
||||||
case STATUS_DECOY:
|
case STATUS_DECOY:
|
||||||
entityInfo->waitingStatus = STATUS_NONE;
|
entityInfo->waitingStruct.waitingStatus = STATUS_NONE;
|
||||||
uVar3 = sub_806CEBC(target);
|
uVar3 = sub_806CEBC(target);
|
||||||
sub_806CCB4(target,uVar3);
|
sub_806CCB4(target,uVar3);
|
||||||
gDungeon->decoyActive = FALSE;
|
gDungeon->decoyActive = FALSE;
|
||||||
@ -1420,7 +1420,7 @@ void SendWaitingEndMessage(Entity * pokemon, Entity * target, u8 waitingStatus)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
entityInfo->waitingStatus = STATUS_NONE;
|
entityInfo->waitingStruct.waitingStatus = STATUS_NONE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1432,7 +1432,7 @@ void SendLinkedEndMessage(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->linkedStatus)
|
switch(entityInfo->linked.linkedStatus)
|
||||||
{
|
{
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
break;
|
break;
|
||||||
@ -1443,8 +1443,8 @@ void SendLinkedEndMessage(Entity * pokemon, Entity * target)
|
|||||||
SendMessage(target,*gUnknown_80FAA8C);
|
SendMessage(target,*gUnknown_80FAA8C);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
entityInfo->linkedStatus = STATUS_NONE;
|
entityInfo->linked.linkedStatus = STATUS_NONE;
|
||||||
entityInfo->unkD8 = 0xff;
|
entityInfo->linked.unkD8 = 0xff;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1458,7 +1458,7 @@ void SendMoveEndMessage(Entity * pokemon, Entity * target)
|
|||||||
}
|
}
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->moveStatus) {
|
switch(entityInfo->moveStatus.moveStatus) {
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
case 5:
|
case 5:
|
||||||
break;
|
break;
|
||||||
@ -1475,7 +1475,7 @@ void SendMoveEndMessage(Entity * pokemon, Entity * target)
|
|||||||
SendMessage(target,*gUnknown_80FA95C);
|
SendMessage(target,*gUnknown_80FA95C);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
entityInfo->moveStatus = STATUS_NONE;
|
entityInfo->moveStatus.moveStatus = STATUS_NONE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1491,7 +1491,7 @@ void SendTransformEndMessage(Entity * pokemon, Entity *target)
|
|||||||
}
|
}
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->transformStatus) {
|
switch(entityInfo->transformStatus.transformStatus) {
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
case 4:
|
case 4:
|
||||||
break;
|
break;
|
||||||
@ -1510,7 +1510,7 @@ void SendTransformEndMessage(Entity * pokemon, Entity *target)
|
|||||||
SendMessage(target,*gUnknown_80FAB6C);
|
SendMessage(target,*gUnknown_80FAB6C);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
entityInfo->transformStatus = STATUS_NONE;
|
entityInfo->transformStatus.transformStatus = STATUS_NONE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
if (isInvisible) {
|
if (isInvisible) {
|
||||||
sub_807EC28(TRUE);
|
sub_807EC28(TRUE);
|
||||||
@ -1526,7 +1526,7 @@ void SendEyesightEndMessage(Entity * pokemon,Entity * target)
|
|||||||
}
|
}
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->eyesightStatus) {
|
switch(entityInfo->eyesightStatus.eyesightStatus) {
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
case 4:
|
case 4:
|
||||||
break;
|
break;
|
||||||
@ -1540,7 +1540,7 @@ void SendEyesightEndMessage(Entity * pokemon,Entity * target)
|
|||||||
SendMessage(target,*gUnknown_80FAA48);
|
SendMessage(target,*gUnknown_80FAA48);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
entityInfo->eyesightStatus = STATUS_NONE;
|
entityInfo->eyesightStatus.eyesightStatus = STATUS_NONE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
if (entityInfo->isTeamLeader) {
|
if (entityInfo->isTeamLeader) {
|
||||||
sub_803E46C(0x31);
|
sub_803E46C(0x31);
|
||||||
@ -1558,7 +1558,7 @@ void SendMuzzledEndMessage(Entity * pokemon, Entity * target)
|
|||||||
}
|
}
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
switch(entityInfo->muzzled) {
|
switch(entityInfo->muzzled.muzzled) {
|
||||||
case FALSE:
|
case FALSE:
|
||||||
case 2:
|
case 2:
|
||||||
break;
|
break;
|
||||||
@ -1566,7 +1566,7 @@ void SendMuzzledEndMessage(Entity * pokemon, Entity * target)
|
|||||||
SendMessage(target,*gUnknown_80FABC0);
|
SendMessage(target,*gUnknown_80FABC0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
entityInfo->muzzled = FALSE;
|
entityInfo->muzzled.muzzled = FALSE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1580,12 +1580,12 @@ void SendMuzzledEndMessage(Entity * pokemon, Entity * target)
|
|||||||
|
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
flag = FALSE;
|
flag = FALSE;
|
||||||
if (entityInfo->immobilizeStatus == 6) {
|
if (entityInfo->immobilize.immobilizeStatus == 6) {
|
||||||
SendImmobilizeEndMessage(pokemon, target);
|
SendImmobilizeEndMessage(pokemon, target);
|
||||||
flag = TRUE;
|
flag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entityInfo->sleep == 1 && entityInfo->sleepTurns == 0x7f) {
|
if (entityInfo->sleep.sleep == 1 && entityInfo->sleep.sleepTurns == 0x7f) {
|
||||||
SendSleepEndMessage(pokemon,target,0,1);
|
SendSleepEndMessage(pokemon,target,0,1);
|
||||||
flag = TRUE;
|
flag = TRUE;
|
||||||
}
|
}
|
||||||
@ -1636,8 +1636,8 @@ void WakeUpPokemon(Entity * pokemon)
|
|||||||
EntityInfo *entityInfo;
|
EntityInfo *entityInfo;
|
||||||
|
|
||||||
entityInfo = pokemon->info;
|
entityInfo = pokemon->info;
|
||||||
entityInfo->sleep = STATUS_NONE;
|
entityInfo->sleep.sleep = STATUS_NONE;
|
||||||
entityInfo->sleepTurns = 0;
|
entityInfo->sleep.sleepTurns = 0;
|
||||||
sub_806A898(pokemon, 1, 1);
|
sub_806A898(pokemon, 1, 1);
|
||||||
EntityUpdateStatusSprites(pokemon);
|
EntityUpdateStatusSprites(pokemon);
|
||||||
}
|
}
|
||||||
@ -1648,10 +1648,10 @@ void SendThawedMessage(Entity *pokemon, Entity *target)
|
|||||||
|
|
||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
if (entityInfo->immobilizeStatus == STATUS_FROZEN) {
|
if (entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN) {
|
||||||
entityInfo->immobilizeStatus = STATUS_NONE;
|
entityInfo->immobilize.immobilizeStatus = STATUS_NONE;
|
||||||
entityInfo->immobilizeStatusTurns = 0;
|
entityInfo->immobilize.immobilizeStatusTurns = 0;
|
||||||
entityInfo->immobilizeStatusDamageCountdown = 0;
|
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FA8BC); // $m0 thawed out!
|
sub_80522F4(pokemon,target,*gUnknown_80FA8BC); // $m0 thawed out!
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
@ -1676,8 +1676,8 @@ void sub_807AA30(void)
|
|||||||
{
|
{
|
||||||
wildEntity = gDungeon->wildPokemon[wildIndex];
|
wildEntity = gDungeon->wildPokemon[wildIndex];
|
||||||
if (EntityExists(wildEntity) &&
|
if (EntityExists(wildEntity) &&
|
||||||
(entityInfo = wildEntity->info, entityInfo->sleep == STATUS_SLEEP) &&
|
(entityInfo = wildEntity->info, entityInfo->sleep.sleep == STATUS_SLEEP) &&
|
||||||
(entityInfo->sleepTurns == 0x7F)) {
|
(entityInfo->sleep.sleepTurns == 0x7F)) {
|
||||||
adjacentCheck = FALSE;
|
adjacentCheck = FALSE;
|
||||||
forceWakeup = FALSE;
|
forceWakeup = FALSE;
|
||||||
room = GetEntityRoom(wildEntity);
|
room = GetEntityRoom(wildEntity);
|
||||||
|
@ -8,12 +8,10 @@
|
|||||||
#include "code_80A26CC.h"
|
#include "code_80A26CC.h"
|
||||||
#include "code_80972F4.h"
|
#include "code_80972F4.h"
|
||||||
|
|
||||||
extern MissionText gStoryMissionText[];
|
#include "data/story_missions.h"
|
||||||
extern const char gFinalScenarioText[];
|
|
||||||
extern const char gMeetNinetalesText[];
|
ALIGNED(4) const u8 gDummyScenarioText[] = _("{COLOR_1 YELLOW_3}Scenario try dummy{END_COLOR_TEXT_1}");
|
||||||
extern const char gAvoidCaptureText[];
|
ALIGNED(4) const u8 gBlankMission[] = _("{COLOR_1 RED_2}???{END_COLOR_TEXT_1}");
|
||||||
extern const u8 gUnknown_8109CC0[];
|
|
||||||
extern const u8 gDummyScenarioText[];
|
|
||||||
|
|
||||||
extern void sub_800199C(u8, u8, u16, s32);
|
extern void sub_800199C(u8, u8, u16, s32);
|
||||||
extern void SaveDungeonLocation(struct unkStruct_8094924*, DungeonLocation*);
|
extern void SaveDungeonLocation(struct unkStruct_8094924*, DungeonLocation*);
|
||||||
@ -392,7 +390,7 @@ void sub_8097418(s16 index,bool32 param_2)
|
|||||||
bool8 param_2_u8 = param_2;
|
bool8 param_2_u8 = param_2;
|
||||||
if (index_s32 != 0xd) {
|
if (index_s32 != 0xd) {
|
||||||
if ((param_2_u8) && (sub_800199C(0,0x2c,index_s32,0), index_s32 < 0x1f)) {
|
if ((param_2_u8) && (sub_800199C(0,0x2c,index_s32,0), index_s32 < 0x1f)) {
|
||||||
MissionText *mt = &gStoryMissionText[index_s32];
|
const MissionText *mt = &gStoryMissionText[index_s32];
|
||||||
if (mt->unk4 != 0xFF) {
|
if (mt->unk4 != 0xFF) {
|
||||||
sub_8097FA8(mt->unk4);
|
sub_8097FA8(mt->unk4);
|
||||||
}
|
}
|
||||||
@ -436,12 +434,12 @@ const u8 *GetCurrentMissionText(s16 index)
|
|||||||
{
|
{
|
||||||
if(index < 0x1F)
|
if(index < 0x1F)
|
||||||
{
|
{
|
||||||
MissionText *mt = &gStoryMissionText[index];
|
const MissionText *mt = &gStoryMissionText[index];
|
||||||
return mt->text;
|
return mt->text;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return gUnknown_8109CC0;
|
return gBlankMission;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -454,122 +452,3 @@ void sub_80974E8(void)
|
|||||||
void nullsub_208(void)
|
void nullsub_208(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8097504(s16 mazeIndex)
|
|
||||||
{
|
|
||||||
s32 mazeIndex_s32;
|
|
||||||
|
|
||||||
#ifndef NONMATCHING
|
|
||||||
register s32 mazeIndex_s32_1 asm("r1");
|
|
||||||
#else
|
|
||||||
s32 mazeIndex_s32_1;
|
|
||||||
#endif
|
|
||||||
s32 uVar3;
|
|
||||||
|
|
||||||
mazeIndex_s32 = mazeIndex;
|
|
||||||
mazeIndex_s32_1 = mazeIndex_s32;
|
|
||||||
|
|
||||||
if(mazeIndex_s32 < 17)
|
|
||||||
{
|
|
||||||
switch(mazeIndex_s32) {
|
|
||||||
case 2:
|
|
||||||
case 10:
|
|
||||||
case 11:
|
|
||||||
case 12:
|
|
||||||
uVar3 = 14;
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
case 1:
|
|
||||||
case 5:
|
|
||||||
case 7:
|
|
||||||
case 9:
|
|
||||||
case 14:
|
|
||||||
uVar3 = 15;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
case 4:
|
|
||||||
case 6:
|
|
||||||
case 8:
|
|
||||||
return TRUE;
|
|
||||||
case 13:
|
|
||||||
uVar3 = 6;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (mazeIndex_s32_1 > 22) return FALSE;
|
|
||||||
if (mazeIndex_s32_1 == 22) return FALSE;
|
|
||||||
if (mazeIndex_s32_1 == 21) return FALSE;
|
|
||||||
uVar3 = 6;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sub_80023E4(uVar3)) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: this should probably be bool8 but can't get a match just yet
|
|
||||||
bool32 IsMazeCompleted(s16 mazeIndex)
|
|
||||||
{
|
|
||||||
bool32 mazeCompletion;
|
|
||||||
|
|
||||||
mazeCompletion = sub_8001784(0, 0x2e, mazeIndex);
|
|
||||||
if (mazeCompletion) {
|
|
||||||
mazeCompletion = TRUE;
|
|
||||||
}
|
|
||||||
return mazeCompletion;
|
|
||||||
}
|
|
||||||
|
|
||||||
void sub_80975A8(s16 param_1,u8 param_2)
|
|
||||||
{
|
|
||||||
u16 param_1_u16 = param_1;
|
|
||||||
sub_800199C(0,0x2e,param_1_u16,param_2);
|
|
||||||
}
|
|
||||||
|
|
||||||
const u8 *sub_80975C4(s16 index)
|
|
||||||
{
|
|
||||||
return GetDungeonName1(sub_80A2728(index));
|
|
||||||
}
|
|
||||||
|
|
||||||
const u8 *sub_80975DC(u32 r0)
|
|
||||||
{
|
|
||||||
// TODO: slight hack but matches
|
|
||||||
r0 <<= 16;
|
|
||||||
if((0xffe90000 + r0) >> 16 < 2)
|
|
||||||
if(sub_8001D08(0x3, 0xE, -1))
|
|
||||||
return gMeetNinetalesText;
|
|
||||||
else
|
|
||||||
return gAvoidCaptureText;
|
|
||||||
else
|
|
||||||
return gFinalScenarioText;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool8 HasCompletedAllMazes(void)
|
|
||||||
{
|
|
||||||
s32 index;
|
|
||||||
for(index = 0; index < NUM_BASIC_DUNGEON_MAZE; index++)
|
|
||||||
{
|
|
||||||
if(!(bool8)IsMazeCompleted(index))
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool8 sub_8097640(void)
|
|
||||||
{
|
|
||||||
if(sub_8001784(0, 0x2E, 0x1F) == 0 && HasCompletedAllMazes())
|
|
||||||
{
|
|
||||||
sub_800199C(0, 0x2E, 0x1F, 1);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
135
src/code_8097504.c
Normal file
135
src/code_8097504.c
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
#include "global.h"
|
||||||
|
#include "globaldata.h"
|
||||||
|
#include "constants/dungeon.h"
|
||||||
|
#include "dungeon.h"
|
||||||
|
#include "event_flag.h"
|
||||||
|
#include "code_80A26CC.h"
|
||||||
|
|
||||||
|
ALIGNED(4) const char gMeetNinetalesText[] = "Meet Ninetales.";
|
||||||
|
ALIGNED(4) const char gAvoidCaptureText[] = "Avoid capture.";
|
||||||
|
ALIGNED(4) const char gFinalScenarioText[] = _("Defeat the final Pokémon.");
|
||||||
|
|
||||||
|
extern void sub_800199C(u8, u8, u16, s32);
|
||||||
|
extern u32 sub_8001784(u32, u32, u16);
|
||||||
|
extern void sub_80018D8(u8, u8, u32);
|
||||||
|
|
||||||
|
|
||||||
|
bool8 sub_8097504(s16 mazeIndex)
|
||||||
|
{
|
||||||
|
s32 mazeIndex_s32;
|
||||||
|
|
||||||
|
#ifndef NONMATCHING
|
||||||
|
register s32 mazeIndex_s32_1 asm("r1");
|
||||||
|
#else
|
||||||
|
s32 mazeIndex_s32_1;
|
||||||
|
#endif
|
||||||
|
s32 uVar3;
|
||||||
|
|
||||||
|
mazeIndex_s32 = mazeIndex;
|
||||||
|
mazeIndex_s32_1 = mazeIndex_s32;
|
||||||
|
|
||||||
|
if(mazeIndex_s32 < 17)
|
||||||
|
{
|
||||||
|
switch(mazeIndex_s32) {
|
||||||
|
case 2:
|
||||||
|
case 10:
|
||||||
|
case 11:
|
||||||
|
case 12:
|
||||||
|
uVar3 = 14;
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 5:
|
||||||
|
case 7:
|
||||||
|
case 9:
|
||||||
|
case 14:
|
||||||
|
uVar3 = 15;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 6:
|
||||||
|
case 8:
|
||||||
|
return TRUE;
|
||||||
|
case 13:
|
||||||
|
uVar3 = 6;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (mazeIndex_s32_1 > 22) return FALSE;
|
||||||
|
if (mazeIndex_s32_1 == 22) return FALSE;
|
||||||
|
if (mazeIndex_s32_1 == 21) return FALSE;
|
||||||
|
uVar3 = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sub_80023E4(uVar3)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: this should probably be bool8 but can't get a match just yet
|
||||||
|
bool32 IsMazeCompleted(s16 mazeIndex)
|
||||||
|
{
|
||||||
|
bool32 mazeCompletion;
|
||||||
|
|
||||||
|
mazeCompletion = sub_8001784(0, 0x2e, mazeIndex);
|
||||||
|
if (mazeCompletion) {
|
||||||
|
mazeCompletion = TRUE;
|
||||||
|
}
|
||||||
|
return mazeCompletion;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_80975A8(s16 param_1,u8 param_2)
|
||||||
|
{
|
||||||
|
u16 param_1_u16 = param_1;
|
||||||
|
sub_800199C(0,0x2e,param_1_u16,param_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
const u8 *sub_80975C4(s16 index)
|
||||||
|
{
|
||||||
|
return GetDungeonName1(sub_80A2728(index));
|
||||||
|
}
|
||||||
|
|
||||||
|
const u8 *sub_80975DC(u32 r0)
|
||||||
|
{
|
||||||
|
// TODO: slight hack but matches
|
||||||
|
r0 <<= 16;
|
||||||
|
if((0xffe90000 + r0) >> 16 < 2)
|
||||||
|
if(sub_8001D08(0x3, 0xE, -1))
|
||||||
|
return gMeetNinetalesText;
|
||||||
|
else
|
||||||
|
return gAvoidCaptureText;
|
||||||
|
else
|
||||||
|
return gFinalScenarioText;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool8 HasCompletedAllMazes(void)
|
||||||
|
{
|
||||||
|
s32 index;
|
||||||
|
for(index = 0; index < NUM_BASIC_DUNGEON_MAZE; index++)
|
||||||
|
{
|
||||||
|
if(!(bool8)IsMazeCompleted(index))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool8 sub_8097640(void)
|
||||||
|
{
|
||||||
|
if(sub_8001784(0, 0x2E, 0x1F) == 0 && HasCompletedAllMazes())
|
||||||
|
{
|
||||||
|
sub_800199C(0, 0x2E, 0x1F, 1);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
25
src/data/code_80140DC.h
Normal file
25
src/data/code_80140DC.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
const u8 Yes_80D4878[];
|
||||||
|
const u8 No_80D4874[];
|
||||||
|
|
||||||
|
const MenuItem gUnknown_80D485C[] =
|
||||||
|
{
|
||||||
|
{Yes_80D4878, 1},
|
||||||
|
{No_80D4874, 0},
|
||||||
|
{NULL, -1}
|
||||||
|
};
|
||||||
|
|
||||||
|
ALIGNED(4) const u8 No_80D4874[] = "No";
|
||||||
|
ALIGNED(4) const u8 Yes_80D4878[] = "*Yes";
|
||||||
|
|
||||||
|
const u8 Yes_80D489C[];
|
||||||
|
const u8 No_80D4898[];
|
||||||
|
|
||||||
|
const MenuItem gUnknown_80D4880[] =
|
||||||
|
{
|
||||||
|
{Yes_80D489C, 1},
|
||||||
|
{No_80D4898, 0},
|
||||||
|
{NULL, -1}
|
||||||
|
};
|
||||||
|
|
||||||
|
ALIGNED(4) const u8 No_80D4898[] = "*No";
|
||||||
|
ALIGNED(4) const u8 Yes_80D489C[] = "Yes";
|
@ -1,10 +1,5 @@
|
|||||||
// ALIGNED(4) static const u8 sFill[] = _("pksdir0");
|
// ALIGNED(4) static const u8 sFill[] = _("pksdir0");
|
||||||
|
|
||||||
// gFastMod3Lookup
|
|
||||||
// gFastDiv3Lookup
|
|
||||||
// gFastSinLookup
|
|
||||||
// gFastUnknownFn1Lookup
|
|
||||||
|
|
||||||
static const u32 gUnknown_80B96E4[300] = {
|
static const u32 gUnknown_80B96E4[300] = {
|
||||||
0, 0, 45426, 71998,
|
0, 0, 45426, 71998,
|
||||||
90852, 105476, 117424, 127527,
|
90852, 105476, 117424, 127527,
|
||||||
|
178
src/data/math.h
Normal file
178
src/data/math.h
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
// gFastMod3Lookup
|
||||||
|
|
||||||
|
const u8 gFastMod3Lookup[0x100] = {
|
||||||
|
0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
const u8 gFastDiv3Lookup[0x100] = {
|
||||||
|
0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29, 30, 30, 30, 31, 31, 31, 32, 32, 32, 33, 33, 33, 34, 34, 34, 35, 35, 35, 36, 36, 36, 37, 37, 37, 38, 38, 38, 39, 39, 39, 40, 40, 40, 41, 41, 41, 42, 42, 42, 43, 43, 43, 44, 44, 44, 45, 45, 45, 46, 46, 46, 47, 47, 47, 48, 48, 48, 49, 49, 49, 50, 50, 50, 51, 51, 51, 52, 52, 52, 53, 53, 53, 54, 54, 54, 55, 55, 55, 56, 56, 56, 57, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62, 62, 63, 63, 63, 64, 64, 64, 65, 65, 65, 66, 66, 66, 67, 67, 67, 68, 68, 68, 69, 69, 69, 70, 70, 70, 71, 71, 71, 72, 72, 72, 73, 73, 73, 74, 74, 74, 75, 75, 75, 76, 76, 76, 77, 77, 77, 78, 78, 78, 79, 79, 79, 80, 80, 80, 81, 81, 81, 82, 82, 82, 83, 83, 83, 84, 84, 84, 85
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// gFastSinLookup[i] = floor(256 * sin(iπ / 2048))
|
||||||
|
static const s16 gFastSinLookup[] = {
|
||||||
|
0, 0, 0, 1, 1, 1, 2, 2,
|
||||||
|
3, 3, 3, 4, 4, 5, 5, 5,
|
||||||
|
6, 6, 7, 7, 7, 8, 8, 9,
|
||||||
|
9, 9, 10, 10, 10, 11, 11, 12,
|
||||||
|
12, 12, 13, 13, 14, 14, 14, 15,
|
||||||
|
15, 16, 16, 16, 17, 17, 18, 18,
|
||||||
|
18, 19, 19, 20, 20, 20, 21, 21,
|
||||||
|
21, 22, 22, 23, 23, 23, 24, 24,
|
||||||
|
25, 25, 25, 26, 26, 27, 27, 27,
|
||||||
|
28, 28, 28, 29, 29, 30, 30, 30,
|
||||||
|
31, 31, 32, 32, 32, 33, 33, 34,
|
||||||
|
34, 34, 35, 35, 36, 36, 36, 37,
|
||||||
|
37, 37, 38, 38, 39, 39, 39, 40,
|
||||||
|
40, 41, 41, 41, 42, 42, 42, 43,
|
||||||
|
43, 44, 44, 44, 45, 45, 46, 46,
|
||||||
|
46, 47, 47, 48, 48, 48, 49, 49,
|
||||||
|
49, 50, 50, 51, 51, 51, 52, 52,
|
||||||
|
53, 53, 53, 54, 54, 54, 55, 55,
|
||||||
|
56, 56, 56, 57, 57, 58, 58, 58,
|
||||||
|
59, 59, 59, 60, 60, 61, 61, 61,
|
||||||
|
62, 62, 62, 63, 63, 64, 64, 64,
|
||||||
|
65, 65, 66, 66, 66, 67, 67, 67,
|
||||||
|
68, 68, 69, 69, 69, 70, 70, 70,
|
||||||
|
71, 71, 72, 72, 72, 73, 73, 73,
|
||||||
|
74, 74, 75, 75, 75, 76, 76, 76,
|
||||||
|
77, 77, 78, 78, 78, 79, 79, 79,
|
||||||
|
80, 80, 81, 81, 81, 82, 82, 82,
|
||||||
|
83, 83, 84, 84, 84, 85, 85, 85,
|
||||||
|
86, 86, 86, 87, 87, 88, 88, 88,
|
||||||
|
89, 89, 89, 90, 90, 91, 91, 91,
|
||||||
|
92, 92, 92, 93, 93, 93, 94, 94,
|
||||||
|
95, 95, 95, 96, 96, 96, 97, 97,
|
||||||
|
97, 98, 98, 99, 99, 99, 100, 100,
|
||||||
|
100, 101, 101, 101, 102, 102, 103, 103,
|
||||||
|
103, 104, 104, 104, 105, 105, 105, 106,
|
||||||
|
106, 106, 107, 107, 108, 108, 108, 109,
|
||||||
|
109, 109, 110, 110, 110, 111, 111, 111,
|
||||||
|
112, 112, 112, 113, 113, 114, 114, 114,
|
||||||
|
115, 115, 115, 116, 116, 116, 117, 117,
|
||||||
|
117, 118, 118, 118, 119, 119, 119, 120,
|
||||||
|
120, 121, 121, 121, 122, 122, 122, 123,
|
||||||
|
123, 123, 124, 124, 124, 125, 125, 125,
|
||||||
|
126, 126, 126, 127, 127, 127, 128, 128,
|
||||||
|
128, 129, 129, 129, 130, 130, 130, 131,
|
||||||
|
131, 131, 132, 132, 132, 133, 133, 133,
|
||||||
|
134, 134, 134, 135, 135, 135, 136, 136,
|
||||||
|
136, 137, 137, 137, 138, 138, 138, 139,
|
||||||
|
139, 139, 140, 140, 140, 141, 141, 141,
|
||||||
|
142, 142, 142, 143, 143, 143, 144, 144,
|
||||||
|
144, 145, 145, 145, 146, 146, 146, 147,
|
||||||
|
147, 147, 148, 148, 148, 149, 149, 149,
|
||||||
|
149, 150, 150, 150, 151, 151, 151, 152,
|
||||||
|
152, 152, 153, 153, 153, 154, 154, 154,
|
||||||
|
155, 155, 155, 155, 156, 156, 156, 157,
|
||||||
|
157, 157, 158, 158, 158, 159, 159, 159,
|
||||||
|
159, 160, 160, 160, 161, 161, 161, 162,
|
||||||
|
162, 162, 163, 163, 163, 163, 164, 164,
|
||||||
|
164, 165, 165, 165, 166, 166, 166, 166,
|
||||||
|
167, 167, 167, 168, 168, 168, 168, 169,
|
||||||
|
169, 169, 170, 170, 170, 171, 171, 171,
|
||||||
|
171, 172, 172, 172, 173, 173, 173, 173,
|
||||||
|
174, 174, 174, 175, 175, 175, 175, 176,
|
||||||
|
176, 176, 177, 177, 177, 177, 178, 178,
|
||||||
|
178, 179, 179, 179, 179, 180, 180, 180,
|
||||||
|
181, 181, 181, 181, 182, 182, 182, 182,
|
||||||
|
183, 183, 183, 184, 184, 184, 184, 185,
|
||||||
|
185, 185, 185, 186, 186, 186, 187, 187,
|
||||||
|
187, 187, 188, 188, 188, 188, 189, 189,
|
||||||
|
189, 189, 190, 190, 190, 190, 191, 191,
|
||||||
|
191, 192, 192, 192, 192, 193, 193, 193,
|
||||||
|
193, 194, 194, 194, 194, 195, 195, 195,
|
||||||
|
195, 196, 196, 196, 196, 197, 197, 197,
|
||||||
|
197, 198, 198, 198, 198, 199, 199, 199,
|
||||||
|
199, 200, 200, 200, 200, 201, 201, 201,
|
||||||
|
201, 202, 202, 202, 202, 203, 203, 203,
|
||||||
|
203, 203, 204, 204, 204, 204, 205, 205,
|
||||||
|
205, 205, 206, 206, 206, 206, 207, 207,
|
||||||
|
207, 207, 207, 208, 208, 208, 208, 209,
|
||||||
|
209, 209, 209, 209, 210, 210, 210, 210,
|
||||||
|
211, 211, 211, 211, 211, 212, 212, 212,
|
||||||
|
212, 213, 213, 213, 213, 213, 214, 214,
|
||||||
|
214, 214, 215, 215, 215, 215, 215, 216,
|
||||||
|
216, 216, 216, 216, 217, 217, 217, 217,
|
||||||
|
217, 218, 218, 218, 218, 218, 219, 219,
|
||||||
|
219, 219, 219, 220, 220, 220, 220, 220,
|
||||||
|
221, 221, 221, 221, 221, 222, 222, 222,
|
||||||
|
222, 222, 223, 223, 223, 223, 223, 224,
|
||||||
|
224, 224, 224, 224, 225, 225, 225, 225,
|
||||||
|
225, 225, 226, 226, 226, 226, 226, 227,
|
||||||
|
227, 227, 227, 227, 227, 228, 228, 228,
|
||||||
|
228, 228, 229, 229, 229, 229, 229, 229,
|
||||||
|
230, 230, 230, 230, 230, 230, 231, 231,
|
||||||
|
231, 231, 231, 231, 232, 232, 232, 232,
|
||||||
|
232, 232, 233, 233, 233, 233, 233, 233,
|
||||||
|
234, 234, 234, 234, 234, 234, 234, 235,
|
||||||
|
235, 235, 235, 235, 235, 236, 236, 236,
|
||||||
|
236, 236, 236, 236, 237, 237, 237, 237,
|
||||||
|
237, 237, 237, 238, 238, 238, 238, 238,
|
||||||
|
238, 238, 239, 239, 239, 239, 239, 239,
|
||||||
|
239, 240, 240, 240, 240, 240, 240, 240,
|
||||||
|
241, 241, 241, 241, 241, 241, 241, 241,
|
||||||
|
242, 242, 242, 242, 242, 242, 242, 242,
|
||||||
|
243, 243, 243, 243, 243, 243, 243, 243,
|
||||||
|
244, 244, 244, 244, 244, 244, 244, 244,
|
||||||
|
244, 245, 245, 245, 245, 245, 245, 245,
|
||||||
|
245, 245, 246, 246, 246, 246, 246, 246,
|
||||||
|
246, 246, 246, 247, 247, 247, 247, 247,
|
||||||
|
247, 247, 247, 247, 247, 248, 248, 248,
|
||||||
|
248, 248, 248, 248, 248, 248, 248, 248,
|
||||||
|
249, 249, 249, 249, 249, 249, 249, 249,
|
||||||
|
249, 249, 249, 250, 250, 250, 250, 250,
|
||||||
|
250, 250, 250, 250, 250, 250, 250, 251,
|
||||||
|
251, 251, 251, 251, 251, 251, 251, 251,
|
||||||
|
251, 251, 251, 251, 251, 252, 252, 252,
|
||||||
|
252, 252, 252, 252, 252, 252, 252, 252,
|
||||||
|
252, 252, 252, 252, 252, 253, 253, 253,
|
||||||
|
253, 253, 253, 253, 253, 253, 253, 253,
|
||||||
|
253, 253, 253, 253, 253, 253, 253, 254,
|
||||||
|
254, 254, 254, 254, 254, 254, 254, 254,
|
||||||
|
254, 254, 254, 254, 254, 254, 254, 254,
|
||||||
|
254, 254, 254, 254, 254, 254, 254, 255,
|
||||||
|
255, 255, 255, 255, 255, 255, 255, 255,
|
||||||
|
255, 255, 255, 255, 255, 255, 255, 255,
|
||||||
|
255, 255, 255, 255, 255, 255, 255, 255,
|
||||||
|
255, 255, 255, 255, 255, 255, 255, 255,
|
||||||
|
255, 255, 255, 255, 255, 255, 255, 255,
|
||||||
|
255, 255, 255, 255, 255, 255, 255, 255,
|
||||||
|
255, 255, 255, 255, 255, 255, 255, 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const u32 gFastUnknownFn1Lookup[] = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 1,
|
||||||
|
1, 1, 1, 1, 1, 2, 2, 2,
|
||||||
|
2, 2, 2, 3, 3, 3, 3, 3,
|
||||||
|
3, 3, 4, 4, 4, 4, 4, 4,
|
||||||
|
5, 5, 5, 5, 5, 5, 6, 6,
|
||||||
|
6, 6, 6, 6, 6, 7, 7, 7,
|
||||||
|
7, 7, 7, 8, 8, 8, 8, 8,
|
||||||
|
8, 8, 9, 9, 9, 9, 9, 9,
|
||||||
|
9, 10, 10, 10, 10, 10, 10, 11,
|
||||||
|
11, 11, 11, 11, 11, 11, 12, 12,
|
||||||
|
12, 12, 12, 12, 12, 13, 13, 13,
|
||||||
|
13, 13, 13, 13, 14, 14, 14, 14,
|
||||||
|
14, 14, 14, 15, 15, 15, 15, 15,
|
||||||
|
15, 15, 15, 16, 16, 16, 16, 16,
|
||||||
|
16, 16, 17, 17, 17, 17, 17, 17,
|
||||||
|
17, 17, 18, 18, 18, 18, 18, 18,
|
||||||
|
18, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 20, 20, 20, 20, 20, 20, 20,
|
||||||
|
20, 20, 21, 21, 21, 21, 21, 21,
|
||||||
|
21, 21, 22, 22, 22, 22, 22, 22,
|
||||||
|
22, 22, 22, 23, 23, 23, 23, 23,
|
||||||
|
23, 23, 23, 23, 24, 24, 24, 24,
|
||||||
|
24, 24, 24, 24, 24, 25, 25, 25,
|
||||||
|
25, 25, 25, 25, 25, 25, 26, 26,
|
||||||
|
26, 26, 26, 26, 26, 26, 26, 26,
|
||||||
|
27, 27, 27, 27, 27, 27, 27, 27,
|
||||||
|
27, 27, 27, 28, 28, 28, 28, 28,
|
||||||
|
28, 28, 28, 28, 28, 29, 29, 29,
|
||||||
|
29, 29, 29, 29, 29, 29, 29, 29,
|
||||||
|
29, 30, 30, 30, 30, 30, 30, 30,
|
||||||
|
30, 30, 30, 30, 31, 31, 31, 31,
|
||||||
|
31, 31, 31, 31, 31, 31, 31, 31,
|
||||||
|
};
|
94
src/data/story_missions.h
Normal file
94
src/data/story_missions.h
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
static const u8 gUnknown_8109C94[];
|
||||||
|
static const u8 gUnknown_8109C80[];
|
||||||
|
static const u8 gUnknown_8109C70[];
|
||||||
|
static const u8 gUnknown_8109C60[];
|
||||||
|
static const u8 gUnknown_8109C4C[];
|
||||||
|
static const u8 gUnknown_8109C3C[];
|
||||||
|
static const u8 gUnknown_8109C30[];
|
||||||
|
static const u8 gUnknown_8109C24[];
|
||||||
|
static const u8 gUnknown_8109C24[];
|
||||||
|
static const u8 gUnknown_8109C24[];
|
||||||
|
static const u8 gUnknown_8109C14[];
|
||||||
|
static const u8 gUnknown_8109C00[];
|
||||||
|
static const u8 gUnknown_8109BE8[];
|
||||||
|
static const u8 gUnknown_8109BC8[];
|
||||||
|
static const u8 gUnknown_8109BB4[];
|
||||||
|
static const u8 gUnknown_8109BA0[];
|
||||||
|
static const u8 gUnknown_8109B8C[];
|
||||||
|
static const u8 gUnknown_8109B78[];
|
||||||
|
static const u8 gUnknown_8109B60[];
|
||||||
|
static const u8 gUnknown_8109C30[];
|
||||||
|
static const u8 gUnknown_8109B4C[];
|
||||||
|
static const u8 gUnknown_8109B38[];
|
||||||
|
static const u8 gUnknown_8109B24[];
|
||||||
|
static const u8 gUnknown_8109B10[];
|
||||||
|
static const u8 gUnknown_8109AF8[];
|
||||||
|
static const u8 gUnknown_8109AE8[];
|
||||||
|
static const u8 gUnknown_8109AD8[];
|
||||||
|
static const u8 gUnknown_8109AC4[];
|
||||||
|
static const u8 gUnknown_8109AB0[];
|
||||||
|
static const u8 gUnknown_8109C14[];
|
||||||
|
static const u8 gUnknown_8109A94[];
|
||||||
|
|
||||||
|
static const MissionText gStoryMissionText[] = {
|
||||||
|
{ gUnknown_8109C94, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109C80, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109C70, 0, 1, 0, 0 },
|
||||||
|
{ gUnknown_8109C60, 2, 3, 0, 0 },
|
||||||
|
{ gUnknown_8109C4C, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109C3C, 4, 5, 0, 0 },
|
||||||
|
{ gUnknown_8109C30, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109C24, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109C24, 6, 7, 0, 0 },
|
||||||
|
{ gUnknown_8109C24, 8, 9, 0, 0 },
|
||||||
|
{ gUnknown_8109C14, -1, 10, 0, 0 },
|
||||||
|
{ gUnknown_8109C00, 11, 12, 0, 0 },
|
||||||
|
{ gUnknown_8109BE8, 14, 15, 0, 0 },
|
||||||
|
{ gUnknown_8109BC8, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109BB4, 16, 17, 0, 0 },
|
||||||
|
{ gUnknown_8109BA0, -1, 33, 0, 0 },
|
||||||
|
{ gUnknown_8109B8C, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109B78, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109B60, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109C30, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109B4C, 20, 21, 0, 0 },
|
||||||
|
{ gUnknown_8109B38, 22, 23, 0, 0 },
|
||||||
|
{ gUnknown_8109B24, 24, 25, 0, 0 },
|
||||||
|
{ gUnknown_8109B10, -1, 26, 0, 0 },
|
||||||
|
{ gUnknown_8109AF8, 18, 19, 0, 0 },
|
||||||
|
{ gUnknown_8109AE8, 27, 28, 0, 0 },
|
||||||
|
{ gUnknown_8109AD8, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109AC4, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109AB0, -1, 32, 0, 0 },
|
||||||
|
{ gUnknown_8109C14, -1, -1, 0, 0 },
|
||||||
|
{ gUnknown_8109A94, -1, -1, 0, 0 },
|
||||||
|
{ NULL, -1, -1, 0, 0 },
|
||||||
|
};
|
||||||
|
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109A94[] = _("Break Gardevoir{APOSTROPHE}s curse.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109AB0[] = _("Rescue Medicham.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109AC4[] = _("Investigate Relic.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109AD8[] = _("Rescue Latias.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109AE8[] = _("Catch thief.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109AF8[] = _("Meet toughest Pokémon.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109B10[] = _("Mirage Pokémon 4");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109B24[] = _("Mirage Pokémon 3");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109B38[] = _("Mirage Pokémon 2");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109B4C[] = _("Mirage Pokémon 1");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109B60[] = _("Check mystery Pokémon.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109B78[] = _("Meet sea guardian.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109B8C[] = _("Explore seafloor.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109BA0[] = _("Rescue Smeargle.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109BB4[] = _("Punish bad Mankey.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109BC8[] = _("{COLOR_1 YELLOW_3}Scenario Progress Dummy{END_COLOR_TEXT_1}");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109BE8[] = _("Seek Rayquaza{APOSTROPHE}s help.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109C00[] = _("Rescue Alakazam.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109C14[] = _("Meet Ninetales.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109C24[] = _("Fugitive");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109C30[] = _("Meet Xatu.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109C3C[] = _("Rescue Shiftry.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109C4C[] = _("Rescue Jumpluff.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109C60[] = _("Rescue Metapod.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109C70[] = _("Rescue Diglett.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109C80[] = _("Rescue Magnemite.");
|
||||||
|
ALIGNED(4) const u8 gUnknown_8109C94[] = _("Rescue Caterpie.");
|
@ -75,7 +75,7 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
|||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
if (pokemonInfo->flags & MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY)
|
if (pokemonInfo->flags & MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->immobilizeStatus == STATUS_PETRIFIED)
|
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||||
{
|
{
|
||||||
SendImmobilizeEndMessage(pokemon, pokemon);
|
SendImmobilizeEndMessage(pokemon, pokemon);
|
||||||
}
|
}
|
||||||
@ -110,10 +110,10 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
|||||||
{
|
{
|
||||||
target = gDungeon->allPokemon[i];
|
target = gDungeon->allPokemon[i];
|
||||||
if (EntityExists(target) &&
|
if (EntityExists(target) &&
|
||||||
target->info->waitingStatus == STATUS_DECOY &&
|
target->info->waitingStruct.waitingStatus == STATUS_DECOY &&
|
||||||
CanSeeTarget(pokemon, target))
|
CanSeeTarget(pokemon, target))
|
||||||
{
|
{
|
||||||
bool8 enemyDecoy = target->info->enemyDecoy;
|
bool8 enemyDecoy = target->info->waitingStruct.enemyDecoy;
|
||||||
u8 targetingDecoy = TARGETING_DECOY_TEAM;
|
u8 targetingDecoy = TARGETING_DECOY_TEAM;
|
||||||
if (enemyDecoy)
|
if (enemyDecoy)
|
||||||
{
|
{
|
||||||
@ -144,7 +144,7 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->volatileStatus == STATUS_CONFUSED)
|
if (pokemonInfo->volatileStatus.volatileStatus == STATUS_CONFUSED)
|
||||||
{
|
{
|
||||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (pokemonInfo->volatileStatus == STATUS_CONFUSED)
|
if (pokemonInfo->volatileStatus.volatileStatus == STATUS_CONFUSED)
|
||||||
{
|
{
|
||||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||||
}
|
}
|
||||||
@ -178,7 +178,7 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pokemonInfo->aiNotNextToTarget = FALSE;
|
pokemonInfo->aiTarget.aiNotNextToTarget = FALSE;
|
||||||
pokemonInfo->aiNextToTarget = FALSE;
|
pokemonInfo->aiNextToTarget = FALSE;
|
||||||
pokemonInfo->waiting = FALSE;
|
pokemonInfo->waiting = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -67,17 +67,17 @@ void DecideAttack(Entity *pokemon)
|
|||||||
if (CannotAttack(pokemon, FALSE) ||
|
if (CannotAttack(pokemon, FALSE) ||
|
||||||
ShouldMonsterRunAwayAndShowEffect(pokemon, TRUE) ||
|
ShouldMonsterRunAwayAndShowEffect(pokemon, TRUE) ||
|
||||||
HasTactic(pokemon, TACTIC_KEEP_YOUR_DISTANCE) ||
|
HasTactic(pokemon, TACTIC_KEEP_YOUR_DISTANCE) ||
|
||||||
(pokemonInfo->volatileStatus == STATUS_CONFUSED && DungeonRandOutcome(gConfusedAttackChance)))
|
(pokemonInfo->volatileStatus.volatileStatus == STATUS_CONFUSED && DungeonRandOutcome(gConfusedAttackChance)))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->chargingStatus != STATUS_NONE)
|
if (pokemonInfo->charging.chargingStatus != STATUS_NONE)
|
||||||
{
|
{
|
||||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->moves[i].moveFlags & MOVE_FLAG_EXISTS &&
|
if (pokemonInfo->moves[i].moveFlags & MOVE_FLAG_EXISTS &&
|
||||||
MoveMatchesChargingStatus(pokemon, &pokemonInfo->moves[i]) &&
|
MoveMatchesChargingStatus(pokemon, &pokemonInfo->moves[i]) &&
|
||||||
pokemonInfo->chargingStatusMoveIndex == i)
|
pokemonInfo->charging.chargingStatusMoveIndex == i)
|
||||||
{
|
{
|
||||||
s32 chosenMoveIndex;
|
s32 chosenMoveIndex;
|
||||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_USE_MOVE_AI);
|
SetMonsterActionFields(&pokemonInfo->action, ACTION_USE_MOVE_AI);
|
||||||
@ -189,7 +189,7 @@ void DecideAttack(Entity *pokemon)
|
|||||||
move->moveFlags & MOVE_FLAG_ENABLED_FOR_AI)
|
move->moveFlags & MOVE_FLAG_ENABLED_FOR_AI)
|
||||||
{
|
{
|
||||||
aiPossibleMove[i].canBeUsed = TRUE;
|
aiPossibleMove[i].canBeUsed = TRUE;
|
||||||
if (pokemonInfo->chargingStatus == chargeStatus)
|
if (pokemonInfo->charging.chargingStatus == chargeStatus)
|
||||||
{
|
{
|
||||||
if (move->id == MOVE_CHARGE)
|
if (move->id == MOVE_CHARGE)
|
||||||
{
|
{
|
||||||
@ -218,10 +218,10 @@ void DecideAttack(Entity *pokemon)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
aiPossibleMove[REGULAR_ATTACK_INDEX].weight = 0;
|
aiPossibleMove[REGULAR_ATTACK_INDEX].weight = 0;
|
||||||
if (!IQSkillIsEnabled(pokemon, IQ_EXCLUSIVE_MOVE_USER) && pokemonInfo->chargingStatus != chargeStatus)
|
if (!IQSkillIsEnabled(pokemon, IQ_EXCLUSIVE_MOVE_USER) && pokemonInfo->charging.chargingStatus != chargeStatus)
|
||||||
{
|
{
|
||||||
aiPossibleMove[REGULAR_ATTACK_INDEX].canBeUsed = TRUE;
|
aiPossibleMove[REGULAR_ATTACK_INDEX].canBeUsed = TRUE;
|
||||||
if (pokemonInfo->chargingStatus == chargeStatus)
|
if (pokemonInfo->charging.chargingStatus == chargeStatus)
|
||||||
{
|
{
|
||||||
// Never reached? Charge already skips the regular attack in the outer block.
|
// Never reached? Charge already skips the regular attack in the outer block.
|
||||||
aiPossibleMove[REGULAR_ATTACK_INDEX].weight = 1;
|
aiPossibleMove[REGULAR_ATTACK_INDEX].weight = 1;
|
||||||
@ -353,7 +353,7 @@ s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move
|
|||||||
targetingFlags = GetMoveTargetAndRangeForPokemon(pokemon, move, TRUE);
|
targetingFlags = GetMoveTargetAndRangeForPokemon(pokemon, move, TRUE);
|
||||||
hasStatusChecker = IQSkillIsEnabled(pokemon, IQ_STATUS_CHECKER);
|
hasStatusChecker = IQSkillIsEnabled(pokemon, IQ_STATUS_CHECKER);
|
||||||
aiPossibleMove->canBeUsed = FALSE;
|
aiPossibleMove->canBeUsed = FALSE;
|
||||||
if ((pokemonInfo->volatileStatus == STATUS_TAUNTED && !MoveIgnoresTaunted(move)) ||
|
if ((pokemonInfo->volatileStatus.volatileStatus == STATUS_TAUNTED && !MoveIgnoresTaunted(move)) ||
|
||||||
(hasStatusChecker && !CanUseOnSelfWithStatusChecker(pokemon, move)))
|
(hasStatusChecker && !CanUseOnSelfWithStatusChecker(pokemon, move)))
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
@ -363,7 +363,7 @@ s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move
|
|||||||
rangeTargetingFlags == TARGETING_FLAG_TARGET_FRONTAL_CONE ||
|
rangeTargetingFlags == TARGETING_FLAG_TARGET_FRONTAL_CONE ||
|
||||||
rangeTargetingFlags == TARGETING_FLAG_TARGET_AROUND)
|
rangeTargetingFlags == TARGETING_FLAG_TARGET_AROUND)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->eyesightStatus == STATUS_BLINKER)
|
if (pokemonInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||||
{
|
{
|
||||||
u8 direction = pokemonInfo->action.direction;
|
u8 direction = pokemonInfo->action.direction;
|
||||||
i = direction; // Fixes a regswap.
|
i = direction; // Fixes a regswap.
|
||||||
@ -792,7 +792,7 @@ bool8 TargetRegularAttack(Entity *pokemon, u32 *targetDir, bool8 checkPetrified)
|
|||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
s32 numPotentialTargets = 0;
|
s32 numPotentialTargets = 0;
|
||||||
s32 direction = pokemonInfo->action.direction;
|
s32 direction = pokemonInfo->action.direction;
|
||||||
s32 faceTurnLimit = pokemonInfo->eyesightStatus == STATUS_BLINKER ? 1 : 8;
|
s32 faceTurnLimit = pokemonInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER ? 1 : 8;
|
||||||
s32 i;
|
s32 i;
|
||||||
s32 potentialAttackTargetDirections[NUM_DIRECTIONS];
|
s32 potentialAttackTargetDirections[NUM_DIRECTIONS];
|
||||||
s32 potentialAttackTargetWeights[NUM_DIRECTIONS];
|
s32 potentialAttackTargetWeights[NUM_DIRECTIONS];
|
||||||
@ -808,7 +808,7 @@ bool8 TargetRegularAttack(Entity *pokemon, u32 *targetDir, bool8 checkPetrified)
|
|||||||
GetEntityType(target) == ENTITY_MONSTER &&
|
GetEntityType(target) == ENTITY_MONSTER &&
|
||||||
CanAttackInDirection(pokemon, direction) &&
|
CanAttackInDirection(pokemon, direction) &&
|
||||||
CanTarget(pokemon, target, FALSE, checkPetrified) == TARGET_CAPABILITY_CAN_TARGET &&
|
CanTarget(pokemon, target, FALSE, checkPetrified) == TARGET_CAPABILITY_CAN_TARGET &&
|
||||||
(!hasStatusChecker || target->info->immobilizeStatus != STATUS_FROZEN))
|
(!hasStatusChecker || target->info->immobilize.immobilizeStatus != STATUS_FROZEN))
|
||||||
{
|
{
|
||||||
potentialAttackTargetDirections[numPotentialTargets] = direction;
|
potentialAttackTargetDirections[numPotentialTargets] = direction;
|
||||||
potentialAttackTargetWeights[numPotentialTargets] = WeightMove(pokemon, TARGETING_FLAG_TARGET_OTHER, target, TYPE_NONE);
|
potentialAttackTargetWeights[numPotentialTargets] = WeightMove(pokemon, TARGETING_FLAG_TARGET_OTHER, target, TYPE_NONE);
|
||||||
|
@ -202,7 +202,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ITEM_ALLURE_SEED:
|
case ITEM_ALLURE_SEED:
|
||||||
if (pokemonInfo->eyesightStatus != STATUS_CROSS_EYED)
|
if (pokemonInfo->eyesightStatus.eyesightStatus != STATUS_CROSS_EYED)
|
||||||
{
|
{
|
||||||
if (CanTargetAdjacentPokemon(targetPokemon))
|
if (CanTargetAdjacentPokemon(targetPokemon))
|
||||||
{
|
{
|
||||||
@ -219,7 +219,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ITEM_CHERI_BERRY:
|
case ITEM_CHERI_BERRY:
|
||||||
if (pokemonInfo->nonVolatileStatus != STATUS_PARALYSIS)
|
if (pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_PARALYSIS)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ITEM_TOTTER_SEED:
|
case ITEM_TOTTER_SEED:
|
||||||
if (pokemonInfo->volatileStatus != STATUS_CONFUSED)
|
if (pokemonInfo->volatileStatus.volatileStatus != STATUS_CONFUSED)
|
||||||
{
|
{
|
||||||
if (CanTargetAdjacentPokemon(targetPokemon))
|
if (CanTargetAdjacentPokemon(targetPokemon))
|
||||||
{
|
{
|
||||||
@ -250,8 +250,8 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ITEM_PECHA_BERRY:
|
case ITEM_PECHA_BERRY:
|
||||||
if (pokemonInfo->nonVolatileStatus != STATUS_POISONED &&
|
if (pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_POISONED &&
|
||||||
pokemonInfo->nonVolatileStatus != STATUS_BADLY_POISONED)
|
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ITEM_BLINKER_SEED:
|
case ITEM_BLINKER_SEED:
|
||||||
if (pokemonInfo->eyesightStatus != STATUS_BLINKER)
|
if (pokemonInfo->eyesightStatus.eyesightStatus != STATUS_BLINKER)
|
||||||
{
|
{
|
||||||
if (CanTargetAdjacentPokemon(targetPokemon))
|
if (CanTargetAdjacentPokemon(targetPokemon))
|
||||||
{
|
{
|
||||||
@ -316,9 +316,9 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
|||||||
itemWeight = 40;
|
itemWeight = 40;
|
||||||
break;
|
break;
|
||||||
case ITEM_SLEEP_SEED:
|
case ITEM_SLEEP_SEED:
|
||||||
if (pokemonInfo->sleep != STATUS_SLEEP &&
|
if (pokemonInfo->sleep.sleep != STATUS_SLEEP &&
|
||||||
pokemonInfo->sleep != STATUS_NAPPING &&
|
pokemonInfo->sleep.sleep != STATUS_NAPPING &&
|
||||||
pokemonInfo->sleep != STATUS_NIGHTMARE)
|
pokemonInfo->sleep.sleep != STATUS_NIGHTMARE)
|
||||||
{
|
{
|
||||||
if (CanTargetAdjacentPokemon(targetPokemon))
|
if (CanTargetAdjacentPokemon(targetPokemon))
|
||||||
{
|
{
|
||||||
@ -335,7 +335,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ITEM_CHESTO_BERRY:
|
case ITEM_CHESTO_BERRY:
|
||||||
if (pokemonInfo->sleep != STATUS_SLEEPLESS)
|
if (pokemonInfo->sleep.sleep != STATUS_SLEEPLESS)
|
||||||
{
|
{
|
||||||
itemWeight = 5;
|
itemWeight = 5;
|
||||||
}
|
}
|
||||||
@ -358,7 +358,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
|||||||
itemWeight = 80;
|
itemWeight = 80;
|
||||||
break;
|
break;
|
||||||
case ITEM_RAWST_BERRY:
|
case ITEM_RAWST_BERRY:
|
||||||
if (pokemonInfo->nonVolatileStatus == STATUS_BURN)
|
if (pokemonInfo->nonVolatile.nonVolatileStatus == STATUS_BURN)
|
||||||
{
|
{
|
||||||
return 50;
|
return 50;
|
||||||
}
|
}
|
||||||
@ -388,7 +388,7 @@ u32 EvaluateItem(Entity *targetPokemon, Item *item, u32 itemTargetFlags)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ITEM_STUN_SEED:
|
case ITEM_STUN_SEED:
|
||||||
if (pokemonInfo->immobilizeStatus == STATUS_PETRIFIED)
|
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ void TargetThrownItem(Entity *pokemon, Entity *targetPokemon, Item *item, s32 ta
|
|||||||
distanceX = distanceX < 0 ? -distanceX : distanceX;
|
distanceX = distanceX < 0 ? -distanceX : distanceX;
|
||||||
distanceY = pokemon->pos.y - targetPokemon->pos.y;
|
distanceY = pokemon->pos.y - targetPokemon->pos.y;
|
||||||
distanceY = distanceY < 0 ? -distanceY : distanceY;
|
distanceY = distanceY < 0 ? -distanceY : distanceY;
|
||||||
if (pokemon->info->itemStatus == STATUS_NONE)
|
if (pokemon->info->itemStatus.itemStatus == STATUS_NONE)
|
||||||
{
|
{
|
||||||
s32 distance = distanceY < distanceX ? distanceX : distanceY;
|
s32 distance = distanceY < distanceX ? distanceX : distanceY;
|
||||||
if (distance > RANGED_ATTACK_RANGE)
|
if (distance > RANGED_ATTACK_RANGE)
|
||||||
|
@ -100,7 +100,7 @@ Entity* GetLeaderIfVisible(Entity *pokemon)
|
|||||||
{
|
{
|
||||||
Entity *leader = GetLeader();
|
Entity *leader = GetLeader();
|
||||||
if (leader &&
|
if (leader &&
|
||||||
leader->info->waitingStatus != STATUS_DECOY &&
|
leader->info->waitingStruct.waitingStatus != STATUS_DECOY &&
|
||||||
CanTarget(pokemon, leader, FALSE, FALSE) == TARGET_CAPABILITY_CANNOT_ATTACK &&
|
CanTarget(pokemon, leader, FALSE, FALSE) == TARGET_CAPABILITY_CANNOT_ATTACK &&
|
||||||
CanTargetEntity(pokemon, leader))
|
CanTargetEntity(pokemon, leader))
|
||||||
{
|
{
|
||||||
@ -173,23 +173,23 @@ bool8 sub_8072CF4(Entity *entity)
|
|||||||
gUnknown_202F222 = 0;
|
gUnknown_202F222 = 0;
|
||||||
switch(info->action.action) {
|
switch(info->action.action) {
|
||||||
case ACTION_WALK:
|
case ACTION_WALK:
|
||||||
if(info->immobilizeStatus == STATUS_SHADOW_HOLD)
|
if(info->immobilize.immobilizeStatus == STATUS_SHADOW_HOLD)
|
||||||
{
|
{
|
||||||
goto _282;
|
goto _282;
|
||||||
}
|
}
|
||||||
else if(info->immobilizeStatus == STATUS_CONSTRICTION)
|
else if(info->immobilize.immobilizeStatus == STATUS_CONSTRICTION)
|
||||||
{
|
{
|
||||||
goto _282;
|
goto _282;
|
||||||
}
|
}
|
||||||
else if(info->immobilizeStatus == STATUS_INGRAIN)
|
else if(info->immobilize.immobilizeStatus == STATUS_INGRAIN)
|
||||||
{
|
{
|
||||||
goto _282;
|
goto _282;
|
||||||
}
|
}
|
||||||
else if(info->immobilizeStatus == STATUS_WRAP)
|
else if(info->immobilize.immobilizeStatus == STATUS_WRAP)
|
||||||
{
|
{
|
||||||
goto _282;
|
goto _282;
|
||||||
}
|
}
|
||||||
else if(info->immobilizeStatus == STATUS_WRAPPED)
|
else if(info->immobilize.immobilizeStatus == STATUS_WRAPPED)
|
||||||
{
|
{
|
||||||
_282:
|
_282:
|
||||||
info->action.action = ACTION_NOTHING;
|
info->action.action = ACTION_NOTHING;
|
||||||
@ -214,7 +214,7 @@ bool8 sub_8072CF4(Entity *entity)
|
|||||||
pos.y = entity->pos.y;
|
pos.y = entity->pos.y;
|
||||||
sub_80694C0(entity,pos1.x,pos1.y,0);
|
sub_80694C0(entity,pos1.x,pos1.y,0);
|
||||||
sub_8074FB0(entity,(info->action).direction,&pos);
|
sub_8074FB0(entity,(info->action).direction,&pos);
|
||||||
if (((IQSkillIsEnabled(entity, IQ_SUPER_MOBILE)) && (info->transformStatus != STATUS_MOBILE)) &&
|
if (((IQSkillIsEnabled(entity, IQ_SUPER_MOBILE)) && (info->transformStatus.transformStatus != STATUS_MOBILE)) &&
|
||||||
(!HasHeldItem(entity,ITEM_MOBILE_SCARF))) {
|
(!HasHeldItem(entity,ITEM_MOBILE_SCARF))) {
|
||||||
sub_804AE08(&entity->pos);
|
sub_804AE08(&entity->pos);
|
||||||
}
|
}
|
||||||
|
@ -46,9 +46,9 @@ const s32 gFaceDirectionIncrements[] = {0, 1, -1, 2, -2, 3, -3, 4, 0, -1, 1, -2,
|
|||||||
void MoveIfPossible(Entity *pokemon, bool8 showRunAwayEffect)
|
void MoveIfPossible(Entity *pokemon, bool8 showRunAwayEffect)
|
||||||
{
|
{
|
||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
pokemonInfo->aiNotNextToTarget = FALSE;
|
pokemonInfo->aiTarget.aiNotNextToTarget = FALSE;
|
||||||
pokemonInfo->aiTargetingEnemy = FALSE;
|
pokemonInfo->aiTarget.aiTargetingEnemy = FALSE;
|
||||||
pokemonInfo->aiTurningAround = FALSE;
|
pokemonInfo->aiTarget.aiTurningAround = FALSE;
|
||||||
if (HasTactic(pokemon, TACTIC_BE_PATIENT))
|
if (HasTactic(pokemon, TACTIC_BE_PATIENT))
|
||||||
{
|
{
|
||||||
u32 maxHPStat = pokemonInfo->maxHPStat;
|
u32 maxHPStat = pokemonInfo->maxHPStat;
|
||||||
@ -178,7 +178,7 @@ bool8 ChooseTargetPosition(Entity *pokemon)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!pokemonInfo->isNotTeamMember && target->info->immobilizeStatus == STATUS_PETRIFIED)
|
else if (!pokemonInfo->isNotTeamMember && target->info->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -229,11 +229,11 @@ bool8 ChooseTargetPosition(Entity *pokemon)
|
|||||||
}
|
}
|
||||||
if (targetIndex > -1)
|
if (targetIndex > -1)
|
||||||
{
|
{
|
||||||
pokemonInfo->aiObjective = AI_CHASE_TARGET;
|
pokemonInfo->aiTarget.aiObjective = AI_CHASE_TARGET;
|
||||||
pokemonInfo->aiTargetPos = possibleTargets[targetIndex]->pos;
|
pokemonInfo->aiTarget.aiTargetPos = possibleTargets[targetIndex]->pos;
|
||||||
pokemonInfo->aiTarget = possibleTargets[targetIndex];
|
pokemonInfo->aiTarget.aiTarget = possibleTargets[targetIndex];
|
||||||
pokemonInfo->aiTargetSpawnGenID = pokemonInfo->aiTarget->spawnGenID;
|
pokemonInfo->aiTarget.aiTargetSpawnGenID = pokemonInfo->aiTarget.aiTarget->spawnGenID;
|
||||||
pokemonInfo->aiTargetingEnemy = TRUE;
|
pokemonInfo->aiTarget.aiTargetingEnemy = TRUE;
|
||||||
pokemonInfo->moveRandomly = FALSE;
|
pokemonInfo->moveRandomly = FALSE;
|
||||||
if (HasTactic(pokemon, TACTIC_KEEP_YOUR_DISTANCE) && !CanSeeTeammate(pokemon))
|
if (HasTactic(pokemon, TACTIC_KEEP_YOUR_DISTANCE) && !CanSeeTeammate(pokemon))
|
||||||
{
|
{
|
||||||
@ -251,7 +251,7 @@ bool8 ChooseTargetPosition(Entity *pokemon)
|
|||||||
}
|
}
|
||||||
if (distanceY < 2)
|
if (distanceY < 2)
|
||||||
{
|
{
|
||||||
pokemonInfo->aiTurningAround = TRUE;
|
pokemonInfo->aiTarget.aiTurningAround = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -267,10 +267,10 @@ bool8 ChooseTargetPosition(Entity *pokemon)
|
|||||||
Entity *leader = GetLeaderIfVisible(pokemon);
|
Entity *leader = GetLeaderIfVisible(pokemon);
|
||||||
if (EntityExists(leader))
|
if (EntityExists(leader))
|
||||||
{
|
{
|
||||||
pokemonInfo->aiObjective = AI_CHASE_TARGET;
|
pokemonInfo->aiTarget.aiObjective = AI_CHASE_TARGET;
|
||||||
pokemonInfo->aiTargetPos = leader->pos;
|
pokemonInfo->aiTarget.aiTargetPos = leader->pos;
|
||||||
pokemonInfo->aiTarget = leader;
|
pokemonInfo->aiTarget.aiTarget = leader;
|
||||||
pokemonInfo->aiTargetSpawnGenID = leader->spawnGenID;
|
pokemonInfo->aiTarget.aiTargetSpawnGenID = leader->spawnGenID;
|
||||||
pokemonInfo->moveRandomly = FALSE;
|
pokemonInfo->moveRandomly = FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -313,31 +313,31 @@ bool8 ChooseTargetPosition(Entity *pokemon)
|
|||||||
Entity *object = GetTileSafe(x, y)->object;
|
Entity *object = GetTileSafe(x, y)->object;
|
||||||
if (object && GetEntityType(object) == ENTITY_ITEM)
|
if (object && GetEntityType(object) == ENTITY_ITEM)
|
||||||
{
|
{
|
||||||
pokemonInfo->aiObjective = AI_TAKE_ITEM;
|
pokemonInfo->aiTarget.aiObjective = AI_TAKE_ITEM;
|
||||||
pokemonInfo->aiTargetPos.x = x;
|
pokemonInfo->aiTarget.aiTargetPos.x = x;
|
||||||
pokemonInfo->aiTargetPos.y = y;
|
pokemonInfo->aiTarget.aiTargetPos.y = y;
|
||||||
pokemonInfo->aiTarget = NULL;
|
pokemonInfo->aiTarget.aiTarget = NULL;
|
||||||
pokemonInfo->aiTargetSpawnGenID = 0;
|
pokemonInfo->aiTarget.aiTargetSpawnGenID = 0;
|
||||||
pokemonInfo->moveRandomly = FALSE;
|
pokemonInfo->moveRandomly = FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((u8) (pokemonInfo->aiObjective - 1) <= 1)
|
if ((u8) (pokemonInfo->aiTarget.aiObjective - 1) <= 1)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->aiTarget)
|
if (pokemonInfo->aiTarget.aiTarget)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->aiTarget->spawnGenID == pokemonInfo->aiTargetSpawnGenID)
|
if (pokemonInfo->aiTarget.aiTarget->spawnGenID == pokemonInfo->aiTarget.aiTargetSpawnGenID)
|
||||||
{
|
{
|
||||||
EntityInfo *targetData = pokemonInfo->aiTarget->info;
|
EntityInfo *targetData = pokemonInfo->aiTarget.aiTarget->info;
|
||||||
s32 i;
|
s32 i;
|
||||||
for (i = 0; i < NUM_PREV_POS; i++)
|
for (i = 0; i < NUM_PREV_POS; i++)
|
||||||
{
|
{
|
||||||
if (CanTargetPosition(pokemon, &targetData->prevPos[i]))
|
if (CanTargetPosition(pokemon, &targetData->prevPos[i]))
|
||||||
{
|
{
|
||||||
pokemonInfo->aiObjective = AI_CHASE_REMEMBERED_TARGET;
|
pokemonInfo->aiTarget.aiObjective = AI_CHASE_REMEMBERED_TARGET;
|
||||||
pokemonInfo->aiTargetPos = targetData->prevPos[i];
|
pokemonInfo->aiTarget.aiTargetPos = targetData->prevPos[i];
|
||||||
pokemonInfo->moveRandomly = FALSE;
|
pokemonInfo->moveRandomly = FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -345,9 +345,9 @@ bool8 ChooseTargetPosition(Entity *pokemon)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pokemonInfo->aiObjective = AI_STAND_STILL;
|
pokemonInfo->aiTarget.aiObjective = AI_STAND_STILL;
|
||||||
pokemonInfo->aiTarget = NULL;
|
pokemonInfo->aiTarget.aiTarget = NULL;
|
||||||
pokemonInfo->aiTargetSpawnGenID = 0;
|
pokemonInfo->aiTarget.aiTargetSpawnGenID = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -363,20 +363,20 @@ void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect)
|
|||||||
s32 i;
|
s32 i;
|
||||||
struct CanMoveInDirectionInfo canMoveInDirectionInfo[6];
|
struct CanMoveInDirectionInfo canMoveInDirectionInfo[6];
|
||||||
bool8 pokemonInFront;
|
bool8 pokemonInFront;
|
||||||
pokemonInfo->targetPos = pokemonInfo->aiTargetPos;
|
pokemonInfo->targetPos = pokemonInfo->aiTarget.aiTargetPos;
|
||||||
if (pokemon->pos.x == pokemonInfo->aiTargetPos.x &&
|
if (pokemon->pos.x == pokemonInfo->aiTarget.aiTargetPos.x &&
|
||||||
pokemon->pos.y == pokemonInfo->aiTargetPos.y)
|
pokemon->pos.y == pokemonInfo->aiTarget.aiTargetPos.y)
|
||||||
{
|
{
|
||||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
direction = GetDirectionTowardsPosition(&pokemon->pos, &pokemonInfo->aiTargetPos);
|
direction = GetDirectionTowardsPosition(&pokemon->pos, &pokemonInfo->aiTarget.aiTargetPos);
|
||||||
if (ShouldAvoidFirstHit(pokemon, pokemonInfo->aiTargetingEnemy))
|
if (ShouldAvoidFirstHit(pokemon, pokemonInfo->aiTarget.aiTargetingEnemy))
|
||||||
{
|
{
|
||||||
if (pokemonInfo->aiObjective == AI_CHASE_TARGET &&
|
if (pokemonInfo->aiTarget.aiObjective == AI_CHASE_TARGET &&
|
||||||
IsTargetTwoTilesAway(&pokemon->pos, &pokemonInfo->aiTargetPos))
|
IsTargetTwoTilesAway(&pokemon->pos, &pokemonInfo->aiTarget.aiTargetPos))
|
||||||
{
|
{
|
||||||
s32 distance = GetDistance(&pokemon->pos, &pokemonInfo->aiTargetPos);
|
s32 distance = GetDistance(&pokemon->pos, &pokemonInfo->aiTarget.aiTargetPos);
|
||||||
if (distance == 2)
|
if (distance == 2)
|
||||||
{
|
{
|
||||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
||||||
@ -389,7 +389,7 @@ void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (pokemonInfo->aiTurningAround)
|
else if (pokemonInfo->aiTarget.aiTurningAround)
|
||||||
{
|
{
|
||||||
direction += 4;
|
direction += 4;
|
||||||
direction &= DIRECTION_MASK;
|
direction &= DIRECTION_MASK;
|
||||||
@ -404,31 +404,31 @@ void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect)
|
|||||||
{
|
{
|
||||||
if (!pokemonInfo->isNotTeamMember && !pokemonInfo->recalculateFollow)
|
if (!pokemonInfo->isNotTeamMember && !pokemonInfo->recalculateFollow)
|
||||||
{
|
{
|
||||||
pokemonInfo->aiNotNextToTarget = TRUE;
|
pokemonInfo->aiTarget.aiNotNextToTarget = TRUE;
|
||||||
pokemonInfo->aiNextToTarget = TRUE;
|
pokemonInfo->aiNextToTarget = TRUE;
|
||||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
||||||
pokemonInfo->waiting = TRUE;
|
pokemonInfo->waiting = TRUE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pokemon->pos.x + gAdjacentTileOffsets[direction].x == pokemonInfo->aiTargetPos.x &&
|
if (pokemon->pos.x + gAdjacentTileOffsets[direction].x == pokemonInfo->aiTarget.aiTargetPos.x &&
|
||||||
pokemon->pos.y + gAdjacentTileOffsets[direction].y == pokemonInfo->aiTargetPos.y)
|
pokemon->pos.y + gAdjacentTileOffsets[direction].y == pokemonInfo->aiTarget.aiTargetPos.y)
|
||||||
{
|
{
|
||||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
||||||
pokemonInfo->waiting = TRUE;
|
pokemonInfo->waiting = TRUE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pokemonInfo->aiNotNextToTarget = TRUE;
|
pokemonInfo->aiTarget.aiNotNextToTarget = TRUE;
|
||||||
}
|
}
|
||||||
canMoveInDirectionInfo[TURN_LEFT_45].tryTurn = canMoveInDirectionInfo[TURN_RIGHT_45].tryTurn = canMoveInDirectionInfo[TURN_LEFT_90].tryTurn = canMoveInDirectionInfo[TURN_RIGHT_90].tryTurn = canMoveInDirectionInfo[TURN_LEFT_135].tryTurn = TRUE;
|
canMoveInDirectionInfo[TURN_LEFT_45].tryTurn = canMoveInDirectionInfo[TURN_RIGHT_45].tryTurn = canMoveInDirectionInfo[TURN_LEFT_90].tryTurn = canMoveInDirectionInfo[TURN_RIGHT_90].tryTurn = canMoveInDirectionInfo[TURN_LEFT_135].tryTurn = TRUE;
|
||||||
if (!pokemonInfo->isNotTeamMember && (direction & 1) != 0)
|
if (!pokemonInfo->isNotTeamMember && (direction & 1) != 0)
|
||||||
{
|
{
|
||||||
s32 targetDistanceX = pokemon->pos.x - pokemonInfo->aiTargetPos.x;
|
s32 targetDistanceX = pokemon->pos.x - pokemonInfo->aiTarget.aiTargetPos.x;
|
||||||
s32 targetDistanceY;
|
s32 targetDistanceY;
|
||||||
if (targetDistanceX < 0)
|
if (targetDistanceX < 0)
|
||||||
{
|
{
|
||||||
targetDistanceX = -targetDistanceX;
|
targetDistanceX = -targetDistanceX;
|
||||||
}
|
}
|
||||||
targetDistanceY = pokemon->pos.y - pokemonInfo->aiTargetPos.y;
|
targetDistanceY = pokemon->pos.y - pokemonInfo->aiTarget.aiTargetPos.y;
|
||||||
if (targetDistanceY < 0)
|
if (targetDistanceY < 0)
|
||||||
{
|
{
|
||||||
targetDistanceY = -targetDistanceY;
|
targetDistanceY = -targetDistanceY;
|
||||||
@ -460,7 +460,7 @@ void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
turnLimit = TURN_LEFT_90;
|
turnLimit = TURN_LEFT_90;
|
||||||
if (ShouldMonsterRunAwayAndShowEffect(pokemon, showRunAwayEffect) || pokemonInfo->aiTurningAround)
|
if (ShouldMonsterRunAwayAndShowEffect(pokemon, showRunAwayEffect) || pokemonInfo->aiTarget.aiTurningAround)
|
||||||
{
|
{
|
||||||
turnLimit = TURN_LEFT_135;
|
turnLimit = TURN_LEFT_135;
|
||||||
}
|
}
|
||||||
@ -484,17 +484,17 @@ void DecideMovement(Entity *pokemon, bool8 showRunAwayEffect)
|
|||||||
}
|
}
|
||||||
if (canMoveInDirectionInfo[i].pokemonInFront)
|
if (canMoveInDirectionInfo[i].pokemonInFront)
|
||||||
{
|
{
|
||||||
pokemonInfo->aiNotNextToTarget = TRUE;
|
pokemonInfo->aiTarget.aiNotNextToTarget = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
||||||
pokemonInfo->waiting = TRUE;
|
pokemonInfo->waiting = TRUE;
|
||||||
if (pokemonInfo->isTeamLeader)
|
if (pokemonInfo->isTeamLeader)
|
||||||
{
|
{
|
||||||
pokemonInfo->aiNotNextToTarget = FALSE;
|
pokemonInfo->aiTarget.aiNotNextToTarget = FALSE;
|
||||||
pokemonInfo->aiNextToTarget = FALSE;
|
pokemonInfo->aiNextToTarget = FALSE;
|
||||||
}
|
}
|
||||||
else if (pokemonInfo->aiNotNextToTarget)
|
else if (pokemonInfo->aiTarget.aiNotNextToTarget)
|
||||||
{
|
{
|
||||||
pokemonInfo->aiNextToTarget = TRUE;
|
pokemonInfo->aiNextToTarget = TRUE;
|
||||||
}
|
}
|
||||||
@ -544,7 +544,7 @@ bool8 AvoidEnemies(Entity *pokemon)
|
|||||||
closestTargetDistance = distance;
|
closestTargetDistance = distance;
|
||||||
closestTarget = target;
|
closestTarget = target;
|
||||||
closestTargetRoom = GetEntityRoom(target);
|
closestTargetRoom = GetEntityRoom(target);
|
||||||
pokemonInfo->aiTargetPos = closestTarget->pos;
|
pokemonInfo->aiTarget.aiTargetPos = closestTarget->pos;
|
||||||
pokemonInfo->targetPos = closestTarget->pos;
|
pokemonInfo->targetPos = closestTarget->pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -575,15 +575,15 @@ bool8 AvoidEnemies(Entity *pokemon)
|
|||||||
if (targetDir == NUM_DIRECTIONS)
|
if (targetDir == NUM_DIRECTIONS)
|
||||||
{
|
{
|
||||||
targetDir = DungeonRandInt(NUM_DIRECTIONS);
|
targetDir = DungeonRandInt(NUM_DIRECTIONS);
|
||||||
pokemonInfo->aiObjective = AI_STAND_STILL;
|
pokemonInfo->aiTarget.aiObjective = AI_STAND_STILL;
|
||||||
pokemonInfo->aiTargetPos.x = pokemon->pos.x + gAdjacentTileOffsets[targetDir].x;
|
pokemonInfo->aiTarget.aiTargetPos.x = pokemon->pos.x + gAdjacentTileOffsets[targetDir].x;
|
||||||
pokemonInfo->aiTargetPos.y = pokemon->pos.y + gAdjacentTileOffsets[targetDir].y;
|
pokemonInfo->aiTarget.aiTargetPos.y = pokemon->pos.y + gAdjacentTileOffsets[targetDir].y;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pokemonInfo->aiObjective = AI_RUN_AWAY;
|
pokemonInfo->aiTarget.aiObjective = AI_RUN_AWAY;
|
||||||
pokemonInfo->aiTargetPos = aiTargetPos;
|
pokemonInfo->aiTarget.aiTargetPos = aiTargetPos;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -681,16 +681,16 @@ bool8 AvoidEnemies(Entity *pokemon)
|
|||||||
}
|
}
|
||||||
if (furthestTargetToExitDistance >= 0)
|
if (furthestTargetToExitDistance >= 0)
|
||||||
{
|
{
|
||||||
pokemonInfo->aiObjective = AI_RUN_AWAY;
|
pokemonInfo->aiTarget.aiObjective = AI_RUN_AWAY;
|
||||||
pokemonInfo->aiTargetPos.x = naturalJunctionList[furthestTargetExitIndex].x;
|
pokemonInfo->aiTarget.aiTargetPos.x = naturalJunctionList[furthestTargetExitIndex].x;
|
||||||
pokemonInfo->aiTargetPos.y = naturalJunctionList[furthestTargetExitIndex].y;
|
pokemonInfo->aiTarget.aiTargetPos.y = naturalJunctionList[furthestTargetExitIndex].y;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pokemonInfo->aiObjective = AI_RUN_AWAY;
|
pokemonInfo->aiTarget.aiObjective = AI_RUN_AWAY;
|
||||||
pokemonInfo->aiTargetPos.x = pokemon->pos.x - (closestTarget->pos.x - pokemon->pos.x);
|
pokemonInfo->aiTarget.aiTargetPos.x = pokemon->pos.x - (closestTarget->pos.x - pokemon->pos.x);
|
||||||
pokemonInfo->aiTargetPos.y = pokemon->pos.y - (closestTarget->pos.y - pokemon->pos.y);
|
pokemonInfo->aiTarget.aiTargetPos.y = pokemon->pos.y - (closestTarget->pos.y - pokemon->pos.y);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1108,8 +1108,8 @@ void sub_807BB78(Entity *pokemon)
|
|||||||
EntityInfo *entityInfo;
|
EntityInfo *entityInfo;
|
||||||
|
|
||||||
entityInfo = pokemon->info;
|
entityInfo = pokemon->info;
|
||||||
entityInfo->aiObjective = 0;
|
entityInfo->aiTarget.aiObjective = 0;
|
||||||
entityInfo->aiTargetPos = pokemon->pos;
|
entityInfo->aiTarget.aiTargetPos = pokemon->pos;
|
||||||
entityInfo->aiTarget = 0;
|
entityInfo->aiTarget.aiTarget = 0;
|
||||||
entityInfo->aiTargetSpawnGenID = 0;
|
entityInfo->aiTarget.aiTargetSpawnGenID = 0;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ bool8 sub_8070F3C(Entity * pokemon, Position *pos, s32 direction)
|
|||||||
(((tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))))) {
|
(((tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))))) {
|
||||||
if (!IsCurrentFixedRoomBossFight())
|
if (!IsCurrentFixedRoomBossFight())
|
||||||
{
|
{
|
||||||
if (pokemon->info->transformStatus == STATUS_MOBILE ||
|
if (pokemon->info->transformStatus.transformStatus == STATUS_MOBILE ||
|
||||||
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||||
{
|
{
|
||||||
terrain = CROSSABLE_TERRAIN_WALL;
|
terrain = CROSSABLE_TERRAIN_WALL;
|
||||||
@ -137,7 +137,7 @@ bool8 sub_8070F80(Entity * pokemon, s32 direction)
|
|||||||
(((tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))))) {
|
(((tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))))) {
|
||||||
if (!IsCurrentFixedRoomBossFight())
|
if (!IsCurrentFixedRoomBossFight())
|
||||||
{
|
{
|
||||||
if (pokemon->info->transformStatus == STATUS_MOBILE ||
|
if (pokemon->info->transformStatus.transformStatus == STATUS_MOBILE ||
|
||||||
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||||
{
|
{
|
||||||
terrain = CROSSABLE_TERRAIN_WALL;
|
terrain = CROSSABLE_TERRAIN_WALL;
|
||||||
@ -183,7 +183,7 @@ bool8 sub_8071058(Entity * pokemon, s32 direction)
|
|||||||
(!tile->monster->info->isNotTeamMember)))) {
|
(!tile->monster->info->isNotTeamMember)))) {
|
||||||
if (!IsCurrentFixedRoomBossFight())
|
if (!IsCurrentFixedRoomBossFight())
|
||||||
{
|
{
|
||||||
if (pokemon->info->transformStatus == STATUS_MOBILE ||
|
if (pokemon->info->transformStatus.transformStatus == STATUS_MOBILE ||
|
||||||
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||||
{
|
{
|
||||||
terrain = CROSSABLE_TERRAIN_WALL;
|
terrain = CROSSABLE_TERRAIN_WALL;
|
||||||
@ -230,7 +230,7 @@ bool8 CanAttackInDirection(Entity *pokemon, s32 direction)
|
|||||||
{
|
{
|
||||||
if (!IsCurrentFixedRoomBossFight())
|
if (!IsCurrentFixedRoomBossFight())
|
||||||
{
|
{
|
||||||
if (pokemon->info->transformStatus == STATUS_MOBILE ||
|
if (pokemon->info->transformStatus.transformStatus == STATUS_MOBILE ||
|
||||||
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||||
{
|
{
|
||||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||||
@ -282,7 +282,7 @@ bool8 CanAIMonsterMoveInDirection(Entity *pokemon, s32 direction, bool8 *pokemon
|
|||||||
if (frontTile->object != NULL &&
|
if (frontTile->object != NULL &&
|
||||||
IQSkillIsEnabled(pokemon, IQ_TRAP_AVOIDER) &&
|
IQSkillIsEnabled(pokemon, IQ_TRAP_AVOIDER) &&
|
||||||
GetEntityType(frontTile->object) == ENTITY_TRAP &&
|
GetEntityType(frontTile->object) == ENTITY_TRAP &&
|
||||||
(frontTile->object->isVisible || pokemon->info->eyesightStatus == STATUS_EYEDROPS))
|
(frontTile->object->isVisible || pokemon->info->eyesightStatus.eyesightStatus == STATUS_EYEDROPS))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -294,7 +294,7 @@ bool8 CanAIMonsterMoveInDirection(Entity *pokemon, s32 direction, bool8 *pokemon
|
|||||||
}
|
}
|
||||||
if (!IsCurrentFixedRoomBossFight())
|
if (!IsCurrentFixedRoomBossFight())
|
||||||
{
|
{
|
||||||
if (pokemon->info->transformStatus == STATUS_MOBILE ||
|
if (pokemon->info->transformStatus.transformStatus == STATUS_MOBILE ||
|
||||||
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||||
{
|
{
|
||||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||||
@ -337,7 +337,7 @@ bool8 IsAtJunction(Entity *pokemon)
|
|||||||
u32 crossableTerrain = GetCrossableTerrain(pokemon->info->id);
|
u32 crossableTerrain = GetCrossableTerrain(pokemon->info->id);
|
||||||
if (!IsCurrentFixedRoomBossFight())
|
if (!IsCurrentFixedRoomBossFight())
|
||||||
{
|
{
|
||||||
if (pokemon->info->transformStatus == STATUS_MOBILE || HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
if (pokemon->info->transformStatus.transformStatus == STATUS_MOBILE || HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||||
{
|
{
|
||||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||||
}
|
}
|
||||||
@ -479,8 +479,8 @@ u8 CanTarget(Entity *pokemon, Entity *targetPokemon, bool8 ignoreInvisible, bool
|
|||||||
targetData->clientType == CLIENT_TYPE_DONT_MOVE ||
|
targetData->clientType == CLIENT_TYPE_DONT_MOVE ||
|
||||||
pokemonInfo->clientType == CLIENT_TYPE_CLIENT ||
|
pokemonInfo->clientType == CLIENT_TYPE_CLIENT ||
|
||||||
targetData->clientType == CLIENT_TYPE_CLIENT ||
|
targetData->clientType == CLIENT_TYPE_CLIENT ||
|
||||||
(checkPetrified && !pokemonInfo->isNotTeamMember && targetData->immobilizeStatus == STATUS_PETRIFIED) ||
|
(checkPetrified && !pokemonInfo->isNotTeamMember && targetData->immobilize.immobilizeStatus == STATUS_PETRIFIED) ||
|
||||||
(!ignoreInvisible && targetData->transformStatus == STATUS_INVISIBLE && !CanSeeInvisibleMonsters(pokemon)))
|
(!ignoreInvisible && targetData->transformStatus.transformStatus == STATUS_INVISIBLE && !CanSeeInvisibleMonsters(pokemon)))
|
||||||
{
|
{
|
||||||
return TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET;
|
return TARGET_CAPABILITY_CAN_ATTACK_NOT_TARGET;
|
||||||
}
|
}
|
||||||
@ -519,7 +519,7 @@ u8 CanTarget(Entity *pokemon, Entity *targetPokemon, bool8 ignoreInvisible, bool
|
|||||||
targetIsEnemy = targetData->isNotTeamMember ? TRUE : FALSE;
|
targetIsEnemy = targetData->isNotTeamMember ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
targetIsDecoy = FALSE;
|
targetIsDecoy = FALSE;
|
||||||
if (targetData->waitingStatus == STATUS_DECOY)
|
if (targetData->waitingStruct.waitingStatus == STATUS_DECOY)
|
||||||
{
|
{
|
||||||
targetIsDecoy = TRUE;
|
targetIsDecoy = TRUE;
|
||||||
}
|
}
|
||||||
@ -528,11 +528,11 @@ u8 CanTarget(Entity *pokemon, Entity *targetPokemon, bool8 ignoreInvisible, bool
|
|||||||
|
|
||||||
static inline bool8 JoinLocationCannotUseItems_1(EntityInfo *pokemonInfo)
|
static inline bool8 JoinLocationCannotUseItems_1(EntityInfo *pokemonInfo)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,13 @@ bool8 CannotMove(Entity *pokemon, bool8 checkBlinker)
|
|||||||
{
|
{
|
||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
|
|
||||||
if ((checkBlinker && pokemonInfo->eyesightStatus == STATUS_BLINKER)
|
if ((checkBlinker && pokemonInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||||
|| pokemonInfo->sleep == STATUS_SLEEP
|
|| pokemonInfo->sleep.sleep == STATUS_SLEEP
|
||||||
|| pokemonInfo->sleep == STATUS_NAPPING
|
|| pokemonInfo->sleep.sleep == STATUS_NAPPING
|
||||||
|| pokemonInfo->sleep == STATUS_NIGHTMARE
|
|| pokemonInfo->sleep.sleep == STATUS_NIGHTMARE
|
||||||
|| pokemonInfo->volatileStatus == STATUS_PAUSED
|
|| pokemonInfo->volatileStatus.volatileStatus == STATUS_PAUSED
|
||||||
|| pokemonInfo->volatileStatus == STATUS_INFATUATED
|
|| pokemonInfo->volatileStatus.volatileStatus == STATUS_INFATUATED
|
||||||
|| pokemonInfo->immobilizeStatus == STATUS_PETRIFIED)
|
|| pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (pokemonInfo->terrifiedTurns != 0)
|
if (pokemonInfo->terrifiedTurns != 0)
|
||||||
@ -41,34 +41,34 @@ bool8 sub_8070BC0(Entity* entity)
|
|||||||
EntityInfo *entityInfo = entity->info;
|
EntityInfo *entityInfo = entity->info;
|
||||||
|
|
||||||
if (IsCharging(entity, FALSE)
|
if (IsCharging(entity, FALSE)
|
||||||
|| entityInfo->sleep == STATUS_YAWNING
|
|| entityInfo->sleep.sleep == STATUS_YAWNING
|
||||||
|| entityInfo->sleep == STATUS_NIGHTMARE
|
|| entityInfo->sleep.sleep == STATUS_NIGHTMARE
|
||||||
|| ShouldMonsterRunAway(entity)
|
|| ShouldMonsterRunAway(entity)
|
||||||
|| entityInfo->muzzled == TRUE
|
|| entityInfo->muzzled.muzzled == TRUE
|
||||||
|| entityInfo->immobilizeStatus == STATUS_PETRIFIED
|
|| entityInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED
|
||||||
|| entityInfo->immobilizeStatus == STATUS_FROZEN)
|
|| entityInfo->immobilize.immobilizeStatus == STATUS_FROZEN)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (entityInfo->volatileStatus == STATUS_CONFUSED)
|
if (entityInfo->volatileStatus.volatileStatus == STATUS_CONFUSED)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (entityInfo->sleep == STATUS_SLEEP)
|
if (entityInfo->sleep.sleep == STATUS_SLEEP)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (entityInfo->transformStatus == STATUS_INVISIBLE
|
if (entityInfo->transformStatus.transformStatus == STATUS_INVISIBLE
|
||||||
|| entityInfo->sleep == STATUS_NAPPING)
|
|| entityInfo->sleep.sleep == STATUS_NAPPING)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (entityInfo->volatileStatus == STATUS_CRINGE)
|
if (entityInfo->volatileStatus.volatileStatus == STATUS_CRINGE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (entityInfo->immobilizeStatus == STATUS_WRAP)
|
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAP)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (entityInfo->immobilizeStatus == STATUS_WRAPPED
|
if (entityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED
|
||||||
|| entityInfo->eyesightStatus == STATUS_CROSS_EYED)
|
|| entityInfo->eyesightStatus.eyesightStatus == STATUS_CROSS_EYED)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (entityInfo->waitingStatus == STATUS_DECOY)
|
if (entityInfo->waitingStruct.waitingStatus == STATUS_DECOY)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (entityInfo->eyesightStatus == STATUS_BLINKER)
|
if (entityInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (entityInfo->volatileStatus != STATUS_INFATUATED
|
if (entityInfo->volatileStatus.volatileStatus != STATUS_INFATUATED
|
||||||
&& entityInfo->volatileStatus != STATUS_PAUSED)
|
&& entityInfo->volatileStatus.volatileStatus != STATUS_PAUSED)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -76,9 +76,9 @@ bool8 sub_8070BC0(Entity* entity)
|
|||||||
|
|
||||||
static inline bool8 JoinLocationCannotUseItems(EntityInfo *pokemonInfo)
|
static inline bool8 JoinLocationCannotUseItems(EntityInfo *pokemonInfo)
|
||||||
{
|
{
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if (pokemonInfo->joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
if (pokemonInfo->joinedAt.joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -104,13 +104,13 @@ bool8 HasStatusThatPreventsActing(Entity *pokemon)
|
|||||||
{
|
{
|
||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
|
|
||||||
if ((pokemonInfo->sleep != STATUS_SLEEPLESS
|
if ((pokemonInfo->sleep.sleep != STATUS_SLEEPLESS
|
||||||
&& pokemonInfo->sleep != STATUS_NONE)
|
&& pokemonInfo->sleep.sleep != STATUS_NONE)
|
||||||
|| pokemonInfo->immobilizeStatus == STATUS_FROZEN
|
|| pokemonInfo->immobilize.immobilizeStatus == STATUS_FROZEN
|
||||||
|| pokemonInfo->immobilizeStatus == STATUS_PETRIFIED)
|
|| pokemonInfo->immobilize.immobilizeStatus == STATUS_PETRIFIED)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (pokemonInfo->chargingStatus == STATUS_BIDE)
|
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -121,17 +121,17 @@ bool8 CannotAttack(Entity *pokemon, bool8 skipSleep)
|
|||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
|
|
||||||
if ((skipSleep ||
|
if ((skipSleep ||
|
||||||
pokemonInfo->sleep == STATUS_SLEEPLESS ||
|
pokemonInfo->sleep.sleep == STATUS_SLEEPLESS ||
|
||||||
pokemonInfo->sleep == STATUS_YAWNING ||
|
pokemonInfo->sleep.sleep == STATUS_YAWNING ||
|
||||||
pokemonInfo->sleep == STATUS_NONE) &&
|
pokemonInfo->sleep.sleep == STATUS_NONE) &&
|
||||||
pokemonInfo->immobilizeStatus != STATUS_FROZEN &&
|
pokemonInfo->immobilize.immobilizeStatus != STATUS_FROZEN &&
|
||||||
pokemonInfo->immobilizeStatus != STATUS_WRAP &&
|
pokemonInfo->immobilize.immobilizeStatus != STATUS_WRAP &&
|
||||||
pokemonInfo->immobilizeStatus != STATUS_WRAPPED &&
|
pokemonInfo->immobilize.immobilizeStatus != STATUS_WRAPPED &&
|
||||||
pokemonInfo->immobilizeStatus != STATUS_PETRIFIED &&
|
pokemonInfo->immobilize.immobilizeStatus != STATUS_PETRIFIED &&
|
||||||
pokemonInfo->volatileStatus != STATUS_CRINGE &&
|
pokemonInfo->volatileStatus.volatileStatus != STATUS_CRINGE &&
|
||||||
pokemonInfo->volatileStatus != STATUS_PAUSED &&
|
pokemonInfo->volatileStatus.volatileStatus != STATUS_PAUSED &&
|
||||||
pokemonInfo->volatileStatus != STATUS_INFATUATED &&
|
pokemonInfo->volatileStatus.volatileStatus != STATUS_INFATUATED &&
|
||||||
pokemonInfo->nonVolatileStatus != STATUS_PARALYSIS &&
|
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_PARALYSIS &&
|
||||||
!ShouldMonsterRunAway(pokemon))
|
!ShouldMonsterRunAway(pokemon))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ bool8 CanMoveInDirection(Entity *pokemon, u32 direction)
|
|||||||
|
|
||||||
if (!IsCurrentFixedRoomBossFight())
|
if (!IsCurrentFixedRoomBossFight())
|
||||||
{
|
{
|
||||||
if (pokemon->info->transformStatus == STATUS_MOBILE || HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
if (pokemon->info->transformStatus.transformStatus == STATUS_MOBILE || HasHeldItem(pokemon, ITEM_MOBILE_SCARF))
|
||||||
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
crossableTerrain = CROSSABLE_TERRAIN_WALL;
|
||||||
else if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER))
|
else if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER))
|
||||||
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
crossableTerrain = CROSSABLE_TERRAIN_CREVICE;
|
||||||
|
@ -77,7 +77,7 @@ u8 sub_80703A0(Entity *pokemon, Position *pos)
|
|||||||
tile = GetTile(pos->x,pos->y);
|
tile = GetTile(pos->x,pos->y);
|
||||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||||
(DUNGEON_MAX_SIZE_Y > pos->y) && (tile->monster == NULL) && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) {
|
(DUNGEON_MAX_SIZE_Y > pos->y) && (tile->monster == NULL) && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) {
|
||||||
if ((IsCurrentFixedRoomBossFight()) || ((entityInfo->transformStatus != STATUS_MOBILE && (!HasHeldItem(pokemon, ITEM_MOBILE_SCARF))))) {
|
if ((IsCurrentFixedRoomBossFight()) || ((entityInfo->transformStatus.transformStatus != STATUS_MOBILE && (!HasHeldItem(pokemon, ITEM_MOBILE_SCARF))))) {
|
||||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||||
@ -108,7 +108,7 @@ bool8 CanCrossWalls(Entity *pokemon)
|
|||||||
{
|
{
|
||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
EntityInfo *pokemonInfo2 = pokemonInfo;
|
EntityInfo *pokemonInfo2 = pokemonInfo;
|
||||||
if (pokemonInfo2->transformStatus == STATUS_MOBILE)
|
if (pokemonInfo2->transformStatus.transformStatus == STATUS_MOBILE)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -135,7 +135,7 @@ bool8 sub_807049C(Entity *pokemon, Position *pos)
|
|||||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||||
(tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))) {
|
(tile->monster == NULL || (GetEntityType(tile->monster) == ENTITY_MONSTER))) {
|
||||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus.transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||||
@ -219,7 +219,7 @@ bool8 sub_80705F0(Entity *pokemon, Position *pos)
|
|||||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||||
((tile->monster == NULL) || ((GetEntityType(tile->monster) == ENTITY_MONSTER)))) {
|
((tile->monster == NULL) || ((GetEntityType(tile->monster) == ENTITY_MONSTER)))) {
|
||||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus.transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||||
@ -257,7 +257,7 @@ bool8 sub_80706A4(Entity *pokemon, Position *pos)
|
|||||||
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
if ((pos->x >= 0) && (pos->y >= 0) && (DUNGEON_MAX_SIZE_X > pos->x) &&
|
||||||
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
(DUNGEON_MAX_SIZE_Y > pos->y && ((tile->terrainType & TERRAIN_TYPE_IMPASSABLE_WALL) == 0)) &&
|
||||||
((tile->monster == NULL) || ((GetEntityType(tile->monster) == ENTITY_MONSTER) && (tile->monster->info == entityInfo)))) {
|
((tile->monster == NULL) || ((GetEntityType(tile->monster) == ENTITY_MONSTER) && (tile->monster->info == entityInfo)))) {
|
||||||
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
if (IsCurrentFixedRoomBossFight() || (entityInfo->transformStatus.transformStatus != STATUS_MOBILE && !HasHeldItem(pokemon, ITEM_MOBILE_SCARF))) {
|
||||||
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
crossableTerrain = GetCrossableTerrain(entityInfo->id);
|
||||||
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
tileFlags = tile->terrainType & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY);
|
||||||
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
if (IQSkillIsEnabled(pokemon, IQ_ALL_TERRAIN_HIKER)) {
|
||||||
@ -304,7 +304,7 @@ s32 CalcSpeedStage(Entity *pokemon)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entityInfo->nonVolatileStatus == STATUS_PARALYSIS) {
|
if (entityInfo->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS) {
|
||||||
speed--;
|
speed--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ extern void sub_80522F4(Entity *r1, Entity *r2, u32);
|
|||||||
|
|
||||||
bool8 HasSafeguardStatus(Entity * pokemon, Entity * target, bool8 displayMessage)
|
bool8 HasSafeguardStatus(Entity * pokemon, Entity * target, bool8 displayMessage)
|
||||||
{
|
{
|
||||||
if (target->info->protectionStatus == STATUS_SAFEGUARD) {
|
if (target->info->protection.protectionStatus == STATUS_SAFEGUARD) {
|
||||||
if (displayMessage) {
|
if (displayMessage) {
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
sub_80522F4(pokemon,target,gUnknown_80FC2FC);
|
sub_80522F4(pokemon,target,gUnknown_80FC2FC);
|
||||||
@ -40,7 +40,7 @@ bool8 HasSafeguardStatus(Entity * pokemon, Entity * target, bool8 displayMessage
|
|||||||
|
|
||||||
bool8 sub_8071728(Entity * pokemon, Entity * target, bool8 displayMessage)
|
bool8 sub_8071728(Entity * pokemon, Entity * target, bool8 displayMessage)
|
||||||
{
|
{
|
||||||
if (target->info->protectionStatus == STATUS_MIST) {
|
if (target->info->protection.protectionStatus == STATUS_MIST) {
|
||||||
if (displayMessage) {
|
if (displayMessage) {
|
||||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||||
sub_80522F4(pokemon, target, gUnknown_80FC31C);
|
sub_80522F4(pokemon, target, gUnknown_80FC31C);
|
||||||
@ -65,7 +65,7 @@ bool8 sub_80717A4(Entity *pokemon, u16 moveID)
|
|||||||
s32 index;
|
s32 index;
|
||||||
|
|
||||||
entityInfo = pokemon->info;
|
entityInfo = pokemon->info;
|
||||||
if ((entityInfo->sleep != STATUS_SLEEP) && (entityInfo->sleep != STATUS_NAPPING) && (entityInfo->sleep != STATUS_NIGHTMARE)) {
|
if ((entityInfo->sleep.sleep != STATUS_SLEEP) && (entityInfo->sleep.sleep != STATUS_NAPPING) && (entityInfo->sleep.sleep != STATUS_NIGHTMARE)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -128,7 +128,7 @@ bool8 MonsterIsType(Entity *pokemon, u8 type)
|
|||||||
bool8 CanSeeInvisibleMonsters(Entity *pokemon)
|
bool8 CanSeeInvisibleMonsters(Entity *pokemon)
|
||||||
{
|
{
|
||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
if (pokemonInfo->eyesightStatus != STATUS_EYEDROPS)
|
if (pokemonInfo->eyesightStatus.eyesightStatus != STATUS_EYEDROPS)
|
||||||
{
|
{
|
||||||
if (!HasHeldItem(pokemon, ITEM_GOGGLE_SPECS))
|
if (!HasHeldItem(pokemon, ITEM_GOGGLE_SPECS))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -218,7 +218,7 @@ bool8 CanSeeTeammate(Entity * pokemon)
|
|||||||
u8 GetMoveTypeForMonster(Entity *pokemon, Move *pokeMove)
|
u8 GetMoveTypeForMonster(Entity *pokemon, Move *pokeMove)
|
||||||
{
|
{
|
||||||
if (pokeMove->id == MOVE_HIDDEN_POWER)
|
if (pokeMove->id == MOVE_HIDDEN_POWER)
|
||||||
return pokemon->info->hiddenPowerType;
|
return pokemon->info->hiddenPower.hiddenPowerType;
|
||||||
else
|
else
|
||||||
return GetMoveType(pokeMove);
|
return GetMoveType(pokeMove);
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ u8 GetMoveTypeForMonster(Entity *pokemon, Move *pokeMove)
|
|||||||
s32 GetMovePower(Entity *pokemon, Move *pokeMove)
|
s32 GetMovePower(Entity *pokemon, Move *pokeMove)
|
||||||
{
|
{
|
||||||
if(pokeMove->id == MOVE_HIDDEN_POWER)
|
if(pokeMove->id == MOVE_HIDDEN_POWER)
|
||||||
return (pokemon->info->hiddenPowerBasePower + pokeMove->ginseng);
|
return (pokemon->info->hiddenPower.hiddenPowerBasePower + pokeMove->ginseng);
|
||||||
else
|
else
|
||||||
return (GetMoveBasePower(pokeMove) + pokeMove->ginseng);
|
return (GetMoveBasePower(pokeMove) + pokeMove->ginseng);
|
||||||
}
|
}
|
||||||
@ -240,8 +240,8 @@ bool8 ToolboxEnabled(EntityInfo *pokemon)
|
|||||||
|
|
||||||
static inline bool8 sub_8071A8C_sub(EntityInfo *pokemonInfo)
|
static inline bool8 sub_8071A8C_sub(EntityInfo *pokemonInfo)
|
||||||
{
|
{
|
||||||
if(pokemonInfo->joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON ||
|
if(pokemonInfo->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON ||
|
||||||
pokemonInfo->joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
pokemonInfo->joinedAt.joinedAt == DUNGEON_RESCUE_TEAM_BASE)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -38,7 +38,7 @@ Entity *GetPartnerEntity(void)
|
|||||||
for(counter = 0; counter < MAX_TEAM_MEMBERS; counter++)
|
for(counter = 0; counter < MAX_TEAM_MEMBERS; counter++)
|
||||||
{
|
{
|
||||||
entity = gDungeon->teamPokemon[counter];
|
entity = gDungeon->teamPokemon[counter];
|
||||||
if(EntityExists(entity) && entity->info->joinedAt == DUNGEON_JOIN_LOCATION_PARTNER)
|
if(EntityExists(entity) && entity->info->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_PARTNER)
|
||||||
{
|
{
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ void sub_80854D4(void)
|
|||||||
for(index = 0; index < MAX_TEAM_MEMBERS; index++)
|
for(index = 0; index < MAX_TEAM_MEMBERS; index++)
|
||||||
{
|
{
|
||||||
entity3 = stack1[index];
|
entity3 = stack1[index];
|
||||||
if(entity3 != NULL && entity3->info->joinedAt == DUNGEON_JOIN_LOCATION_PARTNER)
|
if(entity3 != NULL && entity3->info->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_PARTNER)
|
||||||
{
|
{
|
||||||
stack1[index] = NULL;
|
stack1[index] = NULL;
|
||||||
stack2[counter] = entity3;
|
stack2[counter] = entity3;
|
||||||
@ -126,7 +126,7 @@ void sub_80855E4(DungeonCallback func)
|
|||||||
{
|
{
|
||||||
entity = gDungeon->teamPokemon[index];
|
entity = gDungeon->teamPokemon[index];
|
||||||
if (EntityExists(entity)) {
|
if (EntityExists(entity)) {
|
||||||
if (entity->info->joinedAt == DUNGEON_JOIN_LOCATION_PARTNER) {
|
if (entity->info->joinedAt.joinedAt == DUNGEON_JOIN_LOCATION_PARTNER) {
|
||||||
flag = TRUE;
|
flag = TRUE;
|
||||||
}
|
}
|
||||||
func(entity);
|
func(entity);
|
||||||
@ -145,7 +145,7 @@ void sub_808563C(DungeonCallback func)
|
|||||||
for(index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++)
|
for(index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++)
|
||||||
{
|
{
|
||||||
entity = gDungeon->wildPokemon[index];
|
entity = gDungeon->wildPokemon[index];
|
||||||
if ((EntityExists(entity)) && (entity->info->joinedAt != 0x41)) {
|
if ((EntityExists(entity)) && (entity->info->joinedAt.joinedAt != 0x41)) {
|
||||||
func(entity);
|
func(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,16 +16,16 @@ bool8 CanSeeTarget(Entity *entity, Entity *targetEntity)
|
|||||||
{
|
{
|
||||||
if (entity->type == ENTITY_MONSTER)
|
if (entity->type == ENTITY_MONSTER)
|
||||||
{
|
{
|
||||||
if (!CanSeeInvisibleMonsters(entity) && targetEntity->info->transformStatus == STATUS_INVISIBLE)
|
if (!CanSeeInvisibleMonsters(entity) && targetEntity->info->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (entity->info->eyesightStatus == STATUS_BLINKER)
|
if (entity->info->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (targetEntity->info->transformStatus == STATUS_INVISIBLE)
|
else if (targetEntity->info->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -43,16 +43,16 @@ bool8 CanTargetEntity(Entity *entity, Entity *targetEntity)
|
|||||||
{
|
{
|
||||||
if (entity->type == ENTITY_MONSTER)
|
if (entity->type == ENTITY_MONSTER)
|
||||||
{
|
{
|
||||||
if (!CanSeeInvisibleMonsters(entity) && targetEntity->info->transformStatus == STATUS_INVISIBLE)
|
if (!CanSeeInvisibleMonsters(entity) && targetEntity->info->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (entity->info->eyesightStatus == STATUS_BLINKER)
|
if (entity->info->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (targetEntity->info->transformStatus == STATUS_INVISIBLE)
|
else if (targetEntity->info->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,27 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#include "globaldata.h"
|
||||||
#include "code_8009804.h"
|
#include "code_8009804.h"
|
||||||
#include "code_8092334.h"
|
#include "code_8092334.h"
|
||||||
#include "game_options.h"
|
#include "game_options.h"
|
||||||
|
|
||||||
struct WindowBG
|
|
||||||
{
|
|
||||||
// size: 0x10
|
|
||||||
u32 hexBG[4];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct unkStruct_8094CB0
|
struct unkStruct_8094CB0
|
||||||
{
|
{
|
||||||
u16 unk0;
|
u16 unk0;
|
||||||
s16 unk2;
|
s16 unk2;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct WindowBG gWindowBGColors;
|
struct WindowBG
|
||||||
|
{
|
||||||
|
// size: 0x10
|
||||||
|
u32 hexBG[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct WindowBG gWindowBGColors = {
|
||||||
|
RGB_U32(0x20, 0x48, 0x68), // Blue
|
||||||
|
RGB_U32(0x80, 0x38, 0x20), // Red
|
||||||
|
RGB_U32(0x28, 0x80, 0x48), // Green
|
||||||
|
RGB_U32(0x28, 0x80, 0x48) // Green
|
||||||
|
};
|
||||||
|
|
||||||
EWRAM_DATA_2 GameOptions *gGameOptionsRef = {0};
|
EWRAM_DATA_2 GameOptions *gGameOptionsRef = {0};
|
||||||
EWRAM_DATA GameOptions gGameOptions = {0};
|
EWRAM_DATA GameOptions gGameOptions = {0};
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#include "globaldata.h"
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
|
|
||||||
extern u8 gFastMod3Lookup[];
|
|
||||||
extern s16 gFastSinLookup[];
|
|
||||||
extern u24_8 u24_8_div(u24_8 x, u24_8 y); // decomp in progress: https://decomp.me/scratch/pMyGD
|
extern u24_8 u24_8_div(u24_8 x, u24_8 y); // decomp in progress: https://decomp.me/scratch/pMyGD
|
||||||
|
|
||||||
|
#include "data/math.h"
|
||||||
|
|
||||||
u32 fast_mod_3(s32 x) {
|
u32 fast_mod_3(s32 x) {
|
||||||
if (x < 0x100) {
|
if (x < 0x100) {
|
||||||
return gFastMod3Lookup[x];
|
return gFastMod3Lookup[x];
|
||||||
|
@ -14,9 +14,53 @@
|
|||||||
#include "text2.h"
|
#include "text2.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
// data_80D47B8.s
|
const u32 gDefaultMenuTextColors[3] = { COLOR_WHITE_2, COLOR_RED, COLOR_RED };
|
||||||
extern const u8 gUnknown_80D4828[];
|
|
||||||
extern const s32 gUnknown_80D4830[9];
|
const u8 UnkData_80D47C4[] = {0x01, 0x00, 0x10, 0x00};
|
||||||
|
|
||||||
|
const UnkTextStruct2 gUnknown_80D47C8[4] = {
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x06,
|
||||||
|
0x02, 0x02,
|
||||||
|
0x1a, 0x0c,
|
||||||
|
0x0c, 0x00,
|
||||||
|
UnkData_80D47C4,
|
||||||
|
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x03,
|
||||||
|
0x00, 0x00,
|
||||||
|
0x00, 0x00,
|
||||||
|
0x00, 0x00,
|
||||||
|
NULL,
|
||||||
|
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x03,
|
||||||
|
0x00, 0x00,
|
||||||
|
0x00, 0x00,
|
||||||
|
0x00, 0x00,
|
||||||
|
NULL,
|
||||||
|
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x03,
|
||||||
|
0x00, 0x00,
|
||||||
|
0x00, 0x00,
|
||||||
|
0x00, 0x00,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
ALIGNED(4) const u8 gUnknown_80D4828[] = _("{COLOR_1}%c%s");
|
||||||
|
|
||||||
|
const s32 gUnknown_80D4830[9] = {
|
||||||
|
1,
|
||||||
|
10,
|
||||||
|
100,
|
||||||
|
1000,
|
||||||
|
10000,
|
||||||
|
100000,
|
||||||
|
1000000,
|
||||||
|
10000000,
|
||||||
|
100000000
|
||||||
|
};
|
||||||
|
|
||||||
// text.s
|
// text.s
|
||||||
extern s16 sub_8009614(u32, u32);
|
extern s16 sub_8009614(u32, u32);
|
||||||
@ -26,7 +70,6 @@ static void sub_801332C(s16 *);
|
|||||||
static void sub_8013470(MenuInputStruct *);
|
static void sub_8013470(MenuInputStruct *);
|
||||||
static bool8 sub_8013DD0(unkStructFor8013AA0 *);
|
static bool8 sub_8013DD0(unkStructFor8013AA0 *);
|
||||||
|
|
||||||
const u32 gDefaultMenuTextColors[3] = { COLOR_WHITE_2, COLOR_RED, COLOR_RED };
|
|
||||||
|
|
||||||
u32 sub_8012A64(MenuInputStructSub *r0, s32 r1)
|
u32 sub_8012A64(MenuInputStructSub *r0, s32 r1)
|
||||||
{
|
{
|
||||||
|
@ -203,7 +203,7 @@ extern void sub_804652C(Entity *, Entity *, Item *, u32, Position *);
|
|||||||
extern void sub_806EAF4(Entity *, Entity *, u8, u32, u32, s32 *, u32, u16, u32);
|
extern void sub_806EAF4(Entity *, Entity *, u8, u32, u32, s32 *, u32, u16, u32);
|
||||||
extern void sub_8045C28(Item *, u8 , u8);
|
extern void sub_8045C28(Item *, u8 , u8);
|
||||||
extern void sub_805A7D4(Entity *, Entity *, Item *, Position *);
|
extern void sub_805A7D4(Entity *, Entity *, Item *, Position *);
|
||||||
extern void sub_807EA30(u32);
|
extern void MudWaterSportEffect(u32);
|
||||||
extern void sub_807D148(Entity *pokemon, Entity *target, u32 r2, Position *r3);
|
extern void sub_807D148(Entity *pokemon, Entity *target, u32 r2, Position *r3);
|
||||||
extern void SetMessageArgument_2(u8 *buffer, EntityInfo *r1, u32);
|
extern void SetMessageArgument_2(u8 *buffer, EntityInfo *r1, u32);
|
||||||
extern void sub_806EAF4(Entity *, Entity *, u8, u32, u32, s32 *, u32, u16, u32);
|
extern void sub_806EAF4(Entity *, Entity *, u8, u32, u32, s32 *, u32, u16, u32);
|
||||||
@ -380,31 +380,31 @@ bool8 sub_805768C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 YawnMoveAction(Entity * pokemon, Entity *target)
|
bool8 YawnMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
YawnedStatusTarget(pokemon, target, CalculateStatusTurns(target,gUnknown_80F4F28,TRUE) + 1);
|
YawnedStatusTarget(pokemon, target, CalculateStatusTurns(target,gUnknown_80F4F28,TRUE) + 1);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_80576F8(Entity * pokemon, Entity *target)
|
bool8 sub_80576F8(Entity * pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_8075C58(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE);
|
sub_8075C58(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 NightmareMoveAction(Entity * pokemon, Entity *target)
|
bool8 NightmareMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
NightmareStatusTarget(pokemon, target, CalculateStatusTurns(target,gUnknown_80F4E78,TRUE));
|
NightmareStatusTarget(pokemon, target, CalculateStatusTurns(target,gUnknown_80F4E78,TRUE));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8057748(Entity * pokemon,Entity * target)
|
bool8 sub_8057748(Entity * pokemon,Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
HealTargetHP(pokemon, target, gUnknown_80F502A[GetApparentWeather(pokemon)], 0, TRUE);
|
HealTargetHP(pokemon, target, gUnknown_80F502A[GetApparentWeather(pokemon)], 0, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 VitalThrowMoveAction(Entity * pokemon, Entity * target)
|
bool8 VitalThrowMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
VitalThrowStatusTarget(pokemon, target);
|
VitalThrowStatusTarget(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -433,19 +433,19 @@ bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool32 sub_8057824(Entity *pokemon, Entity *target)
|
bool32 sub_8057824(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
LowerAccuracyStageTarget(pokemon,target,gUnknown_8106A50,TRUE);
|
LowerAccuracyStageTarget(pokemon,target,gUnknown_8106A50,TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool32 sub_805783C(Entity *pokemon, Entity *target)
|
bool32 sub_805783C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
ChangeAttackMultiplierTarget(pokemon,target,gUnknown_8106A4C,0x80,TRUE);
|
ChangeAttackMultiplierTarget(pokemon,target,gUnknown_8106A4C,0x80,TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool32 sub_805785C(Entity *pokemon, Entity *target)
|
bool32 sub_805785C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
gDungeon->unkE26B = gUnknown_80F4F42;
|
gDungeon->unkE26B = gUnknown_80F4F42;
|
||||||
if (sub_807EAA0(1,0) == 0) {
|
if (sub_807EAA0(1,0) == 0) {
|
||||||
@ -455,7 +455,7 @@ bool32 sub_805785C(Entity *pokemon, Entity *target)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool32 sub_80578A4(Entity *pokemon, Entity *target)
|
bool32 sub_80578A4(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
gDungeon->weatherTurns = gUnknown_80F4F42;
|
gDungeon->weatherTurns = gUnknown_80F4F42;
|
||||||
if (sub_807EAA0(1,0) == 0) {
|
if (sub_807EAA0(1,0) == 0) {
|
||||||
@ -465,7 +465,7 @@ bool32 sub_80578A4(Entity *pokemon, Entity *target)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool32 sub_80578EC(Entity *pokemon, Entity *target)
|
bool32 sub_80578EC(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_8079F20(pokemon, target, 1, 0);
|
sub_8079F20(pokemon, target, 1, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -485,13 +485,13 @@ bool32 sub_80578FC(Entity *pokemon, Entity *target, Move * move, u32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool32 EncoreMoveAction(Entity *pokemon, Entity *target)
|
bool32 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
EncoreStatusTarget(pokemon, target);
|
EncoreStatusTarget(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool32 RageMoveAction(Entity *pokemon, Entity *target, Move *move)
|
bool32 RageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
// {ARG_POKEMON_0} is enraged
|
// {ARG_POKEMON_0} is enraged
|
||||||
SetChargeStatusTarget(pokemon,target,STATUS_ENRAGED,move,gUnknown_80FAC88);
|
SetChargeStatusTarget(pokemon,target,STATUS_ENRAGED,move,gUnknown_80FAC88);
|
||||||
@ -517,7 +517,7 @@ bool32 sub_8057974(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||||||
return local_24;
|
return local_24;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 PainSplitMoveAction(Entity *pokemon, Entity *target)
|
bool8 PainSplitMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
s32 newHP;
|
s32 newHP;
|
||||||
EntityInfo *iVar2;
|
EntityInfo *iVar2;
|
||||||
@ -550,7 +550,7 @@ bool8 PainSplitMoveAction(Entity *pokemon, Entity *target)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 TormentMoveAction(Entity *pokemon, Entity *target)
|
bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
Move *movePtr;
|
Move *movePtr;
|
||||||
s32 iVar4;
|
s32 iVar4;
|
||||||
@ -595,8 +595,8 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target)
|
|||||||
}
|
}
|
||||||
if (isTormented)
|
if (isTormented)
|
||||||
{
|
{
|
||||||
if(entityInfo->chargingStatus == STATUS_BIDE) {
|
if(entityInfo->charging.chargingStatus == STATUS_BIDE) {
|
||||||
entityInfo->chargingStatus = STATUS_NONE;
|
entityInfo->charging.chargingStatus = STATUS_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -607,13 +607,13 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target)
|
|||||||
return isTormented;
|
return isTormented;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8057BB4(Entity *pokemon, Entity *target)
|
bool8 sub_8057BB4(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
LowerMovementSpeedTarget(pokemon, target, 1, TRUE);
|
LowerMovementSpeedTarget(pokemon, target, 1, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8057BC4(Entity *pokemon, Entity *target)
|
bool8 sub_8057BC4(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
ConfuseStatusTarget(pokemon, target, TRUE);
|
ConfuseStatusTarget(pokemon, target, TRUE);
|
||||||
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2);
|
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2);
|
||||||
@ -639,7 +639,7 @@ bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, u32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8057C68(Entity *pokemon, Entity *target)
|
bool8 sub_8057C68(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
ChangeDefenseMultiplierTarget(pokemon, target, gUnknown_8106A4C, 0x40, 1);
|
ChangeDefenseMultiplierTarget(pokemon, target, gUnknown_8106A4C, 0x40, 1);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -680,7 +680,7 @@ bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, u32 pa
|
|||||||
u8 chargeStatus;
|
u8 chargeStatus;
|
||||||
|
|
||||||
flag = FALSE;
|
flag = FALSE;
|
||||||
chargeStatus = target->info->chargingStatus;
|
chargeStatus = target->info->charging.chargingStatus;
|
||||||
uVar3 = 0x100;
|
uVar3 = 0x100;
|
||||||
if (chargeStatus == STATUS_DIVING) {
|
if (chargeStatus == STATUS_DIVING) {
|
||||||
uVar3 = 0x200;
|
uVar3 = 0x200;
|
||||||
@ -694,13 +694,13 @@ bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, u32 pa
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8057D7C(Entity * pokemon, Entity * target)
|
bool8 sub_8057D7C(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50, 2, 1, TRUE);
|
LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50, 2, 1, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
NAKED bool8 sub_8057D9C(Entity * pokemon, Entity * target)
|
NAKED bool8 sub_8057D9C(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
asm_unified(
|
asm_unified(
|
||||||
"\tpush {r4-r7,lr}\n"
|
"\tpush {r4-r7,lr}\n"
|
||||||
@ -769,19 +769,19 @@ NAKED bool8 sub_8057D9C(Entity * pokemon, Entity * target)
|
|||||||
"_08057E18: .4byte gUnknown_80FD370");
|
"_08057E18: .4byte gUnknown_80FD370");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 FocusEnergyMoveAction(Entity * pokemon, Entity * target)
|
bool8 FocusEnergyMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
FocusEnergyStatusTarget(pokemon, target);
|
FocusEnergyStatusTarget(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target)
|
bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
WhifferStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4EDC, TRUE));
|
WhifferStatusTarget(pokemon, target, CalculateStatusTurns(target, gUnknown_80F4EDC, TRUE));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8057E50(Entity *pokemon, Entity *target)
|
bool8 sub_8057E50(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
SendThawedMessage(pokemon, target);
|
SendThawedMessage(pokemon, target);
|
||||||
MirrorMoveStatusTarget(pokemon, target);
|
MirrorMoveStatusTarget(pokemon, target);
|
||||||
@ -820,7 +820,7 @@ bool8 sub_8057ED0(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8057F24(Entity *pokemon, Entity *target)
|
bool8 sub_8057F24(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
EntityInfo *entityInfo;
|
EntityInfo *entityInfo;
|
||||||
|
|
||||||
@ -847,14 +847,14 @@ bool8 sub_8057F7C(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8057FCC(Entity *pokemon, Entity *target)
|
bool8 sub_8057FCC(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
ConfuseStatusTarget(pokemon, target, TRUE);
|
ConfuseStatusTarget(pokemon, target, TRUE);
|
||||||
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A50, 1);
|
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A50, 1);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_8057FF4(Entity *pokemon, Entity *target)
|
bool8 sub_8057FF4(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
u8 flashFireStatus;
|
u8 flashFireStatus;
|
||||||
|
|
||||||
@ -907,7 +907,7 @@ _080580B0:
|
|||||||
return local_24;
|
return local_24;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 GrudgeMoveAction(Entity *pokemon, Entity * target)
|
bool8 GrudgeMoveAction(Entity *pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
EntityInfo *entityInfo;
|
EntityInfo *entityInfo;
|
||||||
bool8 hasGrudge;
|
bool8 hasGrudge;
|
||||||
@ -926,7 +926,7 @@ bool8 GrudgeMoveAction(Entity *pokemon, Entity * target)
|
|||||||
return hasGrudge;
|
return hasGrudge;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805815C(Entity *pokemon, Entity *target)
|
bool8 CounterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
CounterStatusTarget(pokemon, target, STATUS_COUNTER);
|
CounterStatusTarget(pokemon, target, STATUS_COUNTER);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -984,7 +984,7 @@ bool8 sub_8058270(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||||||
u32 r3;
|
u32 r3;
|
||||||
|
|
||||||
r3 = 1;
|
r3 = 1;
|
||||||
if((u8)(target->info->chargingStatus - 7) <= 1)
|
if((u8)(target->info->charging.chargingStatus - 7) <= 1)
|
||||||
r3 = 2;
|
r3 = 2;
|
||||||
flag = sub_8055640(pokemon,target,move,r3 << 8,param_4) ? TRUE : FALSE;
|
flag = sub_8055640(pokemon,target,move,r3 << 8,param_4) ? TRUE : FALSE;
|
||||||
return flag;
|
return flag;
|
||||||
@ -1117,7 +1117,7 @@ bool8 sub_8058548(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||||||
u32 r5;
|
u32 r5;
|
||||||
|
|
||||||
r5 = 0x80 << 1;
|
r5 = 0x80 << 1;
|
||||||
if((pokemon->info->nonVolatileStatus) != STATUS_NONE)
|
if((pokemon->info->nonVolatile.nonVolatileStatus) != STATUS_NONE)
|
||||||
r5 = gUnknown_80F4F6C;
|
r5 = gUnknown_80F4F6C;
|
||||||
flag = sub_8055640(pokemon,target,move,r5,param_4) ? TRUE : FALSE;
|
flag = sub_8055640(pokemon,target,move,r5,param_4) ? TRUE : FALSE;
|
||||||
return flag;
|
return flag;
|
||||||
@ -1138,13 +1138,13 @@ bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_80585CC(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
||||||
{
|
{
|
||||||
bool8 flag;
|
bool8 flag;
|
||||||
|
|
||||||
flag = FALSE;
|
flag = FALSE;
|
||||||
if ((target->info->protectionStatus == STATUS_REFLECT) || (target->info->protectionStatus == STATUS_LIGHT_SCREEN)) {
|
if ((target->info->protection.protectionStatus == STATUS_REFLECT) || (target->info->protection.protectionStatus == STATUS_LIGHT_SCREEN)) {
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FD104);
|
sub_80522F4(pokemon,target,*gUnknown_80FD104); // The barrier was shattered
|
||||||
SendProtectionEndMessage(pokemon,target);
|
SendProtectionEndMessage(pokemon,target);
|
||||||
flag = TRUE;
|
flag = TRUE;
|
||||||
}
|
}
|
||||||
@ -1259,7 +1259,7 @@ bool8 sub_80587E8(Entity * pokemon, Entity * target, Move * move, u32 param_4)
|
|||||||
{
|
{
|
||||||
bool8 flag;
|
bool8 flag;
|
||||||
|
|
||||||
if (target->info->nonVolatileStatus == STATUS_PARALYSIS) {
|
if (target->info->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS) {
|
||||||
flag = sub_8055640(pokemon,target,move,0x80 << 2,param_4) ? TRUE : FALSE;
|
flag = sub_8055640(pokemon,target,move,0x80 << 2,param_4) ? TRUE : FALSE;
|
||||||
SendNonVolatileEndMessage(pokemon, target);
|
SendNonVolatileEndMessage(pokemon, target);
|
||||||
}
|
}
|
||||||
@ -1627,7 +1627,7 @@ bool32 sub_8058F04(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
|||||||
iVar3 = 1;
|
iVar3 = 1;
|
||||||
gDungeon->unk18200 = 0xc;
|
gDungeon->unk18200 = 0xc;
|
||||||
gDungeon->unk18204 = 0;
|
gDungeon->unk18204 = 0;
|
||||||
if (entityInfo->chargingStatus == STATUS_DIGGING) {
|
if (entityInfo->charging.chargingStatus == STATUS_DIGGING) {
|
||||||
iVar3 = 2;
|
iVar3 = 2;
|
||||||
}
|
}
|
||||||
flag = sub_8055640(pokemon,target,move,iVar3 << 8,param_4);
|
flag = sub_8055640(pokemon,target,move,iVar3 << 8,param_4);
|
||||||
@ -1829,7 +1829,7 @@ bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
|
|||||||
|
|
||||||
// https://decomp.me/scratch/Ul8x5
|
// https://decomp.me/scratch/Ul8x5
|
||||||
#ifdef NONMATCHING
|
#ifdef NONMATCHING
|
||||||
bool32 SketchMoveAction(struct Entity *pokemon, struct Entity *target, struct Move *move)
|
bool32 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
u16 moveID;
|
u16 moveID;
|
||||||
struct EntityInfo *targetInfo;
|
struct EntityInfo *targetInfo;
|
||||||
@ -1879,7 +1879,7 @@ _moveIDcheck:
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
NAKED
|
NAKED
|
||||||
bool32 SketchMoveAction(struct Entity *pokemon, struct Entity *target, struct Move *move)
|
bool32 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
asm_unified(
|
asm_unified(
|
||||||
"\tpush {r4-r7,lr}\n"
|
"\tpush {r4-r7,lr}\n"
|
||||||
@ -2210,7 +2210,7 @@ bool8 sub_8059928(Entity * pokemon,Entity * target,Move * move,u32 param_4)
|
|||||||
|
|
||||||
iVar2 = 1;
|
iVar2 = 1;
|
||||||
flag = FALSE;
|
flag = FALSE;
|
||||||
if ((u8)(target->info->chargingStatus - 7) <= 1){
|
if ((u8)(target->info->charging.chargingStatus - 7) <= 1){
|
||||||
iVar2 = 2;
|
iVar2 = 2;
|
||||||
}
|
}
|
||||||
if (sub_8055640(pokemon,target,move,iVar2 << 8,param_4) != 0)
|
if (sub_8055640(pokemon,target,move,iVar2 << 8,param_4) != 0)
|
||||||
@ -2616,7 +2616,7 @@ bool8 sub_805A120(Entity * pokemon,Entity * target, Move *move, u32 param_4)
|
|||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FC7AC);
|
sub_80522F4(pokemon,target,*gUnknown_80FC7AC); // The item trade failed
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2629,7 +2629,7 @@ bool8 sub_805A120(Entity * pokemon,Entity * target, Move *move, u32 param_4)
|
|||||||
if (r7->unkFB == 0) {
|
if (r7->unkFB == 0) {
|
||||||
r7->unkFB = 1;
|
r7->unkFB = 1;
|
||||||
}
|
}
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FC790);
|
sub_80522F4(pokemon,target,*gUnknown_80FC790); // Traded items
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2644,15 +2644,15 @@ bool8 sub_805A210(Entity * pokemon, Entity * target, Move *move, u32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805A23C(Entity * pokemon, Entity * target, Move *move, u32 param_4)
|
bool8 MudWaterSportMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4)
|
||||||
{
|
{
|
||||||
if(move->id == MOVE_MUD_SPORT)
|
if(move->id == MOVE_MUD_SPORT)
|
||||||
{
|
{
|
||||||
sub_807EA30(0);
|
MudWaterSportEffect(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sub_807EA30(1);
|
MudWaterSportEffect(1);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -2696,7 +2696,7 @@ bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||||||
u32 uVar2;
|
u32 uVar2;
|
||||||
|
|
||||||
flag = FALSE;
|
flag = FALSE;
|
||||||
if (target->info->chargingStatus == STATUS_DIVING) {
|
if (target->info->charging.chargingStatus == STATUS_DIVING) {
|
||||||
uVar2 = 0x200;
|
uVar2 = 0x200;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3202,7 +3202,7 @@ bool8 sub_805AD34(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||||||
|
|
||||||
static inline bool8 sub_805AD54_sub(Entity *entity)
|
static inline bool8 sub_805AD54_sub(Entity *entity)
|
||||||
{
|
{
|
||||||
if ((entity->info->joinedAt == 0x4A) || (entity->info->joinedAt == 0x47)) {
|
if ((entity->info->joinedAt.joinedAt == 0x4A) || (entity->info->joinedAt.joinedAt == 0x47)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -114,20 +114,20 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_RAGE:
|
case MOVE_RAGE:
|
||||||
if (pokemonInfo->chargingStatus == STATUS_ENRAGED)
|
if (pokemonInfo->charging.chargingStatus == STATUS_ENRAGED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_COUNTER:
|
case MOVE_COUNTER:
|
||||||
case MOVE_PURSUIT:
|
case MOVE_PURSUIT:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_COUNTER)
|
if (pokemonInfo->protection.protectionStatus == STATUS_COUNTER)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_MIRROR_MOVE:
|
case MOVE_MIRROR_MOVE:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_MIRROR_MOVE)
|
if (pokemonInfo->protection.protectionStatus == STATUS_MIRROR_MOVE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
break;
|
break;
|
||||||
case MOVE_BIDE:
|
case MOVE_BIDE:
|
||||||
case MOVE_REVENGE:
|
case MOVE_REVENGE:
|
||||||
if (pokemonInfo->chargingStatus == STATUS_BIDE)
|
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
}
|
}
|
||||||
case MOVE_LOCK_ON:
|
case MOVE_LOCK_ON:
|
||||||
case MOVE_MIND_READER:
|
case MOVE_MIND_READER:
|
||||||
if (pokemonInfo->moveStatus == STATUS_SURE_SHOT)
|
if (pokemonInfo->moveStatus.moveStatus == STATUS_SURE_SHOT)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -193,25 +193,25 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_ENDURE:
|
case MOVE_ENDURE:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_ENDURING)
|
if (pokemonInfo->protection.protectionStatus == STATUS_ENDURING)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_CHARGE:
|
case MOVE_CHARGE:
|
||||||
if (pokemonInfo->chargingStatus == STATUS_CHARGING)
|
if (pokemonInfo->charging.chargingStatus == STATUS_CHARGING)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_MIST:
|
case MOVE_MIST:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_MIST)
|
if (pokemonInfo->protection.protectionStatus == STATUS_MIST)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_LIGHT_SCREEN:
|
case MOVE_LIGHT_SCREEN:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_LIGHT_SCREEN)
|
if (pokemonInfo->protection.protectionStatus == STATUS_LIGHT_SCREEN)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_INGRAIN:
|
case MOVE_INGRAIN:
|
||||||
if (pokemonInfo->immobilizeStatus == STATUS_INGRAIN || pokemonInfo->maxHPStat / 2 < pokemonInfo->HP)
|
if (pokemonInfo->immobilize.immobilizeStatus == STATUS_INGRAIN || pokemonInfo->maxHPStat / 2 < pokemonInfo->HP)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -242,7 +242,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
break;
|
break;
|
||||||
case MOVE_DOOM_DESIRE:
|
case MOVE_DOOM_DESIRE:
|
||||||
case MOVE_FUTURE_SIGHT:
|
case MOVE_FUTURE_SIGHT:
|
||||||
if (pokemonInfo->moveStatus == STATUS_SET_DAMAGE)
|
if (pokemonInfo->moveStatus.moveStatus == STATUS_SET_DAMAGE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -266,19 +266,19 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_DESTINY_BOND:
|
case MOVE_DESTINY_BOND:
|
||||||
if (pokemonInfo->linkedStatus == STATUS_DESTINY_BOND)
|
if (pokemonInfo->linked.linkedStatus == STATUS_DESTINY_BOND)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_MIRROR_COAT:
|
case MOVE_MIRROR_COAT:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_MIRROR_COAT)
|
if (pokemonInfo->protection.protectionStatus == STATUS_MIRROR_COAT)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_REFLECT:
|
case MOVE_REFLECT:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_REFLECT)
|
if (pokemonInfo->protection.protectionStatus == STATUS_REFLECT)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -290,14 +290,14 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_MAGIC_COAT:
|
case MOVE_MAGIC_COAT:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_MAGIC_COAT)
|
if (pokemonInfo->protection.protectionStatus == STATUS_MAGIC_COAT)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_DETECT:
|
case MOVE_DETECT:
|
||||||
case MOVE_PROTECT:
|
case MOVE_PROTECT:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_PROTECT)
|
if (pokemonInfo->protection.protectionStatus == STATUS_PROTECT)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -321,19 +321,19 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_SAFEGUARD:
|
case MOVE_SAFEGUARD:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_SAFEGUARD)
|
if (pokemonInfo->protection.protectionStatus == STATUS_SAFEGUARD)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_INVISIFY:
|
case MOVE_INVISIFY:
|
||||||
if (pokemonInfo->transformStatus == STATUS_INVISIBLE)
|
if (pokemonInfo->transformStatus.transformStatus == STATUS_INVISIBLE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_FOCUS_ENERGY:
|
case MOVE_FOCUS_ENERGY:
|
||||||
if (pokemonInfo->moveStatus == STATUS_FOCUS_ENERGY)
|
if (pokemonInfo->moveStatus.moveStatus == STATUS_FOCUS_ENERGY)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -432,13 +432,13 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_WISH:
|
case MOVE_WISH:
|
||||||
if (pokemonInfo->isNotTeamMember || pokemonInfo->protectionStatus == STATUS_WISH)
|
if (pokemonInfo->isNotTeamMember || pokemonInfo->protection.protectionStatus == STATUS_WISH)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_TRANSFORM:
|
case MOVE_TRANSFORM:
|
||||||
if (pokemonInfo->transformStatus == STATUS_TRANSFORMED)
|
if (pokemonInfo->transformStatus.transformStatus == STATUS_TRANSFORMED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -461,7 +461,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_SNATCH:
|
case MOVE_SNATCH:
|
||||||
if (pokemonInfo->waitingStatus == STATUS_SNATCH)
|
if (pokemonInfo->waitingStruct.waitingStatus == STATUS_SNATCH)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -483,7 +483,7 @@ bool8 CanUseOnSelfWithStatusChecker(Entity *pokemon, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_CONVERSION_2:
|
case MOVE_CONVERSION_2:
|
||||||
if (pokemonInfo->protectionStatus == STATUS_CONVERSION2)
|
if (pokemonInfo->protection.protectionStatus == STATUS_CONVERSION2)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -546,7 +546,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
EntityInfo *userData = user->info;
|
EntityInfo *userData = user->info;
|
||||||
EntityInfo *targetData = target->info;
|
EntityInfo *targetData = target->info;
|
||||||
s32 i;
|
s32 i;
|
||||||
if (targetData->immobilizeStatus == STATUS_FROZEN && MoveCannotHitFrozen(move))
|
if (targetData->immobilize.immobilizeStatus == STATUS_FROZEN && MoveCannotHitFrozen(move))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -564,7 +564,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_YAWN:
|
case MOVE_YAWN:
|
||||||
if (targetData->sleep == STATUS_YAWNING)
|
if (targetData->sleep.sleep == STATUS_YAWNING)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -574,7 +574,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_NIGHTMARE:
|
case MOVE_NIGHTMARE:
|
||||||
if (targetData->sleep == STATUS_NIGHTMARE)
|
if (targetData->sleep.sleep == STATUS_NIGHTMARE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -592,7 +592,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_ENCORE:
|
case MOVE_ENCORE:
|
||||||
if (targetData->volatileStatus == STATUS_ENCORE)
|
if (targetData->volatileStatus.volatileStatus == STATUS_ENCORE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -646,7 +646,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_SMOKESCREEN:
|
case MOVE_SMOKESCREEN:
|
||||||
if (targetData->moveStatus == STATUS_WHIFFER)
|
if (targetData->moveStatus.moveStatus == STATUS_WHIFFER)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -659,7 +659,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_WILL_O_WISP:
|
case MOVE_WILL_O_WISP:
|
||||||
if (targetData->nonVolatileStatus == STATUS_BURN)
|
if (targetData->nonVolatile.nonVolatileStatus == STATUS_BURN)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -682,7 +682,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
case MOVE_GLARE:
|
case MOVE_GLARE:
|
||||||
case MOVE_STUN_SPORE:
|
case MOVE_STUN_SPORE:
|
||||||
case MOVE_THUNDER_WAVE:
|
case MOVE_THUNDER_WAVE:
|
||||||
if (targetData->nonVolatileStatus == STATUS_PARALYSIS)
|
if (targetData->nonVolatile.nonVolatileStatus == STATUS_PARALYSIS)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -716,7 +716,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
case MOVE_BLOCK:
|
case MOVE_BLOCK:
|
||||||
case MOVE_MEAN_LOOK:
|
case MOVE_MEAN_LOOK:
|
||||||
case MOVE_SPIDER_WEB:
|
case MOVE_SPIDER_WEB:
|
||||||
if (targetData->immobilizeStatus == STATUS_SHADOW_HOLD)
|
if (targetData->immobilize.immobilizeStatus == STATUS_SHADOW_HOLD)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -741,7 +741,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MOVE_UPROAR:
|
case MOVE_UPROAR:
|
||||||
if (targetData->sleep == STATUS_SLEEPLESS)
|
if (targetData->sleep.sleep == STATUS_SLEEPLESS)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -774,7 +774,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_TAUNT:
|
case MOVE_TAUNT:
|
||||||
if (targetData->volatileStatus == STATUS_TAUNTED)
|
if (targetData->volatileStatus.volatileStatus == STATUS_TAUNTED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -809,7 +809,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
case MOVE_CURSE:
|
case MOVE_CURSE:
|
||||||
if (MonsterIsType(user, TYPE_GHOST))
|
if (MonsterIsType(user, TYPE_GHOST))
|
||||||
{
|
{
|
||||||
if (targetData->waitingStatus == STATUS_CURSED)
|
if (targetData->waitingStruct.waitingStatus == STATUS_CURSED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -825,7 +825,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
break;
|
break;
|
||||||
case MOVE_IMPRISON:
|
case MOVE_IMPRISON:
|
||||||
case MOVE_OBSERVER:
|
case MOVE_OBSERVER:
|
||||||
if (targetData->volatileStatus == STATUS_PAUSED)
|
if (targetData->volatileStatus.volatileStatus == STATUS_PAUSED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -837,7 +837,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_LEECH_SEED:
|
case MOVE_LEECH_SEED:
|
||||||
if (targetData->linkedStatus == STATUS_LEECH_SEED)
|
if (targetData->linked.linkedStatus == STATUS_LEECH_SEED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -856,34 +856,34 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_ATTRACT:
|
case MOVE_ATTRACT:
|
||||||
if (targetData->volatileStatus == STATUS_INFATUATED)
|
if (targetData->volatileStatus.volatileStatus == STATUS_INFATUATED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_WRAP:
|
case MOVE_WRAP:
|
||||||
if (targetData->immobilizeStatus == STATUS_WRAP)
|
if (targetData->immobilize.immobilizeStatus == STATUS_WRAP)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (targetData->immobilizeStatus == STATUS_WRAPPED)
|
if (targetData->immobilize.immobilizeStatus == STATUS_WRAPPED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_TOXIC:
|
case MOVE_TOXIC:
|
||||||
if (targetData->nonVolatileStatus == STATUS_BADLY_POISONED)
|
if (targetData->nonVolatile.nonVolatileStatus == STATUS_BADLY_POISONED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_POISON_GAS:
|
case MOVE_POISON_GAS:
|
||||||
case MOVE_POISONPOWDER:
|
case MOVE_POISONPOWDER:
|
||||||
if (targetData->nonVolatileStatus == STATUS_POISONED)
|
if (targetData->nonVolatile.nonVolatileStatus == STATUS_POISONED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (targetData->nonVolatileStatus == STATUS_BADLY_POISONED)
|
if (targetData->nonVolatile.nonVolatileStatus == STATUS_BADLY_POISONED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -895,7 +895,7 @@ bool8 CanUseOnTargetWithStatusChecker(Entity *user, Entity *target, Move *move)
|
|||||||
case MOVE_SWEET_KISS:
|
case MOVE_SWEET_KISS:
|
||||||
case MOVE_TEETER_DANCE:
|
case MOVE_TEETER_DANCE:
|
||||||
case MOVE_TOTTER:
|
case MOVE_TOTTER:
|
||||||
if (targetData->volatileStatus == STATUS_CONFUSED)
|
if (targetData->volatileStatus.volatileStatus == STATUS_CONFUSED)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -155,11 +155,11 @@ void sub_8075BA4(Entity *param_1, u8 param_2)
|
|||||||
{
|
{
|
||||||
EntityInfo * entityInfo = param_1->info;
|
EntityInfo * entityInfo = param_1->info;
|
||||||
|
|
||||||
if ((param_2 != 0) && (entityInfo->volatileStatus == STATUS_COWERING)) {
|
if ((param_2 != 0) && (entityInfo->volatileStatus.volatileStatus == STATUS_COWERING)) {
|
||||||
entityInfo->action.direction = (entityInfo->action.direction + 4) & DIRECTION_MASK;
|
entityInfo->action.direction = (entityInfo->action.direction + 4) & DIRECTION_MASK;
|
||||||
TargetTileInFront(param_1);
|
TargetTileInFront(param_1);
|
||||||
}
|
}
|
||||||
else if (entityInfo->volatileStatus == STATUS_CONFUSED) {
|
else if (entityInfo->volatileStatus.volatileStatus == STATUS_CONFUSED) {
|
||||||
entityInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
entityInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
||||||
TargetTileInFront(param_1);
|
TargetTileInFront(param_1);
|
||||||
}
|
}
|
||||||
@ -178,18 +178,18 @@ u8 sub_8075BF4(Entity * pokemon, s32 sleepTurns)
|
|||||||
{
|
{
|
||||||
entityInfo = pokemon->info;
|
entityInfo = pokemon->info;
|
||||||
|
|
||||||
if(entityInfo->sleep != STATUS_NIGHTMARE && entityInfo->sleep != STATUS_SLEEP)
|
if(entityInfo->sleep.sleep != STATUS_NIGHTMARE && entityInfo->sleep.sleep != STATUS_SLEEP)
|
||||||
{
|
{
|
||||||
entityInfo->sleep = STATUS_SLEEP;
|
entityInfo->sleep.sleep = STATUS_SLEEP;
|
||||||
if ((sleepTurns != 0x7f) && HasAbility(pokemon, ABILITY_EARLY_BIRD) &&
|
if ((sleepTurns != 0x7f) && HasAbility(pokemon, ABILITY_EARLY_BIRD) &&
|
||||||
(sleepTurns = sleepTurns / 2, sleepTurns < 1)) {
|
(sleepTurns = sleepTurns / 2, sleepTurns < 1)) {
|
||||||
sleepTurns = 1;
|
sleepTurns = 1;
|
||||||
}
|
}
|
||||||
entityInfo->sleepTurns = sleepTurns;
|
entityInfo->sleep.sleepTurns = sleepTurns;
|
||||||
}
|
}
|
||||||
else if(entityInfo->sleep == STATUS_SLEEP)
|
else if(entityInfo->sleep.sleep == STATUS_SLEEP)
|
||||||
uVar4 = 1;
|
uVar4 = 1;
|
||||||
else if(entityInfo->sleep == STATUS_NIGHTMARE)
|
else if(entityInfo->sleep.sleep == STATUS_NIGHTMARE)
|
||||||
uVar4 = 2;
|
uVar4 = 2;
|
||||||
EntityUpdateStatusSprites(pokemon);
|
EntityUpdateStatusSprites(pokemon);
|
||||||
}
|
}
|
||||||
@ -203,7 +203,7 @@ void sub_8075C58(Entity * pokemon, Entity * target, s32 turns, u8 displayMessage
|
|||||||
|
|
||||||
|
|
||||||
if (!CannotSleep(pokemon,target,1,displayMessage)) {
|
if (!CannotSleep(pokemon,target,1,displayMessage)) {
|
||||||
sleep = target->info->sleep;
|
sleep = target->info->sleep.sleep;
|
||||||
if (sleep == STATUS_SLEEPLESS) {
|
if (sleep == STATUS_SLEEPLESS) {
|
||||||
if (displayMessage)
|
if (displayMessage)
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB380);
|
sub_80522F4(pokemon,target,*gUnknown_80FB380);
|
||||||
@ -269,19 +269,19 @@ void NightmareStatusTarget(Entity * pokemon, Entity * target, s32 turns)
|
|||||||
hasNightmare = FALSE;
|
hasNightmare = FALSE;
|
||||||
if (!CannotSleep(pokemon, target, 1, TRUE)) {
|
if (!CannotSleep(pokemon, target, 1, TRUE)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
if (entityInfo->sleep != STATUS_SLEEPLESS) {
|
if (entityInfo->sleep.sleep != STATUS_SLEEPLESS) {
|
||||||
sub_8041EC8(target);
|
sub_8041EC8(target);
|
||||||
if (entityInfo->sleep != STATUS_NIGHTMARE) {
|
if (entityInfo->sleep.sleep != STATUS_NIGHTMARE) {
|
||||||
entityInfo->sleepTurns = turns;
|
entityInfo->sleep.sleepTurns = turns;
|
||||||
if ((HasAbility(target, ABILITY_EARLY_BIRD)) && (entityInfo->sleepTurns >>= 1, entityInfo->sleepTurns == 0)) {
|
if ((HasAbility(target, ABILITY_EARLY_BIRD)) && (entityInfo->sleep.sleepTurns >>= 1, entityInfo->sleep.sleepTurns == 0)) {
|
||||||
entityInfo->sleepTurns = 1;
|
entityInfo->sleep.sleepTurns = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hasNightmare = TRUE;
|
hasNightmare = TRUE;
|
||||||
}
|
}
|
||||||
entityInfo->sleep = STATUS_NIGHTMARE;
|
entityInfo->sleep.sleep = STATUS_NIGHTMARE;
|
||||||
sub_806CE68(target,8);
|
sub_806CE68(target,8);
|
||||||
if (hasNightmare) {
|
if (hasNightmare) {
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB3CC);
|
sub_80522F4(pokemon,target,*gUnknown_80FB3CC);
|
||||||
@ -306,19 +306,19 @@ void NappingStatusTarget(Entity * pokemon, Entity * target, s32 turns)
|
|||||||
isSleeping = FALSE;
|
isSleeping = FALSE;
|
||||||
if (!CannotSleep(pokemon, target, 0, TRUE)) {
|
if (!CannotSleep(pokemon, target, 0, TRUE)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
if (entityInfo->sleep != STATUS_SLEEPLESS) {
|
if (entityInfo->sleep.sleep != STATUS_SLEEPLESS) {
|
||||||
sub_8041ED8(target);
|
sub_8041ED8(target);
|
||||||
if (entityInfo->sleep == STATUS_NONE || entityInfo->sleep == STATUS_YAWNING) {
|
if (entityInfo->sleep.sleep == STATUS_NONE || entityInfo->sleep.sleep == STATUS_YAWNING) {
|
||||||
entityInfo->sleepTurns = turns;
|
entityInfo->sleep.sleepTurns = turns;
|
||||||
if ((HasAbility(target, ABILITY_EARLY_BIRD)) && (entityInfo->sleepTurns >>= 1, entityInfo->sleepTurns == 0)) {
|
if ((HasAbility(target, ABILITY_EARLY_BIRD)) && (entityInfo->sleep.sleepTurns >>= 1, entityInfo->sleep.sleepTurns == 0)) {
|
||||||
entityInfo->sleepTurns = 1;
|
entityInfo->sleep.sleepTurns = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
isSleeping = TRUE;
|
isSleeping = TRUE;
|
||||||
}
|
}
|
||||||
entityInfo->sleep = STATUS_NAPPING;
|
entityInfo->sleep.sleep = STATUS_NAPPING;
|
||||||
sub_806CE68(target, 8);
|
sub_806CE68(target, 8);
|
||||||
if (isSleeping) {
|
if (isSleeping) {
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB360);
|
sub_80522F4(pokemon,target,*gUnknown_80FB360);
|
||||||
@ -343,21 +343,21 @@ void YawnedStatusTarget(Entity * pokemon, Entity * target, s32 turns)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
if (entityInfo->sleep == STATUS_NONE) {
|
if (entityInfo->sleep.sleep == STATUS_NONE) {
|
||||||
entityInfo->sleep = STATUS_YAWNING;
|
entityInfo->sleep.sleep = STATUS_YAWNING;
|
||||||
entityInfo->sleepTurns = turns;
|
entityInfo->sleep.sleepTurns = turns;
|
||||||
nullsub_91(target);
|
nullsub_91(target);
|
||||||
sub_806CE68(target, 8);
|
sub_806CE68(target, 8);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB3E0);
|
sub_80522F4(pokemon,target,*gUnknown_80FB3E0);
|
||||||
}
|
}
|
||||||
else if (((entityInfo->sleep == STATUS_SLEEP) || (entityInfo->sleep == STATUS_NIGHTMARE)) || (entityInfo->sleep == STATUS_NAPPING)) {
|
else if (((entityInfo->sleep.sleep == STATUS_SLEEP) || (entityInfo->sleep.sleep == STATUS_NIGHTMARE)) || (entityInfo->sleep.sleep == STATUS_NAPPING)) {
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB418);
|
sub_80522F4(pokemon,target,*gUnknown_80FB418);
|
||||||
}
|
}
|
||||||
else if (entityInfo->sleep == STATUS_SLEEPLESS) {
|
else if (entityInfo->sleep.sleep == STATUS_SLEEPLESS) {
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB3F8);
|
sub_80522F4(pokemon,target,*gUnknown_80FB3F8);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (entityInfo->sleep == STATUS_YAWNING)
|
if (entityInfo->sleep.sleep == STATUS_YAWNING)
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB414);
|
sub_80522F4(pokemon,target,*gUnknown_80FB414);
|
||||||
else
|
else
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB3E0);
|
sub_80522F4(pokemon,target,*gUnknown_80FB3E0);
|
||||||
@ -376,15 +376,15 @@ void SleeplessStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
}
|
}
|
||||||
|
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
if ((entityInfo->sleep == STATUS_SLEEP) || (entityInfo->sleep == STATUS_NAPPING) || (entityInfo->sleep == STATUS_NIGHTMARE)) {
|
if ((entityInfo->sleep.sleep == STATUS_SLEEP) || (entityInfo->sleep.sleep == STATUS_NAPPING) || (entityInfo->sleep.sleep == STATUS_NIGHTMARE)) {
|
||||||
isAsleep = TRUE;
|
isAsleep = TRUE;
|
||||||
}
|
}
|
||||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||||
|
|
||||||
if (entityInfo->sleep != STATUS_SLEEPLESS)
|
if (entityInfo->sleep.sleep != STATUS_SLEEPLESS)
|
||||||
{
|
{
|
||||||
entityInfo->sleep = STATUS_SLEEPLESS;
|
entityInfo->sleep.sleep = STATUS_SLEEPLESS;
|
||||||
entityInfo->sleepTurns = CalculateStatusTurns(target, gUnknown_80F4E7C, FALSE) + 1;
|
entityInfo->sleep.sleepTurns = CalculateStatusTurns(target, gUnknown_80F4E7C, FALSE) + 1;
|
||||||
entityInfo->unk165 = 0xFF;
|
entityInfo->unk165 = 0xFF;
|
||||||
entityInfo->unk164 = 0xFF;
|
entityInfo->unk164 = 0xFF;
|
||||||
sub_8041EE8(target);
|
sub_8041EE8(target);
|
||||||
@ -412,9 +412,9 @@ void PausedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, s32 turns
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SetMessageArgument_2(gAvailablePokemonNames,entityInfo,0);
|
SetMessageArgument_2(gAvailablePokemonNames,entityInfo,0);
|
||||||
if (entityInfo->volatileStatus != STATUS_PAUSED) {
|
if (entityInfo->volatileStatus.volatileStatus != STATUS_PAUSED) {
|
||||||
entityInfo->volatileStatus = STATUS_PAUSED;
|
entityInfo->volatileStatus.volatileStatus = STATUS_PAUSED;
|
||||||
entityInfo->volatileStatusTurns = turns + 1;
|
entityInfo->volatileStatus.volatileStatusTurns = turns + 1;
|
||||||
nullsub_72(target);
|
nullsub_72(target);
|
||||||
if (turns == 1) {
|
if (turns == 1) {
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB480);
|
sub_80522F4(pokemon,target,*gUnknown_80FB480);
|
||||||
@ -452,9 +452,9 @@ void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessa
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetMessageArgument_2(gAvailablePokemonNames,entityInfo,0);
|
SetMessageArgument_2(gAvailablePokemonNames,entityInfo,0);
|
||||||
if (entityInfo->volatileStatus != STATUS_INFATUATED) {
|
if (entityInfo->volatileStatus.volatileStatus != STATUS_INFATUATED) {
|
||||||
entityInfo->volatileStatus = STATUS_INFATUATED;
|
entityInfo->volatileStatus.volatileStatus = STATUS_INFATUATED;
|
||||||
entityInfo->volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F00,TRUE) + 1;
|
entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4F00,TRUE) + 1;
|
||||||
sub_8041EF8(target);
|
sub_8041EF8(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB50C);
|
sub_80522F4(pokemon,target,*gUnknown_80FB50C);
|
||||||
}
|
}
|
||||||
@ -505,11 +505,11 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
isNotBurned = TRUE;
|
isNotBurned = TRUE;
|
||||||
if (entityInfo->nonVolatileStatus != STATUS_BURN) {
|
if (entityInfo->nonVolatile.nonVolatileStatus != STATUS_BURN) {
|
||||||
entityInfo->nonVolatileStatus = STATUS_BURN;
|
entityInfo->nonVolatile.nonVolatileStatus = STATUS_BURN;
|
||||||
entityInfo->nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E30,TRUE) + 1;
|
entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E30,TRUE) + 1;
|
||||||
entityInfo->nonVolatileStatusDamageCountdown = 0;
|
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = 0;
|
||||||
entityInfo->fillAF = 0;
|
entityInfo->nonVolatile.unk4 = 0;
|
||||||
isNotBurned = FALSE;
|
isNotBurned = FALSE;
|
||||||
if (param_3 != 0) {
|
if (param_3 != 0) {
|
||||||
sub_8041C34(target);
|
sub_8041C34(target);
|
||||||
@ -591,14 +591,14 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
|
|||||||
{
|
{
|
||||||
isNotPoisoned = TRUE;
|
isNotPoisoned = TRUE;
|
||||||
|
|
||||||
if(entityInfo->nonVolatileStatus != STATUS_BADLY_POISONED)
|
if(entityInfo->nonVolatile.nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||||
{
|
{
|
||||||
if(entityInfo->nonVolatileStatus != STATUS_POISONED)
|
if(entityInfo->nonVolatile.nonVolatileStatus != STATUS_POISONED)
|
||||||
{
|
{
|
||||||
entityInfo->nonVolatileStatus = STATUS_POISONED;
|
entityInfo->nonVolatile.nonVolatileStatus = STATUS_POISONED;
|
||||||
entityInfo->nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E34,TRUE) + 1;
|
entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E34,TRUE) + 1;
|
||||||
entityInfo->nonVolatileStatusDamageCountdown = 0;
|
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = 0;
|
||||||
entityInfo->fillAF = 0;
|
entityInfo->nonVolatile.unk4 = 0;
|
||||||
isNotPoisoned = FALSE;
|
isNotPoisoned = FALSE;
|
||||||
sub_8041C6C(target);
|
sub_8041C6C(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB598);
|
sub_80522F4(pokemon,target,*gUnknown_80FB598);
|
||||||
@ -680,12 +680,12 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM
|
|||||||
{
|
{
|
||||||
isNotBadlyPoisoned = TRUE;
|
isNotBadlyPoisoned = TRUE;
|
||||||
|
|
||||||
if(entityInfo->nonVolatileStatus != STATUS_BADLY_POISONED)
|
if(entityInfo->nonVolatile.nonVolatileStatus != STATUS_BADLY_POISONED)
|
||||||
{
|
{
|
||||||
entityInfo->nonVolatileStatus = STATUS_BADLY_POISONED;
|
entityInfo->nonVolatile.nonVolatileStatus = STATUS_BADLY_POISONED;
|
||||||
entityInfo->nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E38,TRUE) + 1;
|
entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E38,TRUE) + 1;
|
||||||
entityInfo->nonVolatileStatusDamageCountdown = 0;
|
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = 0;
|
||||||
entityInfo->fillAF = 0;
|
entityInfo->nonVolatile.unk4 = 0;
|
||||||
isNotBadlyPoisoned = FALSE;
|
isNotBadlyPoisoned = FALSE;
|
||||||
sub_8041C7C(target);
|
sub_8041C7C(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB5B4);
|
sub_80522F4(pokemon,target,*gUnknown_80FB5B4);
|
||||||
@ -738,7 +738,7 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||||||
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
SetMessageArgument(gAvailablePokemonNames, target, 0);
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
|
|
||||||
if ((entityInfo->immobilizeStatus != STATUS_FROZEN) && !HasSafeguardStatus(pokemon,target,displayMessage)) {
|
if ((entityInfo->immobilize.immobilizeStatus != STATUS_FROZEN) && !HasSafeguardStatus(pokemon,target,displayMessage)) {
|
||||||
if (HasAbility(target, ABILITY_MAGMA_ARMOR)) {
|
if (HasAbility(target, ABILITY_MAGMA_ARMOR)) {
|
||||||
if (displayMessage)
|
if (displayMessage)
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FCDE0);
|
sub_80522F4(pokemon,target,*gUnknown_80FCDE0);
|
||||||
@ -759,13 +759,13 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((u8)(entityInfo->immobilizeStatus - 3) <= 1) {
|
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3) <= 1) {
|
||||||
sub_8076CB4(entityInfo->unk9C);
|
sub_8076CB4(entityInfo->unk9C);
|
||||||
}
|
}
|
||||||
sub_8041F08(target);
|
sub_8041F08(target);
|
||||||
entityInfo->immobilizeStatus = STATUS_FROZEN;
|
entityInfo->immobilize.immobilizeStatus = STATUS_FROZEN;
|
||||||
entityInfo->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E2C,TRUE) + 1;
|
entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E2C,TRUE) + 1;
|
||||||
entityInfo->immobilizeStatusDamageCountdown = 0;
|
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB610);
|
sub_80522F4(pokemon,target,*gUnknown_80FB610);
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
}
|
}
|
||||||
@ -782,19 +782,19 @@ void SqueezedStatusTarget(Entity * pokemon, Entity * target, s16 param_3, bool32
|
|||||||
|
|
||||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage_u8))) {
|
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage_u8))) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
if ((u8)(entityInfo->immobilizeStatus - 3U) < 2) {
|
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||||
sub_8076CB4(entityInfo->unk9C);
|
sub_8076CB4(entityInfo->unk9C);
|
||||||
}
|
}
|
||||||
else if (entityInfo->immobilizeStatus == STATUS_INGRAIN) {
|
else if (entityInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) {
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FA844);
|
sub_80522F4(pokemon,target,*gUnknown_80FA844);
|
||||||
}
|
}
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->immobilizeStatus != STATUS_CONSTRICTION) {
|
if (entityInfo->immobilize.immobilizeStatus != STATUS_CONSTRICTION) {
|
||||||
entityInfo->immobilizeStatus = STATUS_CONSTRICTION;
|
entityInfo->immobilize.immobilizeStatus = STATUS_CONSTRICTION;
|
||||||
entityInfo->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E58,TRUE) + 1;
|
entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E58,TRUE) + 1;
|
||||||
entityInfo->immobilizeStatusDamageCountdown = 0;
|
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||||
entityInfo->unkB4 = param_3_s32;
|
entityInfo->immobilize.unk4 = param_3_s32;
|
||||||
nullsub_71(target);
|
nullsub_71(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB628);
|
sub_80522F4(pokemon,target,*gUnknown_80FB628);
|
||||||
sub_806CE94(target,8);
|
sub_806CE94(target,8);
|
||||||
@ -812,18 +812,18 @@ void ImmobilizedStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
|
|
||||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
if ((u8)(entityInfo->immobilizeStatus - 3U) < 2) {
|
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||||
sub_8076CB4(entityInfo->unk9C);
|
sub_8076CB4(entityInfo->unk9C);
|
||||||
}
|
}
|
||||||
else if (entityInfo->immobilizeStatus == STATUS_INGRAIN) {
|
else if (entityInfo->immobilize.immobilizeStatus == STATUS_INGRAIN) {
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FA844);
|
sub_80522F4(pokemon,target,*gUnknown_80FA844);
|
||||||
}
|
}
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->immobilizeStatus != STATUS_SHADOW_HOLD) {
|
if (entityInfo->immobilize.immobilizeStatus != STATUS_SHADOW_HOLD) {
|
||||||
entityInfo->immobilizeStatus = STATUS_SHADOW_HOLD;
|
entityInfo->immobilize.immobilizeStatus = STATUS_SHADOW_HOLD;
|
||||||
entityInfo->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E54,TRUE) + 1;
|
entityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E54,TRUE) + 1;
|
||||||
entityInfo->immobilizeStatusDamageCountdown = 0;
|
entityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||||
nullsub_70(target);
|
nullsub_70(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB668);
|
sub_80522F4(pokemon,target,*gUnknown_80FB668);
|
||||||
sub_806CE94(target,8);
|
sub_806CE94(target,8);
|
||||||
@ -843,14 +843,14 @@ void IngrainedStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
entityInfo2 = entityInfo;
|
entityInfo2 = entityInfo;
|
||||||
if ((u8)(entityInfo->immobilizeStatus - 3U) < 2) {
|
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||||
sub_8076CB4(entityInfo->unk9C);
|
sub_8076CB4(entityInfo->unk9C);
|
||||||
}
|
}
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo2->immobilizeStatus != STATUS_INGRAIN) {
|
if (entityInfo2->immobilize.immobilizeStatus != STATUS_INGRAIN) {
|
||||||
entityInfo2->immobilizeStatus = STATUS_INGRAIN;
|
entityInfo2->immobilize.immobilizeStatus = STATUS_INGRAIN;
|
||||||
entityInfo2->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E60,TRUE) + 1;
|
entityInfo2->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E60,TRUE) + 1;
|
||||||
entityInfo2->immobilizeStatusDamageCountdown = 0;
|
entityInfo2->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||||
nullsub_90(target);
|
nullsub_90(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB6A4);
|
sub_80522F4(pokemon,target,*gUnknown_80FB6A4);
|
||||||
}
|
}
|
||||||
@ -877,16 +877,16 @@ void WrapTarget(Entity * pokemon, Entity * target)
|
|||||||
}
|
}
|
||||||
pokemonEntityData = pokemon->info;
|
pokemonEntityData = pokemon->info;
|
||||||
targetEntityInfo = target->info;
|
targetEntityInfo = target->info;
|
||||||
if ((u8)(pokemonEntityData->immobilizeStatus - 3U) > 1) {
|
if ((u8)(pokemonEntityData->immobilize.immobilizeStatus - 3U) > 1) {
|
||||||
if ((targetEntityInfo->immobilizeStatus != STATUS_WRAP))
|
if ((targetEntityInfo->immobilize.immobilizeStatus != STATUS_WRAP))
|
||||||
{
|
{
|
||||||
if(targetEntityInfo->immobilizeStatus != STATUS_WRAPPED) {
|
if(targetEntityInfo->immobilize.immobilizeStatus != STATUS_WRAPPED) {
|
||||||
pokemonEntityData->immobilizeStatus = STATUS_WRAP;
|
pokemonEntityData->immobilize.immobilizeStatus = STATUS_WRAP;
|
||||||
pokemonEntityData->immobilizeStatusTurns = 0x7f;
|
pokemonEntityData->immobilize.immobilizeStatusTurns = 0x7f;
|
||||||
pokemonEntityData->immobilizeStatusDamageCountdown = 0;
|
pokemonEntityData->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||||
targetEntityInfo->immobilizeStatus = STATUS_WRAPPED;
|
targetEntityInfo->immobilize.immobilizeStatus = STATUS_WRAPPED;
|
||||||
targetEntityInfo->immobilizeStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E5C, TRUE) + 1;
|
targetEntityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E5C, TRUE) + 1;
|
||||||
targetEntityInfo->immobilizeStatusDamageCountdown = 0;
|
targetEntityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||||
iVar5 = &pokemonEntityData->unk9C;
|
iVar5 = &pokemonEntityData->unk9C;
|
||||||
piVar3 = &gDungeon->unk37F4;
|
piVar3 = &gDungeon->unk37F4;
|
||||||
*iVar5 = *piVar3;
|
*iVar5 = *piVar3;
|
||||||
@ -900,19 +900,19 @@ void WrapTarget(Entity * pokemon, Entity * target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pokemonEntityData->immobilizeStatus == STATUS_WRAP) {
|
if (pokemonEntityData->immobilize.immobilizeStatus == STATUS_WRAP) {
|
||||||
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB6FC);
|
sub_80522F4(pokemon,target,*gUnknown_80FB6FC);
|
||||||
}
|
}
|
||||||
if (targetEntityInfo->immobilizeStatus == STATUS_WRAP) {
|
if (targetEntityInfo->immobilize.immobilizeStatus == STATUS_WRAP) {
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB6FC);
|
sub_80522F4(pokemon,target,*gUnknown_80FB6FC);
|
||||||
}
|
}
|
||||||
if (pokemonEntityData->immobilizeStatus == STATUS_WRAPPED) {
|
if (pokemonEntityData->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||||
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB718);
|
sub_80522F4(pokemon,target,*gUnknown_80FB718);
|
||||||
}
|
}
|
||||||
if (targetEntityInfo->immobilizeStatus == STATUS_WRAPPED) {
|
if (targetEntityInfo->immobilize.immobilizeStatus == STATUS_WRAPPED) {
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB718);
|
sub_80522F4(pokemon,target,*gUnknown_80FB718);
|
||||||
}
|
}
|
||||||
@ -932,8 +932,8 @@ void sub_8076CB4(s32 param_1)
|
|||||||
if (EntityExists(entity)) {
|
if (EntityExists(entity)) {
|
||||||
entityInfo = entity->info;
|
entityInfo = entity->info;
|
||||||
if (entityInfo->unk9C == param_1) {
|
if (entityInfo->unk9C == param_1) {
|
||||||
if ((u8)(entityInfo->immobilizeStatus - 3U) < 2) {
|
if ((u8)(entityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||||
entityInfo->immobilizeStatus = STATUS_NONE;
|
entityInfo->immobilize.immobilizeStatus = STATUS_NONE;
|
||||||
}
|
}
|
||||||
entityInfo->unk9C = 0;
|
entityInfo->unk9C = 0;
|
||||||
}
|
}
|
||||||
@ -952,19 +952,19 @@ void PetrifiedStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
||||||
sub_8041C08(target);
|
sub_8041C08(target);
|
||||||
targetEntityInfo = target->info;
|
targetEntityInfo = target->info;
|
||||||
if ((u8)(targetEntityInfo->immobilizeStatus - 3U) < 2) {
|
if ((u8)(targetEntityInfo->immobilize.immobilizeStatus - 3U) < 2) {
|
||||||
sub_8076CB4(targetEntityInfo->unk9C);
|
sub_8076CB4(targetEntityInfo->unk9C);
|
||||||
}
|
}
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (targetEntityInfo->immobilizeStatus != STATUS_PETRIFIED) {
|
if (targetEntityInfo->immobilize.immobilizeStatus != STATUS_PETRIFIED) {
|
||||||
targetEntityInfo->immobilizeStatus = STATUS_PETRIFIED;
|
targetEntityInfo->immobilize.immobilizeStatus = STATUS_PETRIFIED;
|
||||||
if (targetEntityInfo->isTeamLeader) {
|
if (targetEntityInfo->isTeamLeader) {
|
||||||
targetEntityInfo->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EBC,TRUE) + 1;
|
targetEntityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EBC,TRUE) + 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
targetEntityInfo->immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EC0,TRUE) + 1;
|
targetEntityInfo->immobilize.immobilizeStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EC0,TRUE) + 1;
|
||||||
}
|
}
|
||||||
targetEntityInfo->immobilizeStatusDamageCountdown = 0;
|
targetEntityInfo->immobilize.immobilizeStatusDamageCountdown = 0;
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB7BC);
|
sub_80522F4(pokemon,target,*gUnknown_80FB7BC);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -977,11 +977,11 @@ void PetrifiedStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
entity = gDungeon->teamPokemon[index];
|
entity = gDungeon->teamPokemon[index];
|
||||||
if (EntityExists(entity)) {
|
if (EntityExists(entity)) {
|
||||||
entityInfo = entity->info;
|
entityInfo = entity->info;
|
||||||
if ((entityInfo->aiObjective == AI_CHASE_TARGET) && (entityInfo->aiTarget == target)) {
|
if ((entityInfo->aiTarget.aiObjective == AI_CHASE_TARGET) && (entityInfo->aiTarget.aiTarget == target)) {
|
||||||
entityInfo->aiObjective = AI_STAND_STILL;
|
entityInfo->aiTarget.aiObjective = AI_STAND_STILL;
|
||||||
entityInfo->aiTarget = NULL;
|
entityInfo->aiTarget.aiTarget = NULL;
|
||||||
entityInfo->aiTargetSpawnGenID = 0;
|
entityInfo->aiTarget.aiTargetSpawnGenID = 0;
|
||||||
entityInfo->aiTargetingEnemy = FALSE;
|
entityInfo->aiTarget.aiTargetingEnemy = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,10 +99,10 @@ bool8 sub_80571F0(Entity * pokemon, Move *move)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else if (entityInfo->unkFF == 2) {
|
else if (entityInfo->unkFF == 2) {
|
||||||
if (entityInfo->chargingStatus == STATUS_DIVING) {
|
if (entityInfo->charging.chargingStatus == STATUS_DIVING) {
|
||||||
if (move->id == MOVE_WHIRLPOOL || move->id == MOVE_SURF) return FALSE;
|
if (move->id == MOVE_WHIRLPOOL || move->id == MOVE_SURF) return FALSE;
|
||||||
}
|
}
|
||||||
else if (entityInfo->chargingStatus == STATUS_DIGGING) {
|
else if (entityInfo->charging.chargingStatus == STATUS_DIGGING) {
|
||||||
moveID = move->id;
|
moveID = move->id;
|
||||||
if (moveID == MOVE_EARTHQUAKE || moveID == MOVE_MAGNITUDE) return FALSE;
|
if (moveID == MOVE_EARTHQUAKE || moveID == MOVE_MAGNITUDE) return FALSE;
|
||||||
if (moveID == MOVE_NATURE_POWER) {
|
if (moveID == MOVE_NATURE_POWER) {
|
||||||
@ -225,11 +225,11 @@ bool8 CanMonsterUseMove(Entity *pokemon, Move *move, bool8 hasPPChecker)
|
|||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->volatileStatus == STATUS_TAUNTED && !MoveIgnoresTaunted(move))
|
if (pokemonInfo->volatileStatus.volatileStatus == STATUS_TAUNTED && !MoveIgnoresTaunted(move))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->volatileStatus == STATUS_ENCORE)
|
if (pokemonInfo->volatileStatus.volatileStatus == STATUS_ENCORE)
|
||||||
{
|
{
|
||||||
if (move->id == MOVE_STRUGGLE)
|
if (move->id == MOVE_STRUGGLE)
|
||||||
{
|
{
|
||||||
@ -257,8 +257,8 @@ bool8 sub_805744C(Entity * pokemon, Move *move, bool8 param_3)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (param_3 != 0) {
|
if (param_3 != 0) {
|
||||||
if ((entityInfo->volatileStatus == STATUS_TAUNTED) && (!MoveIgnoresTaunted(move))) return FALSE;
|
if ((entityInfo->volatileStatus.volatileStatus == STATUS_TAUNTED) && (!MoveIgnoresTaunted(move))) return FALSE;
|
||||||
if (entityInfo->volatileStatus == STATUS_ENCORE) {
|
if (entityInfo->volatileStatus.volatileStatus == STATUS_ENCORE) {
|
||||||
if (move->id == MOVE_STRUGGLE) {
|
if (move->id == MOVE_STRUGGLE) {
|
||||||
if((entityInfo->struggleMoveFlags & MOVE_FLAG_LAST_USED) == 0) return FALSE;
|
if((entityInfo->struggleMoveFlags & MOVE_FLAG_LAST_USED) == 0) return FALSE;
|
||||||
}
|
}
|
||||||
|
148
src/status.c
148
src/status.c
@ -403,10 +403,10 @@ void CringeStatusTarget(Entity * pokemon,Entity * target, bool8 displayMessage)
|
|||||||
else {
|
else {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if(entityInfo->volatileStatus != STATUS_CRINGE)
|
if(entityInfo->volatileStatus.volatileStatus != STATUS_CRINGE)
|
||||||
{
|
{
|
||||||
entityInfo->volatileStatus = STATUS_CRINGE;
|
entityInfo->volatileStatus.volatileStatus = STATUS_CRINGE;
|
||||||
entityInfo->volatileStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E3C, TRUE) + 1;
|
entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target, gUnknown_80F4E3C, TRUE) + 1;
|
||||||
sub_80420A0(target);
|
sub_80420A0(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB2E0);
|
sub_80522F4(pokemon,target,*gUnknown_80FB2E0);
|
||||||
}
|
}
|
||||||
@ -441,11 +441,11 @@ void ParalyzeStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
|
|||||||
bVar6 = TRUE;
|
bVar6 = TRUE;
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->nonVolatileStatus != STATUS_PARALYSIS) {
|
if (entityInfo->nonVolatile.nonVolatileStatus != STATUS_PARALYSIS) {
|
||||||
entityInfo->nonVolatileStatus = STATUS_PARALYSIS;
|
entityInfo->nonVolatile.nonVolatileStatus = STATUS_PARALYSIS;
|
||||||
entityInfo->nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E50,TRUE) + 1;
|
entityInfo->nonVolatile.nonVolatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E50,TRUE) + 1;
|
||||||
entityInfo->nonVolatileStatusDamageCountdown = 0;
|
entityInfo->nonVolatile.nonVolatileStatusDamageCountdown = 0;
|
||||||
entityInfo->fillAF = 0;
|
entityInfo->nonVolatile.unk4 = 0;
|
||||||
bVar6 = FALSE;
|
bVar6 = FALSE;
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB2AC);
|
sub_80522F4(pokemon,target,*gUnknown_80FB2AC);
|
||||||
sub_8041C1C(target);
|
sub_8041C1C(target);
|
||||||
@ -595,9 +595,9 @@ void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage
|
|||||||
{
|
{
|
||||||
sub_8041BE8(target);
|
sub_8041BE8(target);
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
if (entityInfo->volatileStatus != STATUS_CONFUSED) {
|
if (entityInfo->volatileStatus.volatileStatus != STATUS_CONFUSED) {
|
||||||
entityInfo->volatileStatus = STATUS_CONFUSED;
|
entityInfo->volatileStatus.volatileStatus = STATUS_CONFUSED;
|
||||||
entityInfo->volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E4C,TRUE) + 1;
|
entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4E4C,TRUE) + 1;
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB25C);
|
sub_80522F4(pokemon,target,*gUnknown_80FB25C);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -615,9 +615,9 @@ void CowerStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage))) {
|
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,displayMessage))) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->volatileStatus != STATUS_COWERING) {
|
if (entityInfo->volatileStatus.volatileStatus != STATUS_COWERING) {
|
||||||
entityInfo->volatileStatus = STATUS_COWERING;
|
entityInfo->volatileStatus.volatileStatus = STATUS_COWERING;
|
||||||
entityInfo->volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ECC,TRUE) + 1;
|
entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ECC,TRUE) + 1;
|
||||||
sub_8041BF8(target);
|
sub_8041BF8(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB940);
|
sub_80522F4(pokemon,target,*gUnknown_80FB940);
|
||||||
}
|
}
|
||||||
@ -796,16 +796,16 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch(entityInfo->linkedStatus)
|
switch(entityInfo->linked.linkedStatus)
|
||||||
{
|
{
|
||||||
case STATUS_DESTINY_BOND:
|
case STATUS_DESTINY_BOND:
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FAA8C);
|
sub_80522F4(pokemon,target,*gUnknown_80FAA8C);
|
||||||
default:
|
default:
|
||||||
entityInfo->linkedStatus = STATUS_LEECH_SEED;
|
entityInfo->linked.linkedStatus = STATUS_LEECH_SEED;
|
||||||
entityInfo->linkedStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EB0, TRUE) + 1;
|
entityInfo->linked.linkedStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EB0, TRUE) + 1;
|
||||||
entityInfo->linkedStatusDamageCountdown = 0;
|
entityInfo->linked.linkedStatusDamageCountdown = 0;
|
||||||
nullsub_78(target);
|
nullsub_78(target);
|
||||||
entityInfo->unkD8 = 0xff;
|
entityInfo->linked.unkD8 = 0xff;
|
||||||
break;
|
break;
|
||||||
case STATUS_LEECH_SEED:
|
case STATUS_LEECH_SEED:
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FAE7C);
|
sub_80522F4(pokemon,target,*gUnknown_80FAE7C);
|
||||||
@ -814,9 +814,9 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage)
|
|||||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||||
{
|
{
|
||||||
if (pokemon == gDungeon->allPokemon[index]) {
|
if (pokemon == gDungeon->allPokemon[index]) {
|
||||||
entityInfo->unkD8 = index;
|
entityInfo->linked.unkD8 = index;
|
||||||
entityInfo2 = pokemon->info;
|
entityInfo2 = pokemon->info;
|
||||||
entityInfo->unkD4 = entityInfo2->unk98;
|
entityInfo->linked.unkD4 = entityInfo2->unk98;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FAE58);
|
sub_80522F4(pokemon,target,*gUnknown_80FAE58);
|
||||||
@ -839,11 +839,11 @@ void sub_8078084(Entity * pokemon)
|
|||||||
target = gDungeon->allPokemon[index];
|
target = gDungeon->allPokemon[index];
|
||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo2 = target->info;
|
entityInfo2 = target->info;
|
||||||
if((u8)(entityInfo2->linkedStatus - 1) <= 1)
|
if((u8)(entityInfo2->linked.linkedStatus - 1) <= 1)
|
||||||
{
|
{
|
||||||
if(entityInfo2->unkD4 == entityInfo->unk98)
|
if(entityInfo2->linked.unkD4 == entityInfo->unk98)
|
||||||
{
|
{
|
||||||
entityInfo2->linkedStatus = STATUS_NONE;
|
entityInfo2->linked.linkedStatus = STATUS_NONE;
|
||||||
EntityUpdateStatusSprites(target);
|
EntityUpdateStatusSprites(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -863,17 +863,17 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
(GetEntityType(target) == ENTITY_MONSTER)) {
|
(GetEntityType(target) == ENTITY_MONSTER)) {
|
||||||
entityInfo = pokemon->info;
|
entityInfo = pokemon->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
||||||
linkedStatus = &entityInfo->linkedStatus;
|
linkedStatus = &entityInfo->linked.linkedStatus;
|
||||||
if (entityInfo->linkedStatus != STATUS_DESTINY_BOND)
|
if (entityInfo->linked.linkedStatus != STATUS_DESTINY_BOND)
|
||||||
{
|
{
|
||||||
if (entityInfo->linkedStatus == STATUS_LEECH_SEED)
|
if (entityInfo->linked.linkedStatus == STATUS_LEECH_SEED)
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FA79C);
|
sub_80522F4(pokemon,target,*gUnknown_80FA79C);
|
||||||
zero = 0;
|
zero = 0;
|
||||||
*linkedStatus = STATUS_DESTINY_BOND;
|
*linkedStatus = STATUS_DESTINY_BOND;
|
||||||
entityInfo->linkedStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EF0,TRUE) + 1;
|
entityInfo->linked.linkedStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EF0,TRUE) + 1;
|
||||||
entityInfo->linkedStatusDamageCountdown = zero;
|
entityInfo->linked.linkedStatusDamageCountdown = zero;
|
||||||
nullsub_74(target);
|
nullsub_74(target);
|
||||||
entityInfo->unkD8 = 0xff;
|
entityInfo->linked.unkD8 = 0xff;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -883,9 +883,9 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||||
{
|
{
|
||||||
if (target == gDungeon->allPokemon[index]) {
|
if (target == gDungeon->allPokemon[index]) {
|
||||||
entityInfo->unkD8 = index;
|
entityInfo->linked.unkD8 = index;
|
||||||
entityInfo2 = target->info;
|
entityInfo2 = target->info;
|
||||||
entityInfo->unkD4 = entityInfo2->unk98;
|
entityInfo->linked.unkD4 = entityInfo2->unk98;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FBB4C);
|
sub_80522F4(pokemon,target,*gUnknown_80FBB4C);
|
||||||
@ -900,9 +900,9 @@ void SureShotStatusTarget(Entity *pokemon, Entity * target, s32 turns)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->moveStatus != STATUS_SURE_SHOT) {
|
if (entityInfo->moveStatus.moveStatus != STATUS_SURE_SHOT) {
|
||||||
entityInfo->moveStatus = STATUS_SURE_SHOT;
|
entityInfo->moveStatus.moveStatus = STATUS_SURE_SHOT;
|
||||||
entityInfo->moveStatusTurns = turns + 1;
|
entityInfo->moveStatus.moveStatusTurns = turns + 1;
|
||||||
sub_8041CDC(target);
|
sub_8041CDC(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB73C);
|
sub_80522F4(pokemon,target,*gUnknown_80FB73C);
|
||||||
}
|
}
|
||||||
@ -920,9 +920,9 @@ void WhifferStatusTarget(Entity *pokemon, Entity * target, s32 turns)
|
|||||||
if (EntityExists(target) && !HasSafeguardStatus(pokemon, target, TRUE)) {
|
if (EntityExists(target) && !HasSafeguardStatus(pokemon, target, TRUE)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->moveStatus != STATUS_WHIFFER) {
|
if (entityInfo->moveStatus.moveStatus != STATUS_WHIFFER) {
|
||||||
entityInfo->moveStatus = STATUS_WHIFFER;
|
entityInfo->moveStatus.moveStatus = STATUS_WHIFFER;
|
||||||
entityInfo->moveStatusTurns = turns + 1;
|
entityInfo->moveStatus.moveStatusTurns = turns + 1;
|
||||||
sub_8041CEC(target);
|
sub_8041CEC(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB780);
|
sub_80522F4(pokemon,target,*gUnknown_80FB780);
|
||||||
}
|
}
|
||||||
@ -940,9 +940,9 @@ void FixedDamageStatusTarget(Entity *pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->moveStatus != STATUS_SET_DAMAGE) {
|
if (entityInfo->moveStatus.moveStatus != STATUS_SET_DAMAGE) {
|
||||||
entityInfo->moveStatus = STATUS_SET_DAMAGE;
|
entityInfo->moveStatus.moveStatus = STATUS_SET_DAMAGE;
|
||||||
entityInfo->moveStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EC4, FALSE) + 1;
|
entityInfo->moveStatus.moveStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EC4, FALSE) + 1;
|
||||||
nullsub_79(target);
|
nullsub_79(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB8BC);
|
sub_80522F4(pokemon,target,*gUnknown_80FB8BC);
|
||||||
}
|
}
|
||||||
@ -960,9 +960,9 @@ void FocusEnergyStatusTarget(Entity *pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->moveStatus != STATUS_FOCUS_ENERGY) {
|
if (entityInfo->moveStatus.moveStatus != STATUS_FOCUS_ENERGY) {
|
||||||
entityInfo->moveStatus = STATUS_FOCUS_ENERGY;
|
entityInfo->moveStatus.moveStatus = STATUS_FOCUS_ENERGY;
|
||||||
entityInfo->moveStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EC8, FALSE) + 1;
|
entityInfo->moveStatus.moveStatusTurns = CalculateStatusTurns(target, gUnknown_80F4EC8, FALSE) + 1;
|
||||||
nullsub_80(target);
|
nullsub_80(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB900);
|
sub_80522F4(pokemon,target,*gUnknown_80FB900);
|
||||||
}
|
}
|
||||||
@ -985,7 +985,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, u8 param_3)
|
|||||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) {
|
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon, target, TRUE))) {
|
||||||
targetEntityInfo = target->info;
|
targetEntityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (targetEntityInfo->waitingStatus == STATUS_DECOY) {
|
if (targetEntityInfo->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB994);
|
sub_80522F4(pokemon,target,*gUnknown_80FB994);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -993,21 +993,21 @@ void sub_80783C4(Entity * pokemon, Entity * target, u8 param_3)
|
|||||||
{
|
{
|
||||||
entity = gDungeon->allPokemon[index];
|
entity = gDungeon->allPokemon[index];
|
||||||
if ((((EntityExists(entity)) && (target != entity)) &&
|
if ((((EntityExists(entity)) && (target != entity)) &&
|
||||||
(u8)(entity->info->waitingStatus - 2U) < 2)) {
|
(u8)(entity->info->waitingStruct.waitingStatus - 2U) < 2)) {
|
||||||
SendWaitingEndMessage(pokemon,entity,STATUS_NONE);
|
SendWaitingEndMessage(pokemon,entity,STATUS_NONE);
|
||||||
sub_803E46C(0x2a);
|
sub_803E46C(0x2a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sub_8041D38(target);
|
sub_8041D38(target);
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (targetEntityInfo->waitingStatus != STATUS_NONE) {
|
if (targetEntityInfo->waitingStruct.waitingStatus != STATUS_NONE) {
|
||||||
SendWaitingEndMessage(pokemon,target, STATUS_DECOY);
|
SendWaitingEndMessage(pokemon,target, STATUS_DECOY);
|
||||||
}
|
}
|
||||||
targetEntityInfo->waitingStatus = STATUS_DECOY;
|
targetEntityInfo->waitingStruct.waitingStatus = STATUS_DECOY;
|
||||||
targetEntityInfo->enemyDecoy = pokemon->info->isNotTeamMember;
|
targetEntityInfo->waitingStruct.enemyDecoy = pokemon->info->isNotTeamMember;
|
||||||
targetEntityInfo->fillCA = param_3;
|
targetEntityInfo->waitingStruct.unkCA = param_3;
|
||||||
targetEntityInfo->waitingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED0,TRUE) + 1;
|
targetEntityInfo->waitingStruct.waitingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED0,TRUE) + 1;
|
||||||
targetEntityInfo->curseDamageCountdown = 0;
|
targetEntityInfo->waitingStruct.curseDamageCountdown = 0;
|
||||||
sub_806CCB4(target,sub_806CEBC(target));
|
sub_806CCB4(target,sub_806CEBC(target));
|
||||||
gDungeon->decoyActive = TRUE;
|
gDungeon->decoyActive = TRUE;
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB978);
|
sub_80522F4(pokemon,target,*gUnknown_80FB978);
|
||||||
@ -1017,9 +1017,9 @@ void sub_80783C4(Entity * pokemon, Entity * target, u8 param_3)
|
|||||||
entity2 = gDungeon->allPokemon[index];
|
entity2 = gDungeon->allPokemon[index];
|
||||||
if (EntityExists(entity2)) {
|
if (EntityExists(entity2)) {
|
||||||
entityInfo = entity2->info;
|
entityInfo = entity2->info;
|
||||||
entityInfo->aiObjective = AI_STAND_STILL;
|
entityInfo->aiTarget.aiObjective = AI_STAND_STILL;
|
||||||
entityInfo->aiTarget = NULL;
|
entityInfo->aiTarget.aiTarget = NULL;
|
||||||
entityInfo->aiTargetSpawnGenID = 0;
|
entityInfo->aiTarget.aiTargetSpawnGenID = 0;
|
||||||
if (!entityInfo->isTeamLeader) {
|
if (!entityInfo->isTeamLeader) {
|
||||||
action = entityInfo->action;
|
action = entityInfo->action;
|
||||||
MoveIfPossible(entity2, TRUE);
|
MoveIfPossible(entity2, TRUE);
|
||||||
@ -1054,10 +1054,10 @@ void CurseStatusTarget(Entity *pokemon, Entity * target)
|
|||||||
if (HP == 0) {
|
if (HP == 0) {
|
||||||
pokemonEntityData->HP = 1;
|
pokemonEntityData->HP = 1;
|
||||||
}
|
}
|
||||||
if (targetEntityInfo->waitingStatus != STATUS_CURSED) {
|
if (targetEntityInfo->waitingStruct.waitingStatus != STATUS_CURSED) {
|
||||||
targetEntityInfo->waitingStatus = STATUS_CURSED;
|
targetEntityInfo->waitingStruct.waitingStatus = STATUS_CURSED;
|
||||||
targetEntityInfo->waitingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EA4,TRUE) + 1;
|
targetEntityInfo->waitingStruct.waitingStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EA4,TRUE) + 1;
|
||||||
targetEntityInfo->curseDamageCountdown = 0;
|
targetEntityInfo->waitingStruct.curseDamageCountdown = 0;
|
||||||
}
|
}
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB004);
|
sub_80522F4(pokemon,target,*gUnknown_80FB004);
|
||||||
@ -1085,7 +1085,7 @@ void SnatchStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
|
||||||
{
|
{
|
||||||
entity = gDungeon->allPokemon[index];
|
entity = gDungeon->allPokemon[index];
|
||||||
if ((EntityExists(entity)) && (entity->info->waitingStatus == STATUS_SNATCH)) {
|
if ((EntityExists(entity)) && (entity->info->waitingStruct.waitingStatus == STATUS_SNATCH)) {
|
||||||
SendWaitingEndMessage(pokemon, entity, STATUS_NONE);
|
SendWaitingEndMessage(pokemon, entity, STATUS_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1093,10 +1093,10 @@ void SnatchStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
|
|
||||||
targetEntityInfo = target->info;
|
targetEntityInfo = target->info;
|
||||||
targetEntityInfo2 = targetEntityInfo;
|
targetEntityInfo2 = targetEntityInfo;
|
||||||
if (targetEntityInfo->waitingStatus != STATUS_SNATCH) {
|
if (targetEntityInfo->waitingStruct.waitingStatus != STATUS_SNATCH) {
|
||||||
targetEntityInfo->waitingStatus = STATUS_SNATCH;
|
targetEntityInfo->waitingStruct.waitingStatus = STATUS_SNATCH;
|
||||||
targetEntityInfo->waitingStatusTurns= CalculateStatusTurns(target,gUnknown_80F4EA8,FALSE) + 1;
|
targetEntityInfo->waitingStruct.waitingStatusTurns= CalculateStatusTurns(target,gUnknown_80F4EA8,FALSE) + 1;
|
||||||
targetEntityInfo->curseDamageCountdown = 0;
|
targetEntityInfo->waitingStruct.curseDamageCountdown = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDungeon->snatchPokemon = target;
|
gDungeon->snatchPokemon = target;
|
||||||
@ -1114,9 +1114,9 @@ void TauntStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
if ((EntityExists(target)) && (!HasSafeguardStatus(pokemon,target,TRUE))) {
|
||||||
entityInfo = target->info;
|
entityInfo = target->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (entityInfo->volatileStatus != STATUS_TAUNTED) {
|
if (entityInfo->volatileStatus.volatileStatus != STATUS_TAUNTED) {
|
||||||
entityInfo->volatileStatus = STATUS_TAUNTED;
|
entityInfo->volatileStatus.volatileStatus = STATUS_TAUNTED;
|
||||||
entityInfo->volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED8,TRUE) + 1;
|
entityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4ED8,TRUE) + 1;
|
||||||
nullsub_73(target);
|
nullsub_73(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FB9F0);
|
sub_80522F4(pokemon,target,*gUnknown_80FB9F0);
|
||||||
}
|
}
|
||||||
@ -1156,13 +1156,13 @@ void InvisibleStatusTarget(Entity * pokemon, Entity * target)
|
|||||||
if (EntityExists(target)) {
|
if (EntityExists(target)) {
|
||||||
targetEntityInfo = target->info;
|
targetEntityInfo = target->info;
|
||||||
targetEntityInfo_1 = targetEntityInfo;
|
targetEntityInfo_1 = targetEntityInfo;
|
||||||
if (targetEntityInfo_1->transformStatus == STATUS_TRANSFORMED) {
|
if (targetEntityInfo_1->transformStatus.transformStatus == STATUS_TRANSFORMED) {
|
||||||
SendTransformEndMessage(pokemon,target);
|
SendTransformEndMessage(pokemon,target);
|
||||||
}
|
}
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (targetEntityInfo_1->transformStatus != STATUS_INVISIBLE) {
|
if (targetEntityInfo_1->transformStatus.transformStatus != STATUS_INVISIBLE) {
|
||||||
targetEntityInfo_1->transformStatus = STATUS_INVISIBLE;
|
targetEntityInfo_1->transformStatus.transformStatus = STATUS_INVISIBLE;
|
||||||
targetEntityInfo_1->transformStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EE4,FALSE) + 1;
|
targetEntityInfo_1->transformStatus.transformStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EE4,FALSE) + 1;
|
||||||
sub_8041D84(target);
|
sub_8041D84(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FBA80);
|
sub_80522F4(pokemon,target,*gUnknown_80FBA80);
|
||||||
}
|
}
|
||||||
@ -1211,9 +1211,9 @@ void EncoreStatusTarget(Entity *pokemon,Entity *target)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||||
if (EntityInfo->volatileStatus != STATUS_ENCORE) {
|
if (EntityInfo->volatileStatus.volatileStatus != STATUS_ENCORE) {
|
||||||
EntityInfo->volatileStatus = STATUS_ENCORE;
|
EntityInfo->volatileStatus.volatileStatus = STATUS_ENCORE;
|
||||||
EntityInfo->volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EF4,TRUE) + 1;
|
EntityInfo->volatileStatus.volatileStatusTurns = CalculateStatusTurns(target,gUnknown_80F4EF4,TRUE) + 1;
|
||||||
nullsub_83(target);
|
nullsub_83(target);
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FBB94);
|
sub_80522F4(pokemon,target,*gUnknown_80FBB94);
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ extern void sub_8075C58(Entity *, Entity *, s32, s32);
|
|||||||
extern void sub_806F324(Entity *, s32, u32, u32);
|
extern void sub_806F324(Entity *, s32, u32, u32);
|
||||||
extern bool8 sub_805755C(Entity* pokemon,u16 moveID);
|
extern bool8 sub_805755C(Entity* pokemon,u16 moveID);
|
||||||
extern void sub_80783C4(Entity *, Entity *, u32);
|
extern void sub_80783C4(Entity *, Entity *, u32);
|
||||||
extern void sub_807CD9C(Entity *, Entity *, u8 direction);
|
extern void sub_807CD9C(Entity *, Entity *, u32 direction);
|
||||||
|
|
||||||
|
|
||||||
// NOTE: Override pokemon.c types for these two funcs
|
// NOTE: Override pokemon.c types for these two funcs
|
||||||
@ -205,7 +205,7 @@ bool8 sub_805B028(Entity * pokemon,Entity * target,Move *move)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 TransformMoveAction(Entity * pokemon, Entity * target, Move *move)
|
bool8 TransformMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
if (IsBossFight()) {
|
if (IsBossFight()) {
|
||||||
sub_80522F4(pokemon,target,*gUnknown_80FEFF4);
|
sub_80522F4(pokemon,target,*gUnknown_80FEFF4);
|
||||||
@ -299,13 +299,13 @@ bool8 PerishSongMoveAction(Entity * pokemon,Entity * target,Move *move, s32 para
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805B214(Entity * pokemon,Entity * target,Move *move, s32 param_4)
|
bool8 WrapMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
WrapTarget(pokemon, target);
|
WrapTarget(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 SpikesMoveAction(Entity * pokemon, Entity * target)
|
bool8 SpikesMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
bool8 trapLaid;
|
bool8 trapLaid;
|
||||||
u8 uVar2;
|
u8 uVar2;
|
||||||
@ -343,7 +343,7 @@ bool8 sub_805B264(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||||||
gDungeon->unk18200 = gUnknown_8106A8C[r3];
|
gDungeon->unk18200 = gUnknown_8106A8C[r3];
|
||||||
gDungeon->unk18204 = 0;
|
gDungeon->unk18204 = 0;
|
||||||
iVar5 = gUnknown_80F4F94[r3];
|
iVar5 = gUnknown_80F4F94[r3];
|
||||||
if (entityInfo->chargingStatus == STATUS_DIGGING) {
|
if (entityInfo->charging.chargingStatus == STATUS_DIGGING) {
|
||||||
iVar5 *= 2;
|
iVar5 *= 2;
|
||||||
}
|
}
|
||||||
r6 = sub_8055864(pokemon,target,move,iVar5,param_4) ? TRUE : FALSE;
|
r6 = sub_8055864(pokemon,target,move,iVar5,param_4) ? TRUE : FALSE;
|
||||||
@ -438,17 +438,17 @@ bool8 sub_805B3FC(Entity * pokemon,Entity * target,Move *move, s32 param_4, s32
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805B454(Entity * pokemon, Entity * target)
|
bool8 sub_805B454(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
InfatuateStatusTarget(pokemon, target, TRUE);
|
InfatuateStatusTarget(pokemon, target, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 MimicMoveAction(Entity * pokemon, Entity * target)
|
bool8 MimicMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
EntityInfo *entityInfo;
|
EntityInfo *entityInfo;
|
||||||
EntityInfo *targetEntityInfo;
|
EntityInfo *targetEntityInfo;
|
||||||
Move *move;
|
Move *movePtr;
|
||||||
s32 moveCounter;
|
s32 moveCounter;
|
||||||
s32 moveIndex;
|
s32 moveIndex;
|
||||||
bool8 mimicSuccess;
|
bool8 mimicSuccess;
|
||||||
@ -460,11 +460,11 @@ bool8 MimicMoveAction(Entity * pokemon, Entity * target)
|
|||||||
|
|
||||||
for(moveIndex = 0; moveIndex < MAX_MON_MOVES; moveIndex++)
|
for(moveIndex = 0; moveIndex < MAX_MON_MOVES; moveIndex++)
|
||||||
{
|
{
|
||||||
move = &targetEntityInfo->moves[moveIndex];
|
movePtr = &targetEntityInfo->moves[moveIndex];
|
||||||
if (((move->moveFlags & MOVE_FLAG_EXISTS)) && !sub_805755C(pokemon,move->id)) {
|
if (((movePtr->moveFlags & MOVE_FLAG_EXISTS)) && !sub_805755C(pokemon,movePtr->id)) {
|
||||||
if ((move->id != MOVE_MIMIC) && (move->id != MOVE_ASSIST) && (move->id != MOVE_SKETCH) && (move->id != MOVE_MIRROR_MOVE) &&
|
if ((movePtr->id != MOVE_MIMIC) && (movePtr->id != MOVE_ASSIST) && (movePtr->id != MOVE_SKETCH) && (movePtr->id != MOVE_MIRROR_MOVE) &&
|
||||||
(move->id != MOVE_ENCORE) && ((move->moveFlags & MOVE_FLAG_LAST_USED))) {
|
(movePtr->id != MOVE_ENCORE) && ((movePtr->moveFlags & MOVE_FLAG_LAST_USED))) {
|
||||||
entityInfo->mimicMoveIDs[moveCounter] = move->id;
|
entityInfo->mimicMoveIDs[moveCounter] = movePtr->id;
|
||||||
moveCounter++;
|
moveCounter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -512,7 +512,7 @@ _0805B598:
|
|||||||
return local_24;
|
return local_24;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 LeechSeedMoveAction(Entity * pokemon, Entity * target)
|
bool8 LeechSeedMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
HandleLeechSeed(pokemon, target, TRUE);
|
HandleLeechSeed(pokemon, target, TRUE);
|
||||||
if (pokemon->info->unkFB == 0) {
|
if (pokemon->info->unkFB == 0) {
|
||||||
@ -572,13 +572,13 @@ bool8 sub_805B668(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805B734(Entity * pokemon, Entity * target)
|
bool8 SnatchMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
SnatchStatusTarget(pokemon, target);
|
SnatchStatusTarget(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 RecycleMoveAction(Entity * pokemon, Entity * target)
|
bool8 RecycleMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
Item *item;
|
Item *item;
|
||||||
s32 index;
|
s32 index;
|
||||||
@ -634,7 +634,7 @@ bool8 sub_805B808(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||||||
return local_20;
|
return local_20;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805B884( Entity * pokemon, Entity * target)
|
bool8 sub_805B884( Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1);
|
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1);
|
||||||
RaiseMovementSpeedTarget(pokemon, target, 0, TRUE);
|
RaiseMovementSpeedTarget(pokemon, target, 0, TRUE);
|
||||||
@ -724,7 +724,7 @@ bool8 RockSmashMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805BA44(Entity * pokemon, Entity * target)
|
bool8 sub_805BA44(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_807D3CC(pokemon, target);
|
sub_807D3CC(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -786,13 +786,13 @@ bool8 sub_805BA50(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805BB64(Entity * pokemon, Entity * target)
|
bool8 ReboundOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
CounterStatusTarget(pokemon, target, STATUS_MINI_COUNTER);
|
CounterStatusTarget(pokemon, target, STATUS_MINI_COUNTER);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805BB74(Entity * pokemon, Entity * target)
|
bool8 sub_805BB74(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
if(pokemon->info->unkFB == 0)
|
if(pokemon->info->unkFB == 0)
|
||||||
{
|
{
|
||||||
@ -802,13 +802,13 @@ bool8 sub_805BB74(Entity * pokemon, Entity * target)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805BB98(Entity * pokemon, Entity * target)
|
bool8 sub_805BB98(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_807D148(pokemon, target, 1, NULL);
|
sub_807D148(pokemon, target, 1, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 CleanseOrbAction(Entity * pokemon, Entity * target)
|
bool8 CleanseOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
Item *item;
|
Item *item;
|
||||||
Entity *entity;
|
Entity *entity;
|
||||||
@ -856,7 +856,7 @@ bool8 CleanseOrbAction(Entity * pokemon, Entity * target)
|
|||||||
return isItemCleaned;
|
return isItemCleaned;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805BC70(Entity * pokemon, Entity * target)
|
bool8 sub_805BC70(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_8075C58(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE);
|
sub_8075C58(pokemon,target,CalculateStatusTurns(target, gUnknown_80F4E74, TRUE), TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -895,25 +895,25 @@ bool8 sub_805BC98(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 SilenceOrbAction(Entity * pokemon, Entity * target)
|
bool8 SilenceOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
MuzzleTarget(pokemon, target);
|
MuzzleTarget(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 ScannerOrbAction(Entity * pokemon, Entity * target)
|
bool8 ScannerOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
HandleScannerOrb(pokemon, target);
|
HandleScannerOrb(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 RadarOrbAction(Entity * pokemon, Entity * target)
|
bool8 RadarOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
HandleRadarOrb(pokemon, target);
|
HandleRadarOrb(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 TransferOrbAction(Entity *pokemon, Entity * target)
|
bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
EntityInfo *entityInfo;
|
EntityInfo *entityInfo;
|
||||||
s32 oldID; //r8
|
s32 oldID; //r8
|
||||||
@ -957,37 +957,37 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target)
|
|||||||
return didTransfer;
|
return didTransfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805BE90(Entity *pokemon, Entity *target)
|
bool8 sub_805BE90(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
LowerMovementSpeedTarget(pokemon, target, 1, TRUE);
|
LowerMovementSpeedTarget(pokemon, target, 1, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 LuminousOrbAction(Entity * pokemon, Entity * target)
|
bool8 LuminousOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
HandleLuminousOrbAction(pokemon);
|
HandleLuminousOrbAction(pokemon);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 PetrifyOrbAction(Entity * pokemon, Entity * target)
|
bool8 PetrifyOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
PetrifiedStatusTarget(pokemon, target);
|
PetrifiedStatusTarget(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805BEB8(Entity * pokemon, Entity * target)
|
bool8 sub_805BEB8(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_807DA14(pokemon, target, 8);
|
sub_807DA14(pokemon, target, 8);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805BEC8(Entity * pokemon, Entity * target)
|
bool8 sub_805BEC8(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_807D510(pokemon, target);
|
sub_807D510(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 EscapeOrbAction(Entity * pokemon, Entity * target)
|
bool8 EscapeOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
SetMessageArgument(gAvailablePokemonNames,pokemon,0);
|
||||||
if (gDungeon->unk66E != 0) {
|
if (gDungeon->unk66E != 0) {
|
||||||
@ -1001,13 +1001,13 @@ bool8 EscapeOrbAction(Entity * pokemon, Entity * target)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805BF34(Entity * pokemon, Entity * target)
|
bool8 sub_805BF34(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_807DB74(pokemon);
|
sub_807DB74(pokemon);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 TrapbustOrbAction(Entity * pokemon,Entity * target)
|
bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
struct Tile *tile;
|
struct Tile *tile;
|
||||||
Entity *object;
|
Entity *object;
|
||||||
@ -1063,7 +1063,7 @@ bool8 TrapbustOrbAction(Entity * pokemon,Entity * target)
|
|||||||
return foundTrap;
|
return foundTrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805C080(Entity * pokemon, Entity *target)
|
bool8 sub_805C080(Entity * pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
Entity **possibleTargets;
|
Entity **possibleTargets;
|
||||||
s32 numPossibleTargets;
|
s32 numPossibleTargets;
|
||||||
@ -1094,7 +1094,7 @@ bool8 sub_805C080(Entity * pokemon, Entity *target)
|
|||||||
return foundTarget;
|
return foundTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 InvisifyOrbAction(Entity * pokemon, Entity * target)
|
bool8 InvisifyOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
InvisibleStatusTarget(pokemon, pokemon);
|
InvisibleStatusTarget(pokemon, pokemon);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1110,7 +1110,7 @@ bool8 sub_805C138(Entity * pokemon, Entity * target, Move *move, s32 param_4)
|
|||||||
return local_20;
|
return local_20;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 IdentifyOrbAction(Entity *pokemon, Entity *target)
|
bool8 IdentifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
IdentityItemHolders(pokemon, target);
|
IdentityItemHolders(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1124,13 +1124,13 @@ bool8 sub_805C1BC(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805C1E4(Entity *pokemon, Entity *target)
|
bool8 sub_805C1E4(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_80522F4(pokemon, target, *gUnknown_80FD454);
|
sub_80522F4(pokemon, target, *gUnknown_80FD454);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 ShockerOrbAction(Entity *pokemon, Entity *target)
|
bool8 ShockerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
CowerStatusTarget(pokemon, target, TRUE);
|
CowerStatusTarget(pokemon, target, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1149,19 +1149,19 @@ bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 param_4)
|
|||||||
return local_24;
|
return local_24;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805C288(Entity *pokemon, Entity *target)
|
bool8 sub_805C288(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_8078A58(pokemon, target, gUnknown_80F4FC6, 0);
|
sub_8078A58(pokemon, target, gUnknown_80F4FC6, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805C2A0(Entity *pokemon, Entity *target)
|
bool8 sub_805C2A0(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_807DC68(pokemon, target);
|
sub_807DC68(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 FillInOrbAction(Entity *pokemon,Entity *target)
|
bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
struct Tile *tileToFill;
|
struct Tile *tileToFill;
|
||||||
EntityInfo *targetInfo;
|
EntityInfo *targetInfo;
|
||||||
@ -1211,7 +1211,7 @@ bool8 FillInOrbAction(Entity *pokemon,Entity *target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 TrapperOrbAction(Entity *pokemon, Entity *target)
|
bool8 TrapperOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
u32 var;
|
u32 var;
|
||||||
var = (target->info->isNotTeamMember ? 2 : 1);
|
var = (target->info->isNotTeamMember ? 2 : 1);
|
||||||
@ -1219,7 +1219,7 @@ bool8 TrapperOrbAction(Entity *pokemon, Entity *target)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805C3F8(Entity *pokemon, Entity *target)
|
bool8 sub_805C3F8(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
Item stack;
|
Item stack;
|
||||||
Position posStruct = target->pos;
|
Position posStruct = target->pos;
|
||||||
@ -1239,31 +1239,31 @@ bool8 sub_805C3F8(Entity *pokemon, Entity *target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_805C45C(Entity *pokemon, Entity *target)
|
bool8 sub_805C45C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
sub_807F43C(pokemon, target);
|
sub_807F43C(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 MobileOrbAction(Entity *pokemon, Entity *target)
|
bool8 MobileOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
MobileStatusTarget(pokemon, target);
|
MobileStatusTarget(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 StairsOrbAction(Entity *pokemon, Entity *target)
|
bool8 StairsOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
HandleStairsOrb(pokemon, target);
|
HandleStairsOrb(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 LongtossOrbAction(Entity *pokemon, Entity *target)
|
bool8 LongtossOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
LongTossStatusTarget(pokemon, target);
|
LongTossStatusTarget(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 PierceOrbAction(Entity *pokemon, Entity *target)
|
bool8 PierceOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
|
||||||
{
|
{
|
||||||
PierceStatusTarget(pokemon, target);
|
PierceStatusTarget(pokemon, target);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -31,14 +31,14 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
|
|||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
SetMessageArgument(gAvailablePokemonNames, pokemon, 0);
|
SetMessageArgument(gAvailablePokemonNames, pokemon, 0);
|
||||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
||||||
switch (pokemonInfo->sleep)
|
switch (pokemonInfo->sleep.sleep)
|
||||||
{
|
{
|
||||||
case STATUS_NIGHTMARE:
|
case STATUS_NIGHTMARE:
|
||||||
case STATUS_SLEEP:
|
case STATUS_SLEEP:
|
||||||
case STATUS_NAPPING:
|
case STATUS_NAPPING:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
switch (pokemonInfo->immobilizeStatus)
|
switch (pokemonInfo->immobilize.immobilizeStatus)
|
||||||
{
|
{
|
||||||
case STATUS_FROZEN:
|
case STATUS_FROZEN:
|
||||||
SendMessage(pokemon, *gPtrFrozenMessage);
|
SendMessage(pokemon, *gPtrFrozenMessage);
|
||||||
@ -52,7 +52,7 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
|
|||||||
case STATUS_PETRIFIED:
|
case STATUS_PETRIFIED:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
switch (pokemonInfo->volatileStatus)
|
switch (pokemonInfo->volatileStatus.volatileStatus)
|
||||||
{
|
{
|
||||||
case STATUS_PAUSED:
|
case STATUS_PAUSED:
|
||||||
SendMessage(pokemon, *gPtrPausedMessage);
|
SendMessage(pokemon, *gPtrPausedMessage);
|
||||||
@ -61,12 +61,12 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
|
|||||||
SendMessage(pokemon, *gPtrInfatuatedMessage);
|
SendMessage(pokemon, *gPtrInfatuatedMessage);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->chargingStatus == STATUS_BIDE)
|
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE)
|
||||||
{
|
{
|
||||||
SendMessage(pokemon, *gPtrBideMessage);
|
SendMessage(pokemon, *gPtrBideMessage);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->waitingStatus == STATUS_DECOY)
|
if (pokemonInfo->waitingStruct.waitingStatus == STATUS_DECOY)
|
||||||
{
|
{
|
||||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||||
pokemonInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
pokemonInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
||||||
@ -78,7 +78,7 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
|
|||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->eyesightStatus == STATUS_BLINKER)
|
if (pokemonInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER)
|
||||||
{
|
{
|
||||||
if (!CanMoveInDirection(pokemon, pokemonInfo->action.direction))
|
if (!CanMoveInDirection(pokemon, pokemonInfo->action.direction))
|
||||||
{
|
{
|
||||||
@ -98,7 +98,7 @@ bool8 HasStatusAffectingActions(Entity *pokemon)
|
|||||||
DecideAttack(pokemon);
|
DecideAttack(pokemon);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (pokemonInfo->eyesightStatus == STATUS_CROSS_EYED)
|
if (pokemonInfo->eyesightStatus.eyesightStatus == STATUS_CROSS_EYED)
|
||||||
{
|
{
|
||||||
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
SetActionPassTurnOrWalk(&pokemonInfo->action, pokemonInfo->id);
|
||||||
pokemonInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
pokemonInfo->action.direction = DungeonRandInt(NUM_DIRECTIONS);
|
||||||
@ -121,7 +121,7 @@ bool8 sub_80701A4(Entity *pokemon)
|
|||||||
flag = FALSE;
|
flag = FALSE;
|
||||||
SetMessageArgument(gAvailablePokemonNames, pokemon, 0);
|
SetMessageArgument(gAvailablePokemonNames, pokemon, 0);
|
||||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
SetMonsterActionFields(&pokemonInfo->action, ACTION_PASS_TURN);
|
||||||
switch(pokemonInfo->sleep)
|
switch(pokemonInfo->sleep.sleep)
|
||||||
{
|
{
|
||||||
case STATUS_SLEEP:
|
case STATUS_SLEEP:
|
||||||
case STATUS_NIGHTMARE:
|
case STATUS_NIGHTMARE:
|
||||||
@ -130,7 +130,7 @@ bool8 sub_80701A4(Entity *pokemon)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(pokemonInfo->immobilizeStatus)
|
switch(pokemonInfo->immobilize.immobilizeStatus)
|
||||||
{
|
{
|
||||||
case STATUS_FROZEN:
|
case STATUS_FROZEN:
|
||||||
SendMessage(pokemon,*gPtrFrozenMessage);
|
SendMessage(pokemon,*gPtrFrozenMessage);
|
||||||
@ -145,7 +145,7 @@ bool8 sub_80701A4(Entity *pokemon)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(pokemonInfo->volatileStatus) {
|
switch(pokemonInfo->volatileStatus.volatileStatus) {
|
||||||
case STATUS_CONFUSED:
|
case STATUS_CONFUSED:
|
||||||
flag = TRUE;
|
flag = TRUE;
|
||||||
goto _0807026C;
|
goto _0807026C;
|
||||||
@ -160,11 +160,11 @@ bool8 sub_80701A4(Entity *pokemon)
|
|||||||
case STATUS_CRINGE:
|
case STATUS_CRINGE:
|
||||||
case 8:
|
case 8:
|
||||||
_0807026C:
|
_0807026C:
|
||||||
if (pokemonInfo->chargingStatus == STATUS_BIDE) {
|
if (pokemonInfo->charging.chargingStatus == STATUS_BIDE) {
|
||||||
SendMessage(pokemon,*gPtrBideMessage);
|
SendMessage(pokemon,*gPtrBideMessage);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else if (((pokemonInfo->chargingStatus != STATUS_NONE) && (pokemonInfo->chargingStatus != STATUS_CHARGING)) && (pokemonInfo->chargingStatus != STATUS_ENRAGED)) {
|
else if (((pokemonInfo->charging.chargingStatus != STATUS_NONE) && (pokemonInfo->charging.chargingStatus != STATUS_CHARGING)) && (pokemonInfo->charging.chargingStatus != STATUS_ENRAGED)) {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
SendMessage(pokemon,*gPtrMoveInterruptedMessage);
|
SendMessage(pokemon,*gPtrMoveInterruptedMessage);
|
||||||
}
|
}
|
||||||
@ -172,7 +172,7 @@ bool8 sub_80701A4(Entity *pokemon)
|
|||||||
for(index = 0, move = pokemonInfo->moves; index < MAX_MON_MOVES; move++, index++) {
|
for(index = 0, move = pokemonInfo->moves; index < MAX_MON_MOVES; move++, index++) {
|
||||||
if ((move->moveFlags & MOVE_FLAG_EXISTS) &&
|
if ((move->moveFlags & MOVE_FLAG_EXISTS) &&
|
||||||
(MoveMatchesChargingStatus(pokemon,move)) &&
|
(MoveMatchesChargingStatus(pokemon,move)) &&
|
||||||
(pokemonInfo->chargingStatusMoveIndex == index)) {
|
(pokemonInfo->charging.chargingStatusMoveIndex == index)) {
|
||||||
SetMonsterActionFields(&pokemonInfo->action, ACTION_USE_MOVE_PLAYER);
|
SetMonsterActionFields(&pokemonInfo->action, ACTION_USE_MOVE_PLAYER);
|
||||||
index_1 = index;
|
index_1 = index;
|
||||||
r7 = &pokemonInfo->action.unk4[1].actionUseIndex;
|
r7 = &pokemonInfo->action.unk4[1].actionUseIndex;
|
||||||
|
@ -59,20 +59,20 @@ void SetMessageArgument_2(u8 *buffer, EntityInfo *param_2, s32 colorNum)
|
|||||||
{
|
{
|
||||||
if (((gDungeon->blinded ||
|
if (((gDungeon->blinded ||
|
||||||
gDungeon->hallucinating) ||
|
gDungeon->hallucinating) ||
|
||||||
(param_2->transformStatus == STATUS_INVISIBLE)) &&
|
(param_2->transformStatus.transformStatus == STATUS_INVISIBLE)) &&
|
||||||
(param_2->isNotTeamMember))
|
(param_2->isNotTeamMember))
|
||||||
{
|
{
|
||||||
strcpy(buffer, *gUnknown_80F8988);
|
strcpy(buffer, *gUnknown_80F8988);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (param_2->waitingStatus == STATUS_DECOY) {
|
if (param_2->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||||
strcpy(buffer, *gUnknown_80F8968);
|
strcpy(buffer, *gUnknown_80F8968);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (param_2->isNotTeamMember) {
|
if (param_2->isNotTeamMember) {
|
||||||
if ((param_2->joinedAt == 0x4A) || (param_2->clientType == CLIENT_TYPE_CLIENT)) {
|
if ((param_2->joinedAt.joinedAt == 0x4A) || (param_2->clientType == CLIENT_TYPE_CLIENT)) {
|
||||||
CopyYellowMonsterNametoBuffer(buffer, param_2->apparentID);
|
CopyYellowMonsterNametoBuffer(buffer, param_2->apparentID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -88,7 +88,7 @@ void SetMessageArgument_2(u8 *buffer, EntityInfo *param_2, s32 colorNum)
|
|||||||
|
|
||||||
void sub_8070968(u8 *buffer, EntityInfo *entityInfo, s32 colorNum)
|
void sub_8070968(u8 *buffer, EntityInfo *entityInfo, s32 colorNum)
|
||||||
{
|
{
|
||||||
if (entityInfo->waitingStatus == STATUS_DECOY) {
|
if (entityInfo->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||||
sprintfStatic(buffer, gUnknown_8106FA4, colorNum + 0x30, *gUnknown_80F8974);
|
sprintfStatic(buffer, gUnknown_8106FA4, colorNum + 0x30, *gUnknown_80F8974);
|
||||||
}
|
}
|
||||||
else if (entityInfo->isNotTeamMember) {
|
else if (entityInfo->isNotTeamMember) {
|
||||||
@ -103,14 +103,14 @@ void sub_80709C8(u8 *buffer, EntityInfo *entityInfo)
|
|||||||
{
|
{
|
||||||
if (((gDungeon->blinded ||
|
if (((gDungeon->blinded ||
|
||||||
gDungeon->hallucinating) ||
|
gDungeon->hallucinating) ||
|
||||||
(entityInfo->transformStatus == STATUS_INVISIBLE)) &&
|
(entityInfo->transformStatus.transformStatus == STATUS_INVISIBLE)) &&
|
||||||
(entityInfo->isNotTeamMember))
|
(entityInfo->isNotTeamMember))
|
||||||
{
|
{
|
||||||
strcpy(buffer, *gUnknown_80F8994);
|
strcpy(buffer, *gUnknown_80F8994);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (entityInfo->waitingStatus == STATUS_DECOY) {
|
if (entityInfo->waitingStruct.waitingStatus == STATUS_DECOY) {
|
||||||
strcpy(buffer, *gUnknown_80F8974);
|
strcpy(buffer, *gUnknown_80F8974);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -130,19 +130,19 @@ bool8 HasNegativeStatus(Entity *pokemon)
|
|||||||
{
|
{
|
||||||
EntityInfo *pokemonInfo = pokemon->info;
|
EntityInfo *pokemonInfo = pokemon->info;
|
||||||
s32 i;
|
s32 i;
|
||||||
if (pokemonInfo->sleep == STATUS_SLEEP ||
|
if (pokemonInfo->sleep.sleep == STATUS_SLEEP ||
|
||||||
pokemonInfo->sleep == STATUS_NIGHTMARE ||
|
pokemonInfo->sleep.sleep == STATUS_NIGHTMARE ||
|
||||||
pokemonInfo->sleep == STATUS_YAWNING ||
|
pokemonInfo->sleep.sleep == STATUS_YAWNING ||
|
||||||
pokemonInfo->nonVolatileStatus != STATUS_NONE ||
|
pokemonInfo->nonVolatile.nonVolatileStatus != STATUS_NONE ||
|
||||||
(pokemonInfo->immobilizeStatus != STATUS_INGRAIN && pokemonInfo->immobilizeStatus != STATUS_NONE) ||
|
(pokemonInfo->immobilize.immobilizeStatus != STATUS_INGRAIN && pokemonInfo->immobilize.immobilizeStatus != STATUS_NONE) ||
|
||||||
pokemonInfo->volatileStatus != STATUS_NONE ||
|
pokemonInfo->volatileStatus.volatileStatus != STATUS_NONE ||
|
||||||
pokemonInfo->waitingStatus == STATUS_CURSED ||
|
pokemonInfo->waitingStruct.waitingStatus == STATUS_CURSED ||
|
||||||
pokemonInfo->waitingStatus == STATUS_DECOY ||
|
pokemonInfo->waitingStruct.waitingStatus == STATUS_DECOY ||
|
||||||
pokemonInfo->linkedStatus == STATUS_LEECH_SEED ||
|
pokemonInfo->linked.linkedStatus == STATUS_LEECH_SEED ||
|
||||||
pokemonInfo->moveStatus == STATUS_WHIFFER ||
|
pokemonInfo->moveStatus.moveStatus == STATUS_WHIFFER ||
|
||||||
pokemonInfo->eyesightStatus == STATUS_BLINKER ||
|
pokemonInfo->eyesightStatus.eyesightStatus == STATUS_BLINKER ||
|
||||||
pokemonInfo->eyesightStatus == STATUS_CROSS_EYED ||
|
pokemonInfo->eyesightStatus.eyesightStatus == STATUS_CROSS_EYED ||
|
||||||
pokemonInfo->muzzled == TRUE ||
|
pokemonInfo->muzzled.muzzled == TRUE ||
|
||||||
pokemonInfo->exposed ||
|
pokemonInfo->exposed ||
|
||||||
pokemonInfo->perishSongTurns != 0)
|
pokemonInfo->perishSongTurns != 0)
|
||||||
{
|
{
|
||||||
@ -168,9 +168,9 @@ bool8 HasNegativeStatus(Entity *pokemon)
|
|||||||
|
|
||||||
bool8 IsSleeping(Entity *pokemon)
|
bool8 IsSleeping(Entity *pokemon)
|
||||||
{
|
{
|
||||||
if (pokemon->info->sleep != STATUS_SLEEP &&
|
if (pokemon->info->sleep.sleep != STATUS_SLEEP &&
|
||||||
pokemon->info->sleep != STATUS_NAPPING &&
|
pokemon->info->sleep.sleep != STATUS_NAPPING &&
|
||||||
pokemon->info->sleep != STATUS_NIGHTMARE)
|
pokemon->info->sleep.sleep != STATUS_NIGHTMARE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
401
src/trap_1.c
401
src/trap_1.c
@ -12,56 +12,60 @@ extern u8 gUnknown_81071D4[];
|
|||||||
|
|
||||||
extern void sub_8082FA8(void *, void *, u32);
|
extern void sub_8082FA8(void *, void *, u32);
|
||||||
|
|
||||||
|
void sub_8081B60(void *, Tile *);
|
||||||
|
void sub_80830F8(void * , u32*);
|
||||||
|
void sub_808312C(void *, u32 *);
|
||||||
|
void sub_8081B94(void *, u8 *);
|
||||||
void sub_8083078(void *, u32);
|
void sub_8083078(void *, u32);
|
||||||
void sub_80830B4(void *, u8);
|
void sub_80830B4(void *, u8);
|
||||||
void sub_8083030(void *, u16);
|
void sub_8083030(void *, u16);
|
||||||
void sub_8080E0C(unkStruct_8094924 *, Entity *);
|
void sub_8080E0C(unkStruct_8094924 *, Entity *);
|
||||||
void sub_808300C(void *, u8 *);
|
void sub_808300C(void *, u8 *);
|
||||||
void sub_8081788(void *, Item *);
|
void sub_8081788(unkStruct_8094924 *param_1, Item *param_2);
|
||||||
void sub_8080B90(unkStruct_8094924 *param_1);
|
void sub_8080B90(unkStruct_8094924 *param_1);
|
||||||
void SaveItemData(unkStruct_8094924 *param_1);
|
void SaveItemData(unkStruct_8094924 *param_1);
|
||||||
void sub_8081454(unkStruct_8094924 *param_1);
|
void sub_8081454(unkStruct_8094924 *param_1);
|
||||||
void sub_808165C(unkStruct_8094924 *param_1);
|
void sub_808165C(unkStruct_8094924 *param_1);
|
||||||
void sub_808173C(unkStruct_8094924 *param_1);
|
void SaveDungeonMusic(unkStruct_8094924 *param_1);
|
||||||
void SaveTrapData(unkStruct_8094924 *param_1);
|
void SaveTrapData(unkStruct_8094924 *param_1);
|
||||||
void sub_8080CF0(unkStruct_8094924 *param_1);
|
void sub_8080CF0(unkStruct_8094924 *param_1);
|
||||||
void nullsub_98(unkStruct_8094924 *param_1);
|
void nullsub_98(unkStruct_8094924 *param_1);
|
||||||
void sub_8082F9C(unkStruct_8094924 *param_1, u32, u32);
|
void sub_8082F9C(unkStruct_8094924 *param_1, u32, u32);
|
||||||
void sub_8049ED4(void);
|
void sub_8049ED4(void);
|
||||||
void sub_8083060(void *, u32);
|
void sub_8083060(void *, u32);
|
||||||
void sub_80817F4(void *, u32);
|
void sub_80817F4(unkStruct_8094924 *param_1, u32 param_2);
|
||||||
void sub_80830A0(void *, u32);
|
void sub_80830A0(void *, u32);
|
||||||
void sub_808180C(void *, u32);
|
void sub_808180C(unkStruct_8094924 *param_1, u32 param_2);
|
||||||
void sub_8083048(void *, u32);
|
void sub_8083048(void *, u32);
|
||||||
void sub_80818C8(void *, bool8 *);
|
void sub_80818C8(unkStruct_8094924 *param_1, JoinedAt *param_2);
|
||||||
void sub_80817C8(void *, void *);
|
void sub_80817C8(unkStruct_8094924 *param_1, ActionContainer *param_2);
|
||||||
void sub_8081B34(void *, void *);
|
void sub_8081B34(void *, void *);
|
||||||
void sub_8081B08(void *, Move *);
|
void sub_8081B08(void *, Move *);
|
||||||
void sub_8081824(void *, u32);
|
void sub_8081824(unkStruct_8094924 *param_1, u32 param_2);
|
||||||
void sub_80817B0(void *, u32);
|
void sub_80817B0(unkStruct_8094924 *param_1, u32 param_2);
|
||||||
void SavePosition(void*, Position *);
|
void SavePosition(void*, Position *);
|
||||||
void sub_80818E4(void *, u8 *);
|
void sub_80818E4(unkStruct_8094924 *param_1, AITarget* param_2);
|
||||||
void sub_8081B54(void *, u8 *);
|
void sub_8081B54(void *, u8 *);
|
||||||
void sub_808186C(void *, s32);
|
void SaveSpeedStage(unkStruct_8094924 *param_1, s32 param_2);
|
||||||
void sub_8081854(void *, s32);
|
void sub_8081854(unkStruct_8094924 *param_1, s32 param_2);
|
||||||
void sub_808183C(void *, s32);
|
void sub_808183C(unkStruct_8094924 *param_1, s32 param_2);
|
||||||
void sub_8081AB8(void *, bool8 *);
|
void SaveMuzzledStatus(unkStruct_8094924 *param_1, Muzzled *param_2);
|
||||||
void sub_8081A9C(void *, u8*);
|
void SaveEyesightStatus(unkStruct_8094924 *param_1, EyesightStatus *param_2);
|
||||||
void sub_8081A80(void *, u8*);
|
void SaveTransformStatus(unkStruct_8094924 *param_1, TransformStatus *param_2);
|
||||||
void sub_8081A74(void *, u8*);
|
void SaveItemStatus(unkStruct_8094924 *param_1, ItemStatus *param_2);
|
||||||
void sub_8081A58(void *, u8*);
|
void SaveMoveStatus(unkStruct_8094924 *param_1, MoveStatus* param_2);
|
||||||
void sub_8081A24(void *, u8*);
|
void SaveLinkedStatus(unkStruct_8094924 *param_1, Linked *param_2);
|
||||||
void sub_8081994(void *, u8*);
|
void SaveVolatileStatus(unkStruct_8094924 *param_1, Volatile *param_2);
|
||||||
void sub_8081968(void *, u8*);
|
void SaveImmobilizeStatus(unkStruct_8094924 *param_1, Immobilize *param_2);
|
||||||
void sub_808193C(void *, u8*);
|
void SaveNonVolatileStatus(unkStruct_8094924 *param_1, NonVolatile *param_2);
|
||||||
void sub_8081920(void *, u8*);
|
void SaveEntitySleep(unkStruct_8094924 *param_1, Sleep* param_2);
|
||||||
void sub_8081880(void *, u8);
|
void SaveTactic(unkStruct_8094924 *param_1, u8 param_2);
|
||||||
void sub_8081898(void *, s16 *);
|
void SaveHiddenPower(unkStruct_8094924 *param_1, HiddenPower *param_2);
|
||||||
void sub_80819B0(void *, u8 *);
|
void SaveChargingStatus(unkStruct_8094924 *param_1, Charging *param_2);
|
||||||
void sub_80819D4(void *, u8 *);
|
void SaveProtectionStatus(unkStruct_8094924 *param_1, Protection *param_2);
|
||||||
void sub_80819F0(void *, u8 *);
|
void SaveWaitingStatus(unkStruct_8094924 *param_1, Waiting *param_2);
|
||||||
void SaveSpeedCounters(void *, u8 *, u32);
|
void SaveSpeedCounters(void *, u8 *, u32);
|
||||||
void sub_80818B8(void *, u32);
|
void SaveClientType(unkStruct_8094924 *param_1, u8 param_2);
|
||||||
void sub_803E708(u32, u32);
|
void sub_803E708(u32, u32);
|
||||||
void sub_80421C0(Entity *, u32);
|
void sub_80421C0(Entity *, u32);
|
||||||
void sub_804687C(Entity *, Position *, Position *, Item *, u32);
|
void sub_804687C(Entity *, Position *, Position *, Item *, u32);
|
||||||
@ -116,7 +120,7 @@ void sub_8080B30(u32 param_1,u32 param_2)
|
|||||||
sub_8080B90(&uStack_14);
|
sub_8080B90(&uStack_14);
|
||||||
sub_8081454(&uStack_14);
|
sub_8081454(&uStack_14);
|
||||||
sub_808165C(&uStack_14);
|
sub_808165C(&uStack_14);
|
||||||
sub_808173C(&uStack_14);
|
SaveDungeonMusic(&uStack_14);
|
||||||
SaveItemData(&uStack_14);
|
SaveItemData(&uStack_14);
|
||||||
SaveTrapData(&uStack_14);
|
SaveTrapData(&uStack_14);
|
||||||
sub_8080CF0(&uStack_14);
|
sub_8080CF0(&uStack_14);
|
||||||
@ -228,28 +232,28 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
|||||||
EntityInfo info2;
|
EntityInfo info2;
|
||||||
u32 uStack_ac;
|
u32 uStack_ac;
|
||||||
u32 uStack_a8;
|
u32 uStack_a8;
|
||||||
s16 *psStack_a4;
|
HiddenPower *psStack_a4;
|
||||||
u8 *temp1;
|
u8 *temp1;
|
||||||
u8 *temp2;
|
u8 *temp2;
|
||||||
u8 *temp3;
|
AITarget *temp3;
|
||||||
u8 *puStack_a0;
|
u8 *puStack_a0;
|
||||||
u32 *puStack_9c;
|
u32 *puStack_9c;
|
||||||
u32 *puStack_98;
|
u32 *puStack_98;
|
||||||
u32 *puStack_94;
|
u32 *puStack_94;
|
||||||
u8 *puStack_90;
|
u8 *puStack_90;
|
||||||
u8 *puStack_8c;
|
Sleep *puStack_8c;
|
||||||
u8 *puStack_88;
|
NonVolatile *puStack_88;
|
||||||
u8 *puStack_84;
|
Immobilize *puStack_84;
|
||||||
u8 *puStack_80;
|
Volatile *puStack_80;
|
||||||
u8 *puStack_7c;
|
Charging *puStack_7c;
|
||||||
u8 *puStack_78;
|
Protection *puStack_78;
|
||||||
u8 *puStack_74;
|
Waiting *puStack_74;
|
||||||
u8 *puStack_70;
|
Linked *puStack_70;
|
||||||
u8 *puStack_6c;
|
MoveStatus *puStack_6c;
|
||||||
u8 *puStack_68;
|
ItemStatus *puStack_68;
|
||||||
u8 *puStack_64;
|
TransformStatus *puStack_64;
|
||||||
u8 *puStack_60;
|
EyesightStatus *puStack_60;
|
||||||
bool8 *pbStack_5c;
|
Muzzled *pbStack_5c;
|
||||||
bool8 *pbStack_58;
|
bool8 *pbStack_58;
|
||||||
bool8 *pbStack_54;
|
bool8 *pbStack_54;
|
||||||
bool8 *pbStack_50;
|
bool8 *pbStack_50;
|
||||||
@ -323,22 +327,22 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
|||||||
sub_8081824(param_1,info->abilities[1]);
|
sub_8081824(param_1,info->abilities[1]);
|
||||||
sub_8081788(param_1,&info->heldItem);
|
sub_8081788(param_1,&info->heldItem);
|
||||||
sub_80817B0(param_1,info->fill64[0]);
|
sub_80817B0(param_1,info->fill64[0]);
|
||||||
temp3 = &info->aiObjective;
|
temp3 = &info->aiTarget;
|
||||||
temp2 = info->IQSkillMenuFlags;
|
temp2 = info->IQSkillMenuFlags;
|
||||||
temp1 = info->IQSkillFlags;
|
temp1 = info->IQSkillFlags;
|
||||||
puStack_a0 = &info->tactic;
|
puStack_a0 = &info->tactic;
|
||||||
psStack_a4 = &info->hiddenPowerBasePower;
|
psStack_a4 = &info->hiddenPower;
|
||||||
puStack_9c = &info->unk98;
|
puStack_9c = &info->unk98;
|
||||||
puStack_98 = &info->unk9C;
|
puStack_98 = &info->unk9C;
|
||||||
puStack_94 = &info->unkA0;
|
puStack_94 = &info->unkA0;
|
||||||
puStack_8c = &info->sleep;
|
puStack_8c = &info->sleep;
|
||||||
puStack_88 = &info->nonVolatileStatus;
|
puStack_88 = &info->nonVolatile;
|
||||||
puStack_84 = &info->immobilizeStatus;
|
puStack_84 = &info->immobilize;
|
||||||
puStack_80 = &info->volatileStatus;
|
puStack_80 = &info->volatileStatus;
|
||||||
puStack_7c = &info->chargingStatus;
|
puStack_7c = &info->charging;
|
||||||
puStack_78 = &info->protectionStatus;
|
puStack_78 = &info->protection;
|
||||||
puStack_74 = &info->waitingStatus;
|
puStack_74 = &info->waitingStruct;
|
||||||
puStack_70 = &info->linkedStatus;
|
puStack_70 = &info->linked;
|
||||||
puStack_6c = &info->moveStatus;
|
puStack_6c = &info->moveStatus;
|
||||||
puStack_68 = &info->itemStatus;
|
puStack_68 = &info->itemStatus;
|
||||||
puStack_64 = &info->transformStatus;
|
puStack_64 = &info->transformStatus;
|
||||||
@ -370,24 +374,24 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
|||||||
sub_80818E4(param_1,temp3);
|
sub_80818E4(param_1,temp3);
|
||||||
sub_8081B54(param_1,temp2);
|
sub_8081B54(param_1,temp2);
|
||||||
sub_8081B54(param_1,temp1);
|
sub_8081B54(param_1,temp1);
|
||||||
sub_8081880(param_1,*puStack_a0);
|
SaveTactic(param_1,*puStack_a0);
|
||||||
sub_8081898(param_1,psStack_a4);
|
SaveHiddenPower(param_1,psStack_a4);
|
||||||
sub_8083078(param_1,*puStack_9c);
|
sub_8083078(param_1,*puStack_9c);
|
||||||
sub_8083078(param_1,*puStack_98);
|
sub_8083078(param_1,*puStack_98);
|
||||||
sub_8083078(param_1,*puStack_94);
|
sub_8083078(param_1,*puStack_94);
|
||||||
sub_8081920(param_1,puStack_8c);
|
SaveEntitySleep(param_1,puStack_8c);
|
||||||
sub_808193C(param_1,puStack_88);
|
SaveNonVolatileStatus(param_1,puStack_88);
|
||||||
sub_8081968(param_1,puStack_84);
|
SaveImmobilizeStatus(param_1,puStack_84);
|
||||||
sub_8081994(param_1,puStack_80);
|
SaveVolatileStatus(param_1,puStack_80);
|
||||||
sub_80819B0(param_1,puStack_7c);
|
SaveChargingStatus(param_1,puStack_7c);
|
||||||
sub_80819D4(param_1,puStack_78);
|
SaveProtectionStatus(param_1,puStack_78);
|
||||||
sub_80819F0(param_1,puStack_74);
|
SaveWaitingStatus(param_1,puStack_74);
|
||||||
sub_8081A24(param_1,puStack_70);
|
SaveLinkedStatus(param_1,puStack_70);
|
||||||
sub_8081A58(param_1,puStack_6c);
|
SaveMoveStatus(param_1,puStack_6c);
|
||||||
sub_8081A74(param_1,puStack_68);
|
SaveItemStatus(param_1,puStack_68);
|
||||||
sub_8081A80(param_1,puStack_64);
|
SaveTransformStatus(param_1,puStack_64);
|
||||||
sub_8081A9C(param_1,puStack_60);
|
SaveEyesightStatus(param_1,puStack_60);
|
||||||
sub_8081AB8(param_1,pbStack_5c);
|
SaveMuzzledStatus(param_1,pbStack_5c);
|
||||||
sub_80830B4(param_1,*pbStack_58);
|
sub_80830B4(param_1,*pbStack_58);
|
||||||
sub_80830B4(param_1,*pbStack_54);
|
sub_80830B4(param_1,*pbStack_54);
|
||||||
sub_80830B4(param_1,*pbStack_50);
|
sub_80830B4(param_1,*pbStack_50);
|
||||||
@ -403,7 +407,7 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
|||||||
sub_8083060(param_1,*puStack_28);
|
sub_8083060(param_1,*puStack_28);
|
||||||
sub_808183C(param_1,*puStack_24);
|
sub_808183C(param_1,*puStack_24);
|
||||||
sub_8081854(param_1,info->targetingDecoy);
|
sub_8081854(param_1,info->targetingDecoy);
|
||||||
sub_808186C(param_1,info->speedStage);
|
SaveSpeedStage(param_1,info->speedStage);
|
||||||
SaveSpeedCounters(param_1,info->speedUpCounters,NUM_SPEED_COUNTERS);
|
SaveSpeedCounters(param_1,info->speedUpCounters,NUM_SPEED_COUNTERS);
|
||||||
SaveSpeedCounters(param_1,info->speedDownCounters,NUM_SPEED_COUNTERS);
|
SaveSpeedCounters(param_1,info->speedDownCounters,NUM_SPEED_COUNTERS);
|
||||||
sub_8083060(param_1,info->stockpileStage);
|
sub_8083060(param_1,info->stockpileStage);
|
||||||
@ -440,5 +444,264 @@ void sub_8080E0C(unkStruct_8094924 *param_1,Entity *param_2)
|
|||||||
sub_8083048(param_1,info->unk1F8);
|
sub_8083048(param_1,info->unk1F8);
|
||||||
sub_8083048(param_1,info->mobileTurnTimer);
|
sub_8083048(param_1,info->mobileTurnTimer);
|
||||||
sub_8083078(param_1,info->expGainedInTurn);
|
sub_8083078(param_1,info->expGainedInTurn);
|
||||||
sub_80818B8(param_1,*puStack_90);
|
SaveClientType(param_1,*puStack_90);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sub_8081454(unkStruct_8094924 *param_1)
|
||||||
|
{
|
||||||
|
int iVar1;
|
||||||
|
int iVar2;
|
||||||
|
int iVar4;
|
||||||
|
|
||||||
|
sub_808300C(param_1,gUnknown_81071E0);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk3A08);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk3A09);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk3A0A);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk3A0B);
|
||||||
|
sub_8083060(param_1, gDungeon->unk3A0C);
|
||||||
|
sub_8083060(param_1, gDungeon->unk3A0D);
|
||||||
|
sub_8083048(param_1, gDungeon->tileset);
|
||||||
|
sub_8083048(param_1,gDungeon->unk3A10);
|
||||||
|
sub_8083048(param_1, gDungeon->unk3A12);
|
||||||
|
sub_8083048(param_1, gDungeon->bossBattleIndex);
|
||||||
|
sub_8083048(param_1, gDungeon->unk3A16);
|
||||||
|
for(iVar1 = 0; iVar1 < DUNGEON_MAX_SIZE_Y; iVar1++)
|
||||||
|
{
|
||||||
|
|
||||||
|
for(iVar2 = 0; iVar2 < DUNGEON_MAX_SIZE_X; iVar2++)
|
||||||
|
{
|
||||||
|
sub_8081B60(param_1,&gDungeon->tiles[iVar1][iVar2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SavePosition(param_1,&gDungeon->unkE218);
|
||||||
|
SavePosition(param_1,&gDungeon->unkE21C);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for(iVar4 = 0; iVar4 < 8; iVar4++)
|
||||||
|
{
|
||||||
|
SavePosition(param_1,&gDungeon->unkE220[iVar4]);
|
||||||
|
}
|
||||||
|
sub_80830F8(param_1,&gDungeon->unkE240);
|
||||||
|
sub_80830F8(param_1,&gDungeon->unkE250);
|
||||||
|
sub_808312C(param_1,&gDungeon->unkE260);
|
||||||
|
|
||||||
|
for(iVar1 = 0; iVar1 < 8; iVar1++)
|
||||||
|
{
|
||||||
|
for(iVar2 = 0; iVar2 < 8; iVar2++)
|
||||||
|
{
|
||||||
|
sub_8081B60(param_1, &gDungeon->unkE27C[iVar1][iVar2]);
|
||||||
|
sub_8083060(param_1, gDungeon->unkE87C[iVar1][iVar2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sub_8081B94(param_1,&gDungeon->weather);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_808165C(unkStruct_8094924 *param_1)
|
||||||
|
{
|
||||||
|
|
||||||
|
sub_808300C(param_1,gUnknown_81071E0);
|
||||||
|
sub_8083060(param_1, gDungeon->unk18208);
|
||||||
|
sub_8083060(param_1, gDungeon->visibilityRange);
|
||||||
|
sub_80830B4(param_1, gDungeon->blinded);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk1820B);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk1820C);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk1820D);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk1820E);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk1820F);
|
||||||
|
sub_80830B4(param_1, gDungeon->hallucinating);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk18211);
|
||||||
|
sub_80830B4(param_1, gDungeon->unk18213);
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE: forcing this s16 for now - Seth
|
||||||
|
void SaveDungeonMusic(unkStruct_8094924 *param_1)
|
||||||
|
{
|
||||||
|
sub_8083048(param_1, (s16)gDungeon->musPlayer.songIndex);
|
||||||
|
sub_8083048(param_1, (s16)gDungeon->musPlayer.pastSongIndex);
|
||||||
|
sub_8083048(param_1, (s16)gDungeon->musPlayer.queuedSongIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8081788(unkStruct_8094924 *param_1, Item *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->flags, 1);
|
||||||
|
sub_8082FA8(param_1, ¶m_2->quantity, 1);
|
||||||
|
sub_8082FA8(param_1, ¶m_2->id, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_80817B0(unkStruct_8094924 *param_1, u32 param_2)
|
||||||
|
{
|
||||||
|
u8 stack;
|
||||||
|
stack = param_2;
|
||||||
|
sub_8082FA8(param_1, &stack, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_80817C8(unkStruct_8094924 *param_1, ActionContainer *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->direction, 1);
|
||||||
|
sub_8082FA8(param_1, ¶m_2->itemTargetPosition.x, 1);
|
||||||
|
sub_8082FA8(param_1, ¶m_2->itemTargetPosition.y, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_80817F4(unkStruct_8094924 *param_1, u32 param_2)
|
||||||
|
{
|
||||||
|
u16 stack;
|
||||||
|
stack = param_2;
|
||||||
|
sub_8082FA8(param_1, &stack, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_808180C(unkStruct_8094924 *param_1, u32 param_2)
|
||||||
|
{
|
||||||
|
u8 stack;
|
||||||
|
stack = param_2;
|
||||||
|
sub_8082FA8(param_1, &stack, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8081824(unkStruct_8094924 *param_1, u32 param_2)
|
||||||
|
{
|
||||||
|
u8 stack;
|
||||||
|
stack = param_2;
|
||||||
|
sub_8082FA8(param_1, &stack, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_808183C(unkStruct_8094924 *param_1, s32 param_2)
|
||||||
|
{
|
||||||
|
u8 stack;
|
||||||
|
stack = param_2;
|
||||||
|
sub_8082FA8(param_1, &stack, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8081854(unkStruct_8094924 *param_1, s32 param_2)
|
||||||
|
{
|
||||||
|
u8 stack;
|
||||||
|
stack = param_2;
|
||||||
|
sub_8082FA8(param_1, &stack, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveSpeedStage(unkStruct_8094924 *param_1, s32 param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveTactic(unkStruct_8094924 *param_1, u8 param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveHiddenPower(unkStruct_8094924 *param_1, HiddenPower *param_2)
|
||||||
|
{
|
||||||
|
sub_8083048(param_1, param_2->hiddenPowerBasePower);
|
||||||
|
sub_808180C(param_1, param_2->hiddenPowerType);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveClientType(unkStruct_8094924 *param_1, u8 param_2)
|
||||||
|
{
|
||||||
|
sub_8083060(param_1, param_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_80818C8(unkStruct_8094924 *param_1, JoinedAt *param_2)
|
||||||
|
{
|
||||||
|
sub_8083060(param_1, param_2->joinedAt);
|
||||||
|
sub_8083060(param_1, param_2->unk1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_80818E4(unkStruct_8094924 *param_1, AITarget* param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->aiObjective, 1);
|
||||||
|
sub_80830B4(param_1, param_2->aiNotNextToTarget);
|
||||||
|
sub_80830B4(param_1, param_2->aiTargetingEnemy);
|
||||||
|
sub_80830B4(param_1, param_2->aiTurningAround);
|
||||||
|
sub_8083030(param_1, param_2->aiTargetSpawnGenID);
|
||||||
|
SavePosition(param_1, ¶m_2->aiTargetPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveEntitySleep(unkStruct_8094924 *param_1, Sleep* param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->sleep, 1);
|
||||||
|
sub_8083060(param_1, param_2->sleepTurns);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveNonVolatileStatus(unkStruct_8094924 *param_1, NonVolatile *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->nonVolatileStatus, 1);
|
||||||
|
sub_8083060(param_1, param_2->nonVolatileStatusTurns);
|
||||||
|
sub_8083060(param_1, param_2->nonVolatileStatusDamageCountdown);
|
||||||
|
sub_8083060(param_1, param_2->unk4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveImmobilizeStatus(unkStruct_8094924 *param_1, Immobilize *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->immobilizeStatus, 1);
|
||||||
|
sub_8083060(param_1, param_2->immobilizeStatusTurns);
|
||||||
|
sub_8083060(param_1, param_2->immobilizeStatusDamageCountdown);
|
||||||
|
sub_8083078(param_1, param_2->unk4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveVolatileStatus(unkStruct_8094924 *param_1, Volatile *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->volatileStatus, 1);
|
||||||
|
sub_8083060(param_1, param_2->volatileStatusTurns);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveChargingStatus(unkStruct_8094924 *param_1, Charging *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->chargingStatus, 1);
|
||||||
|
sub_8083060(param_1, param_2->chargingStatusTurns);
|
||||||
|
sub_8083060(param_1, param_2->chargingStatusMoveIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveProtectionStatus(unkStruct_8094924 *param_1, Protection *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->protectionStatus, 1);
|
||||||
|
sub_8083060(param_1, param_2->protectionStatusTurns);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveWaitingStatus(unkStruct_8094924 *param_1, Waiting *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->waitingStatus, 1);
|
||||||
|
sub_80830B4(param_1, param_2->enemyDecoy);
|
||||||
|
sub_80830B4(param_1, param_2->unkCA);
|
||||||
|
sub_8083060(param_1, param_2->waitingStatusTurns);
|
||||||
|
sub_8083060(param_1, param_2->curseDamageCountdown);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveLinkedStatus(unkStruct_8094924 *param_1, Linked *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->linkedStatus, 1);
|
||||||
|
sub_8083078(param_1, param_2->unkD4);
|
||||||
|
sub_8083060(param_1, param_2->unkD8);
|
||||||
|
sub_8083060(param_1, param_2->linkedStatusTurns);
|
||||||
|
sub_8083060(param_1, param_2->linkedStatusDamageCountdown);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveMoveStatus(unkStruct_8094924 *param_1, MoveStatus* param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->moveStatus, 1);
|
||||||
|
sub_8083060(param_1, param_2->moveStatusTurns);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveItemStatus(unkStruct_8094924 *param_1, ItemStatus *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->itemStatus, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveTransformStatus(unkStruct_8094924 *param_1, TransformStatus *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->transformStatus, 1);
|
||||||
|
sub_8083060(param_1, param_2->transformStatusTurns);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveEyesightStatus(unkStruct_8094924 *param_1, EyesightStatus *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->eyesightStatus, 1);
|
||||||
|
sub_8083060(param_1, param_2->eyesightStatusTurns);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveMuzzledStatus(unkStruct_8094924 *param_1, Muzzled *param_2)
|
||||||
|
{
|
||||||
|
sub_8082FA8(param_1, ¶m_2->muzzled, 1);
|
||||||
|
sub_8083060(param_1, param_2->muzzledTurns);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ s32 WeightWeakTypePicker(Entity *user, Entity *target, u8 moveType)
|
|||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if (moveType == TYPE_ELECTRIC && userData->chargingStatus == STATUS_CHARGING)
|
if (moveType == TYPE_ELECTRIC && userData->charging.chargingStatus == STATUS_CHARGING)
|
||||||
{
|
{
|
||||||
weight *= 2;
|
weight *= 2;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user