summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/contest.s24
-rw-r--r--asm/contest_ai.s5278
-rw-r--r--asm/contest_effect.s2
-rw-r--r--data/contest_ai.s144
-rw-r--r--include/constants/species.h832
-rw-r--r--include/contest.h18
-rw-r--r--include/contest_ai.h16
-rw-r--r--include/contest_effect.h4
-rw-r--r--ld_script.txt4
-rw-r--r--src/contest.c10
-rw-r--r--src/contest_ai.c1756
-rw-r--r--src/pokemon.c1250
12 files changed, 3887 insertions, 5451 deletions
diff --git a/asm/contest.s b/asm/contest.s
index 6504e7bf1..b67450eef 100644
--- a/asm/contest.s
+++ b/asm/contest.s
@@ -43,7 +43,7 @@ sub_80DB8B8: @ 80DB8B8
lsrs r4, r0, 24
adds r5, r4, 0
adds r0, r4, 0
- bl sub_80DBCA8
+ bl Contest_IsMonsTurnDisabled
lsls r0, 24
cmp r0, 0
beq _080DB8D0
@@ -55,8 +55,8 @@ _080DB8D0:
cmp r4, r0
beq _080DB8F4
adds r0, r4, 0
- bl sub_81562C4
- bl sub_8156324
+ bl ContestAI_ResetAI
+ bl ContestAI_GetActionToUse
lsls r0, 24
ldr r2, =gContestMons
lsrs r0, 23
@@ -533,7 +533,7 @@ _080DBC3C:
ldr r0, [r3, 0x4]
adds r0, r4, r0
ldrh r0, [r0, 0x6]
- bl sub_80DD9F0
+ bl Contest_GetMoveExcitement
ldr r1, [r5]
ldr r2, [r1]
ldrb r1, [r2, 0x1]
@@ -568,8 +568,8 @@ _080DBC3C:
.pool
thumb_func_end sub_80DBAA0
- thumb_func_start sub_80DBCA8
-sub_80DBCA8: @ 80DBCA8
+ thumb_func_start Contest_IsMonsTurnDisabled
+Contest_IsMonsTurnDisabled: @ 80DBCA8
push {lr}
lsls r0, 24
lsrs r0, 24
@@ -599,7 +599,7 @@ _080DBCD8:
_080DBCDA:
pop {r1}
bx r1
- thumb_func_end sub_80DBCA8
+ thumb_func_end Contest_IsMonsTurnDisabled
thumb_func_start sub_80DBCE0
sub_80DBCE0: @ 80DBCE0
@@ -3425,7 +3425,7 @@ _080DD334:
ldr r0, [r0, 0x4]
adds r0, r4, r0
ldrh r0, [r0, 0x6]
- bl sub_80DD9F0
+ bl Contest_GetMoveExcitement
ldr r1, [r5]
ldr r1, [r1, 0x10]
strb r0, [r1]
@@ -4213,8 +4213,8 @@ _080DD9C8:
.pool
thumb_func_end sub_80DD940
- thumb_func_start sub_80DD9F0
-sub_80DD9F0: @ 80DD9F0
+ thumb_func_start Contest_GetMoveExcitement
+Contest_GetMoveExcitement: @ 80DD9F0
lsls r0, 16
ldr r3, =gUnknown_085899EC
ldr r1, =gContestMoves
@@ -4233,7 +4233,7 @@ sub_80DD9F0: @ 80DD9F0
ldrsb r0, [r1, r0]
bx lr
.pool
- thumb_func_end sub_80DD9F0
+ thumb_func_end Contest_GetMoveExcitement
thumb_func_start sub_80DDA20
sub_80DDA20: @ 80DDA20
@@ -5136,7 +5136,7 @@ _080DE146:
beq _080DE1CA
lsls r0, r7, 24
lsrs r0, 24
- bl sub_80DBCA8
+ bl Contest_IsMonsTurnDisabled
lsls r0, 24
cmp r0, 0
bne _080DE1CA
diff --git a/asm/contest_ai.s b/asm/contest_ai.s
deleted file mode 100644
index ff48661f0..000000000
--- a/asm/contest_ai.s
+++ /dev/null
@@ -1,5278 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start sub_81562C4
-sub_81562C4: @ 81562C4
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r5, r0, 24
- ldr r4, =gContestResources
- ldr r0, [r4]
- ldr r0, [r0, 0xC]
- movs r1, 0
- movs r2, 0x44
- bl memset
- movs r1, 0
- movs r3, 0x64
- adds r2, r4, 0
-_081562DE:
- ldr r0, [r4]
- ldr r0, [r0, 0xC]
- adds r0, 0x5
- adds r0, r1
- strb r3, [r0]
- adds r1, 0x1
- cmp r1, 0x3
- ble _081562DE
- ldr r0, [r2]
- ldr r0, [r0, 0xC]
- adds r0, 0x41
- movs r1, 0
- strb r5, [r0]
- ldr r0, [r2]
- ldr r0, [r0, 0xC]
- adds r0, 0x40
- strb r1, [r0]
- ldr r0, [r2]
- ldr r2, [r0, 0xC]
- ldr r1, =gContestMons
- adds r0, r2, 0
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, 0x18
- adds r0, r1
- ldr r0, [r0]
- str r0, [r2, 0x14]
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81562C4
-
- thumb_func_start sub_8156324
-sub_8156324: @ 8156324
- push {r4-r6,lr}
- ldr r1, =gContestResources
- ldr r0, [r1]
- ldr r0, [r0, 0xC]
- ldr r0, [r0, 0x14]
- cmp r0, 0
- beq _0815636A
- adds r4, r1, 0
- movs r5, 0
-_08156336:
- ldr r0, [r4]
- ldr r2, [r0, 0xC]
- ldr r0, [r2, 0x14]
- movs r1, 0x1
- ands r0, r1
- cmp r0, 0
- beq _0815634A
- strb r5, [r2]
- bl sub_81563B0
-_0815634A:
- ldr r0, [r4]
- ldr r1, [r0, 0xC]
- ldr r0, [r1, 0x14]
- lsrs r0, 1
- str r0, [r1, 0x14]
- ldrb r0, [r1, 0x10]
- adds r0, 0x1
- strb r0, [r1, 0x10]
- ldr r0, [r4]
- ldr r0, [r0, 0xC]
- strb r5, [r0, 0x4]
- ldr r0, [r4]
- ldr r0, [r0, 0xC]
- ldr r0, [r0, 0x14]
- cmp r0, 0
- bne _08156336
-_0815636A:
- movs r6, 0x3
-_0815636C:
- bl Random
- adds r5, r0, 0
- ands r5, r6
- ldr r4, =gContestResources
- ldr r0, [r4]
- ldr r1, [r0, 0xC]
- adds r0, r1, 0x5
- adds r0, r5
- ldrb r3, [r0]
- movs r2, 0
- ldrb r1, [r1, 0x5]
- cmp r3, r1
- bcc _0815639E
- adds r1, r4, 0
-_0815638A:
- adds r2, 0x1
- cmp r2, 0x3
- bgt _0815639E
- ldr r0, [r1]
- ldr r0, [r0, 0xC]
- adds r0, 0x5
- adds r0, r2
- ldrb r0, [r0]
- cmp r3, r0
- bcs _0815638A
-_0815639E:
- cmp r2, 0x4
- bne _0815636C
- adds r0, r5, 0
- pop {r4-r6}
- pop {r1}
- bx r1
- .pool
- thumb_func_end sub_8156324
-
- thumb_func_start sub_81563B0
-sub_81563B0: @ 81563B0
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- ldr r5, =gContestResources
- ldr r0, [r5]
- ldr r0, [r0, 0xC]
- ldrb r0, [r0]
- adds r4, r5, 0
- cmp r0, 0x2
- beq _081564A0
- adds r7, r5, 0
- ldr r6, =gAIScriptPtr
- ldr r0, =gContestMons + 30
- mov r8, r0
-_081563CC:
- ldr r0, [r7]
- ldr r2, [r0, 0xC]
- ldrb r0, [r2]
- cmp r0, 0x1
- beq _08156426
- cmp r0, 0x1
- bgt _08156496
- cmp r0, 0
- bne _08156496
- ldr r1, =gContestAIs
- ldrb r0, [r2, 0x10]
- lsls r0, 2
- adds r0, r1
- ldr r0, [r0]
- str r0, [r6]
- ldrb r1, [r2, 0x4]
- lsls r1, 1
- adds r0, r2, 0
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- add r1, r8
- ldrh r1, [r1]
- adds r0, r1, 0
- cmp r0, 0
- bne _08156418
- strh r0, [r2, 0x2]
- b _0815641A
- .pool
-_08156418:
- strh r1, [r2, 0x2]
-_0815641A:
- ldr r0, [r4]
- ldr r1, [r0, 0xC]
- ldrb r0, [r1]
- adds r0, 0x1
- strb r0, [r1]
- b _08156496
-_08156426:
- ldrh r1, [r2, 0x2]
- cmp r1, 0
- beq _08156444
- ldr r1, =gUnknown_085CDD00
- ldr r0, [r6]
- ldrb r0, [r0]
- lsls r0, 2
- adds r0, r1
- ldr r0, [r0]
- bl _call_via_r0
- b _08156458
- .pool
-_08156444:
- adds r0, r2, 0x5
- ldrb r2, [r2, 0x4]
- adds r0, r2
- strb r1, [r0]
- ldr r0, [r7]
- ldr r2, [r0, 0xC]
- ldrb r1, [r2, 0x9]
- movs r0, 0x1
- orrs r0, r1
- strb r0, [r2, 0x9]
-_08156458:
- ldr r2, =gContestResources
- ldr r0, [r2]
- ldr r3, [r0, 0xC]
- ldrb r1, [r3, 0x9]
- movs r0, 0x1
- ands r0, r1
- adds r4, r2, 0
- cmp r0, 0
- beq _08156496
- ldrb r0, [r3, 0x4]
- adds r0, 0x1
- movs r2, 0
- strb r0, [r3, 0x4]
- ldr r0, [r4]
- ldr r1, [r0, 0xC]
- ldrb r0, [r1, 0x4]
- cmp r0, 0x3
- bhi _08156484
- strb r2, [r1]
- b _0815648A
- .pool
-_08156484:
- ldrb r0, [r1]
- adds r0, 0x1
- strb r0, [r1]
-_0815648A:
- ldr r0, [r4]
- ldr r2, [r0, 0xC]
- ldrb r1, [r2, 0x9]
- movs r0, 0xFE
- ands r0, r1
- strb r0, [r2, 0x9]
-_08156496:
- ldr r0, [r5]
- ldr r0, [r0, 0xC]
- ldrb r0, [r0]
- cmp r0, 0x2
- bne _081563CC
-_081564A0:
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_81563B0
-
- thumb_func_start sub_81564AC
-sub_81564AC: @ 81564AC
- push {lr}
- lsls r0, 24
- lsrs r2, r0, 24
- movs r1, 0
- ldr r3, =gContestResources
- ldr r0, [r3]
- ldr r0, [r0, 0x8]
- b _081564CC
- .pool
-_081564C0:
- adds r1, 0x1
- cmp r1, 0x3
- bgt _081564D2
- ldr r0, [r3]
- ldr r0, [r0, 0x8]
- adds r0, r1
-_081564CC:
- ldrb r0, [r0]
- cmp r0, r2
- bne _081564C0
-_081564D2:
- lsls r0, r1, 24
- lsrs r0, 24
- pop {r1}
- bx r1
- thumb_func_end sub_81564AC
-
- thumb_func_start sub_81564DC
-sub_81564DC: @ 81564DC
- push {r4,lr}
- ldr r3, =gContestResources
- ldr r0, [r3]
- ldr r0, [r0, 0xC]
- adds r1, r0, 0x5
- ldrb r0, [r0, 0x4]
- adds r1, r0
- ldr r2, =gAIScriptPtr
- ldr r0, [r2]
- ldrb r0, [r0, 0x1]
- lsls r0, 24
- asrs r0, 24
- ldrb r1, [r1]
- adds r0, r1
- lsls r0, 16
- lsrs r4, r0, 16
- asrs r0, 16
- cmp r0, 0xFF
- ble _08156510
- movs r4, 0xFF
- b _08156516
- .pool
-_08156510:
- cmp r0, 0
- bge _08156516
- movs r4, 0
-_08156516:
- ldr r0, [r3]
- ldr r1, [r0, 0xC]
- adds r0, r1, 0x5
- ldrb r1, [r1, 0x4]
- adds r0, r1
- strb r4, [r0]
- ldr r0, [r2]
- adds r0, 0x2
- str r0, [r2]
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_81564DC
-
- thumb_func_start sub_8156530
-sub_8156530: @ 8156530
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- ldr r0, [r0]
- ldrb r0, [r0, 0x1]
- strh r0, [r1, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8156530
-
- thumb_func_start sub_8156550
-sub_8156550: @ 8156550
- push {lr}
- bl sub_8156530
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _0815658C
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156590
- .pool
-_0815658C:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156590:
- pop {r0}
- bx r0
- thumb_func_end sub_8156550
-
- thumb_func_start sub_8156594
-sub_8156594: @ 8156594
- push {lr}
- bl sub_8156530
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _081565D0
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081565D4
- .pool
-_081565D0:
- adds r0, r2, 0x5
- str r0, [r3]
-_081565D4:
- pop {r0}
- bx r0
- thumb_func_end sub_8156594
-
- thumb_func_start sub_81565D8
-sub_81565D8: @ 81565D8
- push {lr}
- bl sub_8156530
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _08156614
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156618
- .pool
-_08156614:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156618:
- pop {r0}
- bx r0
- thumb_func_end sub_81565D8
-
- thumb_func_start sub_815661C
-sub_815661C: @ 815661C
- push {lr}
- bl sub_8156530
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08156658
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _0815665C
- .pool
-_08156658:
- adds r0, r2, 0x5
- str r0, [r3]
-_0815665C:
- pop {r0}
- bx r0
- thumb_func_end sub_815661C
-
- thumb_func_start sub_8156660
-sub_8156660: @ 8156660
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- ldr r0, [r0]
- ldrb r0, [r0, 0x13]
- lsls r0, 24
- asrs r0, 24
- strh r0, [r1, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8156660
-
- thumb_func_start sub_8156684
-sub_8156684: @ 8156684
- push {lr}
- bl sub_8156660
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _081566C0
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081566C4
- .pool
-_081566C0:
- adds r0, r2, 0x5
- str r0, [r3]
-_081566C4:
- pop {r0}
- bx r0
- thumb_func_end sub_8156684
-
- thumb_func_start sub_81566C8
-sub_81566C8: @ 81566C8
- push {lr}
- bl sub_8156660
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _08156704
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156708
- .pool
-_08156704:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156708:
- pop {r0}
- bx r0
- thumb_func_end sub_81566C8
-
- thumb_func_start sub_815670C
-sub_815670C: @ 815670C
- push {lr}
- bl sub_8156660
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _08156748
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _0815674C
- .pool
-_08156748:
- adds r0, r2, 0x5
- str r0, [r3]
-_0815674C:
- pop {r0}
- bx r0
- thumb_func_end sub_815670C
-
- thumb_func_start sub_8156750
-sub_8156750: @ 8156750
- push {lr}
- bl sub_8156660
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _0815678C
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156790
- .pool
-_0815678C:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156790:
- pop {r0}
- bx r0
- thumb_func_end sub_8156750
-
- thumb_func_start sub_8156794
-sub_8156794: @ 8156794
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r0, [r0, 0x8]
- adds r1, r2, 0
- adds r1, 0x41
- ldrb r1, [r1]
- adds r0, r1
- ldrb r0, [r0]
- strh r0, [r2, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8156794
-
- thumb_func_start sub_81567BC
-sub_81567BC: @ 81567BC
- push {lr}
- bl sub_8156794
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _081567F8
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081567FC
- .pool
-_081567F8:
- adds r0, r2, 0x5
- str r0, [r3]
-_081567FC:
- pop {r0}
- bx r0
- thumb_func_end sub_81567BC
-
- thumb_func_start sub_8156800
-sub_8156800: @ 8156800
- push {lr}
- bl sub_8156794
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _0815683C
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156840
- .pool
-_0815683C:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156840:
- pop {r0}
- bx r0
- thumb_func_end sub_8156800
-
- thumb_func_start sub_8156844
-sub_8156844: @ 8156844
- push {lr}
- bl sub_8156794
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _08156880
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156884
- .pool
-_08156880:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156884:
- pop {r0}
- bx r0
- thumb_func_end sub_8156844
-
- thumb_func_start sub_8156888
-sub_8156888: @ 8156888
- push {lr}
- bl sub_8156794
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _081568C4
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081568C8
- .pool
-_081568C4:
- adds r0, r2, 0x5
- str r0, [r3]
-_081568C8:
- pop {r0}
- bx r0
- thumb_func_end sub_8156888
-
- thumb_func_start sub_81568CC
-sub_81568CC: @ 81568CC
- push {r4,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r4, [r0, 0xC]
- adds r1, r4, 0
- adds r1, 0x41
- ldrb r1, [r1]
- ldr r2, [r0, 0x4]
- lsls r0, r1, 3
- subs r0, r1
- lsls r0, 2
- adds r0, r2
- ldrb r0, [r0, 0xD]
- lsls r0, 24
- asrs r0, 24
- movs r1, 0xA
- bl __divsi3
- lsls r0, 24
- asrs r0, 24
- strh r0, [r4, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81568CC
-
- thumb_func_start sub_815690C
-sub_815690C: @ 815690C
- push {lr}
- bl sub_81568CC
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _08156948
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _0815694C
- .pool
-_08156948:
- adds r0, r2, 0x5
- str r0, [r3]
-_0815694C:
- pop {r0}
- bx r0
- thumb_func_end sub_815690C
-
- thumb_func_start sub_8156950
-sub_8156950: @ 8156950
- push {lr}
- bl sub_81568CC
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _0815698C
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156990
- .pool
-_0815698C:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156990:
- pop {r0}
- bx r0
- thumb_func_end sub_8156950
-
- thumb_func_start sub_8156994
-sub_8156994: @ 8156994
- push {lr}
- bl sub_81568CC
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _081569D0
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081569D4
- .pool
-_081569D0:
- adds r0, r2, 0x5
- str r0, [r3]
-_081569D4:
- pop {r0}
- bx r0
- thumb_func_end sub_8156994
-
- thumb_func_start sub_81569D8
-sub_81569D8: @ 81569D8
- push {lr}
- bl sub_81568CC
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08156A14
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156A18
- .pool
-_08156A14:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156A18:
- pop {r0}
- bx r0
- thumb_func_end sub_81569D8
-
- thumb_func_start sub_8156A1C
-sub_8156A1C: @ 8156A1C
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r3, [r0, 0xC]
- adds r1, r3, 0
- adds r1, 0x41
- ldrb r1, [r1]
- ldr r2, [r0, 0x4]
- lsls r0, r1, 3
- subs r0, r1
- lsls r0, 2
- adds r0, r2
- ldrh r0, [r0, 0x4]
- strh r0, [r3, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8156A1C
-
- thumb_func_start sub_8156A48
-sub_8156A48: @ 8156A48
- push {r4,r5,lr}
- bl sub_8156A1C
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3]
- ldrb r0, [r3, 0x1]
- lsls r0, 8
- orrs r1, r0
- movs r5, 0x18
- ldrsh r0, [r2, r5]
- lsls r1, 16
- asrs r1, 16
- cmp r0, r1
- bge _08156A8C
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x4]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08156A90
- .pool
-_08156A8C:
- adds r0, r3, 0x6
- str r0, [r4]
-_08156A90:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8156A48
-
- thumb_func_start sub_8156A98
-sub_8156A98: @ 8156A98
- push {r4,r5,lr}
- bl sub_8156A1C
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3]
- ldrb r0, [r3, 0x1]
- lsls r0, 8
- orrs r1, r0
- movs r5, 0x18
- ldrsh r0, [r2, r5]
- lsls r1, 16
- asrs r1, 16
- cmp r0, r1
- ble _08156ADC
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x4]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08156AE0
- .pool
-_08156ADC:
- adds r0, r3, 0x6
- str r0, [r4]
-_08156AE0:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8156A98
-
- thumb_func_start sub_8156AE8
-sub_8156AE8: @ 8156AE8
- push {r4,r5,lr}
- bl sub_8156A1C
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3]
- ldrb r0, [r3, 0x1]
- lsls r0, 8
- orrs r1, r0
- movs r5, 0x18
- ldrsh r0, [r2, r5]
- lsls r1, 16
- asrs r1, 16
- cmp r0, r1
- bne _08156B2C
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x4]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08156B30
- .pool
-_08156B2C:
- adds r0, r3, 0x6
- str r0, [r4]
-_08156B30:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8156AE8
-
- thumb_func_start sub_8156B38
-sub_8156B38: @ 8156B38
- push {r4,r5,lr}
- bl sub_8156A1C
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3]
- ldrb r0, [r3, 0x1]
- lsls r0, 8
- orrs r1, r0
- movs r5, 0x18
- ldrsh r0, [r2, r5]
- lsls r1, 16
- asrs r1, 16
- cmp r0, r1
- beq _08156B7C
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x4]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08156B80
- .pool
-_08156B7C:
- adds r0, r3, 0x6
- str r0, [r4]
-_08156B80:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8156B38
-
- thumb_func_start sub_8156B88
-sub_8156B88: @ 8156B88
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r1, =gContestMonConditions
- adds r0, r2, 0
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 1
- adds r0, r1
- ldrh r0, [r0]
- strh r0, [r2, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8156B88
-
- thumb_func_start sub_8156BB4
-sub_8156BB4: @ 8156BB4
- push {r4,r5,lr}
- bl sub_8156B88
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3]
- ldrb r0, [r3, 0x1]
- lsls r0, 8
- orrs r1, r0
- movs r5, 0x18
- ldrsh r0, [r2, r5]
- lsls r1, 16
- asrs r1, 16
- cmp r0, r1
- bge _08156BF8
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x4]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08156BFC
- .pool
-_08156BF8:
- adds r0, r3, 0x6
- str r0, [r4]
-_08156BFC:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8156BB4
-
- thumb_func_start sub_8156C04
-sub_8156C04: @ 8156C04
- push {r4,r5,lr}
- bl sub_8156B88
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3]
- ldrb r0, [r3, 0x1]
- lsls r0, 8
- orrs r1, r0
- movs r5, 0x18
- ldrsh r0, [r2, r5]
- lsls r1, 16
- asrs r1, 16
- cmp r0, r1
- ble _08156C48
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x4]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08156C4C
- .pool
-_08156C48:
- adds r0, r3, 0x6
- str r0, [r4]
-_08156C4C:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8156C04
-
- thumb_func_start sub_8156C54
-sub_8156C54: @ 8156C54
- push {r4,r5,lr}
- bl sub_8156B88
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3]
- ldrb r0, [r3, 0x1]
- lsls r0, 8
- orrs r1, r0
- movs r5, 0x18
- ldrsh r0, [r2, r5]
- lsls r1, 16
- asrs r1, 16
- cmp r0, r1
- bne _08156C98
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x4]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08156C9C
- .pool
-_08156C98:
- adds r0, r3, 0x6
- str r0, [r4]
-_08156C9C:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8156C54
-
- thumb_func_start sub_8156CA4
-sub_8156CA4: @ 8156CA4
- push {r4,r5,lr}
- bl sub_8156B88
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3]
- ldrb r0, [r3, 0x1]
- lsls r0, 8
- orrs r1, r0
- movs r5, 0x18
- ldrsh r0, [r2, r5]
- lsls r1, 16
- asrs r1, 16
- cmp r0, r1
- beq _08156CE8
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x4]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08156CEC
- .pool
-_08156CE8:
- adds r0, r3, 0x6
- str r0, [r4]
-_08156CEC:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8156CA4
-
- thumb_func_start sub_8156CF4
-sub_8156CF4: @ 8156CF4
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- ldr r0, =gSpecialVar_ContestCategory
- ldrh r0, [r0]
- strh r0, [r1, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8156CF4
-
- thumb_func_start sub_8156D18
-sub_8156D18: @ 8156D18
- push {lr}
- bl sub_8156CF4
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _08156D54
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156D58
- .pool
-_08156D54:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156D58:
- pop {r0}
- bx r0
- thumb_func_end sub_8156D18
-
- thumb_func_start sub_8156D5C
-sub_8156D5C: @ 8156D5C
- push {lr}
- bl sub_8156CF4
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08156D98
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156D9C
- .pool
-_08156D98:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156D9C:
- pop {r0}
- bx r0
- thumb_func_end sub_8156D5C
-
- thumb_func_start sub_8156DA0
-sub_8156DA0: @ 8156DA0
- push {r4,lr}
- ldr r2, =gContestMons
- ldr r4, =gContestResources
- ldr r0, [r4]
- ldr r0, [r0, 0xC]
- ldrb r1, [r0, 0x4]
- lsls r1, 1
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- adds r2, 0x1E
- adds r1, r2
- ldrh r0, [r1]
- bl sub_80DD9F0
- ldr r1, [r4]
- ldr r1, [r1, 0xC]
- lsls r0, 24
- asrs r0, 24
- strh r0, [r1, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8156DA0
-
- thumb_func_start sub_8156DE4
-sub_8156DE4: @ 8156DE4
- push {r4,lr}
- bl sub_8156DA0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- movs r4, 0x18
- ldrsh r1, [r0, r4]
- movs r0, 0
- ldrsb r0, [r2, r0]
- cmp r1, r0
- bge _08156E20
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156E24
- .pool
-_08156E20:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156E24:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_8156DE4
-
- thumb_func_start sub_8156E2C
-sub_8156E2C: @ 8156E2C
- push {r4,lr}
- bl sub_8156DA0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- movs r4, 0x18
- ldrsh r1, [r0, r4]
- movs r0, 0
- ldrsb r0, [r2, r0]
- cmp r1, r0
- ble _08156E68
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156E6C
- .pool
-_08156E68:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156E6C:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_8156E2C
-
- thumb_func_start sub_8156E74
-sub_8156E74: @ 8156E74
- push {r4,lr}
- bl sub_8156DA0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- movs r4, 0x18
- ldrsh r1, [r0, r4]
- movs r0, 0
- ldrsb r0, [r2, r0]
- cmp r1, r0
- bne _08156EB0
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156EB4
- .pool
-_08156EB0:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156EB4:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_8156E74
-
- thumb_func_start sub_8156EBC
-sub_8156EBC: @ 8156EBC
- push {r4,lr}
- bl sub_8156DA0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- movs r4, 0x18
- ldrsh r1, [r0, r4]
- movs r0, 0
- ldrsb r0, [r2, r0]
- cmp r1, r0
- beq _08156EF8
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156EFC
- .pool
-_08156EF8:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156EFC:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_8156EBC
-
- thumb_func_start sub_8156F04
-sub_8156F04: @ 8156F04
- ldr r2, =gContestMons
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r3, [r0, 0xC]
- ldrb r1, [r3, 0x4]
- lsls r1, 1
- adds r0, r3, 0
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- adds r2, 0x1E
- adds r1, r2
- ldrh r0, [r1]
- ldr r1, =gContestMoves
- lsls r0, 3
- adds r0, r1
- ldrb r0, [r0]
- strh r0, [r3, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8156F04
-
- thumb_func_start sub_8156F44
-sub_8156F44: @ 8156F44
- push {lr}
- bl sub_8156F04
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _08156F80
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156F84
- .pool
-_08156F80:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156F84:
- pop {r0}
- bx r0
- thumb_func_end sub_8156F44
-
- thumb_func_start sub_8156F88
-sub_8156F88: @ 8156F88
- push {lr}
- bl sub_8156F04
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08156FC4
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08156FC8
- .pool
-_08156FC4:
- adds r0, r2, 0x5
- str r0, [r3]
-_08156FC8:
- pop {r0}
- bx r0
- thumb_func_end sub_8156F88
-
- thumb_func_start sub_8156FCC
-sub_8156FCC: @ 8156FCC
- ldr r2, =gContestMons
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r3, [r0, 0xC]
- ldrb r1, [r3, 0x4]
- lsls r1, 1
- adds r0, r3, 0
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- adds r2, 0x1E
- adds r1, r2
- ldrh r0, [r1]
- ldr r2, =gContestEffects
- ldr r1, =gContestMoves
- lsls r0, 3
- adds r0, r1
- ldrb r0, [r0]
- lsls r0, 2
- adds r0, r2
- ldrb r0, [r0]
- strh r0, [r3, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8156FCC
-
- thumb_func_start sub_8157018
-sub_8157018: @ 8157018
- push {lr}
- bl sub_8156FCC
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _08157054
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157058
- .pool
-_08157054:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157058:
- pop {r0}
- bx r0
- thumb_func_end sub_8157018
-
- thumb_func_start sub_815705C
-sub_815705C: @ 815705C
- push {lr}
- bl sub_8156FCC
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08157098
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _0815709C
- .pool
-_08157098:
- adds r0, r2, 0x5
- str r0, [r3]
-_0815709C:
- pop {r0}
- bx r0
- thumb_func_end sub_815705C
-
- thumb_func_start sub_81570A0
-sub_81570A0: @ 81570A0
- push {r4-r7,lr}
- ldr r2, =gContestMons
- ldr r5, =gContestResources
- ldr r0, [r5]
- ldr r1, [r0, 0xC]
- ldrb r0, [r1, 0x4]
- lsls r0, 1
- adds r1, 0x41
- ldrb r1, [r1]
- lsls r1, 6
- adds r0, r1
- adds r2, 0x1E
- adds r0, r2
- ldrh r0, [r0]
- ldr r3, =gContestEffects
- ldr r4, =gContestMoves
- lsls r0, 3
- adds r0, r4
- ldrb r0, [r0]
- lsls r0, 2
- adds r0, r3
- ldrb r7, [r0, 0x1]
- movs r6, 0
- ldr r0, =gAIScriptPtr
- mov r12, r0
- adds r1, r2
-_081570D4:
- ldrh r0, [r1]
- cmp r0, 0
- beq _081570EA
- lsls r0, 3
- adds r0, r4
- ldrb r0, [r0]
- lsls r0, 2
- adds r0, r3
- ldrb r0, [r0, 0x1]
- cmp r7, r0
- bcc _081570F2
-_081570EA:
- adds r1, 0x2
- adds r6, 0x1
- cmp r6, 0x3
- ble _081570D4
-_081570F2:
- cmp r6, 0x4
- bne _08157114
- ldr r0, [r5]
- ldr r1, [r0, 0xC]
- movs r0, 0x1
- b _0815711A
- .pool
-_08157114:
- ldr r0, [r5]
- ldr r1, [r0, 0xC]
- movs r0, 0
-_0815711A:
- strh r0, [r1, 0x18]
- mov r1, r12
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_81570A0
-
- thumb_func_start sub_815712C
-sub_815712C: @ 815712C
- push {lr}
- bl sub_81570A0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _08157164
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _0815716C
- .pool
-_08157164:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_0815716C:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_815712C
-
- thumb_func_start sub_8157174
-sub_8157174: @ 8157174
- push {r4-r7,lr}
- ldr r2, =gContestMons
- ldr r5, =gContestResources
- ldr r0, [r5]
- ldr r1, [r0, 0xC]
- ldrb r0, [r1, 0x4]
- lsls r0, 1
- adds r1, 0x41
- ldrb r1, [r1]
- lsls r1, 6
- adds r0, r1
- adds r2, 0x1E
- adds r0, r2
- ldrh r0, [r0]
- ldr r3, =gContestEffects
- ldr r4, =gContestMoves
- lsls r0, 3
- adds r0, r4
- ldrb r0, [r0]
- lsls r0, 2
- adds r0, r3
- ldrb r7, [r0, 0x2]
- movs r6, 0
- ldr r0, =gAIScriptPtr
- mov r12, r0
- adds r1, r2
-_081571A8:
- ldrh r0, [r1]
- cmp r0, 0
- beq _081571BE
- lsls r0, 3
- adds r0, r4
- ldrb r0, [r0]
- lsls r0, 2
- adds r0, r3
- ldrb r0, [r0, 0x2]
- cmp r7, r0
- bcc _081571C6
-_081571BE:
- adds r1, 0x2
- adds r6, 0x1
- cmp r6, 0x3
- ble _081571A8
-_081571C6:
- cmp r6, 0x4
- bne _081571E8
- ldr r0, [r5]
- ldr r1, [r0, 0xC]
- movs r0, 0x1
- b _081571EE
- .pool
-_081571E8:
- ldr r0, [r5]
- ldr r1, [r0, 0xC]
- movs r0, 0
-_081571EE:
- strh r0, [r1, 0x18]
- mov r1, r12
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_8157174
-
- thumb_func_start sub_8157200
-sub_8157200: @ 8157200
- push {lr}
- bl sub_8157174
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _08157238
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157240
- .pool
-_08157238:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x5
- str r0, [r1]
-_08157240:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157200
-
- thumb_func_start sub_8157248
-sub_8157248: @ 8157248
- push {r4,lr}
- ldr r2, =gContestMons
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r4, [r0, 0xC]
- ldrb r1, [r4, 0x4]
- lsls r1, 1
- adds r0, r4, 0
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- adds r2, 0x1E
- adds r1, r2
- ldrh r0, [r1]
- ldr r2, =gContestEffects
- ldr r1, =gContestMoves
- lsls r0, 3
- adds r0, r1
- ldrb r0, [r0]
- lsls r0, 2
- adds r0, r2
- ldrb r0, [r0, 0x1]
- movs r1, 0xA
- bl __udivsi3
- lsls r0, 24
- lsrs r0, 24
- strh r0, [r4, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157248
-
- thumb_func_start sub_81572A4
-sub_81572A4: @ 81572A4
- push {lr}
- bl sub_8157248
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _081572E0
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081572E4
- .pool
-_081572E0:
- adds r0, r2, 0x5
- str r0, [r3]
-_081572E4:
- pop {r0}
- bx r0
- thumb_func_end sub_81572A4
-
- thumb_func_start sub_81572E8
-sub_81572E8: @ 81572E8
- push {lr}
- bl sub_8157248
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _08157324
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157328
- .pool
-_08157324:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157328:
- pop {r0}
- bx r0
- thumb_func_end sub_81572E8
-
- thumb_func_start sub_815732C
-sub_815732C: @ 815732C
- push {lr}
- bl sub_8157248
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _08157368
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _0815736C
- .pool
-_08157368:
- adds r0, r2, 0x5
- str r0, [r3]
-_0815736C:
- pop {r0}
- bx r0
- thumb_func_end sub_815732C
-
- thumb_func_start sub_8157370
-sub_8157370: @ 8157370
- push {lr}
- bl sub_8157248
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _081573AC
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081573B0
- .pool
-_081573AC:
- adds r0, r2, 0x5
- str r0, [r3]
-_081573B0:
- pop {r0}
- bx r0
- thumb_func_end sub_8157370
-
- thumb_func_start sub_81573B4
-sub_81573B4: @ 81573B4
- push {r4,lr}
- ldr r2, =gContestMons
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r4, [r0, 0xC]
- ldrb r1, [r4, 0x4]
- lsls r1, 1
- adds r0, r4, 0
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- adds r2, 0x1E
- adds r1, r2
- ldrh r0, [r1]
- ldr r2, =gContestEffects
- ldr r1, =gContestMoves
- lsls r0, 3
- adds r0, r1
- ldrb r0, [r0]
- lsls r0, 2
- adds r0, r2
- ldrb r0, [r0, 0x2]
- movs r1, 0xA
- bl __udivsi3
- lsls r0, 24
- lsrs r0, 24
- strh r0, [r4, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81573B4
-
- thumb_func_start sub_8157410
-sub_8157410: @ 8157410
- push {lr}
- bl sub_81573B4
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _0815744C
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157450
- .pool
-_0815744C:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157450:
- pop {r0}
- bx r0
- thumb_func_end sub_8157410
-
- thumb_func_start sub_8157454
-sub_8157454: @ 8157454
- push {lr}
- bl sub_81573B4
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _08157490
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157494
- .pool
-_08157490:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157494:
- pop {r0}
- bx r0
- thumb_func_end sub_8157454
-
- thumb_func_start sub_8157498
-sub_8157498: @ 8157498
- push {lr}
- bl sub_81573B4
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _081574D4
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081574D8
- .pool
-_081574D4:
- adds r0, r2, 0x5
- str r0, [r3]
-_081574D8:
- pop {r0}
- bx r0
- thumb_func_end sub_8157498
-
- thumb_func_start sub_81574DC
-sub_81574DC: @ 81574DC
- push {lr}
- bl sub_81573B4
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08157518
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _0815751C
- .pool
-_08157518:
- adds r0, r2, 0x5
- str r0, [r3]
-_0815751C:
- pop {r0}
- bx r0
- thumb_func_end sub_81574DC
-
- thumb_func_start sub_8157520
-sub_8157520: @ 8157520
- push {r4,r5,lr}
- ldr r3, =gContestMons
- ldr r5, =gContestResources
- ldr r4, [r5]
- ldr r1, [r4, 0xC]
- ldrb r0, [r1, 0x4]
- lsls r0, 1
- adds r1, 0x41
- ldrb r2, [r1]
- lsls r1, r2, 6
- adds r0, r1
- adds r3, 0x1E
- adds r0, r3
- ldrh r3, [r0]
- ldr r1, [r4, 0x4]
- lsls r0, r2, 3
- subs r0, r2
- lsls r0, 2
- adds r0, r1
- ldrh r1, [r0, 0x8]
- cmp r3, r1
- beq _08157558
- movs r1, 0
- b _08157560
- .pool
-_08157558:
- ldrb r0, [r0, 0xB]
- lsls r0, 25
- lsrs r0, 29
- adds r1, r0, 0x1
-_08157560:
- ldr r0, [r5]
- ldr r0, [r0, 0xC]
- strh r1, [r0, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157520
-
- thumb_func_start sub_8157578
-sub_8157578: @ 8157578
- push {lr}
- bl sub_8157520
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _081575B4
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081575B8
- .pool
-_081575B4:
- adds r0, r2, 0x5
- str r0, [r3]
-_081575B8:
- pop {r0}
- bx r0
- thumb_func_end sub_8157578
-
- thumb_func_start sub_81575BC
-sub_81575BC: @ 81575BC
- push {lr}
- bl sub_8157520
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _081575F8
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081575FC
- .pool
-_081575F8:
- adds r0, r2, 0x5
- str r0, [r3]
-_081575FC:
- pop {r0}
- bx r0
- thumb_func_end sub_81575BC
-
- thumb_func_start sub_8157600
-sub_8157600: @ 8157600
- push {lr}
- bl sub_8157520
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _0815763C
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157640
- .pool
-_0815763C:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157640:
- pop {r0}
- bx r0
- thumb_func_end sub_8157600
-
- thumb_func_start sub_8157644
-sub_8157644: @ 8157644
- push {lr}
- bl sub_8157520
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08157680
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157684
- .pool
-_08157680:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157684:
- pop {r0}
- bx r0
- thumb_func_end sub_8157644
-
- thumb_func_start sub_8157688
-sub_8157688: @ 8157688
- push {r4-r6,lr}
- movs r3, 0
- ldr r2, =gContestMons
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- ldrb r1, [r0, 0x4]
- lsls r1, 1
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- adds r2, 0x1E
- adds r1, r2
- ldrh r5, [r1]
- movs r4, 0
- adds r6, r2, 0
-_081576AA:
- lsls r1, r4, 1
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- adds r1, r6
- ldrh r0, [r1]
- cmp r0, 0
- beq _081576D2
- adds r1, r0, 0
- adds r0, r5, 0
- bl AreMovesContestCombo
- lsls r0, 24
- lsrs r3, r0, 24
- cmp r3, 0
- bne _081576DC
-_081576D2:
- adds r4, 0x1
- cmp r4, 0x3
- ble _081576AA
- cmp r3, 0
- beq _081576DE
-_081576DC:
- movs r3, 0x1
-_081576DE:
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- strh r3, [r0, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157688
-
- thumb_func_start sub_8157700
-sub_8157700: @ 8157700
- push {lr}
- bl sub_8157688
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _08157738
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157740
- .pool
-_08157738:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157740:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157700
-
- thumb_func_start sub_8157748
-sub_8157748: @ 8157748
- push {lr}
- bl sub_8157688
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bne _08157780
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157788
- .pool
-_08157780:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157788:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157748
-
- thumb_func_start sub_8157790
-sub_8157790: @ 8157790
- push {r4-r6,lr}
- movs r3, 0
- ldr r2, =gContestMons
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- ldrb r1, [r0, 0x4]
- lsls r1, 1
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- adds r2, 0x1E
- adds r1, r2
- ldrh r5, [r1]
- movs r4, 0
- adds r6, r2, 0
-_081577B2:
- lsls r1, r4, 1
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- adds r1, r6
- ldrh r0, [r1]
- cmp r0, 0
- beq _081577D8
- adds r1, r5, 0
- bl AreMovesContestCombo
- lsls r0, 24
- lsrs r3, r0, 24
- cmp r3, 0
- bne _081577E2
-_081577D8:
- adds r4, 0x1
- cmp r4, 0x3
- ble _081577B2
- cmp r3, 0
- beq _081577E4
-_081577E2:
- movs r3, 0x1
-_081577E4:
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- strh r3, [r0, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157790
-
- thumb_func_start sub_8157808
-sub_8157808: @ 8157808
- push {lr}
- bl sub_8157790
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _08157840
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157848
- .pool
-_08157840:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157848:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157808
-
- thumb_func_start sub_8157850
-sub_8157850: @ 8157850
- push {lr}
- bl sub_8157790
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bne _08157888
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157890
- .pool
-_08157888:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157890:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157850
-
- thumb_func_start sub_8157898
-sub_8157898: @ 8157898
- push {r4-r6,lr}
- movs r5, 0
- ldr r3, =gContestMons
- ldr r6, =gContestResources
- ldr r4, [r6]
- ldr r1, [r4, 0xC]
- ldrb r0, [r1, 0x4]
- lsls r0, 1
- adds r1, 0x41
- ldrb r2, [r1]
- lsls r1, r2, 6
- adds r0, r1
- adds r3, 0x1E
- adds r0, r3
- ldrh r3, [r0]
- ldr r1, [r4, 0x4]
- lsls r0, r2, 3
- subs r0, r2
- lsls r0, 2
- adds r1, r0, r1
- ldrh r0, [r1, 0x8]
- cmp r0, 0
- beq _081578D0
- adds r1, r3, 0
- bl AreMovesContestCombo
- lsls r0, 24
- lsrs r5, r0, 24
-_081578D0:
- cmp r5, 0
- beq _081578D6
- movs r5, 0x1
-_081578D6:
- ldr r0, [r6]
- ldr r0, [r0, 0xC]
- strh r5, [r0, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157898
-
- thumb_func_start sub_81578F8
-sub_81578F8: @ 81578F8
- push {lr}
- bl sub_8157898
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _08157930
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157938
- .pool
-_08157930:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157938:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81578F8
-
- thumb_func_start sub_8157940
-sub_8157940: @ 8157940
- push {lr}
- bl sub_8157898
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bne _08157978
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157980
- .pool
-_08157978:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157980:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157940
-
- thumb_func_start sub_8157988
-sub_8157988: @ 8157988
- push {r4,r5,lr}
- ldr r4, =gAIScriptPtr
- ldr r0, [r4]
- ldrb r0, [r0, 0x1]
- bl sub_81564AC
- lsls r0, 24
- lsrs r0, 24
- ldr r1, =gContestResources
- ldr r1, [r1]
- ldr r5, [r1, 0xC]
- ldr r2, [r1, 0x4]
- lsls r1, r0, 3
- subs r1, r0
- lsls r1, 2
- adds r1, r2
- movs r0, 0xD
- ldrsb r0, [r1, r0]
- movs r1, 0xA
- bl __divsi3
- lsls r0, 24
- asrs r0, 24
- strh r0, [r5, 0x18]
- ldr r0, [r4]
- adds r0, 0x2
- str r0, [r4]
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157988
-
- thumb_func_start sub_81579CC
-sub_81579CC: @ 81579CC
- push {lr}
- bl sub_8157988
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _08157A08
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157A0C
- .pool
-_08157A08:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157A0C:
- pop {r0}
- bx r0
- thumb_func_end sub_81579CC
-
- thumb_func_start sub_8157A10
-sub_8157A10: @ 8157A10
- push {lr}
- bl sub_8157988
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _08157A4C
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157A50
- .pool
-_08157A4C:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157A50:
- pop {r0}
- bx r0
- thumb_func_end sub_8157A10
-
- thumb_func_start sub_8157A54
-sub_8157A54: @ 8157A54
- push {lr}
- bl sub_8157988
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _08157A90
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157A94
- .pool
-_08157A90:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157A94:
- pop {r0}
- bx r0
- thumb_func_end sub_8157A54
-
- thumb_func_start sub_8157A98
-sub_8157A98: @ 8157A98
- push {lr}
- bl sub_8157988
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08157AD4
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157AD8
- .pool
-_08157AD4:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157AD8:
- pop {r0}
- bx r0
- thumb_func_end sub_8157A98
-
- thumb_func_start sub_8157ADC
-sub_8157ADC: @ 8157ADC
- push {r4-r6,lr}
- movs r6, 0
- ldr r5, =gAIScriptPtr
- ldr r0, [r5]
- ldrb r0, [r0, 0x1]
- bl sub_81564AC
- lsls r0, 24
- lsrs r4, r0, 24
- adds r0, r4, 0
- bl sub_80DE1E8
- lsls r0, 24
- cmp r0, 0
- beq _08157B18
- ldr r2, =gContestMoves
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0x4]
- lsls r0, r4, 3
- subs r0, r4
- lsls r0, 2
- adds r0, r1
- ldrh r0, [r0, 0x8]
- lsls r0, 3
- adds r0, r2
- ldrb r1, [r0, 0x2]
- negs r0, r1
- orrs r0, r1
- lsrs r6, r0, 31
-_08157B18:
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- strh r6, [r0, 0x18]
- ldr r0, [r5]
- adds r0, 0x2
- str r0, [r5]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157ADC
-
- thumb_func_start sub_8157B38
-sub_8157B38: @ 8157B38
- push {lr}
- bl sub_8157ADC
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _08157B74
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157B78
- .pool
-_08157B74:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157B78:
- pop {r0}
- bx r0
- thumb_func_end sub_8157B38
-
- thumb_func_start sub_8157B7C
-sub_8157B7C: @ 8157B7C
- push {lr}
- bl sub_8157ADC
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _08157BB8
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157BBC
- .pool
-_08157BB8:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157BBC:
- pop {r0}
- bx r0
- thumb_func_end sub_8157B7C
-
- thumb_func_start sub_8157BC0
-sub_8157BC0: @ 8157BC0
- push {lr}
- bl sub_8157ADC
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _08157BFC
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157C00
- .pool
-_08157BFC:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157C00:
- pop {r0}
- bx r0
- thumb_func_end sub_8157BC0
-
- thumb_func_start sub_8157C04
-sub_8157C04: @ 8157C04
- push {lr}
- bl sub_8157ADC
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08157C40
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157C44
- .pool
-_08157C40:
- adds r0, r2, 0x5
- str r0, [r3]
-_08157C44:
- pop {r0}
- bx r0
- thumb_func_end sub_8157C04
-
- thumb_func_start sub_8157C48
-sub_8157C48: @ 8157C48
- push {lr}
- ldr r0, =gAIScriptPtr
- ldr r0, [r0]
- ldrb r0, [r0, 0x1]
- bl sub_81564AC
- lsls r0, 24
- lsrs r0, 24
- bl sub_80DBCA8
- lsls r0, 24
- cmp r0, 0
- beq _08157C74
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- movs r0, 0
- b _08157C7C
- .pool
-_08157C74:
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- movs r0, 0x1
-_08157C7C:
- strh r0, [r1, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x2
- str r0, [r1]
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157C48
-
- thumb_func_start sub_8157C94
-sub_8157C94: @ 8157C94
- push {lr}
- bl sub_8157C48
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _08157CCC
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157CD4
- .pool
-_08157CCC:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157CD4:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157C94
-
- thumb_func_start sub_8157CDC
-sub_8157CDC: @ 8157CDC
- push {lr}
- bl sub_8157C48
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bne _08157D14
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157D1C
- .pool
-_08157D14:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157D1C:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157CDC
-
- thumb_func_start sub_8157D24
-sub_8157D24: @ 8157D24
- push {r4,lr}
- ldr r4, =gAIScriptPtr
- ldr r0, [r4]
- ldrb r0, [r0, 0x1]
- bl sub_81564AC
- lsls r0, 24
- lsrs r0, 24
- ldr r1, =gContestResources
- ldr r1, [r1]
- ldr r3, [r1, 0xC]
- ldr r2, [r1, 0x4]
- lsls r1, r0, 3
- subs r1, r0
- lsls r1, 2
- adds r1, r2
- ldrb r0, [r1, 0x15]
- lsls r0, 28
- lsrs r0, 31
- strh r0, [r3, 0x18]
- ldr r0, [r4]
- adds r0, 0x2
- str r0, [r4]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157D24
-
- thumb_func_start sub_8157D60
-sub_8157D60: @ 8157D60
- push {lr}
- bl sub_8157D24
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _08157D98
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157DA0
- .pool
-_08157D98:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157DA0:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157D60
-
- thumb_func_start sub_8157DA8
-sub_8157DA8: @ 8157DA8
- push {lr}
- bl sub_8157D24
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bne _08157DE0
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157DE8
- .pool
-_08157DE0:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157DE8:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157DA8
-
- thumb_func_start sub_8157DF0
-sub_8157DF0: @ 8157DF0
- push {r4,r5,lr}
- ldr r4, =gAIScriptPtr
- ldr r0, [r4]
- ldrb r0, [r0, 0x1]
- bl sub_81564AC
- lsls r0, 24
- lsrs r0, 24
- ldr r1, =gContestResources
- ldr r1, [r1]
- ldr r5, [r1, 0xC]
- ldr r3, [r1, 0x4]
- lsls r1, r0, 3
- subs r1, r0
- lsls r1, 2
- adds r1, r3
- adds r0, r5, 0
- adds r0, 0x41
- ldrb r2, [r0]
- lsls r0, r2, 3
- subs r0, r2
- lsls r0, 2
- adds r0, r3
- ldrh r1, [r1, 0x4]
- ldrh r0, [r0, 0x4]
- subs r1, r0
- strh r1, [r5, 0x18]
- ldr r0, [r4]
- adds r0, 0x2
- str r0, [r4]
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157DF0
-
- thumb_func_start sub_8157E3C
-sub_8157E3C: @ 8157E3C
- push {lr}
- bl sub_8157DF0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bge _08157E74
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157E7C
- .pool
-_08157E74:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157E7C:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157E3C
-
- thumb_func_start sub_8157E84
-sub_8157E84: @ 8157E84
- push {lr}
- bl sub_8157DF0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- ble _08157EBC
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157EC4
- .pool
-_08157EBC:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157EC4:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157E84
-
- thumb_func_start sub_8157ECC
-sub_8157ECC: @ 8157ECC
- push {lr}
- bl sub_8157DF0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bne _08157F04
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157F0C
- .pool
-_08157F04:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157F0C:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157ECC
-
- thumb_func_start sub_8157F14
-sub_8157F14: @ 8157F14
- push {lr}
- bl sub_8157DF0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _08157F4C
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157F54
- .pool
-_08157F4C:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157F54:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157F14
-
- thumb_func_start sub_8157F5C
-sub_8157F5C: @ 8157F5C
- push {r4,lr}
- ldr r4, =gAIScriptPtr
- ldr r0, [r4]
- ldrb r0, [r0, 0x1]
- bl sub_81564AC
- lsls r0, 24
- ldr r1, =gContestResources
- ldr r1, [r1]
- ldr r3, [r1, 0xC]
- ldr r2, =gContestMonConditions
- lsrs r0, 23
- adds r0, r2
- adds r1, r3, 0
- adds r1, 0x41
- ldrb r1, [r1]
- lsls r1, 1
- adds r1, r2
- ldrh r0, [r0]
- ldrh r1, [r1]
- subs r0, r1
- strh r0, [r3, 0x18]
- ldr r0, [r4]
- adds r0, 0x2
- str r0, [r4]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157F5C
-
- thumb_func_start sub_8157FA0
-sub_8157FA0: @ 8157FA0
- push {lr}
- bl sub_8157F5C
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bge _08157FD8
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08157FE0
- .pool
-_08157FD8:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08157FE0:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157FA0
-
- thumb_func_start sub_8157FE8
-sub_8157FE8: @ 8157FE8
- push {lr}
- bl sub_8157F5C
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- ble _08158020
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08158028
- .pool
-_08158020:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08158028:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8157FE8
-
- thumb_func_start sub_8158030
-sub_8158030: @ 8158030
- push {lr}
- bl sub_8157F5C
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bne _08158068
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08158070
- .pool
-_08158068:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08158070:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8158030
-
- thumb_func_start sub_8158078
-sub_8158078: @ 8158078
- push {lr}
- bl sub_8157F5C
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _081580B0
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081580B8
- .pool
-_081580B0:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_081580B8:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8158078
-
- thumb_func_start sub_81580C0
-sub_81580C0: @ 81580C0
- push {r4,r5,lr}
- ldr r5, =gAIScriptPtr
- ldr r0, [r5]
- ldrb r0, [r0, 0x1]
- bl sub_81564AC
- lsls r0, 24
- ldr r3, [r5]
- ldrb r2, [r3, 0x2]
- ldr r1, =gContestResources
- ldr r4, [r1]
- ldr r1, [r4]
- lsrs r0, 23
- lsls r2, 3
- adds r0, r2
- adds r1, 0x1C
- adds r1, r0
- ldrh r0, [r1]
- ldr r2, [r4, 0xC]
- ldr r1, =gContestMoves
- lsls r0, 3
- adds r0, r1
- ldrb r0, [r0]
- strh r0, [r2, 0x18]
- adds r3, 0x3
- str r3, [r5]
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81580C0
-
- thumb_func_start sub_8158108
-sub_8158108: @ 8158108
- push {lr}
- bl sub_81580C0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _08158144
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08158148
- .pool
-_08158144:
- adds r0, r2, 0x5
- str r0, [r3]
-_08158148:
- pop {r0}
- bx r0
- thumb_func_end sub_8158108
-
- thumb_func_start sub_815814C
-sub_815814C: @ 815814C
- push {lr}
- bl sub_81580C0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _08158188
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _0815818C
- .pool
-_08158188:
- adds r0, r2, 0x5
- str r0, [r3]
-_0815818C:
- pop {r0}
- bx r0
- thumb_func_end sub_815814C
-
- thumb_func_start sub_8158190
-sub_8158190: @ 8158190
- push {lr}
- bl sub_81580C0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _081581CC
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081581D0
- .pool
-_081581CC:
- adds r0, r2, 0x5
- str r0, [r3]
-_081581D0:
- pop {r0}
- bx r0
- thumb_func_end sub_8158190
-
- thumb_func_start sub_81581D4
-sub_81581D4: @ 81581D4
- push {lr}
- bl sub_81580C0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08158210
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08158214
- .pool
-_08158210:
- adds r0, r2, 0x5
- str r0, [r3]
-_08158214:
- pop {r0}
- bx r0
- thumb_func_end sub_81581D4
-
- thumb_func_start sub_8158218
-sub_8158218: @ 8158218
- push {r4,r5,lr}
- ldr r5, =gAIScriptPtr
- ldr r0, [r5]
- ldrb r0, [r0, 0x1]
- bl sub_81564AC
- lsls r0, 24
- lsrs r0, 24
- ldr r3, [r5]
- ldrb r2, [r3, 0x2]
- ldr r1, =gContestResources
- ldr r4, [r1]
- ldr r1, [r4]
- lsls r2, 2
- adds r0, r2
- adds r1, 0x44
- adds r1, r0
- ldr r2, [r4, 0xC]
- movs r0, 0
- ldrsb r0, [r1, r0]
- strh r0, [r2, 0x18]
- adds r3, 0x3
- str r3, [r5]
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8158218
-
- thumb_func_start sub_8158254
-sub_8158254: @ 8158254
- push {lr}
- bl sub_8158218
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bge _08158290
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08158294
- .pool
-_08158290:
- adds r0, r2, 0x5
- str r0, [r3]
-_08158294:
- pop {r0}
- bx r0
- thumb_func_end sub_8158254
-
- thumb_func_start sub_8158298
-sub_8158298: @ 8158298
- push {lr}
- bl sub_8158218
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- ble _081582D4
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081582D8
- .pool
-_081582D4:
- adds r0, r2, 0x5
- str r0, [r3]
-_081582D8:
- pop {r0}
- bx r0
- thumb_func_end sub_8158298
-
- thumb_func_start sub_81582DC
-sub_81582DC: @ 81582DC
- push {lr}
- bl sub_8158218
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _08158318
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _0815831C
- .pool
-_08158318:
- adds r0, r2, 0x5
- str r0, [r3]
-_0815831C:
- pop {r0}
- bx r0
- thumb_func_end sub_81582DC
-
- thumb_func_start sub_8158320
-sub_8158320: @ 8158320
- push {lr}
- bl sub_8158218
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _0815835C
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08158360
- .pool
-_0815835C:
- adds r0, r2, 0x5
- str r0, [r3]
-_08158360:
- pop {r0}
- bx r0
- thumb_func_end sub_8158320
-
- thumb_func_start sub_8158364
-sub_8158364: @ 8158364
- push {r4,r5,lr}
- ldr r5, =gAIScriptPtr
- ldr r0, [r5]
- ldrb r0, [r0, 0x1]
- bl sub_81564AC
- lsls r0, 24
- ldr r3, [r5]
- ldrb r2, [r3, 0x2]
- ldr r1, =gContestResources
- ldr r4, [r1]
- ldr r1, [r4]
- lsrs r0, 23
- lsls r2, 3
- adds r0, r2
- adds r1, 0x1C
- adds r1, r0
- ldrh r0, [r1]
- ldr r4, [r4, 0xC]
- ldr r2, =gContestEffects
- ldr r1, =gContestMoves
- lsls r0, 3
- adds r0, r1
- ldrb r0, [r0]
- lsls r0, 2
- adds r0, r2
- ldrb r0, [r0]
- strh r0, [r4, 0x18]
- adds r3, 0x3
- str r3, [r5]
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8158364
-
- thumb_func_start sub_81583B8
-sub_81583B8: @ 81583B8
- push {lr}
- bl sub_8158364
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- bne _081583F4
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081583F8
- .pool
-_081583F4:
- adds r0, r2, 0x5
- str r0, [r3]
-_081583F8:
- pop {r0}
- bx r0
- thumb_func_end sub_81583B8
-
- thumb_func_start sub_81583FC
-sub_81583FC: @ 81583FC
- push {lr}
- bl sub_8158364
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- cmp r0, r1
- beq _08158438
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _0815843C
- .pool
-_08158438:
- adds r0, r2, 0x5
- str r0, [r3]
-_0815843C:
- pop {r0}
- bx r0
- thumb_func_end sub_81583FC
-
- thumb_func_start sub_8158440
-sub_8158440: @ 8158440
- push {r4,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r3, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r2, [r4]
- ldrb r0, [r2, 0x1]
- lsls r0, 1
- adds r1, r3, 0
- adds r1, 0x1A
- adds r1, r0
- ldrh r0, [r3, 0x18]
- strh r0, [r1]
- adds r2, 0x2
- str r2, [r4]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8158440
-
- thumb_func_start sub_815846C
-sub_815846C: @ 815846C
- push {r4,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r3, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r2, [r4]
- ldrb r0, [r2, 0x1]
- lsls r0, 1
- adds r3, 0x1A
- adds r3, r0
- ldrb r1, [r2, 0x2]
- ldrb r0, [r2, 0x3]
- lsls r0, 8
- orrs r1, r0
- strh r1, [r3]
- adds r2, 0x4
- str r2, [r4]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_815846C
-
- thumb_func_start sub_815849C
-sub_815849C: @ 815849C
- push {r4,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r0, [r3, 0x1]
- lsls r0, 1
- adds r2, 0x1A
- adds r2, r0
- movs r1, 0x2
- ldrsb r1, [r3, r1]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrh r0, [r2]
- adds r1, r0
- strh r1, [r2]
- adds r3, 0x4
- str r3, [r4]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_815849C
-
- thumb_func_start sub_81584D4
-sub_81584D4: @ 81584D4
- push {r4,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3, 0x1]
- lsls r1, 1
- adds r2, 0x1A
- adds r1, r2, r1
- ldrb r0, [r3, 0x2]
- lsls r0, 1
- adds r2, r0
- ldrh r0, [r2]
- ldrh r2, [r1]
- adds r0, r2
- strh r0, [r1]
- adds r3, 0x3
- str r3, [r4]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81584D4
-
- thumb_func_start sub_8158508
-sub_8158508: @ 8158508
- push {r4,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3, 0x1]
- lsls r1, 1
- adds r2, 0x1A
- adds r1, r2, r1
- ldrb r0, [r3, 0x2]
- lsls r0, 1
- adds r2, r0
- ldrh r0, [r2]
- ldrh r2, [r1]
- adds r0, r2
- strh r0, [r1]
- adds r3, 0x3
- str r3, [r4]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8158508
-
- thumb_func_start sub_815853C
-sub_815853C: @ 815853C
- push {r4,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r0, [r3, 0x1]
- lsls r0, 1
- adds r1, 0x1A
- adds r1, r0
- movs r0, 0
- ldrsh r2, [r1, r0]
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- cmp r2, r1
- bge _08158580
- ldrb r1, [r3, 0x4]
- ldrb r0, [r3, 0x5]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x6]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x7]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08158586
- .pool
-_08158580:
- adds r0, r3, 0
- adds r0, 0x8
- str r0, [r4]
-_08158586:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_815853C
-
- thumb_func_start sub_815858C
-sub_815858C: @ 815858C
- push {r4,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r0, [r3, 0x1]
- lsls r0, 1
- adds r1, 0x1A
- adds r1, r0
- movs r0, 0
- ldrsh r2, [r1, r0]
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- cmp r2, r1
- ble _081585D0
- ldrb r1, [r3, 0x4]
- ldrb r0, [r3, 0x5]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x6]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x7]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _081585D6
- .pool
-_081585D0:
- adds r0, r3, 0
- adds r0, 0x8
- str r0, [r4]
-_081585D6:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_815858C
-
- thumb_func_start sub_81585DC
-sub_81585DC: @ 81585DC
- push {r4,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r0, [r3, 0x1]
- lsls r0, 1
- adds r1, 0x1A
- adds r1, r0
- movs r0, 0
- ldrsh r2, [r1, r0]
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- cmp r2, r1
- bne _08158620
- ldrb r1, [r3, 0x4]
- ldrb r0, [r3, 0x5]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x6]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x7]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08158626
- .pool
-_08158620:
- adds r0, r3, 0
- adds r0, 0x8
- str r0, [r4]
-_08158626:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_81585DC
-
- thumb_func_start sub_815862C
-sub_815862C: @ 815862C
- push {r4,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r0, [r3, 0x1]
- lsls r0, 1
- adds r1, 0x1A
- adds r1, r0
- movs r0, 0
- ldrsh r2, [r1, r0]
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- cmp r2, r1
- beq _08158670
- ldrb r1, [r3, 0x4]
- ldrb r0, [r3, 0x5]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x6]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x7]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08158676
- .pool
-_08158670:
- adds r0, r3, 0
- adds r0, 0x8
- str r0, [r4]
-_08158676:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_815862C
-
- thumb_func_start sub_815867C
-sub_815867C: @ 815867C
- push {r4,r5,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3, 0x1]
- lsls r1, 1
- adds r2, 0x1A
- adds r1, r2, r1
- ldrb r0, [r3, 0x2]
- lsls r0, 1
- adds r2, r0
- movs r0, 0
- ldrsh r1, [r1, r0]
- movs r5, 0
- ldrsh r0, [r2, r5]
- cmp r1, r0
- bge _081586C4
- ldrb r1, [r3, 0x3]
- ldrb r0, [r3, 0x4]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x6]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _081586C8
- .pool
-_081586C4:
- adds r0, r3, 0x7
- str r0, [r4]
-_081586C8:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_815867C
-
- thumb_func_start sub_81586D0
-sub_81586D0: @ 81586D0
- push {r4,r5,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3, 0x1]
- lsls r1, 1
- adds r2, 0x1A
- adds r1, r2, r1
- ldrb r0, [r3, 0x2]
- lsls r0, 1
- adds r2, r0
- movs r0, 0
- ldrsh r1, [r1, r0]
- movs r5, 0
- ldrsh r0, [r2, r5]
- cmp r1, r0
- ble _08158718
- ldrb r1, [r3, 0x3]
- ldrb r0, [r3, 0x4]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x6]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _0815871C
- .pool
-_08158718:
- adds r0, r3, 0x7
- str r0, [r4]
-_0815871C:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_81586D0
-
- thumb_func_start sub_8158724
-sub_8158724: @ 8158724
- push {r4,r5,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3, 0x1]
- lsls r1, 1
- adds r2, 0x1A
- adds r1, r2, r1
- ldrb r0, [r3, 0x2]
- lsls r0, 1
- adds r2, r0
- movs r0, 0
- ldrsh r1, [r1, r0]
- movs r5, 0
- ldrsh r0, [r2, r5]
- cmp r1, r0
- bne _0815876C
- ldrb r1, [r3, 0x3]
- ldrb r0, [r3, 0x4]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x6]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08158770
- .pool
-_0815876C:
- adds r0, r3, 0x7
- str r0, [r4]
-_08158770:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8158724
-
- thumb_func_start sub_8158778
-sub_8158778: @ 8158778
- push {r4,r5,lr}
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r1, [r3, 0x1]
- lsls r1, 1
- adds r2, 0x1A
- adds r1, r2, r1
- ldrb r0, [r3, 0x2]
- lsls r0, 1
- adds r2, r0
- movs r0, 0
- ldrsh r1, [r1, r0]
- movs r5, 0
- ldrsh r0, [r2, r5]
- cmp r1, r0
- beq _081587C0
- ldrb r1, [r3, 0x3]
- ldrb r0, [r3, 0x4]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x6]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _081587C4
- .pool
-_081587C0:
- adds r0, r3, 0x7
- str r0, [r4]
-_081587C4:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8158778
-
- thumb_func_start sub_81587CC
-sub_81587CC: @ 81587CC
- push {r4,r5,lr}
- bl Random
- movs r2, 0xFF
- ands r2, r0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r0, [r3, 0x1]
- lsls r0, 1
- adds r1, 0x1A
- adds r1, r0
- movs r5, 0
- ldrsh r0, [r1, r5]
- cmp r2, r0
- bge _08158810
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x4]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08158814
- .pool
-_08158810:
- adds r0, r3, 0x6
- str r0, [r4]
-_08158814:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_81587CC
-
- thumb_func_start sub_815881C
-sub_815881C: @ 815881C
- push {r4,r5,lr}
- bl Random
- movs r2, 0xFF
- ands r2, r0
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r1, [r0, 0xC]
- ldr r4, =gAIScriptPtr
- ldr r3, [r4]
- ldrb r0, [r3, 0x1]
- lsls r0, 1
- adds r1, 0x1A
- adds r1, r0
- movs r5, 0
- ldrsh r0, [r1, r5]
- cmp r2, r0
- ble _08158860
- ldrb r1, [r3, 0x2]
- ldrb r0, [r3, 0x3]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r3, 0x4]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r3, 0x5]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- b _08158864
- .pool
-_08158860:
- adds r0, r3, 0x6
- str r0, [r4]
-_08158864:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_815881C
-
- thumb_func_start sub_815886C
-sub_815886C: @ 815886C
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- bx lr
- .pool
- thumb_func_end sub_815886C
-
- thumb_func_start dp15_call
-dp15_call: @ 815888C
- push {r4,lr}
- ldr r4, =gAIScriptPtr
- ldr r0, [r4]
- adds r0, 0x5
- bl sub_81588E0
- ldr r2, [r4]
- ldrb r1, [r2, 0x1]
- ldrb r0, [r2, 0x2]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x4]
- lsls r0, 24
- orrs r1, r0
- str r1, [r4]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end dp15_call
-
- thumb_func_start sub_81588BC
-sub_81588BC: @ 81588BC
- push {lr}
- bl sub_8158908
- lsls r0, 24
- cmp r0, 0
- bne _081588D6
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r2, [r0, 0xC]
- ldrb r1, [r2, 0x9]
- movs r0, 0x1
- orrs r0, r1
- strb r0, [r2, 0x9]
-_081588D6:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81588BC
-
- thumb_func_start sub_81588E0
-sub_81588E0: @ 81588E0
- push {r4,lr}
- ldr r1, =gContestResources
- ldr r1, [r1]
- ldr r3, [r1, 0xC]
- adds r4, r3, 0
- adds r4, 0x40
- ldrb r1, [r4]
- adds r2, r1, 0x1
- strb r2, [r4]
- lsls r1, 24
- lsrs r1, 22
- adds r3, 0x20
- adds r3, r1
- str r0, [r3]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81588E0
-
- thumb_func_start sub_8158908
-sub_8158908: @ 8158908
- push {lr}
- ldr r3, =gContestResources
- ldr r0, [r3]
- ldr r0, [r0, 0xC]
- adds r1, r0, 0
- adds r1, 0x40
- ldrb r0, [r1]
- cmp r0, 0
- bne _08158924
- movs r0, 0
- b _08158940
- .pool
-_08158924:
- subs r0, 0x1
- strb r0, [r1]
- ldr r2, =gAIScriptPtr
- ldr r0, [r3]
- ldr r1, [r0, 0xC]
- adds r0, r1, 0
- adds r0, 0x40
- ldrb r0, [r0]
- lsls r0, 2
- adds r1, 0x20
- adds r1, r0
- ldr r0, [r1]
- str r0, [r2]
- movs r0, 0x1
-_08158940:
- pop {r1}
- bx r1
- .pool
- thumb_func_end sub_8158908
-
- thumb_func_start sub_8158948
-sub_8158948: @ 8158948
- push {r4-r6,lr}
- movs r5, 0
- movs r4, 0
- ldr r6, =gContestMons + 30
-_08158950:
- lsls r1, r4, 1
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- adds r1, r6
- ldrh r0, [r1]
- cmp r0, 0
- beq _08158980
- bl sub_80DD9F0
- lsls r0, 24
- asrs r0, 24
- cmp r0, 0x1
- bne _08158980
- movs r5, 0x1
- b _08158986
- .pool
-_08158980:
- adds r4, 0x1
- cmp r4, 0x3
- ble _08158950
-_08158986:
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- strh r5, [r0, 0x18]
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x1
- str r0, [r1]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8158948
-
- thumb_func_start sub_81589A4
-sub_81589A4: @ 81589A4
- push {lr}
- bl sub_8158948
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _081589DC
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _081589E4
- .pool
-_081589DC:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_081589E4:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81589A4
-
- thumb_func_start sub_81589EC
-sub_81589EC: @ 81589EC
- push {lr}
- bl sub_8158948
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bne _08158A24
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08158A2C
- .pool
-_08158A24:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08158A2C:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81589EC
-
- thumb_func_start sub_8158A34
-sub_8158A34: @ 8158A34
- push {r4-r6,lr}
- movs r6, 0
- ldr r3, =gAIScriptPtr
- ldr r0, [r3]
- ldrb r5, [r0, 0x1]
- ldrb r0, [r0, 0x2]
- lsls r0, 8
- orrs r5, r0
- movs r4, 0
- ldr r0, =gContestMons
- mov r12, r0
- ldr r2, =gContestResources
- ldr r0, [r2]
- ldr r0, [r0, 0xC]
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- mov r1, r12
- adds r1, 0x1E
- adds r0, r1
- ldrh r0, [r0]
- b _08158A88
- .pool
-_08158A6C:
- adds r4, 0x1
- cmp r4, 0x3
- bgt _08158A8E
- lsls r1, r4, 1
- ldr r0, [r2]
- ldr r0, [r0, 0xC]
- adds r0, 0x41
- ldrb r0, [r0]
- lsls r0, 6
- adds r1, r0
- mov r0, r12
- adds r0, 0x1E
- adds r1, r0
- ldrh r0, [r1]
-_08158A88:
- cmp r0, r5
- bne _08158A6C
- movs r6, 0x1
-_08158A8E:
- ldr r0, [r2]
- ldr r0, [r0, 0xC]
- strh r6, [r0, 0x18]
- ldr r0, [r3]
- adds r0, 0x3
- str r0, [r3]
- pop {r4-r6}
- pop {r0}
- bx r0
- thumb_func_end sub_8158A34
-
- thumb_func_start sub_8158AA0
-sub_8158AA0: @ 8158AA0
- push {lr}
- bl sub_8158A34
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- beq _08158AD8
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08158AE0
- .pool
-_08158AD8:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08158AE0:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8158AA0
-
- thumb_func_start sub_8158AE8
-sub_8158AE8: @ 8158AE8
- push {lr}
- bl sub_8158A34
- ldr r0, =gContestResources
- ldr r0, [r0]
- ldr r0, [r0, 0xC]
- movs r1, 0x18
- ldrsh r0, [r0, r1]
- cmp r0, 0
- bne _08158B20
- ldr r3, =gAIScriptPtr
- ldr r2, [r3]
- ldrb r1, [r2]
- ldrb r0, [r2, 0x1]
- lsls r0, 8
- orrs r1, r0
- ldrb r0, [r2, 0x2]
- lsls r0, 16
- orrs r1, r0
- ldrb r0, [r2, 0x3]
- lsls r0, 24
- orrs r1, r0
- str r1, [r3]
- b _08158B28
- .pool
-_08158B20:
- ldr r1, =gAIScriptPtr
- ldr r0, [r1]
- adds r0, 0x4
- str r0, [r1]
-_08158B28:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8158AE8
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/contest_effect.s b/asm/contest_effect.s
index 65a720a65..406de35d8 100644
--- a/asm/contest_effect.s
+++ b/asm/contest_effect.s
@@ -951,7 +951,7 @@ _080E5B00:
bne _080E5B38
lsls r0, r5, 24
lsrs r0, 24
- bl sub_80DBCA8
+ bl Contest_IsMonsTurnDisabled
lsls r0, 24
cmp r0, 0
bne _080E5B38
diff --git a/data/contest_ai.s b/data/contest_ai.s
deleted file mode 100644
index c7cb848a7..000000000
--- a/data/contest_ai.s
+++ /dev/null
@@ -1,144 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
- .align 2
-gUnknown_085CDD00:: @ 85CDD00
- .4byte sub_81564DC
- .4byte sub_8156530
- .4byte sub_8156550
- .4byte sub_8156594
- .4byte sub_81565D8
- .4byte sub_815661C
- .4byte sub_8156660
- .4byte sub_8156684
- .4byte sub_81566C8
- .4byte sub_815670C
- .4byte sub_8156750
- .4byte sub_8156794
- .4byte sub_81567BC
- .4byte sub_8156800
- .4byte sub_8156844
- .4byte sub_8156888
- .4byte sub_81568CC
- .4byte sub_815690C
- .4byte sub_8156950
- .4byte sub_8156994
- .4byte sub_81569D8
- .4byte sub_8156A1C
- .4byte sub_8156A48
- .4byte sub_8156A98
- .4byte sub_8156AE8
- .4byte sub_8156B38
- .4byte sub_8156B88
- .4byte sub_8156BB4
- .4byte sub_8156C04
- .4byte sub_8156C54
- .4byte sub_8156CA4
- .4byte sub_8156CF4
- .4byte sub_8156D18
- .4byte sub_8156D5C
- .4byte sub_8156DA0
- .4byte sub_8156DE4
- .4byte sub_8156E2C
- .4byte sub_8156E74
- .4byte sub_8156EBC
- .4byte sub_8156F04
- .4byte sub_8156F44
- .4byte sub_8156F88
- .4byte sub_8156FCC
- .4byte sub_8157018
- .4byte sub_815705C
- .4byte sub_81570A0
- .4byte sub_815712C
- .4byte sub_8157174
- .4byte sub_8157200
- .4byte sub_8157248
- .4byte sub_81572A4
- .4byte sub_81572E8
- .4byte sub_815732C
- .4byte sub_8157370
- .4byte sub_81573B4
- .4byte sub_8157410
- .4byte sub_8157454
- .4byte sub_8157498
- .4byte sub_81574DC
- .4byte sub_8157520
- .4byte sub_8157578
- .4byte sub_81575BC
- .4byte sub_8157600
- .4byte sub_8157644
- .4byte sub_8157688
- .4byte sub_8157700
- .4byte sub_8157748
- .4byte sub_8157790
- .4byte sub_8157808
- .4byte sub_8157850
- .4byte sub_8157898
- .4byte sub_81578F8
- .4byte sub_8157940
- .4byte sub_8157988
- .4byte sub_81579CC
- .4byte sub_8157A10
- .4byte sub_8157A54
- .4byte sub_8157A98
- .4byte sub_8157ADC
- .4byte sub_8157B38
- .4byte sub_8157B7C
- .4byte sub_8157BC0
- .4byte sub_8157C04
- .4byte sub_8157C48
- .4byte sub_8157C94
- .4byte sub_8157CDC
- .4byte sub_8157D24
- .4byte sub_8157D60
- .4byte sub_8157DA8
- .4byte sub_8157DF0
- .4byte sub_8157E3C
- .4byte sub_8157E84
- .4byte sub_8157ECC
- .4byte sub_8157F14
- .4byte sub_8157F5C
- .4byte sub_8157FA0
- .4byte sub_8157FE8
- .4byte sub_8158030
- .4byte sub_8158078
- .4byte sub_81580C0
- .4byte sub_8158108
- .4byte sub_815814C
- .4byte sub_8158190
- .4byte sub_81581D4
- .4byte sub_8158218
- .4byte sub_8158254
- .4byte sub_8158298
- .4byte sub_81582DC
- .4byte sub_8158320
- .4byte sub_8158364
- .4byte sub_81583B8
- .4byte sub_81583FC
- .4byte sub_8158440
- .4byte sub_815846C
- .4byte sub_815849C
- .4byte sub_81584D4
- .4byte sub_8158508
- .4byte sub_815853C
- .4byte sub_815858C
- .4byte sub_81585DC
- .4byte sub_815862C
- .4byte sub_815867C
- .4byte sub_81586D0
- .4byte sub_8158724
- .4byte sub_8158778
- .4byte sub_81587CC
- .4byte sub_815881C
- .4byte sub_815886C
- .4byte dp15_call
- .4byte sub_81588BC
- .4byte sub_8158948
- .4byte sub_81589A4
- .4byte sub_81589EC
- .4byte sub_8158A34
- .4byte sub_8158AA0
- .4byte sub_8158AE8
-
diff --git a/include/constants/species.h b/include/constants/species.h
index f698ada14..cd9b13743 100644
--- a/include/constants/species.h
+++ b/include/constants/species.h
@@ -447,4 +447,836 @@
#define NUM_SPECIES SPECIES_EGG
+// National Dex Index Defines
+
+#define NATIONAL_DEX_BULBASAUR 1
+#define NATIONAL_DEX_IVYSAUR 2
+#define NATIONAL_DEX_VENUSAUR 3
+#define NATIONAL_DEX_CHARMANDER 4
+#define NATIONAL_DEX_CHARMELEON 5
+#define NATIONAL_DEX_CHARIZARD 6
+#define NATIONAL_DEX_SQUIRTLE 7
+#define NATIONAL_DEX_WARTORTLE 8
+#define NATIONAL_DEX_BLASTOISE 9
+#define NATIONAL_DEX_CATERPIE 10
+#define NATIONAL_DEX_METAPOD 11
+#define NATIONAL_DEX_BUTTERFREE 12
+#define NATIONAL_DEX_WEEDLE 13
+#define NATIONAL_DEX_KAKUNA 14
+#define NATIONAL_DEX_BEEDRILL 15
+#define NATIONAL_DEX_PIDGEY 16
+#define NATIONAL_DEX_PIDGEOTTO 17
+#define NATIONAL_DEX_PIDGEOT 18
+#define NATIONAL_DEX_RATTATA 19
+#define NATIONAL_DEX_RATICATE 20
+#define NATIONAL_DEX_SPEAROW 21
+#define NATIONAL_DEX_FEAROW 22
+#define NATIONAL_DEX_EKANS 23
+#define NATIONAL_DEX_ARBOK 24
+#define NATIONAL_DEX_PIKACHU 25
+#define NATIONAL_DEX_RAICHU 26
+#define NATIONAL_DEX_SANDSHREW 27
+#define NATIONAL_DEX_SANDSLASH 28
+#define NATIONAL_DEX_NIDORAN_F 29
+#define NATIONAL_DEX_NIDORINA 30
+#define NATIONAL_DEX_NIDOQUEEN 31
+#define NATIONAL_DEX_NIDORAN_M 32
+#define NATIONAL_DEX_NIDORINO 33
+#define NATIONAL_DEX_NIDOKING 34
+#define NATIONAL_DEX_CLEFAIRY 35
+#define NATIONAL_DEX_CLEFABLE 36
+#define NATIONAL_DEX_VULPIX 37
+#define NATIONAL_DEX_NINETALES 38
+#define NATIONAL_DEX_JIGGLYPUFF 39
+#define NATIONAL_DEX_WIGGLYTUFF 40
+#define NATIONAL_DEX_ZUBAT 41
+#define NATIONAL_DEX_GOLBAT 42
+#define NATIONAL_DEX_ODDISH 43
+#define NATIONAL_DEX_GLOOM 44
+#define NATIONAL_DEX_VILEPLUME 45
+#define NATIONAL_DEX_PARAS 46
+#define NATIONAL_DEX_PARASECT 47
+#define NATIONAL_DEX_VENONAT 48
+#define NATIONAL_DEX_VENOMOTH 49
+#define NATIONAL_DEX_DIGLETT 50
+#define NATIONAL_DEX_DUGTRIO 51
+#define NATIONAL_DEX_MEOWTH 52
+#define NATIONAL_DEX_PERSIAN 53
+#define NATIONAL_DEX_PSYDUCK 54
+#define NATIONAL_DEX_GOLDUCK 55
+#define NATIONAL_DEX_MANKEY 56
+#define NATIONAL_DEX_PRIMEAPE 57
+#define NATIONAL_DEX_GROWLITHE 58
+#define NATIONAL_DEX_ARCANINE 59
+#define NATIONAL_DEX_POLIWAG 60
+#define NATIONAL_DEX_POLIWHIRL 61
+#define NATIONAL_DEX_POLIWRATH 62
+#define NATIONAL_DEX_ABRA 63
+#define NATIONAL_DEX_KADABRA 64
+#define NATIONAL_DEX_ALAKAZAM 65
+#define NATIONAL_DEX_MACHOP 66
+#define NATIONAL_DEX_MACHOKE 67
+#define NATIONAL_DEX_MACHAMP 68
+#define NATIONAL_DEX_BELLSPROUT 69
+#define NATIONAL_DEX_WEEPINBELL 70
+#define NATIONAL_DEX_VICTREEBEL 71
+#define NATIONAL_DEX_TENTACOOL 72
+#define NATIONAL_DEX_TENTACRUEL 73
+#define NATIONAL_DEX_GEODUDE 74
+#define NATIONAL_DEX_GRAVELER 75
+#define NATIONAL_DEX_GOLEM 76
+#define NATIONAL_DEX_PONYTA 77
+#define NATIONAL_DEX_RAPIDASH 78
+#define NATIONAL_DEX_SLOWPOKE 79
+#define NATIONAL_DEX_SLOWBRO 80
+#define NATIONAL_DEX_MAGNEMITE 81
+#define NATIONAL_DEX_MAGNETON 82
+#define NATIONAL_DEX_FARFETCHD 83
+#define NATIONAL_DEX_DODUO 84
+#define NATIONAL_DEX_DODRIO 85
+#define NATIONAL_DEX_SEEL 86
+#define NATIONAL_DEX_DEWGONG 87
+#define NATIONAL_DEX_GRIMER 88
+#define NATIONAL_DEX_MUK 89
+#define NATIONAL_DEX_SHELLDER 90
+#define NATIONAL_DEX_CLOYSTER 91
+#define NATIONAL_DEX_GASTLY 92
+#define NATIONAL_DEX_HAUNTER 93
+#define NATIONAL_DEX_GENGAR 94
+#define NATIONAL_DEX_ONIX 95
+#define NATIONAL_DEX_DROWZEE 96
+#define NATIONAL_DEX_HYPNO 97
+#define NATIONAL_DEX_KRABBY 98
+#define NATIONAL_DEX_KINGLER 99
+#define NATIONAL_DEX_VOLTORB 100
+#define NATIONAL_DEX_ELECTRODE 101
+#define NATIONAL_DEX_EXEGGCUTE 102
+#define NATIONAL_DEX_EXEGGUTOR 103
+#define NATIONAL_DEX_CUBONE 104
+#define NATIONAL_DEX_MAROWAK 105
+#define NATIONAL_DEX_HITMONLEE 106
+#define NATIONAL_DEX_HITMONCHAN 107
+#define NATIONAL_DEX_LICKITUNG 108
+#define NATIONAL_DEX_KOFFING 109
+#define NATIONAL_DEX_WEEZING 110
+#define NATIONAL_DEX_RHYHORN 111
+#define NATIONAL_DEX_RHYDON 112
+#define NATIONAL_DEX_CHANSEY 113
+#define NATIONAL_DEX_TANGELA 114
+#define NATIONAL_DEX_KANGASKHAN 115
+#define NATIONAL_DEX_HORSEA 116
+#define NATIONAL_DEX_SEADRA 117
+#define NATIONAL_DEX_GOLDEEN 118
+#define NATIONAL_DEX_SEAKING 119
+#define NATIONAL_DEX_STARYU 120
+#define NATIONAL_DEX_STARMIE 121
+#define NATIONAL_DEX_MR_MIME 122
+#define NATIONAL_DEX_SCYTHER 123
+#define NATIONAL_DEX_JYNX 124
+#define NATIONAL_DEX_ELECTABUZZ 125
+#define NATIONAL_DEX_MAGMAR 126
+#define NATIONAL_DEX_PINSIR 127
+#define NATIONAL_DEX_TAUROS 128
+#define NATIONAL_DEX_MAGIKARP 129
+#define NATIONAL_DEX_GYARADOS 130
+#define NATIONAL_DEX_LAPRAS 131
+#define NATIONAL_DEX_DITTO 132
+#define NATIONAL_DEX_EEVEE 133
+#define NATIONAL_DEX_VAPOREON 134
+#define NATIONAL_DEX_JOLTEON 135
+#define NATIONAL_DEX_FLAREON 136
+#define NATIONAL_DEX_PORYGON 137
+#define NATIONAL_DEX_OMANYTE 138
+#define NATIONAL_DEX_OMASTAR 139
+#define NATIONAL_DEX_KABUTO 140
+#define NATIONAL_DEX_KABUTOPS 141
+#define NATIONAL_DEX_AERODACTYL 142
+#define NATIONAL_DEX_SNORLAX 143
+#define NATIONAL_DEX_ARTICUNO 144
+#define NATIONAL_DEX_ZAPDOS 145
+#define NATIONAL_DEX_MOLTRES 146
+#define NATIONAL_DEX_DRATINI 147
+#define NATIONAL_DEX_DRAGONAIR 148
+#define NATIONAL_DEX_DRAGONITE 149
+#define NATIONAL_DEX_MEWTWO 150
+#define NATIONAL_DEX_MEW 151
+#define NATIONAL_DEX_CHIKORITA 152
+#define NATIONAL_DEX_BAYLEEF 153
+#define NATIONAL_DEX_MEGANIUM 154
+#define NATIONAL_DEX_CYNDAQUIL 155
+#define NATIONAL_DEX_QUILAVA 156
+#define NATIONAL_DEX_TYPHLOSION 157
+#define NATIONAL_DEX_TOTODILE 158
+#define NATIONAL_DEX_CROCONAW 159
+#define NATIONAL_DEX_FERALIGATR 160
+#define NATIONAL_DEX_SENTRET 161
+#define NATIONAL_DEX_FURRET 162
+#define NATIONAL_DEX_HOOTHOOT 163
+#define NATIONAL_DEX_NOCTOWL 164
+#define NATIONAL_DEX_LEDYBA 165
+#define NATIONAL_DEX_LEDIAN 166
+#define NATIONAL_DEX_SPINARAK 167
+#define NATIONAL_DEX_ARIADOS 168
+#define NATIONAL_DEX_CROBAT 169
+#define NATIONAL_DEX_CHINCHOU 170
+#define NATIONAL_DEX_LANTURN 171
+#define NATIONAL_DEX_PICHU 172
+#define NATIONAL_DEX_CLEFFA 173
+#define NATIONAL_DEX_IGGLYBUFF 174
+#define NATIONAL_DEX_TOGEPI 175
+#define NATIONAL_DEX_TOGETIC 176
+#define NATIONAL_DEX_NATU 177
+#define NATIONAL_DEX_XATU 178
+#define NATIONAL_DEX_MAREEP 179
+#define NATIONAL_DEX_FLAAFFY 180
+#define NATIONAL_DEX_AMPHAROS 181
+#define NATIONAL_DEX_BELLOSSOM 182
+#define NATIONAL_DEX_MARILL 183
+#define NATIONAL_DEX_AZUMARILL 184
+#define NATIONAL_DEX_SUDOWOODO 185
+#define NATIONAL_DEX_POLITOED 186
+#define NATIONAL_DEX_HOPPIP 187
+#define NATIONAL_DEX_SKIPLOOM 188
+#define NATIONAL_DEX_JUMPLUFF 189
+#define NATIONAL_DEX_AIPOM 190
+#define NATIONAL_DEX_SUNKERN 191
+#define NATIONAL_DEX_SUNFLORA 192
+#define NATIONAL_DEX_YANMA 193
+#define NATIONAL_DEX_WOOPER 194
+#define NATIONAL_DEX_QUAGSIRE 195
+#define NATIONAL_DEX_ESPEON 196
+#define NATIONAL_DEX_UMBREON 197
+#define NATIONAL_DEX_MURKROW 198
+#define NATIONAL_DEX_SLOWKING 199
+#define NATIONAL_DEX_MISDREAVUS 200
+#define NATIONAL_DEX_UNOWN 201
+#define NATIONAL_DEX_WOBBUFFET 202
+#define NATIONAL_DEX_GIRAFARIG 203
+#define NATIONAL_DEX_PINECO 204
+#define NATIONAL_DEX_FORRETRESS 205
+#define NATIONAL_DEX_DUNSPARCE 206
+#define NATIONAL_DEX_GLIGAR 207
+#define NATIONAL_DEX_STEELIX 208
+#define NATIONAL_DEX_SNUBBULL 209
+#define NATIONAL_DEX_GRANBULL 210
+#define NATIONAL_DEX_QWILFISH 211
+#define NATIONAL_DEX_SCIZOR 212
+#define NATIONAL_DEX_SHUCKLE 213
+#define NATIONAL_DEX_HERACROSS 214
+#define NATIONAL_DEX_SNEASEL 215
+#define NATIONAL_DEX_TEDDIURSA 216
+#define NATIONAL_DEX_URSARING 217
+#define NATIONAL_DEX_SLUGMA 218
+#define NATIONAL_DEX_MAGCARGO 219
+#define NATIONAL_DEX_SWINUB 220
+#define NATIONAL_DEX_PILOSWINE 221
+#define NATIONAL_DEX_CORSOLA 222
+#define NATIONAL_DEX_REMORAID 223
+#define NATIONAL_DEX_OCTILLERY 224
+#define NATIONAL_DEX_DELIBIRD 225
+#define NATIONAL_DEX_MANTINE 226
+#define NATIONAL_DEX_SKARMORY 227
+#define NATIONAL_DEX_HOUNDOUR 228
+#define NATIONAL_DEX_HOUNDOOM 229
+#define NATIONAL_DEX_KINGDRA 230
+#define NATIONAL_DEX_PHANPY 231
+#define NATIONAL_DEX_DONPHAN 232
+#define NATIONAL_DEX_PORYGON2 233
+#define NATIONAL_DEX_STANTLER 234
+#define NATIONAL_DEX_SMEARGLE 235
+#define NATIONAL_DEX_TYROGUE 236
+#define NATIONAL_DEX_HITMONTOP 237
+#define NATIONAL_DEX_SMOOCHUM 238
+#define NATIONAL_DEX_ELEKID 239
+#define NATIONAL_DEX_MAGBY 240
+#define NATIONAL_DEX_MILTANK 241
+#define NATIONAL_DEX_BLISSEY 242
+#define NATIONAL_DEX_RAIKOU 243
+#define NATIONAL_DEX_ENTEI 244
+#define NATIONAL_DEX_SUICUNE 245
+#define NATIONAL_DEX_LARVITAR 246
+#define NATIONAL_DEX_PUPITAR 247
+#define NATIONAL_DEX_TYRANITAR 248
+#define NATIONAL_DEX_LUGIA 249
+#define NATIONAL_DEX_HO_OH 250
+#define NATIONAL_DEX_CELEBI 251
+
+#define NATIONAL_DEX_OLD_UNOWN_B 387
+#define NATIONAL_DEX_OLD_UNOWN_C 388
+#define NATIONAL_DEX_OLD_UNOWN_D 389
+#define NATIONAL_DEX_OLD_UNOWN_E 390
+#define NATIONAL_DEX_OLD_UNOWN_F 391
+#define NATIONAL_DEX_OLD_UNOWN_G 392
+#define NATIONAL_DEX_OLD_UNOWN_H 393
+#define NATIONAL_DEX_OLD_UNOWN_I 394
+#define NATIONAL_DEX_OLD_UNOWN_J 395
+#define NATIONAL_DEX_OLD_UNOWN_K 396
+#define NATIONAL_DEX_OLD_UNOWN_L 397
+#define NATIONAL_DEX_OLD_UNOWN_M 398
+#define NATIONAL_DEX_OLD_UNOWN_N 399
+#define NATIONAL_DEX_OLD_UNOWN_O 400
+#define NATIONAL_DEX_OLD_UNOWN_P 401
+#define NATIONAL_DEX_OLD_UNOWN_Q 402
+#define NATIONAL_DEX_OLD_UNOWN_R 403
+#define NATIONAL_DEX_OLD_UNOWN_S 404
+#define NATIONAL_DEX_OLD_UNOWN_T 405
+#define NATIONAL_DEX_OLD_UNOWN_U 406
+#define NATIONAL_DEX_OLD_UNOWN_V 407
+#define NATIONAL_DEX_OLD_UNOWN_W 408
+#define NATIONAL_DEX_OLD_UNOWN_X 409
+#define NATIONAL_DEX_OLD_UNOWN_Y 410
+#define NATIONAL_DEX_OLD_UNOWN_Z 411
+
+#define NATIONAL_DEX_TREECKO 252
+#define NATIONAL_DEX_GROVYLE 253
+#define NATIONAL_DEX_SCEPTILE 254
+#define NATIONAL_DEX_TORCHIC 255
+#define NATIONAL_DEX_COMBUSKEN 256
+#define NATIONAL_DEX_BLAZIKEN 257
+#define NATIONAL_DEX_MUDKIP 258
+#define NATIONAL_DEX_MARSHTOMP 259
+#define NATIONAL_DEX_SWAMPERT 260
+#define NATIONAL_DEX_POOCHYENA 261
+#define NATIONAL_DEX_MIGHTYENA 262
+#define NATIONAL_DEX_ZIGZAGOON 263
+#define NATIONAL_DEX_LINOONE 264
+#define NATIONAL_DEX_WURMPLE 265
+#define NATIONAL_DEX_SILCOON 266
+#define NATIONAL_DEX_BEAUTIFLY 267
+#define NATIONAL_DEX_CASCOON 268
+#define NATIONAL_DEX_DUSTOX 269
+#define NATIONAL_DEX_LOTAD 270
+#define NATIONAL_DEX_LOMBRE 271
+#define NATIONAL_DEX_LUDICOLO 272
+#define NATIONAL_DEX_SEEDOT 273
+#define NATIONAL_DEX_NUZLEAF 274
+#define NATIONAL_DEX_SHIFTRY 275
+#define NATIONAL_DEX_NINCADA 290
+#define NATIONAL_DEX_NINJASK 291
+#define NATIONAL_DEX_SHEDINJA 292
+#define NATIONAL_DEX_TAILLOW 276
+#define NATIONAL_DEX_SWELLOW 277
+#define NATIONAL_DEX_SHROOMISH 285
+#define NATIONAL_DEX_BRELOOM 286
+#define NATIONAL_DEX_SPINDA 327
+#define NATIONAL_DEX_WINGULL 278
+#define NATIONAL_DEX_PELIPPER 279
+#define NATIONAL_DEX_SURSKIT 283
+#define NATIONAL_DEX_MASQUERAIN 284
+#define NATIONAL_DEX_WAILMER 320
+#define NATIONAL_DEX_WAILORD 321
+#define NATIONAL_DEX_SKITTY 300
+#define NATIONAL_DEX_DELCATTY 301
+#define NATIONAL_DEX_KECLEON 352
+#define NATIONAL_DEX_BALTOY 343
+#define NATIONAL_DEX_CLAYDOL 344
+#define NATIONAL_DEX_NOSEPASS 299
+#define NATIONAL_DEX_TORKOAL 324
+#define NATIONAL_DEX_SABLEYE 302
+#define NATIONAL_DEX_BARBOACH 339
+#define NATIONAL_DEX_WHISCASH 340
+#define NATIONAL_DEX_LUVDISC 370
+#define NATIONAL_DEX_CORPHISH 341
+#define NATIONAL_DEX_CRAWDAUNT 342
+#define NATIONAL_DEX_FEEBAS 349
+#define NATIONAL_DEX_MILOTIC 350
+#define NATIONAL_DEX_CARVANHA 318
+#define NATIONAL_DEX_SHARPEDO 319
+#define NATIONAL_DEX_TRAPINCH 328
+#define NATIONAL_DEX_VIBRAVA 329
+#define NATIONAL_DEX_FLYGON 330
+#define NATIONAL_DEX_MAKUHITA 296
+#define NATIONAL_DEX_HARIYAMA 297
+#define NATIONAL_DEX_ELECTRIKE 309
+#define NATIONAL_DEX_MANECTRIC 310
+#define NATIONAL_DEX_NUMEL 322
+#define NATIONAL_DEX_CAMERUPT 323
+#define NATIONAL_DEX_SPHEAL 363
+#define NATIONAL_DEX_SEALEO 364
+#define NATIONAL_DEX_WALREIN 365
+#define NATIONAL_DEX_CACNEA 331
+#define NATIONAL_DEX_CACTURNE 332
+#define NATIONAL_DEX_SNORUNT 361
+#define NATIONAL_DEX_GLALIE 362
+#define NATIONAL_DEX_LUNATONE 337
+#define NATIONAL_DEX_SOLROCK 338
+#define NATIONAL_DEX_AZURILL 298
+#define NATIONAL_DEX_SPOINK 325
+#define NATIONAL_DEX_GRUMPIG 326
+#define NATIONAL_DEX_PLUSLE 311
+#define NATIONAL_DEX_MINUN 312
+#define NATIONAL_DEX_MAWILE 303
+#define NATIONAL_DEX_MEDITITE 307
+#define NATIONAL_DEX_MEDICHAM 308
+#define NATIONAL_DEX_SWABLU 333
+#define NATIONAL_DEX_ALTARIA 334
+#define NATIONAL_DEX_WYNAUT 360
+#define NATIONAL_DEX_DUSKULL 355
+#define NATIONAL_DEX_DUSCLOPS 356
+#define NATIONAL_DEX_ROSELIA 315
+#define NATIONAL_DEX_SLAKOTH 287
+#define NATIONAL_DEX_VIGOROTH 288
+#define NATIONAL_DEX_SLAKING 289
+#define NATIONAL_DEX_GULPIN 316
+#define NATIONAL_DEX_SWALOT 317
+#define NATIONAL_DEX_TROPIUS 357
+#define NATIONAL_DEX_WHISMUR 293
+#define NATIONAL_DEX_LOUDRED 294
+#define NATIONAL_DEX_EXPLOUD 295
+#define NATIONAL_DEX_CLAMPERL 366
+#define NATIONAL_DEX_HUNTAIL 367
+#define NATIONAL_DEX_GOREBYSS 368
+#define NATIONAL_DEX_ABSOL 359
+#define NATIONAL_DEX_SHUPPET 353
+#define NATIONAL_DEX_BANETTE 354
+#define NATIONAL_DEX_SEVIPER 336
+#define NATIONAL_DEX_ZANGOOSE 335
+#define NATIONAL_DEX_RELICANTH 369
+#define NATIONAL_DEX_ARON 304
+#define NATIONAL_DEX_LAIRON 305
+#define NATIONAL_DEX_AGGRON 306
+#define NATIONAL_DEX_CASTFORM 351
+#define NATIONAL_DEX_VOLBEAT 313
+#define NATIONAL_DEX_ILLUMISE 314
+#define NATIONAL_DEX_LILEEP 345
+#define NATIONAL_DEX_CRADILY 346
+#define NATIONAL_DEX_ANORITH 347
+#define NATIONAL_DEX_ARMALDO 348
+#define NATIONAL_DEX_RALTS 280
+#define NATIONAL_DEX_KIRLIA 281
+#define NATIONAL_DEX_GARDEVOIR 282
+#define NATIONAL_DEX_BAGON 371
+#define NATIONAL_DEX_SHELGON 372
+#define NATIONAL_DEX_SALAMENCE 373
+#define NATIONAL_DEX_BELDUM 374
+#define NATIONAL_DEX_METANG 375
+#define NATIONAL_DEX_METAGROSS 376
+#define NATIONAL_DEX_REGIROCK 377
+#define NATIONAL_DEX_REGICE 378
+#define NATIONAL_DEX_REGISTEEL 379
+#define NATIONAL_DEX_KYOGRE 382
+#define NATIONAL_DEX_GROUDON 383
+#define NATIONAL_DEX_RAYQUAZA 384
+#define NATIONAL_DEX_LATIAS 380
+#define NATIONAL_DEX_LATIOS 381
+#define NATIONAL_DEX_JIRACHI 385
+#define NATIONAL_DEX_DEOXYS 386
+#define NATIONAL_DEX_CHIMECHO 358
+
+// Hoenn Dex Index Defines
+
+#define HOENN_DEX_BULBASAUR 203
+#define HOENN_DEX_IVYSAUR 204
+#define HOENN_DEX_VENUSAUR 205
+#define HOENN_DEX_CHARMANDER 206
+#define HOENN_DEX_CHARMELEON 207
+#define HOENN_DEX_CHARIZARD 208
+#define HOENN_DEX_SQUIRTLE 209
+#define HOENN_DEX_WARTORTLE 210
+#define HOENN_DEX_BLASTOISE 211
+#define HOENN_DEX_CATERPIE 212
+#define HOENN_DEX_METAPOD 213
+#define HOENN_DEX_BUTTERFREE 214
+#define HOENN_DEX_WEEDLE 215
+#define HOENN_DEX_KAKUNA 216
+#define HOENN_DEX_BEEDRILL 217
+#define HOENN_DEX_PIDGEY 218
+#define HOENN_DEX_PIDGEOTTO 219
+#define HOENN_DEX_PIDGEOT 220
+#define HOENN_DEX_RATTATA 221
+#define HOENN_DEX_RATICATE 222
+#define HOENN_DEX_SPEAROW 223
+#define HOENN_DEX_FEAROW 224
+#define HOENN_DEX_EKANS 225
+#define HOENN_DEX_ARBOK 226
+#define HOENN_DEX_PIKACHU 156
+#define HOENN_DEX_RAICHU 157
+#define HOENN_DEX_SANDSHREW 112
+#define HOENN_DEX_SANDSLASH 113
+#define HOENN_DEX_NIDORAN_F 227
+#define HOENN_DEX_NIDORINA 228
+#define HOENN_DEX_NIDOQUEEN 229
+#define HOENN_DEX_NIDORAN_M 230
+#define HOENN_DEX_NIDORINO 231
+#define HOENN_DEX_NIDOKING 232
+#define HOENN_DEX_CLEFAIRY 233
+#define HOENN_DEX_CLEFABLE 234
+#define HOENN_DEX_VULPIX 153
+#define HOENN_DEX_NINETALES 154
+#define HOENN_DEX_JIGGLYPUFF 138
+#define HOENN_DEX_WIGGLYTUFF 139
+#define HOENN_DEX_ZUBAT 63
+#define HOENN_DEX_GOLBAT 64
+#define HOENN_DEX_ODDISH 88
+#define HOENN_DEX_GLOOM 89
+#define HOENN_DEX_VILEPLUME 90
+#define HOENN_DEX_PARAS 235
+#define HOENN_DEX_PARASECT 236
+#define HOENN_DEX_VENONAT 237
+#define HOENN_DEX_VENOMOTH 238
+#define HOENN_DEX_DIGLETT 239
+#define HOENN_DEX_DUGTRIO 240
+#define HOENN_DEX_MEOWTH 241
+#define HOENN_DEX_PERSIAN 242
+#define HOENN_DEX_PSYDUCK 158
+#define HOENN_DEX_GOLDUCK 159
+#define HOENN_DEX_MANKEY 243
+#define HOENN_DEX_PRIMEAPE 244
+#define HOENN_DEX_GROWLITHE 245
+#define HOENN_DEX_ARCANINE 246
+#define HOENN_DEX_POLIWAG 247
+#define HOENN_DEX_POLIWHIRL 248
+#define HOENN_DEX_POLIWRATH 249
+#define HOENN_DEX_ABRA 39
+#define HOENN_DEX_KADABRA 40
+#define HOENN_DEX_ALAKAZAM 41
+#define HOENN_DEX_MACHOP 73
+#define HOENN_DEX_MACHOKE 74
+#define HOENN_DEX_MACHAMP 75
+#define HOENN_DEX_BELLSPROUT 250
+#define HOENN_DEX_WEEPINBELL 251
+#define HOENN_DEX_VICTREEBEL 252
+#define HOENN_DEX_TENTACOOL 66
+#define HOENN_DEX_TENTACRUEL 67
+#define HOENN_DEX_GEODUDE 57
+#define HOENN_DEX_GRAVELER 58
+#define HOENN_DEX_GOLEM 59
+#define HOENN_DEX_PONYTA 253
+#define HOENN_DEX_RAPIDASH 254
+#define HOENN_DEX_SLOWPOKE 255
+#define HOENN_DEX_SLOWBRO 256
+#define HOENN_DEX_MAGNEMITE 82
+#define HOENN_DEX_MAGNETON 83
+#define HOENN_DEX_FARFETCHD 257
+#define HOENN_DEX_DODUO 92
+#define HOENN_DEX_DODRIO 93
+#define HOENN_DEX_SEEL 258
+#define HOENN_DEX_DEWGONG 259
+#define HOENN_DEX_GRIMER 106
+#define HOENN_DEX_MUK 107
+#define HOENN_DEX_SHELLDER 260
+#define HOENN_DEX_CLOYSTER 261
+#define HOENN_DEX_GASTLY 262
+#define HOENN_DEX_HAUNTER 263
+#define HOENN_DEX_GENGAR 264
+#define HOENN_DEX_ONIX 265
+#define HOENN_DEX_DROWZEE 266
+#define HOENN_DEX_HYPNO 267
+#define HOENN_DEX_KRABBY 268
+#define HOENN_DEX_KINGLER 269
+#define HOENN_DEX_VOLTORB 84
+#define HOENN_DEX_ELECTRODE 85
+#define HOENN_DEX_EXEGGCUTE 270
+#define HOENN_DEX_EXEGGUTOR 271
+#define HOENN_DEX_CUBONE 272
+#define HOENN_DEX_MAROWAK 273
+#define HOENN_DEX_HITMONLEE 274
+#define HOENN_DEX_HITMONCHAN 275
+#define HOENN_DEX_LICKITUNG 276
+#define HOENN_DEX_KOFFING 108
+#define HOENN_DEX_WEEZING 109
+#define HOENN_DEX_RHYHORN 169
+#define HOENN_DEX_RHYDON 170
+#define HOENN_DEX_CHANSEY 277
+#define HOENN_DEX_TANGELA 278
+#define HOENN_DEX_KANGASKHAN 279
+#define HOENN_DEX_HORSEA 184
+#define HOENN_DEX_SEADRA 185
+#define HOENN_DEX_GOLDEEN 50
+#define HOENN_DEX_SEAKING 51
+#define HOENN_DEX_STARYU 143
+#define HOENN_DEX_STARMIE 144
+#define HOENN_DEX_MR_MIME 280
+#define HOENN_DEX_SCYTHER 281
+#define HOENN_DEX_JYNX 282
+#define HOENN_DEX_ELECTABUZZ 283
+#define HOENN_DEX_MAGMAR 284
+#define HOENN_DEX_PINSIR 167
+#define HOENN_DEX_TAUROS 285
+#define HOENN_DEX_MAGIKARP 52
+#define HOENN_DEX_GYARADOS 53
+#define HOENN_DEX_LAPRAS 286
+#define HOENN_DEX_DITTO 287
+#define HOENN_DEX_EEVEE 288
+#define HOENN_DEX_VAPOREON 289
+#define HOENN_DEX_JOLTEON 290
+#define HOENN_DEX_FLAREON 291
+#define HOENN_DEX_PORYGON 292
+#define HOENN_DEX_OMANYTE 293
+#define HOENN_DEX_OMASTAR 294
+#define HOENN_DEX_KABUTO 295
+#define HOENN_DEX_KABUTOPS 296
+#define HOENN_DEX_AERODACTYL 297
+#define HOENN_DEX_SNORLAX 298
+#define HOENN_DEX_ARTICUNO 299
+#define HOENN_DEX_ZAPDOS 300
+#define HOENN_DEX_MOLTRES 301
+#define HOENN_DEX_DRATINI 302
+#define HOENN_DEX_DRAGONAIR 303
+#define HOENN_DEX_DRAGONITE 304
+#define HOENN_DEX_MEWTWO 305
+#define HOENN_DEX_MEW 306
+#define HOENN_DEX_CHIKORITA 307
+#define HOENN_DEX_BAYLEEF 308
+#define HOENN_DEX_MEGANIUM 309
+#define HOENN_DEX_CYNDAQUIL 310
+#define HOENN_DEX_QUILAVA 311
+#define HOENN_DEX_TYPHLOSION 312
+#define HOENN_DEX_TOTODILE 313
+#define HOENN_DEX_CROCONAW 314
+#define HOENN_DEX_FERALIGATR 315
+#define HOENN_DEX_SENTRET 316
+#define HOENN_DEX_FURRET 317
+#define HOENN_DEX_HOOTHOOT 318
+#define HOENN_DEX_NOCTOWL 319
+#define HOENN_DEX_LEDYBA 320
+#define HOENN_DEX_LEDIAN 321
+#define HOENN_DEX_SPINARAK 322
+#define HOENN_DEX_ARIADOS 323
+#define HOENN_DEX_CROBAT 65
+#define HOENN_DEX_CHINCHOU 181
+#define HOENN_DEX_LANTURN 182
+#define HOENN_DEX_PICHU 155
+#define HOENN_DEX_CLEFFA 324
+#define HOENN_DEX_IGGLYBUFF 137
+#define HOENN_DEX_TOGEPI 325
+#define HOENN_DEX_TOGETIC 326
+#define HOENN_DEX_NATU 162
+#define HOENN_DEX_XATU 163
+#define HOENN_DEX_MAREEP 327
+#define HOENN_DEX_FLAAFFY 328
+#define HOENN_DEX_AMPHAROS 329
+#define HOENN_DEX_BELLOSSOM 91
+#define HOENN_DEX_MARILL 55
+#define HOENN_DEX_AZUMARILL 56
+#define HOENN_DEX_SUDOWOODO 330
+#define HOENN_DEX_POLITOED 331
+#define HOENN_DEX_HOPPIP 332
+#define HOENN_DEX_SKIPLOOM 333
+#define HOENN_DEX_JUMPLUFF 334
+#define HOENN_DEX_AIPOM 335
+#define HOENN_DEX_SUNKERN 336
+#define HOENN_DEX_SUNFLORA 337
+#define HOENN_DEX_YANMA 338
+#define HOENN_DEX_WOOPER 339
+#define HOENN_DEX_QUAGSIRE 340
+#define HOENN_DEX_ESPEON 341
+#define HOENN_DEX_UMBREON 342
+#define HOENN_DEX_MURKROW 343
+#define HOENN_DEX_SLOWKING 344
+#define HOENN_DEX_MISDREAVUS 345
+#define HOENN_DEX_UNOWN 346
+#define HOENN_DEX_WOBBUFFET 161
+#define HOENN_DEX_GIRAFARIG 164
+#define HOENN_DEX_PINECO 347
+#define HOENN_DEX_FORRETRESS 348
+#define HOENN_DEX_DUNSPARCE 349
+#define HOENN_DEX_GLIGAR 350
+#define HOENN_DEX_STEELIX 351
+#define HOENN_DEX_SNUBBULL 352
+#define HOENN_DEX_GRANBULL 353
+#define HOENN_DEX_QWILFISH 354
+#define HOENN_DEX_SCIZOR 355
+#define HOENN_DEX_SHUCKLE 356
+#define HOENN_DEX_HERACROSS 168
+#define HOENN_DEX_SNEASEL 357
+#define HOENN_DEX_TEDDIURSA 358
+#define HOENN_DEX_URSARING 359
+#define HOENN_DEX_SLUGMA 103
+#define HOENN_DEX_MAGCARGO 104
+#define HOENN_DEX_SWINUB 360
+#define HOENN_DEX_PILOSWINE 361
+#define HOENN_DEX_CORSOLA 180
+#define HOENN_DEX_REMORAID 362
+#define HOENN_DEX_OCTILLERY 363
+#define HOENN_DEX_DELIBIRD 364
+#define HOENN_DEX_MANTINE 365
+#define HOENN_DEX_SKARMORY 115
+#define HOENN_DEX_HOUNDOUR 366
+#define HOENN_DEX_HOUNDOOM 367
+#define HOENN_DEX_KINGDRA 186
+#define HOENN_DEX_PHANPY 165
+#define HOENN_DEX_DONPHAN 166
+#define HOENN_DEX_PORYGON2 368
+#define HOENN_DEX_STANTLER 369
+#define HOENN_DEX_SMEARGLE 370
+#define HOENN_DEX_TYROGUE 371
+#define HOENN_DEX_HITMONTOP 372
+#define HOENN_DEX_SMOOCHUM 373
+#define HOENN_DEX_ELEKID 374
+#define HOENN_DEX_MAGBY 375
+#define HOENN_DEX_MILTANK 376
+#define HOENN_DEX_BLISSEY 377
+#define HOENN_DEX_RAIKOU 378
+#define HOENN_DEX_ENTEI 379
+#define HOENN_DEX_SUICUNE 380
+#define HOENN_DEX_LARVITAR 381
+#define HOENN_DEX_PUPITAR 382
+#define HOENN_DEX_TYRANITAR 383
+#define HOENN_DEX_LUGIA 384
+#define HOENN_DEX_HO_OH 385
+#define HOENN_DEX_CELEBI 386
+
+#define HOENN_DEX_OLD_UNOWN_B 387
+#define HOENN_DEX_OLD_UNOWN_C 388
+#define HOENN_DEX_OLD_UNOWN_D 389
+#define HOENN_DEX_OLD_UNOWN_E 390
+#define HOENN_DEX_OLD_UNOWN_F 391
+#define HOENN_DEX_OLD_UNOWN_G 392
+#define HOENN_DEX_OLD_UNOWN_H 393
+#define HOENN_DEX_OLD_UNOWN_I 394
+#define HOENN_DEX_OLD_UNOWN_J 395
+#define HOENN_DEX_OLD_UNOWN_K 396
+#define HOENN_DEX_OLD_UNOWN_L 397
+#define HOENN_DEX_OLD_UNOWN_M 398
+#define HOENN_DEX_OLD_UNOWN_N 399
+#define HOENN_DEX_OLD_UNOWN_O 400
+#define HOENN_DEX_OLD_UNOWN_P 401
+#define HOENN_DEX_OLD_UNOWN_Q 402
+#define HOENN_DEX_OLD_UNOWN_R 403
+#define HOENN_DEX_OLD_UNOWN_S 404
+#define HOENN_DEX_OLD_UNOWN_T 405
+#define HOENN_DEX_OLD_UNOWN_U 406
+#define HOENN_DEX_OLD_UNOWN_V 407
+#define HOENN_DEX_OLD_UNOWN_W 408
+#define HOENN_DEX_OLD_UNOWN_X 409
+#define HOENN_DEX_OLD_UNOWN_Y 410
+#define HOENN_DEX_OLD_UNOWN_Z 411
+
+#define HOENN_DEX_TREECKO 1
+#define HOENN_DEX_GROVYLE 2
+#define HOENN_DEX_SCEPTILE 3
+#define HOENN_DEX_TORCHIC 4
+#define HOENN_DEX_COMBUSKEN 5
+#define HOENN_DEX_BLAZIKEN 6
+#define HOENN_DEX_MUDKIP 7
+#define HOENN_DEX_MARSHTOMP 8
+#define HOENN_DEX_SWAMPERT 9
+#define HOENN_DEX_POOCHYENA 10
+#define HOENN_DEX_MIGHTYENA 11
+#define HOENN_DEX_ZIGZAGOON 12
+#define HOENN_DEX_LINOONE 13
+#define HOENN_DEX_WURMPLE 14
+#define HOENN_DEX_SILCOON 15
+#define HOENN_DEX_BEAUTIFLY 16
+#define HOENN_DEX_CASCOON 17
+#define HOENN_DEX_DUSTOX 18
+#define HOENN_DEX_LOTAD 19
+#define HOENN_DEX_LOMBRE 20
+#define HOENN_DEX_LUDICOLO 21
+#define HOENN_DEX_SEEDOT 22
+#define HOENN_DEX_NUZLEAF 23
+#define HOENN_DEX_SHIFTRY 24
+#define HOENN_DEX_NINCADA 42
+#define HOENN_DEX_NINJASK 43
+#define HOENN_DEX_SHEDINJA 44
+#define HOENN_DEX_TAILLOW 25
+#define HOENN_DEX_SWELLOW 26
+#define HOENN_DEX_SHROOMISH 34
+#define HOENN_DEX_BRELOOM 35
+#define HOENN_DEX_SPINDA 114
+#define HOENN_DEX_WINGULL 27
+#define HOENN_DEX_PELIPPER 28
+#define HOENN_DEX_SURSKIT 32
+#define HOENN_DEX_MASQUERAIN 33
+#define HOENN_DEX_WAILMER 99
+#define HOENN_DEX_WAILORD 100
+#define HOENN_DEX_SKITTY 61
+#define HOENN_DEX_DELCATTY 62
+#define HOENN_DEX_KECLEON 145
+#define HOENN_DEX_BALTOY 131
+#define HOENN_DEX_CLAYDOL 132
+#define HOENN_DEX_NOSEPASS 60
+#define HOENN_DEX_TORKOAL 105
+#define HOENN_DEX_SABLEYE 68
+#define HOENN_DEX_BARBOACH 127
+#define HOENN_DEX_WHISCASH 128
+#define HOENN_DEX_LUVDISC 183
+#define HOENN_DEX_CORPHISH 129
+#define HOENN_DEX_CRAWDAUNT 130
+#define HOENN_DEX_FEEBAS 140
+#define HOENN_DEX_MILOTIC 141
+#define HOENN_DEX_CARVANHA 97
+#define HOENN_DEX_SHARPEDO 98
+#define HOENN_DEX_TRAPINCH 116
+#define HOENN_DEX_VIBRAVA 117
+#define HOENN_DEX_FLYGON 118
+#define HOENN_DEX_MAKUHITA 48
+#define HOENN_DEX_HARIYAMA 49
+#define HOENN_DEX_ELECTRIKE 78
+#define HOENN_DEX_MANECTRIC 79
+#define HOENN_DEX_NUMEL 101
+#define HOENN_DEX_CAMERUPT 102
+#define HOENN_DEX_SPHEAL 173
+#define HOENN_DEX_SEALEO 174
+#define HOENN_DEX_WALREIN 175
+#define HOENN_DEX_CACNEA 119
+#define HOENN_DEX_CACTURNE 120
+#define HOENN_DEX_SNORUNT 171
+#define HOENN_DEX_GLALIE 172
+#define HOENN_DEX_LUNATONE 125
+#define HOENN_DEX_SOLROCK 126
+#define HOENN_DEX_AZURILL 54
+#define HOENN_DEX_SPOINK 110
+#define HOENN_DEX_GRUMPIG 111
+#define HOENN_DEX_PLUSLE 80
+#define HOENN_DEX_MINUN 81
+#define HOENN_DEX_MAWILE 69
+#define HOENN_DEX_MEDITITE 76
+#define HOENN_DEX_MEDICHAM 77
+#define HOENN_DEX_SWABLU 121
+#define HOENN_DEX_ALTARIA 122
+#define HOENN_DEX_WYNAUT 160
+#define HOENN_DEX_DUSKULL 148
+#define HOENN_DEX_DUSCLOPS 149
+#define HOENN_DEX_ROSELIA 94
+#define HOENN_DEX_SLAKOTH 36
+#define HOENN_DEX_VIGOROTH 37
+#define HOENN_DEX_SLAKING 38
+#define HOENN_DEX_GULPIN 95
+#define HOENN_DEX_SWALOT 96
+#define HOENN_DEX_TROPIUS 150
+#define HOENN_DEX_WHISMUR 45
+#define HOENN_DEX_LOUDRED 46
+#define HOENN_DEX_EXPLOUD 47
+#define HOENN_DEX_CLAMPERL 176
+#define HOENN_DEX_HUNTAIL 177
+#define HOENN_DEX_GOREBYSS 178
+#define HOENN_DEX_ABSOL 152
+#define HOENN_DEX_SHUPPET 146
+#define HOENN_DEX_BANETTE 147
+#define HOENN_DEX_SEVIPER 124
+#define HOENN_DEX_ZANGOOSE 123
+#define HOENN_DEX_RELICANTH 179
+#define HOENN_DEX_ARON 70
+#define HOENN_DEX_LAIRON 71
+#define HOENN_DEX_AGGRON 72
+#define HOENN_DEX_CASTFORM 142
+#define HOENN_DEX_VOLBEAT 86
+#define HOENN_DEX_ILLUMISE 87
+#define HOENN_DEX_LILEEP 133
+#define HOENN_DEX_CRADILY 134
+#define HOENN_DEX_ANORITH 135
+#define HOENN_DEX_ARMALDO 136
+#define HOENN_DEX_RALTS 29
+#define HOENN_DEX_KIRLIA 30
+#define HOENN_DEX_GARDEVOIR 31
+#define HOENN_DEX_BAGON 187
+#define HOENN_DEX_SHELGON 188
+#define HOENN_DEX_SALAMENCE 189
+#define HOENN_DEX_BELDUM 190
+#define HOENN_DEX_METANG 191
+#define HOENN_DEX_METAGROSS 192
+#define HOENN_DEX_REGIROCK 193
+#define HOENN_DEX_REGICE 194
+#define HOENN_DEX_REGISTEEL 195
+#define HOENN_DEX_KYOGRE 198
+#define HOENN_DEX_GROUDON 199
+#define HOENN_DEX_RAYQUAZA 200
+#define HOENN_DEX_LATIAS 196
+#define HOENN_DEX_LATIOS 197
+#define HOENN_DEX_JIRACHI 201
+#define HOENN_DEX_DEOXYS 202
+#define HOENN_DEX_CHIMECHO 151
+
#endif // GUARD_CONSTANTS_SPECIES_H
diff --git a/include/contest.h b/include/contest.h
index b7324e26b..18f9ad21f 100644
--- a/include/contest.h
+++ b/include/contest.h
@@ -341,7 +341,8 @@ struct UnknownContestStruct7
u8 contestant;
};
-struct ContestAIInfo {
+struct ContestAIInfo
+{
/*0x00*/ u8 aiState;
/*0x02*/ u16 unk2;
/*0x04*/ u8 unk4;
@@ -352,9 +353,9 @@ struct ContestAIInfo {
/*0x14*/ u32 flags;
/*0x18*/ s16 scriptResult;
/*0x1A*/ s16 scriptArr[3];
- /*0x20*/ u32 stack[8];
- /*0x40*/ u8 unk40;
- /*0x41*/ u8 unk41;
+ /*0x20*/ const u8 *stack[8];
+ /*0x40*/ u8 stackSize;
+ /*0x41*/ u8 contestantId;
};
struct UnknownContestStruct5
@@ -406,7 +407,7 @@ extern struct ContestResources *gContestResources;
#define sContest (*gContestResources->field_0)
#define sContestantStatus (gContestResources->field_4)
#define shared192D0 (*gContestResources->field_8)
-#define eContestAI (*gContestResources->field_C)
+#define eContestAI (gContestResources->field_C)
#define shared19328 (*gContestResources->field_10)
#define shared19338 (*gContestResources->field_14)
@@ -417,5 +418,12 @@ extern u32 gContestRngValue;
bool8 IsSpeciesNotUnown(u16 species);
void LoadContestBgAfterMoveAnim(void);
+void SetContestantEffectStringID(u8 a, u8 b);
+void SetContestantEffectStringID2(u8 a, u8 b);
+void MakeContestantNervous(u8 p);
+bool8 Contest_IsMonsTurnDisabled(u8 a);
+bool8 sub_80DE1E8(u8 a);
+void SetStartledString(u8 a, u8 b);
+s8 Contest_GetMoveExcitement(u16);
#endif //GUARD_CONTEST_H
diff --git a/include/contest_ai.h b/include/contest_ai.h
new file mode 100644
index 000000000..20b9eec10
--- /dev/null
+++ b/include/contest_ai.h
@@ -0,0 +1,16 @@
+#ifndef GUARD_CONTESTAI_H
+#define GUARD_CONTESTAI_H
+
+// AI states
+enum
+{
+ CONTESTAI_SETTING_UP,
+ CONTESTAI_PROCESSING,
+ CONTESTAI_FINISHED,
+ CONTESTAI_DO_NOT_PROCESS
+};
+
+void ContestAI_ResetAI(u8);
+u8 ContestAI_GetActionToUse(void);
+
+#endif // GUARD_CONTESTAI_H
diff --git a/include/contest_effect.h b/include/contest_effect.h
index c8f5e389a..5f48e1b8b 100644
--- a/include/contest_effect.h
+++ b/include/contest_effect.h
@@ -17,7 +17,9 @@ struct ContestEffect
};
extern const struct ContestMove gContestMoves[];
-extern struct ContestEffect gContestEffects[];
+extern const struct ContestEffect gContestEffects[];
extern const u8 *const gContestEffectDescriptionPointers[];
+bool8 AreMovesContestCombo(u16 lastMove, u16 nextMove);
+
#endif //GUARD_CONTEST_EFFECT_H
diff --git a/ld_script.txt b/ld_script.txt
index 2311301b0..19a08c7c5 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -203,7 +203,7 @@ SECTIONS {
src/save.o(.text);
src/mystery_event_script.o(.text);
asm/field_effect_helpers.o(.text);
- asm/contest_ai.o(.text);
+ src/contest_ai.o(.text);
src/battle_anim_sound_tasks.o(.text);
src/battle_controller_safari.o(.text);
src/fldeff_sweetscent.o(.text);
@@ -490,7 +490,7 @@ SECTIONS {
data/cable_car.o(.rodata);
src/save.o(.rodata);
data/field_effect_helpers.o(.rodata);
- data/contest_ai.o(.rodata);
+ src/contest_ai.o(.rodata);
src/battle_controller_safari.o(.rodata);
data/battle_anim_815A0D4.o(.rodata);
src/learn_move.o(.rodata);
diff --git a/src/contest.c b/src/contest.c
index 8513fc4a9..910637387 100644
--- a/src/contest.c
+++ b/src/contest.c
@@ -107,7 +107,7 @@ u16 sub_80DE84C(u16);
void sub_80DB89C(void);
u16 sub_80DB8B8(u8);
void sub_80DB918(void);
-bool8 sub_80DBCA8(u8);
+bool8 Contest_IsMonsTurnDisabled(u8);
void sub_80DBF68(void);
void sub_80DBF90(void);
void sub_80DC2BC(void);
@@ -721,7 +721,7 @@ void sub_80D833C(u8 taskId)
sub_80DCD48();
DmaCopy32Defvars(3, gPlttBufferUnfaded, shared18000.unk18204, 0x400);
ConvertIntToDecimalStringN(gStringVar1, gContestResources->field_0->turnNumber + 1, STR_CONV_MODE_LEFT_ALIGN, 1);
- if (!sub_80DBCA8(gContestPlayerMonIndex))
+ if (!Contest_IsMonsTurnDisabled(gContestPlayerMonIndex))
StringCopy(gDisplayedStringBattle, gText_0827D507);
else
StringCopy(gDisplayedStringBattle, gText_0827D531);
@@ -745,7 +745,7 @@ void sub_80D8424(u8 taskId)
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys == B_BUTTON))
{
PlaySE(SE_SELECT);
- if (!sub_80DBCA8(gContestPlayerMonIndex))
+ if (!Contest_IsMonsTurnDisabled(gContestPlayerMonIndex))
{
sub_80DC490(TRUE);
gTasks[taskId].func = sub_80D8490;
@@ -819,7 +819,7 @@ void sub_80D8610(u8 taskId)
PlaySE(SE_SELECT);
sub_80DC490(FALSE);
ConvertIntToDecimalStringN(gStringVar1, gContestResources->field_0->turnNumber + 1, STR_CONV_MODE_LEFT_ALIGN, 1);
- if (!sub_80DBCA8(gContestPlayerMonIndex))
+ if (!Contest_IsMonsTurnDisabled(gContestPlayerMonIndex))
StringCopy(gDisplayedStringBattle, gText_0827D507);
else
StringCopy(gDisplayedStringBattle, gText_0827D531);
@@ -2636,7 +2636,7 @@ void sub_80DB4E0(u16 move, u8 b)
{
u8 r7 = gUnknown_02039F26[b] * 5 + 2;
- if (!sub_80DBCA8(b) && move != MOVE_NONE)
+ if (!Contest_IsMonsTurnDisabled(b) && move != MOVE_NONE)
{
u16 tile = sub_80DB2EC(move, b);
diff --git a/src/contest_ai.c b/src/contest_ai.c
new file mode 100644
index 000000000..3324ddf87
--- /dev/null
+++ b/src/contest_ai.c
@@ -0,0 +1,1756 @@
+#include "global.h"
+#include "contest.h"
+#include "random.h"
+#include "contest_ai.h"
+#include "contest_effect.h"
+
+extern u16 gContestMonConditions[];
+
+extern const u8 *gAIScriptPtr;
+extern const u8 *gContestAIs[];
+
+static void ContestAICmd_unk_00(void);
+static void ContestAICmd_get_turn(void);
+static void ContestAICmd_unk_02(void);
+static void ContestAICmd_unk_03(void);
+static void ContestAICmd_unk_04(void);
+static void ContestAICmd_unk_05(void);
+static void ContestAICmd_get_excitement(void);
+static void ContestAICmd_unk_07(void);
+static void ContestAICmd_unk_08(void);
+static void ContestAICmd_unk_09(void);
+static void ContestAICmd_unk_0A(void);
+static void ContestAICmd_get_user_order(void);
+static void ContestAICmd_unk_0C(void);
+static void ContestAICmd_unk_0D(void);
+static void ContestAICmd_unk_0E(void);
+static void ContestAICmd_unk_0F(void);
+static void ContestAICmd_get_user_condition_maybe(void);
+static void ContestAICmd_unk_11(void);
+static void ContestAICmd_unk_12(void);
+static void ContestAICmd_unk_13(void);
+static void ContestAICmd_unk_14(void);
+static void ContestAICmd_unk_15(void);
+static void ContestAICmd_unk_16(void);
+static void ContestAICmd_unk_17(void);
+static void ContestAICmd_unk_18(void);
+static void ContestAICmd_unk_19(void);
+static void ContestAICmd_unk_1A(void);
+static void ContestAICmd_unk_1B(void);
+static void ContestAICmd_unk_1C(void);
+static void ContestAICmd_unk_1D(void);
+static void ContestAICmd_unk_1E(void);
+static void ContestAICmd_get_contest_type(void);
+static void ContestAICmd_unk_20(void);
+static void ContestAICmd_unk_21(void);
+static void ContestAICmd_get_move_excitement(void);
+static void ContestAICmd_unk_23(void);
+static void ContestAICmd_unk_24(void);
+static void ContestAICmd_unk_25(void);
+static void ContestAICmd_unk_26(void);
+static void ContestAICmd_get_move_effect(void);
+static void ContestAICmd_unk_28(void);
+static void ContestAICmd_unk_29(void);
+static void ContestAICmd_get_move_effect_type(void);
+static void ContestAICmd_unk_2B(void);
+static void ContestAICmd_unk_2C(void);
+static void ContestAICmd_check_move_has_highest_appeal(void);
+static void ContestAICmd_unk_2E(void);
+static void ContestAICmd_unk_2F(void);
+static void ContestAICmd_unk_30(void);
+static void ContestAICmd_unk_31(void);
+static void ContestAICmd_unk_32(void);
+static void ContestAICmd_unk_33(void);
+static void ContestAICmd_unk_34(void);
+static void ContestAICmd_unk_35(void);
+static void ContestAICmd_unk_36(void);
+static void ContestAICmd_unk_37(void);
+static void ContestAICmd_unk_38(void);
+static void ContestAICmd_unk_39(void);
+static void ContestAICmd_unk_3A(void);
+static void ContestAICmd_get_move_used_count(void);
+static void ContestAICmd_unk_3C(void);
+static void ContestAICmd_unk_3D(void);
+static void ContestAICmd_unk_3E(void);
+static void ContestAICmd_unk_3F(void);
+static void ContestAICmd_check_combo_starter(void);
+static void ContestAICmd_unk_41(void);
+static void ContestAICmd_unk_42(void);
+static void ContestAICmd_check_combo_finisher(void);
+static void ContestAICmd_unk_44(void);
+static void ContestAICmd_unk_45(void);
+static void ContestAICmd_check_would_finish_combo(void);
+static void ContestAICmd_unk_47(void);
+static void ContestAICmd_unk_48(void);
+static void ContestAICmd_get_condition(void);
+static void ContestAICmd_unk_4A(void);
+static void ContestAICmd_unk_4B(void);
+static void ContestAICmd_unk_4C(void);
+static void ContestAICmd_unk_4D(void);
+static void ContestAICmd_get_used_combo_starter(void);
+static void ContestAICmd_unk_4F(void);
+static void ContestAICmd_unk_50(void);
+static void ContestAICmd_unk_51(void);
+static void ContestAICmd_unk_52(void);
+static void ContestAICmd_check_can_participate(void);
+static void ContestAICmd_unk_54(void);
+static void ContestAICmd_unk_55(void);
+static void ContestAICmd_get_val_812A188(void);
+static void ContestAICmd_unk_57(void);
+static void ContestAICmd_unk_58(void);
+static void ContestAICmd_unk_59(void);
+static void ContestAICmd_unk_5A(void);
+static void ContestAICmd_unk_5B(void);
+static void ContestAICmd_unk_5C(void);
+static void ContestAICmd_unk_5D(void);
+static void ContestAICmd_unk_5E(void);
+static void ContestAICmd_unk_5F(void);
+static void ContestAICmd_unk_60(void);
+static void ContestAICmd_unk_61(void);
+static void ContestAICmd_unk_62(void);
+static void ContestAICmd_unk_63(void);
+static void ContestAICmd_unk_64(void);
+static void ContestAICmd_unk_65(void);
+static void ContestAICmd_unk_66(void);
+static void ContestAICmd_unk_67(void);
+static void ContestAICmd_unk_68(void);
+static void ContestAICmd_unk_69(void);
+static void ContestAICmd_unk_6A(void);
+static void ContestAICmd_unk_6B(void);
+static void ContestAICmd_unk_6C(void);
+static void ContestAICmd_unk_6D(void);
+static void ContestAICmd_unk_6E(void);
+static void ContestAICmd_unk_6F(void);
+static void ContestAICmd_unk_70(void);
+static void ContestAICmd_unk_71(void);
+static void ContestAICmd_unk_72(void);
+static void ContestAICmd_unk_73(void);
+static void ContestAICmd_unk_74(void);
+static void ContestAICmd_unk_75(void);
+static void ContestAICmd_unk_76(void);
+static void ContestAICmd_unk_77(void);
+static void ContestAICmd_unk_78(void);
+static void ContestAICmd_unk_79(void);
+static void ContestAICmd_unk_7A(void);
+static void ContestAICmd_unk_7B(void);
+static void ContestAICmd_unk_7C(void);
+static void ContestAICmd_unk_7D(void);
+static void ContestAICmd_unk_7E(void);
+static void ContestAICmd_unk_7F(void);
+static void ContestAICmd_unk_80(void);
+static void ContestAICmd_unk_81(void);
+static void ContestAICmd_check_for_exciting_move(void);
+static void ContestAICmd_unk_83(void);
+static void ContestAICmd_unk_84(void);
+static void ContestAICmd_unk_85(void);
+static void ContestAICmd_unk_86(void);
+static void ContestAICmd_unk_87(void);
+
+typedef void (* ContestAICmdFunc)(void);
+
+static const ContestAICmdFunc sContestAICmdTable[] =
+{
+ ContestAICmd_unk_00, // 0x00
+ ContestAICmd_get_turn, // 0x01
+ ContestAICmd_unk_02, // 0x02
+ ContestAICmd_unk_03, // 0x03
+ ContestAICmd_unk_04, // 0x04
+ ContestAICmd_unk_05, // 0x05
+ ContestAICmd_get_excitement, // 0x06
+ ContestAICmd_unk_07, // 0x07
+ ContestAICmd_unk_08, // 0x08
+ ContestAICmd_unk_09, // 0x09
+ ContestAICmd_unk_0A, // 0x0A
+ ContestAICmd_get_user_order, // 0x0B
+ ContestAICmd_unk_0C, // 0x0C
+ ContestAICmd_unk_0D, // 0x0D
+ ContestAICmd_unk_0E, // 0x0E
+ ContestAICmd_unk_0F, // 0x0F
+ ContestAICmd_get_user_condition_maybe, // 0x10
+ ContestAICmd_unk_11, // 0x11
+ ContestAICmd_unk_12, // 0x12
+ ContestAICmd_unk_13, // 0x13
+ ContestAICmd_unk_14, // 0x14
+ ContestAICmd_unk_15, // 0x15
+ ContestAICmd_unk_16, // 0x16
+ ContestAICmd_unk_17, // 0x17
+ ContestAICmd_unk_18, // 0x18
+ ContestAICmd_unk_19, // 0x19
+ ContestAICmd_unk_1A, // 0x1A
+ ContestAICmd_unk_1B, // 0x1B
+ ContestAICmd_unk_1C, // 0x1C
+ ContestAICmd_unk_1D, // 0x1D
+ ContestAICmd_unk_1E, // 0x1E
+ ContestAICmd_get_contest_type, // 0x1F
+ ContestAICmd_unk_20, // 0x20
+ ContestAICmd_unk_21, // 0x21
+ ContestAICmd_get_move_excitement, // 0x22
+ ContestAICmd_unk_23, // 0x23
+ ContestAICmd_unk_24, // 0x24
+ ContestAICmd_unk_25, // 0x25
+ ContestAICmd_unk_26, // 0x26
+ ContestAICmd_get_move_effect, // 0x27
+ ContestAICmd_unk_28, // 0x28
+ ContestAICmd_unk_29, // 0x29
+ ContestAICmd_get_move_effect_type, // 0x2A
+ ContestAICmd_unk_2B, // 0x2B
+ ContestAICmd_unk_2C, // 0x2C
+ ContestAICmd_check_move_has_highest_appeal, // 0x2D
+ ContestAICmd_unk_2E, // 0x2E
+ ContestAICmd_unk_2F, // 0x2F
+ ContestAICmd_unk_30, // 0x30
+ ContestAICmd_unk_31, // 0x31
+ ContestAICmd_unk_32, // 0x32
+ ContestAICmd_unk_33, // 0x33
+ ContestAICmd_unk_34, // 0x34
+ ContestAICmd_unk_35, // 0x35
+ ContestAICmd_unk_36, // 0x36
+ ContestAICmd_unk_37, // 0x37
+ ContestAICmd_unk_38, // 0x38
+ ContestAICmd_unk_39, // 0x39
+ ContestAICmd_unk_3A, // 0x3A
+ ContestAICmd_get_move_used_count, // 0x3B
+ ContestAICmd_unk_3C, // 0x3C
+ ContestAICmd_unk_3D, // 0x3D
+ ContestAICmd_unk_3E, // 0x3E
+ ContestAICmd_unk_3F, // 0x3F
+ ContestAICmd_check_combo_starter, // 0x40
+ ContestAICmd_unk_41, // 0x41
+ ContestAICmd_unk_42, // 0x42
+ ContestAICmd_check_combo_finisher, // 0x43
+ ContestAICmd_unk_44, // 0x44
+ ContestAICmd_unk_45, // 0x45
+ ContestAICmd_check_would_finish_combo, // 0x46
+ ContestAICmd_unk_47, // 0x47
+ ContestAICmd_unk_48, // 0x48
+ ContestAICmd_get_condition, // 0x49
+ ContestAICmd_unk_4A, // 0x4A
+ ContestAICmd_unk_4B, // 0x4B
+ ContestAICmd_unk_4C, // 0x4C
+ ContestAICmd_unk_4D, // 0x4D
+ ContestAICmd_get_used_combo_starter, // 0x4E
+ ContestAICmd_unk_4F, // 0x4F
+ ContestAICmd_unk_50, // 0x50
+ ContestAICmd_unk_51, // 0x51
+ ContestAICmd_unk_52, // 0x52
+ ContestAICmd_check_can_participate, // 0x53
+ ContestAICmd_unk_54, // 0x54
+ ContestAICmd_unk_55, // 0x55
+ ContestAICmd_get_val_812A188, // 0x56
+ ContestAICmd_unk_57, // 0x57
+ ContestAICmd_unk_58, // 0x58
+ ContestAICmd_unk_59, // 0x59
+ ContestAICmd_unk_5A, // 0x5A
+ ContestAICmd_unk_5B, // 0x5B
+ ContestAICmd_unk_5C, // 0x5C
+ ContestAICmd_unk_5D, // 0x5D
+ ContestAICmd_unk_5E, // 0x5E
+ ContestAICmd_unk_5F, // 0x5F
+ ContestAICmd_unk_60, // 0x60
+ ContestAICmd_unk_61, // 0x61
+ ContestAICmd_unk_62, // 0x62
+ ContestAICmd_unk_63, // 0x63
+ ContestAICmd_unk_64, // 0x64
+ ContestAICmd_unk_65, // 0x65
+ ContestAICmd_unk_66, // 0x66
+ ContestAICmd_unk_67, // 0x67
+ ContestAICmd_unk_68, // 0x68
+ ContestAICmd_unk_69, // 0x69
+ ContestAICmd_unk_6A, // 0x6A
+ ContestAICmd_unk_6B, // 0x6B
+ ContestAICmd_unk_6C, // 0x6C
+ ContestAICmd_unk_6D, // 0x6D
+ ContestAICmd_unk_6E, // 0x6E
+ ContestAICmd_unk_6F, // 0x6F
+ ContestAICmd_unk_70, // 0x70
+ ContestAICmd_unk_71, // 0x71
+ ContestAICmd_unk_72, // 0x72
+ ContestAICmd_unk_73, // 0x73
+ ContestAICmd_unk_74, // 0x74
+ ContestAICmd_unk_75, // 0x75
+ ContestAICmd_unk_76, // 0x76
+ ContestAICmd_unk_77, // 0x77
+ ContestAICmd_unk_78, // 0x78
+ ContestAICmd_unk_79, // 0x79
+ ContestAICmd_unk_7A, // 0x7A
+ ContestAICmd_unk_7B, // 0x7B
+ ContestAICmd_unk_7C, // 0x7C
+ ContestAICmd_unk_7D, // 0x7D
+ ContestAICmd_unk_7E, // 0x7E
+ ContestAICmd_unk_7F, // 0x7F
+ ContestAICmd_unk_80, // 0x80
+ ContestAICmd_unk_81, // 0x81
+ ContestAICmd_check_for_exciting_move, // 0x82
+ ContestAICmd_unk_83, // 0x83
+ ContestAICmd_unk_84, // 0x84
+ ContestAICmd_unk_85, // 0x85
+ ContestAICmd_unk_86, // 0x86
+ ContestAICmd_unk_87, // 0x87
+};
+
+static void ContestAI_DoAIProcessing(void);
+static bool8 sub_81563B0(u8);
+static void AIStackPushVar(const u8 *);
+static u8 AIStackPop(void);
+
+void ContestAI_ResetAI(u8 contestantAI)
+{
+ int i;
+ memset(eContestAI, 0, sizeof(struct ContestAIInfo));
+
+ for (i = 0; i < 4; i++)
+ eContestAI->unk5[i] = 100;
+
+ eContestAI->contestantId = contestantAI;
+ eContestAI->stackSize = 0;
+ eContestAI->flags = gContestMons[eContestAI->contestantId].flags;
+}
+
+u8 ContestAI_GetActionToUse(void)
+{
+ while (eContestAI->flags != 0)
+ {
+ if (eContestAI->flags & 1)
+ {
+ eContestAI->aiState = 0;
+ ContestAI_DoAIProcessing();
+ }
+ eContestAI->flags >>= 1;
+ eContestAI->unk10++;
+ eContestAI->unk4 = 0;
+ }
+
+ while (1)
+ {
+ u8 rval = Random() & 3;
+ u8 r2 = eContestAI->unk5[rval];
+ int i;
+ for (i = 0; i < 4; i++)
+ {
+ if (r2 < eContestAI->unk5[i])
+ break;
+ }
+ if (i == 4)
+ return rval;
+ }
+}
+
+static void ContestAI_DoAIProcessing(void)
+{
+ while (eContestAI->aiState != CONTESTAI_FINISHED)
+ {
+ switch(eContestAI->aiState)
+ {
+ case CONTESTAI_DO_NOT_PROCESS:
+ break;
+ case CONTESTAI_SETTING_UP:
+ gAIScriptPtr = gContestAIs[eContestAI->unk10];
+
+ if (gContestMons[eContestAI->contestantId].moves[eContestAI->unk4] == 0)
+ eContestAI->unk2 = 0; // don't process a move that doesn't exist.
+ else
+ eContestAI->unk2 = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+ eContestAI->aiState++;
+ break;
+ case CONTESTAI_PROCESSING:
+ if (eContestAI->unk2 != 0)
+ sContestAICmdTable[*gAIScriptPtr](); // run the command.
+ else
+ {
+ eContestAI->unk5[eContestAI->unk4] = 0; // don't consider a move that doesn't exist.
+ eContestAI->aiAction |= 1;
+ }
+ if (eContestAI->aiAction & 1)
+ {
+ eContestAI->unk4++;
+ if (eContestAI->unk4 < 4)
+ eContestAI->aiState = 0;
+ else
+ eContestAI->aiState++;
+ eContestAI->aiAction &= 0xFE; // TODO: Define action flags
+ }
+ break;
+ }
+ }
+}
+
+static u8 sub_81563B0(u8 var)
+{
+ int i;
+
+ for (i = 0; i < 4; i++)
+ if (shared192D0.turnOrder[i] == var)
+ break;
+
+ return i;
+}
+
+static void ContestAICmd_unk_00(void)
+{
+ s16 score = eContestAI->unk5[eContestAI->unk4] + (s8)gAIScriptPtr[1];
+
+ if (score > 255)
+ score = 255;
+ else if (score < 0)
+ score = 0;
+
+ eContestAI->unk5[eContestAI->unk4] = score;
+
+ gAIScriptPtr += 2;
+}
+
+static void ContestAICmd_get_turn(void)
+{
+ eContestAI->scriptResult = sContest.turnNumber;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_02(void)
+{
+ ContestAICmd_get_turn();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_03(void)
+{
+ ContestAICmd_get_turn();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_04(void)
+{
+ ContestAICmd_get_turn();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_05(void)
+{
+ ContestAICmd_get_turn();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_get_excitement(void)
+{
+ eContestAI->scriptResult = sContest.applauseLevel;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_07(void)
+{
+ ContestAICmd_get_excitement();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_08(void)
+{
+ ContestAICmd_get_excitement();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_09(void)
+{
+ ContestAICmd_get_excitement();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_0A(void)
+{
+ ContestAICmd_get_excitement();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_get_user_order(void)
+{
+ eContestAI->scriptResult = shared192D0.turnOrder[eContestAI->contestantId];
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_0C(void)
+{
+ ContestAICmd_get_user_order();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_0D(void)
+{
+ ContestAICmd_get_user_order();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_0E(void)
+{
+ ContestAICmd_get_user_order();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_0F(void)
+{
+ ContestAICmd_get_user_order();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_get_user_condition_maybe(void)
+{
+ eContestAI->scriptResult = sContestantStatus[eContestAI->contestantId].condition / 10;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_11(void)
+{
+ ContestAICmd_get_user_condition_maybe();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_12(void)
+{
+ ContestAICmd_get_user_condition_maybe();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_13(void)
+{
+ ContestAICmd_get_user_condition_maybe();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_14(void)
+{
+ ContestAICmd_get_user_condition_maybe();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_15(void)
+{
+ eContestAI->scriptResult = sContestantStatus[eContestAI->contestantId].unk4;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_16(void)
+{
+ ContestAICmd_unk_15();
+
+ if (eContestAI->scriptResult < (s16)T1_READ_16(gAIScriptPtr + 0))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 2);
+ else
+ gAIScriptPtr += 6;
+}
+
+static void ContestAICmd_unk_17(void)
+{
+ ContestAICmd_unk_15();
+
+ if (eContestAI->scriptResult > (s16)T1_READ_16(gAIScriptPtr + 0))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 2);
+ else
+ gAIScriptPtr += 6;
+}
+
+static void ContestAICmd_unk_18(void)
+{
+ ContestAICmd_unk_15();
+
+ if (eContestAI->scriptResult == (s16)T1_READ_16(gAIScriptPtr + 0))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 2);
+ else
+ gAIScriptPtr += 6;
+}
+
+static void ContestAICmd_unk_19(void)
+{
+ ContestAICmd_unk_15();
+
+ if (eContestAI->scriptResult != (s16)T1_READ_16(gAIScriptPtr + 0))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 2);
+ else
+ gAIScriptPtr += 6;
+}
+
+static void ContestAICmd_unk_1A(void)
+{
+ eContestAI->scriptResult = gContestMonConditions[eContestAI->contestantId];
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_1B(void)
+{
+ ContestAICmd_unk_1A();
+
+ if (eContestAI->scriptResult < (s16)T1_READ_16(gAIScriptPtr + 0))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 2);
+ else
+ gAIScriptPtr += 6;
+}
+
+static void ContestAICmd_unk_1C(void)
+{
+ ContestAICmd_unk_1A();
+
+ if (eContestAI->scriptResult > (s16)T1_READ_16(gAIScriptPtr + 0))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 2);
+ else
+ gAIScriptPtr += 6;
+}
+
+static void ContestAICmd_unk_1D(void)
+{
+ ContestAICmd_unk_1A();
+
+ if (eContestAI->scriptResult == (s16)T1_READ_16(gAIScriptPtr + 0))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 2);
+ else
+ gAIScriptPtr += 6;
+}
+
+static void ContestAICmd_unk_1E(void)
+{
+ ContestAICmd_unk_1A();
+
+ if (eContestAI->scriptResult != (s16)T1_READ_16(gAIScriptPtr + 0))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 2);
+ else
+ gAIScriptPtr += 6;
+}
+
+static void ContestAICmd_get_contest_type(void)
+{
+ eContestAI->scriptResult = gSpecialVar_ContestCategory;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_20(void)
+{
+ ContestAICmd_get_contest_type();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_21(void)
+{
+ ContestAICmd_get_contest_type();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_get_move_excitement(void)
+{
+ eContestAI->scriptResult = Contest_GetMoveExcitement(gContestMons[eContestAI->contestantId].moves[eContestAI->unk4]);
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_23(void)
+{
+ ContestAICmd_get_move_excitement();
+
+ if (eContestAI->scriptResult < (s8)gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_24(void)
+{
+ ContestAICmd_get_move_excitement();
+
+ if (eContestAI->scriptResult > (s8)gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_25(void)
+{
+ ContestAICmd_get_move_excitement();
+
+ if (eContestAI->scriptResult == (s8)gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_26(void)
+{
+ ContestAICmd_get_move_excitement();
+
+ if (eContestAI->scriptResult != (s8)gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_get_move_effect(void)
+{
+ u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+
+ eContestAI->scriptResult = gContestMoves[move].effect;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_28(void)
+{
+ ContestAICmd_get_move_effect();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_29(void)
+{
+ ContestAICmd_get_move_effect();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_get_move_effect_type(void)
+{
+ u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+
+ eContestAI->scriptResult = gContestEffects[gContestMoves[move].effect].effectType;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_2B(void)
+{
+ ContestAICmd_get_move_effect_type();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_2C(void)
+{
+ ContestAICmd_get_move_effect_type();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_check_move_has_highest_appeal(void)
+{
+ int i;
+ u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+ u8 appeal = gContestEffects[gContestMoves[move].effect].appeal;
+
+ for (i = 0; i < 4; i++)
+ {
+ u16 newMove = gContestMons[eContestAI->contestantId].moves[i];
+ if (newMove != 0 && appeal < gContestEffects[gContestMoves[newMove].effect].appeal)
+ break;
+ }
+
+ if (i == 4)
+ eContestAI->scriptResult = TRUE;
+ else
+ eContestAI->scriptResult = FALSE;
+
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_2E(void)
+{
+ ContestAICmd_check_move_has_highest_appeal();
+
+ if (eContestAI->scriptResult != FALSE)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_2F(void)
+{
+ int i;
+ u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+ u8 jam = gContestEffects[gContestMoves[move].effect].jam;
+
+ for (i = 0; i < 4; i++)
+ {
+ u16 newMove = gContestMons[eContestAI->contestantId].moves[i];
+ if (newMove != 0 && jam < gContestEffects[gContestMoves[newMove].effect].jam)
+ break;
+ }
+
+ if (i == 4)
+ eContestAI->scriptResult = TRUE;
+ else
+ eContestAI->scriptResult = FALSE;
+
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_30(void)
+{
+ ContestAICmd_unk_2F();
+
+ if (eContestAI->scriptResult != FALSE)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_31(void)
+{
+ u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+
+ eContestAI->scriptResult = gContestEffects[gContestMoves[move].effect].appeal / 10;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_32(void)
+{
+ ContestAICmd_unk_31();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_33(void)
+{
+ ContestAICmd_unk_31();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_34(void)
+{
+ ContestAICmd_unk_31();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_35(void)
+{
+ ContestAICmd_unk_31();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_36(void)
+{
+ u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+
+ eContestAI->scriptResult = gContestEffects[gContestMoves[move].effect].jam / 10;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_37(void)
+{
+ ContestAICmd_unk_36();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_38(void)
+{
+ ContestAICmd_unk_36();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_39(void)
+{
+ ContestAICmd_unk_36();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_3A(void)
+{
+ ContestAICmd_unk_36();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_get_move_used_count(void)
+{
+ s16 result;
+ u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+
+ if (move != sContestantStatus[eContestAI->contestantId].prevMove)
+ result = 0; // move is unique and not reused.
+ else
+ result = sContestantStatus[eContestAI->contestantId].moveRepeatCount + 1;
+
+ eContestAI->scriptResult = result;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_3C(void)
+{
+ ContestAICmd_get_move_used_count();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_3D(void)
+{
+ ContestAICmd_get_move_used_count();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_3E(void)
+{
+ ContestAICmd_get_move_used_count();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_3F(void)
+{
+ ContestAICmd_get_move_used_count();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_check_combo_starter(void)
+{
+ u8 result = 0;
+ int i;
+ u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+
+ for (i = 0; i < 4; i++)
+ {
+ if (gContestMons[eContestAI->contestantId].moves[i])
+ {
+ result = AreMovesContestCombo(move, gContestMons[eContestAI->contestantId].moves[i]);
+ if (result)
+ {
+ result = 1;
+ break;
+ }
+ }
+ }
+
+ if (result)
+ result = 1;
+
+ eContestAI->scriptResult = result;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_41(void)
+{
+ ContestAICmd_check_combo_starter();
+
+ if (eContestAI->scriptResult != 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_42(void)
+{
+ ContestAICmd_check_combo_starter();
+
+ if (eContestAI->scriptResult == 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_check_combo_finisher(void)
+{
+ u8 result = 0;
+ int i;
+ u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+
+ for (i = 0; i < 4; i++)
+ {
+ if (gContestMons[eContestAI->contestantId].moves[i])
+ {
+ result = AreMovesContestCombo(gContestMons[eContestAI->contestantId].moves[i], move);
+ if (result)
+ {
+ result = 1;
+ break;
+ }
+ }
+ }
+
+ if (result)
+ result = 1;
+
+ eContestAI->scriptResult = result;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_44(void)
+{
+ ContestAICmd_check_combo_finisher();
+
+ if (eContestAI->scriptResult != 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_45(void)
+{
+ ContestAICmd_check_combo_finisher();
+
+ if (eContestAI->scriptResult == 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_check_would_finish_combo(void)
+{
+ u8 result = 0;
+ u16 move = gContestMons[eContestAI->contestantId].moves[eContestAI->unk4];
+
+ if (sContestantStatus[eContestAI->contestantId].prevMove)
+ result = AreMovesContestCombo(sContestantStatus[eContestAI->contestantId].prevMove, move);
+
+ if (result)
+ result = 1;
+
+ eContestAI->scriptResult = result;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_47(void)
+{
+ ContestAICmd_check_would_finish_combo();
+
+ if (eContestAI->scriptResult != 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_48(void)
+{
+ ContestAICmd_check_would_finish_combo();
+
+ if (eContestAI->scriptResult == 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_get_condition(void)
+{
+ int var = sub_81563B0(gAIScriptPtr[1]);
+
+ eContestAI->scriptResult = sContestantStatus[var].condition / 10;
+ gAIScriptPtr += 2;
+}
+
+static void ContestAICmd_unk_4A(void)
+{
+ ContestAICmd_get_condition();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_4B(void)
+{
+ ContestAICmd_get_condition();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_4C(void)
+{
+ ContestAICmd_get_condition();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_4D(void)
+{
+ ContestAICmd_get_condition();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_get_used_combo_starter(void)
+{
+ u16 result = 0;
+ u8 var = sub_81563B0(gAIScriptPtr[1]);
+
+ if (sub_80DE1E8(var))
+ result = gContestMoves[sContestantStatus[var].prevMove].comboStarterId ? 1 : 0;
+
+ eContestAI->scriptResult = result;
+ gAIScriptPtr += 2;
+}
+
+static void ContestAICmd_unk_4F(void)
+{
+ ContestAICmd_get_used_combo_starter();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_50(void)
+{
+ ContestAICmd_get_used_combo_starter();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_51(void)
+{
+ ContestAICmd_get_used_combo_starter();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_52(void)
+{
+ ContestAICmd_get_used_combo_starter();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_check_can_participate(void)
+{
+ if (Contest_IsMonsTurnDisabled(sub_81563B0(gAIScriptPtr[1])))
+ eContestAI->scriptResult = FALSE;
+ else
+ eContestAI->scriptResult = TRUE;
+
+ gAIScriptPtr += 2;
+}
+
+static void ContestAICmd_unk_54(void)
+{
+ ContestAICmd_check_can_participate();
+
+ if (eContestAI->scriptResult != 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_55(void)
+{
+ ContestAICmd_check_can_participate();
+
+ if (eContestAI->scriptResult == 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_get_val_812A188(void)
+{
+ u8 var = sub_81563B0(gAIScriptPtr[1]);
+
+ eContestAI->scriptResult = sContestantStatus[var].unk15_3;
+ gAIScriptPtr += 2;
+}
+
+static void ContestAICmd_unk_57(void)
+{
+ ContestAICmd_get_val_812A188();
+
+ if (eContestAI->scriptResult != 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_58(void)
+{
+ ContestAICmd_get_val_812A188();
+
+ if (eContestAI->scriptResult == 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_59(void)
+{
+ u8 var = sub_81563B0(gAIScriptPtr[1]);
+
+ eContestAI->scriptResult = sContestantStatus[var].unk4 - sContestantStatus[eContestAI->contestantId].unk4;
+ gAIScriptPtr += 2;
+}
+
+static void ContestAICmd_unk_5A(void)
+{
+ ContestAICmd_unk_59();
+
+ if (eContestAI->scriptResult < 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_5B(void)
+{
+ ContestAICmd_unk_59();
+
+ if (eContestAI->scriptResult > 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_5C(void)
+{
+ ContestAICmd_unk_59();
+
+ if (eContestAI->scriptResult == 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_5D(void)
+{
+ ContestAICmd_unk_59();
+
+ if (eContestAI->scriptResult != 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_5E(void)
+{
+ u8 var = sub_81563B0(gAIScriptPtr[1]);
+
+ eContestAI->scriptResult = gContestMonConditions[var] - gContestMonConditions[eContestAI->contestantId];
+ gAIScriptPtr += 2;
+}
+
+static void ContestAICmd_unk_5F(void)
+{
+ ContestAICmd_unk_5E();
+
+ if (eContestAI->scriptResult < 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_60(void)
+{
+ ContestAICmd_unk_5E();
+
+ if (eContestAI->scriptResult > 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_61(void)
+{
+ ContestAICmd_unk_5E();
+
+ if (eContestAI->scriptResult == 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_62(void)
+{
+ ContestAICmd_unk_5E();
+
+ if (eContestAI->scriptResult != 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_63(void)
+{
+ u8 var = sub_81563B0(gAIScriptPtr[1]);
+ u8 var2 = gAIScriptPtr[2];
+ u16 move = sContest.unk19220[var2][var];
+
+ eContestAI->scriptResult = gContestMoves[move].effect;
+ gAIScriptPtr += 3;
+}
+
+static void ContestAICmd_unk_64(void)
+{
+ ContestAICmd_unk_63();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_65(void)
+{
+ ContestAICmd_unk_63();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_66(void)
+{
+ ContestAICmd_unk_63();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_67(void)
+{
+ ContestAICmd_unk_63();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_68(void)
+{
+ u8 var = sub_81563B0(gAIScriptPtr[1]);
+ u8 var2 = gAIScriptPtr[2];
+ s8 result = sContest.unk19248[var2][var];
+
+ eContestAI->scriptResult = result;
+ gAIScriptPtr += 3;
+}
+
+static void ContestAICmd_unk_69(void)
+{
+ ContestAICmd_unk_68();
+
+ if (eContestAI->scriptResult < gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_6A(void)
+{
+ ContestAICmd_unk_68();
+
+ if (eContestAI->scriptResult > gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_6B(void)
+{
+ ContestAICmd_unk_68();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_6C(void)
+{
+ ContestAICmd_unk_68();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_6D(void)
+{
+ u8 var = sub_81563B0(gAIScriptPtr[1]);
+ u8 var2 = gAIScriptPtr[2];
+ u16 move = sContest.unk19220[var2][var];
+
+ eContestAI->scriptResult = gContestEffects[gContestMoves[move].effect].effectType;
+ gAIScriptPtr += 3;
+}
+
+static void ContestAICmd_unk_6E(void)
+{
+ ContestAICmd_unk_6D();
+
+ if (eContestAI->scriptResult == gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_6F(void)
+{
+ ContestAICmd_unk_6D();
+
+ if (eContestAI->scriptResult != gAIScriptPtr[0])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+ else
+ gAIScriptPtr += 5;
+}
+
+static void ContestAICmd_unk_70(void)
+{
+ eContestAI->scriptArr[gAIScriptPtr[1]] = eContestAI->scriptResult;
+ gAIScriptPtr += 2;
+}
+
+static void ContestAICmd_unk_71(void)
+{
+ eContestAI->scriptArr[gAIScriptPtr[1]] = T1_READ_16(gAIScriptPtr + 2);
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_72(void)
+{
+ // wtf? shouldn't T1_READ_16 work here? why the signed 8 load by gAIScriptPtr[2]?
+ eContestAI->scriptArr[gAIScriptPtr[1]] += ((s8)gAIScriptPtr[2] | gAIScriptPtr[3] << 8);
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_73(void)
+{
+ eContestAI->scriptArr[gAIScriptPtr[1]] += eContestAI->scriptArr[gAIScriptPtr[2]];
+ gAIScriptPtr += 3;
+}
+
+static void ContestAICmd_unk_74(void)
+{
+ eContestAI->scriptArr[gAIScriptPtr[1]] += eContestAI->scriptArr[gAIScriptPtr[2]];
+ gAIScriptPtr += 3;
+}
+
+static void ContestAICmd_unk_75(void)
+{
+ if (eContestAI->scriptArr[gAIScriptPtr[1]] < T1_READ_16(gAIScriptPtr + 2))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 4);
+ else
+ gAIScriptPtr += 8;
+}
+
+static void ContestAICmd_unk_76(void)
+{
+ if (eContestAI->scriptArr[gAIScriptPtr[1]] > T1_READ_16(gAIScriptPtr + 2))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 4);
+ else
+ gAIScriptPtr += 8;
+}
+
+static void ContestAICmd_unk_77(void)
+{
+ if (eContestAI->scriptArr[gAIScriptPtr[1]] == T1_READ_16(gAIScriptPtr + 2))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 4);
+ else
+ gAIScriptPtr += 8;
+}
+
+static void ContestAICmd_unk_78(void)
+{
+ if (eContestAI->scriptArr[gAIScriptPtr[1]] != T1_READ_16(gAIScriptPtr + 2))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 4);
+ else
+ gAIScriptPtr += 8;
+}
+
+static void ContestAICmd_unk_79(void)
+{
+ if (eContestAI->scriptArr[gAIScriptPtr[1]] < (eContestAI->scriptArr[gAIScriptPtr[2]]))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 3);
+ else
+ gAIScriptPtr += 7;
+}
+
+static void ContestAICmd_unk_7A(void)
+{
+ if (eContestAI->scriptArr[gAIScriptPtr[1]] > (eContestAI->scriptArr[gAIScriptPtr[2]]))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 3);
+ else
+ gAIScriptPtr += 7;
+}
+
+static void ContestAICmd_unk_7B(void)
+{
+ if (eContestAI->scriptArr[gAIScriptPtr[1]] == (eContestAI->scriptArr[gAIScriptPtr[2]]))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 3);
+ else
+ gAIScriptPtr += 7;
+}
+
+static void ContestAICmd_unk_7C(void)
+{
+ if (eContestAI->scriptArr[gAIScriptPtr[1]] != (eContestAI->scriptArr[gAIScriptPtr[2]]))
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 3);
+ else
+ gAIScriptPtr += 7;
+}
+
+static void ContestAICmd_unk_7D(void)
+{
+ if ((Random() & 0xFF) < eContestAI->scriptArr[gAIScriptPtr[1]])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 2);
+ else
+ gAIScriptPtr += 6;
+}
+
+static void ContestAICmd_unk_7E(void)
+{
+ if ((Random() & 0xFF) > eContestAI->scriptArr[gAIScriptPtr[1]])
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 2);
+ else
+ gAIScriptPtr += 6;
+}
+
+// jump
+static void ContestAICmd_unk_7F(void)
+{
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+}
+
+static void ContestAICmd_unk_80(void)
+{
+ AIStackPushVar(gAIScriptPtr + 5);
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 1);
+}
+
+static void ContestAICmd_unk_81(void)
+{
+ if (!AIStackPop())
+ eContestAI->aiAction |= 1;
+}
+
+static void AIStackPushVar(const u8 *ptr)
+{
+ eContestAI->stack[eContestAI->stackSize++] = ptr;
+}
+
+static bool8 AIStackPop(void)
+{
+ if (eContestAI->stackSize != 0)
+ {
+ --eContestAI->stackSize;
+ gAIScriptPtr = eContestAI->stack[eContestAI->stackSize];
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+static void ContestAICmd_check_for_exciting_move(void)
+{
+ int result = 0;
+ int i;
+
+ for (i = 0; i < 4; i++)
+ {
+ if (gContestMons[eContestAI->contestantId].moves[i])
+ {
+ if (Contest_GetMoveExcitement(gContestMons[eContestAI->contestantId].moves[i]) == 1)
+ {
+ result = 1;
+ break;
+ }
+ }
+ }
+
+ eContestAI->scriptResult = result;
+ gAIScriptPtr += 1;
+}
+
+static void ContestAICmd_unk_83(void)
+{
+ ContestAICmd_check_for_exciting_move();
+
+ if (eContestAI->scriptResult != 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_84(void)
+{
+ ContestAICmd_check_for_exciting_move();
+
+ if (eContestAI->scriptResult == 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_85(void)
+{
+ int result = 0;
+ int i;
+ u16 arg = T1_READ_16(gAIScriptPtr + 1);
+
+ for (i = 0; i < 4; i++)
+ {
+ u16 move = gContestMons[eContestAI->contestantId].moves[i];
+ if (move == arg)
+ {
+ result = 1;
+ break;
+ }
+ }
+
+ eContestAI->scriptResult = result;
+ gAIScriptPtr += 3;
+}
+
+static void ContestAICmd_unk_86(void)
+{
+ ContestAICmd_unk_85();
+
+ if (eContestAI->scriptResult != 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
+
+static void ContestAICmd_unk_87(void)
+{
+ ContestAICmd_unk_85();
+
+ if (eContestAI->scriptResult == 0)
+ gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 0);
+ else
+ gAIScriptPtr += 4;
+}
diff --git a/src/pokemon.c b/src/pokemon.c
index 76eaf65e3..3aa88e991 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -112,9 +112,1253 @@ EWRAM_DATA struct Unknown_806F160_Struct *gUnknown_020249B4[2] = {NULL};
#include "data/battle_moves.h"
static const u8 sUnreferencedData[] = {0x34, 0x00, 0x10, 0x00, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00};
-const u16 gSpeciesToHoennPokedexNum[] = {203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 156, 157, 112, 113, 227, 228, 229, 230, 231, 232, 233, 234, 153, 154, 138, 139, 63, 64, 88, 89, 90, 235, 236, 237, 238, 239, 240, 241, 242, 158, 159, 243, 244, 245, 246, 247, 248, 249, 39, 40, 41, 73, 74, 75, 250, 251, 252, 66, 67, 57, 58, 59, 253, 254, 255, 256, 82, 83, 257, 92, 93, 258, 259, 106, 107, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 84, 85, 270, 271, 272, 273, 274, 275, 276, 108, 109, 169, 170, 277, 278, 279, 184, 185, 50, 51, 143, 144, 280, 281, 282, 283, 284, 167, 285, 52, 53, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 65, 181, 182, 155, 324, 137, 325, 326, 162, 163, 327, 328, 329, 91, 55, 56, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 161, 164, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 168, 357, 358, 359, 103, 104, 360, 361, 180, 362, 363, 364, 365, 115, 366, 367, 186, 165, 166, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 42, 43, 44, 25, 26, 34, 35, 114, 27, 28, 32, 33, 99, 100, 61, 62, 145, 131, 132, 60, 105, 68, 127, 128, 183, 129, 130, 140, 141, 97, 98, 116, 117, 118, 48, 49, 78, 79, 101, 102, 173, 174, 175, 119, 120, 171, 172, 125, 126, 54, 110, 111, 80, 81, 69, 76, 77, 121, 122, 160, 148, 149, 94, 36, 37, 38, 95, 96, 150, 45, 46, 47, 176, 177, 178, 152, 146, 147, 124, 123, 179, 70, 71, 72, 142, 86, 87, 133, 134, 135, 136, 29, 30, 31, 187, 188, 189, 190, 191, 192, 193, 194, 195, 198, 199, 200, 196, 197, 201, 202, 151};
-const u16 gSpeciesToNationalPokedexNum[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 290, 291, 292, 276, 277, 285, 286, 327, 278, 279, 283, 284, 320, 321, 300, 301, 352, 343, 344, 299, 324, 302, 339, 340, 370, 341, 342, 349, 350, 318, 319, 328, 329, 330, 296, 297, 309, 310, 322, 323, 363, 364, 365, 331, 332, 361, 362, 337, 338, 298, 325, 326, 311, 312, 303, 307, 308, 333, 334, 360, 355, 356, 315, 287, 288, 289, 316, 317, 357, 293, 294, 295, 366, 367, 368, 359, 353, 354, 336, 335, 369, 304, 305, 306, 351, 313, 314, 345, 346, 347, 348, 280, 281, 282, 371, 372, 373, 374, 375, 376, 377, 378, 379, 382, 383, 384, 380, 381, 385, 386, 358};
-const u16 gHoennToNationalOrder[] = {252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 63, 64, 65, 290, 291, 292, 293, 294, 295, 296, 297, 118, 119, 129, 130, 298, 183, 184, 74, 75, 76, 299, 300, 301, 41, 42, 169, 72, 73, 302, 303, 304, 305, 306, 66, 67, 68, 307, 308, 309, 310, 311, 312, 81, 82, 100, 101, 313, 314, 43, 44, 45, 182, 84, 85, 315, 316, 317, 318, 319, 320, 321, 322, 323, 218, 219, 324, 88, 89, 109, 110, 325, 326, 27, 28, 327, 227, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 174, 39, 40, 349, 350, 351, 120, 121, 352, 353, 354, 355, 356, 357, 358, 359, 37, 38, 172, 25, 26, 54, 55, 360, 202, 177, 178, 203, 231, 232, 127, 214, 111, 112, 361, 362, 363, 364, 365, 366, 367, 368, 369, 222, 170, 171, 370, 116, 117, 230, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 29, 30, 31, 32, 33, 34, 35, 36, 46, 47, 48, 49, 50, 51, 52, 53, 56, 57, 58, 59, 60, 61, 62, 69, 70, 71, 77, 78, 79, 80, 83, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 102, 103, 104, 105, 106, 107, 108, 113, 114, 115, 122, 123, 124, 125, 126, 128, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 173, 175, 176, 179, 180, 181, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 215, 216, 217, 220, 221, 223, 224, 225, 226, 228, 229, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411};
+const u16 gSpeciesToHoennPokedexNum[] = // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex)
+{
+ // SPECIES_NONE
+ HOENN_DEX_BULBASAUR, // SPECIES_BULBASAUR
+ HOENN_DEX_IVYSAUR, // SPECIES_IVYSAUR
+ HOENN_DEX_VENUSAUR, // SPECIES_VENUSAUR
+ HOENN_DEX_CHARMANDER, // SPECIES_CHARMANDER
+ HOENN_DEX_CHARMELEON, // SPECIES_CHARMELEON
+ HOENN_DEX_CHARIZARD, // SPECIES_CHARIZARD
+ HOENN_DEX_SQUIRTLE, // SPECIES_SQUIRTLE
+ HOENN_DEX_WARTORTLE, // SPECIES_WARTORTLE
+ HOENN_DEX_BLASTOISE, // SPECIES_BLASTOISE
+ HOENN_DEX_CATERPIE, // SPECIES_CATERPIE
+ HOENN_DEX_METAPOD, // SPECIES_METAPOD
+ HOENN_DEX_BUTTERFREE, // SPECIES_BUTTERFREE
+ HOENN_DEX_WEEDLE, // SPECIES_WEEDLE
+ HOENN_DEX_KAKUNA, // SPECIES_KAKUNA
+ HOENN_DEX_BEEDRILL, // SPECIES_BEEDRILL
+ HOENN_DEX_PIDGEY, // SPECIES_PIDGEY
+ HOENN_DEX_PIDGEOTTO, // SPECIES_PIDGEOTTO
+ HOENN_DEX_PIDGEOT, // SPECIES_PIDGEOT
+ HOENN_DEX_RATTATA, // SPECIES_RATTATA
+ HOENN_DEX_RATICATE, // SPECIES_RATICATE
+ HOENN_DEX_SPEAROW, // SPECIES_SPEAROW
+ HOENN_DEX_FEAROW, // SPECIES_FEAROW
+ HOENN_DEX_EKANS, // SPECIES_EKANS
+ HOENN_DEX_ARBOK, // SPECIES_ARBOK
+ HOENN_DEX_PIKACHU, // SPECIES_PIKACHU
+ HOENN_DEX_RAICHU, // SPECIES_RAICHU
+ HOENN_DEX_SANDSHREW, // SPECIES_SANDSHREW
+ HOENN_DEX_SANDSLASH, // SPECIES_SANDSLASH
+ HOENN_DEX_NIDORAN_F, // SPECIES_NIDORAN_F
+ HOENN_DEX_NIDORINA, // SPECIES_NIDORINA
+ HOENN_DEX_NIDOQUEEN, // SPECIES_NIDOQUEEN
+ HOENN_DEX_NIDORAN_M, // SPECIES_NIDORAN_M
+ HOENN_DEX_NIDORINO, // SPECIES_NIDORINO
+ HOENN_DEX_NIDOKING, // SPECIES_NIDOKING
+ HOENN_DEX_CLEFAIRY, // SPECIES_CLEFAIRY
+ HOENN_DEX_CLEFABLE, // SPECIES_CLEFABLE
+ HOENN_DEX_VULPIX, // SPECIES_VULPIX
+ HOENN_DEX_NINETALES, // SPECIES_NINETALES
+ HOENN_DEX_JIGGLYPUFF, // SPECIES_JIGGLYPUFF
+ HOENN_DEX_WIGGLYTUFF, // SPECIES_WIGGLYTUFF
+ HOENN_DEX_ZUBAT, // SPECIES_ZUBAT
+ HOENN_DEX_GOLBAT, // SPECIES_GOLBAT
+ HOENN_DEX_ODDISH, // SPECIES_ODDISH
+ HOENN_DEX_GLOOM, // SPECIES_GLOOM
+ HOENN_DEX_VILEPLUME, // SPECIES_VILEPLUME
+ HOENN_DEX_PARAS, // SPECIES_PARAS
+ HOENN_DEX_PARASECT, // SPECIES_PARASECT
+ HOENN_DEX_VENONAT, // SPECIES_VENONAT
+ HOENN_DEX_VENOMOTH, // SPECIES_VENOMOTH
+ HOENN_DEX_DIGLETT, // SPECIES_DIGLETT
+ HOENN_DEX_DUGTRIO, // SPECIES_DUGTRIO
+ HOENN_DEX_MEOWTH, // SPECIES_MEOWTH
+ HOENN_DEX_PERSIAN, // SPECIES_PERSIAN
+ HOENN_DEX_PSYDUCK, // SPECIES_PSYDUCK
+ HOENN_DEX_GOLDUCK, // SPECIES_GOLDUCK
+ HOENN_DEX_MANKEY, // SPECIES_MANKEY
+ HOENN_DEX_PRIMEAPE, // SPECIES_PRIMEAPE
+ HOENN_DEX_GROWLITHE, // SPECIES_GROWLITHE
+ HOENN_DEX_ARCANINE, // SPECIES_ARCANINE
+ HOENN_DEX_POLIWAG, // SPECIES_POLIWAG
+ HOENN_DEX_POLIWHIRL, // SPECIES_POLIWHIRL
+ HOENN_DEX_POLIWRATH, // SPECIES_POLIWRATH
+ HOENN_DEX_ABRA, // SPECIES_ABRA
+ HOENN_DEX_KADABRA, // SPECIES_KADABRA
+ HOENN_DEX_ALAKAZAM, // SPECIES_ALAKAZAM
+ HOENN_DEX_MACHOP, // SPECIES_MACHOP
+ HOENN_DEX_MACHOKE, // SPECIES_MACHOKE
+ HOENN_DEX_MACHAMP, // SPECIES_MACHAMP
+ HOENN_DEX_BELLSPROUT, // SPECIES_BELLSPROUT
+ HOENN_DEX_WEEPINBELL, // SPECIES_WEEPINBELL
+ HOENN_DEX_VICTREEBEL, // SPECIES_VICTREEBEL
+ HOENN_DEX_TENTACOOL, // SPECIES_TENTACOOL
+ HOENN_DEX_TENTACRUEL, // SPECIES_TENTACRUEL
+ HOENN_DEX_GEODUDE, // SPECIES_GEODUDE
+ HOENN_DEX_GRAVELER, // SPECIES_GRAVELER
+ HOENN_DEX_GOLEM, // SPECIES_GOLEM
+ HOENN_DEX_PONYTA, // SPECIES_PONYTA
+ HOENN_DEX_RAPIDASH, // SPECIES_RAPIDASH
+ HOENN_DEX_SLOWPOKE, // SPECIES_SLOWPOKE
+ HOENN_DEX_SLOWBRO, // SPECIES_SLOWBRO
+ HOENN_DEX_MAGNEMITE, // SPECIES_MAGNEMITE
+ HOENN_DEX_MAGNETON, // SPECIES_MAGNETON
+ HOENN_DEX_FARFETCHD, // SPECIES_FARFETCHD
+ HOENN_DEX_DODUO, // SPECIES_DODUO
+ HOENN_DEX_DODRIO, // SPECIES_DODRIO
+ HOENN_DEX_SEEL, // SPECIES_SEEL
+ HOENN_DEX_DEWGONG, // SPECIES_DEWGONG
+ HOENN_DEX_GRIMER, // SPECIES_GRIMER
+ HOENN_DEX_MUK, // SPECIES_MUK
+ HOENN_DEX_SHELLDER, // SPECIES_SHELLDER
+ HOENN_DEX_CLOYSTER, // SPECIES_CLOYSTER
+ HOENN_DEX_GASTLY, // SPECIES_GASTLY
+ HOENN_DEX_HAUNTER, // SPECIES_HAUNTER
+ HOENN_DEX_GENGAR, // SPECIES_GENGAR
+ HOENN_DEX_ONIX, // SPECIES_ONIX
+ HOENN_DEX_DROWZEE, // SPECIES_DROWZEE
+ HOENN_DEX_HYPNO, // SPECIES_HYPNO
+ HOENN_DEX_KRABBY, // SPECIES_KRABBY
+ HOENN_DEX_KINGLER, // SPECIES_KINGLER
+ HOENN_DEX_VOLTORB, // SPECIES_VOLTORB
+ HOENN_DEX_ELECTRODE, // SPECIES_ELECTRODE
+ HOENN_DEX_EXEGGCUTE, // SPECIES_EXEGGCUTE
+ HOENN_DEX_EXEGGUTOR, // SPECIES_EXEGGUTOR
+ HOENN_DEX_CUBONE, // SPECIES_CUBONE
+ HOENN_DEX_MAROWAK, // SPECIES_MAROWAK
+ HOENN_DEX_HITMONLEE, // SPECIES_HITMONLEE
+ HOENN_DEX_HITMONCHAN, // SPECIES_HITMONCHAN
+ HOENN_DEX_LICKITUNG, // SPECIES_LICKITUNG
+ HOENN_DEX_KOFFING, // SPECIES_KOFFING
+ HOENN_DEX_WEEZING, // SPECIES_WEEZING
+ HOENN_DEX_RHYHORN, // SPECIES_RHYHORN
+ HOENN_DEX_RHYDON, // SPECIES_RHYDON
+ HOENN_DEX_CHANSEY, // SPECIES_CHANSEY
+ HOENN_DEX_TANGELA, // SPECIES_TANGELA
+ HOENN_DEX_KANGASKHAN, // SPECIES_KANGASKHAN
+ HOENN_DEX_HORSEA, // SPECIES_HORSEA
+ HOENN_DEX_SEADRA, // SPECIES_SEADRA
+ HOENN_DEX_GOLDEEN, // SPECIES_GOLDEEN
+ HOENN_DEX_SEAKING, // SPECIES_SEAKING
+ HOENN_DEX_STARYU, // SPECIES_STARYU
+ HOENN_DEX_STARMIE, // SPECIES_STARMIE
+ HOENN_DEX_MR_MIME, // SPECIES_MR_MIME
+ HOENN_DEX_SCYTHER, // SPECIES_SCYTHER
+ HOENN_DEX_JYNX, // SPECIES_JYNX
+ HOENN_DEX_ELECTABUZZ, // SPECIES_ELECTABUZZ
+ HOENN_DEX_MAGMAR, // SPECIES_MAGMAR
+ HOENN_DEX_PINSIR, // SPECIES_PINSIR
+ HOENN_DEX_TAUROS, // SPECIES_TAUROS
+ HOENN_DEX_MAGIKARP, // SPECIES_MAGIKARP
+ HOENN_DEX_GYARADOS, // SPECIES_GYARADOS
+ HOENN_DEX_LAPRAS, // SPECIES_LAPRAS
+ HOENN_DEX_DITTO, // SPECIES_DITTO
+ HOENN_DEX_EEVEE, // SPECIES_EEVEE
+ HOENN_DEX_VAPOREON, // SPECIES_VAPOREON
+ HOENN_DEX_JOLTEON, // SPECIES_JOLTEON
+ HOENN_DEX_FLAREON, // SPECIES_FLAREON
+ HOENN_DEX_PORYGON, // SPECIES_PORYGON
+ HOENN_DEX_OMANYTE, // SPECIES_OMANYTE
+ HOENN_DEX_OMASTAR, // SPECIES_OMASTAR
+ HOENN_DEX_KABUTO, // SPECIES_KABUTO
+ HOENN_DEX_KABUTOPS, // SPECIES_KABUTOPS
+ HOENN_DEX_AERODACTYL, // SPECIES_AERODACTYL
+ HOENN_DEX_SNORLAX, // SPECIES_SNORLAX
+ HOENN_DEX_ARTICUNO, // SPECIES_ARTICUNO
+ HOENN_DEX_ZAPDOS, // SPECIES_ZAPDOS
+ HOENN_DEX_MOLTRES, // SPECIES_MOLTRES
+ HOENN_DEX_DRATINI, // SPECIES_DRATINI
+ HOENN_DEX_DRAGONAIR, // SPECIES_DRAGONAIR
+ HOENN_DEX_DRAGONITE, // SPECIES_DRAGONITE
+ HOENN_DEX_MEWTWO, // SPECIES_MEWTWO
+ HOENN_DEX_MEW, // SPECIES_MEW
+ HOENN_DEX_CHIKORITA, // SPECIES_CHIKORITA
+ HOENN_DEX_BAYLEEF, // SPECIES_BAYLEEF
+ HOENN_DEX_MEGANIUM, // SPECIES_MEGANIUM
+ HOENN_DEX_CYNDAQUIL, // SPECIES_CYNDAQUIL
+ HOENN_DEX_QUILAVA, // SPECIES_QUILAVA
+ HOENN_DEX_TYPHLOSION, // SPECIES_TYPHLOSION
+ HOENN_DEX_TOTODILE, // SPECIES_TOTODILE
+ HOENN_DEX_CROCONAW, // SPECIES_CROCONAW
+ HOENN_DEX_FERALIGATR, // SPECIES_FERALIGATR
+ HOENN_DEX_SENTRET, // SPECIES_SENTRET
+ HOENN_DEX_FURRET, // SPECIES_FURRET
+ HOENN_DEX_HOOTHOOT, // SPECIES_HOOTHOOT
+ HOENN_DEX_NOCTOWL, // SPECIES_NOCTOWL
+ HOENN_DEX_LEDYBA, // SPECIES_LEDYBA
+ HOENN_DEX_LEDIAN, // SPECIES_LEDIAN
+ HOENN_DEX_SPINARAK, // SPECIES_SPINARAK
+ HOENN_DEX_ARIADOS, // SPECIES_ARIADOS
+ HOENN_DEX_CROBAT, // SPECIES_CROBAT
+ HOENN_DEX_CHINCHOU, // SPECIES_CHINCHOU
+ HOENN_DEX_LANTURN, // SPECIES_LANTURN
+ HOENN_DEX_PICHU, // SPECIES_PICHU
+ HOENN_DEX_CLEFFA, // SPECIES_CLEFFA
+ HOENN_DEX_IGGLYBUFF, // SPECIES_IGGLYBUFF
+ HOENN_DEX_TOGEPI, // SPECIES_TOGEPI
+ HOENN_DEX_TOGETIC, // SPECIES_TOGETIC
+ HOENN_DEX_NATU, // SPECIES_NATU
+ HOENN_DEX_XATU, // SPECIES_XATU
+ HOENN_DEX_MAREEP, // SPECIES_MAREEP
+ HOENN_DEX_FLAAFFY, // SPECIES_FLAAFFY
+ HOENN_DEX_AMPHAROS, // SPECIES_AMPHAROS
+ HOENN_DEX_BELLOSSOM, // SPECIES_BELLOSSOM
+ HOENN_DEX_MARILL, // SPECIES_MARILL
+ HOENN_DEX_AZUMARILL, // SPECIES_AZUMARILL
+ HOENN_DEX_SUDOWOODO, // SPECIES_SUDOWOODO
+ HOENN_DEX_POLITOED, // SPECIES_POLITOED
+ HOENN_DEX_HOPPIP, // SPECIES_HOPPIP
+ HOENN_DEX_SKIPLOOM, // SPECIES_SKIPLOOM
+ HOENN_DEX_JUMPLUFF, // SPECIES_JUMPLUFF
+ HOENN_DEX_AIPOM, // SPECIES_AIPOM
+ HOENN_DEX_SUNKERN, // SPECIES_SUNKERN
+ HOENN_DEX_SUNFLORA, // SPECIES_SUNFLORA
+ HOENN_DEX_YANMA, // SPECIES_YANMA
+ HOENN_DEX_WOOPER, // SPECIES_WOOPER
+ HOENN_DEX_QUAGSIRE, // SPECIES_QUAGSIRE
+ HOENN_DEX_ESPEON, // SPECIES_ESPEON
+ HOENN_DEX_UMBREON, // SPECIES_UMBREON
+ HOENN_DEX_MURKROW, // SPECIES_MURKROW
+ HOENN_DEX_SLOWKING, // SPECIES_SLOWKING
+ HOENN_DEX_MISDREAVUS, // SPECIES_MISDREAVUS
+ HOENN_DEX_UNOWN, // SPECIES_UNOWN
+ HOENN_DEX_WOBBUFFET, // SPECIES_WOBBUFFET
+ HOENN_DEX_GIRAFARIG, // SPECIES_GIRAFARIG
+ HOENN_DEX_PINECO, // SPECIES_PINECO
+ HOENN_DEX_FORRETRESS, // SPECIES_FORRETRESS
+ HOENN_DEX_DUNSPARCE, // SPECIES_DUNSPARCE
+ HOENN_DEX_GLIGAR, // SPECIES_GLIGAR
+ HOENN_DEX_STEELIX, // SPECIES_STEELIX
+ HOENN_DEX_SNUBBULL, // SPECIES_SNUBBULL
+ HOENN_DEX_GRANBULL, // SPECIES_GRANBULL
+ HOENN_DEX_QWILFISH, // SPECIES_QWILFISH
+ HOENN_DEX_SCIZOR, // SPECIES_SCIZOR
+ HOENN_DEX_SHUCKLE, // SPECIES_SHUCKLE
+ HOENN_DEX_HERACROSS, // SPECIES_HERACROSS
+ HOENN_DEX_SNEASEL, // SPECIES_SNEASEL
+ HOENN_DEX_TEDDIURSA, // SPECIES_TEDDIURSA
+ HOENN_DEX_URSARING, // SPECIES_URSARING
+ HOENN_DEX_SLUGMA, // SPECIES_SLUGMA
+ HOENN_DEX_MAGCARGO, // SPECIES_MAGCARGO
+ HOENN_DEX_SWINUB, // SPECIES_SWINUB
+ HOENN_DEX_PILOSWINE, // SPECIES_PILOSWINE
+ HOENN_DEX_CORSOLA, // SPECIES_CORSOLA
+ HOENN_DEX_REMORAID, // SPECIES_REMORAID
+ HOENN_DEX_OCTILLERY, // SPECIES_OCTILLERY
+ HOENN_DEX_DELIBIRD, // SPECIES_DELIBIRD
+ HOENN_DEX_MANTINE, // SPECIES_MANTINE
+ HOENN_DEX_SKARMORY, // SPECIES_SKARMORY
+ HOENN_DEX_HOUNDOUR, // SPECIES_HOUNDOUR
+ HOENN_DEX_HOUNDOOM, // SPECIES_HOUNDOOM
+ HOENN_DEX_KINGDRA, // SPECIES_KINGDRA
+ HOENN_DEX_PHANPY, // SPECIES_PHANPY
+ HOENN_DEX_DONPHAN, // SPECIES_DONPHAN
+ HOENN_DEX_PORYGON2, // SPECIES_PORYGON2
+ HOENN_DEX_STANTLER, // SPECIES_STANTLER
+ HOENN_DEX_SMEARGLE, // SPECIES_SMEARGLE
+ HOENN_DEX_TYROGUE, // SPECIES_TYROGUE
+ HOENN_DEX_HITMONTOP, // SPECIES_HITMONTOP
+ HOENN_DEX_SMOOCHUM, // SPECIES_SMOOCHUM
+ HOENN_DEX_ELEKID, // SPECIES_ELEKID
+ HOENN_DEX_MAGBY, // SPECIES_MAGBY
+ HOENN_DEX_MILTANK, // SPECIES_MILTANK
+ HOENN_DEX_BLISSEY, // SPECIES_BLISSEY
+ HOENN_DEX_RAIKOU, // SPECIES_RAIKOU
+ HOENN_DEX_ENTEI, // SPECIES_ENTEI
+ HOENN_DEX_SUICUNE, // SPECIES_SUICUNE
+ HOENN_DEX_LARVITAR, // SPECIES_LARVITAR
+ HOENN_DEX_PUPITAR, // SPECIES_PUPITAR
+ HOENN_DEX_TYRANITAR, // SPECIES_TYRANITAR
+ HOENN_DEX_LUGIA, // SPECIES_LUGIA
+ HOENN_DEX_HO_OH, // SPECIES_HO-OH
+ HOENN_DEX_CELEBI, // SPECIES_CELEBI
+ HOENN_DEX_OLD_UNOWN_B, // SPECIES_OLD_UNOWN_B
+ HOENN_DEX_OLD_UNOWN_C, // SPECIES_OLD_UNOWN_C
+ HOENN_DEX_OLD_UNOWN_D, // SPECIES_OLD_UNOWN_D
+ HOENN_DEX_OLD_UNOWN_E, // SPECIES_OLD_UNOWN_E
+ HOENN_DEX_OLD_UNOWN_F, // SPECIES_OLD_UNOWN_F
+ HOENN_DEX_OLD_UNOWN_G, // SPECIES_OLD_UNOWN_G
+ HOENN_DEX_OLD_UNOWN_H, // SPECIES_OLD_UNOWN_H
+ HOENN_DEX_OLD_UNOWN_I, // SPECIES_OLD_UNOWN_I
+ HOENN_DEX_OLD_UNOWN_J, // SPECIES_OLD_UNOWN_J
+ HOENN_DEX_OLD_UNOWN_K, // SPECIES_OLD_UNOWN_K
+ HOENN_DEX_OLD_UNOWN_L, // SPECIES_OLD_UNOWN_L
+ HOENN_DEX_OLD_UNOWN_M, // SPECIES_OLD_UNOWN_M
+ HOENN_DEX_OLD_UNOWN_N, // SPECIES_OLD_UNOWN_N
+ HOENN_DEX_OLD_UNOWN_O, // SPECIES_OLD_UNOWN_O
+ HOENN_DEX_OLD_UNOWN_P, // SPECIES_OLD_UNOWN_P
+ HOENN_DEX_OLD_UNOWN_Q, // SPECIES_OLD_UNOWN_Q
+ HOENN_DEX_OLD_UNOWN_R, // SPECIES_OLD_UNOWN_R
+ HOENN_DEX_OLD_UNOWN_S, // SPECIES_OLD_UNOWN_S
+ HOENN_DEX_OLD_UNOWN_T, // SPECIES_OLD_UNOWN_T
+ HOENN_DEX_OLD_UNOWN_U, // SPECIES_OLD_UNOWN_U
+ HOENN_DEX_OLD_UNOWN_V, // SPECIES_OLD_UNOWN_V
+ HOENN_DEX_OLD_UNOWN_W, // SPECIES_OLD_UNOWN_W
+ HOENN_DEX_OLD_UNOWN_X, // SPECIES_OLD_UNOWN_X
+ HOENN_DEX_OLD_UNOWN_Y, // SPECIES_OLD_UNOWN_Y
+ HOENN_DEX_OLD_UNOWN_Z, // SPECIES_OLD_UNOWN_Z
+ HOENN_DEX_TREECKO, // SPECIES_TREECKO
+ HOENN_DEX_GROVYLE, // SPECIES_GROVYLE
+ HOENN_DEX_SCEPTILE, // SPECIES_SCEPTILE
+ HOENN_DEX_TORCHIC, // SPECIES_TORCHIC
+ HOENN_DEX_COMBUSKEN, // SPECIES_COMBUSKEN
+ HOENN_DEX_BLAZIKEN, // SPECIES_BLAZIKEN
+ HOENN_DEX_MUDKIP, // SPECIES_MUDKIP
+ HOENN_DEX_MARSHTOMP, // SPECIES_MARSHTOMP
+ HOENN_DEX_SWAMPERT, // SPECIES_SWAMPERT
+ HOENN_DEX_POOCHYENA, // SPECIES_POOCHYENA
+ HOENN_DEX_MIGHTYENA, // SPECIES_MIGHTYENA
+ HOENN_DEX_ZIGZAGOON, // SPECIES_ZIGZAGOON
+ HOENN_DEX_LINOONE, // SPECIES_LINOONE
+ HOENN_DEX_WURMPLE, // SPECIES_WURMPLE
+ HOENN_DEX_SILCOON, // SPECIES_SILCOON
+ HOENN_DEX_BEAUTIFLY, // SPECIES_BEAUTIFLY
+ HOENN_DEX_CASCOON, // SPECIES_CASCOON
+ HOENN_DEX_DUSTOX, // SPECIES_DUSTOX
+ HOENN_DEX_LOTAD, // SPECIES_LOTAD
+ HOENN_DEX_LOMBRE, // SPECIES_LOMBRE
+ HOENN_DEX_LUDICOLO, // SPECIES_LUDICOLO
+ HOENN_DEX_SEEDOT, // SPECIES_SEEDOT
+ HOENN_DEX_NUZLEAF, // SPECIES_NUZLEAF
+ HOENN_DEX_SHIFTRY, // SPECIES_SHIFTRY
+ HOENN_DEX_NINCADA, // SPECIES_NINCADA
+ HOENN_DEX_NINJASK, // SPECIES_NINJASK
+ HOENN_DEX_SHEDINJA, // SPECIES_SHEDINJA
+ HOENN_DEX_TAILLOW, // SPECIES_TAILLOW
+ HOENN_DEX_SWELLOW, // SPECIES_SWELLOW
+ HOENN_DEX_SHROOMISH, // SPECIES_SHROOMISH
+ HOENN_DEX_BRELOOM, // SPECIES_BRELOOM
+ HOENN_DEX_SPINDA, // SPECIES_SPINDA
+ HOENN_DEX_WINGULL, // SPECIES_WINGULL
+ HOENN_DEX_PELIPPER, // SPECIES_PELIPPER
+ HOENN_DEX_SURSKIT, // SPECIES_SURSKIT
+ HOENN_DEX_MASQUERAIN, // SPECIES_MASQUERAIN
+ HOENN_DEX_WAILMER, // SPECIES_WAILMER
+ HOENN_DEX_WAILORD, // SPECIES_WAILORD
+ HOENN_DEX_SKITTY, // SPECIES_SKITTY
+ HOENN_DEX_DELCATTY, // SPECIES_DELCATTY
+ HOENN_DEX_KECLEON, // SPECIES_KECLEON
+ HOENN_DEX_BALTOY, // SPECIES_BALTOY
+ HOENN_DEX_CLAYDOL, // SPECIES_CLAYDOL
+ HOENN_DEX_NOSEPASS, // SPECIES_NOSEPASS
+ HOENN_DEX_TORKOAL, // SPECIES_TORKOAL
+ HOENN_DEX_SABLEYE, // SPECIES_SABLEYE
+ HOENN_DEX_BARBOACH, // SPECIES_BARBOACH
+ HOENN_DEX_WHISCASH, // SPECIES_WHISCASH
+ HOENN_DEX_LUVDISC, // SPECIES_LUVDISC
+ HOENN_DEX_CORPHISH, // SPECIES_CORPHISH
+ HOENN_DEX_CRAWDAUNT, // SPECIES_CRAWDAUNT
+ HOENN_DEX_FEEBAS, // SPECIES_FEEBAS
+ HOENN_DEX_MILOTIC, // SPECIES_MILOTIC
+ HOENN_DEX_CARVANHA, // SPECIES_CARVANHA
+ HOENN_DEX_SHARPEDO, // SPECIES_SHARPEDO
+ HOENN_DEX_TRAPINCH, // SPECIES_TRAPINCH
+ HOENN_DEX_VIBRAVA, // SPECIES_VIBRAVA
+ HOENN_DEX_FLYGON, // SPECIES_FLYGON
+ HOENN_DEX_MAKUHITA, // SPECIES_MAKUHITA
+ HOENN_DEX_HARIYAMA, // SPECIES_HARIYAMA
+ HOENN_DEX_ELECTRIKE, // SPECIES_ELECTRIKE
+ HOENN_DEX_MANECTRIC, // SPECIES_MANECTRIC
+ HOENN_DEX_NUMEL, // SPECIES_NUMEL
+ HOENN_DEX_CAMERUPT, // SPECIES_CAMERUPT
+ HOENN_DEX_SPHEAL, // SPECIES_SPHEAL
+ HOENN_DEX_SEALEO, // SPECIES_SEALEO
+ HOENN_DEX_WALREIN, // SPECIES_WALREIN
+ HOENN_DEX_CACNEA, // SPECIES_CACNEA
+ HOENN_DEX_CACTURNE, // SPECIES_CACTURNE
+ HOENN_DEX_SNORUNT, // SPECIES_SNORUNT
+ HOENN_DEX_GLALIE, // SPECIES_GLALIE
+ HOENN_DEX_LUNATONE, // SPECIES_LUNATONE
+ HOENN_DEX_SOLROCK, // SPECIES_SOLROCK
+ HOENN_DEX_AZURILL, // SPECIES_AZURILL
+ HOENN_DEX_SPOINK, // SPECIES_SPOINK
+ HOENN_DEX_GRUMPIG, // SPECIES_GRUMPIG
+ HOENN_DEX_PLUSLE, // SPECIES_PLUSLE
+ HOENN_DEX_MINUN, // SPECIES_MINUN
+ HOENN_DEX_MAWILE, // SPECIES_MAWILE
+ HOENN_DEX_MEDITITE, // SPECIES_MEDITITE
+ HOENN_DEX_MEDICHAM, // SPECIES_MEDICHAM
+ HOENN_DEX_SWABLU, // SPECIES_SWABLU
+ HOENN_DEX_ALTARIA, // SPECIES_ALTARIA
+ HOENN_DEX_WYNAUT, // SPECIES_WYNAUT
+ HOENN_DEX_DUSKULL, // SPECIES_DUSKULL
+ HOENN_DEX_DUSCLOPS, // SPECIES_DUSCLOPS
+ HOENN_DEX_ROSELIA, // SPECIES_ROSELIA
+ HOENN_DEX_SLAKOTH, // SPECIES_SLAKOTH
+ HOENN_DEX_VIGOROTH, // SPECIES_VIGOROTH
+ HOENN_DEX_SLAKING, // SPECIES_SLAKING
+ HOENN_DEX_GULPIN, // SPECIES_GULPIN
+ HOENN_DEX_SWALOT, // SPECIES_SWALOT
+ HOENN_DEX_TROPIUS, // SPECIES_TROPIUS
+ HOENN_DEX_WHISMUR, // SPECIES_WHISMUR
+ HOENN_DEX_LOUDRED, // SPECIES_LOUDRED
+ HOENN_DEX_EXPLOUD, // SPECIES_EXPLOUD
+ HOENN_DEX_CLAMPERL, // SPECIES_CLAMPERL
+ HOENN_DEX_HUNTAIL, // SPECIES_HUNTAIL
+ HOENN_DEX_GOREBYSS, // SPECIES_GOREBYSS
+ HOENN_DEX_ABSOL, // SPECIES_ABSOL
+ HOENN_DEX_SHUPPET, // SPECIES_SHUPPET
+ HOENN_DEX_BANETTE, // SPECIES_BANETTE
+ HOENN_DEX_SEVIPER, // SPECIES_SEVIPER
+ HOENN_DEX_ZANGOOSE, // SPECIES_ZANGOOSE
+ HOENN_DEX_RELICANTH, // SPECIES_RELICANTH
+ HOENN_DEX_ARON, // SPECIES_ARON
+ HOENN_DEX_LAIRON, // SPECIES_LAIRON
+ HOENN_DEX_AGGRON, // SPECIES_AGGRON
+ HOENN_DEX_CASTFORM, // SPECIES_CASTFORM
+ HOENN_DEX_VOLBEAT, // SPECIES_VOLBEAT
+ HOENN_DEX_ILLUMISE, // SPECIES_ILLUMISE
+ HOENN_DEX_LILEEP, // SPECIES_LILEEP
+ HOENN_DEX_CRADILY, // SPECIES_CRADILY
+ HOENN_DEX_ANORITH, // SPECIES_ANORITH
+ HOENN_DEX_ARMALDO, // SPECIES_ARMALDO
+ HOENN_DEX_RALTS, // SPECIES_RALTS
+ HOENN_DEX_KIRLIA, // SPECIES_KIRLIA
+ HOENN_DEX_GARDEVOIR, // SPECIES_GARDEVOIR
+ HOENN_DEX_BAGON, // SPECIES_BAGON
+ HOENN_DEX_SHELGON, // SPECIES_SHELGON
+ HOENN_DEX_SALAMENCE, // SPECIES_SALAMENCE
+ HOENN_DEX_BELDUM, // SPECIES_BELDUM
+ HOENN_DEX_METANG, // SPECIES_METANG
+ HOENN_DEX_METAGROSS, // SPECIES_METAGROSS
+ HOENN_DEX_REGIROCK, // SPECIES_REGIROCK
+ HOENN_DEX_REGICE, // SPECIES_REGICE
+ HOENN_DEX_REGISTEEL, // SPECIES_REGISTEEL
+ HOENN_DEX_KYOGRE, // SPECIES_KYOGRE
+ HOENN_DEX_GROUDON, // SPECIES_GROUDON
+ HOENN_DEX_RAYQUAZA, // SPECIES_RAYQUAZA
+ HOENN_DEX_LATIAS, // SPECIES_LATIAS
+ HOENN_DEX_LATIOS, // SPECIES_LATIOS
+ HOENN_DEX_JIRACHI, // SPECIES_JIRACHI
+ HOENN_DEX_DEOXYS, // SPECIES_DEOXYS
+ HOENN_DEX_CHIMECHO // SPECIES_CHIMECHO
+};
+
+const u16 gSpeciesToNationalPokedexNum[] = // Assigns all species to the National Dex Index (Summary No. for National Dex)
+{
+ // SPECIES_NONE
+ NATIONAL_DEX_BULBASAUR, // SPECIES_BULBASAUR
+ NATIONAL_DEX_IVYSAUR, // SPECIES_IVYSAUR
+ NATIONAL_DEX_VENUSAUR, // SPECIES_VENUSAUR
+ NATIONAL_DEX_CHARMANDER, // SPECIES_CHARMANDER
+ NATIONAL_DEX_CHARMELEON, // SPECIES_CHARMELEON
+ NATIONAL_DEX_CHARIZARD, // SPECIES_CHARIZARD
+ NATIONAL_DEX_SQUIRTLE, // SPECIES_SQUIRTLE
+ NATIONAL_DEX_WARTORTLE, // SPECIES_WARTORTLE
+ NATIONAL_DEX_BLASTOISE, // SPECIES_BLASTOISE
+ NATIONAL_DEX_CATERPIE, // SPECIES_CATERPIE
+ NATIONAL_DEX_METAPOD, // SPECIES_METAPOD
+ NATIONAL_DEX_BUTTERFREE, // SPECIES_BUTTERFREE
+ NATIONAL_DEX_WEEDLE, // SPECIES_WEEDLE
+ NATIONAL_DEX_KAKUNA, // SPECIES_KAKUNA
+ NATIONAL_DEX_BEEDRILL, // SPECIES_BEEDRILL
+ NATIONAL_DEX_PIDGEY, // SPECIES_PIDGEY
+ NATIONAL_DEX_PIDGEOTTO, // SPECIES_PIDGEOTTO
+ NATIONAL_DEX_PIDGEOT, // SPECIES_PIDGEOT
+ NATIONAL_DEX_RATTATA, // SPECIES_RATTATA
+ NATIONAL_DEX_RATICATE, // SPECIES_RATICATE
+ NATIONAL_DEX_SPEAROW, // SPECIES_SPEAROW
+ NATIONAL_DEX_FEAROW, // SPECIES_FEAROW
+ NATIONAL_DEX_EKANS, // SPECIES_EKANS
+ NATIONAL_DEX_ARBOK, // SPECIES_ARBOK
+ NATIONAL_DEX_PIKACHU, // SPECIES_PIKACHU
+ NATIONAL_DEX_RAICHU, // SPECIES_RAICHU
+ NATIONAL_DEX_SANDSHREW, // SPECIES_SANDSHREW
+ NATIONAL_DEX_SANDSLASH, // SPECIES_SANDSLASH
+ NATIONAL_DEX_NIDORAN_F, // SPECIES_NIDORAN_F
+ NATIONAL_DEX_NIDORINA, // SPECIES_NIDORINA
+ NATIONAL_DEX_NIDOQUEEN, // SPECIES_NIDOQUEEN
+ NATIONAL_DEX_NIDORAN_M, // SPECIES_NIDORAN_M
+ NATIONAL_DEX_NIDORINO, // SPECIES_NIDORINO
+ NATIONAL_DEX_NIDOKING, // SPECIES_NIDOKING
+ NATIONAL_DEX_CLEFAIRY, // SPECIES_CLEFAIRY
+ NATIONAL_DEX_CLEFABLE, // SPECIES_CLEFABLE
+ NATIONAL_DEX_VULPIX, // SPECIES_VULPIX
+ NATIONAL_DEX_NINETALES, // SPECIES_NINETALES
+ NATIONAL_DEX_JIGGLYPUFF, // SPECIES_JIGGLYPUFF
+ NATIONAL_DEX_WIGGLYTUFF, // SPECIES_WIGGLYTUFF
+ NATIONAL_DEX_ZUBAT, // SPECIES_ZUBAT
+ NATIONAL_DEX_GOLBAT, // SPECIES_GOLBAT
+ NATIONAL_DEX_ODDISH, // SPECIES_ODDISH
+ NATIONAL_DEX_GLOOM, // SPECIES_GLOOM
+ NATIONAL_DEX_VILEPLUME, // SPECIES_VILEPLUME
+ NATIONAL_DEX_PARAS, // SPECIES_PARAS
+ NATIONAL_DEX_PARASECT, // SPECIES_PARASECT
+ NATIONAL_DEX_VENONAT, // SPECIES_VENONAT
+ NATIONAL_DEX_VENOMOTH, // SPECIES_VENOMOTH
+ NATIONAL_DEX_DIGLETT, // SPECIES_DIGLETT
+ NATIONAL_DEX_DUGTRIO, // SPECIES_DUGTRIO
+ NATIONAL_DEX_MEOWTH, // SPECIES_MEOWTH
+ NATIONAL_DEX_PERSIAN, // SPECIES_PERSIAN
+ NATIONAL_DEX_PSYDUCK, // SPECIES_PSYDUCK
+ NATIONAL_DEX_GOLDUCK, // SPECIES_GOLDUCK
+ NATIONAL_DEX_MANKEY, // SPECIES_MANKEY
+ NATIONAL_DEX_PRIMEAPE, // SPECIES_PRIMEAPE
+ NATIONAL_DEX_GROWLITHE, // SPECIES_GROWLITHE
+ NATIONAL_DEX_ARCANINE, // SPECIES_ARCANINE
+ NATIONAL_DEX_POLIWAG, // SPECIES_POLIWAG
+ NATIONAL_DEX_POLIWHIRL, // SPECIES_POLIWHIRL
+ NATIONAL_DEX_POLIWRATH, // SPECIES_POLIWRATH
+ NATIONAL_DEX_ABRA, // SPECIES_ABRA
+ NATIONAL_DEX_KADABRA, // SPECIES_KADABRA
+ NATIONAL_DEX_ALAKAZAM, // SPECIES_ALAKAZAM
+ NATIONAL_DEX_MACHOP, // SPECIES_MACHOP
+ NATIONAL_DEX_MACHOKE, // SPECIES_MACHOKE
+ NATIONAL_DEX_MACHAMP, // SPECIES_MACHAMP
+ NATIONAL_DEX_BELLSPROUT, // SPECIES_BELLSPROUT
+ NATIONAL_DEX_WEEPINBELL, // SPECIES_WEEPINBELL
+ NATIONAL_DEX_VICTREEBEL, // SPECIES_VICTREEBEL
+ NATIONAL_DEX_TENTACOOL, // SPECIES_TENTACOOL
+ NATIONAL_DEX_TENTACRUEL, // SPECIES_TENTACRUEL
+ NATIONAL_DEX_GEODUDE, // SPECIES_GEODUDE
+ NATIONAL_DEX_GRAVELER, // SPECIES_GRAVELER
+ NATIONAL_DEX_GOLEM, // SPECIES_GOLEM
+ NATIONAL_DEX_PONYTA, // SPECIES_PONYTA
+ NATIONAL_DEX_RAPIDASH, // SPECIES_RAPIDASH
+ NATIONAL_DEX_SLOWPOKE, // SPECIES_SLOWPOKE
+ NATIONAL_DEX_SLOWBRO, // SPECIES_SLOWBRO
+ NATIONAL_DEX_MAGNEMITE, // SPECIES_MAGNEMITE
+ NATIONAL_DEX_MAGNETON, // SPECIES_MAGNETON
+ NATIONAL_DEX_FARFETCHD, // SPECIES_FARFETCHD
+ NATIONAL_DEX_DODUO, // SPECIES_DODUO
+ NATIONAL_DEX_DODRIO, // SPECIES_DODRIO
+ NATIONAL_DEX_SEEL, // SPECIES_SEEL
+ NATIONAL_DEX_DEWGONG, // SPECIES_DEWGONG
+ NATIONAL_DEX_GRIMER, // SPECIES_GRIMER
+ NATIONAL_DEX_MUK, // SPECIES_MUK
+ NATIONAL_DEX_SHELLDER, // SPECIES_SHELLDER
+ NATIONAL_DEX_CLOYSTER, // SPECIES_CLOYSTER
+ NATIONAL_DEX_GASTLY, // SPECIES_GASTLY
+ NATIONAL_DEX_HAUNTER, // SPECIES_HAUNTER
+ NATIONAL_DEX_GENGAR, // SPECIES_GENGAR
+ NATIONAL_DEX_ONIX, // SPECIES_ONIX
+ NATIONAL_DEX_DROWZEE, // SPECIES_DROWZEE
+ NATIONAL_DEX_HYPNO, // SPECIES_HYPNO
+ NATIONAL_DEX_KRABBY, // SPECIES_KRABBY
+ NATIONAL_DEX_KINGLER, // SPECIES_KINGLER
+ NATIONAL_DEX_VOLTORB, // SPECIES_VOLTORB
+ NATIONAL_DEX_ELECTRODE, // SPECIES_ELECTRODE
+ NATIONAL_DEX_EXEGGCUTE, // SPECIES_EXEGGCUTE
+ NATIONAL_DEX_EXEGGUTOR, // SPECIES_EXEGGUTOR
+ NATIONAL_DEX_CUBONE, // SPECIES_CUBONE
+ NATIONAL_DEX_MAROWAK, // SPECIES_MAROWAK
+ NATIONAL_DEX_HITMONLEE, // SPECIES_HITMONLEE
+ NATIONAL_DEX_HITMONCHAN, // SPECIES_HITMONCHAN
+ NATIONAL_DEX_LICKITUNG, // SPECIES_LICKITUNG
+ NATIONAL_DEX_KOFFING, // SPECIES_KOFFING
+ NATIONAL_DEX_WEEZING, // SPECIES_WEEZING
+ NATIONAL_DEX_RHYHORN, // SPECIES_RHYHORN
+ NATIONAL_DEX_RHYDON, // SPECIES_RHYDON
+ NATIONAL_DEX_CHANSEY, // SPECIES_CHANSEY
+ NATIONAL_DEX_TANGELA, // SPECIES_TANGELA
+ NATIONAL_DEX_KANGASKHAN, // SPECIES_KANGASKHAN
+ NATIONAL_DEX_HORSEA, // SPECIES_HORSEA
+ NATIONAL_DEX_SEADRA, // SPECIES_SEADRA
+ NATIONAL_DEX_GOLDEEN, // SPECIES_GOLDEEN
+ NATIONAL_DEX_SEAKING, // SPECIES_SEAKING
+ NATIONAL_DEX_STARYU, // SPECIES_STARYU
+ NATIONAL_DEX_STARMIE, // SPECIES_STARMIE
+ NATIONAL_DEX_MR_MIME, // SPECIES_MR_MIME
+ NATIONAL_DEX_SCYTHER, // SPECIES_SCYTHER
+ NATIONAL_DEX_JYNX, // SPECIES_JYNX
+ NATIONAL_DEX_ELECTABUZZ, // SPECIES_ELECTABUZZ
+ NATIONAL_DEX_MAGMAR, // SPECIES_MAGMAR
+ NATIONAL_DEX_PINSIR, // SPECIES_PINSIR
+ NATIONAL_DEX_TAUROS, // SPECIES_TAUROS
+ NATIONAL_DEX_MAGIKARP, // SPECIES_MAGIKARP
+ NATIONAL_DEX_GYARADOS, // SPECIES_GYARADOS
+ NATIONAL_DEX_LAPRAS, // SPECIES_LAPRAS
+ NATIONAL_DEX_DITTO, // SPECIES_DITTO
+ NATIONAL_DEX_EEVEE, // SPECIES_EEVEE
+ NATIONAL_DEX_VAPOREON, // SPECIES_VAPOREON
+ NATIONAL_DEX_JOLTEON, // SPECIES_JOLTEON
+ NATIONAL_DEX_FLAREON, // SPECIES_FLAREON
+ NATIONAL_DEX_PORYGON, // SPECIES_PORYGON
+ NATIONAL_DEX_OMANYTE, // SPECIES_OMANYTE
+ NATIONAL_DEX_OMASTAR, // SPECIES_OMASTAR
+ NATIONAL_DEX_KABUTO, // SPECIES_KABUTO
+ NATIONAL_DEX_KABUTOPS, // SPECIES_KABUTOPS
+ NATIONAL_DEX_AERODACTYL, // SPECIES_AERODACTYL
+ NATIONAL_DEX_SNORLAX, // SPECIES_SNORLAX
+ NATIONAL_DEX_ARTICUNO, // SPECIES_ARTICUNO
+ NATIONAL_DEX_ZAPDOS, // SPECIES_ZAPDOS
+ NATIONAL_DEX_MOLTRES, // SPECIES_MOLTRES
+ NATIONAL_DEX_DRATINI, // SPECIES_DRATINI
+ NATIONAL_DEX_DRAGONAIR, // SPECIES_DRAGONAIR
+ NATIONAL_DEX_DRAGONITE, // SPECIES_DRAGONITE
+ NATIONAL_DEX_MEWTWO, // SPECIES_MEWTWO
+ NATIONAL_DEX_MEW, // SPECIES_MEW
+ NATIONAL_DEX_CHIKORITA, // SPECIES_CHIKORITA
+ NATIONAL_DEX_BAYLEEF, // SPECIES_BAYLEEF
+ NATIONAL_DEX_MEGANIUM, // SPECIES_MEGANIUM
+ NATIONAL_DEX_CYNDAQUIL, // SPECIES_CYNDAQUIL
+ NATIONAL_DEX_QUILAVA, // SPECIES_QUILAVA
+ NATIONAL_DEX_TYPHLOSION, // SPECIES_TYPHLOSION
+ NATIONAL_DEX_TOTODILE, // SPECIES_TOTODILE
+ NATIONAL_DEX_CROCONAW, // SPECIES_CROCONAW
+ NATIONAL_DEX_FERALIGATR, // SPECIES_FERALIGATR
+ NATIONAL_DEX_SENTRET, // SPECIES_SENTRET
+ NATIONAL_DEX_FURRET, // SPECIES_FURRET
+ NATIONAL_DEX_HOOTHOOT, // SPECIES_HOOTHOOT
+ NATIONAL_DEX_NOCTOWL, // SPECIES_NOCTOWL
+ NATIONAL_DEX_LEDYBA, // SPECIES_LEDYBA
+ NATIONAL_DEX_LEDIAN, // SPECIES_LEDIAN
+ NATIONAL_DEX_SPINARAK, // SPECIES_SPINARAK
+ NATIONAL_DEX_ARIADOS, // SPECIES_ARIADOS
+ NATIONAL_DEX_CROBAT, // SPECIES_CROBAT
+ NATIONAL_DEX_CHINCHOU, // SPECIES_CHINCHOU
+ NATIONAL_DEX_LANTURN, // SPECIES_LANTURN
+ NATIONAL_DEX_PICHU, // SPECIES_PICHU
+ NATIONAL_DEX_CLEFFA, // SPECIES_CLEFFA
+ NATIONAL_DEX_IGGLYBUFF, // SPECIES_IGGLYBUFF
+ NATIONAL_DEX_TOGEPI, // SPECIES_TOGEPI
+ NATIONAL_DEX_TOGETIC, // SPECIES_TOGETIC
+ NATIONAL_DEX_NATU, // SPECIES_NATU
+ NATIONAL_DEX_XATU, // SPECIES_XATU
+ NATIONAL_DEX_MAREEP, // SPECIES_MAREEP
+ NATIONAL_DEX_FLAAFFY, // SPECIES_FLAAFFY
+ NATIONAL_DEX_AMPHAROS, // SPECIES_AMPHAROS
+ NATIONAL_DEX_BELLOSSOM, // SPECIES_BELLOSSOM
+ NATIONAL_DEX_MARILL, // SPECIES_MARILL
+ NATIONAL_DEX_AZUMARILL, // SPECIES_AZUMARILL
+ NATIONAL_DEX_SUDOWOODO, // SPECIES_SUDOWOODO
+ NATIONAL_DEX_POLITOED, // SPECIES_POLITOED
+ NATIONAL_DEX_HOPPIP, // SPECIES_HOPPIP
+ NATIONAL_DEX_SKIPLOOM, // SPECIES_SKIPLOOM
+ NATIONAL_DEX_JUMPLUFF, // SPECIES_JUMPLUFF
+ NATIONAL_DEX_AIPOM, // SPECIES_AIPOM
+ NATIONAL_DEX_SUNKERN, // SPECIES_SUNKERN
+ NATIONAL_DEX_SUNFLORA, // SPECIES_SUNFLORA
+ NATIONAL_DEX_YANMA, // SPECIES_YANMA
+ NATIONAL_DEX_WOOPER, // SPECIES_WOOPER
+ NATIONAL_DEX_QUAGSIRE, // SPECIES_QUAGSIRE
+ NATIONAL_DEX_ESPEON, // SPECIES_ESPEON
+ NATIONAL_DEX_UMBREON, // SPECIES_UMBREON
+ NATIONAL_DEX_MURKROW, // SPECIES_MURKROW
+ NATIONAL_DEX_SLOWKING, // SPECIES_SLOWKING
+ NATIONAL_DEX_MISDREAVUS, // SPECIES_MISDREAVUS
+ NATIONAL_DEX_UNOWN, // SPECIES_UNOWN
+ NATIONAL_DEX_WOBBUFFET, // SPECIES_WOBBUFFET
+ NATIONAL_DEX_GIRAFARIG, // SPECIES_GIRAFARIG
+ NATIONAL_DEX_PINECO, // SPECIES_PINECO
+ NATIONAL_DEX_FORRETRESS, // SPECIES_FORRETRESS
+ NATIONAL_DEX_DUNSPARCE, // SPECIES_DUNSPARCE
+ NATIONAL_DEX_GLIGAR, // SPECIES_GLIGAR
+ NATIONAL_DEX_STEELIX, // SPECIES_STEELIX
+ NATIONAL_DEX_SNUBBULL, // SPECIES_SNUBBULL
+ NATIONAL_DEX_GRANBULL, // SPECIES_GRANBULL
+ NATIONAL_DEX_QWILFISH, // SPECIES_QWILFISH
+ NATIONAL_DEX_SCIZOR, // SPECIES_SCIZOR
+ NATIONAL_DEX_SHUCKLE, // SPECIES_SHUCKLE
+ NATIONAL_DEX_HERACROSS, // SPECIES_HERACROSS
+ NATIONAL_DEX_SNEASEL, // SPECIES_SNEASEL
+ NATIONAL_DEX_TEDDIURSA, // SPECIES_TEDDIURSA
+ NATIONAL_DEX_URSARING, // SPECIES_URSARING
+ NATIONAL_DEX_SLUGMA, // SPECIES_SLUGMA
+ NATIONAL_DEX_MAGCARGO, // SPECIES_MAGCARGO
+ NATIONAL_DEX_SWINUB, // SPECIES_SWINUB
+ NATIONAL_DEX_PILOSWINE, // SPECIES_PILOSWINE
+ NATIONAL_DEX_CORSOLA, // SPECIES_CORSOLA
+ NATIONAL_DEX_REMORAID, // SPECIES_REMORAID
+ NATIONAL_DEX_OCTILLERY, // SPECIES_OCTILLERY
+ NATIONAL_DEX_DELIBIRD, // SPECIES_DELIBIRD
+ NATIONAL_DEX_MANTINE, // SPECIES_MANTINE
+ NATIONAL_DEX_SKARMORY, // SPECIES_SKARMORY
+ NATIONAL_DEX_HOUNDOUR, // SPECIES_HOUNDOUR
+ NATIONAL_DEX_HOUNDOOM, // SPECIES_HOUNDOOM
+ NATIONAL_DEX_KINGDRA, // SPECIES_KINGDRA
+ NATIONAL_DEX_PHANPY, // SPECIES_PHANPY
+ NATIONAL_DEX_DONPHAN, // SPECIES_DONPHAN
+ NATIONAL_DEX_PORYGON2, // SPECIES_PORYGON2
+ NATIONAL_DEX_STANTLER, // SPECIES_STANTLER
+ NATIONAL_DEX_SMEARGLE, // SPECIES_SMEARGLE
+ NATIONAL_DEX_TYROGUE, // SPECIES_TYROGUE
+ NATIONAL_DEX_HITMONTOP, // SPECIES_HITMONTOP
+ NATIONAL_DEX_SMOOCHUM, // SPECIES_SMOOCHUM
+ NATIONAL_DEX_ELEKID, // SPECIES_ELEKID
+ NATIONAL_DEX_MAGBY, // SPECIES_MAGBY
+ NATIONAL_DEX_MILTANK, // SPECIES_MILTANK
+ NATIONAL_DEX_BLISSEY, // SPECIES_BLISSEY
+ NATIONAL_DEX_RAIKOU, // SPECIES_RAIKOU
+ NATIONAL_DEX_ENTEI, // SPECIES_ENTEI
+ NATIONAL_DEX_SUICUNE, // SPECIES_SUICUNE
+ NATIONAL_DEX_LARVITAR, // SPECIES_LARVITAR
+ NATIONAL_DEX_PUPITAR, // SPECIES_PUPITAR
+ NATIONAL_DEX_TYRANITAR, // SPECIES_TYRANITAR
+ NATIONAL_DEX_LUGIA, // SPECIES_LUGIA
+ NATIONAL_DEX_HO_OH, // SPECIES_HO-OH
+ NATIONAL_DEX_CELEBI, // SPECIES_CELEBI
+ NATIONAL_DEX_OLD_UNOWN_B, // SPECIES_OLD_UNOWN_B
+ NATIONAL_DEX_OLD_UNOWN_C, // SPECIES_OLD_UNOWN_C
+ NATIONAL_DEX_OLD_UNOWN_D, // SPECIES_OLD_UNOWN_D
+ NATIONAL_DEX_OLD_UNOWN_E, // SPECIES_OLD_UNOWN_E
+ NATIONAL_DEX_OLD_UNOWN_F, // SPECIES_OLD_UNOWN_F
+ NATIONAL_DEX_OLD_UNOWN_G, // SPECIES_OLD_UNOWN_G
+ NATIONAL_DEX_OLD_UNOWN_H, // SPECIES_OLD_UNOWN_H
+ NATIONAL_DEX_OLD_UNOWN_I, // SPECIES_OLD_UNOWN_I
+ NATIONAL_DEX_OLD_UNOWN_J, // SPECIES_OLD_UNOWN_J
+ NATIONAL_DEX_OLD_UNOWN_K, // SPECIES_OLD_UNOWN_K
+ NATIONAL_DEX_OLD_UNOWN_L, // SPECIES_OLD_UNOWN_L
+ NATIONAL_DEX_OLD_UNOWN_M, // SPECIES_OLD_UNOWN_M
+ NATIONAL_DEX_OLD_UNOWN_N, // SPECIES_OLD_UNOWN_N
+ NATIONAL_DEX_OLD_UNOWN_O, // SPECIES_OLD_UNOWN_O
+ NATIONAL_DEX_OLD_UNOWN_P, // SPECIES_OLD_UNOWN_P
+ NATIONAL_DEX_OLD_UNOWN_Q, // SPECIES_OLD_UNOWN_Q
+ NATIONAL_DEX_OLD_UNOWN_R, // SPECIES_OLD_UNOWN_R
+ NATIONAL_DEX_OLD_UNOWN_S, // SPECIES_OLD_UNOWN_S
+ NATIONAL_DEX_OLD_UNOWN_T, // SPECIES_OLD_UNOWN_T
+ NATIONAL_DEX_OLD_UNOWN_U, // SPECIES_OLD_UNOWN_U
+ NATIONAL_DEX_OLD_UNOWN_V, // SPECIES_OLD_UNOWN_V
+ NATIONAL_DEX_OLD_UNOWN_W, // SPECIES_OLD_UNOWN_W
+ NATIONAL_DEX_OLD_UNOWN_X, // SPECIES_OLD_UNOWN_X
+ NATIONAL_DEX_OLD_UNOWN_Y, // SPECIES_OLD_UNOWN_Y
+ NATIONAL_DEX_OLD_UNOWN_Z, // SPECIES_OLD_UNOWN_Z
+ NATIONAL_DEX_TREECKO, // SPECIES_TREECKO
+ NATIONAL_DEX_GROVYLE, // SPECIES_GROVYLE
+ NATIONAL_DEX_SCEPTILE, // SPECIES_SCEPTILE
+ NATIONAL_DEX_TORCHIC, // SPECIES_TORCHIC
+ NATIONAL_DEX_COMBUSKEN, // SPECIES_COMBUSKEN
+ NATIONAL_DEX_BLAZIKEN, // SPECIES_BLAZIKEN
+ NATIONAL_DEX_MUDKIP, // SPECIES_MUDKIP
+ NATIONAL_DEX_MARSHTOMP, // SPECIES_MARSHTOMP
+ NATIONAL_DEX_SWAMPERT, // SPECIES_SWAMPERT
+ NATIONAL_DEX_POOCHYENA, // SPECIES_POOCHYENA
+ NATIONAL_DEX_MIGHTYENA, // SPECIES_MIGHTYENA
+ NATIONAL_DEX_ZIGZAGOON, // SPECIES_ZIGZAGOON
+ NATIONAL_DEX_LINOONE, // SPECIES_LINOONE
+ NATIONAL_DEX_WURMPLE, // SPECIES_WURMPLE
+ NATIONAL_DEX_SILCOON, // SPECIES_SILCOON
+ NATIONAL_DEX_BEAUTIFLY, // SPECIES_BEAUTIFLY
+ NATIONAL_DEX_CASCOON, // SPECIES_CASCOON
+ NATIONAL_DEX_DUSTOX, // SPECIES_DUSTOX
+ NATIONAL_DEX_LOTAD, // SPECIES_LOTAD
+ NATIONAL_DEX_LOMBRE, // SPECIES_LOMBRE
+ NATIONAL_DEX_LUDICOLO, // SPECIES_LUDICOLO
+ NATIONAL_DEX_SEEDOT, // SPECIES_SEEDOT
+ NATIONAL_DEX_NUZLEAF, // SPECIES_NUZLEAF
+ NATIONAL_DEX_SHIFTRY, // SPECIES_SHIFTRY
+ NATIONAL_DEX_NINCADA, // SPECIES_NINCADA
+ NATIONAL_DEX_NINJASK, // SPECIES_NINJASK
+ NATIONAL_DEX_SHEDINJA, // SPECIES_SHEDINJA
+ NATIONAL_DEX_TAILLOW, // SPECIES_TAILLOW
+ NATIONAL_DEX_SWELLOW, // SPECIES_SWELLOW
+ NATIONAL_DEX_SHROOMISH, // SPECIES_SHROOMISH
+ NATIONAL_DEX_BRELOOM, // SPECIES_BRELOOM
+ NATIONAL_DEX_SPINDA, // SPECIES_SPINDA
+ NATIONAL_DEX_WINGULL, // SPECIES_WINGULL
+ NATIONAL_DEX_PELIPPER, // SPECIES_PELIPPER
+ NATIONAL_DEX_SURSKIT, // SPECIES_SURSKIT
+ NATIONAL_DEX_MASQUERAIN, // SPECIES_MASQUERAIN
+ NATIONAL_DEX_WAILMER, // SPECIES_WAILMER
+ NATIONAL_DEX_WAILORD, // SPECIES_WAILORD
+ NATIONAL_DEX_SKITTY, // SPECIES_SKITTY
+ NATIONAL_DEX_DELCATTY, // SPECIES_DELCATTY
+ NATIONAL_DEX_KECLEON, // SPECIES_KECLEON
+ NATIONAL_DEX_BALTOY, // SPECIES_BALTOY
+ NATIONAL_DEX_CLAYDOL, // SPECIES_CLAYDOL
+ NATIONAL_DEX_NOSEPASS, // SPECIES_NOSEPASS
+ NATIONAL_DEX_TORKOAL, // SPECIES_TORKOAL
+ NATIONAL_DEX_SABLEYE, // SPECIES_SABLEYE
+ NATIONAL_DEX_BARBOACH, // SPECIES_BARBOACH
+ NATIONAL_DEX_WHISCASH, // SPECIES_WHISCASH
+ NATIONAL_DEX_LUVDISC, // SPECIES_LUVDISC
+ NATIONAL_DEX_CORPHISH, // SPECIES_CORPHISH
+ NATIONAL_DEX_CRAWDAUNT, // SPECIES_CRAWDAUNT
+ NATIONAL_DEX_FEEBAS, // SPECIES_FEEBAS
+ NATIONAL_DEX_MILOTIC, // SPECIES_MILOTIC
+ NATIONAL_DEX_CARVANHA, // SPECIES_CARVANHA
+ NATIONAL_DEX_SHARPEDO, // SPECIES_SHARPEDO
+ NATIONAL_DEX_TRAPINCH, // SPECIES_TRAPINCH
+ NATIONAL_DEX_VIBRAVA, // SPECIES_VIBRAVA
+ NATIONAL_DEX_FLYGON, // SPECIES_FLYGON
+ NATIONAL_DEX_MAKUHITA, // SPECIES_MAKUHITA
+ NATIONAL_DEX_HARIYAMA, // SPECIES_HARIYAMA
+ NATIONAL_DEX_ELECTRIKE, // SPECIES_ELECTRIKE
+ NATIONAL_DEX_MANECTRIC, // SPECIES_MANECTRIC
+ NATIONAL_DEX_NUMEL, // SPECIES_NUMEL
+ NATIONAL_DEX_CAMERUPT, // SPECIES_CAMERUPT
+ NATIONAL_DEX_SPHEAL, // SPECIES_SPHEAL
+ NATIONAL_DEX_SEALEO, // SPECIES_SEALEO
+ NATIONAL_DEX_WALREIN, // SPECIES_WALREIN
+ NATIONAL_DEX_CACNEA, // SPECIES_CACNEA
+ NATIONAL_DEX_CACTURNE, // SPECIES_CACTURNE
+ NATIONAL_DEX_SNORUNT, // SPECIES_SNORUNT
+ NATIONAL_DEX_GLALIE, // SPECIES_GLALIE
+ NATIONAL_DEX_LUNATONE, // SPECIES_LUNATONE
+ NATIONAL_DEX_SOLROCK, // SPECIES_SOLROCK
+ NATIONAL_DEX_AZURILL, // SPECIES_AZURILL
+ NATIONAL_DEX_SPOINK, // SPECIES_SPOINK
+ NATIONAL_DEX_GRUMPIG, // SPECIES_GRUMPIG
+ NATIONAL_DEX_PLUSLE, // SPECIES_PLUSLE
+ NATIONAL_DEX_MINUN, // SPECIES_MINUN
+ NATIONAL_DEX_MAWILE, // SPECIES_MAWILE
+ NATIONAL_DEX_MEDITITE, // SPECIES_MEDITITE
+ NATIONAL_DEX_MEDICHAM, // SPECIES_MEDICHAM
+ NATIONAL_DEX_SWABLU, // SPECIES_SWABLU
+ NATIONAL_DEX_ALTARIA, // SPECIES_ALTARIA
+ NATIONAL_DEX_WYNAUT, // SPECIES_WYNAUT
+ NATIONAL_DEX_DUSKULL, // SPECIES_DUSKULL
+ NATIONAL_DEX_DUSCLOPS, // SPECIES_DUSCLOPS
+ NATIONAL_DEX_ROSELIA, // SPECIES_ROSELIA
+ NATIONAL_DEX_SLAKOTH, // SPECIES_SLAKOTH
+ NATIONAL_DEX_VIGOROTH, // SPECIES_VIGOROTH
+ NATIONAL_DEX_SLAKING, // SPECIES_SLAKING
+ NATIONAL_DEX_GULPIN, // SPECIES_GULPIN
+ NATIONAL_DEX_SWALOT, // SPECIES_SWALOT
+ NATIONAL_DEX_TROPIUS, // SPECIES_TROPIUS
+ NATIONAL_DEX_WHISMUR, // SPECIES_WHISMUR
+ NATIONAL_DEX_LOUDRED, // SPECIES_LOUDRED
+ NATIONAL_DEX_EXPLOUD, // SPECIES_EXPLOUD
+ NATIONAL_DEX_CLAMPERL, // SPECIES_CLAMPERL
+ NATIONAL_DEX_HUNTAIL, // SPECIES_HUNTAIL
+ NATIONAL_DEX_GOREBYSS, // SPECIES_GOREBYSS
+ NATIONAL_DEX_ABSOL, // SPECIES_ABSOL
+ NATIONAL_DEX_SHUPPET, // SPECIES_SHUPPET
+ NATIONAL_DEX_BANETTE, // SPECIES_BANETTE
+ NATIONAL_DEX_SEVIPER, // SPECIES_SEVIPER
+ NATIONAL_DEX_ZANGOOSE, // SPECIES_ZANGOOSE
+ NATIONAL_DEX_RELICANTH, // SPECIES_RELICANTH
+ NATIONAL_DEX_ARON, // SPECIES_ARON
+ NATIONAL_DEX_LAIRON, // SPECIES_LAIRON
+ NATIONAL_DEX_AGGRON, // SPECIES_AGGRON
+ NATIONAL_DEX_CASTFORM, // SPECIES_CASTFORM
+ NATIONAL_DEX_VOLBEAT, // SPECIES_VOLBEAT
+ NATIONAL_DEX_ILLUMISE, // SPECIES_ILLUMISE
+ NATIONAL_DEX_LILEEP, // SPECIES_LILEEP
+ NATIONAL_DEX_CRADILY, // SPECIES_CRADILY
+ NATIONAL_DEX_ANORITH, // SPECIES_ANORITH
+ NATIONAL_DEX_ARMALDO, // SPECIES_ARMALDO
+ NATIONAL_DEX_RALTS, // SPECIES_RALTS
+ NATIONAL_DEX_KIRLIA, // SPECIES_KIRLIA
+ NATIONAL_DEX_GARDEVOIR, // SPECIES_GARDEVOIR
+ NATIONAL_DEX_BAGON, // SPECIES_BAGON
+ NATIONAL_DEX_SHELGON, // SPECIES_SHELGON
+ NATIONAL_DEX_SALAMENCE, // SPECIES_SALAMENCE
+ NATIONAL_DEX_BELDUM, // SPECIES_BELDUM
+ NATIONAL_DEX_METANG, // SPECIES_METANG
+ NATIONAL_DEX_METAGROSS, // SPECIES_METAGROSS
+ NATIONAL_DEX_REGIROCK, // SPECIES_REGIROCK
+ NATIONAL_DEX_REGICE, // SPECIES_REGICE
+ NATIONAL_DEX_REGISTEEL, // SPECIES_REGISTEEL
+ NATIONAL_DEX_KYOGRE, // SPECIES_KYOGRE
+ NATIONAL_DEX_GROUDON, // SPECIES_GROUDON
+ NATIONAL_DEX_RAYQUAZA, // SPECIES_RAYQUAZA
+ NATIONAL_DEX_LATIAS, // SPECIES_LATIAS
+ NATIONAL_DEX_LATIOS, // SPECIES_LATIOS
+ NATIONAL_DEX_JIRACHI, // SPECIES_JIRACHI
+ NATIONAL_DEX_DEOXYS, // SPECIES_DEOXYS
+ NATIONAL_DEX_CHIMECHO // SPECIES_CHIMECHO
+};
+
+const u16 gHoennToNationalOrder[] = // Assigns Hoenn Dex Pokémon (Using National Dex Index)
+{
+ // 0
+ NATIONAL_DEX_TREECKO, // HOENN_DEX_TREECKO
+ NATIONAL_DEX_GROVYLE, // HOENN_DEX_GROVYLE
+ NATIONAL_DEX_SCEPTILE, // HOENN_DEX_SCEPTILE
+ NATIONAL_DEX_TORCHIC, // HOENN_DEX_TORCHIC
+ NATIONAL_DEX_COMBUSKEN, // HOENN_DEX_COMBUSKEN
+ NATIONAL_DEX_BLAZIKEN, // HOENN_DEX_BLAZIKEN
+ NATIONAL_DEX_MUDKIP, // HOENN_DEX_MUDKIP
+ NATIONAL_DEX_MARSHTOMP, // HOENN_DEX_MARSHTOMP
+ NATIONAL_DEX_SWAMPERT, // HOENN_DEX_SWAMPERT
+ NATIONAL_DEX_POOCHYENA, // HOENN_DEX_POOCHYENA
+ NATIONAL_DEX_MIGHTYENA, // HOENN_DEX_MIGHTYENA
+ NATIONAL_DEX_ZIGZAGOON, // HOENN_DEX_ZIGZAGOON
+ NATIONAL_DEX_LINOONE, // HOENN_DEX_LINOONE
+ NATIONAL_DEX_WURMPLE, // HOENN_DEX_WURMPLE
+ NATIONAL_DEX_SILCOON, // HOENN_DEX_SILCOON
+ NATIONAL_DEX_BEAUTIFLY, // HOENN_DEX_BEAUTIFLY
+ NATIONAL_DEX_CASCOON, // HOENN_DEX_CASCOON
+ NATIONAL_DEX_DUSTOX, // HOENN_DEX_DUSTOX
+ NATIONAL_DEX_LOTAD, // HOENN_DEX_LOTAD
+ NATIONAL_DEX_LOMBRE, // HOENN_DEX_LOMBRE
+ NATIONAL_DEX_LUDICOLO, // HOENN_DEX_LUDICOLO
+ NATIONAL_DEX_SEEDOT, // HOENN_DEX_SEEDOT
+ NATIONAL_DEX_NUZLEAF, // HOENN_DEX_NUZLEAF
+ NATIONAL_DEX_SHIFTRY, // HOENN_DEX_SHIFTRY
+ NATIONAL_DEX_TAILLOW, // HOENN_DEX_TAILLOW
+ NATIONAL_DEX_SWELLOW, // HOENN_DEX_SWELLOW
+ NATIONAL_DEX_WINGULL, // HOENN_DEX_WINGULL
+ NATIONAL_DEX_PELIPPER, // HOENN_DEX_PELIPPER
+ NATIONAL_DEX_RALTS, // HOENN_DEX_RALTS
+ NATIONAL_DEX_KIRLIA, // HOENN_DEX_KIRLIA
+ NATIONAL_DEX_GARDEVOIR, // HOENN_DEX_GARDEVOIR
+ NATIONAL_DEX_SURSKIT, // HOENN_DEX_SURSKIT
+ NATIONAL_DEX_MASQUERAIN, // HOENN_DEX_MASQUERAIN
+ NATIONAL_DEX_SHROOMISH, // HOENN_DEX_SHROOMISH
+ NATIONAL_DEX_BRELOOM, // HOENN_DEX_BRELOOM
+ NATIONAL_DEX_SLAKOTH, // HOENN_DEX_SLAKOTH
+ NATIONAL_DEX_VIGOROTH, // HOENN_DEX_VIGOROTH
+ NATIONAL_DEX_SLAKING, // HOENN_DEX_SLAKING
+ NATIONAL_DEX_ABRA, // HOENN_DEX_ABRA
+ NATIONAL_DEX_KADABRA, // HOENN_DEX_KADABRA
+ NATIONAL_DEX_ALAKAZAM, // HOENN_DEX_ALAKAZAM
+ NATIONAL_DEX_NINCADA, // HOENN_DEX_NINCADA
+ NATIONAL_DEX_NINJASK, // HOENN_DEX_NINJASK
+ NATIONAL_DEX_SHEDINJA, // HOENN_DEX_SHEDINJA
+ NATIONAL_DEX_WHISMUR, // HOENN_DEX_WHISMUR
+ NATIONAL_DEX_LOUDRED, // HOENN_DEX_LOUDRED
+ NATIONAL_DEX_EXPLOUD, // HOENN_DEX_EXPLOUD
+ NATIONAL_DEX_MAKUHITA, // HOENN_DEX_MAKUHITA
+ NATIONAL_DEX_HARIYAMA, // HOENN_DEX_HARIYAMA
+ NATIONAL_DEX_GOLDEEN, // HOENN_DEX_GOLDEEN
+ NATIONAL_DEX_SEAKING, // HOENN_DEX_SEAKING
+ NATIONAL_DEX_MAGIKARP, // HOENN_DEX_MAGIKARP
+ NATIONAL_DEX_GYARADOS, // HOENN_DEX_GYARADOS
+ NATIONAL_DEX_AZURILL, // HOENN_DEX_AZURILL
+ NATIONAL_DEX_MARILL, // HOENN_DEX_MARILL
+ NATIONAL_DEX_AZUMARILL, // HOENN_DEX_AZUMARILL
+ NATIONAL_DEX_GEODUDE, // HOENN_DEX_GEODUDE
+ NATIONAL_DEX_GRAVELER, // HOENN_DEX_GRAVELER
+ NATIONAL_DEX_GOLEM, // HOENN_DEX_GOLEM
+ NATIONAL_DEX_NOSEPASS, // HOENN_DEX_NOSEPASS
+ NATIONAL_DEX_SKITTY, // HOENN_DEX_SKITTY
+ NATIONAL_DEX_DELCATTY, // HOENN_DEX_DELCATTY
+ NATIONAL_DEX_ZUBAT, // HOENN_DEX_ZUBAT
+ NATIONAL_DEX_GOLBAT, // HOENN_DEX_GOLBAT
+ NATIONAL_DEX_CROBAT, // HOENN_DEX_CROBAT
+ NATIONAL_DEX_TENTACOOL, // HOENN_DEX_TENTACOOL
+ NATIONAL_DEX_TENTACRUEL, // HOENN_DEX_TENTACRUEL
+ NATIONAL_DEX_SABLEYE, // HOENN_DEX_SABLEYE
+ NATIONAL_DEX_MAWILE, // HOENN_DEX_MAWILE
+ NATIONAL_DEX_ARON, // HOENN_DEX_ARON
+ NATIONAL_DEX_LAIRON, // HOENN_DEX_LAIRON
+ NATIONAL_DEX_AGGRON, // HOENN_DEX_AGGRON
+ NATIONAL_DEX_MACHOP, // HOENN_DEX_MACHOP
+ NATIONAL_DEX_MACHOKE, // HOENN_DEX_MACHOKE
+ NATIONAL_DEX_MACHAMP, // HOENN_DEX_MACHAMP
+ NATIONAL_DEX_MEDITITE, // HOENN_DEX_MEDITITE
+ NATIONAL_DEX_MEDICHAM, // HOENN_DEX_MEDICHAM
+ NATIONAL_DEX_ELECTRIKE, // HOENN_DEX_ELECTRIKE
+ NATIONAL_DEX_MANECTRIC, // HOENN_DEX_MANECTRIC
+ NATIONAL_DEX_PLUSLE, // HOENN_DEX_PLUSLE
+ NATIONAL_DEX_MINUN, // HOENN_DEX_MINUN
+ NATIONAL_DEX_MAGNEMITE, // HOENN_DEX_MAGNEMITE
+ NATIONAL_DEX_MAGNETON, // HOENN_DEX_MAGNETON
+ NATIONAL_DEX_VOLTORB, // HOENN_DEX_VOLTORB
+ NATIONAL_DEX_ELECTRODE, // HOENN_DEX_ELECTRODE
+ NATIONAL_DEX_VOLBEAT, // HOENN_DEX_VOLBEAT
+ NATIONAL_DEX_ILLUMISE, // HOENN_DEX_ILLUMISE
+ NATIONAL_DEX_ODDISH, // HOENN_DEX_ODDISH
+ NATIONAL_DEX_GLOOM, // HOENN_DEX_GLOOM
+ NATIONAL_DEX_VILEPLUME, // HOENN_DEX_VILEPLUME
+ NATIONAL_DEX_BELLOSSOM, // HOENN_DEX_BELLOSSOM
+ NATIONAL_DEX_DODUO, // HOENN_DEX_DODUO
+ NATIONAL_DEX_DODRIO, // HOENN_DEX_DODRIO
+ NATIONAL_DEX_ROSELIA, // HOENN_DEX_ROSELIA
+ NATIONAL_DEX_GULPIN, // HOENN_DEX_GULPIN
+ NATIONAL_DEX_SWALOT, // HOENN_DEX_SWALOT
+ NATIONAL_DEX_CARVANHA, // HOENN_DEX_CARVANHA
+ NATIONAL_DEX_SHARPEDO, // HOENN_DEX_SHARPEDO
+ NATIONAL_DEX_WAILMER, // HOENN_DEX_WAILMER
+ NATIONAL_DEX_WAILORD, // HOENN_DEX_WAILORD
+ NATIONAL_DEX_NUMEL, // HOENN_DEX_NUMEL
+ NATIONAL_DEX_CAMERUPT, // HOENN_DEX_CAMERUPT
+ NATIONAL_DEX_SLUGMA, // HOENN_DEX_SLUGMA
+ NATIONAL_DEX_MAGCARGO, // HOENN_DEX_MAGCARGO
+ NATIONAL_DEX_TORKOAL, // HOENN_DEX_TORKOAL
+ NATIONAL_DEX_GRIMER, // HOENN_DEX_GRIMER
+ NATIONAL_DEX_MUK, // HOENN_DEX_MUK
+ NATIONAL_DEX_KOFFING, // HOENN_DEX_KOFFING
+ NATIONAL_DEX_WEEZING, // HOENN_DEX_WEEZING
+ NATIONAL_DEX_SPOINK, // HOENN_DEX_SPOINK
+ NATIONAL_DEX_GRUMPIG, // HOENN_DEX_GRUMPIG
+ NATIONAL_DEX_SANDSHREW, // HOENN_DEX_SANDSHREW
+ NATIONAL_DEX_SANDSLASH, // HOENN_DEX_SANDSLASH
+ NATIONAL_DEX_SPINDA, // HOENN_DEX_SPINDA
+ NATIONAL_DEX_SKARMORY, // HOENN_DEX_SKARMORY
+ NATIONAL_DEX_TRAPINCH, // HOENN_DEX_TRAPINCH
+ NATIONAL_DEX_VIBRAVA, // HOENN_DEX_VIBRAVA
+ NATIONAL_DEX_FLYGON, // HOENN_DEX_FLYGON
+ NATIONAL_DEX_CACNEA, // HOENN_DEX_CACNEA
+ NATIONAL_DEX_CACTURNE, // HOENN_DEX_CACTURNE
+ NATIONAL_DEX_SWABLU, // HOENN_DEX_SWABLU
+ NATIONAL_DEX_ALTARIA, // HOENN_DEX_ALTARIA
+ NATIONAL_DEX_ZANGOOSE, // HOENN_DEX_ZANGOOSE
+ NATIONAL_DEX_SEVIPER, // HOENN_DEX_SEVIPER
+ NATIONAL_DEX_LUNATONE, // HOENN_DEX_LUNATONE
+ NATIONAL_DEX_SOLROCK, // HOENN_DEX_SOLROCK
+ NATIONAL_DEX_BARBOACH, // HOENN_DEX_BARBOACH
+ NATIONAL_DEX_WHISCASH, // HOENN_DEX_WHISCASH
+ NATIONAL_DEX_CORPHISH, // HOENN_DEX_CORPHISH
+ NATIONAL_DEX_CRAWDAUNT, // HOENN_DEX_CRAWDAUNT
+ NATIONAL_DEX_BALTOY, // HOENN_DEX_BALTOY
+ NATIONAL_DEX_CLAYDOL, // HOENN_DEX_CLAYDOL
+ NATIONAL_DEX_LILEEP, // HOENN_DEX_LILEEP
+ NATIONAL_DEX_CRADILY, // HOENN_DEX_CRADILY
+ NATIONAL_DEX_ANORITH, // HOENN_DEX_ANORITH
+ NATIONAL_DEX_ARMALDO, // HOENN_DEX_ARMALDO
+ NATIONAL_DEX_IGGLYBUFF, // HOENN_DEX_IGGLYBUFF
+ NATIONAL_DEX_JIGGLYPUFF, // HOENN_DEX_JIGGLYPUFF
+ NATIONAL_DEX_WIGGLYTUFF, // HOENN_DEX_WIGGLYTUFF
+ NATIONAL_DEX_FEEBAS, // HOENN_DEX_FEEBAS
+ NATIONAL_DEX_MILOTIC, // HOENN_DEX_MILOTIC
+ NATIONAL_DEX_CASTFORM, // HOENN_DEX_CASTFORM
+ NATIONAL_DEX_STARYU, // HOENN_DEX_STARYU
+ NATIONAL_DEX_STARMIE, // HOENN_DEX_STARMIE
+ NATIONAL_DEX_KECLEON, // HOENN_DEX_KECLEON
+ NATIONAL_DEX_SHUPPET, // HOENN_DEX_SHUPPET
+ NATIONAL_DEX_BANETTE, // HOENN_DEX_BANETTE
+ NATIONAL_DEX_DUSKULL, // HOENN_DEX_DUSKULL
+ NATIONAL_DEX_DUSCLOPS, // HOENN_DEX_DUSCLOPS
+ NATIONAL_DEX_TROPIUS, // HOENN_DEX_TROPIUS
+ NATIONAL_DEX_CHIMECHO, // HOENN_DEX_CHIMECHO
+ NATIONAL_DEX_ABSOL, // HOENN_DEX_ABSOL
+ NATIONAL_DEX_VULPIX, // HOENN_DEX_VULPIX
+ NATIONAL_DEX_NINETALES, // HOENN_DEX_NINETALES
+ NATIONAL_DEX_PICHU, // HOENN_DEX_PICHU
+ NATIONAL_DEX_PIKACHU, // HOENN_DEX_PIKACHU
+ NATIONAL_DEX_RAICHU, // HOENN_DEX_RAICHU
+ NATIONAL_DEX_PSYDUCK, // HOENN_DEX_PSYDUCK
+ NATIONAL_DEX_GOLDUCK, // HOENN_DEX_GOLDUCK
+ NATIONAL_DEX_WYNAUT, // HOENN_DEX_WYNAUT
+ NATIONAL_DEX_WOBBUFFET, // HOENN_DEX_WOBBUFFET
+ NATIONAL_DEX_NATU, // HOENN_DEX_NATU
+ NATIONAL_DEX_XATU, // HOENN_DEX_XATU
+ NATIONAL_DEX_GIRAFARIG, // HOENN_DEX_GIRAFARIG
+ NATIONAL_DEX_PHANPY, // HOENN_DEX_PHANPY
+ NATIONAL_DEX_DONPHAN, // HOENN_DEX_DONPHAN
+ NATIONAL_DEX_PINSIR, // HOENN_DEX_PINSIR
+ NATIONAL_DEX_HERACROSS, // HOENN_DEX_HERACROSS
+ NATIONAL_DEX_RHYHORN, // HOENN_DEX_RHYHORN
+ NATIONAL_DEX_RHYDON, // HOENN_DEX_RHYDON
+ NATIONAL_DEX_SNORUNT, // HOENN_DEX_SNORUNT
+ NATIONAL_DEX_GLALIE, // HOENN_DEX_GLALIE
+ NATIONAL_DEX_SPHEAL, // HOENN_DEX_SPHEAL
+ NATIONAL_DEX_SEALEO, // HOENN_DEX_SEALEO
+ NATIONAL_DEX_WALREIN, // HOENN_DEX_WALREIN
+ NATIONAL_DEX_CLAMPERL, // HOENN_DEX_CLAMPERL
+ NATIONAL_DEX_HUNTAIL, // HOENN_DEX_HUNTAIL
+ NATIONAL_DEX_GOREBYSS, // HOENN_DEX_GOREBYSS
+ NATIONAL_DEX_RELICANTH, // HOENN_DEX_RELICANTH
+ NATIONAL_DEX_CORSOLA, // HOENN_DEX_CORSOLA
+ NATIONAL_DEX_CHINCHOU, // HOENN_DEX_CHINCHOU
+ NATIONAL_DEX_LANTURN, // HOENN_DEX_LANTURN
+ NATIONAL_DEX_LUVDISC, // HOENN_DEX_LUVDISC
+ NATIONAL_DEX_HORSEA, // HOENN_DEX_HORSEA
+ NATIONAL_DEX_SEADRA, // HOENN_DEX_SEADRA
+ NATIONAL_DEX_KINGDRA, // HOENN_DEX_KINGDRA
+ NATIONAL_DEX_BAGON, // HOENN_DEX_BAGON
+ NATIONAL_DEX_SHELGON, // HOENN_DEX_SHELGON
+ NATIONAL_DEX_SALAMENCE, // HOENN_DEX_SALAMENCE
+ NATIONAL_DEX_BELDUM, // HOENN_DEX_BELDUM
+ NATIONAL_DEX_METANG, // HOENN_DEX_METANG
+ NATIONAL_DEX_METAGROSS, // HOENN_DEX_METAGROSS
+ NATIONAL_DEX_REGIROCK, // HOENN_DEX_REGIROCK
+ NATIONAL_DEX_REGICE, // HOENN_DEX_REGICE
+ NATIONAL_DEX_REGISTEEL, // HOENN_DEX_REGISTEEL
+ NATIONAL_DEX_LATIAS, // HOENN_DEX_LATIAS
+ NATIONAL_DEX_LATIOS, // HOENN_DEX_LATIOS
+ NATIONAL_DEX_KYOGRE, // HOENN_DEX_KYOGRE
+ NATIONAL_DEX_GROUDON, // HOENN_DEX_GROUDON
+ NATIONAL_DEX_RAYQUAZA, // HOENN_DEX_RAYQUAZA
+ NATIONAL_DEX_JIRACHI, // HOENN_DEX_JIRACHI
+ NATIONAL_DEX_DEOXYS, // HOENN_DEX_DEOXYS
+ NATIONAL_DEX_BULBASAUR, // HOENN_DEX_BULBASAUR - Pokémon from here onwards are UNSEEN in the Hoenn Dex.
+ NATIONAL_DEX_IVYSAUR, // HOENN_DEX_IVYSAUR
+ NATIONAL_DEX_VENUSAUR, // HOENN_DEX_VENUSAUR
+ NATIONAL_DEX_CHARMANDER, // HOENN_DEX_CHARMANDER
+ NATIONAL_DEX_CHARMELEON, // HOENN_DEX_CHARMELEON
+ NATIONAL_DEX_CHARIZARD, // HOENN_DEX_CHARIZARD
+ NATIONAL_DEX_SQUIRTLE, // HOENN_DEX_SQUIRTLE
+ NATIONAL_DEX_WARTORTLE, // HOENN_DEX_WARTORTLE
+ NATIONAL_DEX_BLASTOISE, // HOENN_DEX_BLASTOISE
+ NATIONAL_DEX_CATERPIE, // HOENN_DEX_CATERPIE
+ NATIONAL_DEX_METAPOD, // HOENN_DEX_METAPOD
+ NATIONAL_DEX_BUTTERFREE, // HOENN_DEX_BUTTERFREE
+ NATIONAL_DEX_WEEDLE, // HOENN_DEX_WEEDLE
+ NATIONAL_DEX_KAKUNA, // HOENN_DEX_KAKUNA
+ NATIONAL_DEX_BEEDRILL, // HOENN_DEX_BEEDRILL
+ NATIONAL_DEX_PIDGEY, // HOENN_DEX_PIDGEY
+ NATIONAL_DEX_PIDGEOTTO, // HOENN_DEX_PIDGEOTTO
+ NATIONAL_DEX_PIDGEOT, // HOENN_DEX_PIDGEOT
+ NATIONAL_DEX_RATTATA, // HOENN_DEX_RATTATA
+ NATIONAL_DEX_RATICATE, // HOENN_DEX_RATICATE
+ NATIONAL_DEX_SPEAROW, // HOENN_DEX_SPEAROW
+ NATIONAL_DEX_FEAROW, // HOENN_DEX_FEAROW
+ NATIONAL_DEX_EKANS, // HOENN_DEX_EKANS
+ NATIONAL_DEX_ARBOK, // HOENN_DEX_ARBOK
+ NATIONAL_DEX_NIDORAN_F, // HOENN_DEX_NIDORAN♀
+ NATIONAL_DEX_NIDORINA, // HOENN_DEX_NIDORINA
+ NATIONAL_DEX_NIDOQUEEN, // HOENN_DEX_NIDOQUEEN
+ NATIONAL_DEX_NIDORAN_M, // HOENN_DEX_NIDORAN♂
+ NATIONAL_DEX_NIDORINO, // HOENN_DEX_NIDORINO
+ NATIONAL_DEX_NIDOKING, // HOENN_DEX_NIDOKING
+ NATIONAL_DEX_CLEFAIRY, // HOENN_DEX_CLEFAIRY
+ NATIONAL_DEX_CLEFABLE, // HOENN_DEX_CLEFABLE
+ NATIONAL_DEX_PARAS, // HOENN_DEX_PARAS
+ NATIONAL_DEX_PARASECT, // HOENN_DEX_PARASECT
+ NATIONAL_DEX_VENONAT, // HOENN_DEX_VENONAT
+ NATIONAL_DEX_VENOMOTH, // HOENN_DEX_VENOMOTH
+ NATIONAL_DEX_DIGLETT, // HOENN_DEX_DIGLETT
+ NATIONAL_DEX_DUGTRIO, // HOENN_DEX_DUGTRIO
+ NATIONAL_DEX_MEOWTH, // HOENN_DEX_MEOWTH
+ NATIONAL_DEX_PERSIAN, // HOENN_DEX_PERSIAN
+ NATIONAL_DEX_MANKEY, // HOENN_DEX_MANKEY
+ NATIONAL_DEX_PRIMEAPE, // HOENN_DEX_PRIMEAPE
+ NATIONAL_DEX_GROWLITHE, // HOENN_DEX_GROWLITHE
+ NATIONAL_DEX_ARCANINE, // HOENN_DEX_ARCANINE
+ NATIONAL_DEX_POLIWAG, // HOENN_DEX_POLIWAG
+ NATIONAL_DEX_POLIWHIRL, // HOENN_DEX_POLIWHIRL
+ NATIONAL_DEX_POLIWRATH, // HOENN_DEX_POLIWRATH
+ NATIONAL_DEX_BELLSPROUT, // HOENN_DEX_BELLSPROUT
+ NATIONAL_DEX_WEEPINBELL, // HOENN_DEX_WEEPINBELL
+ NATIONAL_DEX_VICTREEBEL, // HOENN_DEX_VICTREEBEL
+ NATIONAL_DEX_PONYTA, // HOENN_DEX_PONYTA
+ NATIONAL_DEX_RAPIDASH, // HOENN_DEX_RAPIDASH
+ NATIONAL_DEX_SLOWPOKE, // HOENN_DEX_SLOWPOKE
+ NATIONAL_DEX_SLOWBRO, // HOENN_DEX_SLOWBRO
+ NATIONAL_DEX_FARFETCHD, // HOENN_DEX_FARFETCH'D
+ NATIONAL_DEX_SEEL, // HOENN_DEX_SEEL
+ NATIONAL_DEX_DEWGONG, // HOENN_DEX_DEWGONG
+ NATIONAL_DEX_SHELLDER, // HOENN_DEX_SHELLDER
+ NATIONAL_DEX_CLOYSTER, // HOENN_DEX_CLOYSTER
+ NATIONAL_DEX_GASTLY, // HOENN_DEX_GASTLY
+ NATIONAL_DEX_HAUNTER, // HOENN_DEX_HAUNTER
+ NATIONAL_DEX_GENGAR, // HOENN_DEX_GENGAR
+ NATIONAL_DEX_ONIX, // HOENN_DEX_ONIX
+ NATIONAL_DEX_DROWZEE, // HOENN_DEX_DROWZEE
+ NATIONAL_DEX_HYPNO, // HOENN_DEX_HYPNO
+ NATIONAL_DEX_KRABBY, // HOENN_DEX_KRABBY
+ NATIONAL_DEX_KINGLER, // HOENN_DEX_KINGLER
+ NATIONAL_DEX_EXEGGCUTE, // HOENN_DEX_EXEGGCUTE
+ NATIONAL_DEX_EXEGGUTOR, // HOENN_DEX_EXEGGUTOR
+ NATIONAL_DEX_CUBONE, // HOENN_DEX_CUBONE
+ NATIONAL_DEX_MAROWAK, // HOENN_DEX_MAROWAK
+ NATIONAL_DEX_HITMONLEE, // HOENN_DEX_HITMONLEE
+ NATIONAL_DEX_HITMONCHAN, // HOENN_DEX_HITMONCHAN
+ NATIONAL_DEX_LICKITUNG, // HOENN_DEX_LICKITUNG
+ NATIONAL_DEX_CHANSEY, // HOENN_DEX_CHANSEY
+ NATIONAL_DEX_TANGELA, // HOENN_DEX_TANGELA
+ NATIONAL_DEX_KANGASKHAN, // HOENN_DEX_KANGASKHAN
+ NATIONAL_DEX_MR_MIME, // HOENN_DEX_MR. MIME
+ NATIONAL_DEX_SCYTHER, // HOENN_DEX_SCYTHER
+ NATIONAL_DEX_JYNX, // HOENN_DEX_JYNX
+ NATIONAL_DEX_ELECTABUZZ, // HOENN_DEX_ELECTABUZZ
+ NATIONAL_DEX_MAGMAR, // HOENN_DEX_MAGMAR
+ NATIONAL_DEX_TAUROS, // HOENN_DEX_TAUROS
+ NATIONAL_DEX_LAPRAS, // HOENN_DEX_LAPRAS
+ NATIONAL_DEX_DITTO, // HOENN_DEX_DITTO
+ NATIONAL_DEX_EEVEE, // HOENN_DEX_EEVEE
+ NATIONAL_DEX_VAPOREON, // HOENN_DEX_VAPOREON
+ NATIONAL_DEX_JOLTEON, // HOENN_DEX_JOLTEON
+ NATIONAL_DEX_FLAREON, // HOENN_DEX_FLAREON
+ NATIONAL_DEX_PORYGON, // HOENN_DEX_PORYGON
+ NATIONAL_DEX_OMANYTE, // HOENN_DEX_OMANYTE
+ NATIONAL_DEX_OMASTAR, // HOENN_DEX_OMASTAR
+ NATIONAL_DEX_KABUTO, // HOENN_DEX_KABUTO
+ NATIONAL_DEX_KABUTOPS, // HOENN_DEX_KABUTOPS
+ NATIONAL_DEX_AERODACTYL, // HOENN_DEX_AERODACTYL
+ NATIONAL_DEX_SNORLAX, // HOENN_DEX_SNORLAX
+ NATIONAL_DEX_ARTICUNO, // HOENN_DEX_ARTICUNO
+ NATIONAL_DEX_ZAPDOS, // HOENN_DEX_ZAPDOS
+ NATIONAL_DEX_MOLTRES, // HOENN_DEX_MOLTRES
+ NATIONAL_DEX_DRATINI, // HOENN_DEX_DRATINI
+ NATIONAL_DEX_DRAGONAIR, // HOENN_DEX_DRAGONAIR
+ NATIONAL_DEX_DRAGONITE, // HOENN_DEX_DRAGONITE
+ NATIONAL_DEX_MEWTWO, // HOENN_DEX_MEWTWO
+ NATIONAL_DEX_MEW, // HOENN_DEX_MEW
+ NATIONAL_DEX_CHIKORITA, // HOENN_DEX_CHIKORITA
+ NATIONAL_DEX_BAYLEEF, // HOENN_DEX_BAYLEEF
+ NATIONAL_DEX_MEGANIUM, // HOENN_DEX_MEGANIUM
+ NATIONAL_DEX_CYNDAQUIL, // HOENN_DEX_CYNDAQUIL
+ NATIONAL_DEX_QUILAVA, // HOENN_DEX_QUILAVA
+ NATIONAL_DEX_TYPHLOSION, // HOENN_DEX_TYPHLOSION
+ NATIONAL_DEX_TOTODILE, // HOENN_DEX_TOTODILE
+ NATIONAL_DEX_CROCONAW, // HOENN_DEX_CROCONAW
+ NATIONAL_DEX_FERALIGATR, // HOENN_DEX_FERALIGATR
+ NATIONAL_DEX_SENTRET, // HOENN_DEX_SENTRET
+ NATIONAL_DEX_FURRET, // HOENN_DEX_FURRET
+ NATIONAL_DEX_HOOTHOOT, // HOENN_DEX_HOOTHOOT
+ NATIONAL_DEX_NOCTOWL, // HOENN_DEX_NOCTOWL
+ NATIONAL_DEX_LEDYBA, // HOENN_DEX_LEDYBA
+ NATIONAL_DEX_LEDIAN, // HOENN_DEX_LEDIAN
+ NATIONAL_DEX_SPINARAK, // HOENN_DEX_SPINARAK
+ NATIONAL_DEX_ARIADOS, // HOENN_DEX_ARIADOS
+ NATIONAL_DEX_CLEFFA, // HOENN_DEX_CLEFFA
+ NATIONAL_DEX_TOGEPI, // HOENN_DEX_TOGEPI
+ NATIONAL_DEX_TOGETIC, // HOENN_DEX_TOGETIC
+ NATIONAL_DEX_MAREEP, // HOENN_DEX_MAREEP
+ NATIONAL_DEX_FLAAFFY, // HOENN_DEX_FLAAFFY
+ NATIONAL_DEX_AMPHAROS, // HOENN_DEX_AMPHAROS
+ NATIONAL_DEX_SUDOWOODO, // HOENN_DEX_SUDOWOODO
+ NATIONAL_DEX_POLITOED, // HOENN_DEX_POLITOED
+ NATIONAL_DEX_HOPPIP, // HOENN_DEX_HOPPIP
+ NATIONAL_DEX_SKIPLOOM, // HOENN_DEX_SKIPLOOM
+ NATIONAL_DEX_JUMPLUFF, // HOENN_DEX_JUMPLUFF
+ NATIONAL_DEX_AIPOM, // HOENN_DEX_AIPOM
+ NATIONAL_DEX_SUNKERN, // HOENN_DEX_SUNKERN
+ NATIONAL_DEX_SUNFLORA, // HOENN_DEX_SUNFLORA
+ NATIONAL_DEX_YANMA, // HOENN_DEX_YANMA
+ NATIONAL_DEX_WOOPER, // HOENN_DEX_WOOPER
+ NATIONAL_DEX_QUAGSIRE, // HOENN_DEX_QUAGSIRE
+ NATIONAL_DEX_ESPEON, // HOENN_DEX_ESPEON
+ NATIONAL_DEX_UMBREON, // HOENN_DEX_UMBREON
+ NATIONAL_DEX_MURKROW, // HOENN_DEX_MURKROW
+ NATIONAL_DEX_SLOWKING, // HOENN_DEX_SLOWKING
+ NATIONAL_DEX_MISDREAVUS, // HOENN_DEX_MISDREAVUS
+ NATIONAL_DEX_UNOWN, // HOENN_DEX_UNOWN
+ NATIONAL_DEX_PINECO, // HOENN_DEX_PINECO
+ NATIONAL_DEX_FORRETRESS, // HOENN_DEX_FORRETRESS
+ NATIONAL_DEX_DUNSPARCE, // HOENN_DEX_DUNSPARCE
+ NATIONAL_DEX_GLIGAR, // HOENN_DEX_GLIGAR
+ NATIONAL_DEX_STEELIX, // HOENN_DEX_STEELIX
+ NATIONAL_DEX_SNUBBULL, // HOENN_DEX_SNUBBULL
+ NATIONAL_DEX_GRANBULL, // HOENN_DEX_GRANBULL
+ NATIONAL_DEX_QWILFISH, // HOENN_DEX_QWILFISH
+ NATIONAL_DEX_SCIZOR, // HOENN_DEX_SCIZOR
+ NATIONAL_DEX_SHUCKLE, // HOENN_DEX_SHUCKLE
+ NATIONAL_DEX_SNEASEL, // HOENN_DEX_SNEASEL
+ NATIONAL_DEX_TEDDIURSA, // HOENN_DEX_TEDDIURSA
+ NATIONAL_DEX_URSARING, // HOENN_DEX_URSARING
+ NATIONAL_DEX_SWINUB, // HOENN_DEX_SWINUB
+ NATIONAL_DEX_PILOSWINE, // HOENN_DEX_PILOSWINE
+ NATIONAL_DEX_REMORAID, // HOENN_DEX_REMORAID
+ NATIONAL_DEX_OCTILLERY, // HOENN_DEX_OCTILLERY
+ NATIONAL_DEX_DELIBIRD, // HOENN_DEX_DELIBIRD
+ NATIONAL_DEX_MANTINE, // HOENN_DEX_MANTINE
+ NATIONAL_DEX_HOUNDOUR, // HOENN_DEX_HOUNDOUR
+ NATIONAL_DEX_HOUNDOOM, // HOENN_DEX_HOUNDOOM
+ NATIONAL_DEX_PORYGON2, // HOENN_DEX_PORYGON2
+ NATIONAL_DEX_STANTLER, // HOENN_DEX_STANTLER
+ NATIONAL_DEX_SMEARGLE, // HOENN_DEX_SMEARGLE
+ NATIONAL_DEX_TYROGUE, // HOENN_DEX_TYROGUE
+ NATIONAL_DEX_HITMONTOP, // HOENN_DEX_HITMONTOP
+ NATIONAL_DEX_SMOOCHUM, // HOENN_DEX_SMOOCHUM
+ NATIONAL_DEX_ELEKID, // HOENN_DEX_ELEKID
+ NATIONAL_DEX_MAGBY, // HOENN_DEX_MAGBY
+ NATIONAL_DEX_MILTANK, // HOENN_DEX_MILTANK
+ NATIONAL_DEX_BLISSEY, // HOENN_DEX_BLISSEY
+ NATIONAL_DEX_RAIKOU, // HOENN_DEX_RAIKOU
+ NATIONAL_DEX_ENTEI, // HOENN_DEX_ENTEI
+ NATIONAL_DEX_SUICUNE, // HOENN_DEX_SUICUNE
+ NATIONAL_DEX_LARVITAR, // HOENN_DEX_LARVITAR
+ NATIONAL_DEX_PUPITAR, // HOENN_DEX_PUPITAR
+ NATIONAL_DEX_TYRANITAR, // HOENN_DEX_TYRANITAR
+ NATIONAL_DEX_LUGIA, // HOENN_DEX_LUGIA
+ NATIONAL_DEX_HO_OH, // HOENN_DEX_HO-OH
+ NATIONAL_DEX_CELEBI, // HOENN_DEX_CELEBI
+ NATIONAL_DEX_OLD_UNOWN_B, // HOENN_DEX_OLD_UNOWN_B
+ NATIONAL_DEX_OLD_UNOWN_C, // HOENN_DEX_OLD_UNOWN_C
+ NATIONAL_DEX_OLD_UNOWN_D, // HOENN_DEX_OLD_UNOWN_D
+ NATIONAL_DEX_OLD_UNOWN_E, // HOENN_DEX_OLD_UNOWN_E
+ NATIONAL_DEX_OLD_UNOWN_F, // HOENN_DEX_OLD_UNOWN_F
+ NATIONAL_DEX_OLD_UNOWN_G, // HOENN_DEX_OLD_UNOWN_G
+ NATIONAL_DEX_OLD_UNOWN_H, // HOENN_DEX_OLD_UNOWN_H
+ NATIONAL_DEX_OLD_UNOWN_I, // HOENN_DEX_OLD_UNOWN_I
+ NATIONAL_DEX_OLD_UNOWN_J, // HOENN_DEX_OLD_UNOWN_J
+ NATIONAL_DEX_OLD_UNOWN_K, // HOENN_DEX_OLD_UNOWN_K
+ NATIONAL_DEX_OLD_UNOWN_L, // HOENN_DEX_OLD_UNOWN_L
+ NATIONAL_DEX_OLD_UNOWN_M, // HOENN_DEX_OLD_UNOWN_M
+ NATIONAL_DEX_OLD_UNOWN_N, // HOENN_DEX_OLD_UNOWN_N
+ NATIONAL_DEX_OLD_UNOWN_O, // HOENN_DEX_OLD_UNOWN_O
+ NATIONAL_DEX_OLD_UNOWN_P, // HOENN_DEX_OLD_UNOWN_P
+ NATIONAL_DEX_OLD_UNOWN_Q, // HOENN_DEX_OLD_UNOWN_Q
+ NATIONAL_DEX_OLD_UNOWN_R, // HOENN_DEX_OLD_UNOWN_R
+ NATIONAL_DEX_OLD_UNOWN_S, // HOENN_DEX_OLD_UNOWN_S
+ NATIONAL_DEX_OLD_UNOWN_T, // HOENN_DEX_OLD_UNOWN_T
+ NATIONAL_DEX_OLD_UNOWN_U, // HOENN_DEX_OLD_UNOWN_U
+ NATIONAL_DEX_OLD_UNOWN_V, // HOENN_DEX_OLD_UNOWN_V
+ NATIONAL_DEX_OLD_UNOWN_W, // HOENN_DEX_OLD_UNOWN_W
+ NATIONAL_DEX_OLD_UNOWN_X, // HOENN_DEX_OLD_UNOWN_X
+ NATIONAL_DEX_OLD_UNOWN_Y, // HOENN_DEX_OLD_UNOWN_Y
+ NATIONAL_DEX_OLD_UNOWN_Z // HOENN_DEX_OLD_UNOWN_Z
+};
const struct SpindaSpot gSpindaSpotGraphics[] =
{