mirror of
https://github.com/pret/pmd-red.git
synced 2026-04-25 07:28:17 -05:00
decomp more of 8057824
This commit is contained in:
parent
6039d7ca91
commit
55a3041782
|
|
@ -920,926 +920,4 @@ sub_8059A18:
|
|||
_08059A28: .4byte gUnknown_8106A50
|
||||
thumb_func_end sub_8059A18
|
||||
|
||||
thumb_func_start sub_8059A2C
|
||||
sub_8059A2C:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x1C
|
||||
mov r9, r0
|
||||
adds r7, r1, 0
|
||||
adds r6, r2, 0
|
||||
mov r8, r3
|
||||
movs r5, 0
|
||||
add r0, sp, 0x18
|
||||
strb r5, [r0]
|
||||
mov r1, r9
|
||||
ldr r0, [r1, 0x70]
|
||||
ldrb r0, [r0, 0x9]
|
||||
mov r10, r0
|
||||
adds r0, r6, 0
|
||||
bl GetMoveType
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r6, 0
|
||||
mov r1, r8
|
||||
bl sub_8057600
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
add r1, sp, 0x18
|
||||
str r1, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
str r0, [sp, 0x8]
|
||||
str r5, [sp, 0xC]
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0x10]
|
||||
str r5, [sp, 0x14]
|
||||
mov r0, r9
|
||||
adds r1, r7, 0
|
||||
mov r2, r10
|
||||
movs r3, 0x1
|
||||
bl sub_806F370
|
||||
add r1, sp, 0x18
|
||||
movs r2, 0
|
||||
adds r0, r1, 0
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08059A90
|
||||
movs r2, 0x1
|
||||
_08059A90:
|
||||
strb r2, [r1]
|
||||
add r0, sp, 0x18
|
||||
ldrb r0, [r0]
|
||||
add sp, 0x1C
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8059A2C
|
||||
|
||||
thumb_func_start sub_8059AA8
|
||||
sub_8059AA8:
|
||||
push {lr}
|
||||
movs r2, 0x1
|
||||
bl ConfuseStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8059AA8
|
||||
|
||||
thumb_func_start sub_8059AB8
|
||||
sub_8059AB8:
|
||||
push {lr}
|
||||
bl TauntStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8059AB8
|
||||
|
||||
thumb_func_start sub_8059AC4
|
||||
sub_8059AC4:
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
adds r6, r1, 0
|
||||
ldr r4, _08059AF4
|
||||
bl GetApparentWeather
|
||||
lsls r0, 24
|
||||
lsrs r0, 23
|
||||
adds r0, r4
|
||||
movs r1, 0
|
||||
ldrsh r2, [r0, r1]
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r3, 0
|
||||
bl HealTargetHP
|
||||
movs r0, 0x1
|
||||
add sp, 0x4
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059AF4: .4byte gUnknown_80F501A
|
||||
thumb_func_end sub_8059AC4
|
||||
|
||||
thumb_func_start sub_8059AF8
|
||||
sub_8059AF8:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0x1C
|
||||
mov r9, r0
|
||||
adds r6, r1, 0
|
||||
adds r5, r2, 0
|
||||
mov r8, r3
|
||||
movs r7, 0
|
||||
add r0, sp, 0x18
|
||||
strb r7, [r0]
|
||||
adds r0, r5, 0
|
||||
bl GetMoveType
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r0, r6, 0
|
||||
bl sub_806F4A4
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08059B3C
|
||||
ldr r0, _08059B38
|
||||
ldr r2, [r0]
|
||||
mov r0, r9
|
||||
adds r1, r6, 0
|
||||
bl sub_80522F4
|
||||
movs r0, 0
|
||||
b _08059B82
|
||||
.align 2, 0
|
||||
_08059B38: .4byte gUnknown_80FEB90
|
||||
_08059B3C:
|
||||
adds r0, r5, 0
|
||||
bl GetMoveType
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r5, 0
|
||||
mov r1, r8
|
||||
bl sub_8057600
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
ldr r2, _08059B90
|
||||
add r1, sp, 0x18
|
||||
str r1, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
str r0, [sp, 0x8]
|
||||
str r7, [sp, 0xC]
|
||||
str r7, [sp, 0x10]
|
||||
str r7, [sp, 0x14]
|
||||
mov r0, r9
|
||||
adds r1, r6, 0
|
||||
movs r3, 0x1
|
||||
bl sub_806F370
|
||||
add r1, sp, 0x18
|
||||
movs r2, 0
|
||||
adds r0, r1, 0
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08059B7C
|
||||
movs r2, 0x1
|
||||
_08059B7C:
|
||||
strb r2, [r1]
|
||||
add r0, sp, 0x18
|
||||
ldrb r0, [r0]
|
||||
_08059B82:
|
||||
add sp, 0x1C
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059B90: .4byte 0x0000270f
|
||||
thumb_func_end sub_8059AF8
|
||||
|
||||
thumb_func_start sub_8059B94
|
||||
sub_8059B94:
|
||||
push {lr}
|
||||
ldr r2, _08059BA8
|
||||
ldr r2, [r2]
|
||||
movs r3, 0x2
|
||||
bl RaiseAttackStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059BA8: .4byte gUnknown_8106A4C
|
||||
thumb_func_end sub_8059B94
|
||||
|
||||
thumb_func_start sub_8059BAC
|
||||
sub_8059BAC:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x10
|
||||
mov r10, r0
|
||||
adds r5, r1, 0
|
||||
movs r0, 0
|
||||
mov r8, r0
|
||||
ldr r7, [r5, 0x70]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x25
|
||||
bl HasAbility
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08059BD8
|
||||
ldr r0, _08059BD4
|
||||
b _08059C5E
|
||||
.align 2, 0
|
||||
_08059BD4: .4byte gPtrForecastPreventsTypeSwitchMessage
|
||||
_08059BD8:
|
||||
movs r1, 0x8C
|
||||
lsls r1, 1
|
||||
adds r4, r7, r1
|
||||
mov r9, sp
|
||||
movs r6, 0x3
|
||||
_08059BE2:
|
||||
ldrb r1, [r4]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _08059C08
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl GetMoveTypeForMonster
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08059C08
|
||||
mov r0, r9
|
||||
adds r0, 0x4
|
||||
mov r9, r0
|
||||
subs r0, 0x4
|
||||
stm r0!, {r4}
|
||||
movs r1, 0x1
|
||||
add r8, r1
|
||||
_08059C08:
|
||||
adds r4, 0x8
|
||||
subs r6, 0x1
|
||||
cmp r6, 0
|
||||
bge _08059BE2
|
||||
mov r0, r8
|
||||
cmp r0, 0
|
||||
beq _08059C5C
|
||||
bl DungeonRandInt
|
||||
lsls r0, 2
|
||||
mov r1, sp
|
||||
adds r4, r1, r0
|
||||
ldr r1, [r4]
|
||||
adds r0, r5, 0
|
||||
bl GetMoveTypeForMonster
|
||||
adds r1, r7, 0
|
||||
adds r1, 0x5C
|
||||
movs r2, 0
|
||||
strb r0, [r1]
|
||||
adds r0, r7, 0
|
||||
adds r0, 0x5D
|
||||
strb r2, [r0]
|
||||
adds r1, 0x9A
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
ldr r0, _08059C54
|
||||
ldr r1, [r4]
|
||||
bl sub_80928C0
|
||||
ldr r0, _08059C58
|
||||
ldr r2, [r0]
|
||||
mov r0, r10
|
||||
adds r1, r5, 0
|
||||
bl sub_80522F4
|
||||
movs r0, 0x1
|
||||
b _08059C6A
|
||||
.align 2, 0
|
||||
_08059C54: .4byte gUnknown_202DE58
|
||||
_08059C58: .4byte gUnknown_80FE330
|
||||
_08059C5C:
|
||||
ldr r0, _08059C7C
|
||||
_08059C5E:
|
||||
ldr r2, [r0]
|
||||
mov r0, r10
|
||||
adds r1, r5, 0
|
||||
bl sub_80522F4
|
||||
movs r0, 0
|
||||
_08059C6A:
|
||||
add sp, 0x10
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059C7C: .4byte gUnknown_80FE36C
|
||||
thumb_func_end sub_8059BAC
|
||||
|
||||
thumb_func_start sub_8059C80
|
||||
sub_8059C80:
|
||||
push {lr}
|
||||
bl Conversion2StatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8059C80
|
||||
|
||||
thumb_func_start HelpingHandMoveAction
|
||||
HelpingHandMoveAction:
|
||||
push {r4-r6,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
movs r6, 0
|
||||
cmp r5, r4
|
||||
bne _08059CA8
|
||||
ldr r0, _08059CA4
|
||||
ldr r2, [r0]
|
||||
adds r0, r4, 0
|
||||
bl sub_80522F4
|
||||
b _08059CC6
|
||||
.align 2, 0
|
||||
_08059CA4: .4byte gUnknown_80FEB60
|
||||
_08059CA8:
|
||||
ldr r0, _08059CD0
|
||||
ldr r2, [r0]
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r3, 0x1
|
||||
bl RaiseAttackStageTarget
|
||||
ldr r0, _08059CD4
|
||||
ldr r2, [r0]
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r3, 0x1
|
||||
bl RaiseAttackStageTarget
|
||||
movs r6, 0x1
|
||||
_08059CC6:
|
||||
adds r0, r6, 0
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059CD0: .4byte gUnknown_8106A4C
|
||||
_08059CD4: .4byte gUnknown_8106A50
|
||||
thumb_func_end HelpingHandMoveAction
|
||||
|
||||
thumb_func_start sub_8059CD8
|
||||
sub_8059CD8:
|
||||
push {lr}
|
||||
ldr r2, _08059CEC
|
||||
ldr r2, [r2]
|
||||
movs r3, 0x2
|
||||
bl RaiseDefenseStageTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059CEC: .4byte gUnknown_8106A4C
|
||||
thumb_func_end sub_8059CD8
|
||||
|
||||
thumb_func_start sub_8059CF0
|
||||
sub_8059CF0:
|
||||
push {lr}
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_807D148
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8059CF0
|
||||
|
||||
thumb_func_start sub_8059D00
|
||||
sub_8059D00:
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
adds r6, r1, 0
|
||||
movs r7, 0
|
||||
movs r4, 0x80
|
||||
lsls r4, 1
|
||||
str r3, [sp]
|
||||
adds r3, r4, 0
|
||||
bl sub_8055640
|
||||
cmp r0, 0
|
||||
beq _08059D3A
|
||||
movs r7, 0x1
|
||||
ldr r0, _08059D44
|
||||
movs r1, 0
|
||||
ldrsh r2, [r0, r1]
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
bl sub_805727C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08059D3A
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl ParalyzeStatusTarget
|
||||
_08059D3A:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059D44: .4byte gUnknown_80F4DE2
|
||||
thumb_func_end sub_8059D00
|
||||
|
||||
thumb_func_start sub_8059D48
|
||||
sub_8059D48:
|
||||
push {lr}
|
||||
movs r2, 0x1
|
||||
bl ParalyzeStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8059D48
|
||||
|
||||
thumb_func_start sub_8059D58
|
||||
sub_8059D58:
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
adds r6, r1, 0
|
||||
movs r7, 0
|
||||
movs r4, 0x80
|
||||
lsls r4, 1
|
||||
str r3, [sp]
|
||||
adds r3, r4, 0
|
||||
bl sub_8055640
|
||||
cmp r0, 0
|
||||
beq _08059D8E
|
||||
movs r7, 0x1
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_805727C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08059D8E
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl ParalyzeStatusTarget
|
||||
_08059D8E:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8059D58
|
||||
|
||||
thumb_func_start sub_8059D98
|
||||
sub_8059D98:
|
||||
push {lr}
|
||||
bl ImmobilizedStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8059D98
|
||||
|
||||
thumb_func_start sub_8059DA4
|
||||
sub_8059DA4:
|
||||
push {lr}
|
||||
movs r2, 0x1
|
||||
bl PoisonedStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8059DA4
|
||||
|
||||
thumb_func_start sub_8059DB4
|
||||
sub_8059DB4:
|
||||
push {lr}
|
||||
movs r2, 0x1
|
||||
bl BadlyPoisonedStatusTarget
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8059DB4
|
||||
|
||||
thumb_func_start sub_8059DC4
|
||||
sub_8059DC4:
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
adds r6, r1, 0
|
||||
movs r7, 0
|
||||
movs r4, 0x80
|
||||
lsls r4, 1
|
||||
str r3, [sp]
|
||||
adds r3, r4, 0
|
||||
bl sub_8055640
|
||||
cmp r0, 0
|
||||
beq _08059DFE
|
||||
movs r7, 0x1
|
||||
ldr r0, _08059E08
|
||||
movs r1, 0
|
||||
ldrsh r2, [r0, r1]
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
bl sub_805727C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08059DFE
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl BadlyPoisonedStatusTarget
|
||||
_08059DFE:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059E08: .4byte gUnknown_80F4DCA
|
||||
thumb_func_end sub_8059DC4
|
||||
|
||||
thumb_func_start sub_8059E0C
|
||||
sub_8059E0C:
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
adds r6, r1, 0
|
||||
movs r7, 0
|
||||
movs r4, 0x80
|
||||
lsls r4, 1
|
||||
str r3, [sp]
|
||||
adds r3, r4, 0
|
||||
bl sub_8055640
|
||||
cmp r0, 0
|
||||
beq _08059E46
|
||||
movs r7, 0x1
|
||||
ldr r0, _08059E50
|
||||
movs r1, 0
|
||||
ldrsh r2, [r0, r1]
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
bl sub_805727C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08059E46
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl PoisonedStatusTarget
|
||||
_08059E46:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059E50: .4byte gUnknown_80F4DBE
|
||||
thumb_func_end sub_8059E0C
|
||||
|
||||
thumb_func_start sub_8059E54
|
||||
sub_8059E54:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0x2C
|
||||
adds r6, r0, 0
|
||||
mov r8, r1
|
||||
adds r7, r2, 0
|
||||
adds r1, r3, 0
|
||||
ldr r0, [sp, 0x48]
|
||||
lsls r0, 24
|
||||
movs r2, 0
|
||||
mov r9, r2
|
||||
cmp r0, 0
|
||||
bne _08059E8A
|
||||
movs r3, 0x80
|
||||
lsls r3, 1
|
||||
str r1, [sp]
|
||||
adds r0, r6, 0
|
||||
mov r1, r8
|
||||
adds r2, r7, 0
|
||||
bl sub_8055640
|
||||
negs r1, r0
|
||||
orrs r1, r0
|
||||
lsrs r1, 31
|
||||
mov r9, r1
|
||||
_08059E8A:
|
||||
mov r0, r9
|
||||
cmp r0, 0
|
||||
bne _08059F1A
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
bl GetMoveTypeForMonster
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
bl GetMovePower
|
||||
adds r5, r0, 0
|
||||
adds r0, r7, 0
|
||||
bl GetMoveCritChance
|
||||
str r0, [sp]
|
||||
add r2, sp, 0x18
|
||||
str r2, [sp, 0x4]
|
||||
movs r0, 0x80
|
||||
lsls r0, 1
|
||||
str r0, [sp, 0x8]
|
||||
ldrh r0, [r7, 0x2]
|
||||
str r0, [sp, 0xC]
|
||||
mov r0, r9
|
||||
str r0, [sp, 0x10]
|
||||
adds r0, r6, 0
|
||||
mov r1, r8
|
||||
adds r2, r4, 0
|
||||
adds r3, r5, 0
|
||||
bl sub_806EAF4
|
||||
ldr r0, _08059F2C
|
||||
ldr r1, [r6, 0x70]
|
||||
movs r2, 0
|
||||
bl SetMessageArgument_2
|
||||
ldr r0, _08059F30
|
||||
ldr r2, [r0]
|
||||
adds r0, r6, 0
|
||||
mov r1, r8
|
||||
bl sub_80522F4
|
||||
ldr r0, [sp, 0x18]
|
||||
lsrs r1, r0, 31
|
||||
adds r0, r1
|
||||
asrs r0, 1
|
||||
str r0, [sp, 0x18]
|
||||
cmp r0, 0
|
||||
bne _08059EF6
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0x18]
|
||||
_08059EF6:
|
||||
ldr r2, [sp, 0x18]
|
||||
add r0, sp, 0x28
|
||||
str r0, [sp]
|
||||
mov r0, r9
|
||||
str r0, [sp, 0x4]
|
||||
ldr r0, _08059F34
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x13
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0x10]
|
||||
mov r0, r9
|
||||
str r0, [sp, 0x14]
|
||||
adds r0, r6, 0
|
||||
adds r1, r6, 0
|
||||
movs r3, 0
|
||||
bl sub_806F370
|
||||
_08059F1A:
|
||||
mov r0, r9
|
||||
add sp, 0x2C
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059F2C: .4byte gAvailablePokemonNames
|
||||
_08059F30: .4byte gUnknown_80FC7C8
|
||||
_08059F34: .4byte 0x000001f7
|
||||
thumb_func_end sub_8059E54
|
||||
|
||||
thumb_func_start sub_8059F38
|
||||
sub_8059F38:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
sub sp, 0x4
|
||||
adds r4, r0, 0
|
||||
adds r6, r1, 0
|
||||
adds r5, r2, 0
|
||||
adds r7, r3, 0
|
||||
movs r0, 0
|
||||
mov r8, r0
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl MoveMatchesChargingStatus
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08059FA0
|
||||
ldr r0, _08059F98
|
||||
ldr r3, [r0]
|
||||
str r7, [sp]
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
adds r2, r5, 0
|
||||
bl sub_8055640
|
||||
cmp r0, 0
|
||||
beq _08059F90
|
||||
movs r1, 0x1
|
||||
mov r8, r1
|
||||
ldr r0, _08059F9C
|
||||
movs r1, 0
|
||||
ldrsh r2, [r0, r1]
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
bl sub_805727C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08059F90
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl ParalyzeStatusTarget
|
||||
_08059F90:
|
||||
adds r0, r4, 0
|
||||
bl sub_8079764
|
||||
b _08059FB6
|
||||
.align 2, 0
|
||||
_08059F98: .4byte gUnknown_80F4F60
|
||||
_08059F9C: .4byte gUnknown_80F4DCC
|
||||
_08059FA0:
|
||||
ldr r0, _08059FC4
|
||||
ldr r0, [r0]
|
||||
str r0, [sp]
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x8
|
||||
adds r3, r5, 0
|
||||
bl SetChargeStatusTarget
|
||||
movs r0, 0x1
|
||||
mov r8, r0
|
||||
_08059FB6:
|
||||
mov r0, r8
|
||||
add sp, 0x4
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08059FC4: .4byte gUnknown_80FAD10
|
||||
thumb_func_end sub_8059F38
|
||||
|
||||
thumb_func_start sub_8059FC8
|
||||
sub_8059FC8:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0x2C
|
||||
adds r6, r0, 0
|
||||
mov r8, r1
|
||||
adds r7, r2, 0
|
||||
adds r1, r3, 0
|
||||
ldr r0, [sp, 0x48]
|
||||
lsls r0, 24
|
||||
movs r2, 0
|
||||
mov r9, r2
|
||||
cmp r0, 0
|
||||
bne _08059FFE
|
||||
movs r3, 0x80
|
||||
lsls r3, 2
|
||||
str r1, [sp]
|
||||
adds r0, r6, 0
|
||||
mov r1, r8
|
||||
adds r2, r7, 0
|
||||
bl sub_8055640
|
||||
negs r1, r0
|
||||
orrs r1, r0
|
||||
lsrs r1, 31
|
||||
mov r9, r1
|
||||
_08059FFE:
|
||||
mov r0, r9
|
||||
cmp r0, 0
|
||||
bne _0805A090
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
bl GetMoveTypeForMonster
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
bl GetMovePower
|
||||
adds r5, r0, 0
|
||||
adds r0, r7, 0
|
||||
bl GetMoveCritChance
|
||||
str r0, [sp]
|
||||
add r2, sp, 0x18
|
||||
str r2, [sp, 0x4]
|
||||
movs r0, 0x80
|
||||
lsls r0, 2
|
||||
str r0, [sp, 0x8]
|
||||
ldrh r0, [r7, 0x2]
|
||||
str r0, [sp, 0xC]
|
||||
mov r0, r9
|
||||
str r0, [sp, 0x10]
|
||||
adds r0, r6, 0
|
||||
mov r1, r8
|
||||
adds r2, r4, 0
|
||||
adds r3, r5, 0
|
||||
bl sub_806EAF4
|
||||
ldr r0, _0805A0A0
|
||||
ldr r1, [r6, 0x70]
|
||||
movs r2, 0
|
||||
bl SetMessageArgument_2
|
||||
ldr r0, _0805A0A4
|
||||
ldr r2, [r0]
|
||||
adds r0, r6, 0
|
||||
mov r1, r8
|
||||
bl sub_80522F4
|
||||
ldr r0, [sp, 0x18]
|
||||
lsrs r1, r0, 31
|
||||
adds r0, r1
|
||||
asrs r0, 1
|
||||
str r0, [sp, 0x18]
|
||||
cmp r0, 0
|
||||
bne _0805A06A
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0x18]
|
||||
_0805A06A:
|
||||
ldr r2, [sp, 0x18]
|
||||
add r0, sp, 0x28
|
||||
str r0, [sp]
|
||||
mov r0, r9
|
||||
str r0, [sp, 0x4]
|
||||
movs r0, 0xFC
|
||||
lsls r0, 1
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x13
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0x10]
|
||||
mov r0, r9
|
||||
str r0, [sp, 0x14]
|
||||
adds r0, r6, 0
|
||||
adds r1, r6, 0
|
||||
movs r3, 0
|
||||
bl sub_806F370
|
||||
_0805A090:
|
||||
mov r0, r9
|
||||
add sp, 0x2C
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_0805A0A0: .4byte gAvailablePokemonNames
|
||||
_0805A0A4: .4byte gUnknown_80FC7C8
|
||||
thumb_func_end sub_8059FC8
|
||||
|
||||
thumb_func_start sub_805A0A8
|
||||
sub_805A0A8:
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
adds r6, r1, 0
|
||||
movs r7, 0
|
||||
movs r4, 0x80
|
||||
lsls r4, 1
|
||||
str r3, [sp]
|
||||
adds r3, r4, 0
|
||||
bl sub_8055640
|
||||
cmp r0, 0
|
||||
beq _0805A114
|
||||
movs r7, 0x1
|
||||
ldr r0, _0805A0F8
|
||||
movs r1, 0
|
||||
ldrsh r2, [r0, r1]
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
bl sub_805727C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0805A114
|
||||
movs r0, 0x3
|
||||
bl DungeonRandInt
|
||||
cmp r0, 0x1
|
||||
beq _0805A0FC
|
||||
cmp r0, 0x1
|
||||
ble _0805A0EA
|
||||
cmp r0, 0x2
|
||||
beq _0805A10A
|
||||
_0805A0EA:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl ParalyzeStatusTarget
|
||||
b _0805A114
|
||||
.align 2, 0
|
||||
_0805A0F8: .4byte gUnknown_80F4DFC
|
||||
_0805A0FC:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl BurnedStatusTarget
|
||||
b _0805A114
|
||||
_0805A10A:
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl FrozenStatusTarget
|
||||
_0805A114:
|
||||
adds r0, r7, 0
|
||||
add sp, 0x4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_805A0A8
|
||||
|
||||
.align 2, 0
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ s32 GetMoveBasePower(struct Move *move);
|
|||
s32 GetMoveAccuracyOrAIChance(struct Move *move, u32 accuracyType);
|
||||
u32 GetMoveBasePP(struct Move *move);
|
||||
u32 GetMoveMaxUpgradeLevel(struct Move *move);
|
||||
u8 GetMoveCritChance(struct Move *move);
|
||||
u32 GetMoveCritChance(struct Move *move);
|
||||
bool8 MoveCannotHitFrozen(struct Move *move);
|
||||
bool8 MovesIgnoresTaunted(struct Move *move);
|
||||
u32 GetMoveRangeID(struct Move *move);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
#include "status_actions.h"
|
||||
#include "code_8077274_1.h"
|
||||
#include "code_808417C.h"
|
||||
#include "charge_move.h"
|
||||
#include "weather.h"
|
||||
|
||||
extern u32 gUnknown_202F210;
|
||||
extern u8 gAvailablePokemonNames[];
|
||||
|
|
@ -58,6 +60,16 @@ extern u8 *gUnknown_81004EC[];
|
|||
extern s16 gUnknown_80F4DDA;
|
||||
extern s16 gUnknown_80F4DFE;
|
||||
extern u8 *gUnknown_81004EC[];
|
||||
extern s16 gUnknown_80F4DFC;
|
||||
extern u8 *gUnknown_80FC7C8[];
|
||||
extern u32 gUnknown_80F4F60;
|
||||
extern u8 *gUnknown_80FAD10[];
|
||||
extern s16 gUnknown_80F4DCC;
|
||||
extern s16 gUnknown_80F4DBE;
|
||||
extern s16 gUnknown_80F4DCA;
|
||||
extern s16 gUnknown_80F4DE2;
|
||||
extern u8 *gUnknown_80FEB90[];
|
||||
extern s16 gUnknown_80F501A[];
|
||||
|
||||
extern u32 sub_8055864(struct Entity *pokemon, struct Entity *target, struct Move *param_3, s32 param_4, s32 param_5);
|
||||
extern void sub_80943A0(void*, s32);
|
||||
|
|
@ -80,6 +92,7 @@ extern void sub_80694C0(struct Entity *, s32, s32, u32);
|
|||
bool8 sub_80706A4(struct Entity *pokemon, struct Position *pos);
|
||||
extern void sub_807D148(struct Entity *pokemon, struct Entity *target, u32 r2, struct Position *r3);
|
||||
extern void SetMessageArgument(u8 *buffer, struct Entity *r1, u32);
|
||||
extern void SetMessageArgument_2(u8 *buffer, struct EntityInfo *r1, u32);
|
||||
void sub_80522F4(struct Entity *r0, struct Entity *r1, char r2[]);
|
||||
extern void sub_806A6E8(struct Entity *);
|
||||
extern u32 sub_8055640(struct Entity *, struct Entity *, struct Move *, u32, u32);
|
||||
|
|
@ -92,6 +105,345 @@ extern u8 sub_8057308(struct Entity *, u32);
|
|||
extern void sub_805A7D4(struct Entity *, struct Entity *, struct Item *, struct Position *);
|
||||
extern void sub_8045394(struct Entity *, s32, s32);
|
||||
extern void sub_804652C(struct Entity *, struct Entity *, struct Item *, u32, struct Position *);
|
||||
extern void sub_806EAF4(struct Entity *, struct Entity *, u8, u32, u32, s32 *, u32, u16, u32);
|
||||
extern u8 *gUnknown_80FEB60[];
|
||||
extern u8 *gUnknown_80FE330[];
|
||||
extern u8 *gUnknown_80FE36C[];
|
||||
extern u8 *gPtrForecastPreventsTypeSwitchMessage[];
|
||||
|
||||
struct unkStruct_80928C0
|
||||
{
|
||||
u32 unk0;
|
||||
s32 unk4;
|
||||
u8 unk8;
|
||||
u8 unk9;
|
||||
};
|
||||
|
||||
void sub_80928C0(u8 *buffer, struct Move *move, struct unkStruct_80928C0 *param_3);
|
||||
extern u8 sub_806F4A4(struct Entity *, u32);
|
||||
|
||||
|
||||
bool8 sub_8059A2C(struct Entity * pokemon,struct Entity * target,struct Move * move,u32 param_4)
|
||||
{
|
||||
u8 local_20;
|
||||
u32 level;
|
||||
|
||||
local_20 = 0;
|
||||
level = pokemon->info->level;
|
||||
sub_806F370(pokemon,target,level,1,&local_20,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
|
||||
local_20 = local_20 == 0;
|
||||
return local_20;
|
||||
}
|
||||
|
||||
|
||||
bool8 sub_8059AA8(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
ConfuseStatusTarget(pokemon, target, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059AB8(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
TauntStatusTarget(pokemon, target);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059AC4(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
HealTargetHP(pokemon, target, gUnknown_80F501A[GetApparentWeather(pokemon)], 0, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059AF8(struct Entity * pokemon,struct Entity * target,struct Move * move,u32 param_4)
|
||||
{
|
||||
u8 local_20;
|
||||
|
||||
local_20 = 0;
|
||||
if (sub_806F4A4(target,GetMoveType(move)) == 0) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FEB90);
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
sub_806F370(pokemon,target,9999,1,&local_20,GetMoveType(move),sub_8057600(move,param_4),0,0,0);
|
||||
local_20 = local_20 == 0;
|
||||
return local_20;
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_8059B94(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 2);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059BAC(struct Entity * pokemon,struct Entity * target,struct Move * move,u32 param_4)
|
||||
{
|
||||
u8 moveType;
|
||||
struct Move *movePtr;
|
||||
s32 index;
|
||||
struct EntityInfo * info;
|
||||
s32 counter;
|
||||
s32 newIndex;
|
||||
struct Move *moveStack [MAX_MON_MOVES];
|
||||
|
||||
counter = 0;
|
||||
info = target->info;
|
||||
if (HasAbility(target, 0x25)) {
|
||||
sub_80522F4(pokemon,target,*gPtrForecastPreventsTypeSwitchMessage);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
for(index = 0; index < MAX_MON_MOVES; index++)
|
||||
{
|
||||
movePtr = &info->moves[index];
|
||||
if (((movePtr->moveFlags & MOVE_FLAG_EXISTS)) && (GetMoveTypeForMonster(target,movePtr) != TYPE_NONE)) {
|
||||
moveStack[counter] = movePtr;
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
if (counter == 0) {
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FE36C);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
newIndex = DungeonRandInt(counter);
|
||||
moveType = GetMoveTypeForMonster(target,moveStack[newIndex]);
|
||||
info->types[0] = moveType;
|
||||
info->types[1] = TYPE_NONE;
|
||||
info->isColorChanged = TRUE;
|
||||
sub_80928C0(gUnknown_202DE58, moveStack[newIndex], NULL);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FE330);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_8059C80(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
Conversion2StatusTarget(pokemon, target);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 HelpingHandMoveAction(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
bool8 flag;
|
||||
flag = FALSE;
|
||||
if(pokemon == target)
|
||||
{
|
||||
sub_80522F4(target, target, *gUnknown_80FEB60);
|
||||
}
|
||||
else {
|
||||
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A4C, 1);
|
||||
RaiseAttackStageTarget(pokemon, target, gUnknown_8106A50, 1);
|
||||
flag = TRUE;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool8 sub_8059CD8(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
RaiseDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 2);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059CF0(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
sub_807D148(pokemon, target, 0, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059D00(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
bool8 flag;
|
||||
|
||||
flag = FALSE;
|
||||
if (sub_8055640(pokemon,target,move,0x100,param_4) != 0) {
|
||||
flag = TRUE;
|
||||
if(sub_805727C(pokemon, target, gUnknown_80F4DE2))
|
||||
{
|
||||
ParalyzeStatusTarget(pokemon, target, FALSE);
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool8 sub_8059D48(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
ParalyzeStatusTarget(pokemon, target, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059D58(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
bool8 flag;
|
||||
|
||||
flag = FALSE;
|
||||
if (sub_8055640(pokemon,target,move,0x100,param_4) != 0) {
|
||||
flag = TRUE;
|
||||
if(sub_805727C(pokemon, target, 0))
|
||||
{
|
||||
ParalyzeStatusTarget(pokemon, target, FALSE);
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool8 sub_8059D98(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
ImmobilizedStatusTarget(pokemon, target);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059DA4(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
PoisonedStatusTarget(pokemon, target, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059DB4(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
BadlyPoisonedStatusTarget(pokemon, target, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8059DC4(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
bool8 flag;
|
||||
|
||||
flag = FALSE;
|
||||
if (sub_8055640(pokemon,target,move,0x100,param_4) != 0) {
|
||||
flag = TRUE;
|
||||
if(sub_805727C(pokemon, target, gUnknown_80F4DCA))
|
||||
{
|
||||
BadlyPoisonedStatusTarget(pokemon, target, FALSE);
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool8 sub_8059E0C(struct Entity *pokemon, struct Entity *target, struct Move *move, u32 param_4)
|
||||
{
|
||||
bool8 flag;
|
||||
|
||||
flag = FALSE;
|
||||
if (sub_8055640(pokemon,target,move,0x100,param_4) != 0) {
|
||||
flag = TRUE;
|
||||
if(sub_805727C(pokemon, target, gUnknown_80F4DBE))
|
||||
{
|
||||
PoisonedStatusTarget(pokemon, target, FALSE);
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool8 sub_8059E54(struct Entity * pokemon,struct Entity * target,struct Move * move,u32 param_4,u8 param_5)
|
||||
{
|
||||
u8 moveType;
|
||||
u32 movePower;
|
||||
u32 moveCritChance;
|
||||
bool8 flag;
|
||||
s32 local_30 [4];
|
||||
u8 auStack_20;
|
||||
|
||||
flag = FALSE;
|
||||
if (param_5 == 0) {
|
||||
flag = sub_8055640(pokemon,target,move,0x100,param_4) != 0 ? TRUE : FALSE;
|
||||
}
|
||||
if (!flag) {
|
||||
moveType = GetMoveTypeForMonster(pokemon,move);
|
||||
movePower = GetMovePower(pokemon,move);
|
||||
moveCritChance = GetMoveCritChance(move);
|
||||
sub_806EAF4(pokemon,target,moveType,movePower,moveCritChance,local_30,0x100,move->id,0);
|
||||
SetMessageArgument_2(gAvailablePokemonNames,pokemon->info,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC7C8);
|
||||
local_30[0] = local_30[0] / 2;
|
||||
if (local_30[0] == 0) {
|
||||
local_30[0] = 1;
|
||||
}
|
||||
sub_806F370(pokemon,pokemon,local_30[0],0,&auStack_20,0,0x1f7,0x13,1,0);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool8 sub_8059F38(struct Entity * pokemon,struct Entity * target,struct Move * move,u32 param_4)
|
||||
{
|
||||
bool8 flag;
|
||||
|
||||
flag = FALSE;
|
||||
if (MoveMatchesChargingStatus(pokemon, move)) {
|
||||
if (sub_8055640(pokemon, target, move, gUnknown_80F4F60, param_4) != 0) {
|
||||
flag = TRUE;
|
||||
if (sub_805727C(pokemon, target, gUnknown_80F4DCC) != 0) {
|
||||
ParalyzeStatusTarget(pokemon, target, FALSE);
|
||||
}
|
||||
}
|
||||
sub_8079764(pokemon);
|
||||
}
|
||||
else {
|
||||
SetChargeStatusTarget(pokemon, pokemon, 8, move, *gUnknown_80FAD10);
|
||||
flag = TRUE;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool8 sub_8059FC8(struct Entity * pokemon,struct Entity * target,struct Move * move,u32 param_4,u8 param_5)
|
||||
{
|
||||
u8 moveType;
|
||||
u32 movePower;
|
||||
u32 moveCritChance;
|
||||
bool8 flag;
|
||||
s32 local_30 [4];
|
||||
u8 auStack_20;
|
||||
|
||||
flag = FALSE;
|
||||
if (param_5 == 0) {
|
||||
flag = sub_8055640(pokemon,target,move,0x200,param_4) != 0 ? TRUE : FALSE;
|
||||
}
|
||||
if (!flag) {
|
||||
moveType = GetMoveTypeForMonster(pokemon,move);
|
||||
movePower = GetMovePower(pokemon,move);
|
||||
moveCritChance = GetMoveCritChance(move);
|
||||
sub_806EAF4(pokemon,target,moveType,movePower,moveCritChance,local_30,0x200,move->id,0);
|
||||
SetMessageArgument_2(gAvailablePokemonNames,pokemon->info,0);
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FC7C8);
|
||||
local_30[0] = local_30[0] / 2;
|
||||
if (local_30[0] == 0) {
|
||||
local_30[0] = 1;
|
||||
}
|
||||
sub_806F370(pokemon,pokemon,local_30[0],0,&auStack_20,0,0x1f8,0x13,1,0);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool8 sub_805A0A8(struct Entity * pokemon, struct Entity * target, struct Move *move, u32 param_4)
|
||||
{
|
||||
bool8 flag;
|
||||
|
||||
flag = FALSE;
|
||||
if(sub_8055640(pokemon, target, move, 0x100, param_4))
|
||||
{
|
||||
flag = TRUE;
|
||||
if(sub_805727C(pokemon, target, gUnknown_80F4DFC))
|
||||
{
|
||||
switch(DungeonRandInt(3))
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
ParalyzeStatusTarget(pokemon, target, FALSE);
|
||||
break;
|
||||
case 1:
|
||||
BurnedStatusTarget(pokemon, target, 0, FALSE);
|
||||
break;
|
||||
case 2:
|
||||
FrozenStatusTarget(pokemon, target, FALSE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool8 sub_805A120(struct Entity * pokemon,struct Entity * target, struct Move *move, u32 param_4)
|
||||
{
|
||||
|
|
@ -168,7 +520,6 @@ bool8 sub_805A23C(struct Entity * pokemon, struct Entity * target, struct Move *
|
|||
if(move->id == MOVE_MUD_SPORT)
|
||||
{
|
||||
sub_807EA30(0);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -617,10 +968,8 @@ bool8 sub_805AAE0(struct Entity * pokemon,struct Entity * target, struct Move *m
|
|||
u32 *belly;
|
||||
u32 newBelly;
|
||||
struct EntityInfo *info;
|
||||
|
||||
bool8 flag;
|
||||
|
||||
|
||||
info = pokemon->info;
|
||||
flag = FALSE;
|
||||
belly = &info->belly;
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ u32 GetMoveMaxUpgradeLevel(struct Move *move)
|
|||
return gMovesData[move->id].maxUpgradeLevel;
|
||||
}
|
||||
|
||||
u8 GetMoveCritChance(struct Move *move)
|
||||
u32 GetMoveCritChance(struct Move *move)
|
||||
{
|
||||
return gMovesData[move->id].critChance;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user