mirror of
https://github.com/pret/pokeruby.git
synced 2024-11-23 13:09:40 +00:00
label, document, reorganize, and clean up battle_ai.c (#228)
label, document, reorganize, and clean up battle_ai.c
This commit is contained in:
parent
9813caaf53
commit
c22eb152ce
@ -31309,7 +31309,7 @@ sub_80D97CC: @ 80D97CC
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r0, 0
|
||||
bne _080D9828
|
||||
ldr r4, _080D981C @ =gUnknown_02024C07
|
||||
ldr r4, _080D981C @ =gPlayerMonIndex
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_8077ABC
|
||||
@ -31338,7 +31338,7 @@ sub_80D97CC: @ 80D97CC
|
||||
b _080D9844
|
||||
.align 2, 0
|
||||
_080D9818: .4byte gBattleAnimArgs
|
||||
_080D981C: .4byte gUnknown_02024C07
|
||||
_080D981C: .4byte gPlayerMonIndex
|
||||
_080D9820: .4byte gUnknown_0202F7C8
|
||||
_080D9824: .4byte gUnknown_0202F7C9
|
||||
_080D9828:
|
||||
@ -31614,7 +31614,7 @@ sub_80D9A38: @ 80D9A38
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r0, 0
|
||||
bne _080D9A7C
|
||||
ldr r4, _080D9A70 @ =gUnknown_02024C07
|
||||
ldr r4, _080D9A70 @ =gPlayerMonIndex
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_8077ABC
|
||||
@ -31633,7 +31633,7 @@ sub_80D9A38: @ 80D9A38
|
||||
b _080D9A82
|
||||
.align 2, 0
|
||||
_080D9A6C: .4byte gBattleAnimArgs
|
||||
_080D9A70: .4byte gUnknown_02024C07
|
||||
_080D9A70: .4byte gPlayerMonIndex
|
||||
_080D9A74: .4byte gUnknown_0202F7C9
|
||||
_080D9A78: .4byte gUnknown_0202F7C8
|
||||
_080D9A7C:
|
||||
@ -43672,7 +43672,7 @@ sub_80DF78C: @ 80DF78C
|
||||
ldr r0, _080DF7E4 @ =gBattleAnimArgs
|
||||
ldrh r0, [r0]
|
||||
strh r0, [r6, 0x3A]
|
||||
ldr r4, _080DF7E8 @ =gUnknown_02024C07
|
||||
ldr r4, _080DF7E8 @ =gPlayerMonIndex
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_807A100
|
||||
@ -43690,7 +43690,7 @@ sub_80DF78C: @ 80DF78C
|
||||
.align 2, 0
|
||||
_080DF7E0: .4byte gUnknown_0202F7C8
|
||||
_080DF7E4: .4byte gBattleAnimArgs
|
||||
_080DF7E8: .4byte gUnknown_02024C07
|
||||
_080DF7E8: .4byte gPlayerMonIndex
|
||||
_080DF7EC:
|
||||
lsrs r0, r1, 17
|
||||
_080DF7EE:
|
||||
@ -53227,7 +53227,7 @@ sub_80E4234: @ 80E4234
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, _080E4254 @ =gUnknown_0202F7C8
|
||||
ldr r1, _080E4258 @ =gUnknown_02024C08
|
||||
ldr r1, _080E4258 @ =gEnemyMonIndex
|
||||
ldrb r1, [r1]
|
||||
strb r1, [r2]
|
||||
ldr r2, _080E425C @ =gUnknown_0202F7C9
|
||||
@ -53239,7 +53239,7 @@ sub_80E4234: @ 80E4234
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080E4254: .4byte gUnknown_0202F7C8
|
||||
_080E4258: .4byte gUnknown_02024C08
|
||||
_080E4258: .4byte gEnemyMonIndex
|
||||
_080E425C: .4byte gUnknown_0202F7C9
|
||||
_080E4260: .4byte gUnknown_02024C0A
|
||||
thumb_func_end sub_80E4234
|
||||
@ -53287,7 +53287,7 @@ sub_80E42B0: @ 80E42B0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, _080E42C8 @ =gUnknown_0202F7C9
|
||||
ldr r1, _080E42CC @ =gUnknown_02024C08
|
||||
ldr r1, _080E42CC @ =gEnemyMonIndex
|
||||
ldrb r1, [r1]
|
||||
strb r1, [r2]
|
||||
bl move_anim_task_del
|
||||
@ -53295,7 +53295,7 @@ sub_80E42B0: @ 80E42B0
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080E42C8: .4byte gUnknown_0202F7C9
|
||||
_080E42CC: .4byte gUnknown_02024C08
|
||||
_080E42CC: .4byte gEnemyMonIndex
|
||||
thumb_func_end sub_80E42B0
|
||||
|
||||
thumb_func_start sub_80E42D0
|
||||
@ -53304,7 +53304,7 @@ sub_80E42D0: @ 80E42D0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, _080E42F0 @ =gUnknown_0202F7C8
|
||||
ldr r1, _080E42F4 @ =gUnknown_02024C07
|
||||
ldr r1, _080E42F4 @ =gPlayerMonIndex
|
||||
ldrb r1, [r1]
|
||||
strb r1, [r2]
|
||||
ldr r2, _080E42F8 @ =gUnknown_0202F7C9
|
||||
@ -53316,7 +53316,7 @@ sub_80E42D0: @ 80E42D0
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080E42F0: .4byte gUnknown_0202F7C8
|
||||
_080E42F4: .4byte gUnknown_02024C07
|
||||
_080E42F4: .4byte gPlayerMonIndex
|
||||
_080E42F8: .4byte gUnknown_0202F7C9
|
||||
_080E42FC: .4byte gUnknown_02024C0A
|
||||
thumb_func_end sub_80E42D0
|
||||
|
@ -968,7 +968,7 @@ _0812129C: .4byte gUnknown_02024A6A
|
||||
_081212A0: .4byte gLinkPlayers
|
||||
_081212A4: .4byte gEnemyParty
|
||||
_081212A8:
|
||||
ldr r4, _081212CC @ =gUnknown_02024C07
|
||||
ldr r4, _081212CC @ =gPlayerMonIndex
|
||||
ldrb r0, [r4]
|
||||
bl battle_side_get_owner
|
||||
lsls r0, 24
|
||||
@ -985,7 +985,7 @@ _081212A8:
|
||||
ldr r4, _081212D8 @ =gUnknown_08400797
|
||||
b _081212E6
|
||||
.align 2, 0
|
||||
_081212CC: .4byte gUnknown_02024C07
|
||||
_081212CC: .4byte gPlayerMonIndex
|
||||
_081212D0: .4byte gBattleTypeFlags
|
||||
_081212D4: .4byte gUnknown_08400791
|
||||
_081212D8: .4byte gUnknown_08400797
|
||||
@ -1035,7 +1035,7 @@ _0812131C:
|
||||
.align 2, 0
|
||||
_08121338: .4byte gUnknown_02024A6A
|
||||
_0812133C:
|
||||
ldr r4, _08121370 @ =gUnknown_02024C07
|
||||
ldr r4, _08121370 @ =gPlayerMonIndex
|
||||
ldrb r0, [r4]
|
||||
bl battle_side_get_owner
|
||||
lsls r0, 24
|
||||
@ -1059,7 +1059,7 @@ _0812133C:
|
||||
adds r0, r1
|
||||
b _0812190E
|
||||
.align 2, 0
|
||||
_08121370: .4byte gUnknown_02024C07
|
||||
_08121370: .4byte gPlayerMonIndex
|
||||
_08121374: .4byte gUnknown_02024A6A
|
||||
_08121378: .4byte gPlayerParty
|
||||
_0812137C:
|
||||
@ -1083,7 +1083,7 @@ _0812137C:
|
||||
_081213A0: .4byte gUnknown_02024A6A
|
||||
_081213A4: .4byte gEnemyParty
|
||||
_081213A8:
|
||||
ldr r5, _081213F4 @ =gUnknown_02024C07
|
||||
ldr r5, _081213F4 @ =gPlayerMonIndex
|
||||
ldrb r0, [r5]
|
||||
bl battle_side_get_owner
|
||||
lsls r0, 24
|
||||
@ -1123,7 +1123,7 @@ _081213E8:
|
||||
ldrh r1, [r0]
|
||||
b _08121908
|
||||
.align 2, 0
|
||||
_081213F4: .4byte gUnknown_02024C07
|
||||
_081213F4: .4byte gPlayerMonIndex
|
||||
_081213F8: .4byte gBattleTypeFlags
|
||||
_081213FC: .4byte gUnknown_08400791
|
||||
_08121400: .4byte gUnknown_08400797
|
||||
@ -1139,7 +1139,7 @@ _0812140C:
|
||||
.align 2, 0
|
||||
_08121418: .4byte gUnknown_02024A6A
|
||||
_0812141C:
|
||||
ldr r5, _08121468 @ =gUnknown_02024C08
|
||||
ldr r5, _08121468 @ =gEnemyMonIndex
|
||||
ldrb r0, [r5]
|
||||
bl battle_side_get_owner
|
||||
lsls r0, 24
|
||||
@ -1179,7 +1179,7 @@ _0812145C:
|
||||
ldrh r1, [r0]
|
||||
b _08121908
|
||||
.align 2, 0
|
||||
_08121468: .4byte gUnknown_02024C08
|
||||
_08121468: .4byte gEnemyMonIndex
|
||||
_0812146C: .4byte gBattleTypeFlags
|
||||
_08121470: .4byte gUnknown_08400791
|
||||
_08121474: .4byte gUnknown_08400797
|
||||
@ -1489,18 +1489,18 @@ _081216EC:
|
||||
_081216F0: .4byte byte_2024C06
|
||||
_081216F4:
|
||||
ldr r1, _081216FC @ =gUnknown_0203926C
|
||||
ldr r0, _08121700 @ =gUnknown_02024C07
|
||||
ldr r0, _08121700 @ =gPlayerMonIndex
|
||||
b _08121730
|
||||
.align 2, 0
|
||||
_081216FC: .4byte gUnknown_0203926C
|
||||
_08121700: .4byte gUnknown_02024C07
|
||||
_08121700: .4byte gPlayerMonIndex
|
||||
_08121704:
|
||||
ldr r1, _0812170C @ =gUnknown_0203926C
|
||||
ldr r0, _08121710 @ =gUnknown_02024C08
|
||||
ldr r0, _08121710 @ =gEnemyMonIndex
|
||||
b _08121730
|
||||
.align 2, 0
|
||||
_0812170C: .4byte gUnknown_0203926C
|
||||
_08121710: .4byte gUnknown_02024C08
|
||||
_08121710: .4byte gEnemyMonIndex
|
||||
_08121714:
|
||||
ldr r1, _08121720 @ =gUnknown_0203926C
|
||||
ldr r0, _08121724 @ =0x02000000
|
||||
@ -1805,12 +1805,12 @@ _08121970: .4byte 0x0000084b
|
||||
_08121974: .4byte gUnknown_084009ED
|
||||
_08121978: .4byte gUnknown_084009F7
|
||||
_0812197C:
|
||||
ldr r0, _08121980 @ =gUnknown_02024C07
|
||||
ldr r0, _08121980 @ =gPlayerMonIndex
|
||||
b _08121986
|
||||
.align 2, 0
|
||||
_08121980: .4byte gUnknown_02024C07
|
||||
_08121980: .4byte gPlayerMonIndex
|
||||
_08121984:
|
||||
ldr r0, _08121998 @ =gUnknown_02024C08
|
||||
ldr r0, _08121998 @ =gEnemyMonIndex
|
||||
_08121986:
|
||||
ldrb r0, [r0]
|
||||
bl battle_side_get_owner
|
||||
@ -1821,16 +1821,16 @@ _08121986:
|
||||
ldr r4, _081219A0 @ =gUnknown_084007AC
|
||||
b _081219E6
|
||||
.align 2, 0
|
||||
_08121998: .4byte gUnknown_02024C08
|
||||
_08121998: .4byte gEnemyMonIndex
|
||||
_0812199C: .4byte gUnknown_084007A7
|
||||
_081219A0: .4byte gUnknown_084007AC
|
||||
_081219A4:
|
||||
ldr r0, _081219A8 @ =gUnknown_02024C07
|
||||
ldr r0, _081219A8 @ =gPlayerMonIndex
|
||||
b _081219AE
|
||||
.align 2, 0
|
||||
_081219A8: .4byte gUnknown_02024C07
|
||||
_081219A8: .4byte gPlayerMonIndex
|
||||
_081219AC:
|
||||
ldr r0, _081219C0 @ =gUnknown_02024C08
|
||||
ldr r0, _081219C0 @ =gEnemyMonIndex
|
||||
_081219AE:
|
||||
ldrb r0, [r0]
|
||||
bl battle_side_get_owner
|
||||
@ -1841,16 +1841,16 @@ _081219AE:
|
||||
ldr r4, _081219C8 @ =gUnknown_084007A1
|
||||
b _081219E6
|
||||
.align 2, 0
|
||||
_081219C0: .4byte gUnknown_02024C08
|
||||
_081219C0: .4byte gEnemyMonIndex
|
||||
_081219C4: .4byte gUnknown_0840079C
|
||||
_081219C8: .4byte gUnknown_084007A1
|
||||
_081219CC:
|
||||
ldr r0, _081219D0 @ =gUnknown_02024C07
|
||||
ldr r0, _081219D0 @ =gPlayerMonIndex
|
||||
b _081219D6
|
||||
.align 2, 0
|
||||
_081219D0: .4byte gUnknown_02024C07
|
||||
_081219D0: .4byte gPlayerMonIndex
|
||||
_081219D4:
|
||||
ldr r0, _08121A24 @ =gUnknown_02024C08
|
||||
ldr r0, _08121A24 @ =gEnemyMonIndex
|
||||
_081219D6:
|
||||
ldrb r0, [r0]
|
||||
bl battle_side_get_owner
|
||||
@ -1894,7 +1894,7 @@ _08121A06:
|
||||
adds r6, 0x1
|
||||
b _08121A3C
|
||||
.align 2, 0
|
||||
_08121A24: .4byte gUnknown_02024C08
|
||||
_08121A24: .4byte gEnemyMonIndex
|
||||
_08121A28: .4byte gUnknown_084007B2
|
||||
_08121A2C: .4byte gUnknown_084007B7
|
||||
_08121A30:
|
||||
|
@ -878,9 +878,9 @@ _080AB8CC:
|
||||
strb r2, [r1, 0x3]
|
||||
ldr r0, _080AB92C @ =gBattleTypeFlags
|
||||
strh r4, [r0]
|
||||
ldr r4, _080AB930 @ =gUnknown_02024C07
|
||||
ldr r4, _080AB930 @ =gPlayerMonIndex
|
||||
strb r2, [r4]
|
||||
ldr r0, _080AB934 @ =gUnknown_02024C08
|
||||
ldr r0, _080AB934 @ =gEnemyMonIndex
|
||||
strb r3, [r0]
|
||||
bl sub_80AE858
|
||||
ldr r2, _080AB938 @ =gUnknown_02024BE0
|
||||
@ -893,8 +893,8 @@ _080AB8CC:
|
||||
_080AB924: .4byte 0x02019204
|
||||
_080AB928: .4byte gUnknown_02024A72
|
||||
_080AB92C: .4byte gBattleTypeFlags
|
||||
_080AB930: .4byte gUnknown_02024C07
|
||||
_080AB934: .4byte gUnknown_02024C08
|
||||
_080AB930: .4byte gPlayerMonIndex
|
||||
_080AB934: .4byte gEnemyMonIndex
|
||||
_080AB938: .4byte gUnknown_02024BE0
|
||||
_080AB93C:
|
||||
movs r0, 0
|
||||
@ -2344,7 +2344,7 @@ _080AC542:
|
||||
adds r4, r0
|
||||
strh r5, [r4, 0xC]
|
||||
ldr r1, _080AC5E0 @ =gUnknown_02024BE0
|
||||
ldr r0, _080AC5E4 @ =gUnknown_02024C07
|
||||
ldr r0, _080AC5E4 @ =gPlayerMonIndex
|
||||
ldrb r0, [r0]
|
||||
adds r0, r1
|
||||
strb r5, [r0]
|
||||
@ -2365,7 +2365,7 @@ _080AC5D4: .4byte gSprites
|
||||
_080AC5D8: .4byte sub_80AD8FC
|
||||
_080AC5DC: .4byte gTasks
|
||||
_080AC5E0: .4byte gUnknown_02024BE0
|
||||
_080AC5E4: .4byte gUnknown_02024C07
|
||||
_080AC5E4: .4byte gPlayerMonIndex
|
||||
_080AC5E8:
|
||||
mov r1, r8
|
||||
lsls r0, r1, 2
|
||||
@ -15226,7 +15226,7 @@ sub_80B292C: @ 80B292C
|
||||
bl CreateInvisibleSpriteWithCallback
|
||||
ldr r1, _080B295C @ =gUnknown_02024BE0
|
||||
strb r0, [r1, 0x3]
|
||||
ldr r0, _080B2960 @ =gUnknown_02024C08
|
||||
ldr r0, _080B2960 @ =gEnemyMonIndex
|
||||
ldrb r0, [r0]
|
||||
adds r0, r1
|
||||
ldrb r1, [r0]
|
||||
@ -15242,7 +15242,7 @@ sub_80B292C: @ 80B292C
|
||||
.align 2, 0
|
||||
_080B2958: .4byte SpriteCallbackDummy
|
||||
_080B295C: .4byte gUnknown_02024BE0
|
||||
_080B2960: .4byte gUnknown_02024C08
|
||||
_080B2960: .4byte gEnemyMonIndex
|
||||
_080B2964: .4byte gSprites
|
||||
thumb_func_end sub_80B292C
|
||||
|
||||
@ -15341,20 +15341,20 @@ _080B29DC:
|
||||
.4byte _080B2A6C
|
||||
.4byte _080B2A6C
|
||||
_080B2A60:
|
||||
ldr r1, _080B2A68 @ =gUnknown_02024C08
|
||||
ldr r1, _080B2A68 @ =gEnemyMonIndex
|
||||
movs r0, 0x2
|
||||
b _080B2A70
|
||||
.align 2, 0
|
||||
_080B2A68: .4byte gUnknown_02024C08
|
||||
_080B2A68: .4byte gEnemyMonIndex
|
||||
_080B2A6C:
|
||||
ldr r1, _080B2A78 @ =gUnknown_02024C08
|
||||
ldr r1, _080B2A78 @ =gEnemyMonIndex
|
||||
movs r0, 0x3
|
||||
_080B2A70:
|
||||
strb r0, [r1]
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080B2A78: .4byte gUnknown_02024C08
|
||||
_080B2A78: .4byte gEnemyMonIndex
|
||||
thumb_func_end sub_80B29B4
|
||||
|
||||
thumb_func_start sub_80B2A7C
|
||||
|
@ -1,21 +1,24 @@
|
||||
.macro if_random percent, address
|
||||
.macro if_random_less_than percent, address
|
||||
.byte 0x00
|
||||
.byte \percent
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_random percent, address
|
||||
@ unused
|
||||
.macro if_random_greater_than percent, address
|
||||
.byte 0x01
|
||||
.byte \percent
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_random_1 address
|
||||
@ unused
|
||||
.macro if_random_equal address
|
||||
.byte 0x02
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_not_random_1 address
|
||||
@ unused
|
||||
.macro if_random_not_equal address
|
||||
.byte 0x03
|
||||
.4byte \address
|
||||
.endm
|
||||
@ -212,7 +215,8 @@
|
||||
.byte \byte
|
||||
.endm
|
||||
|
||||
.macro ai_23
|
||||
@ unused
|
||||
.macro get_move_power
|
||||
.byte 0x23
|
||||
.endm
|
||||
|
||||
@ -225,14 +229,17 @@
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
.macro if_type type, address
|
||||
.macro if_arg_equal type, address
|
||||
.byte 0x26
|
||||
.byte \type
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro ai_27
|
||||
@ unused
|
||||
.macro if_arg_not_equal type, address
|
||||
.byte 0x27
|
||||
.byte \type
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_would_go_first target, address
|
||||
@ -247,10 +254,12 @@
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_2a
|
||||
.byte 0x2a
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_2b
|
||||
.byte 0x2b
|
||||
.endm
|
||||
@ -260,7 +269,8 @@
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
.macro ai_2d
|
||||
@ unused
|
||||
.macro get_considered_move
|
||||
.byte 0x2d
|
||||
.endm
|
||||
|
||||
@ -273,7 +283,8 @@
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
.macro ai_30
|
||||
@ unused
|
||||
.macro get_highest_possible_damage
|
||||
.byte 0x30
|
||||
.endm
|
||||
|
||||
@ -283,10 +294,12 @@
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_32
|
||||
.byte 0x32
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_33
|
||||
.byte 0x33
|
||||
.endm
|
||||
@ -364,12 +377,20 @@
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_has_move
|
||||
@ unused
|
||||
.macro if_has_move, target, move, address
|
||||
.byte 0x3f
|
||||
.byte \target
|
||||
.2byte \move
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_dont_have_move
|
||||
@ unused
|
||||
.macro if_dont_have_move, target, move, address
|
||||
.byte 0x40
|
||||
.byte \target
|
||||
.2byte \move
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_move_effect target, effect, address
|
||||
@ -393,8 +414,9 @@
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
.macro if_encored address
|
||||
.macro if_encored target, address
|
||||
.byte 0x44
|
||||
.byte \target
|
||||
.4byte \address
|
||||
.endm
|
||||
|
||||
@ -402,7 +424,7 @@
|
||||
.byte 0x45
|
||||
.endm
|
||||
|
||||
.macro if_random_2 address
|
||||
.macro if_random_100 address
|
||||
.byte 0x46
|
||||
.4byte \address
|
||||
.endm
|
||||
@ -440,15 +462,15 @@
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
.macro get_move_type
|
||||
.macro get_move_type_from_result
|
||||
.byte 0x4e
|
||||
.endm
|
||||
|
||||
.macro get_move_power
|
||||
.macro get_move_power_from_result
|
||||
.byte 0x4f
|
||||
.endm
|
||||
|
||||
.macro get_move_effect
|
||||
.macro get_move_effect_from_result
|
||||
.byte 0x50
|
||||
.endm
|
||||
|
||||
@ -457,30 +479,37 @@
|
||||
.byte \target
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_52
|
||||
.byte 0x52
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_53
|
||||
.byte 0x53
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_54
|
||||
.byte 0x54
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_55
|
||||
.byte 0x55
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_56
|
||||
.byte 0x56
|
||||
.endm
|
||||
|
||||
@ nullsub
|
||||
.macro ai_57
|
||||
.byte 0x57
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro call address
|
||||
.byte 0x58
|
||||
.4byte \address
|
||||
@ -513,6 +542,7 @@
|
||||
if_level_cond 2, \address
|
||||
.endm
|
||||
|
||||
@ unused
|
||||
.macro if_taunted address
|
||||
.byte 0x5c
|
||||
.4byte \address
|
||||
|
@ -152,7 +152,7 @@ _080464D6:
|
||||
beq _0804655C
|
||||
cmp r2, 0xFF
|
||||
bne _08046598
|
||||
ldr r0, _08046554 @ =gUnknown_02024C08
|
||||
ldr r0, _08046554 @ =gEnemyMonIndex
|
||||
strb r5, [r0]
|
||||
movs r0, 0x18
|
||||
strh r0, [r4, 0x20]
|
||||
@ -169,7 +169,7 @@ _08046544: .4byte gUnknown_02024A6A
|
||||
_08046548: .4byte gPlayerParty
|
||||
_0804654C: .4byte gSpriteTemplate_820AAB4
|
||||
_08046550: .4byte gSprites
|
||||
_08046554: .4byte gUnknown_02024C08
|
||||
_08046554: .4byte gEnemyMonIndex
|
||||
_08046558: .4byte sub_8047074
|
||||
_0804655C:
|
||||
adds r0, r5, 0
|
||||
@ -185,7 +185,7 @@ _0804655C:
|
||||
lsrs r0, 24
|
||||
adds r0, 0x18
|
||||
strh r0, [r4, 0x22]
|
||||
ldr r0, _08046590 @ =gUnknown_02024C08
|
||||
ldr r0, _08046590 @ =gEnemyMonIndex
|
||||
strb r5, [r0]
|
||||
movs r3, 0
|
||||
strh r3, [r4, 0x2E]
|
||||
@ -196,12 +196,12 @@ _0804655C:
|
||||
str r1, [r0]
|
||||
b _080465A6
|
||||
.align 2, 0
|
||||
_08046590: .4byte gUnknown_02024C08
|
||||
_08046590: .4byte gEnemyMonIndex
|
||||
_08046594: .4byte sub_8047254
|
||||
_08046598:
|
||||
movs r0, 0x1
|
||||
bl battle_get_side_with_given_state
|
||||
ldr r1, _080465C4 @ =gUnknown_02024C08
|
||||
ldr r1, _080465C4 @ =gEnemyMonIndex
|
||||
strb r0, [r1]
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
@ -211,7 +211,7 @@ _080465A6:
|
||||
adds r1, r7
|
||||
lsls r1, 2
|
||||
adds r4, r1, r0
|
||||
ldr r5, _080465C4 @ =gUnknown_02024C08
|
||||
ldr r5, _080465C4 @ =gEnemyMonIndex
|
||||
ldrb r0, [r5]
|
||||
strh r0, [r4, 0x3A]
|
||||
ldr r2, [sp]
|
||||
@ -221,7 +221,7 @@ _080465A6:
|
||||
bl DestroyTask
|
||||
b _08046616
|
||||
.align 2, 0
|
||||
_080465C4: .4byte gUnknown_02024C08
|
||||
_080465C4: .4byte gEnemyMonIndex
|
||||
_080465C8: .4byte gSprites
|
||||
_080465CC:
|
||||
movs r0, 0x22
|
||||
|
1932
asm/rom_800D42C.s
1932
asm/rom_800D42C.s
File diff suppressed because it is too large
Load Diff
@ -33,3 +33,13 @@
|
||||
.equiv FEMALE, 1
|
||||
|
||||
.equiv GAME_LANGUAGE, 2
|
||||
|
||||
.equiv ENEMY_TYPE1, 0
|
||||
.equiv ENEMY_TYPE2, 1
|
||||
.equiv PLAYER_TYPE1, 2
|
||||
.equiv PLAYER_TYPE2, 3
|
||||
.equiv CURRENT_MOVE, 4
|
||||
|
||||
.equiv LESS_THAN, 0
|
||||
.equiv GREATER_THAN, 1
|
||||
.equiv EQUAL, 2
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,15 @@
|
||||
#define BATTLE_TYPE_LEGENDARY 0x2000
|
||||
#define BATTLE_TYPE_REGI 0x4000
|
||||
|
||||
#define AI_ACTION_UNK1 0x0001
|
||||
#define AI_ACTION_UNK2 0x0002
|
||||
#define AI_ACTION_UNK3 0x0004
|
||||
#define AI_ACTION_UNK4 0x0008
|
||||
#define AI_ACTION_UNK5 0x0010
|
||||
#define AI_ACTION_UNK6 0x0020
|
||||
#define AI_ACTION_UNK7 0x0040
|
||||
#define AI_ACTION_UNK8 0x0080
|
||||
|
||||
struct Trainer
|
||||
{
|
||||
/*0x00*/ u8 partyFlags;
|
||||
@ -32,15 +41,24 @@ struct Trainer
|
||||
/*0x24*/ void *party;
|
||||
};
|
||||
|
||||
struct UnknownStruct1
|
||||
{
|
||||
/*0x00*/ u16 unk0[2][8];
|
||||
/*0x20*/ u8 unk20[2];
|
||||
/*0x22*/ u8 unk22[2];
|
||||
/*0x24*/ u16 items[4];
|
||||
/*0x2C*/ u8 unk8;
|
||||
};
|
||||
|
||||
struct AI_ThinkingStruct /* 0x2016800 */
|
||||
{
|
||||
/* 0x00 */ u8 unk0;
|
||||
/* 0x01 */ u8 moveConsidered;
|
||||
/* 0x02 */ u16 unk2;
|
||||
/* 0x00 */ u8 aiState;
|
||||
/* 0x01 */ u8 movesetIndex;
|
||||
/* 0x02 */ u16 moveConsidered;
|
||||
/* 0x04 */ s8 score[4]; // score?
|
||||
/* 0x08 */ u32 funcResult;
|
||||
/* 0x0C */ u32 aiFlags;
|
||||
/* 0x10 */ u8 unk10;
|
||||
/* 0x10 */ u8 aiAction;
|
||||
/* 0x11 */ u8 aiLogicId;
|
||||
/* 0x12 */ u8 filler12[6];
|
||||
/* 0x18 */ u8 unk18[4];
|
||||
@ -56,7 +74,7 @@ struct SmallBattleStruct1
|
||||
|
||||
struct SmallItemStruct
|
||||
{
|
||||
u8 item[2][2];
|
||||
u8 itemLocal[2][3];
|
||||
};
|
||||
|
||||
struct BattleStruct /* 0x2000000 */
|
||||
@ -64,14 +82,17 @@ struct BattleStruct /* 0x2000000 */
|
||||
u8 filler0[0x1601C];
|
||||
struct SmallBattleStruct1 unk;
|
||||
u8 filler1[0x68]; // 0x2016020
|
||||
u8 unk88;
|
||||
u8 safariFleeRate;
|
||||
u8 filler1_2[0x42];
|
||||
/* 0x160CB */ u8 linkPlayerIndex;
|
||||
struct SmallItemStruct item;
|
||||
u8 filler2[0x730];
|
||||
struct AI_ThinkingStruct ai; /* 0x2016800 */
|
||||
/* 0x160CC */ struct SmallItemStruct item;
|
||||
u8 filler2[0x72E];
|
||||
/* 0x16800 */ struct AI_ThinkingStruct ai; /* 0x2016800 */
|
||||
u8 filler1681C[0x1E4];
|
||||
/* 0x16A00 */ struct UnknownStruct1 unk_2016A00_2;
|
||||
};
|
||||
|
||||
extern struct UnknownStruct1 unk_2016A00;
|
||||
extern struct BattleStruct battle_2000000;
|
||||
extern struct AI_ThinkingStruct gAIThinkingSpace;
|
||||
|
||||
|
363
include/moves.h
Normal file
363
include/moves.h
Normal file
@ -0,0 +1,363 @@
|
||||
#ifndef GUARD_MOVES_H
|
||||
#define GUARD_MOVES_H
|
||||
|
||||
enum
|
||||
{
|
||||
MOVE_NONE,
|
||||
MOVE_POUND,
|
||||
MOVE_KARATE_CHOP,
|
||||
MOVE_DOUBLE_SLAP,
|
||||
MOVE_COMET_PUNCH,
|
||||
MOVE_MEGA_PUNCH,
|
||||
MOVE_PAY_DAY,
|
||||
MOVE_FIRE_PUNCH,
|
||||
MOVE_ICE_PUNCH,
|
||||
MOVE_THUNDER_PUNCH,
|
||||
MOVE_SCRATCH,
|
||||
MOVE_VICE_GRIP,
|
||||
MOVE_GUILLOTINE,
|
||||
MOVE_RAZOR_WIND,
|
||||
MOVE_SWORDS_DANCE,
|
||||
MOVE_CUT,
|
||||
MOVE_GUST,
|
||||
MOVE_WING_ATTACK,
|
||||
MOVE_WHIRLWIND,
|
||||
MOVE_FLY,
|
||||
MOVE_BIND,
|
||||
MOVE_SLAM,
|
||||
MOVE_VINE_WHIP,
|
||||
MOVE_STOMP,
|
||||
MOVE_DOUBLE_KICK,
|
||||
MOVE_MEGA_KICK,
|
||||
MOVE_JUMP_KICK,
|
||||
MOVE_ROLLING_KICK,
|
||||
MOVE_SAND_ATTACK,
|
||||
MOVE_HEADBUTT,
|
||||
MOVE_HORN_ATTACK,
|
||||
MOVE_FURY_ATTACK,
|
||||
MOVE_HORN_DRILL,
|
||||
MOVE_TACKLE,
|
||||
MOVE_BODY_SLAM,
|
||||
MOVE_WRAP,
|
||||
MOVE_TAKE_DOWN,
|
||||
MOVE_THRASH,
|
||||
MOVE_DOUBLE_EDGE,
|
||||
MOVE_TAIL_WHIP,
|
||||
MOVE_POISON_STING,
|
||||
MOVE_TWINEEDLE,
|
||||
MOVE_PIN_MISSILE,
|
||||
MOVE_LEER,
|
||||
MOVE_BITE,
|
||||
MOVE_GROWL,
|
||||
MOVE_ROAR,
|
||||
MOVE_SING,
|
||||
MOVE_SUPERSONIC,
|
||||
MOVE_SONIC_BOOM,
|
||||
MOVE_DISABLE,
|
||||
MOVE_ACID,
|
||||
MOVE_EMBER,
|
||||
MOVE_FLAMETHROWER,
|
||||
MOVE_MIST,
|
||||
MOVE_WATER_GUN,
|
||||
MOVE_HYDRO_PUMP,
|
||||
MOVE_SURF,
|
||||
MOVE_ICE_BEAM,
|
||||
MOVE_BLIZZARD,
|
||||
MOVE_PSYBEAM,
|
||||
MOVE_BUBBLE_BEAM,
|
||||
MOVE_AURORA_BEAM,
|
||||
MOVE_HYPER_BEAM,
|
||||
MOVE_PECK,
|
||||
MOVE_DRILL_PECK,
|
||||
MOVE_SUBMISSION,
|
||||
MOVE_LOW_KICK,
|
||||
MOVE_COUNTER,
|
||||
MOVE_SEISMIC_TOSS,
|
||||
MOVE_STRENGTH,
|
||||
MOVE_ABSORB,
|
||||
MOVE_MEGA_DRAIN,
|
||||
MOVE_LEECH_SEED,
|
||||
MOVE_GROWTH,
|
||||
MOVE_RAZOR_LEAF,
|
||||
MOVE_SOLAR_BEAM,
|
||||
MOVE_POISON_POWDER,
|
||||
MOVE_STUN_SPORE,
|
||||
MOVE_SLEEP_POWDER,
|
||||
MOVE_PETAL_DANCE,
|
||||
MOVE_STRING_SHOT,
|
||||
MOVE_DRAGON_RAGE,
|
||||
MOVE_FIRE_SPIN,
|
||||
MOVE_THUNDER_SHOCK,
|
||||
MOVE_THUNDERBOLT,
|
||||
MOVE_THUNDER_WAVE,
|
||||
MOVE_THUNDER,
|
||||
MOVE_ROCK_THROW,
|
||||
MOVE_EARTHQUAKE,
|
||||
MOVE_FISSURE,
|
||||
MOVE_DIG,
|
||||
MOVE_TOXIC,
|
||||
MOVE_CONFUSION,
|
||||
MOVE_PSYCHIC,
|
||||
MOVE_HYPNOSIS,
|
||||
MOVE_MEDITATE,
|
||||
MOVE_AGILITY,
|
||||
MOVE_QUICK_ATTACK,
|
||||
MOVE_RAGE,
|
||||
MOVE_TELEPORT,
|
||||
MOVE_NIGHT_SHADE,
|
||||
MOVE_MIMIC,
|
||||
MOVE_SCREECH,
|
||||
MOVE_DOUBLE_TEAM,
|
||||
MOVE_RECOVER,
|
||||
MOVE_HARDEN,
|
||||
MOVE_MINIMIZE,
|
||||
MOVE_SMOKESCREEN,
|
||||
MOVE_CONFUSE_RAY,
|
||||
MOVE_WITHDRAW,
|
||||
MOVE_DEFENSE_CURL,
|
||||
MOVE_BARRIER,
|
||||
MOVE_LIGHT_SCREEN,
|
||||
MOVE_HAZE,
|
||||
MOVE_REFLECT,
|
||||
MOVE_FOCUS_ENERGY,
|
||||
MOVE_BIDE,
|
||||
MOVE_METRONOME,
|
||||
MOVE_MIRROR_MOVE,
|
||||
MOVE_SELF_DESTRUCT,
|
||||
MOVE_EGG_BOMB,
|
||||
MOVE_LICK,
|
||||
MOVE_SMOG,
|
||||
MOVE_SLUDGE,
|
||||
MOVE_BONE_CLUB,
|
||||
MOVE_FIRE_BLAST,
|
||||
MOVE_WATERFALL,
|
||||
MOVE_CLAMP,
|
||||
MOVE_SWIFT,
|
||||
MOVE_SKULL_BASH,
|
||||
MOVE_SPIKE_CANNON,
|
||||
MOVE_CONSTRICT,
|
||||
MOVE_AMNESIA,
|
||||
MOVE_KINESIS,
|
||||
MOVE_SOFT_BOILED,
|
||||
MOVE_HI_JUMP_KICK,
|
||||
MOVE_GLARE,
|
||||
MOVE_DREAM_EATER,
|
||||
MOVE_POISON_GAS,
|
||||
MOVE_BARRAGE,
|
||||
MOVE_LEECH_LIFE,
|
||||
MOVE_LOVELY_KISS,
|
||||
MOVE_SKY_ATTACK,
|
||||
MOVE_TRANSFORM,
|
||||
MOVE_BUBBLE,
|
||||
MOVE_DIZZY_PUNCH,
|
||||
MOVE_SPORE,
|
||||
MOVE_FLASH,
|
||||
MOVE_PSYWAVE,
|
||||
MOVE_SPLASH,
|
||||
MOVE_ACID_ARMOR,
|
||||
MOVE_CRABHAMMER,
|
||||
MOVE_EXPLOSION,
|
||||
MOVE_FURY_SWIPES,
|
||||
MOVE_BONEMERANG,
|
||||
MOVE_REST,
|
||||
MOVE_ROCK_SLIDE,
|
||||
MOVE_HYPER_FANG,
|
||||
MOVE_SHARPEN,
|
||||
MOVE_CONVERSION,
|
||||
MOVE_TRI_ATTACK,
|
||||
MOVE_SUPER_FANG,
|
||||
MOVE_SLASH,
|
||||
MOVE_SUBSTITUTE,
|
||||
MOVE_STRUGGLE,
|
||||
MOVE_SKETCH,
|
||||
MOVE_TRIPLE_KICK,
|
||||
MOVE_THIEF,
|
||||
MOVE_SPIDER_WEB,
|
||||
MOVE_MIND_READER,
|
||||
MOVE_NIGHTMARE,
|
||||
MOVE_FLAME_WHEEL,
|
||||
MOVE_SNORE,
|
||||
MOVE_CURSE,
|
||||
MOVE_FLAIL,
|
||||
MOVE_CONVERSION_2,
|
||||
MOVE_AEROBLAST,
|
||||
MOVE_COTTON_SPORE,
|
||||
MOVE_REVERSAL,
|
||||
MOVE_SPITE,
|
||||
MOVE_POWDER_SNOW,
|
||||
MOVE_PROTECT,
|
||||
MOVE_MACH_PUNCH,
|
||||
MOVE_SCARY_FACE,
|
||||
MOVE_FAINT_ATTACK,
|
||||
MOVE_SWEET_KISS,
|
||||
MOVE_BELLY_DRUM,
|
||||
MOVE_SLUDGE_BOMB,
|
||||
MOVE_MUD_SLAP,
|
||||
MOVE_OCTAZOOKA,
|
||||
MOVE_SPIKES,
|
||||
MOVE_ZAP_CANNON,
|
||||
MOVE_FORESIGHT,
|
||||
MOVE_DESTINY_BOND,
|
||||
MOVE_PERISH_SONG,
|
||||
MOVE_ICY_WIND,
|
||||
MOVE_DETECT,
|
||||
MOVE_BONE_RUSH,
|
||||
MOVE_LOCK_ON,
|
||||
MOVE_OUTRAGE,
|
||||
MOVE_SANDSTORM,
|
||||
MOVE_GIGA_DRAIN,
|
||||
MOVE_ENDURE,
|
||||
MOVE_CHARM,
|
||||
MOVE_ROLLOUT,
|
||||
MOVE_FALSE_SWIPE,
|
||||
MOVE_SWAGGER,
|
||||
MOVE_MILK_DRINK,
|
||||
MOVE_SPARK,
|
||||
MOVE_FURY_CUTTER,
|
||||
MOVE_STEEL_WING,
|
||||
MOVE_MEAN_LOOK,
|
||||
MOVE_ATTRACT,
|
||||
MOVE_SLEEP_TALK,
|
||||
MOVE_HEAL_BELL,
|
||||
MOVE_RETURN,
|
||||
MOVE_PRESENT,
|
||||
MOVE_FRUSTRATION,
|
||||
MOVE_SAFEGUARD,
|
||||
MOVE_PAIN_SPLIT,
|
||||
MOVE_SACRED_FIRE,
|
||||
MOVE_MAGNITUDE,
|
||||
MOVE_DYNAMIC_PUNCH,
|
||||
MOVE_MEGAHORN,
|
||||
MOVE_DRAGON_BREATH,
|
||||
MOVE_BATON_PASS,
|
||||
MOVE_ENCORE,
|
||||
MOVE_PURSUIT,
|
||||
MOVE_RAPID_SPIN,
|
||||
MOVE_SWEET_SCENT,
|
||||
MOVE_IRON_TAIL,
|
||||
MOVE_METAL_CLAW,
|
||||
MOVE_VITAL_THROW,
|
||||
MOVE_MORNING_SUN,
|
||||
MOVE_SYNTHESIS,
|
||||
MOVE_MOONLIGHT,
|
||||
MOVE_HIDDEN_POWER,
|
||||
MOVE_CROSS_CHOP,
|
||||
MOVE_TWISTER,
|
||||
MOVE_RAIN_DANCE,
|
||||
MOVE_SUNNY_DAY,
|
||||
MOVE_CRUNCH,
|
||||
MOVE_MIRROR_COAT,
|
||||
MOVE_PSYCH_UP,
|
||||
MOVE_EXTREME_SPEED,
|
||||
MOVE_ANCIENT_POWER,
|
||||
MOVE_SHADOW_BALL,
|
||||
MOVE_FUTURE_SIGHT,
|
||||
MOVE_ROCK_SMASH,
|
||||
MOVE_WHIRLPOOL,
|
||||
MOVE_BEAT_UP,
|
||||
MOVE_FAKE_OUT,
|
||||
MOVE_UPROAR,
|
||||
MOVE_STOCKPILE,
|
||||
MOVE_SPIT_UP,
|
||||
MOVE_SWALLOW,
|
||||
MOVE_HEAT_WAVE,
|
||||
MOVE_HAIL,
|
||||
MOVE_TORMENT,
|
||||
MOVE_FLATTER,
|
||||
MOVE_WILL_O_WISP,
|
||||
MOVE_MEMENTO,
|
||||
MOVE_FACADE,
|
||||
MOVE_FOCUS_PUNCH,
|
||||
MOVE_SMELLING_SALT,
|
||||
MOVE_FOLLOW_ME,
|
||||
MOVE_NATURE_POWER,
|
||||
MOVE_CHARGE,
|
||||
MOVE_TAUNT,
|
||||
MOVE_HELPING_HAND,
|
||||
MOVE_TRICK,
|
||||
MOVE_ROLE_PLAY,
|
||||
MOVE_WISH,
|
||||
MOVE_ASSIST,
|
||||
MOVE_INGRAIN,
|
||||
MOVE_SUPERPOWER,
|
||||
MOVE_MAGIC_COAT,
|
||||
MOVE_RECYCLE,
|
||||
MOVE_REVENGE,
|
||||
MOVE_BRICK_BREAK,
|
||||
MOVE_YAWN,
|
||||
MOVE_KNOCK_OFF,
|
||||
MOVE_ENDEAVOR,
|
||||
MOVE_ERUPTION,
|
||||
MOVE_SKILL_SWAP,
|
||||
MOVE_IMPRISON,
|
||||
MOVE_REFRESH,
|
||||
MOVE_GRUDGE,
|
||||
MOVE_SNATCH,
|
||||
MOVE_SECRET_POWER,
|
||||
MOVE_DIVE,
|
||||
MOVE_ARM_THRUST,
|
||||
MOVE_CAMOUFLAGE,
|
||||
MOVE_TAIL_GLOW,
|
||||
MOVE_LUSTER_PURGE,
|
||||
MOVE_MIST_BALL,
|
||||
MOVE_FEATHER_DANCE,
|
||||
MOVE_TEETER_DANCE,
|
||||
MOVE_BLAZE_KICK,
|
||||
MOVE_MUD_SPORT,
|
||||
MOVE_ICE_BALL,
|
||||
MOVE_NEEDLE_ARM,
|
||||
MOVE_SLACK_OFF,
|
||||
MOVE_HYPER_VOICE,
|
||||
MOVE_POISON_FANG,
|
||||
MOVE_CRUSH_CLAW,
|
||||
MOVE_BLAST_BURN,
|
||||
MOVE_HYDRO_CANNON,
|
||||
MOVE_METEOR_MASH,
|
||||
MOVE_ASTONISH,
|
||||
MOVE_WEATHER_BALL,
|
||||
MOVE_AROMATHERAPY,
|
||||
MOVE_FAKE_TEARS,
|
||||
MOVE_AIR_CUTTER,
|
||||
MOVE_OVERHEAT,
|
||||
MOVE_ODOR_SLEUTH,
|
||||
MOVE_ROCK_TOMB,
|
||||
MOVE_SILVER_WIND,
|
||||
MOVE_METAL_SOUND,
|
||||
MOVE_GRASS_WHISTLE,
|
||||
MOVE_TICKLE,
|
||||
MOVE_COSMIC_POWER,
|
||||
MOVE_WATER_SPOUT,
|
||||
MOVE_SIGNAL_BEAM,
|
||||
MOVE_SHADOW_PUNCH,
|
||||
MOVE_EXTRASENSORY,
|
||||
MOVE_SKY_UPPERCUT,
|
||||
MOVE_SAND_TOMB,
|
||||
MOVE_SHEER_COLD,
|
||||
MOVE_MUDDY_WATER,
|
||||
MOVE_BULLET_SEED,
|
||||
MOVE_AERIAL_ACE,
|
||||
MOVE_ICICLE_SPEAR,
|
||||
MOVE_IRON_DEFENSE,
|
||||
MOVE_BLOCK,
|
||||
MOVE_HOWL,
|
||||
MOVE_DRAGON_CLAW,
|
||||
MOVE_FRENZY_PLANT,
|
||||
MOVE_BULK_UP,
|
||||
MOVE_BOUNCE,
|
||||
MOVE_MUD_SHOT,
|
||||
MOVE_POISON_TAIL,
|
||||
MOVE_COVET,
|
||||
MOVE_VOLT_TACKLE,
|
||||
MOVE_MAGICAL_LEAF,
|
||||
MOVE_WATER_SPORT,
|
||||
MOVE_CALM_MIND,
|
||||
MOVE_LEAF_BLADE,
|
||||
MOVE_DRAGON_DANCE,
|
||||
MOVE_ROCK_BLAST,
|
||||
MOVE_SHOCK_WAVE,
|
||||
MOVE_WATER_PULSE,
|
||||
MOVE_DOOM_DESIRE,
|
||||
MOVE_PSYCHO_BOOST,
|
||||
};
|
||||
|
||||
#endif // GUARD_MOVES_H
|
922
src/battle_ai.c
922
src/battle_ai.c
File diff suppressed because it is too large
Load Diff
@ -59,8 +59,8 @@ struct UnknownStruct3
|
||||
extern u8 unk_2000000[];
|
||||
extern u16 gUnknown_02024A6A[4];
|
||||
extern u8 gUnknown_02024BE0[];
|
||||
extern u8 gUnknown_02024C07;
|
||||
extern u8 gUnknown_02024C08;
|
||||
extern u8 gPlayerMonIndex;
|
||||
extern u8 gEnemyMonIndex;
|
||||
EWRAM_DATA const u8 *gBattleAnimScriptPtr = NULL;
|
||||
EWRAM_DATA const u8 *gBattleAnimScriptRetAddr = NULL;
|
||||
EWRAM_DATA void (*gUnknown_0202F7AC)(void) = NULL;
|
||||
@ -260,8 +260,8 @@ void battle_anim_clear_some_data(void)
|
||||
|
||||
void move_anim_start_t1(u16 a)
|
||||
{
|
||||
gUnknown_0202F7C8 = gUnknown_02024C07;
|
||||
gUnknown_0202F7C9 = gUnknown_02024C08;
|
||||
gUnknown_0202F7C8 = gPlayerMonIndex;
|
||||
gUnknown_0202F7C9 = gEnemyMonIndex;
|
||||
move_something(gBattleAnims_Moves, a, 1);
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,8 @@ extern u8 gUnknown_02024A60;
|
||||
extern struct BattlePokemon gBattleMons[4];
|
||||
extern u16 gUnknown_02024BE6;
|
||||
extern u8 byte_2024C06;
|
||||
extern u8 gUnknown_02024C07;
|
||||
extern u8 gUnknown_02024C08;
|
||||
extern u8 gPlayerMonIndex;
|
||||
extern u8 gEnemyMonIndex;
|
||||
extern u8 gUnknown_02024C0C;
|
||||
extern u8 gXXX_CritRelated;
|
||||
extern u16 gBattleWeather;
|
||||
@ -69,14 +69,14 @@ u8 sub_803C348(u8 a1)
|
||||
case 1:
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (battle_side_get_owner(i) == battle_side_get_owner(gUnknown_02024C07) && !(gUnknown_02024C0C & gBitTable[i]))
|
||||
if (battle_side_get_owner(i) == battle_side_get_owner(gPlayerMonIndex) && !(gUnknown_02024C0C & gBitTable[i]))
|
||||
retVal++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (battle_side_get_owner(i) == battle_side_get_owner(gUnknown_02024C08) && !(gUnknown_02024C0C & gBitTable[i]))
|
||||
if (battle_side_get_owner(i) == battle_side_get_owner(gEnemyMonIndex) && !(gUnknown_02024C0C & gBitTable[i]))
|
||||
retVal++;
|
||||
}
|
||||
break;
|
||||
|
@ -58,8 +58,8 @@ extern u16 gSpeciesIdToCryId[];
|
||||
extern u8 gUnknown_030041C0[];
|
||||
extern u8 gUnknown_03004290[];
|
||||
extern u8 gUnknown_020238CC[];
|
||||
extern u8 gUnknown_02024C07;
|
||||
extern u8 gUnknown_02024C08;
|
||||
extern u8 gPlayerMonIndex;
|
||||
extern u8 gEnemyMonIndex;
|
||||
extern u8 gUnknown_02024C0B;
|
||||
extern u8 gUnknown_02024E6C;
|
||||
|
||||
@ -203,7 +203,7 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit)
|
||||
|
||||
void sub_803F324(int stat)
|
||||
{
|
||||
gUnknown_02024C08 = gUnknown_02024E6C;
|
||||
gEnemyMonIndex = gUnknown_02024E6C;
|
||||
StringCopy(gUnknown_030041C0, gUnknown_08400F58[gUnknown_082082F8[stat]]);
|
||||
StringCopy(gUnknown_03004290, gUnknown_083FFDB3);
|
||||
get_battle_strings_(gUnknown_083FFDD3);
|
||||
@ -244,7 +244,7 @@ u8 *sub_803F378(u16 itemId)
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_02024C07 = gUnknown_02024E6C;
|
||||
gPlayerMonIndex = gUnknown_02024E6C;
|
||||
get_battle_strings_(gUnknown_083FEE92);
|
||||
}
|
||||
}
|
||||
@ -252,7 +252,7 @@ u8 *sub_803F378(u16 itemId)
|
||||
|
||||
if (itemEffect[3] & 0x80)
|
||||
{
|
||||
gUnknown_02024C07 = gUnknown_02024E6C;
|
||||
gPlayerMonIndex = gUnknown_02024E6C;
|
||||
get_battle_strings_(gUnknown_083FEE5D);
|
||||
}
|
||||
|
||||
|
12
src/rom3.c
12
src/rom3.c
@ -34,8 +34,8 @@ extern u16 gUnknown_02024BE6;
|
||||
extern u16 gUnknown_02024BE8;
|
||||
extern u16 gUnknown_02024C04;
|
||||
extern u8 byte_2024C06;
|
||||
extern u8 gUnknown_02024C07;
|
||||
extern u8 gUnknown_02024C08;
|
||||
extern u8 gPlayerMonIndex;
|
||||
extern u8 gEnemyMonIndex;
|
||||
extern u8 gUnknown_02024C0A;
|
||||
extern u8 gUnknown_02024C0B;
|
||||
extern u8 gUnknown_02024C0C;
|
||||
@ -422,8 +422,8 @@ void dp01_prepare_buffer_wireless_probably(u8 a, u16 b, u8 *c)
|
||||
}
|
||||
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14000] = a;
|
||||
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14001] = gUnknown_02024A60;
|
||||
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14002] = gUnknown_02024C07;
|
||||
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14003] = gUnknown_02024C08;
|
||||
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14002] = gPlayerMonIndex;
|
||||
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14003] = gEnemyMonIndex;
|
||||
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14004] = r9;
|
||||
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14005] = (r9 & 0x0000FF00) >> 8;
|
||||
unk_2000000[gTasks[gUnknown_020238C4].data[14] + 0x14006] = gUnknown_02024C0C;
|
||||
@ -565,8 +565,8 @@ void sub_800C47C(u8 taskId)
|
||||
sub_80155A4(r4);
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
|
||||
{
|
||||
gUnknown_02024C07 = unk_2000000[0x15000 + gTasks[taskId].data[15] + 2];
|
||||
gUnknown_02024C08 = unk_2000000[0x15000 + gTasks[taskId].data[15] + 3];
|
||||
gPlayerMonIndex = unk_2000000[0x15000 + gTasks[taskId].data[15] + 2];
|
||||
gEnemyMonIndex = unk_2000000[0x15000 + gTasks[taskId].data[15] + 3];
|
||||
gUnknown_02024C0C = unk_2000000[0x15000 + gTasks[taskId].data[15] + 6];
|
||||
gUnknown_02024C0A = unk_2000000[0x15000 + gTasks[taskId].data[15] + 7];
|
||||
}
|
||||
|
@ -137,10 +137,10 @@ gUnknown_02024C04: @ 2024C04
|
||||
byte_2024C06: @ 2024C06
|
||||
.space 0x1
|
||||
|
||||
gUnknown_02024C07: @ 2024C07
|
||||
gPlayerMonIndex: @ 2024C07
|
||||
.space 0x1
|
||||
|
||||
gUnknown_02024C08: @ 2024C08
|
||||
gEnemyMonIndex: @ 2024C08
|
||||
.space 0x1
|
||||
|
||||
gUnknown_02024C09: @ 2024C09
|
||||
|
Loading…
Reference in New Issue
Block a user