diff --git a/asm/battle_814AEAC.s b/asm/battle_814AEAC.s index 325fee209..f36880b86 100644 --- a/asm/battle_814AEAC.s +++ b/asm/battle_814AEAC.s @@ -380,7 +380,7 @@ _0814B136: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -416,7 +416,7 @@ _0814B1F0: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -520,7 +520,7 @@ _0814B318: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 bl dp01_tbl4_exec_completed @@ -557,10 +557,10 @@ sub_814B340: @ 814B340 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl nullsub_24 @@ -854,7 +854,7 @@ sub_814B5A8: @ 814B5A8 ldrh r0, [r0] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 bl sub_805E990 ldr r1, =gUnknown_020241E4 @@ -922,7 +922,7 @@ sub_814B69C: @ 814B69C ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -1216,16 +1216,16 @@ _0814B9BC: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2E] movs r6, 0 @@ -1253,12 +1253,12 @@ _0814BA08: adds r1, r6, 0 adds r1, 0xD mov r0, r8 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r1, r6, 0 adds r1, 0x11 mov r0, r8 - bl pokemon_getattr + bl GetMonData mov r2, r9 adds r1, r2, r6 strb r0, [r1] @@ -1269,25 +1269,25 @@ _0814BA08: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r10 strb r0, [r1] adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x80] strb r0, [r2] adds r0, r4, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x44] adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r5, 0x1F ands r0, r5 @@ -1299,7 +1299,7 @@ _0814BA08: strb r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r6, 0x1F ands r0, r6 @@ -1311,7 +1311,7 @@ _0814BA08: strh r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 2 @@ -1323,7 +1323,7 @@ _0814BA08: strb r1, [r3, 0x15] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData movs r1, 0x1F ands r1, r0 lsls r1, 15 @@ -1334,7 +1334,7 @@ _0814BA08: str r0, [sp, 0x14] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r6 lsls r0, 4 @@ -1345,7 +1345,7 @@ _0814BA08: strh r1, [r3, 0x16] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 1 @@ -1357,55 +1357,55 @@ _0814BA08: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x48] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4C] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x7C] strb r0, [r1] adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x28] adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2C] adds r0, r4, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2] adds r0, r4, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x4] adds r0, r4, 0 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x6] adds r0, r4, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x8] adds r0, r4, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0xA] adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData mov r3, sp movs r1, 0x1 ands r0, r1 @@ -1418,7 +1418,7 @@ _0814BA08: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData mov r3, sp lsls r0, 7 ldrb r2, [r3, 0x17] @@ -1428,19 +1428,19 @@ _0814BA08: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x54] adds r0, r4, 0 movs r1, 0x2 ldr r2, [sp, 0x8C] - bl pokemon_getattr + bl GetMonData ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] - bl pokemon_getattr + bl GetMonData mov r2, sp movs r6, 0 _0814BBC0: @@ -1456,7 +1456,7 @@ _0814BBC0: _0814BBE0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB b _0814BF5A @@ -1464,7 +1464,7 @@ _0814BBE0: _0814BBF0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC b _0814BF5A @@ -1478,20 +1478,20 @@ _0814BC00: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 mov r8, r9 _0814BC16: adds r1, r6, 0 adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r1, r8 strh r0, [r1] adds r1, r6, 0 adds r1, 0x11 adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r2, r10 adds r1, r2, r6 strb r0, [r1] @@ -1502,10 +1502,10 @@ _0814BC16: ble _0814BC16 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r9 strb r0, [r1, 0xC] mov r2, r9 @@ -1523,7 +1523,7 @@ _0814BC54: _0814BC68: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -1538,14 +1538,14 @@ _0814BC84: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r8, r2 _0814BC90: adds r1, r6, 0 adds r1, 0x11 mov r2, r8 adds r0, r4, r2 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -1553,10 +1553,10 @@ _0814BC90: ble _0814BC90 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -1565,7 +1565,7 @@ _0814BC90: _0814BCC0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -1578,7 +1578,7 @@ _0814BCC0: _0814BCDC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1 b _0814BCF6 @@ -1586,11 +1586,11 @@ _0814BCDC: _0814BCEC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x19 _0814BCF6: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -1609,7 +1609,7 @@ _0814BCF6: _0814BD1C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1A b _0814C01A @@ -1617,7 +1617,7 @@ _0814BD1C: _0814BD2C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1B b _0814C01A @@ -1625,7 +1625,7 @@ _0814BD2C: _0814BD3C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1C b _0814C01A @@ -1633,7 +1633,7 @@ _0814BD3C: _0814BD4C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1D b _0814C01A @@ -1641,7 +1641,7 @@ _0814BD4C: _0814BD5C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1E b _0814C01A @@ -1649,7 +1649,7 @@ _0814BD5C: _0814BD6C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1F b _0814C01A @@ -1657,7 +1657,7 @@ _0814BD6C: _0814BD7C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x20 b _0814C01A @@ -1665,7 +1665,7 @@ _0814BD7C: _0814BD8C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x22 b _0814C01A @@ -1673,7 +1673,7 @@ _0814BD8C: _0814BD9C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x23 b _0814C01A @@ -1681,7 +1681,7 @@ _0814BD9C: _0814BDAC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x24 b _0814C01A @@ -1689,7 +1689,7 @@ _0814BDAC: _0814BDBC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x25 b _0814C01A @@ -1697,7 +1697,7 @@ _0814BDBC: _0814BDCC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x26 b _0814C01A @@ -1706,31 +1706,31 @@ _0814BDDC: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData strb r0, [r7] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x1] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x2] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x3] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x4] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x5] movs r6, 0x6 b _0814C022 @@ -1738,7 +1738,7 @@ _0814BDDC: _0814BE2C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x27 b _0814C01A @@ -1746,7 +1746,7 @@ _0814BE2C: _0814BE3C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x28 b _0814C01A @@ -1754,7 +1754,7 @@ _0814BE3C: _0814BE4C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x29 b _0814C01A @@ -1762,7 +1762,7 @@ _0814BE4C: _0814BE5C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2A b _0814C01A @@ -1770,7 +1770,7 @@ _0814BE5C: _0814BE6C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2B b _0814C01A @@ -1778,7 +1778,7 @@ _0814BE6C: _0814BE7C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2C b _0814C01A @@ -1786,7 +1786,7 @@ _0814BE7C: _0814BE8C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0 b _0814BEB6 @@ -1794,7 +1794,7 @@ _0814BE8C: _0814BE9C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x9 b _0814BF5A @@ -1802,11 +1802,11 @@ _0814BE9C: _0814BEAC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x37 _0814BEB6: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -1827,7 +1827,7 @@ _0814BEB6: _0814BEE0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x38 b _0814C01A @@ -1835,7 +1835,7 @@ _0814BEE0: _0814BEF0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x39 b _0814BF5A @@ -1843,7 +1843,7 @@ _0814BEF0: _0814BF00: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A b _0814BF5A @@ -1851,7 +1851,7 @@ _0814BF00: _0814BF10: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3B b _0814BF5A @@ -1859,7 +1859,7 @@ _0814BF10: _0814BF20: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3C b _0814BF5A @@ -1867,7 +1867,7 @@ _0814BF20: _0814BF30: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3D b _0814BF5A @@ -1875,7 +1875,7 @@ _0814BF30: _0814BF40: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3E b _0814BF5A @@ -1883,11 +1883,11 @@ _0814BF40: _0814BF50: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3F _0814BF5A: - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 strb r0, [r7] @@ -1899,7 +1899,7 @@ _0814BF5A: _0814BF70: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x16 b _0814C01A @@ -1907,7 +1907,7 @@ _0814BF70: _0814BF80: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x17 b _0814C01A @@ -1915,7 +1915,7 @@ _0814BF80: _0814BF90: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x18 b _0814C01A @@ -1923,7 +1923,7 @@ _0814BF90: _0814BFA0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x21 b _0814C01A @@ -1931,7 +1931,7 @@ _0814BFA0: _0814BFB0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2F b _0814C01A @@ -1939,7 +1939,7 @@ _0814BFB0: _0814BFC0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x30 b _0814C01A @@ -1947,7 +1947,7 @@ _0814BFC0: _0814BFD0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x32 b _0814C01A @@ -1955,7 +1955,7 @@ _0814BFD0: _0814BFE0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x33 b _0814C01A @@ -1963,7 +1963,7 @@ _0814BFE0: _0814BFF0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x34 b _0814C01A @@ -1971,7 +1971,7 @@ _0814BFF0: _0814C000: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x35 b _0814C01A @@ -1979,11 +1979,11 @@ _0814C000: _0814C010: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x36 _0814C01A: - bl pokemon_getattr + bl GetMonData strb r0, [r7] movs r6, 0x1 _0814C022: @@ -2146,7 +2146,7 @@ _0814C1D0: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB @@ -2213,7 +2213,7 @@ _0814C236: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 @@ -2326,7 +2326,7 @@ _0814C236: _0814C368: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2339,7 +2339,7 @@ _0814C368: _0814C388: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2358,7 +2358,7 @@ _0814C3A8: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r6, r3, 0 adds r6, 0x8 @@ -2383,7 +2383,7 @@ _0814C3C2: ble _0814C3C2 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 mov r2, r9 @@ -2393,7 +2393,7 @@ _0814C3C2: _0814C400: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gUnknown_02023064 ldr r1, =gUnknown_02024064 @@ -2409,7 +2409,7 @@ _0814C428: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 ldr r5, =gUnknown_02024064 ldrb r2, [r5] @@ -2451,7 +2451,7 @@ _0814C428: _0814C48C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gUnknown_02023064 ldr r1, =gUnknown_02024064 @@ -2470,7 +2470,7 @@ _0814C4A4: _0814C4BC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2483,7 +2483,7 @@ _0814C4BC: _0814C4DC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2496,7 +2496,7 @@ _0814C4DC: _0814C4FC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2509,7 +2509,7 @@ _0814C4FC: _0814C51C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2522,7 +2522,7 @@ _0814C51C: _0814C53C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2535,7 +2535,7 @@ _0814C53C: _0814C55C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2548,7 +2548,7 @@ _0814C55C: _0814C57C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2561,7 +2561,7 @@ _0814C57C: _0814C59C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2574,7 +2574,7 @@ _0814C59C: _0814C5BC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2587,7 +2587,7 @@ _0814C5BC: _0814C5DC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2600,7 +2600,7 @@ _0814C5DC: _0814C5FC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2613,7 +2613,7 @@ _0814C5FC: _0814C61C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2626,7 +2626,7 @@ _0814C61C: _0814C63C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2639,7 +2639,7 @@ _0814C63C: _0814C65C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2653,7 +2653,7 @@ _0814C67C: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 ldr r5, =gUnknown_02024064 ldrb r2, [r5] @@ -2700,7 +2700,7 @@ _0814C67C: _0814C6EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2713,7 +2713,7 @@ _0814C6EC: _0814C70C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2726,7 +2726,7 @@ _0814C70C: _0814C72C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2739,7 +2739,7 @@ _0814C72C: _0814C74C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2752,7 +2752,7 @@ _0814C74C: _0814C76C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2765,7 +2765,7 @@ _0814C76C: _0814C78C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2779,7 +2779,7 @@ _0814C79C: _0814C7AC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2792,7 +2792,7 @@ _0814C7AC: _0814C7CC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2805,7 +2805,7 @@ _0814C7CC: _0814C7EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2818,7 +2818,7 @@ _0814C7EC: _0814C80C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2831,7 +2831,7 @@ _0814C80C: _0814C82C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2844,7 +2844,7 @@ _0814C82C: _0814C84C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2857,7 +2857,7 @@ _0814C84C: _0814C86C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2870,7 +2870,7 @@ _0814C86C: _0814C88C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2883,7 +2883,7 @@ _0814C88C: _0814C8AC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2896,7 +2896,7 @@ _0814C8AC: _0814C8CC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2909,7 +2909,7 @@ _0814C8CC: _0814C8EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2922,7 +2922,7 @@ _0814C8EC: _0814C90C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2935,7 +2935,7 @@ _0814C90C: _0814C92C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2948,7 +2948,7 @@ _0814C92C: _0814C94C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2961,7 +2961,7 @@ _0814C94C: _0814C96C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2974,7 +2974,7 @@ _0814C96C: _0814C98C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2987,7 +2987,7 @@ _0814C98C: _0814C9AC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3000,7 +3000,7 @@ _0814C9AC: _0814C9CC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3013,7 +3013,7 @@ _0814C9CC: _0814C9EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3026,7 +3026,7 @@ _0814C9EC: _0814CA0C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3039,7 +3039,7 @@ _0814CA0C: _0814CA2C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3052,7 +3052,7 @@ _0814CA2C: _0814CA4C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3069,7 +3069,7 @@ _0814CA62: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 add sp, 0x34 @@ -3100,7 +3100,7 @@ sub_814CA98: @ 814CA98 adds r0, r4, 0x1 adds r0, r2, r0 ldrb r0, [r0] - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r5, r3, r0 movs r3, 0 @@ -3152,7 +3152,7 @@ sub_814CB0C: @ 814CB0C ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 bl sub_805DD7C ldrb r0, [r6] @@ -3162,7 +3162,7 @@ sub_814CB0C: @ 814CB0C muls r0, r5 adds r0, r4 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -3281,7 +3281,7 @@ sub_814CC28: @ 814CC28 ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805DD7C ldrb r0, [r5] @@ -3327,10 +3327,10 @@ sub_814CC98: @ 814CC98 ldrh r1, [r2] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 @@ -3923,7 +3923,7 @@ _0814D1F0: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 movs r1, 0x40 @@ -4458,10 +4458,10 @@ sub_814D63C: @ 814D63C ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r8, r0 mov r1, r9 ldrb r0, [r1] @@ -4471,7 +4471,7 @@ sub_814D63C: @ 814D63C muls r0, r5 adds r0, r4 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -4490,10 +4490,10 @@ _0814D6CC: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -4548,7 +4548,7 @@ sub_814D738: @ 814D738 ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0x9 bl healthbar_draw_field_maybe @@ -4916,10 +4916,10 @@ sub_814DA34: @ 814DA34 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 movs r1, 0x19 @@ -5274,7 +5274,7 @@ _0814DD48: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805DD7C ldrb r0, [r7] diff --git a/asm/battle_ai.s b/asm/battle_ai.s deleted file mode 100644 index 8543f865b..000000000 --- a/asm/battle_ai.s +++ /dev/null @@ -1,5080 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start tai01_unk -tai01_unk: @ 81311B8 - push {lr} - bl Random - lsls r0, 16 - movs r1, 0xFF - lsls r1, 16 - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ands r1, r0 - lsrs r1, 16 - ldrb r0, [r2, 0x1] - cmp r1, r0 - bls _081311F0 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _081311F4 - .pool -_081311F0: - adds r0, r2, 0x6 - str r0, [r3] -_081311F4: - pop {r0} - bx r0 - thumb_func_end tai01_unk - - thumb_func_start tai02_unk -tai02_unk: @ 81311F8 - push {lr} - bl Random - lsls r0, 16 - movs r1, 0xFF - lsls r1, 16 - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ands r1, r0 - lsrs r1, 16 - ldrb r0, [r2, 0x1] - cmp r1, r0 - bne _08131230 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08131234 - .pool -_08131230: - adds r0, r2, 0x6 - str r0, [r3] -_08131234: - pop {r0} - bx r0 - thumb_func_end tai02_unk - - thumb_func_start tai03_unk -tai03_unk: @ 8131238 - push {lr} - bl Random - lsls r0, 16 - movs r1, 0xFF - lsls r1, 16 - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ands r1, r0 - lsrs r1, 16 - ldrb r0, [r2, 0x1] - cmp r1, r0 - beq _08131270 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08131274 - .pool -_08131270: - adds r0, r2, 0x6 - str r0, [r3] -_08131274: - pop {r0} - bx r0 - thumb_func_end tai03_unk - - thumb_func_start tai04_unk -tai04_unk: @ 8131278 - push {r4,lr} - ldr r2, =gUnknown_020244A8 - ldr r0, [r2] - ldr r0, [r0, 0x14] - adds r1, r0, 0x4 - ldrb r0, [r0, 0x1] - adds r1, r0 - ldr r3, =gAIScriptPtr - ldr r0, [r3] - ldrb r0, [r0, 0x1] - ldrb r4, [r1] - adds r0, r4 - strb r0, [r1] - ldr r0, [r2] - ldr r1, [r0, 0x14] - adds r0, r1, 0x4 - ldrb r1, [r1, 0x1] - adds r1, r0, r1 - movs r0, 0 - ldrsb r0, [r1, r0] - cmp r0, 0 - bge _081312A8 - movs r0, 0 - strb r0, [r1] -_081312A8: - ldr r0, [r3] - adds r0, 0x2 - str r0, [r3] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end tai04_unk - - thumb_func_start tai05_unk -tai05_unk: @ 81312BC - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _081312D8 - ldr r0, =gUnknown_0203AB3C - b _081312DA - .pool -_081312D8: - ldr r0, =gUnknown_0202420C -_081312DA: - ldrb r1, [r0] - ldr r2, =gBattleMons - movs r0, 0x58 - muls r1, r0 - adds r1, r2 - ldrh r2, [r1, 0x28] - movs r0, 0x64 - muls r0, r2 - ldrh r1, [r1, 0x2C] - bl __divsi3 - ldr r2, [r4] - ldrb r1, [r2, 0x2] - cmp r0, r1 - bcs _08131318 - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _0813131C - .pool -_08131318: - adds r0, r2, 0x7 - str r0, [r4] -_0813131C: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai05_unk - - thumb_func_start tai06_unk -tai06_unk: @ 8131324 - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _08131340 - ldr r0, =gUnknown_0203AB3C - b _08131342 - .pool -_08131340: - ldr r0, =gUnknown_0202420C -_08131342: - ldrb r1, [r0] - ldr r2, =gBattleMons - movs r0, 0x58 - muls r1, r0 - adds r1, r2 - ldrh r2, [r1, 0x28] - movs r0, 0x64 - muls r0, r2 - ldrh r1, [r1, 0x2C] - bl __divsi3 - ldr r2, [r4] - ldrb r1, [r2, 0x2] - cmp r0, r1 - bls _08131380 - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08131384 - .pool -_08131380: - adds r0, r2, 0x7 - str r0, [r4] -_08131384: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai06_unk - - thumb_func_start tai07_unk -tai07_unk: @ 813138C - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _081313A8 - ldr r0, =gUnknown_0203AB3C - b _081313AA - .pool -_081313A8: - ldr r0, =gUnknown_0202420C -_081313AA: - ldrb r1, [r0] - ldr r2, =gBattleMons - movs r0, 0x58 - muls r1, r0 - adds r1, r2 - ldrh r2, [r1, 0x28] - movs r0, 0x64 - muls r0, r2 - ldrh r1, [r1, 0x2C] - bl __divsi3 - ldr r2, [r4] - ldrb r1, [r2, 0x2] - cmp r0, r1 - bne _081313E8 - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _081313EC - .pool -_081313E8: - adds r0, r2, 0x7 - str r0, [r4] -_081313EC: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai07_unk - - thumb_func_start tai08_unk -tai08_unk: @ 81313F4 - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _08131410 - ldr r0, =gUnknown_0203AB3C - b _08131412 - .pool -_08131410: - ldr r0, =gUnknown_0202420C -_08131412: - ldrb r1, [r0] - ldr r2, =gBattleMons - movs r0, 0x58 - muls r1, r0 - adds r1, r2 - ldrh r2, [r1, 0x28] - movs r0, 0x64 - muls r0, r2 - ldrh r1, [r1, 0x2C] - bl __divsi3 - ldr r2, [r4] - ldrb r1, [r2, 0x2] - cmp r0, r1 - beq _08131450 - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08131454 - .pool -_08131450: - adds r0, r2, 0x7 - str r0, [r4] -_08131454: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai08_unk - - thumb_func_start tai09_unk -tai09_unk: @ 813145C - push {r4,r5,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r5, r0, 0 - cmp r1, 0x1 - bne _08131478 - ldr r0, =gUnknown_0203AB3C - b _0813147A - .pool -_08131478: - ldr r0, =gUnknown_0202420C -_0813147A: - ldrb r4, [r0] - ldr r3, [r5] - ldrb r2, [r3, 0x2] - ldrb r0, [r3, 0x3] - lsls r0, 8 - orrs r2, r0 - ldrb r0, [r3, 0x4] - lsls r0, 16 - orrs r2, r0 - ldrb r0, [r3, 0x5] - lsls r0, 24 - orrs r2, r0 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r4 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - ands r0, r2 - cmp r0, 0 - beq _081314C4 - ldrb r1, [r3, 0x6] - ldrb r0, [r3, 0x7] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r3, 0x8] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r3, 0x9] - lsls r0, 24 - orrs r1, r0 - str r1, [r5] - b _081314CA - .pool -_081314C4: - adds r0, r3, 0 - adds r0, 0xA - str r0, [r5] -_081314CA: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai09_unk - - thumb_func_start tai0A_unk -tai0A_unk: @ 81314D0 - push {r4,r5,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r5, r0, 0 - cmp r1, 0x1 - bne _081314EC - ldr r0, =gUnknown_0203AB3C - b _081314EE - .pool -_081314EC: - ldr r0, =gUnknown_0202420C -_081314EE: - ldrb r4, [r0] - ldr r3, [r5] - ldrb r2, [r3, 0x2] - ldrb r0, [r3, 0x3] - lsls r0, 8 - orrs r2, r0 - ldrb r0, [r3, 0x4] - lsls r0, 16 - orrs r2, r0 - ldrb r0, [r3, 0x5] - lsls r0, 24 - orrs r2, r0 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r4 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - ands r0, r2 - cmp r0, 0 - bne _08131538 - ldrb r1, [r3, 0x6] - ldrb r0, [r3, 0x7] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r3, 0x8] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r3, 0x9] - lsls r0, 24 - orrs r1, r0 - str r1, [r5] - b _0813153E - .pool -_08131538: - adds r0, r3, 0 - adds r0, 0xA - str r0, [r5] -_0813153E: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai0A_unk - - thumb_func_start tai0B_unk -tai0B_unk: @ 8131544 - push {r4,r5,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r5, r0, 0 - cmp r1, 0x1 - bne _08131560 - ldr r0, =gUnknown_0203AB3C - b _08131562 - .pool -_08131560: - ldr r0, =gUnknown_0202420C -_08131562: - ldrb r4, [r0] - ldr r3, [r5] - ldrb r2, [r3, 0x2] - ldrb r0, [r3, 0x3] - lsls r0, 8 - orrs r2, r0 - ldrb r0, [r3, 0x4] - lsls r0, 16 - orrs r2, r0 - ldrb r0, [r3, 0x5] - lsls r0, 24 - orrs r2, r0 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r4 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - ands r0, r2 - cmp r0, 0 - beq _081315AC - ldrb r1, [r3, 0x6] - ldrb r0, [r3, 0x7] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r3, 0x8] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r3, 0x9] - lsls r0, 24 - orrs r1, r0 - str r1, [r5] - b _081315B2 - .pool -_081315AC: - adds r0, r3, 0 - adds r0, 0xA - str r0, [r5] -_081315B2: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai0B_unk - - thumb_func_start tai0C_unk -tai0C_unk: @ 81315B8 - push {r4,r5,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r5, r0, 0 - cmp r1, 0x1 - bne _081315D4 - ldr r0, =gUnknown_0203AB3C - b _081315D6 - .pool -_081315D4: - ldr r0, =gUnknown_0202420C -_081315D6: - ldrb r4, [r0] - ldr r3, [r5] - ldrb r2, [r3, 0x2] - ldrb r0, [r3, 0x3] - lsls r0, 8 - orrs r2, r0 - ldrb r0, [r3, 0x4] - lsls r0, 16 - orrs r2, r0 - ldrb r0, [r3, 0x5] - lsls r0, 24 - orrs r2, r0 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r4 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - ands r0, r2 - cmp r0, 0 - bne _08131620 - ldrb r1, [r3, 0x6] - ldrb r0, [r3, 0x7] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r3, 0x8] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r3, 0x9] - lsls r0, 24 - orrs r1, r0 - str r1, [r5] - b _08131626 - .pool -_08131620: - adds r0, r3, 0 - adds r0, 0xA - str r0, [r5] -_08131626: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai0C_unk - - thumb_func_start tai0D_unk -tai0D_unk: @ 813162C - push {r4,r5,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r5, r0, 0 - cmp r1, 0x1 - bne _08131648 - ldr r0, =gUnknown_0203AB3C - b _0813164A - .pool -_08131648: - ldr r0, =gUnknown_0202420C -_0813164A: - ldrb r4, [r0] - ldr r3, [r5] - 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 - ldr r2, =gUnknown_020242AC - lsls r0, r4, 2 - adds r0, r2 - ldr r0, [r0] - ands r0, r1 - cmp r0, 0 - beq _08131690 - ldrb r1, [r3, 0x6] - ldrb r0, [r3, 0x7] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r3, 0x8] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r3, 0x9] - lsls r0, 24 - orrs r1, r0 - str r1, [r5] - b _08131696 - .pool -_08131690: - adds r0, r3, 0 - adds r0, 0xA - str r0, [r5] -_08131696: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai0D_unk - - thumb_func_start tai0E_unk -tai0E_unk: @ 813169C - push {r4,r5,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r5, r0, 0 - cmp r1, 0x1 - bne _081316B8 - ldr r0, =gUnknown_0203AB3C - b _081316BA - .pool -_081316B8: - ldr r0, =gUnknown_0202420C -_081316BA: - ldrb r4, [r0] - ldr r3, [r5] - 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 - ldr r2, =gUnknown_020242AC - lsls r0, r4, 2 - adds r0, r2 - ldr r0, [r0] - ands r0, r1 - cmp r0, 0 - bne _08131700 - ldrb r1, [r3, 0x6] - ldrb r0, [r3, 0x7] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r3, 0x8] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r3, 0x9] - lsls r0, 24 - orrs r1, r0 - str r1, [r5] - b _08131706 - .pool -_08131700: - adds r0, r3, 0 - adds r0, 0xA - str r0, [r5] -_08131706: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai0E_unk - - thumb_func_start tai0F_unk -tai0F_unk: @ 813170C - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - bne _08131724 - ldr r0, =gUnknown_0203AB3C - b _08131726 - .pool -_08131724: - ldr r0, =gUnknown_0202420C -_08131726: - ldrb r0, [r0] - bl battle_get_per_side_status - movs r2, 0x1 - ands r2, r0 - ldr r4, =gAIScriptPtr - ldr r3, [r4] - 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 - ldr r0, =gUnknown_0202428E - lsls r2, 1 - adds r2, r0 - ldrh r0, [r2] - ands r0, r1 - cmp r0, 0 - beq _0813177C - ldrb r1, [r3, 0x6] - ldrb r0, [r3, 0x7] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r3, 0x8] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r3, 0x9] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08131782 - .pool -_0813177C: - adds r0, r3, 0 - adds r0, 0xA - str r0, [r4] -_08131782: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai0F_unk - - thumb_func_start tai10_unk -tai10_unk: @ 8131788 - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - bne _081317A0 - ldr r0, =gUnknown_0203AB3C - b _081317A2 - .pool -_081317A0: - ldr r0, =gUnknown_0202420C -_081317A2: - ldrb r0, [r0] - bl battle_get_per_side_status - movs r2, 0x1 - ands r2, r0 - ldr r4, =gAIScriptPtr - ldr r3, [r4] - 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 - ldr r0, =gUnknown_0202428E - lsls r2, 1 - adds r2, r0 - ldrh r0, [r2] - ands r0, r1 - cmp r0, 0 - bne _081317F8 - ldrb r1, [r3, 0x6] - ldrb r0, [r3, 0x7] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r3, 0x8] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r3, 0x9] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _081317FE - .pool -_081317F8: - adds r0, r3, 0 - adds r0, 0xA - str r0, [r4] -_081317FE: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai10_unk - - thumb_func_start tai11_unk -tai11_unk: @ 8131804 - push {lr} - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldr r0, [r0, 0x8] - ldrb r1, [r2, 0x1] - cmp r0, r1 - bcs _08131838 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0813183C - .pool -_08131838: - adds r0, r2, 0x6 - str r0, [r3] -_0813183C: - pop {r0} - bx r0 - thumb_func_end tai11_unk - - thumb_func_start tai12_unk -tai12_unk: @ 8131840 - push {lr} - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldr r0, [r0, 0x8] - ldrb r1, [r2, 0x1] - cmp r0, r1 - bls _08131874 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08131878 - .pool -_08131874: - adds r0, r2, 0x6 - str r0, [r3] -_08131878: - pop {r0} - bx r0 - thumb_func_end tai12_unk - - thumb_func_start tai13_unk -tai13_unk: @ 813187C - push {lr} - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldr r0, [r0, 0x8] - ldrb r1, [r2, 0x1] - cmp r0, r1 - bne _081318B0 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _081318B4 - .pool -_081318B0: - adds r0, r2, 0x6 - str r0, [r3] -_081318B4: - pop {r0} - bx r0 - thumb_func_end tai13_unk - - thumb_func_start tai14_unk -tai14_unk: @ 81318B8 - push {lr} - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldr r0, [r0, 0x8] - ldrb r1, [r2, 0x1] - cmp r0, r1 - beq _081318EC - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _081318F0 - .pool -_081318EC: - adds r0, r2, 0x6 - str r0, [r3] -_081318F0: - pop {r0} - bx r0 - thumb_func_end tai14_unk - - thumb_func_start tai15_unk -tai15_unk: @ 81318F4 - push {lr} - 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 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r0, [r0, 0x8] - ldrb r1, [r1] - cmp r0, r1 - bcs _0813193C - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08131942 - .pool -_0813193C: - adds r0, r2, 0 - adds r0, 0x9 - str r0, [r3] -_08131942: - pop {r0} - bx r0 - thumb_func_end tai15_unk - - thumb_func_start tai16_unk -tai16_unk: @ 8131948 - push {lr} - 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 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r0, [r0, 0x8] - ldrb r1, [r1] - cmp r0, r1 - bls _08131990 - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08131996 - .pool -_08131990: - adds r0, r2, 0 - adds r0, 0x9 - str r0, [r3] -_08131996: - pop {r0} - bx r0 - thumb_func_end tai16_unk - - thumb_func_start tai17_unk -tai17_unk: @ 813199C - push {lr} - 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 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r0, [r0, 0x8] - ldrb r1, [r1] - cmp r0, r1 - bne _081319E4 - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _081319EA - .pool -_081319E4: - adds r0, r2, 0 - adds r0, 0x9 - str r0, [r3] -_081319EA: - pop {r0} - bx r0 - thumb_func_end tai17_unk - - thumb_func_start tai18_unk -tai18_unk: @ 81319F0 - push {lr} - 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 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r0, [r0, 0x8] - ldrb r1, [r1] - cmp r0, r1 - beq _08131A38 - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08131A3E - .pool -_08131A38: - adds r0, r2, 0 - adds r0, 0x9 - str r0, [r3] -_08131A3E: - pop {r0} - bx r0 - thumb_func_end tai18_unk - - thumb_func_start tai19_unk -tai19_unk: @ 8131A44 - push {lr} - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldrh r0, [r0, 0x2] - cmp r0, r1 - bne _08131A80 - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08131A84 - .pool -_08131A80: - adds r0, r2, 0x7 - str r0, [r3] -_08131A84: - pop {r0} - bx r0 - thumb_func_end tai19_unk - - thumb_func_start tai1A_unk -tai1A_unk: @ 8131A88 - push {lr} - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldrh r0, [r0, 0x2] - cmp r0, r1 - beq _08131AC4 - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08131AC8 - .pool -_08131AC4: - adds r0, r2, 0x7 - str r0, [r3] -_08131AC8: - pop {r0} - bx r0 - thumb_func_end tai1A_unk - - thumb_func_start tai1B_unk -tai1B_unk: @ 8131ACC - push {r4,lr} - ldr r2, =gAIScriptPtr - ldr r1, [r2] - ldrb r3, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - orrs r3, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - orrs r3, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - orrs r3, r0 - ldrb r0, [r3] - cmp r0, 0xFF - beq _08131B28 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r1, [r0, 0x8] - adds r4, r2, 0 -_08131AF6: - ldrb r0, [r3] - cmp r1, r0 - bne _08131B20 - ldr r2, [r4] - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08131B2E - .pool -_08131B20: - adds r3, 0x1 - ldrb r0, [r3] - cmp r0, 0xFF - bne _08131AF6 -_08131B28: - ldr r0, [r2] - adds r0, 0x9 - str r0, [r2] -_08131B2E: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai1B_unk - - thumb_func_start tai1C_unk -tai1C_unk: @ 8131B34 - push {r4,lr} - ldr r2, =gAIScriptPtr - ldr r1, [r2] - ldrb r3, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - orrs r3, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - orrs r3, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - orrs r3, r0 - ldrb r0, [r3] - adds r4, r2, 0 - cmp r0, 0xFF - beq _08131B80 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r2, [r0, 0x8] - adds r1, r4, 0 -_08131B60: - ldrb r0, [r3] - cmp r2, r0 - bne _08131B78 - ldr r0, [r1] - adds r0, 0x9 - str r0, [r1] - b _08131B98 - .pool -_08131B78: - adds r3, 0x1 - ldrb r0, [r3] - cmp r0, 0xFF - bne _08131B60 -_08131B80: - ldr r2, [r4] - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] -_08131B98: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai1C_unk - - thumb_func_start tai1D_unk -tai1D_unk: @ 8131BA0 - push {r4,r5,lr} - ldr r2, =gAIScriptPtr - ldr r1, [r2] - ldrb r3, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - orrs r3, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - orrs r3, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - orrs r3, r0 - ldrh r0, [r3] - ldr r5, =0x0000ffff - cmp r0, r5 - beq _08131C00 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r1, [r0, 0x8] - adds r4, r2, 0 -_08131BCC: - ldrh r0, [r3] - cmp r1, r0 - bne _08131BF8 - ldr r2, [r4] - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08131C06 - .pool -_08131BF8: - adds r3, 0x2 - ldrh r0, [r3] - cmp r0, r5 - bne _08131BCC -_08131C00: - ldr r0, [r2] - adds r0, 0x9 - str r0, [r2] -_08131C06: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai1D_unk - - thumb_func_start tai1E_unk -tai1E_unk: @ 8131C0C - push {r4,r5,lr} - ldr r2, =gAIScriptPtr - ldr r1, [r2] - ldrb r3, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - orrs r3, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - orrs r3, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - orrs r3, r0 - ldrh r0, [r3] - ldr r4, =0x0000ffff - adds r5, r2, 0 - cmp r0, r4 - beq _08131C5C - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r2, [r0, 0x8] - adds r1, r5, 0 -_08131C3A: - ldrh r0, [r3] - cmp r2, r0 - bne _08131C54 - ldr r0, [r1] - adds r0, 0x9 - str r0, [r1] - b _08131C74 - .pool -_08131C54: - adds r3, 0x2 - ldrh r0, [r3] - cmp r0, r4 - bne _08131C3A -_08131C5C: - ldr r2, [r5] - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - orrs r1, r0 - str r1, [r5] -_08131C74: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai1E_unk - - thumb_func_start tai1F_unk -tai1F_unk: @ 8131C7C - push {r4,r5,lr} - movs r3, 0 - ldr r4, =gAIScriptPtr - ldr r1, =gBattleMons - ldr r0, =gUnknown_0203AB3C - ldrb r2, [r0] - ldr r5, =gBattleMoves - movs r0, 0x58 - muls r0, r2 - adds r1, 0xC - adds r2, r0, r1 -_08131C92: - ldrh r0, [r2] - cmp r0, 0 - beq _08131CA6 - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - ldrb r0, [r1, 0x1] - cmp r0, 0 - bne _08131CAE -_08131CA6: - adds r2, 0x2 - adds r3, 0x1 - cmp r3, 0x3 - ble _08131C92 -_08131CAE: - cmp r3, 0x4 - bne _08131CCC - ldr r0, [r4] - adds r0, 0x5 - str r0, [r4] - b _08131CE4 - .pool -_08131CCC: - 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] -_08131CE4: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai1F_unk - - thumb_func_start tai20_unk -tai20_unk: @ 8131CEC - push {r4,r5,lr} - movs r3, 0 - ldr r4, =gAIScriptPtr - ldr r1, =gBattleMons - ldr r0, =gUnknown_0203AB3C - ldrb r2, [r0] - ldr r5, =gBattleMoves - movs r0, 0x58 - muls r0, r2 - adds r1, 0xC - adds r2, r0, r1 -_08131D02: - ldrh r0, [r2] - cmp r0, 0 - beq _08131D16 - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - ldrb r0, [r1, 0x1] - cmp r0, 0 - bne _08131D1E -_08131D16: - adds r2, 0x2 - adds r3, 0x1 - cmp r3, 0x3 - ble _08131D02 -_08131D1E: - cmp r3, 0x4 - beq _08131D3C - ldr r0, [r4] - adds r0, 0x5 - str r0, [r4] - b _08131D54 - .pool -_08131D3C: - 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] -_08131D54: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai20_unk - - thumb_func_start tai21_unk -tai21_unk: @ 8131D5C - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x14] - ldr r0, =gUnknown_03005D10 - ldrb r0, [r0, 0x13] - str r0, [r1, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end tai21_unk - - thumb_func_start dp15_get_some_type -dp15_get_some_type: @ 8131D80 - push {r4,lr} - ldr r1, =gAIScriptPtr - ldr r0, [r1] - ldrb r0, [r0, 0x1] - adds r4, r1, 0 - cmp r0, 0x4 - bhi _08131E5A - lsls r0, 2 - ldr r1, =_08131DA0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08131DA0: - .4byte _08131DD8 - .4byte _08131DB4 - .4byte _08131E20 - .4byte _08131DFC - .4byte _08131E44 -_08131DB4: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r3, [r0, 0x14] - ldr r2, =gBattleMons - ldr r0, =gUnknown_0203AB3C - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x21 - ldrb r0, [r0] - b _08131E58 - .pool -_08131DD8: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r3, [r0, 0x14] - ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x21 - ldrb r0, [r0] - b _08131E58 - .pool -_08131DFC: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r3, [r0, 0x14] - ldr r2, =gBattleMons - ldr r0, =gUnknown_0203AB3C - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x22 - ldrb r0, [r0] - b _08131E58 - .pool -_08131E20: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r3, [r0, 0x14] - ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x22 - ldrb r0, [r0] - b _08131E58 - .pool -_08131E44: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r3, [r0, 0x14] - ldr r2, =gBattleMoves - ldrh r1, [r3, 0x2] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x2] -_08131E58: - str r0, [r3, 0x8] -_08131E5A: - ldr r0, [r4] - adds r0, 0x2 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end dp15_get_some_type - - thumb_func_start sub_8131E70 -sub_8131E70: @ 8131E70 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08131E84 - ldr r0, =gUnknown_0203AB3C - ldrb r0, [r0] - b _08131EAC - .pool -_08131E84: - cmp r0, 0x1 - ble _08131E90 - cmp r0, 0x2 - beq _08131EA4 - cmp r0, 0x3 - beq _08131E9C -_08131E90: - ldr r0, =gUnknown_0202420C - ldrb r0, [r0] - b _08131EAC - .pool -_08131E9C: - ldr r0, =gUnknown_0203AB3C - b _08131EA6 - .pool -_08131EA4: - ldr r0, =gUnknown_0202420C -_08131EA6: - ldrb r1, [r0] - movs r0, 0x2 - eors r0, r1 -_08131EAC: - pop {r1} - bx r1 - .pool - thumb_func_end sub_8131E70 - - thumb_func_start tai5F_unk -tai5F_unk: @ 8131EB4 - push {r4,lr} - ldr r4, =gAIScriptPtr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl sub_8131E70 - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gBattleMons - movs r1, 0x58 - muls r0, r1 - adds r3, r0, r2 - adds r1, r3, 0 - adds r1, 0x21 - ldr r0, [r4] - ldrb r1, [r1] - ldrb r2, [r0, 0x2] - cmp r1, r2 - beq _08131EE4 - adds r0, r3, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, r2 - bne _08131EFC -_08131EE4: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x14] - movs r0, 0x1 - b _08131F04 - .pool -_08131EFC: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x14] - movs r0, 0 -_08131F04: - str r0, [r1, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x3 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end tai5F_unk - - thumb_func_start dp15_move_get_power__2_8 -dp15_move_get_power__2_8: @ 8131F1C - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r3, [r0, 0x14] - ldr r2, =gBattleMoves - ldrh r1, [r3, 0x2] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - str r0, [r3, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end dp15_move_get_power__2_8 - - thumb_func_start dp15_is_most_powerful_move__8 -dp15_is_most_powerful_move__8: @ 8131F48 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x14 - movs r3, 0 - ldr r0, =gUnknown_085B09C8 - ldrh r1, [r0] - ldr r5, =0x0000ffff - ldr r6, =gBattleMoves - ldr r2, =gUnknown_020244A8 - cmp r1, r5 - beq _08131F86 - ldr r0, [r2] - ldr r0, [r0, 0x14] - ldrh r1, [r0, 0x2] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r4, [r0] - ldr r1, =gUnknown_085B09C8 -_08131F76: - ldrh r0, [r1] - cmp r4, r0 - beq _08131F86 - adds r1, 0x2 - adds r3, 0x1 - ldrh r0, [r1] - cmp r0, r5 - bne _08131F76 -_08131F86: - ldr r0, [r2] - ldr r0, [r0, 0x14] - ldrh r1, [r0, 0x2] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - bhi _08131F9C - b _08132126 -_08131F9C: - lsls r0, r3, 1 - ldr r1, =gUnknown_085B09C8 - adds r0, r1 - ldrh r3, [r0] - ldr r0, =0x0000ffff - cmp r3, r0 - beq _08131FAC - b _08132126 -_08131FAC: - ldr r0, =gUnknown_02024400 - movs r1, 0 - strh r1, [r0] - ldr r0, =gUnknown_0202449C - ldr r0, [r0] - strb r1, [r0, 0x13] - ldr r0, =gUnknown_02024474 - movs r2, 0x1 - strb r2, [r0, 0xE] - ldr r0, =gUnknown_0202427C - strb r1, [r0] - ldr r0, =gUnknown_02024211 - strb r2, [r0] - movs r6, 0 - mov r9, r3 - ldr r2, =gUnknown_085B09C8 - ldrh r2, [r2] - str r2, [sp, 0x10] -_08131FD0: - movs r3, 0 - ldr r5, =gBattleMons - lsls r4, r6, 1 - ldr r7, =gUnknown_0203AB3C - lsls r0, r6, 2 - mov r8, r0 - adds r1, r6, 0x1 - mov r10, r1 - ldr r2, [sp, 0x10] - cmp r2, r9 - beq _08132014 - ldr r2, =gBattleMoves - ldrb r1, [r7] - movs r0, 0x58 - muls r0, r1 - adds r0, r4, r0 - adds r1, r5, 0 - adds r1, 0xC - adds r0, r1 - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r2, [r0] - ldr r1, =gUnknown_085B09C8 -_08132004: - ldrh r0, [r1] - cmp r2, r0 - beq _08132014 - adds r1, 0x2 - adds r3, 0x1 - ldrh r0, [r1] - cmp r0, r9 - bne _08132004 -_08132014: - ldrb r1, [r7] - movs r0, 0x58 - muls r0, r1 - adds r0, r4, r0 - adds r1, r5, 0 - adds r1, 0xC - adds r1, r0, r1 - ldrh r0, [r1] - cmp r0, 0 - beq _081320C0 - lsls r0, r3, 1 - ldr r2, =gUnknown_085B09C8 - adds r0, r2 - ldrh r0, [r0] - cmp r0, r9 - bne _081320C0 - ldr r0, =gBattleMoves - ldrh r2, [r1] - lsls r1, r2, 1 - adds r1, r2 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - cmp r0, 0x1 - bls _081320C0 - ldr r5, =gUnknown_020241EA - strh r2, [r5] - ldrb r0, [r7] - ldr r4, =gUnknown_0202420C - ldrb r1, [r4] - bl sub_8046E7C - ldrh r0, [r5] - ldrb r1, [r7] - ldrb r2, [r4] - bl move_effectiveness_something - mov r4, sp - add r4, r8 - ldr r2, =gUnknown_020241F0 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - adds r0, 0x18 - adds r0, r6 - ldrb r1, [r0] - ldr r0, [r2] - muls r0, r1 - movs r1, 0x64 - bl __divsi3 - str r0, [r4] - cmp r0, 0 - bne _081320C8 - movs r0, 0x1 - str r0, [r4] - b _081320C8 - .pool -_081320C0: - mov r1, sp - add r1, r8 - movs r0, 0 - str r0, [r1] -_081320C8: - mov r6, r10 - cmp r6, 0x3 - bgt _081320D0 - b _08131FD0 -_081320D0: - movs r6, 0 - ldr r2, =gUnknown_020244A8 - ldr r0, [r2] - ldr r0, [r0, 0x14] - ldrb r0, [r0, 0x1] - lsls r0, 2 - add r0, sp - ldr r1, [sp] - ldr r0, [r0] - ldr r5, =gAIScriptPtr - cmp r1, r0 - bgt _08132106 - adds r4, r2, 0 - mov r3, sp -_081320EC: - adds r3, 0x4 - adds r6, 0x1 - cmp r6, 0x3 - bgt _08132106 - ldr r0, [r4] - ldr r0, [r0, 0x14] - ldrb r0, [r0, 0x1] - lsls r0, 2 - add r0, sp - ldr r1, [r3] - ldr r0, [r0] - cmp r1, r0 - ble _081320EC -_08132106: - cmp r6, 0x4 - bne _0813211C - ldr r0, [r2] - ldr r1, [r0, 0x14] - movs r0, 0x2 - str r0, [r1, 0x8] - b _08132130 - .pool -_0813211C: - ldr r0, [r2] - ldr r1, [r0, 0x14] - movs r0, 0x1 - str r0, [r1, 0x8] - b _08132130 -_08132126: - ldr r0, [r2] - ldr r1, [r0, 0x14] - movs r0, 0 - str r0, [r1, 0x8] - ldr r5, =gAIScriptPtr -_08132130: - ldr r0, [r5] - adds r0, 0x1 - str r0, [r5] - add sp, 0x14 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end dp15_is_most_powerful_move__8 - - thumb_func_start dp15_get_move_to_execute_B -dp15_get_move_to_execute_B: @ 813214C - push {lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r3, r0, 0 - cmp r1, 0x1 - bne _08132178 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldr r1, =gUnknown_02024248 - ldr r0, =gUnknown_0203AB3C - b _08132182 - .pool -_08132178: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldr r1, =gUnknown_02024248 - ldr r0, =gUnknown_0202420C -_08132182: - ldrb r0, [r0] - lsls r0, 1 - adds r0, r1 - ldrh r0, [r0] - str r0, [r2, 0x8] - ldr r0, [r3] - adds r0, 0x2 - str r0, [r3] - pop {r0} - bx r0 - .pool - thumb_func_end dp15_get_move_to_execute_B - - thumb_func_start tai26_unk -tai26_unk: @ 81321A4 - push {lr} - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r0, [r0, 0x8] - cmp r1, r0 - bne _081321D8 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _081321DC - .pool -_081321D8: - adds r0, r2, 0x6 - str r0, [r3] -_081321DC: - pop {r0} - bx r0 - thumb_func_end tai26_unk - - thumb_func_start tai27_unk -tai27_unk: @ 81321E0 - push {lr} - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldr r0, [r0, 0x8] - cmp r1, r0 - beq _08132214 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08132218 - .pool -_08132214: - adds r0, r2, 0x6 - str r0, [r3] -_08132218: - pop {r0} - bx r0 - thumb_func_end tai27_unk - - thumb_func_start tai28_unk -tai28_unk: @ 813221C - push {lr} - ldr r0, =gUnknown_0203AB3C - ldrb r0, [r0] - ldr r1, =gUnknown_0202420C - ldrb r1, [r1] - movs r2, 0x1 - bl b_first_side - ldr r3, =gAIScriptPtr - ldr r2, [r3] - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r2, 0x1] - cmp r0, r1 - bne _08132260 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08132264 - .pool -_08132260: - adds r0, r2, 0x6 - str r0, [r3] -_08132264: - pop {r0} - bx r0 - thumb_func_end tai28_unk - - thumb_func_start tai29_unk -tai29_unk: @ 8132268 - push {lr} - ldr r0, =gUnknown_0203AB3C - ldrb r0, [r0] - ldr r1, =gUnknown_0202420C - ldrb r1, [r1] - movs r2, 0x1 - bl b_first_side - ldr r3, =gAIScriptPtr - ldr r2, [r3] - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r2, 0x1] - cmp r0, r1 - beq _081322AC - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _081322B0 - .pool -_081322AC: - adds r0, r2, 0x6 - str r0, [r3] -_081322B0: - pop {r0} - bx r0 - thumb_func_end tai29_unk - - thumb_func_start nullsub_102 -nullsub_102: @ 81322B4 - bx lr - thumb_func_end nullsub_102 - - thumb_func_start nullsub_103 -nullsub_103: @ 81322B8 - bx lr - thumb_func_end nullsub_103 - - thumb_func_start tai2C_unk -tai2C_unk: @ 81322BC - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x14] - movs r0, 0 - str r0, [r1, 0x8] - ldr r0, =gAIScriptPtr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - bne _081322E8 - ldr r0, =gUnknown_0203AB3C - b _081322EA - .pool -_081322E8: - ldr r0, =gUnknown_0202420C -_081322EA: - ldrb r5, [r0] - adds r0, r5, 0 - bl battle_side_get_owner - lsls r0, 24 - ldr r1, =gUnknown_02024744 - mov r8, r1 - cmp r0, 0 - bne _08132300 - ldr r0, =gUnknown_020244EC - mov r8, r0 -_08132300: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08132344 - ldr r4, =gUnknown_0202406E - lsls r0, r5, 1 - adds r0, r4 - ldrb r7, [r0] - adds r0, r5, 0 - bl battle_get_per_side_status - movs r1, 0x2 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl battle_get_side_with_given_state - lsls r0, 24 - lsrs r0, 23 - adds r0, r4 - ldrb r6, [r0] - b _0813234E - .pool -_08132344: - ldr r1, =gUnknown_0202406E - lsls r0, r5, 1 - adds r0, r1 - ldrb r6, [r0] - adds r7, r6, 0 -_0813234E: - movs r5, 0 -_08132350: - cmp r5, r7 - beq _08132394 - cmp r5, r6 - beq _08132394 - movs r0, 0x64 - muls r0, r5 - mov r1, r8 - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0x39 - bl pokemon_getattr - cmp r0, 0 - beq _08132394 - adds r0, r4, 0 - movs r1, 0x41 - bl pokemon_getattr - cmp r0, 0 - beq _08132394 - adds r0, r4, 0 - movs r1, 0x41 - bl pokemon_getattr - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - beq _08132394 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x14] - ldr r0, [r1, 0x8] - adds r0, 0x1 - str r0, [r1, 0x8] -_08132394: - adds r5, 0x1 - cmp r5, 0x5 - ble _08132350 - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end tai2C_unk - - thumb_func_start dp15_get_move_id__8 -dp15_get_move_id__8: @ 81323B8 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x14] - ldrh r0, [r1, 0x2] - str r0, [r1, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end dp15_get_move_id__8 - - thumb_func_start dp15_move_get_move_script_id -dp15_move_get_move_script_id: @ 81323D4 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r3, [r0, 0x14] - ldr r2, =gBattleMoves - ldrh r1, [r3, 0x2] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - str r0, [r3, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end dp15_move_get_move_script_id - - thumb_func_start tai2F_unk -tai2F_unk: @ 8132400 - push {r4-r7,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - mov r12, r0 - cmp r1, 0x1 - bne _0813241C - ldr r0, =gUnknown_0203AB3C - b _0813241E - .pool -_0813241C: - ldr r0, =gUnknown_0202420C -_0813241E: - ldrb r3, [r0] - ldr r0, =gUnknown_02024064 - ldrb r0, [r0] - cmp r0, r3 - beq _081324F0 - ldr r7, =gUnknown_020244A8 - ldr r5, [r7] - ldr r0, [r5, 0x18] - adds r0, 0x40 - adds r2, r0, r3 - ldrb r0, [r2] - adds r6, r7, 0 - cmp r0, 0 - beq _0813244C - ldr r1, [r5, 0x14] - str r0, [r1, 0x8] - b _08132504 - .pool -_0813244C: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r3 - adds r4, r0, r1 - adds r0, r4, 0 - adds r0, 0x20 - ldrb r0, [r0] - adds r2, r1, 0 - cmp r0, 0x17 - beq _08132468 - cmp r0, 0x2A - beq _08132468 - cmp r0, 0x47 - bne _08132480 -_08132468: - ldr r0, [r6] - ldr r1, [r0, 0x14] - movs r0, 0x58 - muls r0, r3 - adds r0, r2 - adds r0, 0x20 - ldrb r0, [r0] - str r0, [r1, 0x8] - b _08132504 - .pool -_08132480: - ldr r6, =gBaseStats - ldrh r0, [r4] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r2, r1, r6 - ldrb r0, [r2, 0x16] - cmp r0, 0 - beq _081324E8 - ldrb r0, [r2, 0x17] - cmp r0, 0 - beq _081324E0 - bl Random - movs r1, 0x1 - ands r1, r0 - cmp r1, 0 - beq _081324C4 - ldr r0, [r7] - ldr r2, [r0, 0x14] - ldrh r1, [r4] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r0, [r0, 0x16] - str r0, [r2, 0x8] - ldr r0, =gAIScriptPtr - mov r12, r0 - b _08132504 - .pool -_081324C4: - ldr r0, [r7] - ldr r2, [r0, 0x14] - ldrh r1, [r4] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r0, [r0, 0x17] - str r0, [r2, 0x8] - ldr r1, =gAIScriptPtr - mov r12, r1 - b _08132504 - .pool -_081324E0: - ldr r1, [r5, 0x14] - ldrb r0, [r2, 0x16] - str r0, [r1, 0x8] - b _08132504 -_081324E8: - ldr r1, [r5, 0x14] - ldrb r0, [r2, 0x17] - str r0, [r1, 0x8] - b _08132504 -_081324F0: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r3 - adds r0, r1 - adds r0, 0x20 - ldrb r0, [r0] - str r0, [r2, 0x8] -_08132504: - mov r1, r12 - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end tai2F_unk - - thumb_func_start tai60_unk -tai60_unk: @ 813251C - push {r4-r6,lr} - ldr r4, =gAIScriptPtr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl sub_8131E70 - lsls r0, 24 - lsrs r5, r0, 24 - ldr r0, [r4] - ldrb r3, [r0, 0x2] - ldrb r0, [r0, 0x1] - cmp r0, 0 - beq _0813253A - cmp r0, 0x2 - bne _081325BC -_0813253A: - ldr r0, =gUnknown_020244A8 - ldr r4, [r0] - ldr r1, [r4, 0x18] - adds r1, 0x40 - adds r2, r1, r5 - ldrb r1, [r2] - adds r6, r0, 0 - cmp r1, 0 - beq _0813255C - adds r3, r1, 0 - ldr r0, [r4, 0x14] - str r3, [r0, 0x8] - b _081325CA - .pool -_0813255C: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r5 - adds r4, r0, r1 - adds r0, r4, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x17 - beq _08132576 - cmp r0, 0x2A - beq _08132576 - cmp r0, 0x47 - bne _08132588 -_08132576: - movs r0, 0x58 - muls r0, r5 - adds r0, r1 - adds r0, 0x20 - ldrb r3, [r0] - b _081325CA - .pool -_08132588: - ldr r2, =gBaseStats - ldrh r1, [r4] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r1, r0, r2 - ldrb r4, [r1, 0x16] - cmp r4, 0 - beq _081325B8 - ldrb r2, [r1, 0x17] - cmp r2, 0 - beq _081325B4 - adds r0, r3, 0 - cmp r4, r0 - beq _081325CE - cmp r2, r0 - beq _081325CE - adds r3, r4, 0 - b _081325CA - .pool -_081325B4: - ldrb r3, [r1, 0x16] - b _081325CA -_081325B8: - ldrb r3, [r1, 0x17] - b _081325CA -_081325BC: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r5 - adds r0, r1 - adds r0, 0x20 - ldrb r3, [r0] - ldr r6, =gUnknown_020244A8 -_081325CA: - cmp r3, 0 - bne _081325E8 -_081325CE: - ldr r0, [r6] - ldr r1, [r0, 0x14] - movs r0, 0x2 - str r0, [r1, 0x8] - ldr r2, =gAIScriptPtr - b _08132608 - .pool -_081325E8: - ldr r0, =gAIScriptPtr - ldr r1, [r0] - adds r2, r0, 0 - ldrb r1, [r1, 0x2] - cmp r3, r1 - bne _08132600 - ldr r0, [r6] - ldr r1, [r0, 0x14] - movs r0, 0x1 - b _08132606 - .pool -_08132600: - ldr r0, [r6] - ldr r1, [r0, 0x14] - movs r0, 0 -_08132606: - str r0, [r1, 0x8] -_08132608: - ldr r0, [r2] - adds r0, 0x3 - str r0, [r2] - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end tai60_unk - - thumb_func_start tai30_unk -tai30_unk: @ 8132614 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r0, =gUnknown_02024400 - movs r1, 0 - strh r1, [r0] - ldr r0, =gUnknown_0202449C - ldr r0, [r0] - strb r1, [r0, 0x13] - ldr r0, =gUnknown_02024474 - movs r3, 0 - movs r2, 0x1 - strb r2, [r0, 0xE] - ldr r0, =gUnknown_0202427C - strb r1, [r0] - ldr r0, =gUnknown_02024211 - strb r2, [r0] - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - str r3, [r0, 0x8] - movs r5, 0 - ldr r4, =gUnknown_020241F0 - ldr r7, =gUnknown_020241EA - ldr r0, =gUnknown_02024090 - mov r8, r0 - ldr r6, =gUnknown_0203AB3C -_0813264A: - movs r0, 0x28 - str r0, [r4] - lsls r1, r5, 1 - ldrb r2, [r6] - movs r0, 0x58 - muls r0, r2 - adds r1, r0 - add r1, r8 - ldrh r0, [r1] - strh r0, [r7] - lsls r0, 16 - cmp r0, 0 - beq _081326B8 - ldrh r0, [r7] - ldrb r1, [r6] - ldr r2, =gUnknown_0202420C - ldrb r2, [r2] - bl move_effectiveness_something - ldr r0, [r4] - cmp r0, 0x78 - bne _0813267A - movs r0, 0x50 - str r0, [r4] -_0813267A: - ldr r0, [r4] - cmp r0, 0xF0 - bne _08132684 - movs r0, 0xA0 - str r0, [r4] -_08132684: - ldr r0, [r4] - cmp r0, 0x1E - bne _0813268E - movs r0, 0x14 - str r0, [r4] -_0813268E: - ldr r0, [r4] - cmp r0, 0xF - bne _08132698 - movs r0, 0xA - str r0, [r4] -_08132698: - ldr r0, =gUnknown_0202427C - ldrb r1, [r0] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _081326A8 - movs r0, 0 - str r0, [r4] -_081326A8: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldr r0, [r2, 0x8] - ldr r1, [r4] - cmp r0, r1 - bcs _081326B8 - str r1, [r2, 0x8] -_081326B8: - adds r5, 0x1 - cmp r5, 0x3 - ble _0813264A - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end tai30_unk - - thumb_func_start dp15_simulate_damage_bonus_jump_if_eq -dp15_simulate_damage_bonus_jump_if_eq: @ 8132700 - push {r4,r5,lr} - ldr r0, =gUnknown_02024400 - movs r1, 0 - strh r1, [r0] - ldr r0, =gUnknown_0202449C - ldr r0, [r0] - strb r1, [r0, 0x13] - ldr r0, =gUnknown_02024474 - movs r2, 0x1 - strb r2, [r0, 0xE] - ldr r5, =gUnknown_0202427C - strb r1, [r5] - ldr r0, =gUnknown_02024211 - strb r2, [r0] - ldr r4, =gUnknown_020241F0 - movs r0, 0x28 - str r0, [r4] - ldr r1, =gUnknown_020241EA - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldrh r0, [r0, 0x2] - strh r0, [r1] - ldrh r0, [r1] - ldr r1, =gUnknown_0203AB3C - ldrb r1, [r1] - ldr r2, =gUnknown_0202420C - ldrb r2, [r2] - bl move_effectiveness_something - ldr r0, [r4] - cmp r0, 0x78 - bne _08132746 - movs r0, 0x50 - str r0, [r4] -_08132746: - ldr r0, [r4] - cmp r0, 0xF0 - bne _08132750 - movs r0, 0xA0 - str r0, [r4] -_08132750: - ldr r0, [r4] - cmp r0, 0x1E - bne _0813275A - movs r0, 0x14 - str r0, [r4] -_0813275A: - ldr r0, [r4] - cmp r0, 0xF - bne _08132764 - movs r0, 0xA - str r0, [r4] -_08132764: - ldrb r1, [r5] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _08132772 - movs r0, 0 - str r0, [r4] -_08132772: - ldrb r0, [r4] - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - cmp r0, r1 - bne _081327C4 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _081327C8 - .pool -_081327C4: - adds r0, r2, 0x6 - str r0, [r3] -_081327C8: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end dp15_simulate_damage_bonus_jump_if_eq - - thumb_func_start nullsub_104 -nullsub_104: @ 81327D0 - bx lr - thumb_func_end nullsub_104 - - thumb_func_start nullsub_105 -nullsub_105: @ 81327D4 - bx lr - thumb_func_end nullsub_105 - - thumb_func_start tai34_unk -tai34_unk: @ 81327D8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r0, =gAIScriptPtr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - bne _08132818 - ldr r0, =gUnknown_0203AB3C - b _0813281A - .pool -_081327F8: - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldrb r1, [r2, 0x6] - ldrb r0, [r2, 0x7] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x9] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0813289A - .pool -_08132818: - ldr r0, =gUnknown_0202420C -_0813281A: - ldrb r0, [r0] - bl battle_side_get_owner - lsls r0, 24 - ldr r1, =gUnknown_02024744 - mov r9, r1 - cmp r0, 0 - bne _0813282E - ldr r0, =gUnknown_020244EC - mov r9, r0 -_0813282E: - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r7, [r1, 0x2] - ldrb r0, [r1, 0x3] - lsls r0, 8 - orrs r7, r0 - ldrb r0, [r1, 0x4] - lsls r0, 16 - orrs r7, r0 - ldrb r0, [r1, 0x5] - lsls r0, 24 - orrs r7, r0 - movs r1, 0 - mov r8, r1 - movs r0, 0xCE - lsls r0, 1 - mov r10, r0 -_08132850: - movs r0, 0x64 - mov r4, r8 - muls r4, r0 - add r4, r9 - adds r0, r4, 0 - movs r1, 0xB - bl pokemon_getattr - lsls r0, 16 - lsrs r5, r0, 16 - adds r0, r4, 0 - movs r1, 0x39 - bl pokemon_getattr - lsls r0, 16 - lsrs r6, r0, 16 - adds r0, r4, 0 - movs r1, 0x37 - bl pokemon_getattr - cmp r5, 0 - beq _08132888 - cmp r5, r10 - beq _08132888 - cmp r6, 0 - beq _08132888 - cmp r0, r7 - beq _081327F8 -_08132888: - movs r1, 0x1 - add r8, r1 - mov r0, r8 - cmp r0, 0x5 - ble _08132850 - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0xA - str r0, [r1] -_0813289A: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end tai34_unk - - thumb_func_start tai35_unk -tai35_unk: @ 81328B8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r0, =gAIScriptPtr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - bne _081328D8 - ldr r0, =gUnknown_0203AB3C - b _081328DA - .pool -_081328D8: - ldr r0, =gUnknown_0202420C -_081328DA: - ldrb r0, [r0] - bl battle_side_get_owner - lsls r0, 24 - ldr r1, =gUnknown_02024744 - mov r10, r1 - cmp r0, 0 - bne _081328EE - ldr r0, =gUnknown_020244EC - mov r10, r0 -_081328EE: - ldr r2, =gAIScriptPtr - ldr r1, [r2] - ldrb r7, [r1, 0x2] - ldrb r0, [r1, 0x3] - lsls r0, 8 - orrs r7, r0 - ldrb r0, [r1, 0x4] - lsls r0, 16 - orrs r7, r0 - ldrb r0, [r1, 0x5] - lsls r0, 24 - orrs r7, r0 - movs r1, 0 - mov r8, r1 - mov r9, r2 -_0813290C: - movs r0, 0x64 - mov r4, r8 - muls r4, r0 - add r4, r10 - adds r0, r4, 0 - movs r1, 0xB - bl pokemon_getattr - lsls r0, 16 - lsrs r5, r0, 16 - adds r0, r4, 0 - movs r1, 0x39 - bl pokemon_getattr - lsls r0, 16 - lsrs r6, r0, 16 - adds r0, r4, 0 - movs r1, 0x37 - bl pokemon_getattr - cmp r5, 0 - beq _08132950 - movs r1, 0xCE - lsls r1, 1 - cmp r5, r1 - beq _08132950 - cmp r6, 0 - beq _08132950 - cmp r0, r7 - bne _08132950 - mov r1, r9 - ldr r0, [r1] - adds r0, 0xA - str r0, [r1] -_08132950: - movs r0, 0x1 - add r8, r0 - mov r1, r8 - cmp r1, 0x5 - ble _0813290C - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldrb r1, [r2, 0x6] - ldrb r0, [r2, 0x7] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x9] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end tai35_unk - - thumb_func_start dp15_get_weather__8 -dp15_get_weather__8: @ 8132994 - push {lr} - ldr r2, =gUnknown_020243CC - ldrh r1, [r2] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - beq _081329AC - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x14] - movs r0, 0x1 - str r0, [r1, 0x8] -_081329AC: - ldrh r1, [r2] - movs r0, 0x18 - ands r0, r1 - cmp r0, 0 - beq _081329C0 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x14] - movs r0, 0x2 - str r0, [r1, 0x8] -_081329C0: - ldrh r1, [r2] - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - beq _081329D4 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x14] - movs r0, 0 - str r0, [r1, 0x8] -_081329D4: - ldrh r1, [r2] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _081329E8 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x14] - movs r0, 0x3 - str r0, [r1, 0x8] -_081329E8: - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end dp15_get_weather__8 - - thumb_func_start tai37_unk -tai37_unk: @ 8132A00 - push {lr} - ldr r2, =gBattleMoves - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldrh r1, [r0, 0x2] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldrb r0, [r0] - ldrb r1, [r2, 0x1] - cmp r0, r1 - bne _08132A44 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08132A48 - .pool -_08132A44: - adds r0, r2, 0x6 - str r0, [r3] -_08132A48: - pop {r0} - bx r0 - thumb_func_end tai37_unk - - thumb_func_start tai38_unk -tai38_unk: @ 8132A4C - push {lr} - ldr r2, =gBattleMoves - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldrh r1, [r0, 0x2] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldr r3, =gAIScriptPtr - ldr r2, [r3] - ldrb r0, [r0] - ldrb r1, [r2, 0x1] - cmp r0, r1 - beq _08132A90 - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08132A94 - .pool -_08132A90: - adds r0, r2, 0x6 - str r0, [r3] -_08132A94: - pop {r0} - bx r0 - thumb_func_end tai38_unk - - thumb_func_start tai39_unk -tai39_unk: @ 8132A98 - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _08132AB4 - ldr r0, =gUnknown_0203AB3C - b _08132AB6 - .pool -_08132AB4: - ldr r0, =gUnknown_0202420C -_08132AB6: - ldrb r3, [r0] - ldr r1, =gBattleMons - ldr r2, [r4] - movs r0, 0x58 - muls r0, r3 - ldrb r3, [r2, 0x2] - adds r0, r3 - adds r1, 0x18 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - ldrb r1, [r2, 0x3] - cmp r0, r1 - bge _08132AF4 - ldrb r1, [r2, 0x4] - ldrb r0, [r2, 0x5] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08132AFA - .pool -_08132AF4: - adds r0, r2, 0 - adds r0, 0x8 - str r0, [r4] -_08132AFA: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai39_unk - - thumb_func_start tai3A_unk -tai3A_unk: @ 8132B00 - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _08132B1C - ldr r0, =gUnknown_0203AB3C - b _08132B1E - .pool -_08132B1C: - ldr r0, =gUnknown_0202420C -_08132B1E: - ldrb r3, [r0] - ldr r1, =gBattleMons - ldr r2, [r4] - movs r0, 0x58 - muls r0, r3 - ldrb r3, [r2, 0x2] - adds r0, r3 - adds r1, 0x18 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - ldrb r1, [r2, 0x3] - cmp r0, r1 - ble _08132B5C - ldrb r1, [r2, 0x4] - ldrb r0, [r2, 0x5] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08132B62 - .pool -_08132B5C: - adds r0, r2, 0 - adds r0, 0x8 - str r0, [r4] -_08132B62: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai3A_unk - - thumb_func_start tai3B_unk -tai3B_unk: @ 8132B68 - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _08132B84 - ldr r0, =gUnknown_0203AB3C - b _08132B86 - .pool -_08132B84: - ldr r0, =gUnknown_0202420C -_08132B86: - ldrb r3, [r0] - ldr r1, =gBattleMons - ldr r2, [r4] - movs r0, 0x58 - muls r0, r3 - ldrb r3, [r2, 0x2] - adds r0, r3 - adds r1, 0x18 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - ldrb r1, [r2, 0x3] - cmp r0, r1 - bne _08132BC4 - ldrb r1, [r2, 0x4] - ldrb r0, [r2, 0x5] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08132BCA - .pool -_08132BC4: - adds r0, r2, 0 - adds r0, 0x8 - str r0, [r4] -_08132BCA: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai3B_unk - - thumb_func_start tai3C_unk -tai3C_unk: @ 8132BD0 - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _08132BEC - ldr r0, =gUnknown_0203AB3C - b _08132BEE - .pool -_08132BEC: - ldr r0, =gUnknown_0202420C -_08132BEE: - ldrb r3, [r0] - ldr r1, =gBattleMons - ldr r2, [r4] - movs r0, 0x58 - muls r0, r3 - ldrb r3, [r2, 0x2] - adds r0, r3 - adds r1, 0x18 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - ldrb r1, [r2, 0x3] - cmp r0, r1 - beq _08132C2C - ldrb r1, [r2, 0x4] - ldrb r0, [r2, 0x5] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08132C32 - .pool -_08132C2C: - adds r0, r2, 0 - adds r0, 0x8 - str r0, [r4] -_08132C32: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai3C_unk - - thumb_func_start tai3D_unk -tai3D_unk: @ 8132C38 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r2, =gBattleMoves - ldr r0, =gUnknown_020244A8 - mov r8, r0 - ldr r0, [r0] - ldr r0, [r0, 0x14] - ldrh r1, [r0, 0x2] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - bls _08132D1C - ldr r0, =gUnknown_02024400 - movs r1, 0 - strh r1, [r0] - ldr r0, =gUnknown_0202449C - ldr r0, [r0] - strb r1, [r0, 0x13] - ldr r0, =gUnknown_02024474 - movs r7, 0x1 - strb r7, [r0, 0xE] - ldr r0, =gUnknown_0202427C - strb r1, [r0] - ldr r0, =gUnknown_02024211 - strb r7, [r0] - ldr r5, =gUnknown_020241EA - mov r1, r8 - ldr r0, [r1] - ldr r0, [r0, 0x14] - ldrh r0, [r0, 0x2] - strh r0, [r5] - ldr r4, =gUnknown_0203AB3C - ldrb r0, [r4] - ldr r6, =gUnknown_0202420C - ldrb r1, [r6] - bl sub_8046E7C - ldrh r0, [r5] - ldrb r1, [r4] - ldrb r2, [r6] - bl move_effectiveness_something - ldr r4, =gUnknown_020241F0 - mov r1, r8 - ldr r0, [r1] - ldr r1, [r0, 0x14] - adds r0, r1, 0 - adds r0, 0x18 - ldrb r1, [r1, 0x1] - adds r0, r1 - ldrb r1, [r0] - ldr r0, [r4] - muls r0, r1 - movs r1, 0x64 - bl __divsi3 - str r0, [r4] - cmp r0, 0 - bne _08132CB8 - str r7, [r4] -_08132CB8: - ldr r2, =gBattleMons - ldrb r1, [r6] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r1, [r0, 0x28] - ldr r0, [r4] - cmp r1, r0 - bgt _08132D1C - 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 _08132D24 - .pool -_08132D1C: - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_08132D24: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end tai3D_unk - - thumb_func_start dp15_determine_move_damage_jump_if_not_fatal -dp15_determine_move_damage_jump_if_not_fatal: @ 8132D34 - push {r4-r7,lr} - ldr r2, =gBattleMoves - ldr r7, =gUnknown_020244A8 - ldr r0, [r7] - ldr r0, [r0, 0x14] - ldrh r1, [r0, 0x2] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - bls _08132E04 - ldr r0, =gUnknown_02024400 - movs r1, 0 - strh r1, [r0] - ldr r0, =gUnknown_0202449C - ldr r0, [r0] - strb r1, [r0, 0x13] - ldr r0, =gUnknown_02024474 - movs r2, 0x1 - strb r2, [r0, 0xE] - ldr r0, =gUnknown_0202427C - strb r1, [r0] - ldr r0, =gUnknown_02024211 - strb r2, [r0] - ldr r6, =gUnknown_020241EA - ldr r0, [r7] - ldr r0, [r0, 0x14] - ldrh r0, [r0, 0x2] - strh r0, [r6] - ldr r4, =gUnknown_0203AB3C - ldrb r0, [r4] - ldr r5, =gUnknown_0202420C - ldrb r1, [r5] - bl sub_8046E7C - ldrh r0, [r6] - ldrb r1, [r4] - ldrb r2, [r5] - bl move_effectiveness_something - ldr r4, =gUnknown_020241F0 - ldr r0, [r7] - ldr r1, [r0, 0x14] - adds r0, r1, 0 - adds r0, 0x18 - ldrb r1, [r1, 0x1] - adds r0, r1 - ldrb r1, [r0] - ldr r0, [r4] - muls r0, r1 - movs r1, 0x64 - bl __divsi3 - str r0, [r4] - ldr r3, =gBattleMons - ldrb r2, [r5] - movs r1, 0x58 - muls r1, r2 - adds r1, r3 - ldrh r1, [r1, 0x28] - cmp r1, r0 - ble _08132E04 - 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 _08132E0C - .pool -_08132E04: - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_08132E0C: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end dp15_determine_move_damage_jump_if_not_fatal - - thumb_func_start tai3F_unk -tai3F_unk: @ 8132E18 - push {r4-r7,lr} - ldr r0, =gAIScriptPtr - ldr r5, [r0] - adds r7, r5, 0x2 - ldrb r1, [r5, 0x1] - adds r6, r0, 0 - cmp r1, 0x1 - beq _08132E42 - cmp r1, 0x1 - bgt _08132E38 - cmp r1, 0 - beq _08132EDC - b _08132F40 - .pool -_08132E38: - cmp r1, 0x2 - beq _08132EDC - cmp r1, 0x3 - beq _08132E84 - b _08132F40 -_08132E42: - movs r4, 0 - ldr r3, =gBattleMons - ldr r2, =gUnknown_0203AB3C - ldrb r1, [r2] - movs r0, 0x58 - muls r0, r1 - adds r3, 0xC - adds r0, r3 - ldrh r0, [r0] - ldrh r5, [r5, 0x2] - cmp r0, r5 - beq _08132E74 - movs r5, 0x58 -_08132E5C: - adds r4, 0x1 - cmp r4, 0x3 - bgt _08132E74 - lsls r1, r4, 1 - ldrb r0, [r2] - muls r0, r5 - adds r1, r0 - adds r1, r3 - ldrh r0, [r1] - ldrh r1, [r7] - cmp r0, r1 - bne _08132E5C -_08132E74: - cmp r4, 0x4 - beq _08132F18 - b _08132F28 - .pool -_08132E84: - ldr r3, =gBattleMons - ldr r2, =gUnknown_0203AB3C - ldrb r1, [r2] - movs r0, 0x2 - eors r0, r1 - movs r1, 0x58 - muls r1, r0 - adds r0, r1, r3 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08132EA8 - adds r0, r5, 0 - b _08132F1A - .pool -_08132EA8: - movs r4, 0 - adds r3, 0xC - adds r0, r1, r3 - ldrh r0, [r0] - ldrh r5, [r5, 0x2] - cmp r0, r5 - beq _08132E74 - mov r12, r3 - adds r5, r2, 0 - movs r3, 0x2 -_08132EBC: - adds r4, 0x1 - cmp r4, 0x3 - bgt _08132E74 - lsls r1, r4, 1 - ldrb r0, [r5] - adds r2, r3, 0 - eors r2, r0 - movs r0, 0x58 - muls r0, r2 - adds r1, r0 - add r1, r12 - ldrh r0, [r1] - ldrh r1, [r7] - cmp r0, r1 - bne _08132EBC - b _08132E74 -_08132EDC: - movs r4, 0 - ldr r3, =gUnknown_020244A8 - ldr r0, [r3] - ldr r1, [r0, 0x18] - ldr r2, =gUnknown_0202420C - ldrb r0, [r2] - lsls r0, 4 - adds r1, r0 - ldrh r0, [r1] - ldrh r1, [r7] - cmp r0, r1 - beq _08132F14 - adds r7, r3, 0 - adds r5, r2, 0 - adds r3, r1, 0 -_08132EFA: - adds r4, 0x1 - cmp r4, 0x3 - bgt _08132F14 - ldr r0, [r7] - ldr r2, [r0, 0x18] - lsls r1, r4, 1 - ldrb r0, [r5] - lsls r0, 4 - adds r1, r0 - adds r2, r1 - ldrh r0, [r2] - cmp r0, r3 - bne _08132EFA -_08132F14: - cmp r4, 0x4 - bne _08132F28 -_08132F18: - ldr r0, [r6] -_08132F1A: - adds r0, 0x8 - str r0, [r6] - b _08132F40 - .pool -_08132F28: - ldr r2, [r6] - ldrb r1, [r2, 0x4] - ldrb r0, [r2, 0x5] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 24 - orrs r1, r0 - str r1, [r6] -_08132F40: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end tai3F_unk - - thumb_func_start tai40_unk -tai40_unk: @ 8132F48 - push {r4-r7,lr} - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r6, r0, 0x2 - ldrb r0, [r0, 0x1] - adds r5, r1, 0 - cmp r0, 0x1 - beq _08132F70 - cmp r0, 0x1 - bgt _08132F68 - cmp r0, 0 - beq _08132FB4 - b _08133018 - .pool -_08132F68: - cmp r0, 0x2 - beq _08132FB4 - cmp r0, 0x3 - bne _08133018 -_08132F70: - movs r3, 0 - ldr r2, =gBattleMons - ldr r4, =gUnknown_0203AB3C - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - adds r2, 0xC - adds r0, r2 - ldrh r0, [r0] - ldrh r1, [r6] - cmp r0, r1 - beq _08132FA6 - adds r7, r4, 0 - movs r6, 0x58 - adds r4, r2, 0 - adds r2, r1, 0 -_08132F90: - adds r3, 0x1 - cmp r3, 0x3 - bgt _08132FA6 - lsls r1, r3, 1 - ldrb r0, [r7] - muls r0, r6 - adds r1, r0 - adds r1, r4 - ldrh r0, [r1] - cmp r0, r2 - bne _08132F90 -_08132FA6: - cmp r3, 0x4 - bne _08132FF0 - b _08133000 - .pool -_08132FB4: - movs r3, 0 - ldr r4, =gUnknown_020244A8 - ldr r0, [r4] - ldr r1, [r0, 0x18] - ldr r2, =gUnknown_0202420C - ldrb r0, [r2] - lsls r0, 4 - adds r1, r0 - ldrh r0, [r1] - ldrh r1, [r6] - cmp r0, r1 - beq _08132FEC - adds r7, r4, 0 - adds r6, r2, 0 - adds r4, r1, 0 -_08132FD2: - adds r3, 0x1 - cmp r3, 0x3 - bgt _08132FEC - ldr r0, [r7] - ldr r2, [r0, 0x18] - lsls r1, r3, 1 - ldrb r0, [r6] - lsls r0, 4 - adds r1, r0 - adds r2, r1 - ldrh r0, [r2] - cmp r0, r4 - bne _08132FD2 -_08132FEC: - cmp r3, 0x4 - beq _08133000 -_08132FF0: - ldr r0, [r5] - adds r0, 0x8 - str r0, [r5] - b _08133018 - .pool -_08133000: - ldr r2, [r5] - ldrb r1, [r2, 0x4] - ldrb r0, [r2, 0x5] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 24 - orrs r1, r0 - str r1, [r5] -_08133018: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end tai40_unk - - thumb_func_start tai41_unk -tai41_unk: @ 8133020 - push {r4-r7,lr} - ldr r1, =gAIScriptPtr - ldr r0, [r1] - ldrb r0, [r0, 0x1] - adds r5, r1, 0 - cmp r0, 0x1 - beq _08133044 - cmp r0, 0x1 - bgt _0813303C - cmp r0, 0 - beq _08133090 - b _08133110 - .pool -_0813303C: - cmp r0, 0x2 - beq _08133090 - cmp r0, 0x3 - bne _08133110 -_08133044: - movs r3, 0 - ldr r1, =gBattleMons - ldr r0, =gUnknown_0203AB3C - ldrb r2, [r0] - ldr r6, =gBattleMoves - movs r0, 0x58 - muls r0, r2 - adds r1, 0xC - adds r2, r0, r1 - ldr r4, =gAIScriptPtr -_08133058: - ldrh r0, [r2] - cmp r0, 0 - beq _08133072 - adds r1, r0, 0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldr r1, [r4] - ldrb r0, [r0] - ldrb r1, [r1, 0x2] - cmp r0, r1 - beq _0813307A -_08133072: - adds r2, 0x2 - adds r3, 0x1 - cmp r3, 0x3 - ble _08133058 -_0813307A: - cmp r3, 0x4 - beq _081330DC - b _081330F8 - .pool -_08133090: - movs r3, 0 - ldr r1, =gBattleMons - ldr r0, =gUnknown_0203AB3C - ldrb r2, [r0] - ldr r0, =gBattleMoves - mov r12, r0 - ldr r7, =gUnknown_020244A8 - ldr r6, =gUnknown_0202420C - movs r0, 0x58 - muls r0, r2 - adds r1, 0xC - adds r4, r0, r1 -_081330A8: - lsls r2, r3, 1 - ldrh r0, [r4] - cmp r0, 0 - beq _081330D0 - ldr r0, [r7] - ldr r1, [r0, 0x18] - ldrb r0, [r6] - lsls r0, 4 - adds r0, r2, r0 - adds r1, r0 - ldrh r1, [r1] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - add r0, r12 - ldr r1, [r5] - ldrb r0, [r0] - ldrb r1, [r1, 0x2] - cmp r0, r1 - beq _081330D8 -_081330D0: - adds r4, 0x2 - adds r3, 0x1 - cmp r3, 0x3 - ble _081330A8 -_081330D8: - cmp r3, 0x4 - bne _081330F8 -_081330DC: - ldr r0, [r5] - adds r0, 0x7 - str r0, [r5] - b _08133110 - .pool -_081330F8: - ldr r2, [r5] - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - orrs r1, r0 - str r1, [r5] -_08133110: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end tai41_unk - - thumb_func_start tai42_unk -tai42_unk: @ 8133118 - push {r4-r6,lr} - ldr r1, =gAIScriptPtr - ldr r0, [r1] - ldrb r0, [r0, 0x1] - adds r4, r1, 0 - cmp r0, 0x1 - beq _0813313C - cmp r0, 0x1 - bgt _08133134 - cmp r0, 0 - beq _08133188 - b _081331F4 - .pool -_08133134: - cmp r0, 0x2 - beq _08133188 - cmp r0, 0x3 - bne _081331F4 -_0813313C: - movs r3, 0 - ldr r1, =gBattleMons - ldr r0, =gUnknown_0203AB3C - ldrb r2, [r0] - ldr r6, =gBattleMoves - movs r0, 0x58 - muls r0, r2 - adds r1, 0xC - adds r2, r0, r1 - ldr r5, =gAIScriptPtr -_08133150: - ldrh r0, [r2] - cmp r0, 0 - beq _0813316A - adds r1, r0, 0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldr r1, [r5] - ldrb r0, [r0] - ldrb r1, [r1, 0x2] - cmp r0, r1 - beq _08133172 -_0813316A: - adds r2, 0x2 - adds r3, 0x1 - cmp r3, 0x3 - ble _08133150 -_08133172: - cmp r3, 0x4 - bne _081331C2 - b _081331DC - .pool -_08133188: - movs r3, 0 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r1, [r0, 0x18] - ldr r0, =gUnknown_0202420C - ldrb r0, [r0] - ldr r6, =gBattleMoves - lsls r0, 4 - adds r2, r0, r1 - ldr r5, =gAIScriptPtr -_0813319C: - ldrh r0, [r2] - cmp r0, 0 - beq _081331B6 - adds r1, r0, 0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldr r1, [r5] - ldrb r0, [r0] - ldrb r1, [r1, 0x2] - cmp r0, r1 - beq _081331BE -_081331B6: - adds r2, 0x2 - adds r3, 0x1 - cmp r3, 0x3 - ble _0813319C -_081331BE: - cmp r3, 0x4 - beq _081331DC -_081331C2: - ldr r0, [r4] - adds r0, 0x7 - str r0, [r4] - b _081331F4 - .pool -_081331DC: - ldr r2, [r4] - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] -_081331F4: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end tai42_unk - - thumb_func_start tai43_unk -tai43_unk: @ 81331FC - push {r4,r5,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r5, r0, 0 - cmp r1, 0x1 - bne _08133218 - ldr r0, =gUnknown_0203AB3C - b _0813321A - .pool -_08133218: - ldr r0, =gUnknown_0202420C -_0813321A: - ldrb r3, [r0] - adds r4, r5, 0 - ldr r2, [r4] - ldrb r0, [r2, 0x2] - cmp r0, 0 - bne _08133240 - ldr r0, =gUnknown_020242BC - lsls r1, r3, 3 - subs r1, r3 - lsls r1, 2 - adds r1, r0 - ldrh r0, [r1, 0x4] - cmp r0, 0 - beq _08133244 - b _0813325A - .pool -_08133240: - cmp r0, 0x1 - beq _0813324A -_08133244: - adds r0, r2, 0x7 - str r0, [r4] - b _0813327C -_0813324A: - ldr r0, =gUnknown_020242BC - lsls r1, r3, 3 - subs r1, r3 - lsls r1, 2 - adds r1, r0 - ldrh r0, [r1, 0x6] - cmp r0, 0 - beq _08133278 -_0813325A: - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _0813327C - .pool -_08133278: - adds r0, r2, 0x7 - str r0, [r5] -_0813327C: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end tai43_unk - - thumb_func_start tai44_unk -tai44_unk: @ 8133284 - push {r4,lr} - ldr r4, =gAIScriptPtr - ldr r3, [r4] - ldrb r0, [r3, 0x1] - cmp r0, 0 - beq _0813329C - cmp r0, 0x1 - beq _081332C8 - b _08133308 - .pool -_0813329C: - ldr r2, =gUnknown_020242BC - ldr r0, =gUnknown_02024064 - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldr r1, =gUnknown_020244A8 - ldr r1, [r1] - ldr r1, [r1, 0x14] - ldrh r0, [r0, 0x4] - ldrh r1, [r1, 0x2] - cmp r0, r1 - beq _081332E4 - b _08133308 - .pool -_081332C8: - ldr r2, =gUnknown_020242BC - ldr r0, =gUnknown_02024064 - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldr r1, =gUnknown_020244A8 - ldr r1, [r1] - ldr r1, [r1, 0x14] - ldrh r0, [r0, 0x6] - ldrh r1, [r1, 0x2] - cmp r0, r1 - bne _08133308 -_081332E4: - 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 _0813330C - .pool -_08133308: - adds r0, r3, 0x6 - str r0, [r4] -_0813330C: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai44_unk - - thumb_func_start tai45_unk -tai45_unk: @ 8133314 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldrb r1, [r2, 0x10] - movs r0, 0xB - orrs r0, r1 - strb r0, [r2, 0x10] - bx lr - .pool - thumb_func_end tai45_unk - - thumb_func_start tai46_unk -tai46_unk: @ 8133328 - push {r4,lr} - ldr r0, =gUnknown_0202449C - ldr r0, [r0] - adds r0, 0x7B - ldrb r0, [r0] - lsls r4, r0, 2 - adds r4, r0 - lsls r4, 24 - lsrs r4, 24 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 24 - lsrs r0, 24 - cmp r0, r4 - bcs _08133374 - 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 _0813337C - .pool -_08133374: - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_0813337C: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end tai46_unk - - thumb_func_start dp15_end_with_move_5 -dp15_end_with_move_5: @ 8133388 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldrb r1, [r2, 0x10] - movs r0, 0xD - orrs r0, r1 - strb r0, [r2, 0x10] - bx lr - .pool - thumb_func_end dp15_end_with_move_5 - - thumb_func_start dp15_get_held_item_x12__8 -dp15_get_held_item_x12__8: @ 813339C - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - bne _081333B4 - ldr r0, =gUnknown_0203AB3C - b _081333B6 - .pool -_081333B4: - ldr r0, =gUnknown_0202420C -_081333B6: - ldrb r2, [r0] - ldr r0, =gUnknown_02024064 - ldrb r0, [r0] - cmp r0, r2 - beq _081333E0 - ldr r4, =gUnknown_020244A8 - ldr r0, [r4] - ldr r0, [r0, 0x18] - adds r0, 0x44 - adds r0, r2 - ldrb r0, [r0] - bl itemid_get_x12 - ldr r1, [r4] - b _081333F2 - .pool -_081333E0: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x2E] - bl itemid_get_x12 - ldr r1, =gUnknown_020244A8 - ldr r1, [r1] -_081333F2: - ldr r1, [r1, 0x14] - lsls r0, 24 - lsrs r0, 24 - str r0, [r1, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end dp15_get_held_item_x12__8 - - thumb_func_start tai62_unk -tai62_unk: @ 8133414 - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl sub_8131E70 - lsls r0, 24 - lsrs r3, r0, 24 - movs r0, 0x1 - ldr r1, =gUnknown_0203AB3C - ldrb r2, [r1] - adds r1, r3, 0 - ands r1, r0 - ands r0, r2 - cmp r1, r0 - bne _0813344C - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r3 - adds r0, r1 - ldrh r3, [r0, 0x2E] - b _08133458 - .pool -_0813344C: - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r0, [r0, 0x18] - adds r0, 0x44 - adds r0, r3 - ldrb r3, [r0] -_08133458: - ldr r4, =gAIScriptPtr - ldr r2, [r4] - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - orrs r0, r1 - cmp r0, r3 - bne _08133488 - ldrb r1, [r2, 0x4] - ldrb r0, [r2, 0x5] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _0813348E - .pool -_08133488: - adds r0, r2, 0 - adds r0, 0x8 - str r0, [r4] -_0813348E: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai62_unk - - thumb_func_start tai49_unk -tai49_unk: @ 8133494 - push {lr} - ldr r0, =gAIScriptPtr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - bne _081334AC - ldr r0, =gUnknown_0203AB3C - b _081334AE - .pool -_081334AC: - ldr r0, =gUnknown_0202420C -_081334AE: - ldrb r1, [r0] - ldr r2, =gBattleMons - movs r0, 0x58 - muls r1, r0 - adds r0, r1, r2 - ldrh r0, [r0] - adds r2, 0x48 - adds r1, r2 - ldr r1, [r1] - bl pokemon_species_get_gender_info - ldr r1, =gUnknown_020244A8 - ldr r1, [r1] - ldr r1, [r1, 0x14] - lsls r0, 24 - lsrs r0, 24 - str r0, [r1, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end tai49_unk - - thumb_func_start dp15_enter_battle_countdown_get_state -dp15_enter_battle_countdown_get_state: @ 81334EC - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _08133508 - ldr r0, =gUnknown_0203AB3C - b _0813350A - .pool -_08133508: - ldr r0, =gUnknown_0202420C -_0813350A: - ldrb r3, [r0] - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldr r1, =gUnknown_020242BC - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0x16] - str r0, [r2, 0x8] - ldr r0, [r4] - adds r0, 0x2 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end dp15_enter_battle_countdown_get_state - - thumb_func_start dp15_stockpile_get_num_uses -dp15_stockpile_get_num_uses: @ 8133538 - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _08133554 - ldr r0, =gUnknown_0203AB3C - b _08133556 - .pool -_08133554: - ldr r0, =gUnknown_0202420C -_08133556: - ldrb r3, [r0] - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldr r1, =gUnknown_020242BC - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0x9] - str r0, [r2, 0x8] - ldr r0, [r4] - adds r0, 0x2 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end dp15_stockpile_get_num_uses - - thumb_func_start dp15_is_double_battle -dp15_is_double_battle: @ 8133584 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - str r0, [r2, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end dp15_is_double_battle - - thumb_func_start dp15_get_dp08_item__8 -dp15_get_dp08_item__8: @ 81335AC - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _081335C8 - ldr r0, =gUnknown_0203AB3C - b _081335CA - .pool -_081335C8: - ldr r0, =gUnknown_0202420C -_081335CA: - ldrb r3, [r0] - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldr r0, =gUnknown_0202449C - ldr r1, [r0] - lsls r0, r3, 1 - adds r0, r1 - adds r0, 0xB8 - ldrb r0, [r0] - str r0, [r2, 0x8] - ldr r0, [r4] - adds r0, 0x2 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end dp15_get_dp08_item__8 - - thumb_func_start dp15_move_get_type__8 -dp15_move_get_type__8: @ 81335F8 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r3, [r0, 0x14] - ldr r2, =gBattleMoves - ldr r1, [r3, 0x8] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x2] - str r0, [r3, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end dp15_move_get_type__8 - - thumb_func_start dp15_move_get_power__8_8 -dp15_move_get_power__8_8: @ 8133624 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r3, [r0, 0x14] - ldr r2, =gBattleMoves - ldr r1, [r3, 0x8] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - str r0, [r3, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end dp15_move_get_power__8_8 - - thumb_func_start dp15_move_get_move_script_id__8 -dp15_move_get_move_script_id__8: @ 8133650 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r3, [r0, 0x14] - ldr r2, =gBattleMoves - ldr r1, [r3, 0x8] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - str r0, [r3, 0x8] - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end dp15_move_get_move_script_id__8 - - thumb_func_start dp15_get_protect_endure_activity -dp15_get_protect_endure_activity: @ 813367C - push {r4,lr} - ldr r0, =gAIScriptPtr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0x1 - bne _08133698 - ldr r0, =gUnknown_0203AB3C - b _0813369A - .pool -_08133698: - ldr r0, =gUnknown_0202420C -_0813369A: - ldrb r3, [r0] - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldr r1, =gUnknown_020242BC - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0x8] - str r0, [r2, 0x8] - ldr r0, [r4] - adds r0, 0x2 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end dp15_get_protect_endure_activity - - thumb_func_start nullsub_106 -nullsub_106: @ 81336C8 - bx lr - thumb_func_end nullsub_106 - - thumb_func_start nullsub_107 -nullsub_107: @ 81336CC - bx lr - thumb_func_end nullsub_107 - - thumb_func_start nullsub_108 -nullsub_108: @ 81336D0 - bx lr - thumb_func_end nullsub_108 - - thumb_func_start nullsub_109 -nullsub_109: @ 81336D4 - bx lr - thumb_func_end nullsub_109 - - thumb_func_start nullsub_110 -nullsub_110: @ 81336D8 - bx lr - thumb_func_end nullsub_110 - - thumb_func_start nullsub_111 -nullsub_111: @ 81336DC - bx lr - thumb_func_end nullsub_111 - - thumb_func_start tai58_unk -tai58_unk: @ 81336E0 - push {r4,lr} - ldr r4, =gAIScriptPtr - ldr r0, [r4] - adds r0, 0x5 - bl b_mc_stack_push - 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 tai58_unk - - thumb_func_start dp15_jump -dp15_jump: @ 8133710 - 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 dp15_jump - - thumb_func_start dp15_return -dp15_return: @ 8133730 - push {lr} - bl b_mc_stack_pop_cursor - lsls r0, 24 - cmp r0, 0 - bne _0813374A - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x14] - ldrb r1, [r2, 0x10] - movs r0, 0x1 - orrs r0, r1 - strb r0, [r2, 0x10] -_0813374A: - pop {r0} - bx r0 - .pool - thumb_func_end dp15_return - - thumb_func_start dp15_compare_attacker_defender_levels -dp15_compare_attacker_defender_levels: @ 8133754 - push {r4,r5,lr} - ldr r5, =gAIScriptPtr - ldr r4, [r5] - ldrb r0, [r4, 0x1] - cmp r0, 0x1 - beq _081337A8 - cmp r0, 0x1 - bgt _08133770 - cmp r0, 0 - beq _08133776 - b _08133824 - .pool -_08133770: - cmp r0, 0x2 - beq _081337D8 - b _08133824 -_08133776: - ldr r3, =gBattleMons - ldr r0, =gUnknown_0203AB3C - ldrb r0, [r0] - movs r2, 0x58 - adds r1, r0, 0 - muls r1, r2 - adds r1, r3 - adds r1, 0x2A - ldr r0, =gUnknown_0202420C - ldrb r0, [r0] - muls r0, r2 - adds r0, r3 - adds r0, 0x2A - ldrb r1, [r1] - ldrb r0, [r0] - cmp r1, r0 - bhi _081337FA - b _08133820 - .pool -_081337A8: - ldr r3, =gBattleMons - ldr r0, =gUnknown_0203AB3C - ldrb r0, [r0] - movs r2, 0x58 - adds r1, r0, 0 - muls r1, r2 - adds r1, r3 - adds r1, 0x2A - ldr r0, =gUnknown_0202420C - ldrb r0, [r0] - muls r0, r2 - adds r0, r3 - adds r0, 0x2A - ldrb r1, [r1] - ldrb r0, [r0] - cmp r1, r0 - bcc _081337FA - b _08133820 - .pool -_081337D8: - ldr r3, =gBattleMons - ldr r0, =gUnknown_0203AB3C - ldrb r0, [r0] - movs r2, 0x58 - adds r1, r0, 0 - muls r1, r2 - adds r1, r3 - adds r1, 0x2A - ldr r0, =gUnknown_0202420C - ldrb r0, [r0] - muls r0, r2 - adds r0, r3 - adds r0, 0x2A - ldrb r1, [r1] - ldrb r0, [r0] - cmp r1, r0 - bne _08133820 -_081337FA: - ldrb r1, [r4, 0x2] - ldrb r0, [r4, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r4, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r4, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r5] - b _08133824 - .pool -_08133820: - adds r0, r4, 0x6 - str r0, [r5] -_08133824: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end dp15_compare_attacker_defender_levels - - thumb_func_start tai5C_unk -tai5C_unk: @ 813382C - push {lr} - ldr r2, =gUnknown_020242BC - ldr r0, =gUnknown_0202420C - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x13] - lsls r0, 28 - cmp r0, 0 - beq _0813386C - 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 _08133874 - .pool -_0813386C: - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_08133874: - pop {r0} - bx r0 - .pool - thumb_func_end tai5C_unk - - thumb_func_start tai5D_unk -tai5D_unk: @ 813387C - push {lr} - ldr r2, =gUnknown_020242BC - ldr r0, =gUnknown_0202420C - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x13] - lsls r0, 28 - cmp r0, 0 - bne _081338BC - 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 _081338C4 - .pool -_081338BC: - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_081338C4: - pop {r0} - bx r0 - .pool - thumb_func_end tai5D_unk - - thumb_func_start tai5E_unk -tai5E_unk: @ 81338CC - push {lr} - ldr r0, =gUnknown_0203AB3C - ldrb r3, [r0] - movs r0, 0x1 - ldr r1, =gUnknown_0202420C - ldrb r2, [r1] - adds r1, r0, 0 - ands r1, r3 - ands r0, r2 - cmp r1, r0 - bne _0813390C - 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 _08133914 - .pool -_0813390C: - ldr r1, =gAIScriptPtr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_08133914: - pop {r0} - bx r0 - .pool - thumb_func_end tai5E_unk - - thumb_func_start tai61_unk -tai61_unk: @ 813391C - push {r4,lr} - ldr r4, =gAIScriptPtr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl sub_8131E70 - lsls r0, 24 - ldr r1, =gUnknown_020244A8 - ldr r1, [r1] - ldr r1, [r1, 0x4] - lsrs r0, 22 - adds r1, r0 - ldr r0, [r1] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08133960 - ldr r2, [r4] - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08133966 - .pool -_08133960: - ldr r0, [r4] - adds r0, 0x6 - str r0, [r4] -_08133966: - pop {r4} - pop {r0} - bx r0 - thumb_func_end tai61_unk - - thumb_func_start b_mc_stack_push -b_mc_stack_push: @ 813396C - push {r4,lr} - ldr r1, =gUnknown_020244A8 - ldr r1, [r1] - ldr r3, [r1, 0x1C] - adds r4, r3, 0 - adds r4, 0x20 - ldrb r1, [r4] - adds r2, r1, 0x1 - strb r2, [r4] - lsls r1, 24 - lsrs r1, 22 - adds r3, r1 - str r0, [r3] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end b_mc_stack_push - - thumb_func_start b_mc_stack_push_cursor -b_mc_stack_push_cursor: @ 8133990 - ldr r0, =gUnknown_020244A8 - ldr r0, [r0] - ldr r2, [r0, 0x1C] - adds r3, r2, 0 - adds r3, 0x20 - ldrb r0, [r3] - adds r1, r0, 0x1 - strb r1, [r3] - lsls r0, 24 - lsrs r0, 22 - adds r2, r0 - ldr r0, =gAIScriptPtr - ldr r0, [r0] - str r0, [r2] - bx lr - .pool - thumb_func_end b_mc_stack_push_cursor - - thumb_func_start b_mc_stack_pop_cursor -b_mc_stack_pop_cursor: @ 81339B8 - push {lr} - ldr r3, =gUnknown_020244A8 - ldr r0, [r3] - ldr r0, [r0, 0x1C] - adds r1, r0, 0 - adds r1, 0x20 - ldrb r0, [r1] - cmp r0, 0 - bne _081339D4 - movs r0, 0 - b _081339EE - .pool -_081339D4: - subs r0, 0x1 - strb r0, [r1] - ldr r2, =gAIScriptPtr - ldr r0, [r3] - ldr r1, [r0, 0x1C] - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - lsls r0, 2 - adds r1, r0 - ldr r0, [r1] - str r0, [r2] - movs r0, 0x1 -_081339EE: - pop {r1} - bx r1 - .pool - thumb_func_end b_mc_stack_pop_cursor - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/battle_anim.s b/asm/battle_anim.s index e9333c6e5..18e09542a 100644 --- a/asm/battle_anim.s +++ b/asm/battle_anim.s @@ -97,7 +97,7 @@ move_anim_start_t1: @ 80A3A10 ldrb r0, [r0] strb r0, [r2] ldr r2, =gUnknown_02038437 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] strb r0, [r2] ldr r0, =gUnknown_082C8D6C @@ -146,17 +146,17 @@ _080A3A84: beq _080A3AA8 ldrh r0, [r6] muls r0, r7 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _080A3AAE .pool _080A3AA8: ldrh r0, [r6] muls r0, r7 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _080A3AAE: adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData strh r0, [r5] adds r6, 0x2 adds r5, 0x2 diff --git a/asm/battle_anim_80FE840.s b/asm/battle_anim_80FE840.s index 47a689afa..9c39cbd0f 100644 --- a/asm/battle_anim_80FE840.s +++ b/asm/battle_anim_80FE840.s @@ -19291,7 +19291,7 @@ sub_8108384: @ 8108384 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _081083C8 .pool _081083B4: @@ -19305,17 +19305,17 @@ _081083B8: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _081083C8: adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r3, r0, 16 lsrs r4, 18 @@ -43263,7 +43263,7 @@ _08114614: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _08114650 .pool _08114640: @@ -43274,11 +43274,11 @@ _08114640: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _08114650: adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 _0811465C: @@ -47933,7 +47933,7 @@ _08116C64: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _08116CA0 .pool _08116C90: @@ -47944,11 +47944,11 @@ _08116C90: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _08116CA0: adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 _08116CAC: @@ -48370,7 +48370,7 @@ _08117078: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _081170BA .pool _081170A8: @@ -48382,11 +48382,11 @@ _081170A8: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _081170BA: adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldr r1, [r4] _081170C4: strh r0, [r1, 0x14] @@ -49429,7 +49429,7 @@ _08117964: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _08117996 .pool _08117988: @@ -49439,11 +49439,11 @@ _08117988: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _08117996: adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 _081179A2: @@ -50053,7 +50053,7 @@ sub_8117E94: @ 8117E94 lsls r0, 24 lsrs r0, 24 ldr r2, =gUnknown_02038436 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r1, [r1] strb r1, [r2] ldr r2, =gUnknown_02038437 @@ -50105,7 +50105,7 @@ sub_8117F10: @ 8117F10 lsls r0, 24 lsrs r0, 24 ldr r2, =gUnknown_02038437 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r1, [r1] strb r1, [r2] bl move_anim_task_del diff --git a/asm/battle_anim_8170478.s b/asm/battle_anim_8170478.s index 57d945cc3..4b170be29 100644 --- a/asm/battle_anim_8170478.s +++ b/asm/battle_anim_8170478.s @@ -868,7 +868,7 @@ sub_8170BB0: @ 8170BB0 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty b _08170C08 .pool _08170BF8: @@ -879,11 +879,11 @@ _08170BF8: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty _08170C08: adds r0, r1 movs r1, 0x26 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl ball_number_to_ball_processing_index @@ -5101,11 +5101,11 @@ sub_8172EF0: @ 8172EF0 strb r1, [r0] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 adds r0, r6, 0 bl b_side_obj__get_some_boolean diff --git a/asm/battle_message.s b/asm/battle_message.s index 40930505d..eb6ebb784 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -932,11 +932,11 @@ _0814E92C: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, sp bl StringGetEnd10 bl _0814F5BE @@ -951,11 +951,11 @@ _0814E960: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, sp bl StringGetEnd10 bl _0814F5BE @@ -970,11 +970,11 @@ _0814E994: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, sp bl StringGetEnd10 bl _0814F5BE @@ -989,11 +989,11 @@ _0814E9C8: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, sp bl StringGetEnd10 bl _0814F5BE @@ -1011,11 +1011,11 @@ _0814E9FC: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, sp bl StringGetEnd10 bl _0814F5BE @@ -1035,11 +1035,11 @@ _0814EA38: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, sp bl StringGetEnd10 bl _0814F5BE @@ -1059,11 +1059,11 @@ _0814EA78: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, sp bl StringGetEnd10 bl _0814F5BE @@ -1083,11 +1083,11 @@ _0814EAB8: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, sp bl StringGetEnd10 bl _0814F5BE @@ -1134,11 +1134,11 @@ _0814EB36: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData b _0814EB9E .pool _0814EB74: @@ -1155,11 +1155,11 @@ _0814EB74: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData _0814EB9E: mov r0, sp bl StringGetEnd10 @@ -1186,11 +1186,11 @@ _0814EBB0: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData b _0814EC24 .pool _0814EBF8: @@ -1208,11 +1208,11 @@ _0814EBF8: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData _0814EC24: mov r0, sp bl StringGetEnd10 @@ -1237,7 +1237,7 @@ _0814EC56: ldrb r1, [r4] adds r0, r1, 0 ldr r3, =gUnknown_0202406E - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r12, r2 adds r2, r5, 0 cmp r0, 0xFF @@ -1262,7 +1262,7 @@ _0814EC78: add r0, r12 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData b _0814ECC2 .pool _0814ECA8: @@ -1273,18 +1273,18 @@ _0814ECA8: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData _0814ECC2: mov r0, sp bl StringGetEnd10 bl _0814F5BE .pool _0814ECD4: - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] bl battle_side_get_owner lsls r0, 24 @@ -1302,7 +1302,7 @@ _0814ECF2: ldrb r1, [r4] adds r0, r1, 0 ldr r3, =gUnknown_0202406E - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r12, r2 adds r2, r5, 0 cmp r0, 0xFF @@ -1327,7 +1327,7 @@ _0814ED14: add r0, r12 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData b _0814ED5E .pool _0814ED44: @@ -1338,11 +1338,11 @@ _0814ED44: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData _0814ED5E: mov r0, sp bl StringGetEnd10 @@ -1367,7 +1367,7 @@ _0814ED8E: ldrb r1, [r4] adds r0, r1, 0 ldr r3, =gUnknown_0202406E - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r12, r2 adds r2, r5, 0 cmp r0, 0xFF @@ -1392,7 +1392,7 @@ _0814EDB0: add r0, r12 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData b _0814EDFA .pool _0814EDE0: @@ -1403,11 +1403,11 @@ _0814EDE0: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData _0814EDFA: mov r0, sp bl StringGetEnd10 @@ -1432,7 +1432,7 @@ _0814EE2A: ldrb r1, [r4] adds r0, r1, 0 ldr r3, =gUnknown_0202406E - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r12, r2 adds r2, r5, 0 cmp r0, 0xFF @@ -1457,7 +1457,7 @@ _0814EE4C: add r0, r12 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData b _0814EE96 .pool _0814EE7C: @@ -1468,11 +1468,11 @@ _0814EE7C: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData _0814EE96: mov r0, sp bl StringGetEnd10 @@ -1497,7 +1497,7 @@ _0814EEC6: ldrb r1, [r4] adds r0, r1, 0 ldr r3, =gUnknown_0202406E - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r12, r2 adds r2, r5, 0 cmp r0, 0xFF @@ -1522,7 +1522,7 @@ _0814EEE8: add r0, r12 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData b _0814EF32 .pool _0814EF18: @@ -1533,11 +1533,11 @@ _0814EF18: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData _0814EF32: mov r0, sp bl StringGetEnd10 @@ -1684,7 +1684,7 @@ _0814F088: .pool _0814F098: ldr r1, =gUnknown_0203ABA4 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex b _0814F0BC .pool _0814F0A8: @@ -2003,7 +2003,7 @@ _0814F330: _0814F34E: ldrb r1, [r4] adds r0, r1, 0 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty mov r12, r5 ldr r2, =gUnknown_0202449C cmp r0, 0xFF @@ -2027,7 +2027,7 @@ _0814F36E: add r0, r12 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData b _0814F3B4 .pool _0814F39C: @@ -2037,11 +2037,11 @@ _0814F39C: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData _0814F3B4: mov r0, sp bl StringGetEnd10 @@ -2064,7 +2064,7 @@ _0814F3E4: b _0814F3EE .pool _0814F3EC: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex _0814F3EE: ldrb r0, [r0] bl battle_side_get_owner @@ -2082,7 +2082,7 @@ _0814F410: b _0814F41A .pool _0814F418: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex _0814F41A: ldrb r0, [r0] bl battle_side_get_owner @@ -2100,7 +2100,7 @@ _0814F43C: b _0814F446 .pool _0814F444: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex _0814F446: ldrb r0, [r0] bl battle_side_get_owner @@ -2471,11 +2471,11 @@ _0814F744: ldrb r1, [r4, 0x2] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData b _0814F7A4 .pool _0814F768: @@ -2499,11 +2499,11 @@ _0814F790: ldrb r1, [r0, 0x2] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData _0814F7A4: mov r0, sp bl StringGetEnd10 @@ -2540,22 +2540,22 @@ _0814F7E2: ldrb r1, [r4, 0x2] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 adds r2, r6, 0 - bl pokemon_getattr + bl GetMonData b _0814F81A .pool _0814F808: ldrb r1, [r4, 0x2] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2 adds r2, r6, 0 - bl pokemon_getattr + bl GetMonData _0814F81A: adds r0, r6, 0 bl StringGetEnd10 diff --git a/asm/battle_setup.s b/asm/battle_setup.s index 3002f1342..ddf8f6f90 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -278,7 +278,7 @@ _080B0856: thumb_func_start sub_80B086C sub_80B086C: @ 80B086C push {lr} - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r1, 0xC4 lsls r1, 1 movs r2, 0x5 @@ -363,10 +363,10 @@ sub_80B0934: @ 80B0934 movs r0, 0x80 lsls r0, 6 str r0, [r4] - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 movs r0, 0xCA lsls r0, 1 @@ -502,9 +502,9 @@ sub_80B0A74: @ 80B0A74 movs r0, 0xC0 lsls r0, 7 str r0, [r1] - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 adds r2, r1, 0 @@ -862,11 +862,11 @@ _080B0D92: movs r0, 0x64 adds r1, r6, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 movs r0, 0xCE lsls r0, 1 @@ -876,12 +876,12 @@ _080B0D92: beq _080B0DD6 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080B0DD6 adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r0, r7, r0 lsls r0, 24 lsrs r7, r0, 24 @@ -1034,9 +1034,9 @@ sub_80B0EC8: @ 80B0EC8 lsls r0, 24 lsrs r5, r0, 24 adds r6, r5, 0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -1195,9 +1195,9 @@ _080B1000: sub_80B100C: @ 80B100C push {r4,r5,lr} adds r5, r0, 0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 diff --git a/asm/big_shroomish_barboach.s b/asm/big_shroomish_barboach.s index 015bb8529..f3bc3cf8a 100644 --- a/asm/big_shroomish_barboach.s +++ b/asm/big_shroomish_barboach.s @@ -15,45 +15,45 @@ sub_80F97C8: @ 80F97C8 sub sp, 0x8 adds r5, r0, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 str r0, [sp, 0x4] lsrs r0, 16 str r0, [sp] adds r0, r5, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData adds r7, r0, 0 movs r6, 0xF ands r7, r6 adds r0, r5, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData mov r8, r0 mov r1, r8 ands r1, r6 mov r8, r1 adds r0, r5, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData mov r9, r0 mov r3, r9 ands r3, r6 mov r9, r3 adds r0, r5, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData mov r10, r0 ands r0, r6 mov r10, r0 adds r0, r5, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 ands r4, r6 adds r0, r5, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 ands r2, r6 mov r1, r8 @@ -236,16 +236,16 @@ _080F99A0: ldrh r1, [r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 beq _080F99C2 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, r6 beq _080F99CC _080F99C2: @@ -449,16 +449,16 @@ _080F9B6A: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080F9B9C adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080F9B9C mov r1, sp diff --git a/asm/braille_puzzles.s b/asm/braille_puzzles.s index 4a49f3308..c83572471 100644 --- a/asm/braille_puzzles.s +++ b/asm/braille_puzzles.s @@ -82,11 +82,11 @@ sub_817963C: @ 817963C thumb_func_start sub_81796AC sub_81796AC: @ 81796AC push {r4,lr} - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0x9D lsls r1, 1 cmp r0, r1 @@ -101,7 +101,7 @@ sub_81796AC: @ 81796AC adds r0, r1 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =0x0000017d cmp r0, r1 bne _081796F4 diff --git a/asm/cable_club.s b/asm/cable_club.s index 079f51cb7..cde4bf865 100644 --- a/asm/cable_club.s +++ b/asm/cable_club.s @@ -755,7 +755,7 @@ _080B2994: adds r0, r5 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r4, 0 adds r1, 0x54 strh r0, [r1] @@ -765,7 +765,7 @@ _080B2994: adds r0, r5 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, 0x56 strh r0, [r4] ldr r0, =sub_80B2C30 @@ -845,7 +845,7 @@ _080B2A6C: adds r0, r5 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r4, 0 adds r1, 0x54 strh r0, [r1] @@ -855,7 +855,7 @@ _080B2A6C: adds r0, r5 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, 0x56 strh r0, [r4] ldr r1, =gTasks diff --git a/asm/calculate_base_damage.s b/asm/calculate_base_damage.s index 47813bbd0..379a8c46a 100644 --- a/asm/calculate_base_damage.s +++ b/asm/calculate_base_damage.s @@ -621,7 +621,7 @@ _08069A58: bls _08069A60 b _08069BC2 _08069A60: - ldr r0, =gUnknown_02024211 + ldr r0, =gCritMultiplier ldrb r1, [r0] adds r4, r0, 0 cmp r1, 0x2 @@ -789,7 +789,7 @@ _08069BCA: bhi _08069BD2 b _08069DD4 _08069BD2: - ldr r0, =gUnknown_02024211 + ldr r0, =gCritMultiplier ldrb r1, [r0] adds r4, r0, 0 cmp r1, 0x2 @@ -947,7 +947,7 @@ _08069CFC: lsls r0, 24 cmp r0, 0 bne _08069DAC - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather ldrh r1, [r2] movs r0, 0x1 ands r0, r1 diff --git a/asm/contest.s b/asm/contest.s index def1a558e..c96773e1b 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -1060,7 +1060,7 @@ _080D8004: str r4, [r0] ldr r4, =gUnknown_0202420B strb r2, [r4] - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex strb r3, [r0] bl sub_80DB0C4 ldr r2, =gUnknown_020241E4 @@ -5706,11 +5706,11 @@ _080DA930: movs r0, 0x64 mov r1, r8 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 @@ -5718,7 +5718,7 @@ _080DA930: adds r0, r5, 0 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, sp bl StringGetEnd10 ldr r0, =gUnknown_02039F2A @@ -5729,7 +5729,7 @@ _080DA930: beq _080DA994 adds r0, r5, 0 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 mov r0, sp bl sub_80DF9E0 @@ -5748,7 +5748,7 @@ _080DA994: bl StringCopy adds r0, r5, 0 movs r1, 0x16 - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 @@ -5756,7 +5756,7 @@ _080DA994: strb r0, [r1] adds r0, r5, 0 movs r1, 0x17 - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 @@ -5764,7 +5764,7 @@ _080DA994: strb r0, [r1] adds r0, r5, 0 movs r1, 0x18 - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 @@ -5772,7 +5772,7 @@ _080DA994: strb r0, [r1] adds r0, r5, 0 movs r1, 0x21 - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 @@ -5780,7 +5780,7 @@ _080DA994: strb r0, [r1] adds r0, r5, 0 movs r1, 0x2F - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 @@ -5788,7 +5788,7 @@ _080DA994: strb r0, [r1] adds r0, r5, 0 movs r1, 0x30 - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 @@ -5796,35 +5796,35 @@ _080DA994: strb r0, [r1] adds r0, r5, 0 movs r1, 0xD - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 strh r0, [r1, 0x1E] adds r0, r5, 0 movs r1, 0xE - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 strh r0, [r1, 0x20] adds r0, r5, 0 movs r1, 0xF - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 strh r0, [r1, 0x22] adds r0, r5, 0 movs r1, 0x10 - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r1, r7 strh r0, [r1, 0x24] adds r0, r5, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r2, r7, 0 @@ -5833,7 +5833,7 @@ _080DA994: str r0, [r1] adds r0, r5, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 6 adds r2, r7, 0 @@ -5842,7 +5842,7 @@ _080DA994: str r0, [r1] adds r0, r5, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r2, r0, 16 ldrb r0, [r6] @@ -6299,7 +6299,7 @@ sub_80DAE0C: @ 80DAE0C push {r4,lr} adds r4, r0, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080DAE1E movs r0, 0x3 @@ -6307,7 +6307,7 @@ sub_80DAE0C: @ 80DAE0C _080DAE1E: adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080DAE2E movs r0, 0x4 @@ -6350,7 +6350,7 @@ _080DAE74: adds r0, r4, 0 movs r1, 0x36 _080DAE78: - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r1, r0, 24 b _080DAE86 @@ -13798,7 +13798,7 @@ sub_80DEA20: @ 80DEA20 bl CreateInvisibleSpriteWithCallback ldr r1, =gUnknown_020241E4 strb r0, [r1, 0x3] - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] adds r0, r1 ldrb r1, [r0] @@ -13905,12 +13905,12 @@ _080DEAD0: .4byte _080DEB60 .4byte _080DEB60 _080DEB54: - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex movs r0, 0x2 b _080DEB64 .pool _080DEB60: - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex movs r0, 0x3 _080DEB64: strb r0, [r1] diff --git a/asm/contest_link_80F57C4.s b/asm/contest_link_80F57C4.s index 88bf2364b..96178ed43 100644 --- a/asm/contest_link_80F57C4.s +++ b/asm/contest_link_80F57C4.s @@ -4632,7 +4632,7 @@ sub_80F7F30: @ 80F7F30 ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_80DAE0C lsls r0, 24 @@ -4664,7 +4664,7 @@ sub_80F7F7C: @ 80F7F7C ldrb r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r2, r1, r0 ldr r0, =gUnknown_02039F2C ldrh r0, [r0] @@ -4703,7 +4703,7 @@ _080F7FDC: adds r0, r2, 0 movs r1, 0x36 _080F7FE0: - bl pokemon_getattr + bl GetMonData ldr r1, =gUnknown_02039F2E ldrh r1, [r1] cmp r0, r1 @@ -4754,10 +4754,10 @@ _080F8048: ldrb r0, [r6] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x32 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r1, r0, 24 mov r0, sp @@ -4805,10 +4805,10 @@ _080F80B8: ldrb r0, [r7] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0x33 - bl pokemon_getattr + bl GetMonData strb r0, [r4] mov r0, sp ldrb r2, [r0] @@ -4854,10 +4854,10 @@ _080F8124: ldrb r0, [r7] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0x34 - bl pokemon_getattr + bl GetMonData strb r0, [r4] mov r0, sp ldrb r2, [r0] @@ -4901,10 +4901,10 @@ _080F8190: ldrb r0, [r7] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0x35 - bl pokemon_getattr + bl GetMonData strb r0, [r4] mov r0, sp ldrb r2, [r0] @@ -4944,10 +4944,10 @@ _080F81F8: ldrb r0, [r7] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0x36 - bl pokemon_getattr + bl GetMonData strb r0, [r4] mov r0, sp ldrb r2, [r0] diff --git a/asm/daycare.s b/asm/daycare.s index b3cd33184..05a8370f2 100644 --- a/asm/daycare.s +++ b/asm/daycare.s @@ -12,7 +12,7 @@ pokemon_get_nick: @ 806FA2C adds r4, r1, 0 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 mov r1, sp bl StringCopy10 @@ -190,7 +190,7 @@ sub_806FB38: @ 806FB38 strb r0, [r4] adds r0, r6, 0 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData lsls r0, 4 ldrb r2, [r4] movs r1, 0xF @@ -199,7 +199,7 @@ sub_806FB38: @ 806FB38 strb r1, [r4] adds r0, r6, 0 movs r1, 0x40 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 ldr r1, =gSaveBlock1Ptr @@ -270,7 +270,7 @@ daycare_send_selected_pokemon: @ 806FC18 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gSaveBlock1Ptr ldr r1, [r1] @@ -387,12 +387,12 @@ sub_806FCF8: @ 806FCF8 bl sub_8069004 mov r0, sp movs r1, 0x38 - bl pokemon_getattr + bl GetMonData cmp r0, 0x64 beq _0806FD46 mov r0, sp movs r1, 0x19 - bl pokemon_getattr + bl GetMonData adds r1, r5, 0 adds r1, 0x88 ldr r1, [r1] @@ -405,7 +405,7 @@ sub_806FCF8: @ 806FCF8 mov r0, sp bl sub_806FCA4 _0806FD46: - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty movs r1, 0xFA lsls r1, 1 adds r6, r0, r1 @@ -1245,7 +1245,7 @@ pokemon_get_eggmoves: @ 80703C8 movs r6, 0 movs r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r3, r0, 16 movs r2, 0 @@ -1376,7 +1376,7 @@ _080704C4: bls _080704C4 adds r0, r7, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 ldr r1, =gUnknown_020249C4 @@ -1920,7 +1920,7 @@ _08070918: mov r0, sp movs r1, 0x2D bl pokemon_setattr - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty movs r1, 0xFA lsls r1, 1 adds r0, r1 @@ -2183,21 +2183,21 @@ _08070B34: ldrb r0, [r0] cmp r5, r0 bcs _08070BC0 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty _08070B5C: adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08070BB4 adds r0, r4, 0 movs r1, 0x4 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _08070BB4 adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 str r1, [sp] cmp r0, 0 @@ -2314,7 +2314,7 @@ sub_8070C58: @ 8070C58 lsrs r0, 24 movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 ldr r1, =gStringVar1 bl pokemon_get_nick_ diff --git a/asm/egg_hatch.s b/asm/egg_hatch.s index c41fcdcc5..81fa2fde2 100644 --- a/asm/egg_hatch.s +++ b/asm/egg_hatch.s @@ -16,7 +16,7 @@ sub_8071348: @ 8071348 adds r5, r0, 0 adds r6, r1, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x3C] @@ -41,7 +41,7 @@ _08071386: adds r1, r4, 0 adds r1, 0xD adds r0, r5, 0 - bl pokemon_getattr + bl GetMonData lsls r1, r4, 1 add r1, sp adds r1, 0x10 @@ -53,14 +53,14 @@ _08071386: bls _08071386 adds r0, r5, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData mov r9, r0 movs r4, 0 _080713AE: adds r1, r4, 0 adds r1, 0x27 adds r0, r5, 0 - bl pokemon_getattr + bl GetMonData lsls r1, r4, 2 adds r1, r7, r1 str r0, [r1] @@ -71,26 +71,26 @@ _080713AE: bls _080713AE adds r0, r5, 0 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData mov r1, r8 strb r0, [r1] adds r0, r5, 0 movs r1, 0x25 - bl pokemon_getattr + bl GetMonData mov r1, r10 strb r0, [r1] adds r0, r5, 0 movs r1, 0x8 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x40] strb r0, [r1] adds r0, r5, 0 movs r1, 0x22 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x38] adds r0, r5, 0 movs r1, 0x50 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x48] strb r0, [r1] movs r0, 0x1 @@ -189,9 +189,9 @@ sub_80714B8: @ 80714B8 movs r1, 0x64 adds r5, r0, 0 muls r5, r1 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r0 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r5, 0 bl sub_8071348 adds r0, r5, 0 @@ -200,7 +200,7 @@ sub_80714B8: @ 80714B8 bl pokemon_setattr adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -366,7 +366,7 @@ sub_807163C: @ 807163C bne _0807166A movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 movs r4, 0x1 _0807166A: @@ -375,7 +375,7 @@ _0807166A: movs r0, 0x64 adds r1, r2, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 movs r4, 0x3 _0807167A: @@ -388,13 +388,13 @@ _0807167A: _08071688: adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 lsls r0, r4, 3 ldr r1, =gMonFrontPicTable @@ -732,7 +732,7 @@ sub_80719FC: @ 80719FC ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r2, =gStringVar3 movs r1, 0x2 @@ -922,10 +922,10 @@ _08071BBC: ldrb r1, [r2, 0x4] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 ldr r0, [r5] @@ -966,7 +966,7 @@ _08071C24: ldrb r1, [r0, 0x4] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 bl pokemon_get_nick @@ -1018,7 +1018,7 @@ _08071CA4: ldrb r1, [r0, 0x4] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 bl pokemon_get_nick @@ -1085,7 +1085,7 @@ _08071D3C: ldrb r0, [r0, 0x4] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 ldr r1, =gStringVar3 mov r9, r1 @@ -1096,7 +1096,7 @@ _08071D3C: muls r0, r6 adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 mov r1, r8 @@ -1115,7 +1115,7 @@ _08071D3C: adds r0, r5 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] ldr r0, =sub_80719FC str r0, [sp, 0x4] @@ -1301,10 +1301,10 @@ sub_8071EF0: @ 8071EF0 ldrb r1, [r0, 0x4] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldr r3, =gUnknown_02020630 ldr r2, [r4] ldrb r1, [r2, 0x1] @@ -1745,11 +1745,11 @@ _0807229C: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080722CC adds r0, r4, 0 diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index 35fc5abf6..93d8bd2a2 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -57,7 +57,7 @@ _0813DA00: ldrsh r1, [r6, r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 ldrh r4, [r6, 0xC] ldrb r5, [r6, 0xE] @@ -206,7 +206,7 @@ evolution_cutscene: @ 813DA8C adds r0, r4, 0 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData ldr r0, =gStringVar1 mov r1, sp bl StringCopy10 @@ -220,17 +220,17 @@ evolution_cutscene: @ 813DA8C bl StringCopy adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x20] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData mov r9, r0 lsls r0, r5, 3 ldr r1, =gMonFrontPicTable @@ -416,16 +416,16 @@ sub_813DD7C: @ 813DD7C movs r1, 0x64 adds r4, r2, 0 muls r4, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r4, r1 ldrh r5, [r0, 0xC] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData mov r9, r0 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r6, r0, 0 movs r0, 0 bl SetHBlankCallback @@ -588,7 +588,7 @@ sub_813DF70: @ 813DF70 ldrsh r2, [r0, r1] movs r1, 0x64 muls r2, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r4, r2, r1 ldrh r6, [r0, 0xC] ldr r0, =gMain @@ -688,11 +688,11 @@ _0813E07E: _0813E0A8: adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r0, r6, 3 ldr r1, =gMonFrontPicTable @@ -828,7 +828,7 @@ sub_813E1D4: @ 813E1D4 str r3, [sp, 0x14] movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData ldr r0, =gStringVar1 mov r1, sp bl StringCopy10 @@ -843,18 +843,18 @@ sub_813E1D4: @ 813E1D4 strb r0, [r1] adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 mov r8, r0 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r7, r0, 0 adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData mov r10, r0 ldr r1, =gUnknown_0203AB80 mov r9, r1 @@ -1039,7 +1039,7 @@ _0813E40C: _0813E416: movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 mov r9, r0 ldr r1, [sp, 0x4] @@ -1090,7 +1090,7 @@ _0813E484: ldrb r1, [r5] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r4, 0 mov r2, sp @@ -1104,7 +1104,7 @@ _0813E4A0: ldrb r0, [r7] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 adds r1, r4, 0 mov r2, sp @@ -1151,18 +1151,18 @@ _0813E4A0: bl pokedex_flag_operation mov r0, r9 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldr r1, =0x0000012f cmp r0, r1 bne _0813E546 mov r0, r9 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 bne _0813E546 ldr r0, [sp, 0x4] movs r1, 0xB - bl pokemon_getattr + bl GetMonData movs r1, 0x97 lsls r1, 1 cmp r0, r1 @@ -1201,7 +1201,7 @@ evovle_mon_maybe: @ 813E570 ldrsh r1, [r3, r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 mov r9, r1 ldr r0, =gMain @@ -1705,7 +1705,7 @@ _0813EA5E: mov r0, r9 movs r1, 0x2 add r2, sp, 0x4 - bl pokemon_getattr + bl GetMonData ldr r0, =gUnknown_02022F58 add r1, sp, 0x4 bl StringCopy10 @@ -2224,7 +2224,7 @@ _0813EF30: b _0813F1A4 _0813EF3E: bl FreeAllWindowBuffers - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty ldr r1, =gTasks mov r3, r8 adds r5, r3, r7 @@ -2278,7 +2278,7 @@ _0813EFC8: adds r1, r6, 0 adds r1, 0xD mov r0, r9 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 adds r0, r4, 0 @@ -2492,7 +2492,7 @@ sub_813F1B8: @ 813F1B8 ldrsh r2, [r0, r1] movs r1, 0x64 muls r2, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r2, r1 mov r9, r2 movs r2, 0x8 @@ -2889,7 +2889,7 @@ _0813F58C: mov r0, r9 movs r1, 0x2 add r2, sp, 0x4 - bl pokemon_getattr + bl GetMonData ldr r0, =gUnknown_02022F58 add r1, sp, 0x4 bl StringCopy10 @@ -3375,7 +3375,7 @@ _0813FA3E: bl GetBgTilemapBuffer bl Free bl FreeAllWindowBuffers - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty ldr r1, =gTasks mov r2, r8 adds r5, r2, r7 @@ -3430,7 +3430,7 @@ _0813FAEC: adds r1, r6, 0 adds r1, 0xD mov r0, r9 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 adds r0, r4, 0 diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s index 7cae1d1ad..5a50ed284 100644 --- a/asm/field_control_avatar.s +++ b/asm/field_control_avatar.s @@ -1514,7 +1514,7 @@ happiness_algorithm_step: @ 809CB44 strh r1, [r0] cmp r1, 0 bne _0809CB72 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty movs r4, 0x5 _0809CB62: adds r0, r5, 0 diff --git a/asm/field_effect.s b/asm/field_effect.s index ea7a3dadf..3d704b2f2 100644 --- a/asm/field_effect.s +++ b/asm/field_effect.s @@ -5262,19 +5262,19 @@ sub_80B84F8: @ 80B84F8 movs r1, 0x64 adds r4, r0, 0 muls r4, r1 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData str r0, [r5] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [r5, 0x4] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [r5, 0x8] ldr r0, [r5] orrs r0, r6 diff --git a/asm/field_player_avatar.s b/asm/field_player_avatar.s index ccac4a7b4..146e360bb 100644 --- a/asm/field_player_avatar.s +++ b/asm/field_player_avatar.s @@ -2760,11 +2760,11 @@ _0808BE2A: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0808BE12 _0808BE44: @@ -4324,10 +4324,10 @@ fish5: @ 808CABC strh r0, [r5, 0x8] b _0808CB5C _0808CADC: - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0808CB14 adds r0, r4, 0 diff --git a/asm/field_poison.s b/asm/field_poison.s index 23900cb0b..d1405ce30 100644 --- a/asm/field_poison.s +++ b/asm/field_poison.s @@ -9,7 +9,7 @@ sub_80F9568: @ 80F9568 push {lr} movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0 @@ -31,7 +31,7 @@ _080F9586: thumb_func_start sub_80F958C sub_80F958C: @ 80F958C push {r4,r5,lr} - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty movs r5, 0 _080F9592: adds r0, r4, 0 @@ -40,7 +40,7 @@ _080F9592: beq _080F95B0 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080F95B0 movs r0, 0 @@ -67,7 +67,7 @@ sub_80F95C0: @ 80F95C0 movs r1, 0x64 adds r4, r0, 0 muls r4, r1 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 movs r0, 0 str r0, [sp] @@ -82,7 +82,7 @@ sub_80F95C0: @ 80F95C0 adds r0, r4, 0 movs r1, 0x2 adds r2, r5, 0 - bl pokemon_getattr + bl GetMonData adds r0, r5, 0 bl StringGetEnd10 add sp, 0x4 @@ -99,7 +99,7 @@ sub_80F960C: @ 80F960C lsrs r0, 24 movs r1, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 bl sub_80F9568 @@ -107,12 +107,12 @@ sub_80F960C: @ 80F960C beq _080F964C adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080F964C adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData bl pokemon_ailments_get_primary lsls r0, 24 lsrs r0, 24 @@ -253,19 +253,19 @@ sub_80F972C: @ 80F972C overworld_poison: @ 80F9744 push {r4-r7,lr} sub sp, 0x4 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty movs r7, 0 movs r6, 0 movs r5, 0x5 _080F9750: adds r0, r4, 0 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080F9794 adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData bl pokemon_ailments_get_primary lsls r0, 24 lsrs r0, 24 @@ -273,7 +273,7 @@ _080F9750: bne _080F9794 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData str r0, [sp] cmp r0, 0 beq _080F9786 diff --git a/asm/fldeff_strength.s b/asm/fldeff_strength.s index 38ffe9f37..738ff3bba 100644 --- a/asm/fldeff_strength.s +++ b/asm/fldeff_strength.s @@ -70,7 +70,7 @@ sub_8145E2C: @ 8145E2C ldr r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 bl GetMonNickname diff --git a/asm/front_pic_anim.s b/asm/front_pic_anim.s index 0a5296853..aaa150644 100644 --- a/asm/front_pic_anim.s +++ b/asm/front_pic_anim.s @@ -157,7 +157,7 @@ sub_817F594: @ 817F594 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl GetNature lsls r0, 24 diff --git a/asm/hall_of_fame.s b/asm/hall_of_fame.s index 8fbf772c5..8c73e42e5 100644 --- a/asm/hall_of_fame.s +++ b/asm/hall_of_fame.s @@ -224,17 +224,17 @@ _08173740: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r6, r1, r0 adds r0, r6, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 cmp r5, 0 beq _0817380C adds r0, r6, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData mov r1, r9 ldr r3, [r1] lsls r4, r7, 2 @@ -252,14 +252,14 @@ _08173740: strh r1, [r3, 0x8] adds r0, r6, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData mov r2, r9 ldr r1, [r2] adds r1, r4 str r0, [r1] adds r0, r6, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData mov r5, r9 ldr r1, [r5] adds r1, 0x4 @@ -267,7 +267,7 @@ _08173740: str r0, [r1] adds r0, r6, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r2, [r5] adds r2, r4 lsls r0, 1 @@ -279,7 +279,7 @@ _08173740: adds r0, r6, 0 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData movs r2, 0 mov r6, r8 lsls r5, r6, 2 diff --git a/asm/item_use.s b/asm/item_use.s index a375da5a1..1bb0a88b5 100644 --- a/asm/item_use.s +++ b/asm/item_use.s @@ -2494,7 +2494,7 @@ ItemUseInBattle_StatIncrease: @ 80FE4B8 ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_0203CE7C ldrh r1, [r1] diff --git a/asm/link.s b/asm/link.s index 98052ec68..198807457 100644 --- a/asm/link.s +++ b/asm/link.s @@ -20802,7 +20802,7 @@ _08013FDE: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 movs r0, 0 movs r2, 0x64 @@ -20817,7 +20817,7 @@ _08013FFC: bne _080140BC bl link_get_multiplayer_id adds r1, r0, 0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r2, 0x1 eors r1, r2 lsls r1, 24 @@ -21648,7 +21648,7 @@ _08014854: ldr r4, =gUnknown_02024488 adds r0, r4 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r1, r9 strh r0, [r1] ldrb r0, [r6, 0x1] @@ -21656,7 +21656,7 @@ _08014854: adds r0, r4 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r2, r9 strh r0, [r2, 0x2] ldr r0, =gMain @@ -27708,10 +27708,10 @@ sub_8017D04: @ 8017D04 _08017D14: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 movs r0, 0xCE lsls r0, 1 @@ -27736,10 +27736,10 @@ _08017D44: _08017D50: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r0, r1, 3 subs r0, r1 @@ -28098,16 +28098,16 @@ _08018032: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData cmp r0, 0x1E bhi _0801805A adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -28164,19 +28164,19 @@ sub_80180A0: @ 80180A0 movs r1, 0x64 adds r4, r0, 0 muls r4, r1 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0xA] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0xC] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [r5, 0x4] ldrh r1, [r5, 0xA] movs r0, 0xCE @@ -28201,19 +28201,19 @@ sub_80180E8: @ 80180E8 movs r1, 0x64 adds r4, r0, 0 muls r4, r1 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0xE] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0x10] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [r5, 0x14] pop {r4,r5} pop {r0} @@ -28249,16 +28249,16 @@ _08018146: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData cmp r0, r6 bne _0801816C adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, r7 @@ -33368,8 +33368,8 @@ sub_801AAD4: @ 801AAD4 bl sub_8014210 movs r4, 0 movs r7, 0x64 - ldr r6, =gUnknown_020244EC - ldr r5, =gUnknown_02024744 + ldr r6, =gPlayerParty + ldr r5, =gEnemyParty _0801AAE4: ldr r0, =gUnknown_0203CEF8 adds r0, r4, r0 @@ -33385,7 +33385,7 @@ _0801AAE4: adds r4, 0x1 cmp r4, 0x1 ble _0801AAE4 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty movs r0, 0xFA lsls r0, 1 adds r5, r4, r0 @@ -33395,12 +33395,12 @@ _0801AB0A: adds r4, 0x64 cmp r4, r5 ble _0801AB0A - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty movs r5, 0 adds r6, r4, 0 adds r6, 0x64 _0801AB1E: - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r1, r5, r1 adds r0, r4, 0 movs r2, 0x64 @@ -53066,7 +53066,7 @@ sub_802493C: @ 802493C adds r0, r1 movs r1, 0x64 muls r1, r6 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 bl sub_80261F8 ldr r0, =sub_8024BC8 @@ -59195,16 +59195,16 @@ _08027A62: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08027A94 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0x55 bne _08027A94 movs r0, 0x1 @@ -64853,7 +64853,7 @@ sub_802A9A8: @ 802A9A8 adds r0, r1 movs r1, 0x64 muls r1, r7 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 bl sub_802AC2C ldr r0, [r5] @@ -65119,15 +65119,15 @@ sub_802AC2C: @ 802AC2C adds r4, r1, 0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData strh r0, [r5] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [r5, 0x4] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [r5, 0x8] pop {r4,r5} pop {r0} @@ -68847,16 +68847,16 @@ _0802C924: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0802C95C adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl sub_802C908 diff --git a/asm/load_save.s b/asm/load_save.s index 9bf3e44b2..6cbb2bdb2 100644 --- a/asm/load_save.s +++ b/asm/load_save.s @@ -274,7 +274,7 @@ _08076DA0: movs r2, 0x8E lsls r2, 2 adds r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0x64 bl memcpy @@ -299,7 +299,7 @@ copy_player_party_from_sav1: @ 8076DD4 ldrb r0, [r0] strb r0, [r1] movs r4, 0 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty _08076DEA: movs r0, 0x64 adds r2, r4, 0 diff --git a/asm/lottery_corner.s b/asm/lottery_corner.s index b9fc1cc51..49f20137f 100644 --- a/asm/lottery_corner.s +++ b/asm/lottery_corner.s @@ -91,21 +91,21 @@ _081775FC: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08177658 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0817764E adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 ldr r0, =gUnknown_020375F0 ldrh r0, [r0] @@ -222,11 +222,11 @@ _081776D2: movs r0, 0x64 ldr r1, [sp, 0x4] muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r2, =gStringVar1 movs r1, 0x2 - bl pokemon_getattr + bl GetMonData b _08177768 .pool _0817773C: diff --git a/asm/mystery_event_script.s b/asm/mystery_event_script.s index 4b97d6ae8..2430cd87c 100644 --- a/asm/mystery_event_script.s +++ b/asm/mystery_event_script.s @@ -661,7 +661,7 @@ sub_8153CC8: @ 8153CC8 bl memcpy adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 movs r0, 0xCE @@ -718,7 +718,7 @@ _08153D4C: _08153D86: adds r0, r7, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl itemid_is_mail diff --git a/asm/pokeblock_feed.s b/asm/pokeblock_feed.s index dfcca703c..97531b1af 100644 --- a/asm/pokeblock_feed.s +++ b/asm/pokeblock_feed.s @@ -118,7 +118,7 @@ _08179C78: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_8179DF4 lsls r0, 24 @@ -140,7 +140,7 @@ _08179CB0: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_817A358 ldr r1, =gUnknown_0203BD18 @@ -312,12 +312,12 @@ _08179E24: _08179E48: adds r0, r6, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r6, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r0, r5, 3 ldr r1, =gMonFrontPicTable @@ -335,16 +335,16 @@ _08179E48: _08179E84: adds r0, r6, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r6, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 adds r0, r6, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 adds r0, r5, 0 adds r2, r4, 0 @@ -689,7 +689,7 @@ sub_817A1C4: @ 817A1C4 movs r0, 0x64 adds r5, r1, 0 muls r5, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r0 ldr r1, =gSaveBlock1Ptr ldr r0, =gUnknown_0203CE7C @@ -841,7 +841,7 @@ sub_817A358: @ 817A358 push {r6,r7} adds r5, r0, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 diff --git a/asm/pokemon_1.s b/asm/pokemon_1.s index bd5ed49e1..9d0d4d108 100644 --- a/asm/pokemon_1.s +++ b/asm/pokemon_1.s @@ -83,7 +83,7 @@ zero_pokemon_struct: @ 8067A8C @ void zero_player_party_data() zero_player_party_data: @ 8067B0C push {r4,r5,lr} - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty movs r0, 0xFA lsls r0, 1 adds r5, r4, r0 @@ -102,7 +102,7 @@ _08067B16: thumb_func_start zero_enemy_party_data zero_enemy_party_data: @ 8067B2C push {r4,r5,lr} - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty movs r0, 0xFA lsls r0, 1 adds r5, r4, r0 @@ -1538,12 +1538,12 @@ sub_80686FC: @ 80686FC adds r6, r1, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r6] adds r0, r7, 0 movs r1, 0xC movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, 0xAF @@ -1564,7 +1564,7 @@ _08068738: adds r1, 0xD adds r0, r7, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r4, 0x2 adds r5, 0x1 @@ -1573,58 +1573,58 @@ _08068738: adds r0, r7, 0 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0xC] adds r0, r7, 0 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0xD] adds r0, r7, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [r6, 0x14] adds r0, r7, 0 movs r1, 0x1A movs r2, 0 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0xE] adds r0, r7, 0 movs r1, 0x1B movs r2, 0 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0xF] adds r0, r7, 0 movs r1, 0x1C movs r2, 0 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0x10] adds r0, r7, 0 movs r1, 0x1D movs r2, 0 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0x11] adds r0, r7, 0 movs r1, 0x1E movs r2, 0 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0x12] adds r0, r7, 0 movs r1, 0x1F movs r2, 0 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0x13] adds r0, r7, 0 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, r8 strb r0, [r1] adds r0, r7, 0 movs r1, 0x27 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r4, 0x1F ands r0, r4 ldrb r2, [r6, 0x18] @@ -1636,7 +1636,7 @@ _08068738: adds r0, r7, 0 movs r1, 0x28 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r5, 0x1F ands r0, r5 lsls r0, 5 @@ -1648,7 +1648,7 @@ _08068738: adds r0, r7, 0 movs r1, 0x29 movs r2, 0 - bl pokemon_getattr + bl GetMonData ands r0, r4 lsls r0, 2 ldrb r2, [r6, 0x19] @@ -1660,7 +1660,7 @@ _08068738: adds r0, r7, 0 movs r1, 0x2A movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0x1F ands r1, r0 lsls r1, 15 @@ -1672,7 +1672,7 @@ _08068738: adds r0, r7, 0 movs r1, 0x2B movs r2, 0 - bl pokemon_getattr + bl GetMonData ands r0, r5 lsls r0, 4 ldrh r2, [r6, 0x1A] @@ -1683,7 +1683,7 @@ _08068738: adds r0, r7, 0 movs r1, 0x2C movs r2, 0 - bl pokemon_getattr + bl GetMonData ands r0, r4 lsls r0, 1 ldrb r2, [r6, 0x1B] @@ -1695,7 +1695,7 @@ _08068738: adds r0, r7, 0 movs r1, 0x2E movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 7 ldrb r2, [r6, 0x1B] movs r1, 0x7F @@ -1705,12 +1705,12 @@ _08068738: adds r0, r7, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [r6, 0x1C] adds r0, r7, 0 movs r1, 0x2 mov r2, r9 - bl pokemon_getattr + bl GetMonData pop {r3,r4} mov r8, r3 mov r9, r4 @@ -1898,7 +1898,7 @@ get_pokemon_data_3: @ 8068A10 adds r0, r5, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xCD lsls r1, 1 cmp r0, r1 @@ -1912,13 +1912,13 @@ _08068A3C: adds r1, 0x27 adds r0, r5, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 adds r1, r6, 0 adds r1, 0x1A adds r0, r5, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r2, =gUnknown_08329D48 lsls r1, r6, 1 adds r1, r2 @@ -1967,12 +1967,12 @@ _08068AAA: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xCD lsls r1, 1 cmp r0, r1 @@ -1980,7 +1980,7 @@ _08068AAA: adds r0, r4, 0 movs r1, 0x3B movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] adds r0, r4, 0 movs r1, 0x3B @@ -1989,7 +1989,7 @@ _08068AAA: adds r0, r4, 0 movs r1, 0x3C movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] adds r0, r4, 0 movs r1, 0x3C @@ -1998,7 +1998,7 @@ _08068AAA: adds r0, r4, 0 movs r1, 0x3D movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] adds r0, r4, 0 movs r1, 0x3D @@ -2007,7 +2007,7 @@ _08068AAA: adds r0, r4, 0 movs r1, 0x3E movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] adds r0, r4, 0 movs r1, 0x3E @@ -2016,7 +2016,7 @@ _08068AAA: adds r0, r4, 0 movs r1, 0x3F movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] adds r0, r4, 0 movs r1, 0x3F @@ -2140,7 +2140,7 @@ DoScriptedWildBattle: @ 8068C18 ldr r0, =gUnknown_020375E4 ldrh r6, [r0] bl zero_enemy_party_data - ldr r7, =gUnknown_02024744 + ldr r7, =gEnemyParty lsls r4, 24 lsrs r4, 24 movs r0, 0 @@ -2261,77 +2261,77 @@ pokemon_calc_effective_stats: @ 8068D0C adds r5, r0, 0 movs r1, 0x3A movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r8, r0 adds r0, r5, 0 movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x1C] adds r0, r5, 0 movs r1, 0x27 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r6, r0, 0 adds r0, r5, 0 movs r1, 0x1A movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 adds r0, r5, 0 movs r1, 0x28 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r10, r0 adds r0, r5, 0 movs r1, 0x1B movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r9, r0 adds r0, r5, 0 movs r1, 0x29 movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x20] adds r0, r5, 0 movs r1, 0x1C movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x24] adds r0, r5, 0 movs r1, 0x2A movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x28] adds r0, r5, 0 movs r1, 0x1D movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x2C] adds r0, r5, 0 movs r1, 0x2B movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x30] adds r0, r5, 0 movs r1, 0x1E movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x34] adds r0, r5, 0 movs r1, 0x2C movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x38] adds r0, r5, 0 movs r1, 0x1F movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x3C] adds r0, r5, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 adds r0, r5, 0 @@ -2644,14 +2644,14 @@ level_by_exp: @ 8069054 adds r5, r0, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x19 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 movs r2, 0x1 ldr r6, =gExperienceTables @@ -3020,14 +3020,14 @@ sub_8069318: @ 8069318 mov r0, r8 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r9, r0 mov r0, r8 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 mov r10, r0 @@ -3154,13 +3154,13 @@ _08069440: adds r1, 0xE adds r0, r6, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r5] adds r1, r4, 0 adds r1, 0x12 adds r0, r6, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r7, r4 strb r0, [r1] adds r5, 0x2 @@ -3170,7 +3170,7 @@ _08069440: adds r0, r6, 0 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, r9 strb r0, [r1] ldrb r0, [r1] diff --git a/asm/pokemon_2.s b/asm/pokemon_2.s index 8ceb1ee6b..c7d017580 100644 --- a/asm/pokemon_2.s +++ b/asm/pokemon_2.s @@ -86,7 +86,7 @@ _08069E8A: lsrs r0, 24 bl battle_side_get_owner adds r4, r0, 0 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] bl battle_side_get_owner lsls r4, 24 @@ -982,9 +982,9 @@ _0806A510: bx r1 thumb_func_end pokemon_data_permutator - thumb_func_start pokemon_getattr -@ int pokemon_getattr(pokemon *mon, enum pokemon_data_request req, void *data) -pokemon_getattr: @ 806A518 + thumb_func_start GetMonData +@ int GetMonData(pokemon *mon, enum pokemon_data_request req, void *data) +GetMonData: @ 806A518 push {r4,lr} adds r4, r0, 0 adds r3, r1, 0 @@ -1137,7 +1137,7 @@ _0806A66E: pop {r4} pop {r1} bx r1 - thumb_func_end pokemon_getattr + thumb_func_end GetMonData thumb_func_start pokemon_getattr_encrypted @ int pokemon_getattr_encrypted(pokemon *mon, enum pokemon_data_request req, void *data) @@ -2904,12 +2904,12 @@ _0806B446: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0806B444 adds r0, r4, 0 @@ -3032,11 +3032,11 @@ _0806B554: adds r1, r0, 0 movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0806B54C _0806B572: @@ -3069,11 +3069,11 @@ _0806B598: adds r1, r0, 0 movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0806B590 _0806B5B6: @@ -3101,12 +3101,12 @@ _0806B5DC: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -3114,13 +3114,13 @@ _0806B5DC: adds r0, r4, 0 movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0806B616 adds r0, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0806B616 adds r6, 0x1 @@ -3152,12 +3152,12 @@ _0806B63E: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 movs r0, 0xCE lsls r0, 1 @@ -3168,7 +3168,7 @@ _0806B63E: adds r0, r4, 0 movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0806B670 adds r6, 0x1 @@ -3233,14 +3233,14 @@ GetMonAbility: @ 806B6D8 adds r5, r0, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x2E movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -3288,7 +3288,7 @@ _0806B730: movs r0, 0x64 mov r6, r9 muls r6, r0 - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty mov r8, r4 adds r5, r6, r4 ldrh r1, [r1] @@ -3342,7 +3342,7 @@ _0806B7A0: movs r3, 0x64 mov r0, r9 muls r0, r3 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r7, r0, r1 mov r4, r10 lsls r0, r4, 1 @@ -3459,11 +3459,11 @@ sub_806B8B0: @ 806B8B0 _0806B8B4: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0806B8D0 movs r0, 0 @@ -3604,7 +3604,7 @@ sub_806B9A8: @ 806B9A8 lsrs r4, 24 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 mov r1, sp @@ -3658,12 +3658,12 @@ battle_data_fill: @ 806B9FC movs r0, 0x64 mov r5, r9 muls r5, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r0 adds r0, r5, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =gBattleMons mov r8, r1 movs r1, 0x58 @@ -3676,7 +3676,7 @@ battle_data_fill: @ 806B9FC adds r0, r5, 0 movs r1, 0xC movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x2E] movs r6, 0 mov r0, r8 @@ -3687,7 +3687,7 @@ _0806BA4E: adds r1, 0xD adds r0, r5, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xC add r1, r8 mov r10, r1 @@ -3697,7 +3697,7 @@ _0806BA4E: adds r1, 0x11 adds r0, r5, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData strb r0, [r7] adds r7, 0x1 adds r4, 0x2 @@ -3707,12 +3707,12 @@ _0806BA4E: movs r0, 0x64 mov r4, r9 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r2, 0xC negs r2, r2 add r2, r10 @@ -3728,14 +3728,14 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r7, 0 adds r1, 0x2B strb r0, [r1] adds r0, r4, 0 movs r1, 0x19 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, r10 adds r1, 0x38 adds r1, r5, r1 @@ -3743,7 +3743,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x27 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r6, 0x1F ands r0, r6 ldrb r2, [r7, 0x14] @@ -3755,7 +3755,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x28 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0x1F mov r8, r1 mov r2, r8 @@ -3769,7 +3769,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x29 movs r2, 0 - bl pokemon_getattr + bl GetMonData ands r0, r6 lsls r0, 2 ldrb r2, [r7, 0x15] @@ -3781,7 +3781,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x2A movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0x1F ands r1, r0 lsls r1, 15 @@ -3793,7 +3793,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x2B movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r3, r8 ands r0, r3 lsls r0, 4 @@ -3805,7 +3805,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x2C movs r2, 0 - bl pokemon_getattr + bl GetMonData ands r0, r6 lsls r0, 1 ldrb r2, [r7, 0x17] @@ -3817,7 +3817,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, r10 adds r1, 0x3C adds r1, r5, r1 @@ -3825,7 +3825,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x37 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, r10 adds r1, 0x40 adds r1, r5, r1 @@ -3833,49 +3833,49 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r7, 0 adds r1, 0x2A strb r0, [r1] adds r0, r4, 0 movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x28] adds r0, r4, 0 movs r1, 0x3A movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x2C] adds r0, r4, 0 movs r1, 0x3B movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x2] adds r0, r4, 0 movs r1, 0x3C movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x4] adds r0, r4, 0 movs r1, 0x3D movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x6] adds r0, r4, 0 movs r1, 0x3E movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x8] adds r0, r4, 0 movs r1, 0x3F movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0xA] adds r0, r4, 0 movs r1, 0x2D movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0x1 ands r0, r1 lsls r0, 6 @@ -3888,7 +3888,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x2E movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 7 ldrb r2, [r7, 0x17] movs r1, 0x7F @@ -3898,7 +3898,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, r10 adds r1, 0x48 adds r1, r5, r1 @@ -3932,7 +3932,7 @@ _0806BA4E: adds r0, r4, 0 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, r10 adds r0, 0x24 adds r0, r5, r0 @@ -3943,7 +3943,7 @@ _0806BA4E: adds r2, r5, r2 adds r0, r4, 0 movs r1, 0x7 - bl pokemon_getattr + bl GetMonData ldr r0, [sp, 0x14] bl battle_side_get_owner ldr r1, =gUnknown_0202449C diff --git a/asm/pokemon_3.s b/asm/pokemon_3.s index 3f957cc94..ec4cc0050 100644 --- a/asm/pokemon_3.s +++ b/asm/pokemon_3.s @@ -62,7 +62,7 @@ ExecuteTableBasedItemEffect: @ 806BD28 str r5, [sp, 0x3C] mov r0, r8 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, 0xAF @@ -538,19 +538,19 @@ _0806C168: mov r0, r8 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0x64 beq _0806C1CA ldr r5, =gExperienceTables mov r0, r8 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r0, r8 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, 0x1 lsls r4, 2 ldr r2, =gBaseStats @@ -730,7 +730,7 @@ _0806C300: mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =gUnknown_08329D22 ldr r3, [sp, 0x14] adds r1, r3, r1 @@ -744,14 +744,14 @@ _0806C300: mov r0, r8 adds r1, r5, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -770,7 +770,7 @@ _0806C300: mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =gUnknown_08329D2A ldr r2, [sp, 0x14] adds r1, r2, r1 @@ -784,7 +784,7 @@ _0806C300: mov r0, r8 adds r1, r5, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 ldr r1, [sp] @@ -802,7 +802,7 @@ _0806C300: mov r0, r8 adds r1, r4, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [sp] adds r0, r1 str r0, [sp] @@ -863,7 +863,7 @@ _0806C430: ldrb r1, [r0] mov r0, r8 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 str r1, [sp, 0x4] lsls r0, r5, 24 @@ -944,7 +944,7 @@ _0806C4DC: mov r0, r8 movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0806C4FC ldr r0, [sp, 0x28] @@ -1016,7 +1016,7 @@ _0806C59C: mov r0, r8 movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0806C5B2 ldr r0, [sp, 0x28] @@ -1047,12 +1047,12 @@ _0806C5D4: mov r0, r8 movs r1, 0x3A movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r0, r8 movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData subs r4, r0 str r4, [sp] b _0806C612 @@ -1060,7 +1060,7 @@ _0806C5F4: mov r0, r8 movs r1, 0x3A movs r2, 0 - bl pokemon_getattr + bl GetMonData lsrs r0, 1 str r0, [sp] cmp r0, 0 @@ -1077,12 +1077,12 @@ _0806C612: mov r0, r8 movs r1, 0x3A movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r0, r8 movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r4, r0 beq _0806C6F0 ldr r0, [sp, 0x18] @@ -1091,21 +1091,21 @@ _0806C612: mov r0, r8 movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [sp] adds r0, r1 str r0, [sp] mov r0, r8 movs r1, 0x3A movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [sp] cmp r1, r0 bls _0806C65E mov r0, r8 movs r1, 0x3A movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] _0806C65E: mov r0, r8 @@ -1161,7 +1161,7 @@ _0806C6AE: b _0806C6EC .pool _0806C6E4: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldr r0, [sp] negs r0, r0 str r0, [r1] @@ -1194,21 +1194,21 @@ _0806C714: mov r0, r8 mov r1, r9 movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] adds r7, r5, 0 adds r7, 0xD mov r0, r8 adds r1, r7, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -1231,14 +1231,14 @@ _0806C714: mov r0, r8 adds r1, r7, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -1253,14 +1253,14 @@ _0806C714: mov r0, r8 adds r1, r7, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -1341,21 +1341,21 @@ _0806C858: mov r0, r8 adds r1, r6, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] ldr r5, [sp, 0x14] adds r5, 0xD mov r0, r8 adds r1, r5, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -1382,14 +1382,14 @@ _0806C8A0: mov r0, r8 adds r1, r5, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -1404,14 +1404,14 @@ _0806C8A0: mov r0, r8 adds r1, r5, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -1555,7 +1555,7 @@ _0806CA18: ldrb r1, [r0] mov r0, r8 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 str r1, [sp, 0x4] lsls r0, r5, 24 @@ -1624,7 +1624,7 @@ _0806CAB8: mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =gUnknown_08329D22 ldr r5, [sp, 0x14] adds r1, r5, r1 @@ -1638,14 +1638,14 @@ _0806CAB8: mov r0, r8 adds r1, r6, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -1666,7 +1666,7 @@ _0806CB10: mov r0, r8 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] ldr r1, =gUnknown_08329D26 ldr r2, [sp, 0x14] @@ -1689,7 +1689,7 @@ _0806CB10: mov r0, r8 adds r1, r6, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 ldr r1, [sp] @@ -1706,7 +1706,7 @@ _0806CB10: mov r0, r8 adds r1, r4, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [sp] adds r0, r1 str r0, [sp] @@ -1722,7 +1722,7 @@ _0806CB94: mov r0, r8 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0x63 bls _0806CBA4 b _0806CD30 @@ -1754,7 +1754,7 @@ _0806CBC6: mov r0, r8 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 str r5, [sp, 0x8] ldr r0, [sp, 0x30] @@ -1777,7 +1777,7 @@ _0806CC00: mov r0, r8 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0x63 bhi _0806CC10 b _0806CD30 @@ -1785,7 +1785,7 @@ _0806CC10: mov r0, r8 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0xC7 bls _0806CC20 b _0806CD30 @@ -1813,7 +1813,7 @@ _0806CC2E: mov r0, r8 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 str r4, [sp, 0x8] ldr r0, [sp, 0x30] @@ -1829,7 +1829,7 @@ _0806CC68: mov r0, r8 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0xC7 bls _0806CD30 ldr r0, [sp, 0x20] @@ -1854,7 +1854,7 @@ _0806CC82: mov r0, r8 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 str r4, [sp, 0x8] ldr r0, [sp, 0x30] @@ -1887,7 +1887,7 @@ _0806CCD8: mov r0, r8 movs r1, 0x26 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0xB bne _0806CCF0 ldr r0, [sp, 0x8] @@ -1897,7 +1897,7 @@ _0806CCF0: mov r0, r8 movs r1, 0x23 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 bl sav1_map_get_name lsls r0, 24 @@ -1973,7 +1973,7 @@ HealStatusConditions: @ 806CD6C lsrs r6, r3, 24 movs r1, 0x37 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 str r1, [sp] ands r0, r4 @@ -2199,7 +2199,7 @@ _0806CF1C: thumb_func_start sub_806CF24 sub_806CF24: @ 806CF24 push {lr} - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldr r1, =gUnknown_020244B8 ldrb r1, [r1] strb r1, [r2] @@ -2332,7 +2332,7 @@ GetNature: @ 806D070 push {lr} movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0x19 bl __umodsi3 lsls r0, 24 @@ -2372,24 +2372,24 @@ GetEvolutionTargetSpecies: @ 806D098 mov r0, r8 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 mov r0, r8 movs r1, 0xC movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] mov r0, r8 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r0, r8 movs r1, 0x17 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 str r0, [sp, 0xC] @@ -2442,14 +2442,14 @@ _0806D144: mov r0, r8 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 mov r9, r0 mov r0, r8 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x8] @@ -2567,12 +2567,12 @@ _0806D248: mov r0, r8 movs r1, 0x3B movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r0, r8 movs r1, 0x3C movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r4, r0 bls _0806D332 b _0806D2C4 @@ -2587,12 +2587,12 @@ _0806D272: mov r0, r8 movs r1, 0x3B movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r0, r8 movs r1, 0x3C movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r4, r0 bne _0806D332 b _0806D2C4 @@ -2607,12 +2607,12 @@ _0806D29C: mov r0, r8 movs r1, 0x3B movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r0, r8 movs r1, 0x3C movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r4, r0 bcs _0806D332 _0806D2C4: @@ -3287,12 +3287,12 @@ sub_806D778: @ 806D778 adds r0, r5, 0 movs r1, 0x2 mov r2, r9 - bl pokemon_getattr + bl GetMonData mov r4, sp adds r0, r5, 0 movs r1, 0x3 mov r2, sp - bl pokemon_getattr + bl GetMonData strb r0, [r4] lsls r0, 24 lsrs r0, 24 @@ -3530,13 +3530,13 @@ _0806D94A: adds r0, r7, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 adds r0, r7, 0 movs r1, 0xC movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, 0xAF @@ -3580,7 +3580,7 @@ _0806D9B8: adds r0, r7, 0 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r1, sp @@ -3662,7 +3662,7 @@ _0806DA46: adds r0, r7, 0 movs r1, 0x26 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0xB bne _0806DA74 mov r0, sp @@ -3675,7 +3675,7 @@ _0806DA74: adds r0, r7, 0 movs r1, 0x23 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 bl sav1_map_get_name lsls r0, 24 @@ -3736,7 +3736,7 @@ _0806DAF0: adds r1, 0x1A mov r0, r8 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r2, sp adds r1, r2, r6 strb r0, [r1] @@ -3842,7 +3842,7 @@ _0806DBC8: mov r0, r8 movs r1, 0xC movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, 0xAF @@ -3943,7 +3943,7 @@ _0806DC94: adds r1, 0x1A adds r0, r6, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r0, r5, r0 lsls r0, 16 lsrs r5, r0, 16 @@ -3990,13 +3990,13 @@ _0806DCDA: adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0806DCDA adds r0, r4, 0 movs r1, 0x2D movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0806DCDA ldr r1, =gBitTable @@ -4078,7 +4078,7 @@ _0806DD90: movs r1, 0x22 movs r2, 0 str r3, [sp] - bl pokemon_getattr + bl GetMonData movs r1, 0xF ands r1, r0 ldr r3, [sp] @@ -4098,7 +4098,7 @@ _0806DDC4: adds r0, r7, 0 movs r1, 0x22 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xF ands r1, r0 cmp r1, 0 @@ -4135,7 +4135,7 @@ _0806DDF8: movs r1, 0x22 movs r2, 0 str r3, [sp] - bl pokemon_getattr + bl GetMonData ldr r3, [sp] cmp r0, 0 beq _0806DE1C @@ -4153,7 +4153,7 @@ _0806DE28: adds r0, r7, 0 movs r1, 0x22 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0806DE38 movs r5, 0x1 @@ -4177,18 +4177,18 @@ _0806DE50: movs r0, 0x64 adds r1, r6, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0806DEB2 adds r0, r4, 0 movs r1, 0x22 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 strb r0, [r5] @@ -4218,7 +4218,7 @@ _0806DE96: _0806DEA2: movs r0, 0x64 muls r0, r6 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x22 mov r2, sp @@ -4256,13 +4256,13 @@ _0806DEE0: adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0806DF64 adds r0, r4, 0 movs r1, 0x22 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r1, r0, 24 mov r0, sp @@ -4281,7 +4281,7 @@ _0806DEE0: adds r0, r4, 0 movs r1, 0x22 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xF0 ands r1, r0 cmp r1, 0 @@ -4300,7 +4300,7 @@ _0806DF3A: adds r0, r4, 0 movs r1, 0x22 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xF0 ands r1, r0 cmp r1, 0 @@ -4328,21 +4328,21 @@ sub_806DF74: @ 806DF74 adds r5, r0, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r0, 0x1 mov r1, sp strb r0, [r1] adds r0, r5, 0 movs r1, 0x19 movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4] ldr r6, =gExperienceTables ldr r2, =gBaseStats @@ -4404,7 +4404,7 @@ sub_806E00C: @ 806E00C adds r5, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 adds r3, r1, 0 @@ -4504,13 +4504,13 @@ sub_806E0B4: @ 806E0B4 adds r0, r6, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 adds r0, r6, 0 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 str r0, [sp, 0xC] @@ -4521,7 +4521,7 @@ _0806E0EA: adds r1, 0xD adds r0, r6, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r4, 0x2 adds r5, 0x1 @@ -4719,13 +4719,13 @@ sub_806E25C: @ 806E25C adds r0, r6, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 adds r0, r6, 0 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x30] @@ -4745,7 +4745,7 @@ _0806E2A0: adds r1, 0xD adds r0, r6, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r4, 0x2 adds r5, 0x1 @@ -5252,19 +5252,19 @@ pokemon_get_pal: @ 806E708 adds r5, r0, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r6, r0, 0 adds r0, r5, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 adds r0, r4, 0 adds r1, r6, 0 @@ -5323,19 +5323,19 @@ sub_806E794: @ 806E794 adds r5, r0, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r6, r0, 0 adds r0, r5, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 adds r0, r4, 0 adds r1, r6, 0 @@ -5472,11 +5472,11 @@ sub_806E8A8: @ 806E8A8 adds r4, r0, 0 movs r1, 0x7 mov r2, sp - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, sp bl sub_806E8D4 lsls r0, 24 @@ -5707,20 +5707,20 @@ _0806EA7C: bl __umodsi3 lsls r0, 16 lsrs r6, r0, 16 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 movs r0, 0x2D mov r8, r0 movs r7, 0x5F - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5, 0 movs r1, 0x6 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0806EAC6 adds r0, r5, 0 @@ -5746,7 +5746,7 @@ _0806EAC6: beq _0806EB04 cmp r6, r7 bcc _0806EB90 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty lsls r2, 2 ldr r1, =gUnknown_08329EFE b _0806EB6C @@ -5756,12 +5756,12 @@ _0806EB04: bcc _0806EB90 cmp r6, r7 bcs _0806EB18 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty lsls r2, r4, 3 b _0806EB66 .pool _0806EB18: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty lsls r2, r4, 3 subs r2, r4 lsls r2, 2 @@ -5783,7 +5783,7 @@ _0806EB2C: bne _0806EB5C cmp r3, 0 beq _0806EB5C - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty mov r2, r12 adds r2, 0xC adds r2, r5, r2 @@ -5794,7 +5794,7 @@ _0806EB5C: bcc _0806EB90 cmp r6, r7 bcs _0806EB80 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _0806EB66: subs r2, r4 lsls r2, 2 @@ -5807,7 +5807,7 @@ _0806EB6E: b _0806EB90 .pool _0806EB80: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty subs r2, r4 lsls r2, 2 ldr r1, =gBaseStats + 0xe @ item 2 offset @@ -5829,12 +5829,12 @@ sub_806EBA4: @ 806EBA4 adds r4, r0, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 adds r0, r4, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 adds r0, r5, 0 bl sub_806EBD0 diff --git a/asm/rom3.s b/asm/rom3.s index 240c5c546..f71e20d8e 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -86,7 +86,7 @@ _080326B8: cmp r0, 0 beq _08032728 bl zero_enemy_party_data - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty movs r1, 0x90 lsls r1, 1 str r5, [sp] @@ -1160,33 +1160,33 @@ _08033088: ands r0, r1 cmp r0, 0 bne _080330A8 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _080330AA .pool _080330A8: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _080330AA: adds r4, r7, r0 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08033170 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08033170 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 beq _08033170 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _08033170 ldr r0, =gUnknown_0202406E @@ -1201,11 +1201,11 @@ _080330F0: ands r0, r1 cmp r0, 0 bne _08033118 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r7, r0 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08033170 adds r0, r4, 0 @@ -1213,29 +1213,29 @@ _080330F0: b _0803312C .pool _08033118: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r7, r0 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08033170 adds r0, r4, 0 movs r1, 0x41 _0803312C: - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08033170 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 beq _08033170 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _08033170 ldr r1, =gUnknown_0202406E @@ -1523,7 +1523,7 @@ _08033346: ldrsh r1, [r0, r7] ldr r0, [r4] adds r1, r0 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] strb r0, [r1, 0x3] ldrb r1, [r3] @@ -2072,7 +2072,7 @@ _080337D2: adds r0, r1 ldrb r0, [r0, 0x2] strb r0, [r2] - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex movs r4, 0x26 ldrsh r0, [r5, r4] adds r0, r1 @@ -2532,7 +2532,7 @@ dp01_build_cmdbuf_x0F_aa_b_cc_dddd_e_mlc_weather_00_x1Cbytes: @ 8033B0C lsls r0, 24 cmp r0, 0 bne _08033BAC - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r0, [r0] strb r0, [r7, 0xC] ands r6, r0 diff --git a/asm/rom4.s b/asm/rom4.s index bb941093b..5d26d3461 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -2607,10 +2607,10 @@ _08085ABC: bcs _08085AE4 movs r0, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _08085AB6 adds r0, r4, 0 diff --git a/asm/rom5.s b/asm/rom5.s index 4d5788e28..f90aabca5 100644 --- a/asm/rom5.s +++ b/asm/rom5.s @@ -233,10 +233,10 @@ _080A94F8: ldrh r0, [r0] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -257,7 +257,7 @@ _080A94F8: muls r0, r6 adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -364,7 +364,7 @@ sub_80A9614: @ 80A9614 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 adds r1, r4, 0 bl sub_805DC0C @@ -420,7 +420,7 @@ _080A96B2: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r4, 0 bl sub_805DD7C @@ -497,11 +497,11 @@ _080A9762: mov r2, r10 muls r2, r0 adds r0, r2, 0 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r9, r1 add r0, r9 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080A9786 b _080A9AA0 @@ -512,7 +512,7 @@ _080A9786: adds r0, r2, 0 add r0, r9 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -575,7 +575,7 @@ _080A9786: adds r0, r1, 0 add r0, r9 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldrb r2, [r4] lsls r1, r2, 4 adds r1, r2 @@ -714,11 +714,11 @@ _080A9968: mov r1, r10 muls r1, r0 adds r0, r1, 0 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r9, r2 add r0, r9 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080A998C b _080A9AA0 @@ -729,7 +729,7 @@ _080A998C: adds r0, r1, 0 add r0, r9 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -792,7 +792,7 @@ _080A998C: adds r0, r2, 0 add r0, r9 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldrb r2, [r4] lsls r1, r2, 4 adds r1, r2 @@ -924,7 +924,7 @@ _080A9B24: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -944,7 +944,7 @@ _080A9B6C: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0xA bl healthbar_draw_field_maybe @@ -958,7 +958,7 @@ _080A9BA0: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -1000,10 +1000,10 @@ _080A9BFC: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080A9C5E adds r0, r6, 0 @@ -1022,10 +1022,10 @@ _080A9C34: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080A9C5E adds r0, r6, 0 diff --git a/asm/rom6.s b/asm/rom6.s index b4701f5eb..ebb3c955a 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -2767,7 +2767,7 @@ sub_8136C8C: @ 8136C8C lsls r0, 24 lsrs r0, 24 mov r8, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty bl GetNature lsls r0, 24 lsrs r0, 24 @@ -4093,24 +4093,24 @@ _081377BC: movs r0, 0x64 adds r1, r6, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 movs r0, 0 strb r6, [r5] strb r0, [r5, 0x1] adds r0, r4, 0 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0813780A adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0813780A adds r0, r4, 0 movs r1, 0x43 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0813780A movs r0, 0x1 @@ -4160,7 +4160,7 @@ _08137838: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x43 bl sub_80EE4DC @@ -4283,16 +4283,16 @@ _08137946: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08137978 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =0x0000ffff ands r1, r0 cmp r1, r6 @@ -6542,11 +6542,11 @@ sub_8138C04: @ 8138C04 lsrs r0, 24 movs r1, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData cmp r0, 0xFF bne _08138C2C movs r0, 0x6 @@ -6555,7 +6555,7 @@ sub_8138C04: @ 8138C04 _08138C2C: adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData cmp r0, 0xC7 bls _08138C3C movs r0, 0x5 @@ -6563,7 +6563,7 @@ _08138C2C: _08138C3C: adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData cmp r0, 0x95 bls _08138C4C movs r0, 0x4 @@ -6571,7 +6571,7 @@ _08138C3C: _08138C4C: adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData cmp r0, 0x63 bls _08138C5C movs r0, 0x3 @@ -6579,7 +6579,7 @@ _08138C4C: _08138C5C: adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData cmp r0, 0x31 bls _08138C6C movs r0, 0x2 @@ -6587,7 +6587,7 @@ _08138C5C: _08138C6C: adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _08138C7C movs r0, 0 @@ -7065,10 +7065,10 @@ sub_8139004: @ 8139004 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x16 - bl pokemon_getattr + bl GetMonData cmp r0, 0xC7 bls _08139028 movs r0, 0x1 @@ -7089,10 +7089,10 @@ sub_8139030: @ 8139030 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x17 - bl pokemon_getattr + bl GetMonData cmp r0, 0xC7 bls _08139054 movs r0, 0x1 @@ -7113,10 +7113,10 @@ sub_813905C: @ 813905C lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x18 - bl pokemon_getattr + bl GetMonData cmp r0, 0xC7 bls _08139080 movs r0, 0x1 @@ -7137,10 +7137,10 @@ sub_8139088: @ 8139088 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x21 - bl pokemon_getattr + bl GetMonData cmp r0, 0xC7 bls _081390AC movs r0, 0x1 @@ -7161,10 +7161,10 @@ sub_81390B4: @ 81390B4 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2F - bl pokemon_getattr + bl GetMonData cmp r0, 0xC7 bls _081390D8 movs r0, 0x1 @@ -7186,21 +7186,21 @@ _081390E6: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0813913C adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0813913C adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 lsls r1, r0, 3 @@ -7300,7 +7300,7 @@ sub_81391D0: @ 81391D0 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl GetNature lsls r0, 24 @@ -7484,11 +7484,11 @@ sub_8139348: @ 8139348 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x47 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 pop {r1} @@ -7512,7 +7512,7 @@ sub_8139370: @ 8139370 lsrs r0, 24 movs r1, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x47 @@ -7543,7 +7543,7 @@ sub_81393C8: @ 81393C8 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_806DC8C lsls r0, 16 @@ -7619,7 +7619,7 @@ sub_813945C: @ 813945C sub_813946C: @ 813946C push {r4,r5,lr} sub sp, 0x14 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty movs r1, 0x90 lsls r1, 1 movs r4, 0 @@ -7685,11 +7685,11 @@ sub_81394D8: @ 81394D8 _081394FA: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, r6 bne _0813951C movs r0, 0x1 @@ -7722,7 +7722,7 @@ sub_8139530: @ 8139530 thumb_func_start sub_8139540 sub_8139540: @ 8139540 push {lr} - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty movs r1, 0x3F bl sub_806DD7C lsls r0, 24 @@ -7895,12 +7895,12 @@ _08139698: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -7908,7 +7908,7 @@ _08139698: adds r0, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081396CC adds r0, r5, 0 @@ -7935,11 +7935,11 @@ sub_81396E0: @ 81396E0 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 pop {r1} @@ -8010,10 +8010,10 @@ sub_8139770: @ 8139770 ldrh r0, [r6] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData cmp r0, 0x2 bne _081397A6 ldrh r0, [r6] @@ -8022,7 +8022,7 @@ sub_8139770: @ 8139770 ldr r4, =gStringVar1 movs r1, 0x7 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData ldr r0, =gSaveBlock2Ptr ldr r0, [r0] adds r1, r4, 0 @@ -8213,10 +8213,10 @@ sub_813990C: @ 813990C _0813991C: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x4 - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 bne _08139938 movs r0, 0x1 @@ -8773,40 +8773,40 @@ sub_8139D98: @ 8139D98 ldrh r0, [r6] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData str r0, [sp] ldrh r0, [r6] muls r0, r5 adds r0, r4 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4] ldrh r0, [r6] muls r0, r5 adds r0, r4 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x8] ldrh r0, [r6] muls r0, r5 adds r0, r4 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData str r0, [sp, 0xC] ldrh r0, [r6] muls r0, r5 adds r0, r4 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x10] ldrh r0, [r6] muls r0, r5 adds r0, r4 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x14] ldr r1, =gUnknown_020375E2 movs r0, 0 @@ -9988,7 +9988,7 @@ _0813A7C6: ldrh r1, [r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl GetNature lsls r0, 24 diff --git a/asm/rom_8034C54.s b/asm/rom_8034C54.s index b5d60e749..c91cd93c0 100644 --- a/asm/rom_8034C54.s +++ b/asm/rom_8034C54.s @@ -3286,7 +3286,7 @@ _080369AE: ands r0, r1 cmp r0, 0 bne _080369E8 - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty ldr r0, =gUnknown_02038BCA ldrh r1, [r0] adds r0, r4, 0 @@ -3324,7 +3324,7 @@ _080369E8: negs r0, r0 ands r0, r2 strb r0, [r1] - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty movs r0, 0xFA lsls r0, 1 adds r5, r4, r0 @@ -3362,21 +3362,21 @@ _08036A72: movs r0, 0x64 mov r4, r9 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 cmp r5, 0 beq _08036AEE @@ -4249,7 +4249,7 @@ _080371E4: bl bitmask_all_link_players_but_self lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty movs r2, 0xC8 bl link_0800A448 ldr r1, =gUnknown_02024332 @@ -4264,7 +4264,7 @@ _08037200: b _0803744C _0803720E: bl sub_800A5B4 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty lsls r1, r5, 8 ldr r2, =gUnknown_020223C4 adds r1, r2 @@ -4716,7 +4716,7 @@ _0803767C: bl bitmask_all_link_players_but_self lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _08037686: movs r2, 0xC8 bl link_0800A448 @@ -4739,7 +4739,7 @@ _080376A2: ldrh r0, [r1, 0x18] cmp r0, 0 beq _080376E8 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty lsls r1, r7, 8 ldr r5, =gUnknown_020223C4 adds r1, r5 @@ -4757,7 +4757,7 @@ _080376A2: b _08037986 .pool _080376E8: - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty lsls r1, r6, 8 ldr r5, =gUnknown_020223C4 adds r1, r5 @@ -4849,7 +4849,7 @@ _080377BC: bl bitmask_all_link_players_but_self lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _08037686 .pool _080377CC: @@ -4867,7 +4867,7 @@ _080377DA: bne _080377EA b _08037986 _080377EA: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty ldr r1, =gUnknown_020223C4 movs r2, 0xC8 b _08037982 @@ -4936,7 +4936,7 @@ _08037872: movs r2, 0xC8 bl memcpy _0803788A: - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 bl shedinja_something adds r0, r4, 0 @@ -4957,7 +4957,7 @@ _0803788A: lsls r1, 1 adds r0, r4, r1 bl shedinja_something - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty adds r0, r4, 0 bl shedinja_something adds r0, r4, 0 @@ -5095,17 +5095,17 @@ _08037A12: movs r0, 0x64 adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r1, r8 lsls r5, r1, 5 strh r0, [r6] adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x2] movs r0, 0x4 add r0, r10 @@ -5114,29 +5114,29 @@ _08037A12: adds r0, r4, 0 movs r1, 0x2 adds r2, r7, 0 - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0xF] adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x10] adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x12] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData mov r1, r10 adds r1, 0x14 adds r5, r1 str r0, [r5] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [r6, 0x18] adds r0, r4, 0 bl pokemon_get_gender @@ -5145,7 +5145,7 @@ _08037A12: bl StripExtCtrlCodes adds r0, r4, 0 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 beq _08037AA4 adds r0, r7, 0 @@ -5757,7 +5757,7 @@ _08038032: bl bitmask_all_link_players_but_self lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty movs r2, 0xC8 bl link_0800A448 b _080383A6 @@ -5796,7 +5796,7 @@ _0803808C: cmp r0, 0x3 bne _0803812A _08038090: - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _08038110 .pool _08038098: @@ -5843,7 +5843,7 @@ _080380E4: cmp r0, 0x3 bne _0803812A _080380E8: - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _08038110 .pool _080380F0: @@ -5864,7 +5864,7 @@ _0803810A: cmp r0, 0x3 bne _0803812A _0803810E: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _08038110: adds r1, r4, 0 movs r2, 0xC8 @@ -6023,7 +6023,7 @@ _08038242: adds r6, 0x1 cmp r6, 0x3 ble _08038184 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 bl shedinja_something adds r0, r4, 0 @@ -6044,7 +6044,7 @@ _08038242: lsls r1, 1 adds r0, r4, r1 bl shedinja_something - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty adds r0, r4, 0 bl shedinja_something adds r0, r4, 0 @@ -7153,16 +7153,16 @@ _08038BE8: cmp r0, 0x3 bne _08038C0C _08038BF0: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty str r0, [sp, 0x4] - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty str r1, [sp, 0x8] b _08038C0C .pool _08038C04: - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty str r2, [sp, 0x4] - ldr r3, =gUnknown_02024744 + ldr r3, =gEnemyParty str r3, [sp, 0x8] _08038C0C: movs r7, 0 @@ -7183,17 +7183,17 @@ _08038C20: adds r4, r3, r4 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 cmp r5, 0 beq _08038C90 @@ -7262,17 +7262,17 @@ _08038CBA: adds r4, r2, r4 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 cmp r5, 0 beq _08038D2A @@ -8379,20 +8379,20 @@ shedinja_something: @ 803976C strb r0, [r5] adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldr r1, =0x0000012f cmp r0, r1 bne _080397B4 adds r0, r4, 0 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData ldrb r1, [r5] cmp r0, r1 beq _080397B4 adds r0, r4, 0 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData ldr r1, =gUnknown_0831ACA0 mov r0, sp bl StringCompareWithoutExtCtrlCodes @@ -8635,10 +8635,10 @@ _08039960: mov r1, r8 muls r1, r0 adds r0, r1, 0 - ldr r7, =gUnknown_02024744 + ldr r7, =gEnemyParty adds r0, r7 movs r1, 0 - bl pokemon_getattr + bl GetMonData cmp r4, 0xC9 bne _080399E4 ldrh r0, [r5] @@ -8647,7 +8647,7 @@ _08039960: adds r0, r1, 0 adds r0, r7 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 movs r0, 0xC0 lsls r0, 18 @@ -9486,9 +9486,9 @@ _08039FDC: movs r1, 0 ldr r2, =gUnknown_0202420B strb r1, [r2] - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex strb r1, [r0] - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather strh r1, [r2] ldr r1, =gUnknown_020243D0 movs r2, 0 @@ -9567,13 +9567,13 @@ _0803A0AE: adds r0, 0x20 strb r2, [r0] ldr r5, =gUnknown_0202432C - ldr r6, =gUnknown_020241F0 + ldr r6, =gBattleMoveDamage ldr r7, =gUnknown_020243FC ldr r0, =gUnknown_03005D54 mov r8, r0 ldr r1, =gUnknown_02024210 mov r9, r1 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r10, r2 ldr r1, =gUnknown_02024332 movs r2, 0 @@ -9606,7 +9606,7 @@ _0803A0FA: strb r4, [r0] mov r0, r10 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldr r6, [r5] adds r6, 0x7C ldr r2, =gBaseStats @@ -9701,7 +9701,7 @@ _0803A1E4: adds r2, 0x1 cmp r2, 0x43 bls _0803A1E4 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty bl sub_806EBA4 ldr r3, =gUnknown_03005D10 movs r1, 0x1 @@ -10079,7 +10079,7 @@ _0803A4B4: strb r1, [r0, 0x14] _0803A540: movs r0, 0 - ldr r6, =gUnknown_0202427C + ldr r6, =gBattleMoveFlags strb r0, [r6] mov r7, r9 ldrb r1, [r7] @@ -11178,11 +11178,11 @@ _0803AE96: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =gUnknown_03005D10 strh r0, [r1, 0x20] _0803AEC0: @@ -11294,16 +11294,16 @@ _0803AFAA: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0803AFD0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -11317,11 +11317,11 @@ _0803AFD0: _0803AFE8: adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData strh r0, [r5] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData _0803AFFA: str r0, [r6] adds r6, 0x8 @@ -11346,16 +11346,16 @@ _0803B026: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0803B04C adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -11369,11 +11369,11 @@ _0803B04C: _0803B060: adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData strh r0, [r5] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData _0803B072: str r0, [r6] adds r6, 0x8 @@ -11403,16 +11403,16 @@ _0803B0B2: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0803B0D8 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -11426,11 +11426,11 @@ _0803B0D8: _0803B0E8: adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData strh r0, [r5] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData _0803B0FA: str r0, [r6] adds r6, 0x8 @@ -12310,7 +12310,7 @@ _0803B834: ldr r3, =gUnknown_0202406C ldr r2, =gUnknown_0202449C ldr r6, =gUnknown_02024474 - ldr r7, =gUnknown_0202427C + ldr r7, =gBattleMoveFlags ldrb r0, [r3] cmp r5, r0 bge _0803B866 @@ -12451,7 +12451,7 @@ _0803B96E: strb r1, [r0] ldr r0, [r2] strb r1, [r0, 0x3] - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags strb r1, [r0] _0803B994: pop {r4-r6} @@ -12519,9 +12519,9 @@ _0803BA0E: strb r4, [r0, 0x18] strb r4, [r0, 0x19] strb r4, [r0, 0x14] - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage str r4, [r0] - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags strb r4, [r0] ldr r1, =gUnknown_02024332 movs r2, 0 @@ -14825,7 +14825,7 @@ b_first_side: @ 803CF10 ldrb r3, [r0] cmp r3, 0x21 bne _0803CF7C - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r1, [r0] movs r0, 0x7 ands r0, r1 @@ -14834,7 +14834,7 @@ b_first_side: @ 803CF10 _0803CF7C: cmp r3, 0x22 bne _0803CF98 - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r1, [r0] movs r0, 0x60 ands r0, r1 @@ -14857,7 +14857,7 @@ _0803CF9A: ldrb r2, [r0] cmp r2, 0x21 bne _0803CFBA - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r1, [r0] movs r0, 0x7 ands r0, r1 @@ -14866,7 +14866,7 @@ _0803CF9A: _0803CFBA: cmp r2, 0x22 bne _0803CFDA - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r1, [r0] movs r0, 0x60 ands r0, r1 @@ -16301,7 +16301,7 @@ _0803DCEE: ldr r0, =gUnknown_0202406E mov r8, r0 movs r7, 0x64 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty _0803DD10: ldrb r0, [r5] bl battle_side_get_owner @@ -16320,7 +16320,7 @@ _0803DD10: adds r0, r6 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x6] ldrb r0, [r5] lsls r0, 1 @@ -16331,7 +16331,7 @@ _0803DD10: movs r1, 0x2 adds r2, r4, 0 adds r2, 0x8 - bl pokemon_getattr + bl GetMonData b _0803DDA0 .pool _0803DD74: @@ -16343,7 +16343,7 @@ _0803DD74: adds r0, r6 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x26] ldrb r0, [r5] lsls r0, 1 @@ -16354,7 +16354,7 @@ _0803DD74: movs r1, 0x2 adds r2, r4, 0 adds r2, 0x14 - bl pokemon_getattr + bl GetMonData _0803DDA0: ldrb r0, [r5] adds r0, 0x1 @@ -16487,7 +16487,7 @@ _0803DEC2: movs r0, 0x64 adds r1, r6, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0 @@ -16553,7 +16553,7 @@ c4_overworld: @ 803DF70 ands r0, r5 cmp r0, 0 bne _0803DF8C - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 bl sub_806DCB4 adds r0, r4, 0 @@ -16589,7 +16589,7 @@ _0803DF9E: ands r4, r0 cmp r4, 0 beq _0803DFDE - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty bl sub_8161F18 ldrb r1, [r5] movs r0, 0x1 @@ -16721,7 +16721,7 @@ sub_803E0B8: @ 803E0B8 b _0803E83C .pool _0803E110: - ldr r1, =gUnknown_02024211 + ldr r1, =gCritMultiplier movs r0, 0x1 strb r0, [r1] ldr r1, =gUnknown_02024474 @@ -16730,7 +16730,7 @@ _0803E110: ldr r5, =0x000001a3 adds r0, r3, r5 strb r2, [r0] - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags strb r2, [r0] ldr r0, =gUnknown_02024212 strb r2, [r0] @@ -17015,7 +17015,7 @@ _0803E384: ldrh r0, [r0, 0x28] cmp r0, 0 beq _0803E400 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex strb r2, [r0] b _0803E76A .pool @@ -17181,12 +17181,12 @@ _0803E558: movs r0, 0x2 _0803E55A: bl battle_get_side_with_given_state - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] b _0803E578 .pool _0803E568: - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldr r0, =gUnknown_0202420B ldrb r0, [r0] ldr r1, =gUnknown_0202449C @@ -17199,7 +17199,7 @@ _0803E578: ldrb r0, [r7] ldr r1, =gBitTable mov r8, r1 - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r1, [r5] lsls r1, 2 add r1, r8 @@ -17261,7 +17261,7 @@ _0803E5E2: movs r2, 0x2 orrs r1, r2 strb r1, [r0] - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r4] strb r0, [r1] b _0803E76A @@ -17314,12 +17314,12 @@ _0803E694: movs r0, 0x2 _0803E696: bl battle_get_side_with_given_state - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] ldr r0, =gUnknown_02024210 ldrb r1, [r0] ldr r2, =gBitTable - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] lsls r0, 2 adds r0, r2 @@ -17341,7 +17341,7 @@ _0803E696: b _0803E758 .pool _0803E6E0: - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex mov r2, r8 ldrb r0, [r2] ldr r1, =gUnknown_0202449C @@ -17569,7 +17569,7 @@ sub_803E90C: @ 803E90C mov r5, r8 push {r5-r7} ldr r4, =gUnknown_0202420B - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldr r1, =gUnknown_0202407E ldr r0, =gUnknown_02024082 ldrb r0, [r0] @@ -18636,10 +18636,10 @@ bsC_8016D70: @ 803F300 ldr r0, =gUnknown_020241EA movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage movs r4, 0 str r4, [r0] - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags strb r1, [r0] ldr r5, =gUnknown_02024474 strb r1, [r5, 0x18] @@ -18707,7 +18707,7 @@ _0803F3E8: .4byte _0803F46C .4byte _0803F470 _0803F424: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] b _0803F47A .pool @@ -20348,7 +20348,7 @@ sub_80401D0: @ 80401D0 ldrb r4, [r0] adds r6, r1, 0 mov r10, r0 - ldr r7, =gUnknown_0202420C + ldr r7, =gEnemyMonIndex ldr r3, =gUnknown_0202449C mov r12, r3 cmp r9, r4 @@ -20894,7 +20894,7 @@ _0804067C: ldrh r0, [r0, 0x28] cmp r0, 0 beq _080406C4 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex strb r2, [r0] ldr r0, =gUnknown_082DB0B7 bl b_call_bc_move_exec @@ -20937,7 +20937,7 @@ _080406F0: b _080408F6 .pool _0804071C: - ldr r3, =gUnknown_020243CC + ldr r3, =gBattleWeather ldrh r2, [r3] movs r0, 0x7 ands r0, r2 @@ -20996,7 +20996,7 @@ _08040794: b _080408BA .pool _080407A0: - ldr r3, =gUnknown_020243CC + ldr r3, =gBattleWeather ldrh r2, [r3] movs r0, 0x18 ands r0, r2 @@ -21038,7 +21038,7 @@ _080407EC: b _080408B8 .pool _08040810: - ldr r3, =gUnknown_020243CC + ldr r3, =gBattleWeather ldrh r2, [r3] movs r0, 0x60 ands r0, r2 @@ -21072,7 +21072,7 @@ _08040858: b _080408B8 .pool _08040868: - ldr r3, =gUnknown_020243CC + ldr r3, =gBattleWeather ldrh r2, [r3] movs r0, 0x80 ands r0, r2 @@ -21267,7 +21267,7 @@ _08040A44: bne _08040A4C bl _080412DE _08040A4C: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldrh r0, [r0, 0x2C] lsrs r0, 4 str r0, [r1] @@ -21350,9 +21350,9 @@ _08040AF4: bne _08040B04 bl _080412DE _08040B04: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex strb r5, [r0] - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldrb r0, [r6] muls r0, r1 adds r0, r3 @@ -21393,7 +21393,7 @@ _08040B60: bne _08040B6A b _080412DE _08040B6A: - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldrh r0, [r1, 0x2C] lsrs r0, 3 str r0, [r2] @@ -21428,7 +21428,7 @@ _08040BAA: bne _08040BB4 b _080412DE _08040BB4: - ldr r5, =gUnknown_020241F0 + ldr r5, =gBattleMoveDamage ldrh r0, [r1, 0x2C] lsrs r0, 4 str r0, [r5] @@ -21490,7 +21490,7 @@ _08040C28: bne _08040C32 b _080412DE _08040C32: - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldrh r0, [r1, 0x2C] lsrs r0, 3 str r0, [r2] @@ -21532,7 +21532,7 @@ _08040C7A: ands r0, r1 cmp r0, 0 beq _08040CAC - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldrh r0, [r3, 0x2C] lsrs r0, 2 str r0, [r1] @@ -21573,7 +21573,7 @@ _08040CD6: bne _08040CE0 b _080412DE _08040CE0: - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldrh r0, [r1, 0x2C] lsrs r0, 2 str r0, [r2] @@ -21655,7 +21655,7 @@ _08040D30: ldr r1, =gUnknown_02024214 ldr r0, =gUnknown_082DB30E str r0, [r1] - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldrb r0, [r6] muls r0, r3 add r0, r8 @@ -22477,7 +22477,7 @@ _08041462: strb r0, [r5, 0x3] movs r0, 0xFF strb r0, [r5, 0x4] - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r4] strb r0, [r5] ldr r1, =gUnknown_0202420B @@ -22486,7 +22486,7 @@ _08041462: adds r0, r2 ldrb r0, [r0] strb r0, [r1] - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldrb r0, [r4] lsls r0, 2 adds r1, r7, 0 @@ -22649,7 +22649,7 @@ _080415BC: negs r1, r1 ands r0, r1 str r0, [r2] - ldr r3, =gUnknown_020241F0 + ldr r3, =gBattleMoveDamage ldr r2, =gBattleMons ldrb r1, [r5] movs r0, 0x58 @@ -22877,7 +22877,7 @@ _08041806: mov r8, r0 ldr r1, =gUnknown_0202420D mov r12, r1 - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex mov r5, r8 ldr r7, =gBattleMons ldr r6, =gUnknown_0202406E @@ -22979,7 +22979,7 @@ _080418E2: _080418F6: ldr r0, =gUnknown_0202420D mov r12, r0 - ldr r7, =gUnknown_0202420C + ldr r7, =gEnemyMonIndex ldr r5, =gUnknown_0202449C ldr r2, =gBattleMons ldr r6, =gBitTable @@ -23486,7 +23486,7 @@ _08041D7A: ldr r1, =gUnknown_02024214 ldr r0, =gUnknown_082DB6AD str r0, [r1] - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -23754,7 +23754,7 @@ _0804207C: ldr r0, =gUnknown_02024332 movs r4, 0x1 strb r1, [r0, 0x5] - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r5] strb r0, [r1] ldrb r0, [r5] @@ -23772,7 +23772,7 @@ _0804207C: movs r2, 0x1 movs r3, 0 bl sub_806957C - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage str r0, [r1] ldr r0, =gUnknown_0202433C ldrb r1, [r5] @@ -23968,7 +23968,7 @@ _08042280: lsls r0, 1 mov r1, r10 str r0, [r1] - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldr r1, =gUnknown_02024288 ldrb r0, [r6] adds r0, r1 @@ -24135,11 +24135,11 @@ _08042424: adds r0, r4, 0 bl battle_side_get_owner lsls r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r8, r1 cmp r0, 0 bne _08042442 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r8, r2 _08042442: movs r0, 0x2 @@ -24159,17 +24159,17 @@ _08042456: adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08042486 adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08042486 adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -24199,7 +24199,7 @@ _0804249C: lsls r0, 24 cmp r0, 0 bne _080424D0 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r8, r2 adds r0, r4, 0 bl sub_806D864 @@ -24208,7 +24208,7 @@ _0804249C: b _08042502 .pool _080424D0: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty mov r8, r0 movs r1, 0x1 eors r1, r4 @@ -24225,11 +24225,11 @@ _080424E4: adds r0, r4, 0 bl battle_side_get_owner lsls r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r8, r1 cmp r0, 0 bne _08042502 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r8, r2 _08042502: adds r0, r7, 0 @@ -24251,17 +24251,17 @@ _0804251A: adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804254A adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804254A adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -24295,7 +24295,7 @@ _0804256C: lsrs r0, 24 cmp r0, 0x1 bne _080425DA - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty mov r8, r0 movs r6, 0x3 cmp r4, 0x1 @@ -24317,17 +24317,17 @@ _0804259E: adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804259C adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804259C adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -24352,7 +24352,7 @@ _080425DA: bl battle_get_side_with_given_state lsls r0, 24 lsrs r6, r0, 24 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r8, r2 b _08042620 .pool @@ -24365,7 +24365,7 @@ _08042608: bl battle_get_side_with_given_state lsls r0, 24 lsrs r6, r0, 24 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty mov r8, r0 _08042620: mov r1, r10 @@ -24394,17 +24394,17 @@ _08042642: adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08042692 adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08042692 adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -24528,7 +24528,7 @@ _08042760: movs r0, 0 b _08042818 _08042764: - ldr r1, =gUnknown_020243CC + ldr r1, =gBattleWeather ldrh r0, [r1] movs r2, 0xE7 ands r2, r0 @@ -24675,7 +24675,7 @@ _08042864: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _080428A4 .pool _08042894: @@ -24686,10 +24686,10 @@ _08042894: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _080428A4: adds r7, r1, r0 - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldr r1, =gUnknown_0202406C ldrb r0, [r5] ldrb r1, [r1] @@ -24710,7 +24710,7 @@ _080428B6: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _080428F8 .pool _080428E8: @@ -24721,28 +24721,28 @@ _080428E8: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _080428F8: adds r5, r1, r0 adds r0, r7, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x8] adds r0, r7, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x10] adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 str r0, [sp, 0xC] adds r0, r5, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x14] ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -24927,7 +24927,7 @@ _08042AB4: .4byte _08042B28 .4byte _08042AE0 _08042AE0: - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather ldrh r1, [r2] movs r0, 0x7 ands r0, r1 @@ -24943,7 +24943,7 @@ _08042AE0: b _08042B42 .pool _08042B04: - ldr r3, =gUnknown_020243CC + ldr r3, =gBattleWeather ldrh r1, [r3] movs r2, 0x18 adds r0, r2, 0 @@ -24959,7 +24959,7 @@ _08042B04: b _08042B42 .pool _08042B28: - ldr r3, =gUnknown_020243CC + ldr r3, =gBattleWeather ldrh r1, [r3] movs r2, 0x60 adds r0, r2, 0 @@ -24992,7 +24992,7 @@ _08042B56: bl _0804441E .pool _08042B78: - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather ldrh r1, [r2] movs r0, 0x4 ands r0, r1 @@ -25010,7 +25010,7 @@ _08042B88: bl _080443D0 .pool _08042BA8: - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather ldrh r1, [r2] movs r0, 0x10 ands r0, r1 @@ -25028,7 +25028,7 @@ _08042BB8: bl _080443D0 .pool _08042BD8: - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather ldrh r1, [r2] movs r0, 0x40 ands r0, r1 @@ -25197,7 +25197,7 @@ _08042D3E: beq _08042D56 bl _0804441E _08042D56: - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r1, [r0] movs r0, 0x7 ands r0, r1 @@ -25214,7 +25214,7 @@ _08042D72: strb r5, [r7] ldr r0, =gUnknown_082DB45C bl b_push_move_exec - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldrh r0, [r4, 0x2C] lsrs r0, 4 str r0, [r1] @@ -25641,7 +25641,7 @@ _08043178: bl _0804441E .pool _0804318C: - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldrh r0, [r1, 0x2C] lsrs r0, 2 str r0, [r2] @@ -25719,7 +25719,7 @@ _080431C8: .4byte _0804441E .4byte _0804379C _08043288: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -25742,7 +25742,7 @@ _080432A0: bl _0804441E _080432B4: ldr r2, =gUnknown_0202437C - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] lsls r0, r1, 2 adds r0, r1 @@ -25803,7 +25803,7 @@ _0804330E: bl _080443D0 .pool _08043350: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -25832,7 +25832,7 @@ _08043376: bl _0804441E _08043388: ldr r2, =gUnknown_0202437C - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] lsls r0, r1, 2 adds r0, r1 @@ -25864,7 +25864,7 @@ _080433B0: bne _080433CA bl _0804441E _080433CA: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldrh r0, [r3, 0x2C] lsrs r0, 4 str r0, [r1] @@ -25879,7 +25879,7 @@ _080433D8: bl _080443D0 .pool _08043410: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -25908,7 +25908,7 @@ _08043436: bl _0804441E _08043448: ldr r2, =gUnknown_0202437C - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] lsls r0, r1, 2 adds r0, r1 @@ -25980,7 +25980,7 @@ _080434BC: bl _080443D0 .pool _08043508: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -26009,7 +26009,7 @@ _0804352E: bl _0804441E _08043540: ldr r2, =gUnknown_0202437C - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] lsls r0, r1, 2 adds r0, r1 @@ -26066,7 +26066,7 @@ _08043598: bl _080443D0 .pool _080435E4: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -26095,7 +26095,7 @@ _0804360A: bl _0804441E _0804361C: ldr r2, =gUnknown_0202437C - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] lsls r0, r1, 2 adds r0, r1 @@ -26152,7 +26152,7 @@ _08043674: bl _080443D0 .pool _080436C0: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -26193,7 +26193,7 @@ _080436F8: bl _0804441E _08043710: ldr r2, =gUnknown_0202437C - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] lsls r0, r1, 2 adds r0, r1 @@ -26238,7 +26238,7 @@ _08043750: bl _080443D0 .pool _0804379C: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -26281,7 +26281,7 @@ _080437D8: bl _0804441E _080437F0: ldr r3, =gUnknown_0202437C - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r1, [r5] lsls r0, r1, 2 adds r0, r1 @@ -26808,7 +26808,7 @@ _08043CF8: adds r0, 0x40 strb r0, [r1, 0x3] ldr r1, =gUnknown_02024474 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] strb r0, [r1, 0x17] bl b_movescr_stack_push_cursor @@ -27798,7 +27798,7 @@ _0804457C: _08044592: str r0, [sp, 0x10] ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -27978,7 +27978,7 @@ _0804477A: beq _08044782 bl _080451D6 _08044782: - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage mov r3, r9 str r3, [r4] ldrh r3, [r2, 0x28] @@ -28013,7 +28013,7 @@ _080447B8: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _080447EA .pool _080447DC: @@ -28023,7 +28023,7 @@ _080447DC: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _080447EA: adds r4, r1, r0 movs r1, 0 @@ -28033,17 +28033,17 @@ _080447F2: mov r1, r10 adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 mov r1, r10 adds r1, 0x11 adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData strb r0, [r5] adds r0, r4, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r1, r0, 24 cmp r6, 0 @@ -28171,7 +28171,7 @@ _08044930: beq _08044938 bl _080451D6 _08044938: - ldr r3, =gUnknown_020241F0 + ldr r3, =gBattleMoveDamage ldrh r0, [r1, 0x2C] lsrs r0, 4 str r0, [r3] @@ -28227,7 +28227,7 @@ _0804499E: strb r6, [r1, 0x2] movs r0, 0xFF strb r0, [r1, 0x3] - ldr r5, =gUnknown_020241F0 + ldr r5, =gBattleMoveDamage ldrh r0, [r4, 0x2C] mov r1, r9 bl __divsi3 @@ -28289,7 +28289,7 @@ _08044A1C: strb r6, [r1, 0x2] movs r0, 0xFF strb r0, [r1, 0x3] - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldrh r0, [r5, 0x2C] mov r1, r9 bl __divsi3 @@ -28351,7 +28351,7 @@ _08044A96: strb r0, [r1, 0x2] movs r0, 0xFF strb r0, [r1, 0x3] - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldrh r0, [r5, 0x2C] mov r1, r9 bl __divsi3 @@ -28422,7 +28422,7 @@ _08044B2A: strb r0, [r1, 0x2] movs r0, 0xFF strb r0, [r1, 0x3] - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldrh r0, [r5, 0x2C] mov r1, r9 bl __divsi3 @@ -28493,7 +28493,7 @@ _08044BBC: strb r0, [r1, 0x2] movs r0, 0xFF strb r0, [r1, 0x3] - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldrh r0, [r5, 0x2C] mov r1, r9 bl __divsi3 @@ -29717,7 +29717,7 @@ _080456C8: b _0804582A .pool _080456D0: - ldr r7, =gUnknown_020241F0 + ldr r7, =gBattleMoveDamage ldr r0, [r7] cmp r0, 0 bne _080456DA @@ -29731,7 +29731,7 @@ _080456DA: b _0804582A .pool _080456EC: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -29740,7 +29740,7 @@ _080456EC: b _0804582A _080456FA: ldr r2, =gUnknown_0202437C - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r1, [r4] lsls r0, r1, 2 adds r0, r1 @@ -29800,14 +29800,14 @@ _08045720: b _0804582A .pool _08045794: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r0, [r0] movs r5, 0x29 ands r5, r0 cmp r5, 0 bne _0804582A ldr r1, =gUnknown_0202437C - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r2, [r4] lsls r0, r2, 2 adds r0, r2 @@ -30299,11 +30299,11 @@ sub_8045C44: @ 8045C44 ldrh r0, [r5] movs r7, 0x64 muls r0, r7 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty adds r0, r6 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xCD lsls r1, 1 cmp r0, r1 @@ -30313,7 +30313,7 @@ sub_8045C44: @ 8045C44 adds r0, r6 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0x97 beq _08045C98 _08045C8A: @@ -30326,11 +30326,11 @@ _08045C98: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x50 movs r2, 0 - bl pokemon_getattr + bl GetMonData _08045CAE: pop {r4-r7} pop {r1} @@ -30565,7 +30565,7 @@ _08045E6E: ldrh r0, [r4] movs r1, 0 bl sub_80458E0 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] ldr r2, =gUnknown_02024280 ldr r0, [r2] @@ -30668,9 +30668,9 @@ _08045F8C: movs r2, 0x1 movs r3, 0 bl sub_806957C - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage str r0, [r1] - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r4] strb r0, [r1] ldr r1, =gUnknown_02024214 @@ -30744,7 +30744,7 @@ _08046064: beq _08046072 b _08046398 _08046072: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] str r2, [sp] movs r0, 0x2 @@ -30792,7 +30792,7 @@ _0804608A: ldr r1, =gUnknown_02024214 ldr r0, =gUnknown_082DB07A str r0, [r1] - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -30834,7 +30834,7 @@ _08046108: b _08046398 .pool _08046150: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r2, 0x1 orrs r1, r2 @@ -30849,7 +30849,7 @@ _08046160: orrs r0, r1 str r0, [r2] ldr r2, =gUnknown_0202433C - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r3, [r1] lsls r0, r3, 4 adds r0, r2 @@ -31018,13 +31018,13 @@ _080462FA: ldr r0, =gUnknown_0202420B ldrb r0, [r0] bl b_cancel_multi_turn_move_maybe - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 strb r0, [r2] ldr r1, =gUnknown_02024250 - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r0, [r3] lsls r0, 1 adds r0, r1 @@ -31090,14 +31090,14 @@ mcmd_jump_if_move_not_executed: @ 80463AC ldr r1, =gUnknown_02024214 ldr r5, [r1] adds r4, r5, r0 - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 cmp r0, 0 beq _0804640C ldr r1, =gUnknown_02024250 - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r0, [r3] lsls r0, 1 adds r0, r1 @@ -31122,7 +31122,7 @@ mcmd_jump_if_move_not_executed: @ 80463AC .pool _0804640C: bl b_feature_update_destiny_bond - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] str r6, [sp] movs r0, 0x3 @@ -31147,7 +31147,7 @@ _0804642A: atk40_801DBA0: @ 804643C push {lr} ldr r1, =gUnknown_0202433C - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] lsls r0, 4 adds r0, r1 @@ -31167,7 +31167,7 @@ atk40_801DBA0: @ 804643C ands r0, r1 cmp r0, 0 beq _0804649C - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -31198,7 +31198,7 @@ sub_80464AC: @ 80464AC lsrs r3, r0, 16 movs r4, 0 ldr r1, =gUnknown_0202433C - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] lsls r0, 4 adds r0, r1 @@ -31218,7 +31218,7 @@ sub_80464AC: @ 80464AC ands r0, r1 cmp r0, 0 beq _080464F8 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -31245,7 +31245,7 @@ sub_8046518: @ 8046518 lsls r0, 16 lsrs r5, r0, 16 ldr r2, =gUnknown_020242AC - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r4, [r3] lsls r0, r4, 2 adds r0, r2 @@ -31283,7 +31283,7 @@ _0804654A: cmp r0, 0 beq _08046590 _0804656A: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r2, 0x1 orrs r1, r2 @@ -31351,7 +31351,7 @@ _080465D2: lsls r0, 24 cmp r0, 0 bne _08046622 - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r1, [r0] movs r0, 0x7 ands r0, r1 @@ -31411,7 +31411,7 @@ atk01_accuracycheck: @ 8046660 cmp r1, 0x1 bhi _0804671C ldr r2, =gUnknown_020242AC - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r4, [r3] lsls r0, r4, 2 adds r0, r2 @@ -31516,7 +31516,7 @@ _08046760: b _080469D2 _0804676E: ldr r3, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] movs r2, 0x58 adds r4, r0, 0 @@ -31589,7 +31589,7 @@ _080467D0: lsls r0, 24 cmp r0, 0 bne _08046822 - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r1, [r0] movs r0, 0x60 ands r0, r1 @@ -31651,7 +31651,7 @@ _08046860: lsls r0, 24 cmp r0, 0 bne _080468B8 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] muls r0, r5 adds r0, r7 @@ -31659,7 +31659,7 @@ _08046860: ldrb r0, [r0] cmp r0, 0x8 bne _080468B8 - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r1, [r0] movs r0, 0x18 ands r0, r1 @@ -31695,7 +31695,7 @@ _080468B8: lsls r0, 16 lsrs r4, r0, 16 _080468E4: - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex mov r8, r2 ldrb r2, [r2] movs r7, 0x58 @@ -31730,7 +31730,7 @@ _08046928: lsrs r2, r0, 24 _08046944: ldr r0, =gUnknown_0202420F - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r1, [r1] strb r1, [r0] cmp r5, 0x16 @@ -31753,7 +31753,7 @@ _08046960: adds r0, 0x1 cmp r0, r4 ble _080469CA - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -31911,7 +31911,7 @@ _08046ABC: adds r6, r0 b _08046AF6 _08046AD6: - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex mov r2, r9 ldrb r0, [r2] ldrb r7, [r1] @@ -32167,7 +32167,7 @@ _08046CF2: bls _08046D00 movs r5, 0x4 _08046D00: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -32207,12 +32207,12 @@ _08046D00: lsls r0, 16 cmp r0, 0 bne _08046D70 - ldr r1, =gUnknown_02024211 + ldr r1, =gCritMultiplier movs r0, 0x2 b _08046D74 .pool _08046D70: - ldr r1, =gUnknown_02024211 + ldr r1, =gCritMultiplier movs r0, 0x1 _08046D74: strb r0, [r1] @@ -32231,7 +32231,7 @@ atk05_cmd5: @ 8046D8C push {r4-r7,lr} sub sp, 0x10 ldr r4, =gUnknown_0202428E - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] bl battle_get_per_side_status movs r1, 0x1 @@ -32262,8 +32262,8 @@ atk05_cmd5: @ 8046D8C ldrb r4, [r5] str r4, [sp, 0xC] bl sub_806957C - ldr r4, =gUnknown_020241F0 - ldr r1, =gUnknown_02024211 + ldr r4, =gBattleMoveDamage + ldr r1, =gCritMultiplier ldrb r1, [r1] muls r1, r0 ldr r0, =gUnknown_02024474 @@ -32302,7 +32302,7 @@ _08046E10: lsls r0, 28 cmp r0, 0 bge _08046E32 - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r1, [r4] lsls r0, r1, 4 subs r0, r1 @@ -32360,10 +32360,10 @@ sub_8046E7C: @ 8046E7C str r7, [sp, 0x8] str r5, [sp, 0xC] bl sub_806957C - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage movs r1, 0 strh r1, [r6] - ldr r1, =gUnknown_02024211 + ldr r1, =gCritMultiplier ldrb r1, [r1] muls r1, r0 ldr r0, =gUnknown_02024474 @@ -32400,7 +32400,7 @@ _08046F0A: lsls r0, 28 cmp r0, 0 bge _08046F28 - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r1, [r4] lsls r0, r1, 4 subs r0, r1 @@ -32422,7 +32422,7 @@ battle_attack_damage_modulate_by_effectivity: @ 8046F60 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r5, =gUnknown_020241F0 + ldr r5, =gBattleMoveDamage ldr r0, [r5] muls r0, r4 movs r1, 0xA @@ -32448,7 +32448,7 @@ _08046F94: beq _08046FF0 b _08047032 _08046F9A: - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x8 orrs r0, r1 @@ -32469,7 +32469,7 @@ _08046FB0: ldrb r0, [r0, 0x1] cmp r0, 0 beq _08047032 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r1, [r2] movs r0, 0x29 ands r0, r1 @@ -32497,7 +32497,7 @@ _08046FF0: ldrb r0, [r0, 0x1] cmp r0, 0 beq _08047032 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r1, [r2] movs r0, 0x29 ands r0, r1 @@ -32575,7 +32575,7 @@ _08047078: cmp r0, r8 bne _080470B0 _0804709A: - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r1, [r4] lsls r0, r1, 4 subs r0, r1 @@ -32586,7 +32586,7 @@ _0804709A: str r0, [r4] ldr r3, [sp, 0x4] _080470B0: - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldrb r1, [r2] movs r0, 0x58 muls r0, r1 @@ -32601,7 +32601,7 @@ _080470B0: bne _08047128 ldr r3, =gUnknown_0202420A strb r0, [r3] - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x9 orrs r0, r1 @@ -32644,7 +32644,7 @@ _0804713C: adds r1, r3, 0x1 adds r1, r5 ldr r2, =gBattleMons - ldr r7, =gUnknown_0202420C + ldr r7, =gEnemyMonIndex ldrb r0, [r7] movs r6, 0x58 muls r0, r6 @@ -32684,7 +32684,7 @@ _08047172: _08047198: adds r3, 0x3 ldr r5, =gBattleMons - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldr r2, =gUnknown_0831ACE8 _080471A0: adds r0, r3, r2 @@ -32708,7 +32708,7 @@ _080471A4: beq _08047138 _080471C4: ldr r2, =gBattleMons - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r1, [r5] movs r0, 0x58 muls r0, r1 @@ -32726,7 +32726,7 @@ _080471C4: lsrs r0, 24 cmp r0, 0x2 bne _08047242 - ldr r1, =gUnknown_0202427C + ldr r1, =gBattleMoveFlags mov r8, r1 ldrb r4, [r1] ands r0, r4 @@ -32770,7 +32770,7 @@ _08047200: ldrb r1, [r3] bl b_history__record_ability_usage_of_player _08047242: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x8 ands r0, r1 @@ -32841,7 +32841,7 @@ _080472F4: mov r12, r1 _080472F8: ldr r2, =gBattleMons - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r1, [r3] movs r0, 0x58 muls r0, r1 @@ -32897,7 +32897,7 @@ _08047356: ldrb r0, [r0] cmp r0, 0 bne _08047396 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x8 orrs r0, r1 @@ -32933,7 +32933,7 @@ _08047396: ldrb r0, [r0] cmp r0, 0 bne _080473DC - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x8 orrs r0, r1 @@ -33121,7 +33121,7 @@ b_attack_effectivity_adapt: @ 804752C lsrs r4, r0, 24 lsls r1, 16 lsrs r5, r1, 16 - ldr r7, =gUnknown_020241F0 + ldr r7, =gBattleMoveDamage ldr r0, [r7] muls r0, r4 movs r1, 0xA @@ -33269,7 +33269,7 @@ _08047616: cmp r0, r1 bne _0804765C _0804764A: - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r1, [r4] lsls r0, r1, 4 subs r0, r1 @@ -33593,7 +33593,7 @@ sub_80478B8: @ 80478B8 subs r1, r0 lsls r1, 16 lsrs r1, 16 - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r0, [r4] cmp r0, 0 beq _080478EA @@ -33625,7 +33625,7 @@ atk07_cmd7: @ 80478F4 subs r1, r0 lsls r1, 16 lsrs r1, 16 - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r0, [r4] cmp r0, 0 beq _08047926 @@ -33640,7 +33640,7 @@ atk07_cmd7: @ 80478F4 str r0, [r4] _08047926: ldr r7, =gBattleMons - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r2, [r6] movs r5, 0x58 adds r0, r2, 0 @@ -33672,7 +33672,7 @@ _0804795C: lsrs r6, r0, 24 _08047976: ldr r1, =gUnknown_0202420F - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] strb r0, [r1] cmp r4, 0x27 @@ -33701,7 +33701,7 @@ _08047976: strb r1, [r0] _080479B4: ldr r2, =gBattleMons - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r4, [r3] movs r0, 0x58 muls r0, r4 @@ -33747,7 +33747,7 @@ _08047A06: muls r0, r4 adds r0, r5 ldrh r1, [r0, 0x28] - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldr r0, [r2] cmp r1, r0 bgt _08047A84 @@ -33761,7 +33761,7 @@ _08047A06: lsls r0, 30 cmp r0, 0 bge _08047A5C - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r2, 0x40 orrs r1, r2 @@ -33778,7 +33778,7 @@ _08047A5C: lsrs r0, 7 cmp r0, 0 beq _08047A84 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x80 orrs r0, r1 @@ -33812,7 +33812,7 @@ atk08_cmd8: @ 8047AA4 subs r1, r0 lsls r1, 16 lsrs r1, 16 - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r0, [r4] cmp r0, 0 beq _08047AD6 @@ -33827,7 +33827,7 @@ atk08_cmd8: @ 8047AA4 str r0, [r4] _08047AD6: ldr r7, =gBattleMons - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r2, [r6] movs r5, 0x58 adds r0, r2, 0 @@ -33859,7 +33859,7 @@ _08047B0C: lsrs r6, r0, 24 _08047B26: ldr r1, =gUnknown_0202420F - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] strb r0, [r1] cmp r4, 0x27 @@ -33888,7 +33888,7 @@ _08047B26: strb r1, [r0] _08047B64: ldr r4, =gBattleMons - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r2, [r6] movs r7, 0x58 adds r3, r2, 0 @@ -33921,7 +33921,7 @@ _08047B64: _08047BA2: adds r0, r3, r4 ldrh r1, [r0, 0x28] - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldr r0, [r2] cmp r1, r0 bgt _08047C10 @@ -33934,7 +33934,7 @@ _08047BA2: lsls r0, 30 cmp r0, 0 bge _08047BE8 - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r2, 0x40 orrs r1, r2 @@ -33951,7 +33951,7 @@ _08047BE8: lsrs r0, 7 cmp r0, 0 beq _08047C10 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x80 orrs r0, r1 @@ -34036,7 +34036,7 @@ _08047CB2: cmp r0, 0 bne _08047D88 _08047CBA: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -34047,7 +34047,7 @@ _08047CBA: ldrb r0, [r3] strb r0, [r1] ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 adds r4, r1, 0 @@ -34075,7 +34075,7 @@ _08047D18: mov r1, r12 adds r0, r4, r1 ldrh r2, [r0, 0x28] - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage ldr r1, [r0] movs r6, 0x1 adds r4, r0, 0 @@ -34087,7 +34087,7 @@ _08047D18: _08047D40: ldrb r6, [r3] _08047D42: - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage _08047D44: ldrh r1, [r5] ldr r5, =gUnknown_02024474 @@ -34167,7 +34167,7 @@ atk0B_graphicalhpupdate: @ 8047DE8 ldr r0, [r0] cmp r0, 0 bne _08047EAA - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -34212,7 +34212,7 @@ atk0B_graphicalhpupdate: @ 8047DE8 b _08047EA2 .pool _08047E68: - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage ldr r0, [r0] ldr r1, =0x00002710 cmp r0, r1 @@ -34230,7 +34230,7 @@ _08047E76: lsls r0, 24 cmp r0, 0 bne _08047EA2 - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage ldr r0, [r0] cmp r0, 0 ble _08047EA2 @@ -34284,7 +34284,7 @@ _08047EF4: adds r0, r2 ldrb r6, [r0, 0x2] _08047F04: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -34327,7 +34327,7 @@ _08047F12: cmp r3, 0 bne _08048028 adds r5, r1, 0 - ldr r6, =gUnknown_020241F0 + ldr r6, =gBattleMoveDamage ldr r4, [r6] cmp r5, r4 blt _08047FBC @@ -34409,7 +34409,7 @@ _08048028: ldr r1, =0xfffffeff ands r2, r1 str r2, [r0] - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldr r5, [r1] mov r12, r0 adds r7, r1, 0 @@ -34476,7 +34476,7 @@ _080480D4: ldr r1, =gUnknown_02024288 ldrb r0, [r5] adds r0, r1 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex _080480DC: ldrb r1, [r1] strb r1, [r0] @@ -34571,7 +34571,7 @@ _080481AC: ldrb r0, [r5] lsls r0, 4 adds r0, r3 - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex _080481B4: ldrb r1, [r2] strb r1, [r0, 0xC] @@ -34626,7 +34626,7 @@ _08048220: ldrb r0, [r5] lsls r0, 4 adds r0, r3 - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex _08048228: ldrb r1, [r2] strb r1, [r0, 0xD] @@ -34698,11 +34698,11 @@ atk0D_critmessage: @ 80482BC ldr r0, [r0] cmp r0, 0 bne _080482F2 - ldr r0, =gUnknown_02024211 + ldr r0, =gCritMultiplier ldrb r0, [r0] cmp r0, 0x2 bne _080482EA - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -34734,10 +34734,10 @@ atk0E_missmessage: @ 8048310 cmp r0, 0 bne _080483D0 ldr r4, =gUnknown_02024064 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] strb r0, [r4] - ldr r1, =gUnknown_0202427C + ldr r1, =gBattleMoveFlags ldrb r2, [r1] movs r0, 0x1 ands r0, r2 @@ -34837,7 +34837,7 @@ atk0F_resultmessage: @ 80483E0 beq _080483EE b _08048580 _080483EE: - ldr r1, =gUnknown_0202427C + ldr r1, =gBattleMoveFlags ldrb r2, [r1] movs r4, 0x1 adds r0, r4, 0 @@ -34912,7 +34912,7 @@ _08048474: _08048478: ldr r4, =gUnknown_02024208 ldr r2, =gBattleMons - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r1, [r3] movs r0, 0x58 muls r0, r1 @@ -34977,7 +34977,7 @@ _08048510: beq _08048558 ldr r4, =gUnknown_02024208 ldr r2, =gBattleMons - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r1, [r3] movs r0, 0x58 muls r0, r1 @@ -35277,12 +35277,12 @@ sub_8048760: @ 8048760 strb r0, [r3, 0x3] movs r7, 0x40 ldr r1, =gUnknown_02024474 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex b _080487C4 .pool _080487B8: ldr r2, =gUnknown_0202420E - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] strb r0, [r2] ldr r1, =gUnknown_02024474 @@ -35802,7 +35802,7 @@ _08048BEA: lsls r0, 24 cmp r0, 0 bne _08048C26 - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r1, [r0] movs r0, 0x60 ands r0, r1 @@ -36024,7 +36024,7 @@ _08048DE4: mov r10, r0 b _08048DF4 _08048DEA: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r2, 0x8 orrs r1, r2 @@ -36593,7 +36593,7 @@ _08049362: b _080499B2 .pool _08049390: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldr r0, =gUnknown_020241F4 ldr r0, [r0] cmp r0, 0 @@ -36839,7 +36839,7 @@ _080495A8: b _08049994 _080495D4: ldr r2, =gBattleMons - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r1] movs r5, 0x58 muls r0, r5 @@ -36973,7 +36973,7 @@ _0804967C: b _080499B2 .pool _08049720: - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r1, [r3] movs r0, 0x58 adds r2, r1, 0 @@ -36998,7 +36998,7 @@ _08049720: b _08049994 .pool _0804975C: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 adds r2, r1, 0 @@ -37028,7 +37028,7 @@ _08049790: b _080499B0 .pool _080497A8: - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r0, [r6] movs r2, 0x58 muls r0, r2 @@ -37076,7 +37076,7 @@ _08049808: b _080499B0 .pool _08049820: - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r0, =gUnknown_020241F4 ldr r0, [r0] movs r1, 0x3 @@ -37299,7 +37299,7 @@ _08049A20: ands r0, r2 cmp r0, 0 beq _08049A50 - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -37324,7 +37324,7 @@ _08049A50: ldrb r0, [r0, 0x3] cmp r0, 0 beq _08049A9A - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -37493,7 +37493,7 @@ _08049BE0: ldr r0, =gUnknown_0202420B ldrb r0, [r0] strb r0, [r1] - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] mov r9, r0 ldr r4, =gUnknown_082DA7AA @@ -37501,7 +37501,7 @@ _08049BE0: .pool _08049C08: ldr r1, =gUnknown_02024064 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] strb r0, [r1] ldr r0, =gUnknown_0202420B @@ -37578,11 +37578,11 @@ _08049CB0: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x20] _08049CCE: ldr r2, =gUnknown_02024280 @@ -37607,7 +37607,7 @@ _08049CCE: ldr r4, =gUnknown_02024214 ldr r0, [r4] bl b_movescr_stack_push - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage mov r0, r9 muls r0, r5 adds r0, r6 @@ -37617,7 +37617,7 @@ _08049CCE: str r0, [r4] _08049D0C: ldr r1, =gUnknown_020242AC - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r0, [r6] lsls r0, 2 adds r0, r1 @@ -38065,7 +38065,7 @@ sub_804A0DC: @ 804A0DC b _0804A106 .pool _0804A0FC: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] bl battle_get_per_side_status movs r4, 0x1 @@ -38431,16 +38431,16 @@ _0804A418: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804A486 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804A486 ldr r0, =gBitTable @@ -38455,7 +38455,7 @@ _0804A418: _0804A44C: adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, 0xAF @@ -38564,10 +38564,10 @@ _0804A538: ldrb r1, [r0, 0x10] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, 0xAF @@ -38605,10 +38605,10 @@ _0804A5AC: ldrb r1, [r0, 0x10] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData cmp r0, 0x64 bne _0804A5E8 ldr r1, [r5] @@ -38621,7 +38621,7 @@ _0804A5AC: _0804A5D0: movs r0, 0x5 strb r0, [r1, 0x1C] - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage str r2, [r0] b _0804ACB2 .pool @@ -38653,10 +38653,10 @@ _0804A616: ldrb r1, [r0, 0x10] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0804A630 b _0804A824 @@ -38668,7 +38668,7 @@ _0804A630: ands r3, r0 cmp r3, 0 beq _0804A664 - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage mov r2, r9 ldrh r0, [r2] str r0, [r1] @@ -38676,7 +38676,7 @@ _0804A630: b _0804A66A .pool _0804A664: - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage str r3, [r0] mov r9, r0 _0804A66A: @@ -38705,7 +38705,7 @@ _0804A68E: ands r0, r1 cmp r0, 0 beq _0804A6AA - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r1, [r4] movs r0, 0x96 muls r0, r1 @@ -38718,7 +38718,7 @@ _0804A6AA: ldrb r1, [r0, 0x10] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_806E8A8 lsls r0, 24 @@ -38735,12 +38735,12 @@ _0804A6AA: cmp r0, 0x2 bls _0804A6F8 ldr r7, =0x00000149 - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage mov r9, r0 b _0804A71A .pool _0804A6F8: - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r1, [r4] movs r0, 0x96 muls r0, r1 @@ -38754,7 +38754,7 @@ _0804A6F8: .pool _0804A714: ldr r7, =0x00000149 - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage mov r9, r1 _0804A71A: ldr r0, =gBattleTypeFlags @@ -38869,7 +38869,7 @@ _0804A78E: ldrb r1, [r0, 0x10] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gBattleMons ldr r1, =gUnknown_0202420D @@ -38907,10 +38907,10 @@ _0804A85A: ldrb r0, [r0, 0x10] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804A92A ldr r0, [r7] @@ -38918,7 +38918,7 @@ _0804A85A: muls r0, r6 adds r0, r5 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData cmp r0, 0x64 beq _0804A92A ldr r0, [r7] @@ -38926,7 +38926,7 @@ _0804A85A: muls r0, r6 adds r0, r5 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData ldr r4, =gUnknown_020244A8 ldr r1, [r4] ldr r1, [r1, 0x10] @@ -38936,7 +38936,7 @@ _0804A85A: muls r0, r6 adds r0, r5 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData ldr r1, [r4] ldr r1, [r1, 0x10] strh r0, [r1, 0x2] @@ -38945,7 +38945,7 @@ _0804A85A: muls r0, r6 adds r0, r5 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData ldr r1, [r4] ldr r1, [r1, 0x10] strh r0, [r1, 0x4] @@ -38954,7 +38954,7 @@ _0804A85A: muls r0, r6 adds r0, r5 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData ldr r1, [r4] ldr r1, [r1, 0x10] strh r0, [r1, 0x6] @@ -38963,7 +38963,7 @@ _0804A85A: muls r0, r6 adds r0, r5 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData ldr r1, [r4] ldr r1, [r1, 0x10] strh r0, [r1, 0x8] @@ -38972,7 +38972,7 @@ _0804A85A: muls r0, r6 adds r0, r5 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData ldr r1, [r4] ldr r1, [r1, 0x10] strh r0, [r1, 0xA] @@ -38983,7 +38983,7 @@ _0804A85A: ldrb r0, [r0] strb r0, [r4] ldrb r1, [r1, 0x10] - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage ldrh r2, [r0] movs r0, 0 bl dp01_build_cmdbuf_x19_a_bb @@ -39042,7 +39042,7 @@ _0804A988: adds r1, r0, 0 movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r2, 0 bl sub_805E990 @@ -39075,10 +39075,10 @@ _0804A9B2: mov r2, r8 muls r2, r0 adds r0, r2, 0 - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty adds r0, r7 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData strb r0, [r4, 0x4] movs r0, 0x1 negs r0, r0 @@ -39098,7 +39098,7 @@ _0804A9B2: ldr r1, =gUnknown_02024214 ldr r0, =gUnknown_082DABBD str r0, [r1] - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r2, =gUnknown_02023864 ldrb r1, [r6] lsls r1, 9 @@ -39133,7 +39133,7 @@ _0804A9B2: muls r0, r2 adds r0, r7 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r1, r4, 0 adds r1, 0x2A strb r0, [r1] @@ -39145,7 +39145,7 @@ _0804A9B2: adds r0, r2, 0 adds r0, r7 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x28] mov r1, r9 ldr r0, [r1] @@ -39155,7 +39155,7 @@ _0804A9B2: adds r0, r2, 0 adds r0, r7 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x2C] mov r1, r9 ldr r0, [r1] @@ -39165,7 +39165,7 @@ _0804A9B2: adds r0, r2, 0 adds r0, r7 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x2] mov r1, r9 ldr r0, [r1] @@ -39175,7 +39175,7 @@ _0804A9B2: adds r0, r2, 0 adds r0, r7 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x4] mov r1, r9 ldr r0, [r1] @@ -39185,7 +39185,7 @@ _0804A9B2: adds r0, r2, 0 adds r0, r7 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x6] mov r1, r9 ldr r0, [r1] @@ -39195,7 +39195,7 @@ _0804A9B2: adds r0, r2, 0 adds r0, r7 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x6] mov r1, r9 ldr r0, [r1] @@ -39205,7 +39205,7 @@ _0804A9B2: adds r0, r2, 0 adds r0, r7 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x8] mov r1, r9 ldr r0, [r1] @@ -39215,7 +39215,7 @@ _0804A9B2: adds r0, r2, 0 adds r0, r7 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0xA] _0804AB1E: ldr r0, =gUnknown_0202406E @@ -39243,10 +39243,10 @@ _0804AB2E: movs r5, 0x64 adds r0, r2, 0 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r1, r6, 0 adds r1, 0xDA strb r0, [r1] @@ -39255,7 +39255,7 @@ _0804AB2E: muls r0, r5 adds r0, r4 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData mov r1, r8 strh r0, [r1] ldr r0, [r7] @@ -39263,7 +39263,7 @@ _0804AB2E: muls r0, r5 adds r0, r4 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r1, r6, 0 adds r1, 0xDC strh r0, [r1] @@ -39272,7 +39272,7 @@ _0804AB2E: muls r0, r5 adds r0, r4 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData adds r1, r6, 0 adds r1, 0xB2 strh r0, [r1] @@ -39281,7 +39281,7 @@ _0804AB2E: muls r0, r5 adds r0, r4 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData adds r1, r6, 0 adds r1, 0xB4 strh r0, [r1] @@ -39290,7 +39290,7 @@ _0804AB2E: muls r0, r5 adds r0, r4 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData movs r2, 0xB6 adds r2, r6 mov r8, r2 @@ -39300,7 +39300,7 @@ _0804AB2E: muls r0, r5 adds r0, r4 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData mov r1, r8 strh r0, [r1] ldr r0, [r7] @@ -39308,14 +39308,14 @@ _0804AB2E: muls r0, r5 adds r0, r4 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData adds r1, r6, 0 adds r1, 0xB8 strh r0, [r1] b _0804AC2E .pool _0804AC28: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage movs r0, 0 str r0, [r1] _0804AC2E: @@ -39325,7 +39325,7 @@ _0804AC2E: b _0804ACB2 .pool _0804AC40: - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage ldr r0, [r0] cmp r0, 0 beq _0804AC58 @@ -39416,21 +39416,21 @@ _0804ACFC: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804AD2C adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0804AD2C adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r0, r6, r0 lsls r0, 16 lsrs r6, r0, 16 @@ -39446,16 +39446,16 @@ _0804AD4A: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804ADA2 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0804ADA2 ldr r0, =gBattleTypeFlags @@ -39481,7 +39481,7 @@ _0804AD4A: _0804AD94: adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r0, r6, r0 lsls r0, 16 lsrs r6, r0, 16 @@ -39504,16 +39504,16 @@ _0804ADBA: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804AE10 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0804AE10 ldr r0, =gBattleTypeFlags @@ -39538,7 +39538,7 @@ _0804ADBA: _0804AE02: adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r0, r6, r0 lsls r0, 16 lsrs r6, r0, 16 @@ -39678,14 +39678,14 @@ _0804AF22: thumb_func_start sub_804AF30 sub_804AF30: @ 804AF30 - ldr r1, =gUnknown_0202427C + ldr r1, =gBattleMoveFlags movs r0, 0 strb r0, [r1] ldr r0, =gUnknown_02024474 movs r2, 0 movs r1, 0x1 strb r1, [r0, 0xE] - ldr r0, =gUnknown_02024211 + ldr r0, =gCritMultiplier strb r1, [r0] ldr r0, =gUnknown_02024332 strb r2, [r0, 0x3] @@ -40615,7 +40615,7 @@ atk3B_8022C68: @ 804B600 cmp r0, 0 bne _0804B620 ldr r0, =gUnknown_02024064 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex b _0804B624 .pool _0804B620: @@ -40624,7 +40624,7 @@ _0804B620: _0804B624: ldrb r1, [r1] strb r1, [r0] - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage ldrh r1, [r0] movs r0, 0 bl dp01_build_cmdbuf_x18_0_aa_health_bar_update @@ -40662,7 +40662,7 @@ sub_804B664: @ 804B664 ldrb r0, [r0] bl sub_81A5718 _0804B67C: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags movs r1, 0 strb r1, [r0] ldr r0, =gUnknown_02024064 @@ -41508,7 +41508,7 @@ _0804BD38: .4byte _0804C570 _0804BD80: ldr r6, =gBattleMons - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r3, [r5] movs r7, 0x58 adds r2, r3, 0 @@ -41547,7 +41547,7 @@ _0804BDB4: bne _0804BDCC b _0804C184 _0804BDCC: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -41606,7 +41606,7 @@ _0804BE26: .pool _0804BE5C: ldr r4, =gBattleMons - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r2, [r6] movs r5, 0x58 mov r12, r5 @@ -41645,7 +41645,7 @@ _0804BE90: bne _0804BEA4 b _0804C184 _0804BEA4: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -41687,7 +41687,7 @@ _0804BEBA: b _0804C184 .pool _0804BF18: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0 str r0, [sp] @@ -41705,7 +41705,7 @@ _0804BF32: b _0804C184 .pool _0804BF3C: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0 str r0, [sp] @@ -41778,7 +41778,7 @@ _0804BFA0: _0804BFCC: cmp r2, 0xE2 bne _0804BFDE - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x20 ands r0, r1 @@ -41913,7 +41913,7 @@ _0804C0E2: b _0804C4B6 .pool _0804C0F4: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -41979,7 +41979,7 @@ _0804C184: .pool _0804C194: ldr r0, =gUnknown_0202437C - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r2, [r6] lsls r3, r2, 2 adds r1, r3, r2 @@ -42049,7 +42049,7 @@ _0804C21C: ldr r0, =gUnknown_02024064 ldrb r2, [r2] strb r2, [r0] - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r1] mov r4, r9 strb r0, [r4] @@ -42146,7 +42146,7 @@ _0804C308: negs r1, r1 strh r1, [r0] _0804C322: - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldrb r3, [r2] lsls r0, r3, 2 adds r0, r6 @@ -42168,7 +42168,7 @@ _0804C340: ands r0, r1 cmp r0, 0 beq _0804C3DC - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -42274,7 +42274,7 @@ _0804C3FC: ands r0, r1 cmp r0, 0 beq _0804C4B6 - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r0, [r4] cmp r3, r0 beq _0804C4B6 @@ -42286,7 +42286,7 @@ _0804C3FC: ands r1, r0 cmp r1, 0 bne _0804C4B6 - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -42377,7 +42377,7 @@ _0804C4E4: ands r4, r2 cmp r4, 0 bne _0804C568 - ldr r7, =gUnknown_0202420C + ldr r7, =gEnemyMonIndex ldrb r0, [r7] bl battle_get_per_side_status movs r1, 0x2 @@ -42476,7 +42476,7 @@ atk4A_damagecalc2: @ 804C5F4 ldrb r0, [r0, 0x2] mov r8, r0 ldr r2, =gBattleMons - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r1, [r3] movs r0, 0x58 muls r0, r1 @@ -42492,7 +42492,7 @@ atk4A_damagecalc2: @ 804C5F4 bne _0804C688 ldr r3, =gUnknown_0202420A strb r0, [r3] - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x9 orrs r0, r1 @@ -42511,7 +42511,7 @@ atk4A_damagecalc2: @ 804C5F4 b _0804C76A .pool _0804C678: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r2, 0x8 orrs r1, r2 @@ -42639,7 +42639,7 @@ _0804C74A: beq _0804C744 _0804C76A: ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex mov r8, r0 ldrb r1, [r0] movs r0, 0x58 @@ -42682,7 +42682,7 @@ _0804C7AC: beq _0804C7E6 ldr r3, =gUnknown_0202420A strb r6, [r3] - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -42700,7 +42700,7 @@ _0804C7AC: ldrb r1, [r3] bl b_history__record_ability_usage_of_player _0804C7E6: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x8 ands r0, r1 @@ -43175,11 +43175,11 @@ _0804CC28: bl battle_side_get_owner lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty mov r8, r1 cmp r0, 0x1 bne _0804CC4E - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty mov r8, r0 _0804CC4E: movs r4, 0 @@ -43201,17 +43201,17 @@ _0804CC64: adds r5, r1, r0 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804CC9E adds r0, r5, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0804CC9E adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804CC9E ldr r0, =gUnknown_02024064 @@ -43248,11 +43248,11 @@ _0804CCC0: lsls r0, 24 cmp r0, 0 bne _0804CCEC - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _0804CD16 .pool _0804CCEC: - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r8, r1 ldrb r0, [r5] movs r4, 0x3 @@ -43267,11 +43267,11 @@ _0804CD00: bl battle_side_get_owner lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty mov r8, r1 cmp r0, 0x1 bne _0804CD18 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _0804CD16: mov r8, r0 _0804CD18: @@ -43298,17 +43298,17 @@ _0804CD3A: adds r5, r1, r0 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804CD74 adds r0, r5, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0804CD74 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804CD74 ldr r0, =gUnknown_02024064 @@ -43337,7 +43337,7 @@ _0804CD8C: lsrs r0, 24 cmp r0, 0x1 bne _0804CE10 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty mov r8, r0 movs r4, 0 ldrb r0, [r5] @@ -43358,17 +43358,17 @@ _0804CDBE: adds r5, r1, r0 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804CDFA adds r0, r5, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0804CDFA adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804CDFA ldr r0, =gUnknown_02024064 @@ -43411,7 +43411,7 @@ _0804CE10: _0804CE48: adds r6, r7, 0 _0804CE4A: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty mov r8, r0 b _0804CE82 .pool @@ -43435,7 +43435,7 @@ _0804CE54: _0804CE7C: adds r6, r7, 0 _0804CE7E: - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty mov r8, r1 _0804CE82: movs r4, 0 @@ -43446,17 +43446,17 @@ _0804CE84: adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804CEC6 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804CEC6 adds r0, r5, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0804CEC6 ldr r1, =gUnknown_0202406E @@ -44941,7 +44941,7 @@ _0804DB34: subs r1, r0 lsls r1, 25 lsrs r1, 24 - ldr r5, =gUnknown_020241F0 + ldr r5, =gBattleMoveDamage ldrb r0, [r4] muls r0, r6 adds r0, r7 @@ -45321,7 +45321,7 @@ atk59_8025230: @ 804DEEC ldrb r1, [r0, 0x10] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r2, 0x9] bl sub_8069318 @@ -45337,7 +45337,7 @@ _0804DF3A: ldrb r1, [r0, 0x10] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0 bl sub_8069318 @@ -45577,7 +45577,7 @@ _0804E162: b _0804E3B8 _0804E170: bl FreeAllWindowBuffers - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty ldr r1, =gUnknown_0202449C ldr r1, [r1] ldrb r1, [r1, 0x10] @@ -45654,11 +45654,11 @@ _0804E224: mov r1, r8 muls r1, r0 adds r0, r1, 0 - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty adds r0, r7 adds r1, r5, 0 adds r1, 0xD - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 adds r0, r4, 0 @@ -45978,7 +45978,7 @@ atk5C_cmd5c: @ 804E508 bl get_battle_side_of_something ldr r2, =gUnknown_02024064 strb r0, [r2] - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -46350,7 +46350,7 @@ atk5F_8025B24: @ 804E818 ldr r2, =gUnknown_0202420B ldrb r3, [r2] strb r3, [r0] - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r1] strb r0, [r2] strb r3, [r1] @@ -46421,11 +46421,11 @@ atk61_8025BA4: @ 804E898 ldrb r0, [r1] bl battle_side_get_owner lsls r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r8, r1 cmp r0, 0 bne _0804E8CA - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty mov r8, r0 _0804E8CA: movs r7, 0 @@ -46438,12 +46438,12 @@ _0804E8D0: adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0804E8F4 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -46457,11 +46457,11 @@ _0804E8F4: _0804E914: adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData strh r0, [r5] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData _0804E926: str r0, [r6] adds r6, 0x8 @@ -46884,7 +46884,7 @@ _0804ECC2: atk69_8025FE0: @ 804ECDC push {r4-r7,lr} ldr r7, =gBattleMons - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r2, [r6] movs r5, 0x58 adds r0, r2, 0 @@ -46916,7 +46916,7 @@ _0804ED10: lsrs r6, r0, 24 _0804ED2A: ldr r1, =gUnknown_0202420F - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] strb r0, [r1] cmp r4, 0x27 @@ -46945,7 +46945,7 @@ _0804ED2A: strb r1, [r0] _0804ED68: ldr r2, =gBattleMons - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r4, [r3] movs r0, 0x58 muls r0, r4 @@ -46991,7 +46991,7 @@ _0804EDBA: muls r0, r4 adds r0, r5 ldrh r1, [r0, 0x28] - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldr r0, [r2] cmp r1, r0 bgt _0804EE38 @@ -47005,7 +47005,7 @@ _0804EDBA: lsls r0, 30 cmp r0, 0 bge _0804EE10 - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r2, 0x40 orrs r1, r2 @@ -47022,7 +47022,7 @@ _0804EE10: lsrs r0, 7 cmp r0, 0 beq _0804EE38 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x80 orrs r0, r1 @@ -47341,7 +47341,7 @@ sub_804F100: @ 804F100 ldrb r1, [r0, 0x10] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 add r1, sp, 0x8 bl sub_81D388C @@ -47371,7 +47371,7 @@ sub_804F144: @ 804F144 ldrb r1, [r0, 0x10] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 add r1, sp, 0x4 bl sub_81D388C @@ -47477,10 +47477,10 @@ sub_804F220: @ 804F220 ldrb r0, [r0, 0x10] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 @@ -47651,10 +47651,10 @@ sub_804F384: @ 804F384 ldrb r0, [r0, 0x10] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -47664,7 +47664,7 @@ sub_804F384: @ 804F384 muls r0, r6 adds r0, r5 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 adds r0, r4, 0 movs r2, 0x1 @@ -48107,7 +48107,7 @@ atk75_8026A58: @ 804F754 ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r1, =gUnknown_02024208 ldrh r1, [r1] @@ -48187,7 +48187,7 @@ _0804F84C: .pool _0804F85C: ldr r1, =gUnknown_0202420B - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r0, [r4] strb r0, [r1] ldrb r0, [r1] @@ -48216,7 +48216,7 @@ _0804F85C: b _0804FD70 .pool _0804F8A8: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldr r1, =gUnknown_02024064 ldrb r1, [r1] strb r1, [r0] @@ -48233,7 +48233,7 @@ _0804F8CC: ldrh r0, [r0] movs r1, 0 bl sub_80458E0 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] b _0804FD70 .pool @@ -48862,7 +48862,7 @@ _0804FE80: ldr r1, =gUnknown_02024332 movs r0, 0x2 strb r0, [r1, 0x5] - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -48889,7 +48889,7 @@ atk78_faintifabilitynotdamp: @ 804FEC8 ldr r2, [r0] cmp r2, 0 bne _0804FFCC - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r2, [r1] ldr r0, =gUnknown_0202406C ldrb r3, [r0] @@ -48931,7 +48931,7 @@ _0804FF14: ldr r7, =gUnknown_0202420B ldrb r0, [r7] strb r0, [r4] - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldrb r1, [r4] movs r0, 0x58 muls r0, r1 @@ -49066,7 +49066,7 @@ sub_8050044: @ 8050044 adds r7, r3, 0 cmp r0, 0 beq _080500DC - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] adds r1, 0x1 strb r1, [r0] @@ -49137,14 +49137,14 @@ sub_80500E8: @ 80500E8 lsls r0, 24 orrs r2, r0 ldrb r0, [r1, 0x5] - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex cmp r0, 0x1 bne _08050110 ldr r0, =gUnknown_0202420B ldrb r0, [r0] strb r0, [r3] _08050110: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldr r6, =gBattleMons ldrb r0, [r3] movs r5, 0x58 @@ -49292,7 +49292,7 @@ _0805024A: ldrh r0, [r4] movs r1, 0 bl sub_80458E0 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] ldr r5, =gUnknown_02024214 ldr r3, =gUnknown_082D86A8 @@ -49340,13 +49340,13 @@ _080502AE: thumb_func_start sub_80502C8 sub_80502C8: @ 80502C8 push {lr} - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather ldrh r0, [r2] movs r1, 0x7 ands r1, r0 cmp r1, 0 beq _080502F4 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -49392,7 +49392,7 @@ atk7E_setreflect: @ 805031C ands r0, r1 cmp r0, 0 beq _0805035C - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -49470,7 +49470,7 @@ sub_80503E8: @ 80503E8 mov r7, r9 mov r6, r8 push {r6,r7} - ldr r7, =gUnknown_0202427C + ldr r7, =gBattleMoveFlags ldrb r5, [r7] movs r0, 0x29 ands r0, r5 @@ -49478,7 +49478,7 @@ sub_80503E8: @ 80503E8 bne _0805041A ldr r0, =gUnknown_020242AC mov r9, r0 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex mov r8, r1 ldrb r4, [r1] lsls r0, r4, 2 @@ -49573,13 +49573,13 @@ _080504C4: beq _08050510 b _08050518 _080504CA: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldr r0, [r1] negs r0, r0 b _08050516 .pool _080504D8: - ldr r3, =gUnknown_020241F0 + ldr r3, =gBattleMoveDamage ldr r0, [r3] lsrs r1, r0, 31 adds r0, r1 @@ -49590,7 +49590,7 @@ _080504D8: str r2, [r3] _080504EA: ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -49604,7 +49604,7 @@ _080504EA: b _08050518 .pool _08050510: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldr r0, [r1] lsls r0, 1 _08050516: @@ -49637,12 +49637,12 @@ atk81_setrest: @ 8050528 lsls r0, 24 orrs r6, r0 ldr r5, =gUnknown_02024064 - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldr r0, =gUnknown_0202420B ldrb r0, [r0] strb r0, [r2] strb r0, [r5] - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r1, =gBattleMons ldrb r0, [r2] movs r3, 0x58 @@ -49799,7 +49799,7 @@ _0805067C: beq _080506BC movs r3, 0 strb r2, [r6, 0x17] - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r1] cmp r0, 0xFF beq _080506DC @@ -49854,7 +49854,7 @@ sub_80506EC: @ 80506EC ldrb r0, [r1, 0x4] lsls r0, 24 orrs r4, r0 - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r0, [r6] bl sub_8050650 lsls r0, 24 @@ -49911,7 +49911,7 @@ sub_8050768: @ 8050768 ldrb r0, [r1, 0x9] cmp r0, 0x3 bne _080507A0 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -49990,10 +49990,10 @@ _08050828: ldrb r0, [r0, 0x6] cmp r0, 0x1 beq _080508B0 - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage mov r8, r0 ldr r4, =gUnknown_0202428E - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] bl battle_get_per_side_status movs r1, 0x1 @@ -50121,7 +50121,7 @@ _08050954: movs r0, 0 strb r0, [r4, 0x9] str r2, [r7] - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r6] strb r0, [r1] ldr r1, =gUnknown_02024332 @@ -50130,7 +50130,7 @@ _08050954: b _080509D0 .pool _08050984: - ldr r5, =gUnknown_020241F0 + ldr r5, =gBattleMoveDamage ldrh r0, [r1, 0x2C] ldrb r1, [r4, 0x9] movs r2, 0x3 @@ -50165,7 +50165,7 @@ _080509A0: ldr r0, [r7] adds r0, 0x5 str r0, [r7] - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r6] strb r0, [r1] _080509D0: @@ -50180,7 +50180,7 @@ _080509D0: thumb_func_start atk88_negativedamage atk88_negativedamage: @ 80509E8 push {lr} - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldr r0, =gUnknown_020241F4 ldr r0, [r0] lsrs r1, r0, 31 @@ -50230,7 +50230,7 @@ sub_8050A1C: @ 8050A1C .pool _08050A50: ldr r0, =gUnknown_02024064 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex _08050A54: ldrb r1, [r1] strb r1, [r0] @@ -50569,7 +50569,7 @@ _08050D32: cmp r0, 0 beq _08050DE2 movs r1, 0 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] ldr r3, =gUnknown_02024332 mov r8, r3 @@ -50635,7 +50635,7 @@ _08050DE2: .pool _08050DFC: movs r1, 0 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] ldr r2, =gUnknown_02024332 mov r8, r2 @@ -50691,7 +50691,7 @@ _08050E56: ands r3, r5 cmp r3, 0 beq _08050E70 - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r2, 0x1 orrs r1, r2 @@ -50943,7 +50943,7 @@ sub_8051064: @ 8051064 muls r1, r5 adds r1, r6 adds r1, 0x2A - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r3, [r4] adds r0, r3, 0 muls r0, r5 @@ -51040,15 +51040,15 @@ sub_805112C: @ 805112C bne _0805114A b _08051410 _0805114A: - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r0, [r4] bl battle_side_get_owner lsls r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty str r1, [sp] cmp r0, 0 bne _08051160 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty str r0, [sp] _08051160: ldr r2, [r5] @@ -51069,7 +51069,7 @@ _08051160: cmp r0, 0 beq _080511C8 _08051182: - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldrb r1, [r2] movs r0, 0x2 ands r0, r1 @@ -51131,7 +51131,7 @@ _08051202: movs r0, 0x1 str r0, [sp, 0x8] ldr r2, =gUnknown_0202406E - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] b _0805128E .pool @@ -51175,7 +51175,7 @@ _08051258: _08051260: str r1, [sp, 0x8] ldr r2, =gUnknown_0202406E - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] b _0805128E .pool @@ -51229,17 +51229,17 @@ _080512C4: adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080512F6 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080512F6 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080512F6 ldr r0, [sp, 0x4] @@ -51292,21 +51292,21 @@ _08051332: adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08051332 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 beq _08051332 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08051332 _08051378: - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r0, [r4] ldr r1, =gUnknown_0202449C ldr r1, [r1] @@ -51342,7 +51342,7 @@ _08051396: cmp r2, r0 bne _080513DE _080513C0: - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] lsls r4, r6, 24 lsrs r4, 24 @@ -51363,7 +51363,7 @@ _080513DE: ands r0, r1 cmp r0, 0 beq _08051414 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] lsls r1, r6, 24 lsrs r1, 24 @@ -51675,7 +51675,7 @@ atk92_setlightscreen: @ 8051664 ands r0, r1 cmp r0, 0 beq _080516A4 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -51753,7 +51753,7 @@ atk93_ko_move: @ 8051730 mov r6, r8 push {r6,r7} ldr r7, =gBattleMons - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r2, [r6] movs r5, 0x58 adds r0, r2, 0 @@ -51785,7 +51785,7 @@ _08051768: lsrs r6, r0, 24 _08051782: ldr r1, =gUnknown_0202420F - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] strb r0, [r1] cmp r4, 0x27 @@ -51814,7 +51814,7 @@ _08051782: strb r1, [r0] _080517C0: ldr r1, =gBattleMons - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldrb r3, [r2] movs r6, 0x58 adds r0, r3, 0 @@ -51827,7 +51827,7 @@ _080517C0: mov r9, r2 cmp r4, 0x5 bne _0805181C - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -51939,7 +51939,7 @@ _080518CA: adds r0, r6 adds r0, 0x2A ldrb r1, [r0] - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex mov r8, r0 ldrb r0, [r0] muls r0, r5 @@ -51981,7 +51981,7 @@ _08051934: _08051936: ldr r3, =gBattleMons mov r8, r3 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex mov r9, r0 cmp r4, 0 beq _08051A08 @@ -51995,14 +51995,14 @@ _08051942: lsls r0, 30 cmp r0, 0 bge _08051990 - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage movs r0, 0x58 muls r0, r2 add r0, r8 ldrh r0, [r0, 0x28] subs r0, 0x1 str r0, [r1] - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x40 b _080519EE @@ -52017,7 +52017,7 @@ _08051990: lsrs r0, 7 cmp r0, 0 beq _080519DC - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage movs r3, 0x58 adds r0, r2, 0 muls r0, r3 @@ -52025,7 +52025,7 @@ _08051990: ldrh r0, [r0, 0x28] subs r0, 0x1 str r0, [r1] - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x80 orrs r0, r1 @@ -52040,13 +52040,13 @@ _08051990: b _080519F2 .pool _080519DC: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage movs r0, 0x58 muls r0, r2 add r0, r8 ldrh r0, [r0, 0x28] str r0, [r1] - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x10 _080519EE: @@ -52060,7 +52060,7 @@ _080519F2: b _08051A70 .pool _08051A08: - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -52073,7 +52073,7 @@ _08051A08: muls r1, r2 adds r1, r3 adds r1, 0x2A - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] muls r0, r2 adds r0, r3 @@ -52117,9 +52117,9 @@ _08051A70: thumb_func_start atk94_gethalfcurrentenemyhp atk94_gethalfcurrentenemyhp: @ 8051A84 push {lr} - ldr r3, =gUnknown_020241F0 + ldr r3, =gBattleMoveDamage ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -52144,13 +52144,13 @@ _08051AA2: thumb_func_start sub_8051AC0 sub_8051AC0: @ 8051AC0 push {lr} - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather ldrh r1, [r2] movs r0, 0x18 ands r0, r1 cmp r0, 0 beq _08051AEC - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -52208,7 +52208,7 @@ _08051B36: beq _08051B4C b _08051C48 _08051B4C: - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather ldrh r1, [r2] movs r0, 0x18 ands r0, r1 @@ -52257,7 +52257,7 @@ _08051B4C: ands r1, r0 cmp r1, 0 bne _08051BD4 - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldrh r0, [r3, 0x2C] lsrs r0, 4 str r0, [r1] @@ -52267,7 +52267,7 @@ _08051B4C: b _08051BD8 .pool _08051BD4: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage movs r0, 0 _08051BD8: str r0, [r1] @@ -52306,7 +52306,7 @@ _08051BDA: ands r1, r0 cmp r1, 0 bne _08051C3C - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldrh r0, [r2, 0x2C] lsrs r0, 4 str r0, [r1] @@ -52317,13 +52317,13 @@ _08051BDA: b _08051C50 .pool _08051C3C: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage movs r0, 0 str r0, [r1] b _08051C50 .pool _08051C48: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage movs r0, 0 str r0, [r1] ldr r5, =gUnknown_0202420B @@ -52338,7 +52338,7 @@ _08051C50: ands r1, r0 cmp r1, 0 beq _08051C6A - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage movs r0, 0 str r0, [r1] _08051C6A: @@ -52373,7 +52373,7 @@ atk97_tryinfatuatetarget: @ 8051C90 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _08051CD8 .pool _08051CC8: @@ -52384,10 +52384,10 @@ _08051CC8: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _08051CD8: adds r5, r1, r0 - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r0, [r4] bl battle_side_get_owner lsls r0, 24 @@ -52400,7 +52400,7 @@ _08051CD8: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _08051D1C .pool _08051D0C: @@ -52411,30 +52411,30 @@ _08051D0C: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _08051D1C: adds r4, r1, r0 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r10, r0 adds r0, r5, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData mov r9, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r8, r0 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r7, r0, 0 - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] movs r6, 0x58 muls r0, r6 @@ -52668,7 +52668,7 @@ atk99_setmisteffect: @ 8051F58 ldrb r0, [r0, 0x4] cmp r0, 0 beq _08051F98 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x20 orrs r0, r1 @@ -52742,7 +52742,7 @@ atk9A_setincreasedcriticalchance: @ 8052000 ands r2, r3 cmp r2, 0 beq _08052040 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x20 orrs r0, r1 @@ -52781,7 +52781,7 @@ atk9B_transformdataexecution: @ 805205C adds r0, 0x1 str r0, [r1] ldr r7, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex mov r12, r0 ldrb r1, [r0] movs r6, 0x58 @@ -52805,7 +52805,7 @@ atk9B_transformdataexecution: @ 805205C cmp r2, 0 beq _080520D8 _080520A2: - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x20 orrs r0, r1 @@ -52972,7 +52972,7 @@ _08052216: ldrh r0, [r3, 0x28] cmp r0, r2 bhi _0805223C - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage movs r0, 0 str r0, [r1] ldr r1, =gUnknown_02024332 @@ -52981,7 +52981,7 @@ _08052216: b _08052290 .pool _0805223C: - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage str r1, [r4] cmp r1, 0 bne _08052248 @@ -53085,7 +53085,7 @@ atk9D_copyattack: @ 8052300 adds r7, r1, 0 strh r7, [r0] ldr r5, =gUnknown_02024248 - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r0, [r6] lsls r0, 1 adds r0, r5 @@ -53181,7 +53181,7 @@ _080523CE: adds r0, 0xC adds r1, r0 ldr r2, =gUnknown_02024248 - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r0, [r3] lsls r0, 1 adds r0, r2 @@ -53352,7 +53352,7 @@ _0805251C: ldrh r0, [r4] movs r1, 0 bl sub_80458E0 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] pop {r3} mov r8, r3 @@ -53364,7 +53364,7 @@ _0805251C: thumb_func_start atk9F_nightshadedamageeffect atk9F_nightshadedamageeffect: @ 8052584 - ldr r3, =gUnknown_020241F0 + ldr r3, =gBattleMoveDamage ldr r2, =gBattleMons ldr r0, =gUnknown_0202420B ldrb r1, [r0] @@ -53395,7 +53395,7 @@ _080525B8: lsls r0, r3, 2 adds r0, r3 lsls r3, r0, 1 - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r2, =gBattleMons ldr r0, =gUnknown_0202420B ldrb r1, [r0] @@ -53454,7 +53454,7 @@ atkA1_counterdamagecalculator: @ 8052608 ldrh r0, [r0, 0x28] cmp r0, 0 beq _080526BC - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage lsls r0, r3, 1 str r0, [r1] ldr r1, =gUnknown_02024294 @@ -53472,12 +53472,12 @@ atkA1_counterdamagecalculator: @ 8052608 ldrh r0, [r0, 0x28] cmp r0, 0 beq _08052690 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex strb r1, [r0] b _080526A0 .pool _08052690: - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldr r1, =gUnknown_0202433C ldr r0, =gUnknown_0202420B ldrb r0, [r0] @@ -53559,7 +53559,7 @@ atkA2_mirrorcoatdamagecalculator: @ 8052700 ldrh r0, [r0, 0x28] cmp r0, 0 beq _080527B4 - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage lsls r0, r3, 1 str r0, [r1] ldr r1, =gUnknown_02024294 @@ -53577,12 +53577,12 @@ atkA2_mirrorcoatdamagecalculator: @ 8052700 ldrh r0, [r0, 0x28] cmp r0, 0 beq _08052788 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex strb r1, [r0] b _08052798 .pool _08052788: - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldr r1, =gUnknown_0202433C ldr r0, =gUnknown_0202420B ldrb r0, [r0] @@ -53637,7 +53637,7 @@ atkA3_disablelastusedattack: @ 80527F8 push {r6,r7} movs r4, 0 ldr r2, =gBattleMons - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r1, [r3] movs r0, 0x58 muls r0, r1 @@ -53794,7 +53794,7 @@ atkA4_setencore: @ 805293C push {r5-r7} movs r5, 0 ldr r3, =gBattleMons - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r1, [r4] movs r0, 0x58 muls r0, r1 @@ -53942,7 +53942,7 @@ _08052A5E: sub_8052A70: @ 8052A70 push {r4-r7,lr} ldr r6, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex mov r12, r0 ldrb r0, [r0] movs r7, 0x58 @@ -53966,7 +53966,7 @@ sub_8052A70: @ 8052A70 ldrh r1, [r0, 0x28] adds r3, r1 asrs r3, 1 - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage subs r1, r3 str r1, [r4] ldr r2, =gUnknown_02024474 @@ -54266,7 +54266,7 @@ _08052D08: atkA7_setalwayshitflag: @ 8052D34 push {r4,lr} ldr r4, =gUnknown_020242AC - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r1, [r3] lsls r1, 2 adds r1, r4 @@ -54333,7 +54333,7 @@ atkA8_copymovepermanently: @ 8052D8C b _08052F18 _08052DC4: ldr r0, =gUnknown_02024240 - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldrb r1, [r2] lsls r1, 1 adds r1, r0 @@ -54468,7 +54468,7 @@ _08052E7A: movs r0, 0x2 strb r0, [r1, 0x1] ldr r3, =gUnknown_02024240 - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldrb r0, [r2] lsls r0, 1 adds r0, r3 @@ -54589,7 +54589,7 @@ move_weather_interaction: @ 8052FAC adds r3, r1, 0 cmp r0, 0x97 bne _08052FD0 - ldr r0, =gUnknown_020243CC + ldr r0, =gBattleWeather ldrh r1, [r0] movs r0, 0x60 ands r0, r1 @@ -54741,7 +54741,7 @@ _080530BC: ldrh r0, [r4] movs r1, 0 bl sub_80458E0 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] ldr r3, =gUnknown_02024214 ldr r2, [r3] @@ -54797,7 +54797,7 @@ b_feature_update_destiny_bond: @ 8053180 bl battle_side_get_owner lsls r0, 24 lsrs r5, r0, 24 - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r0, [r4] bl battle_side_get_owner lsls r0, 24 @@ -54902,7 +54902,7 @@ atkAD_reducepprandom: @ 8053260 push {r5-r7} sub sp, 0x4 ldr r4, =gUnknown_02024248 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r3, [r1] lsls r0, r3, 1 adds r0, r4 @@ -55076,7 +55076,7 @@ _080533B8: adds r0, 0x5 str r0, [r1] ldr r1, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r2, [r0] movs r0, 0x58 muls r0, r2 @@ -55140,11 +55140,11 @@ _08053454: ldrb r0, [r5] bl battle_side_get_owner lsls r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r10, r1 cmp r0, 0 bne _08053470 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r10, r2 _08053470: ldr r4, =gBattleMons @@ -55259,12 +55259,12 @@ _0805357E: add r4, r10 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r4, r0, 24 cmp r5, 0 @@ -55435,7 +55435,7 @@ _080536DE: atkAF_cursetarget: @ 805371C push {r4,r5,lr} ldr r5, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] movs r4, 0x58 adds r1, r0, 0 @@ -55468,7 +55468,7 @@ atkAF_cursetarget: @ 805371C _08053768: orrs r2, r3 str r2, [r1] - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldr r0, =gUnknown_0202420B ldrb r0, [r0] muls r0, r4 @@ -55559,7 +55559,7 @@ _0805381E: thumb_func_start atkB1_setforesight atkB1_setforesight: @ 805382C ldr r1, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r2, [r0] movs r0, 0x58 muls r2, r0 @@ -55673,7 +55673,7 @@ atkB3_rolloutdamagecalculation: @ 8053914 mov r7, r9 mov r6, r8 push {r6,r7} - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -55847,7 +55847,7 @@ _08053A60: atkB4_jumpifconfusedandattackmaxed: @ 8053A90 push {r4,r5,lr} ldr r5, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 adds r3, r1, 0 @@ -55898,7 +55898,7 @@ _08053AF2: thumb_func_start sub_8053AF8 sub_8053AF8: @ 8053AF8 push {r4,r5,lr} - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -56056,9 +56056,9 @@ _08053C5C: b _08053C8E .pool _08053C6C: - ldr r3, =gUnknown_020241F0 + ldr r3, =gBattleMoveDamage ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -56083,7 +56083,7 @@ _08053C8E: .pool _08053CAC: ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -56097,7 +56097,7 @@ _08053CAC: b _08053CE6 .pool _08053CD8: - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r1, [r2] movs r0, 0xF7 ands r0, r1 @@ -56129,7 +56129,7 @@ atkB8_setsafeguard: @ 8053CFC ands r0, r1 cmp r0, 0 beq _08053D40 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -56267,7 +56267,7 @@ _08053E3C: strb r3, [r1, 0x4] movs r0, 0xFF strb r0, [r1, 0x5] - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r2, [r1] ldr r0, =gUnknown_0202406C ldrb r3, [r0] @@ -56351,10 +56351,10 @@ _08053F10: movs r0, 0x2 _08053F12: bl battle_get_side_with_given_state - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] ldr r0, =gUnknown_0202421C - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r3, [r1] adds r0, r3, r0 ldrb r0, [r0] @@ -56417,7 +56417,7 @@ _08053F2A: cmp r1, r2 bge _08053FB6 ldr r6, =gUnknown_0202407E - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldr r4, =gUnknown_0202407A movs r3, 0xB adds r2, r0, 0 @@ -56438,7 +56438,7 @@ _08053FB6: movs r0, 0xE4 mov r1, r8 strh r0, [r1] - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldrb r0, [r2] ldr r7, =gUnknown_0202449C ldr r1, [r7] @@ -56491,13 +56491,13 @@ _0805404A: thumb_func_start sub_805405C sub_805405C: @ 805405C push {lr} - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather ldrh r1, [r2] movs r0, 0x60 ands r0, r1 cmp r0, 0 beq _08054088 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -56551,7 +56551,7 @@ _080540CC: bls _08054110 movs r0, 0xC strb r0, [r2, 0x19] - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldrb r0, [r4] muls r0, r3 adds r0, r5 @@ -56598,7 +56598,7 @@ atkBD_copyfoestats: @ 8054134 ldr r6, =gUnknown_0202420B movs r4, 0x58 ldr r3, =gUnknown_0202409C - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex _08054142: ldrb r0, [r6] adds r1, r0, 0 @@ -56642,7 +56642,7 @@ atkBE_breakfree: @ 805417C cmp r0, 0 beq _08054210 ldr r1, =gUnknown_02024474 - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r0, [r3] strb r0, [r1, 0x17] ldrb r0, [r5] @@ -56782,7 +56782,7 @@ atkBF_setcurled: @ 80542C8 atkC0_recoverbasedonsunlight: @ 80542F8 push {r4-r7,lr} sub sp, 0x4 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldr r5, =gUnknown_0202420B ldrb r0, [r5] strb r0, [r1] @@ -56795,7 +56795,7 @@ atkC0_recoverbasedonsunlight: @ 80542F8 ldrh r0, [r0, 0x2C] cmp r1, r0 beq _080543D8 - ldr r4, =gUnknown_020243CC + ldr r4, =gBattleWeather ldrh r0, [r4] cmp r0, 0 beq _0805434A @@ -56820,7 +56820,7 @@ atkC0_recoverbasedonsunlight: @ 80542F8 cmp r0, 0 beq _08054378 _0805434A: - ldr r3, =gUnknown_020241F0 + ldr r3, =gBattleMoveDamage ldr r2, =gBattleMons ldr r0, =gUnknown_0202420B ldrb r1, [r0] @@ -56839,7 +56839,7 @@ _08054378: ands r0, r1 cmp r0, 0 beq _080543A4 - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldrb r0, [r5] muls r0, r6 adds r0, r7 @@ -56854,7 +56854,7 @@ _08054378: b _080543B2 .pool _080543A4: - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldrb r0, [r5] muls r0, r6 adds r0, r7 @@ -57045,7 +57045,7 @@ atkC2_selectnexttarget: @ 8054524 push {r4-r7,lr} mov r7, r8 push {r7} - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex movs r1, 0 strb r1, [r0] ldr r1, =gUnknown_0202406C @@ -57104,7 +57104,7 @@ atkC3_setfutureattack: @ 8054598 sub sp, 0x14 ldr r0, =gUnknown_020243D0 mov r8, r0 - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r1, [r6] adds r0, r1, r0 ldrb r7, [r0] @@ -57253,13 +57253,13 @@ atkC4_802B910: @ 80546E4 ldrb r0, [r0] bl battle_side_get_owner lsls r0, 24 - ldr r7, =gUnknown_02024744 + ldr r7, =gEnemyParty cmp r0, 0 bne _080546FE - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty _080546FE: ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -57294,21 +57294,21 @@ _08054750: muls r0, r5 adds r0, r7, r0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08054794 ldrb r0, [r6] muls r0, r5 adds r0, r7, r0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08054794 ldrb r0, [r4] muls r0, r5 adds r0, r7, r0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -57317,7 +57317,7 @@ _08054750: muls r0, r5 adds r0, r7, r0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080547A4 _08054794: @@ -57350,7 +57350,7 @@ _080547A4: ldr r0, [r1] adds r0, 0x9 str r0, [r1] - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage mov r8, r2 ldr r5, =gBaseStats mov r1, r9 @@ -57359,7 +57359,7 @@ _080547A4: muls r0, r4 adds r0, r7, r0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r1, r0, 3 subs r1, r0 lsls r1, 2 @@ -57383,7 +57383,7 @@ _080547A4: muls r0, r4 adds r0, r7, r0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData lsls r0, 1 movs r1, 0x5 bl __udivsi3 @@ -57393,7 +57393,7 @@ _080547A4: muls r0, r1 str r0, [r2] ldr r3, =gBattleMons - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r2, [r1] movs r1, 0x58 muls r1, r2 @@ -57632,14 +57632,14 @@ _08054A2C: thumb_func_start sub_8054A48 sub_8054A48: @ 8054A48 push {lr} - ldr r3, =gUnknown_020243CC + ldr r3, =gBattleWeather ldrh r1, [r3] movs r2, 0x80 adds r0, r2, 0 ands r0, r1 cmp r0, 0 beq _08054A78 - ldr r2, =gUnknown_0202427C + ldr r2, =gBattleMoveFlags ldrb r0, [r2] movs r1, 0x1 orrs r0, r1 @@ -57671,7 +57671,7 @@ _08054A86: atkC9_jumpifattackandspecialattackcannotfall: @ 8054AA0 push {r4,lr} ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -57709,7 +57709,7 @@ _08054AF4: ldr r0, =gUnknown_0202420B ldrb r0, [r0] strb r0, [r4] - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldrb r1, [r4] movs r0, 0x58 muls r0, r1 @@ -57833,7 +57833,7 @@ atkCC_callterrainattack: @ 8054BEC ldrh r0, [r4] movs r1, 0 bl sub_80458E0 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] ldr r3, =gUnknown_082D86A8 ldr r2, =gBattleMoves @@ -57922,7 +57922,7 @@ _08054CD6: atkCE_settorment: @ 8054CE4 push {lr} ldr r1, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r2, [r0] movs r0, 0x58 muls r0, r2 @@ -58010,7 +58010,7 @@ _08054D8E: atkD0_settaunt: @ 8054D98 push {r4,lr} ldr r4, =gUnknown_020242BC - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex ldrb r0, [r3] lsls r1, r0, 3 subs r1, r0 @@ -58075,7 +58075,7 @@ atkD1_sethelpinghand: @ 8054E0C lsls r0, 24 lsrs r0, 24 bl battle_get_side_with_given_state - ldr r3, =gUnknown_0202420C + ldr r3, =gEnemyMonIndex strb r0, [r3] ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -58170,7 +58170,7 @@ _08054EE8: bl battle_side_get_owner lsls r0, 24 lsrs r4, r0, 24 - ldr r7, =gUnknown_0202420C + ldr r7, =gEnemyMonIndex ldrb r0, [r7] bl battle_side_get_owner lsls r0, 24 @@ -58224,7 +58224,7 @@ _08054F46: adds r1, r3, 0 cmp r1, 0 bne _08054F6E - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] muls r0, r5 add r0, r8 @@ -58234,7 +58234,7 @@ _08054F46: _08054F6E: cmp r1, 0xAF beq _08054F9A - ldr r7, =gUnknown_0202420C + ldr r7, =gEnemyMonIndex ldrb r0, [r7] muls r0, r5 mov r2, r8 @@ -58437,7 +58437,7 @@ _08055132: sub_8055148: @ 8055148 push {r4,lr} ldr r3, =gBattleMons - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r0, [r4] movs r2, 0x58 muls r0, r2 @@ -58531,7 +58531,7 @@ _08055210: strb r0, [r1] movs r0, 0x4 strb r0, [r1, 0x1] - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex ldrb r0, [r4] strb r0, [r1, 0x2] ldr r0, =gUnknown_020243D0 @@ -58542,7 +58542,7 @@ _08055210: strb r0, [r1, 0x3] movs r0, 0xFF strb r0, [r1, 0x4] - ldr r1, =gUnknown_020241F0 + ldr r1, =gBattleMoveDamage ldr r6, =gBattleMons ldrb r0, [r4] movs r5, 0x58 @@ -58645,7 +58645,7 @@ atkD6_doubledamagedealtifdamaged: @ 80552EC cmp r0, 0 beq _0805530C adds r0, r2, r3 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r0, 0xC] ldrb r1, [r1] cmp r0, r1 @@ -58658,7 +58658,7 @@ _0805530C: cmp r0, 0 beq _0805532A adds r0, r2, r3 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r0, 0xD] ldrb r1, [r1] cmp r0, r1 @@ -58681,7 +58681,7 @@ _0805532A: sub_805534C: @ 805534C push {r4,lr} ldr r1, =gUnknown_020242AC - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r3, [r0] lsls r0, r3, 2 adds r4, r0, r1 @@ -58735,7 +58735,7 @@ _080553B0: atkD8_setdamagetohealthdifference: @ 80553BC push {lr} ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] movs r1, 0x58 muls r0, r1 @@ -58764,7 +58764,7 @@ atkD8_setdamagetohealthdifference: @ 80553BC b _0805541A .pool _08055408: - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldrh r0, [r3, 0x28] ldrh r1, [r1, 0x28] subs r0, r1 @@ -58835,7 +58835,7 @@ atkDA_abilityswap: @ 805548C ldrb r1, [r2] cmp r1, 0 bne _080554B4 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] muls r0, r4 adds r0, r5 @@ -58846,7 +58846,7 @@ atkDA_abilityswap: @ 805548C _080554B4: cmp r1, 0x19 beq _080554D4 - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex ldrb r0, [r6] muls r0, r4 adds r0, r5 @@ -58854,7 +58854,7 @@ _080554B4: ldrb r3, [r0] cmp r3, 0x19 beq _080554D4 - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -59087,7 +59087,7 @@ atkDD_weightdamagecalculation: @ 8055684 adds r7, r1, 0 adds r4, r6, 0 _080556A0: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -59159,11 +59159,11 @@ atkDE_asistattackselect: @ 805571C bl battle_get_per_side_status movs r1, 0x1 ands r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty str r0, [sp] cmp r1, 0 beq _0805574C - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty str r1, [sp] _0805574C: movs r2, 0 @@ -59185,12 +59185,12 @@ _0805574E: adds r4, r0, r6 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080557F4 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -59209,7 +59209,7 @@ _08055798: adds r1, 0xD ldr r0, [sp] add r0, r9 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 adds r0, r4, 0 @@ -59279,7 +59279,7 @@ _080557F4: ldrh r0, [r4] movs r1, 0 bl sub_80458E0 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] ldr r1, =gUnknown_02024214 ldr r0, [r1] @@ -59316,7 +59316,7 @@ _08055886: thumb_func_start atkDF_setmagiccoat atkDF_setmagiccoat: @ 805589C push {lr} - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldr r3, =gUnknown_0202420B ldrb r0, [r3] strb r0, [r1] @@ -59453,7 +59453,7 @@ atkE1_802CBE4: @ 805599C strb r0, [r2, 0x2] movs r0, 0xFF strb r0, [r2, 0x3] - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex ldr r1, =gUnknown_0202406C ldrb r0, [r2] ldrb r1, [r1] @@ -59490,7 +59490,7 @@ _08055A04: cmp r0, r1 bcc _080559E2 _08055A18: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] ldrb r2, [r2] cmp r0, r2 @@ -59722,20 +59722,20 @@ _08055C2A: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData strh r0, [r7] adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08055C6C lsls r0, r5, 3 @@ -59775,7 +59775,7 @@ _08055C76: strh r0, [r7] movs r0, 0x64 muls r0, r6 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC mov r2, sp @@ -59790,7 +59790,7 @@ _08055CC4: movs r6, 0 movs r1, 0x64 mov r8, r1 - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty mov r10, sp _08055CCE: mov r4, r8 @@ -59798,17 +59798,17 @@ _08055CCE: adds r4, r7 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, r10 strh r0, [r1] adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08055D30 lsls r0, r5, 3 @@ -59874,7 +59874,7 @@ _08055D3C: muls r0, r6 adds r0, r7 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData subs r0, 0x1 movs r1, 0xA bl __udivsi3 @@ -60110,7 +60110,7 @@ atkE9_seteffectbyweather: @ 8055F5C lsls r0, 24 cmp r0, 0 bne _08055FFC - ldr r2, =gUnknown_020243CC + ldr r2, =gBattleWeather ldrb r0, [r2] cmp r0, 0 beq _08055F9A @@ -60418,7 +60418,7 @@ atkED_802D364: @ 8056230 ldr r3, =gUnknown_0202420B ldrb r0, [r3] strb r0, [r1] - ldr r2, =gUnknown_0202420C + ldr r2, =gEnemyMonIndex lsls r0, 24 lsrs r0, 24 adds r4, r1, 0 @@ -60516,7 +60516,7 @@ _0805630E: ldr r0, =gUnknown_0202420B ldrb r0, [r0] strb r0, [r5] - ldr r6, =gUnknown_0202420C + ldr r6, =gEnemyMonIndex movs r1, 0x1 eors r0, r1 strb r0, [r6] @@ -60611,7 +60611,7 @@ _080563F4: .4byte _08056472 _08056410: ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -60642,7 +60642,7 @@ _08056440: b _080564D2 _08056452: ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -60663,7 +60663,7 @@ _08056472: .pool _08056480: ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r1, [r0] movs r0, 0x58 muls r0, r1 @@ -60705,7 +60705,7 @@ _080564D2: movs r1, 0xA bl __divsi3 ldr r5, =gBattleMons - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r2, [r1] movs r1, 0x58 adds r4, r2, 0 @@ -60776,14 +60776,14 @@ _08056564: ldr r0, =gUnknown_082DBD84 str r0, [r1] ldr r1, =gUnknown_0202406E - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] lsls r0, 1 adds r0, r1 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r2, =gUnknown_02024208 movs r1, 0x26 @@ -60844,14 +60844,14 @@ _08056614: ldr r0, =gUnknown_082DBD84 str r0, [r1] ldr r1, =gUnknown_0202406E - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] lsls r0, 1 adds r0, r1 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x26 adds r2, r5, 0 @@ -60905,7 +60905,7 @@ atkF0_catch_pokemon: @ 80566A8 ldrh r0, [r0] movs r7, 0x64 muls r0, r7 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r8, r1 add r0, r8 bl pokemon_catch @@ -60937,7 +60937,7 @@ atkF0_catch_pokemon: @ 80566A8 add r0, r8 ldr r2, =gStringVar2 movs r1, 0x2 - bl pokemon_getattr + bl GetMonData b _0805677E .pool _08056734: @@ -60959,7 +60959,7 @@ _08056734: add r0, r8 ldr r2, =gStringVar2 movs r1, 0x2 - bl pokemon_getattr + bl GetMonData ldr r4, =gStringVar3 bl get_unknown_box_id lsls r0, 24 @@ -60997,11 +60997,11 @@ _08056792: mov r1, r8 muls r1, r0 adds r0, r1, 0 - ldr r6, =gUnknown_02024744 + ldr r6, =gEnemyParty adds r0, r6 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r5, =gUnknown_03005D10 strh r0, [r5, 0x28] mov r1, r9 @@ -61017,7 +61017,7 @@ _08056792: adds r2, r5, 0 adds r2, 0x2A movs r1, 0x2 - bl pokemon_getattr + bl GetMonData mov r1, r9 ldrb r0, [r1] eors r4, r0 @@ -61030,7 +61030,7 @@ _08056792: adds r0, r6 movs r1, 0x26 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xF ands r0, r1 lsls r0, 2 @@ -61057,17 +61057,17 @@ _08056792: thumb_func_start atkF1_802D95C atkF1_802D95C: @ 8056850 push {r4,r5,lr} - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 adds r0, r5, 0 bl SpeciesToNationalPokedexNum @@ -61116,10 +61116,10 @@ _080568C2: sub_80568CC: @ 80568CC push {r4,lr} sub sp, 0x4 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 ldr r0, =gUnknown_02024332 @@ -61166,7 +61166,7 @@ _08056938: lsls r0, 16 lsrs r0, 16 ldr r3, =gBattleMons - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r2, [r1] movs r1, 0x58 muls r2, r1 @@ -61625,14 +61625,14 @@ _08056D0A: mov r2, r9 muls r2, r0 adds r0, r2, 0 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r8, r1 add r0, r8 ldr r1, =gUnknown_0202449C ldr r2, [r1] adds r2, 0x6D movs r1, 0x2 - bl pokemon_getattr + bl GetMonData bl FreeAllWindowBuffers mov r2, r10 ldrb r0, [r2] @@ -61645,7 +61645,7 @@ _08056D0A: adds r0, r1, 0 add r0, r8 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r6, r0, 0 lsls r6, 16 lsrs r6, 16 @@ -61675,7 +61675,7 @@ _08056D0A: add r0, r8 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r2, =gUnknown_0202449C ldr r1, [r2] adds r1, 0x6D @@ -61714,7 +61714,7 @@ _08056DD4: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r1, =gUnknown_0202449C ldr r2, [r1] @@ -61769,7 +61769,7 @@ sub_8056E78: @ 8056E78 movs r0, 0x58 muls r1, r0 adds r1, r2 - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage ldr r2, [r0] ldrh r0, [r1, 0x28] subs r0, r2 @@ -62089,7 +62089,7 @@ _0805714A: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x8 bl happiness_algorithm @@ -62102,7 +62102,7 @@ _08057198: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x6 bl happiness_algorithm @@ -62115,7 +62115,7 @@ _080571B8: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x6 bl happiness_algorithm @@ -63074,13 +63074,13 @@ _08057A32: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_020244B0 adds r2, r1 ldrb r1, [r2] adds r1, 0xD - bl pokemon_getattr + bl GetMonData ldr r2, =gBattleMoves lsls r1, r0, 1 adds r1, r0 @@ -63202,13 +63202,13 @@ _08057B56: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_020244B0 adds r2, r1 ldrb r1, [r2] adds r1, 0xD - bl pokemon_getattr + bl GetMonData ldr r2, =gBattleMoves lsls r1, r0, 1 adds r1, r0 @@ -64109,7 +64109,7 @@ _0805831A: mov r9, r5 mov r8, r2 movs r7, 0x64 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r4, r1, 0 _08058332: mov r1, r8 @@ -64121,7 +64121,7 @@ _08058332: adds r0, r5 adds r1, r6, 0 adds r1, 0xD - bl pokemon_getattr + bl GetMonData strh r0, [r4] mov r2, r8 ldrb r0, [r2] @@ -64132,7 +64132,7 @@ _08058332: adds r0, r5 adds r1, r6, 0 adds r1, 0x11 - bl pokemon_getattr + bl GetMonData mov r3, r10 adds r1, r3, r6 strb r0, [r1] @@ -64148,10 +64148,10 @@ _08058332: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData ldr r5, [sp, 0x1C] strb r0, [r5] movs r6, 0 @@ -64247,7 +64247,7 @@ _0805841E: mov r9, r0 movs r1, 0x64 mov r8, r1 - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty ldr r5, [sp, 0x20] adds r5, 0x8 ldr r4, [sp, 0x20] @@ -64291,7 +64291,7 @@ _0805844A: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 ldr r2, [sp, 0x1C] @@ -64950,7 +64950,7 @@ _08058A0E: ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 bl sub_805E990 bl battle_type_is_double @@ -65025,7 +65025,7 @@ sub_8058B40: @ 8058B40 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -65050,7 +65050,7 @@ _08058B80: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -65106,7 +65106,7 @@ _08058BB2: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -65130,7 +65130,7 @@ _08058C38: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -65540,7 +65540,7 @@ sub_8058FC0: @ 8058FC0 ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 bl dp01_tbl1_exec_completed @@ -65573,7 +65573,7 @@ sub_805902C: @ 805902C ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -65616,7 +65616,7 @@ _0805905E: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -65701,7 +65701,7 @@ _08059178: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 bl dp01_tbl1_exec_completed @@ -65766,23 +65766,23 @@ _080591FE: movs r0, 0x64 mov r1, r10 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r6, r1, r0 adds r0, r6, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r6, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 adds r0, r6, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4] ldr r3, =gExperienceTables adds r4, 0x1 @@ -65923,23 +65923,23 @@ sub_8059330: @ 8059330 movs r0, 0x64 adds r6, r1, 0 muls r6, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r6, r0 adds r0, r6, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 adds r0, r6, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r6, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 ldr r6, =gExperienceTables lsls r1, r4, 2 @@ -66040,21 +66040,21 @@ _08059430: movs r0, 0x64 mov r1, r9 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4] adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 ldr r3, =gExperienceTables @@ -66202,11 +66202,11 @@ sub_80595A4: @ 80595A4 movs r0, 0x64 adds r1, r4, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r0, r7, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData bl battle_type_is_double lsls r0, 24 lsrs r0, 24 @@ -66235,7 +66235,7 @@ _08059624: ldrb r0, [r0] movs r1, 0x64 muls r1, r4 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -66268,10 +66268,10 @@ sub_805965C: @ 805965C ldrb r1, [r4, 0x8] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldrb r0, [r4, 0xC] ldr r1, =gUnknown_03005D60 lsls r0, 2 @@ -66312,10 +66312,10 @@ sub_80596A8: @ 80596A8 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl nullsub_24 @@ -67287,16 +67287,16 @@ _08059F98: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2E] movs r6, 0 @@ -67324,12 +67324,12 @@ _08059FE4: adds r1, r6, 0 adds r1, 0xD mov r0, r8 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r1, r6, 0 adds r1, 0x11 mov r0, r8 - bl pokemon_getattr + bl GetMonData mov r2, r9 adds r1, r2, r6 strb r0, [r1] @@ -67340,25 +67340,25 @@ _08059FE4: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r10 strb r0, [r1] adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x80] strb r0, [r2] adds r0, r4, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x44] adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r5, 0x1F ands r0, r5 @@ -67370,7 +67370,7 @@ _08059FE4: strb r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r6, 0x1F ands r0, r6 @@ -67382,7 +67382,7 @@ _08059FE4: strh r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 2 @@ -67394,7 +67394,7 @@ _08059FE4: strb r1, [r3, 0x15] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData movs r1, 0x1F ands r1, r0 lsls r1, 15 @@ -67405,7 +67405,7 @@ _08059FE4: str r0, [sp, 0x14] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r6 lsls r0, 4 @@ -67416,7 +67416,7 @@ _08059FE4: strh r1, [r3, 0x16] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 1 @@ -67428,55 +67428,55 @@ _08059FE4: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x48] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4C] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x7C] strb r0, [r1] adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x28] adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2C] adds r0, r4, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2] adds r0, r4, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x4] adds r0, r4, 0 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x6] adds r0, r4, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x8] adds r0, r4, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0xA] adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData mov r3, sp movs r1, 0x1 ands r0, r1 @@ -67489,7 +67489,7 @@ _08059FE4: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData mov r3, sp lsls r0, 7 ldrb r2, [r3, 0x17] @@ -67499,19 +67499,19 @@ _08059FE4: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x54] adds r0, r4, 0 movs r1, 0x2 ldr r2, [sp, 0x8C] - bl pokemon_getattr + bl GetMonData ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] - bl pokemon_getattr + bl GetMonData mov r2, sp movs r6, 0 _0805A19C: @@ -67527,7 +67527,7 @@ _0805A19C: _0805A1BC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB b _0805A536 @@ -67535,7 +67535,7 @@ _0805A1BC: _0805A1CC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC b _0805A536 @@ -67549,20 +67549,20 @@ _0805A1DC: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 mov r8, r9 _0805A1F2: adds r1, r6, 0 adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r1, r8 strh r0, [r1] adds r1, r6, 0 adds r1, 0x11 adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r2, r10 adds r1, r2, r6 strb r0, [r1] @@ -67573,10 +67573,10 @@ _0805A1F2: ble _0805A1F2 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r9 strb r0, [r1, 0xC] mov r2, r9 @@ -67594,7 +67594,7 @@ _0805A230: _0805A244: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -67609,14 +67609,14 @@ _0805A260: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r8, r2 _0805A26C: adds r1, r6, 0 adds r1, 0x11 mov r2, r8 adds r0, r4, r2 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -67624,10 +67624,10 @@ _0805A26C: ble _0805A26C movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -67636,7 +67636,7 @@ _0805A26C: _0805A29C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -67649,7 +67649,7 @@ _0805A29C: _0805A2B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1 b _0805A2D2 @@ -67657,11 +67657,11 @@ _0805A2B8: _0805A2C8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x19 _0805A2D2: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -67680,7 +67680,7 @@ _0805A2D2: _0805A2F8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1A b _0805A5F6 @@ -67688,7 +67688,7 @@ _0805A2F8: _0805A308: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1B b _0805A5F6 @@ -67696,7 +67696,7 @@ _0805A308: _0805A318: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1C b _0805A5F6 @@ -67704,7 +67704,7 @@ _0805A318: _0805A328: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1D b _0805A5F6 @@ -67712,7 +67712,7 @@ _0805A328: _0805A338: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1E b _0805A5F6 @@ -67720,7 +67720,7 @@ _0805A338: _0805A348: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1F b _0805A5F6 @@ -67728,7 +67728,7 @@ _0805A348: _0805A358: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x20 b _0805A5F6 @@ -67736,7 +67736,7 @@ _0805A358: _0805A368: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x22 b _0805A5F6 @@ -67744,7 +67744,7 @@ _0805A368: _0805A378: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x23 b _0805A5F6 @@ -67752,7 +67752,7 @@ _0805A378: _0805A388: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x24 b _0805A5F6 @@ -67760,7 +67760,7 @@ _0805A388: _0805A398: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x25 b _0805A5F6 @@ -67768,7 +67768,7 @@ _0805A398: _0805A3A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x26 b _0805A5F6 @@ -67777,31 +67777,31 @@ _0805A3B8: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData strb r0, [r7] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x1] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x2] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x3] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x4] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x5] movs r6, 0x6 b _0805A5FE @@ -67809,7 +67809,7 @@ _0805A3B8: _0805A408: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x27 b _0805A5F6 @@ -67817,7 +67817,7 @@ _0805A408: _0805A418: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x28 b _0805A5F6 @@ -67825,7 +67825,7 @@ _0805A418: _0805A428: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x29 b _0805A5F6 @@ -67833,7 +67833,7 @@ _0805A428: _0805A438: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2A b _0805A5F6 @@ -67841,7 +67841,7 @@ _0805A438: _0805A448: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2B b _0805A5F6 @@ -67849,7 +67849,7 @@ _0805A448: _0805A458: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2C b _0805A5F6 @@ -67857,7 +67857,7 @@ _0805A458: _0805A468: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0 b _0805A492 @@ -67865,7 +67865,7 @@ _0805A468: _0805A478: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x9 b _0805A536 @@ -67873,11 +67873,11 @@ _0805A478: _0805A488: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x37 _0805A492: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -67898,7 +67898,7 @@ _0805A492: _0805A4BC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x38 b _0805A5F6 @@ -67906,7 +67906,7 @@ _0805A4BC: _0805A4CC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x39 b _0805A536 @@ -67914,7 +67914,7 @@ _0805A4CC: _0805A4DC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A b _0805A536 @@ -67922,7 +67922,7 @@ _0805A4DC: _0805A4EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3B b _0805A536 @@ -67930,7 +67930,7 @@ _0805A4EC: _0805A4FC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3C b _0805A536 @@ -67938,7 +67938,7 @@ _0805A4FC: _0805A50C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3D b _0805A536 @@ -67946,7 +67946,7 @@ _0805A50C: _0805A51C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3E b _0805A536 @@ -67954,11 +67954,11 @@ _0805A51C: _0805A52C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3F _0805A536: - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 strb r0, [r7] @@ -67970,7 +67970,7 @@ _0805A536: _0805A54C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x16 b _0805A5F6 @@ -67978,7 +67978,7 @@ _0805A54C: _0805A55C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x17 b _0805A5F6 @@ -67986,7 +67986,7 @@ _0805A55C: _0805A56C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x18 b _0805A5F6 @@ -67994,7 +67994,7 @@ _0805A56C: _0805A57C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x21 b _0805A5F6 @@ -68002,7 +68002,7 @@ _0805A57C: _0805A58C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2F b _0805A5F6 @@ -68010,7 +68010,7 @@ _0805A58C: _0805A59C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x30 b _0805A5F6 @@ -68018,7 +68018,7 @@ _0805A59C: _0805A5AC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x32 b _0805A5F6 @@ -68026,7 +68026,7 @@ _0805A5AC: _0805A5BC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x33 b _0805A5F6 @@ -68034,7 +68034,7 @@ _0805A5BC: _0805A5CC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x34 b _0805A5F6 @@ -68042,7 +68042,7 @@ _0805A5CC: _0805A5DC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x35 b _0805A5F6 @@ -68050,11 +68050,11 @@ _0805A5DC: _0805A5EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x36 _0805A5F6: - bl pokemon_getattr + bl GetMonData strb r0, [r7] movs r6, 0x1 _0805A5FE: @@ -68088,7 +68088,7 @@ sub_805A614: @ 805A614 adds r0, r3, 0x1 adds r0, r1, r0 ldrb r2, [r0] - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r0, r2, r0 adds r6, r4, r0 mov r0, sp @@ -68273,7 +68273,7 @@ _0805A828: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB @@ -68340,7 +68340,7 @@ _0805A88E: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 @@ -68453,7 +68453,7 @@ _0805A88E: _0805A9C0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68466,7 +68466,7 @@ _0805A9C0: _0805A9E0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68485,7 +68485,7 @@ _0805AA00: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r6, r3, 0 adds r6, 0x8 @@ -68510,7 +68510,7 @@ _0805AA1A: ble _0805AA1A movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 mov r2, r9 @@ -68520,7 +68520,7 @@ _0805AA1A: _0805AA58: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gUnknown_02023064 ldr r1, =gUnknown_02024064 @@ -68536,7 +68536,7 @@ _0805AA80: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 ldr r5, =gUnknown_02024064 ldrb r2, [r5] @@ -68578,7 +68578,7 @@ _0805AA80: _0805AAE4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gUnknown_02023064 ldr r1, =gUnknown_02024064 @@ -68597,7 +68597,7 @@ _0805AAFC: _0805AB14: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68610,7 +68610,7 @@ _0805AB14: _0805AB34: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68623,7 +68623,7 @@ _0805AB34: _0805AB54: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68636,7 +68636,7 @@ _0805AB54: _0805AB74: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68649,7 +68649,7 @@ _0805AB74: _0805AB94: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68662,7 +68662,7 @@ _0805AB94: _0805ABB4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68675,7 +68675,7 @@ _0805ABB4: _0805ABD4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68688,7 +68688,7 @@ _0805ABD4: _0805ABF4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68701,7 +68701,7 @@ _0805ABF4: _0805AC14: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68714,7 +68714,7 @@ _0805AC14: _0805AC34: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68727,7 +68727,7 @@ _0805AC34: _0805AC54: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68740,7 +68740,7 @@ _0805AC54: _0805AC74: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68753,7 +68753,7 @@ _0805AC74: _0805AC94: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68766,7 +68766,7 @@ _0805AC94: _0805ACB4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68780,7 +68780,7 @@ _0805ACD4: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 ldr r5, =gUnknown_02024064 ldrb r2, [r5] @@ -68827,7 +68827,7 @@ _0805ACD4: _0805AD44: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68840,7 +68840,7 @@ _0805AD44: _0805AD64: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68853,7 +68853,7 @@ _0805AD64: _0805AD84: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68866,7 +68866,7 @@ _0805AD84: _0805ADA4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68879,7 +68879,7 @@ _0805ADA4: _0805ADC4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68892,7 +68892,7 @@ _0805ADC4: _0805ADE4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68906,7 +68906,7 @@ _0805ADF4: _0805AE04: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68919,7 +68919,7 @@ _0805AE04: _0805AE24: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68932,7 +68932,7 @@ _0805AE24: _0805AE44: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68945,7 +68945,7 @@ _0805AE44: _0805AE64: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68958,7 +68958,7 @@ _0805AE64: _0805AE84: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68971,7 +68971,7 @@ _0805AE84: _0805AEA4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68984,7 +68984,7 @@ _0805AEA4: _0805AEC4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -68997,7 +68997,7 @@ _0805AEC4: _0805AEE4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69010,7 +69010,7 @@ _0805AEE4: _0805AF04: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69023,7 +69023,7 @@ _0805AF04: _0805AF24: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69036,7 +69036,7 @@ _0805AF24: _0805AF44: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69049,7 +69049,7 @@ _0805AF44: _0805AF64: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69062,7 +69062,7 @@ _0805AF64: _0805AF84: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69075,7 +69075,7 @@ _0805AF84: _0805AFA4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69088,7 +69088,7 @@ _0805AFA4: _0805AFC4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69101,7 +69101,7 @@ _0805AFC4: _0805AFE4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69114,7 +69114,7 @@ _0805AFE4: _0805B004: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69127,7 +69127,7 @@ _0805B004: _0805B024: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69140,7 +69140,7 @@ _0805B024: _0805B044: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69153,7 +69153,7 @@ _0805B044: _0805B064: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69166,7 +69166,7 @@ _0805B064: _0805B084: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69179,7 +69179,7 @@ _0805B084: _0805B0A4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -69196,7 +69196,7 @@ _0805B0BA: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 add sp, 0x34 @@ -69227,7 +69227,7 @@ sub_805B0F0: @ 805B0F0 adds r0, r4, 0x1 adds r0, r2, r0 ldrb r0, [r0] - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r5, r3, r0 movs r3, 0 @@ -69276,7 +69276,7 @@ sub_805B164: @ 805B164 ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805DD7C ldr r2, =gUnknown_02020630 @@ -69333,7 +69333,7 @@ sub_805B1CC: @ 805B1CC ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805DD7C ldr r1, =gUnknown_020244AC @@ -69387,10 +69387,10 @@ sub_805B258: @ 805B258 ldrh r1, [r2] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 @@ -70355,7 +70355,7 @@ _0805BB0C: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 movs r1, 0x40 @@ -71382,10 +71382,10 @@ _0805C44A: ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r8, r0 mov r2, r9 ldrb r0, [r2] @@ -71395,7 +71395,7 @@ _0805C44A: muls r0, r5 adds r0, r4 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -71416,10 +71416,10 @@ _0805C4B4: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -71467,11 +71467,11 @@ sub_805C528: @ 805C528 movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData cmp r0, 0x63 bls _0805C560 bl dp01_tbl1_exec_completed @@ -71482,7 +71482,7 @@ _0805C560: bl load_gfxc_health_bar adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 9 adds r0, r5, 0x2 @@ -71539,7 +71539,7 @@ sub_805C5C4: @ 805C5C4 ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0x9 bl healthbar_draw_field_maybe @@ -71631,10 +71631,10 @@ sub_805C6A4: @ 805C6A4 ldrh r0, [r0] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData ldr r2, =gUnknown_02023064 ldrb r1, [r4] lsls r1, 9 @@ -72049,10 +72049,10 @@ sub_805CA0C: @ 805CA0C ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 movs r1, 0x19 @@ -72269,7 +72269,7 @@ sub_805CC00: @ 805CC00 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r4, 0 bl sub_805DD7C @@ -72375,7 +72375,7 @@ _0805CCE4: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805DD7C ldrb r0, [r7] @@ -74159,7 +74159,7 @@ sub_805DC0C: @ 805DC0C lsrs r1, 24 mov r8, r1 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] ldr r0, =gUnknown_020244D0 ldr r0, [r0] @@ -74172,7 +74172,7 @@ sub_805DC0C: @ 805DC0C bne _0805DC50 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 ldr r6, [sp] @@ -74186,7 +74186,7 @@ _0805DC50: _0805DC58: adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData mov r10, r0 mov r0, r8 bl battle_get_per_side_status @@ -74312,7 +74312,7 @@ sub_805DD7C: @ 805DD7C lsrs r1, 24 mov r8, r1 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] ldr r0, =gUnknown_020244D0 ldr r0, [r0] @@ -74325,7 +74325,7 @@ sub_805DD7C: @ 805DD7C bne _0805DDC0 adds r0, r6, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 ldr r4, [sp] @@ -74339,7 +74339,7 @@ _0805DDC0: _0805DDC8: adds r0, r6, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4] mov r0, r8 bl battle_get_per_side_status @@ -74904,7 +74904,7 @@ _0805E29C: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -74921,7 +74921,7 @@ _0805E2E4: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -75212,7 +75212,7 @@ _0805E558: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _0805E59C .pool _0805E58C: @@ -75223,11 +75223,11 @@ _0805E58C: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _0805E59C: adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r8, r0 @@ -75242,16 +75242,16 @@ _0805E59C: ldrh r0, [r4] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0 - bl pokemon_getattr + bl GetMonData mov r9, r0 ldrh r0, [r4] muls r0, r6 adds r0, r5 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r1, r8 lsls r0, r1, 3 @@ -75280,16 +75280,16 @@ _0805E618: ldrh r0, [r4] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty adds r0, r5 movs r1, 0 - bl pokemon_getattr + bl GetMonData mov r9, r0 ldrh r0, [r4] muls r0, r6 adds r0, r5 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r1, r8 lsls r0, r1, 3 @@ -75552,7 +75552,7 @@ _0805E898: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 adds r1, r4, 0 bl sub_805DC0C @@ -75565,7 +75565,7 @@ _0805E8D0: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r5, 0 bl sub_805DD7C @@ -75667,13 +75667,13 @@ sub_805E990: @ 805E990 lsrs r6, r1, 24 adds r7, r6, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r4, 16 asrs r4, 16 @@ -75807,13 +75807,13 @@ sub_805EAB4: @ 805EAB4 push {r4,r5,lr} adds r5, r0, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r4, 16 asrs r4, 16 @@ -75871,11 +75871,11 @@ sub_805EAE8: @ 805EAE8 movs r7, 0x64 adds r0, r4, 0 muls r0, r7 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty adds r4, r0, r6 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0805EB5A adds r0, r4, 0 @@ -75891,7 +75891,7 @@ _0805EB5A: adds r4, r0, r6 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0805EB7E adds r0, r4, 0 @@ -76599,20 +76599,20 @@ sub_805F110: @ 805F110 push {r4,r5,lr} adds r5, r0, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData ldr r1, =0x00000fff ands r1, r0 cmp r1, 0 bne _0805F158 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r4, 16 asrs r4, 16 @@ -77138,7 +77138,7 @@ sub_805F560: @ 805F560 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -77173,7 +77173,7 @@ _0805F5A6: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r3, 0 bl sub_8172EF0 @@ -77235,7 +77235,7 @@ _0805F5EE: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -77261,7 +77261,7 @@ _0805F684: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -77498,10 +77498,10 @@ _0805F86E: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -77526,10 +77526,10 @@ _0805F8D2: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -77619,7 +77619,7 @@ sub_805F994: @ 805F994 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r3, 0 bl sub_8172EF0 @@ -78041,7 +78041,7 @@ sub_805FD00: @ 805FD00 ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -78088,7 +78088,7 @@ sub_805FDF0: @ 805FDF0 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -78128,10 +78128,10 @@ _0805FE22: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -78398,16 +78398,16 @@ _08060134: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2E] movs r6, 0 @@ -78435,12 +78435,12 @@ _08060180: adds r1, r6, 0 adds r1, 0xD mov r0, r8 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r1, r6, 0 adds r1, 0x11 mov r0, r8 - bl pokemon_getattr + bl GetMonData mov r2, r9 adds r1, r2, r6 strb r0, [r1] @@ -78451,25 +78451,25 @@ _08060180: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r10 strb r0, [r1] adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x80] strb r0, [r2] adds r0, r4, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x44] adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r5, 0x1F ands r0, r5 @@ -78481,7 +78481,7 @@ _08060180: strb r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r6, 0x1F ands r0, r6 @@ -78493,7 +78493,7 @@ _08060180: strh r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 2 @@ -78505,7 +78505,7 @@ _08060180: strb r1, [r3, 0x15] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData movs r1, 0x1F ands r1, r0 lsls r1, 15 @@ -78516,7 +78516,7 @@ _08060180: str r0, [sp, 0x14] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r6 lsls r0, 4 @@ -78527,7 +78527,7 @@ _08060180: strh r1, [r3, 0x16] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 1 @@ -78539,55 +78539,55 @@ _08060180: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x48] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4C] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x7C] strb r0, [r1] adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x28] adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2C] adds r0, r4, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2] adds r0, r4, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x4] adds r0, r4, 0 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x6] adds r0, r4, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x8] adds r0, r4, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0xA] adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData mov r3, sp movs r1, 0x1 ands r0, r1 @@ -78600,7 +78600,7 @@ _08060180: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData mov r3, sp lsls r0, 7 ldrb r2, [r3, 0x17] @@ -78610,19 +78610,19 @@ _08060180: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x54] adds r0, r4, 0 movs r1, 0x2 ldr r2, [sp, 0x8C] - bl pokemon_getattr + bl GetMonData ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] - bl pokemon_getattr + bl GetMonData mov r2, sp movs r6, 0 _08060338: @@ -78638,7 +78638,7 @@ _08060338: _08060358: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB b _080606D2 @@ -78646,7 +78646,7 @@ _08060358: _08060368: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xC b _080606D2 @@ -78660,20 +78660,20 @@ _08060378: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r1, r0 mov r8, r9 _0806038E: adds r1, r6, 0 adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r1, r8 strh r0, [r1] adds r1, r6, 0 adds r1, 0x11 adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r2, r10 adds r1, r2, r6 strb r0, [r1] @@ -78684,10 +78684,10 @@ _0806038E: ble _0806038E movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r9 strb r0, [r1, 0xC] mov r2, r9 @@ -78705,7 +78705,7 @@ _080603CC: _080603E0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -78720,14 +78720,14 @@ _080603FC: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r8, r2 _08060408: adds r1, r6, 0 adds r1, 0x11 mov r2, r8 adds r0, r4, r2 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -78735,10 +78735,10 @@ _08060408: ble _08060408 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -78747,7 +78747,7 @@ _08060408: _08060438: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -78760,7 +78760,7 @@ _08060438: _08060454: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1 b _0806046E @@ -78768,11 +78768,11 @@ _08060454: _08060464: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x19 _0806046E: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -78791,7 +78791,7 @@ _0806046E: _08060494: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1A b _08060792 @@ -78799,7 +78799,7 @@ _08060494: _080604A4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1B b _08060792 @@ -78807,7 +78807,7 @@ _080604A4: _080604B4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1C b _08060792 @@ -78815,7 +78815,7 @@ _080604B4: _080604C4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1D b _08060792 @@ -78823,7 +78823,7 @@ _080604C4: _080604D4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1E b _08060792 @@ -78831,7 +78831,7 @@ _080604D4: _080604E4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1F b _08060792 @@ -78839,7 +78839,7 @@ _080604E4: _080604F4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x20 b _08060792 @@ -78847,7 +78847,7 @@ _080604F4: _08060504: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x22 b _08060792 @@ -78855,7 +78855,7 @@ _08060504: _08060514: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x23 b _08060792 @@ -78863,7 +78863,7 @@ _08060514: _08060524: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x24 b _08060792 @@ -78871,7 +78871,7 @@ _08060524: _08060534: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x25 b _08060792 @@ -78879,7 +78879,7 @@ _08060534: _08060544: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x26 b _08060792 @@ -78888,31 +78888,31 @@ _08060554: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData strb r0, [r7] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x1] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x2] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x3] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x4] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x5] movs r6, 0x6 b _0806079A @@ -78920,7 +78920,7 @@ _08060554: _080605A4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x27 b _08060792 @@ -78928,7 +78928,7 @@ _080605A4: _080605B4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x28 b _08060792 @@ -78936,7 +78936,7 @@ _080605B4: _080605C4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x29 b _08060792 @@ -78944,7 +78944,7 @@ _080605C4: _080605D4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2A b _08060792 @@ -78952,7 +78952,7 @@ _080605D4: _080605E4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2B b _08060792 @@ -78960,7 +78960,7 @@ _080605E4: _080605F4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2C b _08060792 @@ -78968,7 +78968,7 @@ _080605F4: _08060604: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0 b _0806062E @@ -78976,7 +78976,7 @@ _08060604: _08060614: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x9 b _080606D2 @@ -78984,11 +78984,11 @@ _08060614: _08060624: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x37 _0806062E: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -79009,7 +79009,7 @@ _0806062E: _08060658: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x38 b _08060792 @@ -79017,7 +79017,7 @@ _08060658: _08060668: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x39 b _080606D2 @@ -79025,7 +79025,7 @@ _08060668: _08060678: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3A b _080606D2 @@ -79033,7 +79033,7 @@ _08060678: _08060688: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3B b _080606D2 @@ -79041,7 +79041,7 @@ _08060688: _08060698: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3C b _080606D2 @@ -79049,7 +79049,7 @@ _08060698: _080606A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3D b _080606D2 @@ -79057,7 +79057,7 @@ _080606A8: _080606B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3E b _080606D2 @@ -79065,11 +79065,11 @@ _080606B8: _080606C8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3F _080606D2: - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 strb r0, [r7] @@ -79081,7 +79081,7 @@ _080606D2: _080606E8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x16 b _08060792 @@ -79089,7 +79089,7 @@ _080606E8: _080606F8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x17 b _08060792 @@ -79097,7 +79097,7 @@ _080606F8: _08060708: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x18 b _08060792 @@ -79105,7 +79105,7 @@ _08060708: _08060718: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x21 b _08060792 @@ -79113,7 +79113,7 @@ _08060718: _08060728: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2F b _08060792 @@ -79121,7 +79121,7 @@ _08060728: _08060738: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x30 b _08060792 @@ -79129,7 +79129,7 @@ _08060738: _08060748: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x32 b _08060792 @@ -79137,7 +79137,7 @@ _08060748: _08060758: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x33 b _08060792 @@ -79145,7 +79145,7 @@ _08060758: _08060768: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x34 b _08060792 @@ -79153,7 +79153,7 @@ _08060768: _08060778: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x35 b _08060792 @@ -79161,11 +79161,11 @@ _08060778: _08060788: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x36 _08060792: - bl pokemon_getattr + bl GetMonData strb r0, [r7] movs r6, 0x1 _0806079A: @@ -79199,7 +79199,7 @@ dp01t_01_2_read_pokmon_data_slice: @ 80607B0 adds r0, r3, 0x1 adds r0, r1, r0 ldrb r2, [r0] - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r0, r2, r0 adds r6, r4, r0 mov r0, sp @@ -79385,7 +79385,7 @@ _080609C4: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB @@ -79452,7 +79452,7 @@ _08060A2A: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 @@ -79565,7 +79565,7 @@ _08060A2A: _08060B5C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79577,7 +79577,7 @@ _08060B5C: _08060B78: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79595,7 +79595,7 @@ _08060B94: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r7, r1, r0 adds r6, r4, 0 adds r6, 0x8 @@ -79619,7 +79619,7 @@ _08060BAC: ble _08060BAC movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x15 mov r2, r9 @@ -79629,7 +79629,7 @@ _08060BAC: _08060BE8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r3, =gUnknown_02023064 ldrb r2, [r6] @@ -79644,7 +79644,7 @@ _08060C08: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 ldrb r2, [r6] lsls r2, 9 @@ -79690,7 +79690,7 @@ _08060C08: _08060C70: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r3, =gUnknown_02023064 ldrb r2, [r6] @@ -79708,7 +79708,7 @@ _08060C86: _08060C98: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79720,7 +79720,7 @@ _08060C98: _08060CB4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79732,7 +79732,7 @@ _08060CB4: _08060CD0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79744,7 +79744,7 @@ _08060CD0: _08060CEC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79756,7 +79756,7 @@ _08060CEC: _08060D08: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79768,7 +79768,7 @@ _08060D08: _08060D24: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79780,7 +79780,7 @@ _08060D24: _08060D40: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79792,7 +79792,7 @@ _08060D40: _08060D5C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79804,7 +79804,7 @@ _08060D5C: _08060D78: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79816,7 +79816,7 @@ _08060D78: _08060D94: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79828,7 +79828,7 @@ _08060D94: _08060DB0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79840,7 +79840,7 @@ _08060DB0: _08060DCC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79852,7 +79852,7 @@ _08060DCC: _08060DE8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79864,7 +79864,7 @@ _08060DE8: _08060E04: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79877,7 +79877,7 @@ _08060E20: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 ldrb r2, [r6] lsls r2, 9 @@ -79929,7 +79929,7 @@ _08060E20: _08060E94: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79941,7 +79941,7 @@ _08060E94: _08060EB0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79953,7 +79953,7 @@ _08060EB0: _08060ECC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79965,7 +79965,7 @@ _08060ECC: _08060EE8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79977,7 +79977,7 @@ _08060EE8: _08060F04: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -79989,7 +79989,7 @@ _08060F04: _08060F20: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80002,7 +80002,7 @@ _08060F2E: _08060F3C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80014,7 +80014,7 @@ _08060F3C: _08060F58: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80026,7 +80026,7 @@ _08060F58: _08060F74: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80038,7 +80038,7 @@ _08060F74: _08060F90: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80050,7 +80050,7 @@ _08060F90: _08060FAC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80062,7 +80062,7 @@ _08060FAC: _08060FC8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80074,7 +80074,7 @@ _08060FC8: _08060FE4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80086,7 +80086,7 @@ _08060FE4: _08061000: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80098,7 +80098,7 @@ _08061000: _0806101C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80110,7 +80110,7 @@ _0806101C: _08061038: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80122,7 +80122,7 @@ _08061038: _08061054: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80134,7 +80134,7 @@ _08061054: _08061070: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80146,7 +80146,7 @@ _08061070: _0806108C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80158,7 +80158,7 @@ _0806108C: _080610A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80170,7 +80170,7 @@ _080610A8: _080610C4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80182,7 +80182,7 @@ _080610C4: _080610E0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80194,7 +80194,7 @@ _080610E0: _080610FC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80206,7 +80206,7 @@ _080610FC: _08061118: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80218,7 +80218,7 @@ _08061118: _08061134: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80230,7 +80230,7 @@ _08061134: _08061150: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80242,7 +80242,7 @@ _08061150: _0806116C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80254,7 +80254,7 @@ _0806116C: _08061188: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -80290,7 +80290,7 @@ sub_80611B0: @ 80611B0 adds r0, r4, 0x1 adds r0, r2, r0 ldrb r0, [r0] - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 adds r5, r3, r0 movs r3, 0 @@ -80343,11 +80343,11 @@ sub_8061224: @ 8061224 ldrh r0, [r0] movs r7, 0x64 muls r0, r7 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r10, r2 add r0, r10 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 @@ -80452,7 +80452,7 @@ sub_8061224: @ 8061224 muls r0, r7 add r0, r10 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -80542,10 +80542,10 @@ sub_80613DC: @ 80613DC mov r1, r9 muls r1, r0 adds r0, r1, 0 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 @@ -81916,7 +81916,7 @@ _0806202C: movs r2, 0 b _08061FD6 _08062030: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r2, [r0] movs r0, 0x1 movs r1, 0xF @@ -81936,7 +81936,7 @@ _08062040: ands r0, r1 cmp r0, 0 beq _08062062 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldr r1, =gUnknown_02024064 ldrb r1, [r1] strb r1, [r0] @@ -81953,7 +81953,7 @@ _08062062: beq _0806209C movs r0, 0 bl battle_get_side_with_given_state - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex strb r0, [r5] ldr r0, =gUnknown_02024210 ldrb r1, [r0] @@ -81969,7 +81969,7 @@ _08062062: bl battle_get_side_with_given_state strb r0, [r5] _0806209C: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] lsls r0, 8 orrs r4, r0 @@ -82144,10 +82144,10 @@ _0806221E: bge _0806225A movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0806221C ldr r1, =gUnknown_0202406E @@ -82228,10 +82228,10 @@ sub_8062294: @ 8062294 ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty adds r0, r4 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r8, r0 mov r1, r9 ldrb r0, [r1] @@ -82241,7 +82241,7 @@ sub_8062294: @ 8062294 muls r0, r5 adds r0, r4 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -82260,10 +82260,10 @@ _08062324: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -82318,7 +82318,7 @@ sub_8062390: @ 8062390 ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0x9 bl healthbar_draw_field_maybe @@ -82686,10 +82686,10 @@ sub_806268C: @ 806268C ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 movs r1, 0x19 @@ -83470,11 +83470,11 @@ _08062D58: ldrb r0, [r1] bl battle_side_get_owner lsls r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r9, r1 cmp r0, 0 bne _08062D6C - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty mov r9, r3 _08062D6C: adds r6, r4, 0 @@ -83489,17 +83489,17 @@ _08062D74: adds r4, r1, r5 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08062E24 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08062E24 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -83514,10 +83514,10 @@ _08062D74: beq _08062E24 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData mov r0, r10 bl battle_get_side_with_given_state lsls r0, 24 @@ -83535,7 +83535,7 @@ _08062DE0: adds r1, 0xD mov r0, r9 add r0, r8 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, 0 @@ -83760,11 +83760,11 @@ _08062FD2: ldrb r0, [r2] bl battle_side_get_owner lsls r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty str r1, [sp, 0x4] cmp r0, 0 bne _08062FE6 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty str r2, [sp, 0x4] _08062FE6: adds r5, r4, 0 @@ -83779,17 +83779,17 @@ _08062FF0: adds r6, r1, r0 adds r0, r6, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080630A6 adds r0, r6, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080630A6 adds r0, r6, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -83820,12 +83820,12 @@ _08062FF0: beq _080630A6 adds r0, r6, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 adds r0, r6, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08063088 lsls r0, r4, 3 @@ -84326,11 +84326,11 @@ _08063498: ldrb r0, [r5] bl battle_side_get_owner lsls r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty str r1, [sp, 0xC] cmp r0, 0 bne _080634AC - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty str r2, [sp, 0xC] _080634AC: adds r6, r4, 0 @@ -84343,21 +84343,21 @@ _080634BC: adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080634D2 b _080635E4 _080634D2: adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080634E0 b _080635E4 _080634E0: adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -84391,12 +84391,12 @@ _080634E0: beq _080635E4 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 adds r0, r5, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08063558 lsls r0, r4, 3 @@ -84450,7 +84450,7 @@ _080635A2: adds r1, 0xD ldr r0, [sp, 0xC] add r0, r8 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, 0 @@ -84663,11 +84663,11 @@ _08063770: ldrb r0, [r2] bl battle_side_get_owner lsls r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r9, r1 cmp r0, 0 bne _08063784 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty mov r9, r0 _08063784: adds r5, r4, 0 @@ -84680,17 +84680,17 @@ _0806378A: adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080637EC adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080637EC adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -84796,11 +84796,11 @@ sub_8063880: @ 8063880 ldrb r0, [r4] bl battle_side_get_owner lsls r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r8, r1 cmp r0, 0 bne _080638A8 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r8, r2 _080638A8: ldr r7, =gBattleTypeFlags @@ -84888,7 +84888,7 @@ _08063962: muls r0, r4 add r0, r8 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080639A0 ldr r1, =gUnknown_0202406E @@ -85182,11 +85182,11 @@ _08063BCC: ldrb r0, [r2] bl battle_side_get_owner lsls r0, 24 - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty str r4, [sp, 0x20] cmp r0, 0 bne _08063BE0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty str r0, [sp, 0x20] _08063BE0: movs r1, 0 @@ -85214,14 +85214,14 @@ _08063C00: adds r4, r2, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 cmp r5, 0 beq _08063CD8 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08063CD8 mov r4, r8 @@ -85326,7 +85326,7 @@ _08063D02: adds r1, 0xD ldr r2, [sp, 0x20] adds r0, r2, r5 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 cmp r4, 0 @@ -85379,9 +85379,9 @@ _08063D60: ldr r0, =gUnknown_02024474 movs r2, 0x1 strb r2, [r0, 0xE] - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags strb r1, [r0] - ldr r0, =gUnknown_02024211 + ldr r0, =gCritMultiplier strb r2, [r0] movs r1, 0 str r1, [sp, 0x8] @@ -85399,7 +85399,7 @@ _08063D8A: adds r4, r0, r6 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 adds r1, r7, 0x1 mov r10, r1 @@ -85407,7 +85407,7 @@ _08063D8A: beq _08063E46 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08063E46 ldr r1, =gUnknown_0202406E @@ -85437,7 +85437,7 @@ _08063D8A: beq _08063E46 movs r5, 0 mov r9, r6 - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage mov r8, r0 ldr r6, =gUnknown_02024064 _08063DEE: @@ -85445,7 +85445,7 @@ _08063DEE: adds r1, 0xD ldr r0, [sp, 0x20] add r0, r9 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 movs r0, 0 @@ -85591,10 +85591,10 @@ _08063F12: ldrb r0, [r0] bl battle_side_get_owner lsls r0, 24 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty cmp r0, 0 bne _08063F24 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty _08063F24: movs r1, 0 mov r8, r1 @@ -85606,17 +85606,17 @@ _08063F28: adds r4, r5, r0 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08063F64 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08063F64 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -86595,7 +86595,7 @@ sub_8064734: @ 8064734 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -86626,7 +86626,7 @@ _08064776: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r3, 0 bl sub_8172EF0 @@ -86688,7 +86688,7 @@ _080647B4: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -86714,7 +86714,7 @@ _0806484A: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -86925,10 +86925,10 @@ _080649E2: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -86953,10 +86953,10 @@ _08064A3A: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -87051,7 +87051,7 @@ sub_8064B04: @ 8064B04 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r3, 0 bl sub_8172EF0 @@ -87452,7 +87452,7 @@ sub_8064E50: @ 8064E50 ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -87499,7 +87499,7 @@ sub_8064F40: @ 8064F40 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -87539,10 +87539,10 @@ _08064F72: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -87809,16 +87809,16 @@ _08065284: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2E] movs r6, 0 @@ -87846,12 +87846,12 @@ _080652D0: adds r1, r6, 0 adds r1, 0xD mov r0, r8 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r1, r6, 0 adds r1, 0x11 mov r0, r8 - bl pokemon_getattr + bl GetMonData mov r2, r9 adds r1, r2, r6 strb r0, [r1] @@ -87862,25 +87862,25 @@ _080652D0: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r10 strb r0, [r1] adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x80] strb r0, [r2] adds r0, r4, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x44] adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r5, 0x1F ands r0, r5 @@ -87892,7 +87892,7 @@ _080652D0: strb r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r6, 0x1F ands r0, r6 @@ -87904,7 +87904,7 @@ _080652D0: strh r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 2 @@ -87916,7 +87916,7 @@ _080652D0: strb r1, [r3, 0x15] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData movs r1, 0x1F ands r1, r0 lsls r1, 15 @@ -87927,7 +87927,7 @@ _080652D0: str r0, [sp, 0x14] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r6 lsls r0, 4 @@ -87938,7 +87938,7 @@ _080652D0: strh r1, [r3, 0x16] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 1 @@ -87950,55 +87950,55 @@ _080652D0: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x48] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4C] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x7C] strb r0, [r1] adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x28] adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2C] adds r0, r4, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2] adds r0, r4, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x4] adds r0, r4, 0 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x6] adds r0, r4, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x8] adds r0, r4, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0xA] adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData mov r3, sp movs r1, 0x1 ands r0, r1 @@ -88011,7 +88011,7 @@ _080652D0: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData mov r3, sp lsls r0, 7 ldrb r2, [r3, 0x17] @@ -88021,19 +88021,19 @@ _080652D0: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x54] adds r0, r4, 0 movs r1, 0x2 ldr r2, [sp, 0x8C] - bl pokemon_getattr + bl GetMonData ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] - bl pokemon_getattr + bl GetMonData mov r2, sp movs r6, 0 _08065488: @@ -88049,7 +88049,7 @@ _08065488: _080654A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB b _08065822 @@ -88057,7 +88057,7 @@ _080654A8: _080654B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xC b _08065822 @@ -88071,20 +88071,20 @@ _080654C8: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r1, r0 mov r8, r9 _080654DE: adds r1, r6, 0 adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r1, r8 strh r0, [r1] adds r1, r6, 0 adds r1, 0x11 adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r2, r10 adds r1, r2, r6 strb r0, [r1] @@ -88095,10 +88095,10 @@ _080654DE: ble _080654DE movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r9 strb r0, [r1, 0xC] mov r2, r9 @@ -88116,7 +88116,7 @@ _0806551C: _08065530: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -88131,14 +88131,14 @@ _0806554C: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r8, r2 _08065558: adds r1, r6, 0 adds r1, 0x11 mov r2, r8 adds r0, r4, r2 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -88146,10 +88146,10 @@ _08065558: ble _08065558 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -88158,7 +88158,7 @@ _08065558: _08065588: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -88171,7 +88171,7 @@ _08065588: _080655A4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1 b _080655BE @@ -88179,11 +88179,11 @@ _080655A4: _080655B4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x19 _080655BE: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -88202,7 +88202,7 @@ _080655BE: _080655E4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1A b _080658E2 @@ -88210,7 +88210,7 @@ _080655E4: _080655F4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1B b _080658E2 @@ -88218,7 +88218,7 @@ _080655F4: _08065604: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1C b _080658E2 @@ -88226,7 +88226,7 @@ _08065604: _08065614: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1D b _080658E2 @@ -88234,7 +88234,7 @@ _08065614: _08065624: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1E b _080658E2 @@ -88242,7 +88242,7 @@ _08065624: _08065634: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1F b _080658E2 @@ -88250,7 +88250,7 @@ _08065634: _08065644: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x20 b _080658E2 @@ -88258,7 +88258,7 @@ _08065644: _08065654: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x22 b _080658E2 @@ -88266,7 +88266,7 @@ _08065654: _08065664: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x23 b _080658E2 @@ -88274,7 +88274,7 @@ _08065664: _08065674: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x24 b _080658E2 @@ -88282,7 +88282,7 @@ _08065674: _08065684: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x25 b _080658E2 @@ -88290,7 +88290,7 @@ _08065684: _08065694: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x26 b _080658E2 @@ -88299,31 +88299,31 @@ _080656A4: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData strb r0, [r7] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x1] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x2] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x3] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x4] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x5] movs r6, 0x6 b _080658EA @@ -88331,7 +88331,7 @@ _080656A4: _080656F4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x27 b _080658E2 @@ -88339,7 +88339,7 @@ _080656F4: _08065704: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x28 b _080658E2 @@ -88347,7 +88347,7 @@ _08065704: _08065714: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x29 b _080658E2 @@ -88355,7 +88355,7 @@ _08065714: _08065724: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2A b _080658E2 @@ -88363,7 +88363,7 @@ _08065724: _08065734: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2B b _080658E2 @@ -88371,7 +88371,7 @@ _08065734: _08065744: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2C b _080658E2 @@ -88379,7 +88379,7 @@ _08065744: _08065754: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0 b _0806577E @@ -88387,7 +88387,7 @@ _08065754: _08065764: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x9 b _08065822 @@ -88395,11 +88395,11 @@ _08065764: _08065774: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x37 _0806577E: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -88420,7 +88420,7 @@ _0806577E: _080657A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x38 b _080658E2 @@ -88428,7 +88428,7 @@ _080657A8: _080657B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x39 b _08065822 @@ -88436,7 +88436,7 @@ _080657B8: _080657C8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3A b _08065822 @@ -88444,7 +88444,7 @@ _080657C8: _080657D8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3B b _08065822 @@ -88452,7 +88452,7 @@ _080657D8: _080657E8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3C b _08065822 @@ -88460,7 +88460,7 @@ _080657E8: _080657F8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3D b _08065822 @@ -88468,7 +88468,7 @@ _080657F8: _08065808: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3E b _08065822 @@ -88476,11 +88476,11 @@ _08065808: _08065818: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3F _08065822: - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 strb r0, [r7] @@ -88492,7 +88492,7 @@ _08065822: _08065838: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x16 b _080658E2 @@ -88500,7 +88500,7 @@ _08065838: _08065848: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x17 b _080658E2 @@ -88508,7 +88508,7 @@ _08065848: _08065858: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x18 b _080658E2 @@ -88516,7 +88516,7 @@ _08065858: _08065868: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x21 b _080658E2 @@ -88524,7 +88524,7 @@ _08065868: _08065878: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2F b _080658E2 @@ -88532,7 +88532,7 @@ _08065878: _08065888: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x30 b _080658E2 @@ -88540,7 +88540,7 @@ _08065888: _08065898: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x32 b _080658E2 @@ -88548,7 +88548,7 @@ _08065898: _080658A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x33 b _080658E2 @@ -88556,7 +88556,7 @@ _080658A8: _080658B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x34 b _080658E2 @@ -88564,7 +88564,7 @@ _080658B8: _080658C8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x35 b _080658E2 @@ -88572,11 +88572,11 @@ _080658C8: _080658D8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x36 _080658E2: - bl pokemon_getattr + bl GetMonData strb r0, [r7] movs r6, 0x1 _080658EA: @@ -88740,7 +88740,7 @@ _08065A98: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB @@ -88807,7 +88807,7 @@ _08065AFE: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 @@ -88920,7 +88920,7 @@ _08065AFE: _08065C30: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -88932,7 +88932,7 @@ _08065C30: _08065C4C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -88950,7 +88950,7 @@ _08065C68: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r7, r1, r0 adds r6, r4, 0 adds r6, 0x8 @@ -88974,7 +88974,7 @@ _08065C80: ble _08065C80 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x15 mov r2, r9 @@ -88984,7 +88984,7 @@ _08065C80: _08065CBC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r3, =gUnknown_02023064 ldrb r2, [r6] @@ -88999,7 +88999,7 @@ _08065CDC: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 ldrb r2, [r6] lsls r2, 9 @@ -89045,7 +89045,7 @@ _08065CDC: _08065D44: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r3, =gUnknown_02023064 ldrb r2, [r6] @@ -89063,7 +89063,7 @@ _08065D5A: _08065D6C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89075,7 +89075,7 @@ _08065D6C: _08065D88: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89087,7 +89087,7 @@ _08065D88: _08065DA4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89099,7 +89099,7 @@ _08065DA4: _08065DC0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89111,7 +89111,7 @@ _08065DC0: _08065DDC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89123,7 +89123,7 @@ _08065DDC: _08065DF8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89135,7 +89135,7 @@ _08065DF8: _08065E14: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89147,7 +89147,7 @@ _08065E14: _08065E30: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89159,7 +89159,7 @@ _08065E30: _08065E4C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89171,7 +89171,7 @@ _08065E4C: _08065E68: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89183,7 +89183,7 @@ _08065E68: _08065E84: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89195,7 +89195,7 @@ _08065E84: _08065EA0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89207,7 +89207,7 @@ _08065EA0: _08065EBC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89219,7 +89219,7 @@ _08065EBC: _08065ED8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89232,7 +89232,7 @@ _08065EF4: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 ldrb r2, [r6] lsls r2, 9 @@ -89284,7 +89284,7 @@ _08065EF4: _08065F68: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89296,7 +89296,7 @@ _08065F68: _08065F84: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89308,7 +89308,7 @@ _08065F84: _08065FA0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89320,7 +89320,7 @@ _08065FA0: _08065FBC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89332,7 +89332,7 @@ _08065FBC: _08065FD8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89344,7 +89344,7 @@ _08065FD8: _08065FF4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89357,7 +89357,7 @@ _08066002: _08066010: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89369,7 +89369,7 @@ _08066010: _0806602C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89381,7 +89381,7 @@ _0806602C: _08066048: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89393,7 +89393,7 @@ _08066048: _08066064: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89405,7 +89405,7 @@ _08066064: _08066080: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89417,7 +89417,7 @@ _08066080: _0806609C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89429,7 +89429,7 @@ _0806609C: _080660B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89441,7 +89441,7 @@ _080660B8: _080660D4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89453,7 +89453,7 @@ _080660D4: _080660F0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89465,7 +89465,7 @@ _080660F0: _0806610C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89477,7 +89477,7 @@ _0806610C: _08066128: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89489,7 +89489,7 @@ _08066128: _08066144: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89501,7 +89501,7 @@ _08066144: _08066160: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89513,7 +89513,7 @@ _08066160: _0806617C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89525,7 +89525,7 @@ _0806617C: _08066198: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89537,7 +89537,7 @@ _08066198: _080661B4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89549,7 +89549,7 @@ _080661B4: _080661D0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89561,7 +89561,7 @@ _080661D0: _080661EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89573,7 +89573,7 @@ _080661EC: _08066208: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89585,7 +89585,7 @@ _08066208: _08066224: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89597,7 +89597,7 @@ _08066224: _08066240: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89609,7 +89609,7 @@ _08066240: _0806625C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -89645,7 +89645,7 @@ sub_8066284: @ 8066284 adds r0, r4, 0x1 adds r0, r2, r0 ldrb r0, [r0] - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 adds r5, r3, r0 movs r3, 0 @@ -89701,11 +89701,11 @@ sub_80662F8: @ 80662F8 mov r2, r10 muls r2, r0 adds r0, r2, 0 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r9, r1 add r0, r9 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -89802,7 +89802,7 @@ sub_80662F8: @ 80662F8 adds r0, r1, 0 add r0, r9 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -89885,10 +89885,10 @@ sub_8066494: @ 8066494 mov r1, r9 muls r1, r0 adds r0, r1, 0 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 @@ -91283,10 +91283,10 @@ sub_80670A0: @ 80670A0 ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty adds r0, r4 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r8, r0 mov r1, r9 ldrb r0, [r1] @@ -91296,7 +91296,7 @@ sub_80670A0: @ 80670A0 muls r0, r5 adds r0, r4 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -91315,10 +91315,10 @@ _08067130: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -91373,7 +91373,7 @@ sub_806719C: @ 806719C ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0x9 bl healthbar_draw_field_maybe @@ -91741,10 +91741,10 @@ sub_8067498: @ 8067498 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 movs r1, 0x19 diff --git a/asm/rom_8072304.s b/asm/rom_8072304.s index 7277176d5..14f86f306 100644 --- a/asm/rom_8072304.s +++ b/asm/rom_8072304.s @@ -2078,10 +2078,10 @@ _080733DE: ldrh r0, [r1] movs r2, 0x64 muls r0, r2 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 asrs r1, 16 @@ -2093,7 +2093,7 @@ _080733DE: ldrh r0, [r2] movs r1, 0x64 muls r0, r1 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty b _08073536 .pool _08073468: @@ -2104,7 +2104,7 @@ _08073468: ldrh r1, [r2] movs r2, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0x5 bl healthbar_draw_field_maybe @@ -2138,7 +2138,7 @@ _080734B0: ldrh r1, [r2] movs r2, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 bl sub_80730D4 b _08073592 @@ -2170,10 +2170,10 @@ _080734DC: ldrh r0, [r1] movs r2, 0x64 muls r0, r2 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 asrs r1, 16 @@ -2185,11 +2185,11 @@ _080734DC: ldrh r0, [r2] movs r1, 0x64 muls r0, r1 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty _08073536: adds r0, r2 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 asrs r1, 16 @@ -2206,7 +2206,7 @@ _0807355C: ldrh r1, [r2] movs r5, 0x64 muls r1, r5 - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty adds r1, r4 movs r2, 0x5 bl healthbar_draw_field_maybe @@ -3766,7 +3766,7 @@ sub_80741E8: @ 80741E8 adds r0, r4, 0 movs r1, 0x2 add r2, sp, 0x4 - bl pokemon_getattr + bl GetMonData add r0, sp, 0x4 bl StringGetEnd10 adds r0, r5, 0 @@ -3779,7 +3779,7 @@ sub_80741E8: @ 80741E8 lsrs r6, r0, 24 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 adds r1, r0, 0 @@ -3912,10 +3912,10 @@ sub_8074310: @ 8074310 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl SpeciesToNationalPokedexNum @@ -4008,10 +4008,10 @@ draw_status_ailment_maybe: @ 80743F8 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 bl battle_type_is_double lsls r0, 24 @@ -4030,10 +4030,10 @@ _08074468: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 movs r1, 0x11 mov r8, r1 @@ -4520,7 +4520,7 @@ _080748B8: _080748C0: mov r0, r8 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -4531,7 +4531,7 @@ _080748D4: bhi _080748EE mov r0, r8 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 asrs r1, 16 @@ -4546,7 +4546,7 @@ _080748EE: _080748F6: mov r0, r8 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 asrs r1, 16 @@ -4563,11 +4563,11 @@ _08074914: bl load_gfxc_health_bar mov r0, r8 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r0, r8 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 movs r0, 0 str r0, [sp] @@ -4596,19 +4596,19 @@ _0807495E: bl load_gfxc_health_bar mov r0, r8 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 mov r0, r8 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 mov r0, r8 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 ldr r0, =gExperienceTables mov r12, r0 @@ -4683,7 +4683,7 @@ _08074A18: _08074A20: mov r0, r8 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -4699,11 +4699,11 @@ _08074A3C: bl load_gfxc_health_bar mov r0, r8 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 mov r0, r8 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 movs r0, 0 str r0, [sp] @@ -5017,10 +5017,10 @@ _08074CA0: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 adds r7, r5, 0 @@ -6026,7 +6026,7 @@ _08075488: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _080754C2 .pool _080754B4: @@ -6036,11 +6036,11 @@ _080754B4: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _080754C2: adds r0, r1 movs r1, 0x26 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl ball_number_to_ball_processing_index @@ -6077,7 +6077,7 @@ _080754C2: beq _08075548 cmp r2, 0xFF bne _08075584 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex strb r5, [r0] movs r0, 0x18 strh r0, [r4, 0x20] @@ -6104,7 +6104,7 @@ _08075548: lsrs r0, 24 adds r0, 0x18 strh r0, [r4, 0x22] - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex strb r5, [r0] movs r3, 0 strh r3, [r4, 0x2E] @@ -6118,7 +6118,7 @@ _08075548: _08075584: movs r0, 0x1 bl battle_get_side_with_given_state - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex strb r0, [r1] movs r0, 0x1 str r0, [sp] @@ -6128,7 +6128,7 @@ _08075592: adds r1, r7 lsls r1, 2 adds r4, r1, r0 - ldr r5, =gUnknown_0202420C + ldr r5, =gEnemyMonIndex ldrb r0, [r5] strh r0, [r4, 0x3A] ldr r2, [sp] @@ -7105,7 +7105,7 @@ _08075D88: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r7, r1, r0 movs r4, 0x19 mov r10, r4 @@ -7118,7 +7118,7 @@ _08075DC0: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 movs r0, 0xE7 mov r10, r0 @@ -7126,7 +7126,7 @@ _08075DD4: mov r8, r2 adds r0, r7, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r9, r0 @@ -8767,7 +8767,7 @@ sub_8076B14: @ 8076B14 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _08076B4E .pool _08076B40: @@ -8777,11 +8777,11 @@ _08076B40: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _08076B4E: adds r0, r1 movs r1, 0x26 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 pop {r4} diff --git a/asm/rom_80A5C6C.s b/asm/rom_80A5C6C.s index ce96523ce..27769fcc4 100644 --- a/asm/rom_80A5C6C.s +++ b/asm/rom_80A5C6C.s @@ -108,7 +108,7 @@ _080A5D28: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _080A5D7E .pool _080A5D60: @@ -126,11 +126,11 @@ _080A5D60: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _080A5D7E: adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 b _080A5D9A @@ -209,10 +209,10 @@ _080A5E04: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 b _080A5E42 .pool @@ -299,10 +299,10 @@ _080A5EC8: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 b _080A5F0A .pool @@ -668,7 +668,7 @@ sub_80A6190: @ 80A6190 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _080A6202 .pool _080A61E4: @@ -686,11 +686,11 @@ _080A61E4: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _080A6202: adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 b _080A621E @@ -1899,7 +1899,7 @@ _080A6ABC: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _080A6AFE .pool _080A6AF0: @@ -1909,11 +1909,11 @@ _080A6AF0: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _080A6AFE: adds r0, r1 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080A6B18 _080A6B0A: @@ -4585,10 +4585,10 @@ _080A7F78: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r2, r0, 16 b _080A7FC2 @@ -4620,10 +4620,10 @@ _080A7FD8: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r2, r0, 16 b _080A8012 @@ -5506,17 +5506,17 @@ _080A86C4: ldrh r0, [r4] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 ldrh r0, [r4] muls r0, r6 adds r0, r5 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 b _080A8724 .pool @@ -5596,17 +5596,17 @@ _080A8790: ldrh r0, [r4] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 ldrh r0, [r4] muls r0, r6 adds r0, r5 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 b _080A87E4 .pool diff --git a/asm/rom_80C6FA0.s b/asm/rom_80C6FA0.s index f13c6191e..db3c701e5 100644 --- a/asm/rom_80C6FA0.s +++ b/asm/rom_80C6FA0.s @@ -76,16 +76,16 @@ _080C700E: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080C7036 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080C7036 adds r0, r6, 0x1 @@ -118,21 +118,21 @@ _080C705A: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080C7092 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080C7092 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080C7092 adds r0, r6, 0x1 @@ -173,10 +173,10 @@ sub_80C70C4: @ 80C70C4 _080C70CA: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080C70E2 adds r0, r5, 0x1 @@ -5473,7 +5473,7 @@ sub_80C9F6C: @ 80C9F6C beq _080C9FAC movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC mov r2, sp @@ -6714,10 +6714,10 @@ sub_80CAA74: @ 80CAA74 _080CAA78: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData negs r1, r0 orrs r1, r0 lsrs r1, 31 @@ -7351,12 +7351,12 @@ sub_80CAFC4: @ 80CAFC4 ldr r4, =0x000020a4 adds r0, r4 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r6, r0, 0 ldr r0, [r5] adds r0, r4 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -8346,15 +8346,15 @@ sub_80CB7E8: @ 80CB7E8 lsls r0, 24 lsrs r0, 24 mov r8, r0 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 movs r0, 0x1 str r0, [sp] @@ -8376,18 +8376,18 @@ _080CB830: movs r0, 0x64 adds r1, r6, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 cmp r5, 0 beq _080CB894 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 subs r0, r6, 0x1 lsls r3, r0, 1 @@ -8482,10 +8482,10 @@ _080CB8FA: beq _080CB932 movs r0, 0x64 muls r0, r6 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080CB932 ldr r0, [r7] @@ -11910,10 +11910,10 @@ sub_80CD504: @ 80CD504 ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData b _080CD542 .pool _080CD538: @@ -13225,7 +13225,7 @@ sub_80CE018: @ 80CE018 ldr r0, [r0] ldr r1, =0x000020a4 adds r0, r1 - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty ldr r1, =gUnknown_02039D79 movs r2, 0 ldrsb r2, [r1, r2] @@ -13267,7 +13267,7 @@ diegohint2: @ 80CE08C lsrs r7, r1, 24 cmp r6, 0xE bne _080CE0C0 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty movs r0, 0x64 muls r0, r7 adds r0, r1 @@ -13308,7 +13308,7 @@ sub_80CE0E8: @ 80CE0E8 bne _080CE108 movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl zero_pokemon_struct b _080CE10C @@ -13333,7 +13333,7 @@ diegohint1: @ 80CE110 ldr r0, [r0] ldr r1, =0x00002108 adds r0, r1 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty movs r1, 0x64 muls r1, r7 adds r1, r2 @@ -13670,7 +13670,7 @@ _080CE418: ldr r0, [r4] ldr r2, =0x00002108 adds r0, r2 - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty ldr r1, =gUnknown_02039D79 movs r2, 0 ldrsb r2, [r1, r2] @@ -13721,7 +13721,7 @@ _080CE494: adds r0, r2, r1 adds r2, r4 movs r1, 0x51 - bl pokemon_getattr + bl GetMonData ldr r2, [r5] ldr r3, =0x00002174 adds r1, r2, r3 @@ -13770,10 +13770,10 @@ sub_80CE51C: @ 80CE51C _080CE52A: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080CE53E adds r5, 0x1 @@ -13865,12 +13865,12 @@ _080CE5C6: _080CE5E4: movs r0, 0x64 muls r0, r6 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =0x00002176 adds r2, r1 movs r1, 0x51 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 ldr r1, [r5] @@ -14120,7 +14120,7 @@ _080CE838: ldr r1, [r4] ldr r0, =0x0000218c adds r2, r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty str r0, [r2] ldr r0, =gUnknown_02039D79 ldrb r0, [r0] @@ -14205,7 +14205,7 @@ party_compaction: @ 80CE90C movs r5, 0 movs r0, 0x64 mov r9, r0 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty mov r8, r1 subs r0, 0x65 mov r10, r0 @@ -14216,7 +14216,7 @@ _080CE928: adds r4, r0, r1 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 cmp r0, 0 beq _080CE960 @@ -14250,7 +14250,7 @@ _080CE96A: cmp r5, 0x5 bhi _080CE992 movs r6, 0x64 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty _080CE97E: adds r0, r5, 0 muls r0, r6 @@ -14309,7 +14309,7 @@ _080CE9E8: ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x8 mov r2, sp @@ -14390,7 +14390,7 @@ sub_80CEA6C: @ 80CEA6C ldr r2, =0x000020a4 adds r0, r1, r2 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080CEAC8 _080CEAAC: @@ -14515,7 +14515,7 @@ _080CEB8A: adds r1, r0, 0 movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0 bl sub_80CEC00 @@ -14586,7 +14586,7 @@ sub_80CEC00: @ 80CEC00 adds r6, r4, 0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData mov r2, r8 ldr r1, [r2] ldr r3, =0x00000ce4 @@ -14599,7 +14599,7 @@ sub_80CEC00: @ 80CEC00 _080CEC44: adds r0, r4, 0 movs r1, 0x4 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 mov r10, r0 @@ -14616,7 +14616,7 @@ _080CEC44: _080CEC74: adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData mov r3, r8 ldr r1, [r3] ldr r2, =0x00000ced @@ -14629,27 +14629,27 @@ _080CEC86: adds r2, r5 adds r0, r6, 0 movs r1, 0x2 - bl pokemon_getattr + bl GetMonData ldr r0, [r4] adds r0, r5 bl StringGetEnd10 adds r0, r6, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r1, [r4] ldr r3, =0x00000cec adds r1, r3 strb r0, [r1] adds r0, r6, 0 movs r1, 0x8 - bl pokemon_getattr + bl GetMonData ldr r1, [r4] ldr r2, =0x00000ceb adds r1, r2 strb r0, [r1] adds r0, r6, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [r4] movs r3, 0xCE lsls r3, 4 @@ -14668,7 +14668,7 @@ _080CEC86: mov r9, r0 adds r0, r6, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData ldr r1, [r4] ldr r3, =0x00000ce6 adds r1, r3 @@ -18687,16 +18687,16 @@ _080D0DDA: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080D0E42 adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData _080D0DFC: lsls r0, 16 lsrs r4, r0, 16 @@ -18817,7 +18817,7 @@ sub_80D0E90: @ 80D0E90 _080D0EF8: movs r0, 0x64 muls r0, r7 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC mov r2, sp @@ -18946,11 +18946,11 @@ _080D101C: movs r0, 0x64 adds r4, r7, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 mov r0, r8 @@ -19035,7 +19035,7 @@ _080D10E0: mov r1, r8 muls r1, r0 adds r0, r1, 0 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r2, [r6] ldr r1, =0x00002234 @@ -19099,7 +19099,7 @@ sub_80D1114: @ 80D1114 _080D1170: movs r0, 0x64 muls r0, r7 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC mov r2, sp @@ -24096,7 +24096,7 @@ _080D3754: lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl GetMonAbility lsls r0, 24 @@ -25620,7 +25620,7 @@ sub_80D43F0: @ 80D43F0 push {r4,lr} adds r4, r0, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl itemid_is_mail @@ -25629,7 +25629,7 @@ sub_80D43F0: @ 80D43F0 beq _080D4418 adds r0, r4, 0 movs r1, 0x40 - bl pokemon_getattr + bl GetMonData cmp r0, 0xFF beq _080D4418 movs r0, 0x1 @@ -25957,7 +25957,7 @@ sub_80D4680: @ 80D4680 beq _080D46D2 adds r0, r4, 0 movs r1, 0x40 - bl pokemon_getattr + bl GetMonData add r2, sp, 0x4 strb r0, [r2] ldr r0, =gSaveBlock1Ptr @@ -26049,7 +26049,7 @@ _080D4724: adds r0, r5, 0 movs r1, 0x40 str r3, [sp, 0x8] - bl pokemon_getattr + bl GetMonData mov r1, r8 ldr r2, [r1] lsls r1, r0, 3 @@ -26066,7 +26066,7 @@ _080D4724: stm r4!, {r0,r2,r3} adds r0, r5, 0 movs r1, 0x40 - bl pokemon_getattr + bl GetMonData mov r1, r8 ldr r2, [r1] lsls r1, r0, 3 diff --git a/asm/rom_8158B30.s b/asm/rom_8158B30.s index 9577fd3ae..e7f93f1dc 100644 --- a/asm/rom_8158B30.s +++ b/asm/rom_8158B30.s @@ -389,7 +389,7 @@ _08158E38: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _08158E6A .pool _08158E5C: @@ -399,11 +399,11 @@ _08158E5C: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _08158E6A: adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 _08158E76: @@ -514,7 +514,7 @@ _08158F48: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty b _08158F7A .pool _08158F6C: @@ -524,11 +524,11 @@ _08158F6C: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty _08158F7A: adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 _08158F86: @@ -1975,7 +1975,7 @@ sub_8159B84: @ 8159B84 ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0xB bl healthbar_draw_field_maybe @@ -2200,10 +2200,10 @@ sub_8159D20: @ 8159D20 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 movs r1, 0x19 @@ -2250,7 +2250,7 @@ sub_8159D90: @ 8159D90 ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0xA bl healthbar_draw_field_maybe @@ -8320,10 +8320,10 @@ _0815CF18: ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty adds r0, r7 movs r1, 0 - bl pokemon_getattr + bl GetMonData mov r9, r0 ldrb r0, [r4] lsls r0, 1 @@ -8332,7 +8332,7 @@ _0815CF18: muls r0, r5 adds r0, r7 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData mov r8, r0 ldr r0, =gUnknown_020244D0 ldr r0, [r0] @@ -8362,11 +8362,11 @@ _0815CF9C: adds r0, r6 ldrh r0, [r0] muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 _0815CFAA: movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 b _0815CFBE @@ -8388,10 +8388,10 @@ _0815CFC4: ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r7, =gUnknown_02024744 + ldr r7, =gEnemyParty adds r0, r7 movs r1, 0 - bl pokemon_getattr + bl GetMonData mov r9, r0 ldrb r0, [r4] lsls r0, 1 @@ -8400,7 +8400,7 @@ _0815CFC4: muls r0, r5 adds r0, r7 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData mov r8, r0 ldr r0, =gUnknown_020244D0 ldr r0, [r0] @@ -8421,7 +8421,7 @@ _0815CFC4: adds r0, r6 ldrh r0, [r0] muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 b _0815D048 .pool @@ -8434,7 +8434,7 @@ _0815D03C: adds r0, r7 _0815D048: movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 b _0815D056 @@ -13669,10 +13669,10 @@ _0815FA28: ldrh r0, [r0] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0 - bl pokemon_getattr + bl GetMonData mov r10, r0 ldrb r0, [r4] lsls r0, 1 @@ -13681,7 +13681,7 @@ _0815FA28: muls r0, r6 adds r0, r5 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData mov r9, r0 ldr r0, =gUnknown_020244D0 ldr r0, [r0] @@ -13698,7 +13698,7 @@ _0815FA28: muls r0, r6 adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 b _0815FA9E @@ -13733,10 +13733,10 @@ _0815FAC8: ldrh r0, [r0] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty adds r0, r5 movs r1, 0 - bl pokemon_getattr + bl GetMonData mov r10, r0 ldrb r0, [r4] lsls r0, 1 @@ -13745,7 +13745,7 @@ _0815FAC8: muls r0, r6 adds r0, r5 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData mov r9, r0 ldr r0, =gUnknown_020244D0 ldr r0, [r0] @@ -13762,7 +13762,7 @@ _0815FAC8: muls r0, r6 adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 b _0815FB2E @@ -15456,7 +15456,7 @@ _081609A8: movs r0, 0x64 adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 bl sub_8161054 adds r1, r0, 0 @@ -15745,7 +15745,7 @@ _08160C56: bl sub_8161054 lsls r0, 16 lsrs r0, 16 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty ldr r1, =gUnknown_0203BC34 ldr r1, [r1] adds r1, 0x44 @@ -15864,11 +15864,11 @@ _08160D6C: ldrb r0, [r0] movs r4, 0x64 muls r0, r4 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 ldrb r1, [r2] adds r1, 0xD - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 ldr r2, =gStringVar3 @@ -16443,7 +16443,7 @@ sub_8161280: @ 8161280 ldrb r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 adds r1, 0x12 bl sub_806E0B4 @@ -16497,11 +16497,11 @@ _081612F6: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData ldr r0, =gStringVar1 mov r1, sp bl StringCopy10 @@ -16742,10 +16742,10 @@ hm_prepare_dive_probably: @ 8161508 lsrs r0, 24 movs r6, 0x64 muls r0, r6 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -16755,7 +16755,7 @@ hm_prepare_dive_probably: @ 8161508 muls r0, r6 adds r0, r4 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -16843,12 +16843,12 @@ _081615EC: mov r10, r0 mov r0, r10 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty mov r9, r1 adds r6, r0, r1 adds r0, r6, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 cmp r4, 0 @@ -16857,7 +16857,7 @@ _081615EC: beq _0816161A adds r0, r6, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData cmp r0, r4 bne _08161628 _0816161A: @@ -16873,7 +16873,7 @@ _08161628: muls r0, r1 add r0, r9 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData movs r1, 0x5 bl __udivsi3 adds r3, r0, 0 @@ -16912,10 +16912,10 @@ sub_816166C: @ 816166C ldrsb r1, [r5, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData movs r1, 0x5 bl __udivsi3 adds r3, r0, 0 @@ -16945,7 +16945,7 @@ sub_81616C0: @ 81616C0 ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 bl GetMonNickname @@ -17588,7 +17588,7 @@ _08161BBC: _08161BC8: strh r2, [r1, 0x8] adds r7, r0, 0 - ldr r6, =gUnknown_02024744 + ldr r6, =gEnemyParty ldr r0, [r7] ldr r5, =0x000031dc adds r0, r5 @@ -17615,19 +17615,19 @@ _08161BC8: strb r1, [r0, 0x13] adds r0, r6, 0 movs r1, 0x42 - bl pokemon_getattr + bl GetMonData ldr r1, [r7] adds r1, r5 str r0, [r1] adds r0, r6, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [r7] adds r1, r5 str r0, [r1, 0x4] adds r0, r6, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData ldr r1, [r7] adds r1, r5 movs r2, 0 @@ -17635,31 +17635,31 @@ _08161BC8: strh r0, [r1, 0xA] adds r0, r6, 0 movs r1, 0x16 - bl pokemon_getattr + bl GetMonData ldr r1, [r7] adds r1, r5 strb r0, [r1, 0xE] adds r0, r6, 0 movs r1, 0x17 - bl pokemon_getattr + bl GetMonData ldr r1, [r7] adds r1, r5 strb r0, [r1, 0xF] adds r0, r6, 0 movs r1, 0x18 - bl pokemon_getattr + bl GetMonData ldr r1, [r7] adds r1, r5 strb r0, [r1, 0x10] adds r0, r6, 0 movs r1, 0x21 - bl pokemon_getattr + bl GetMonData ldr r1, [r7] adds r1, r5 strb r0, [r1, 0x11] adds r0, r6, 0 movs r1, 0x2F - bl pokemon_getattr + bl GetMonData ldr r1, [r7] adds r1, r5 strb r0, [r1, 0x12] @@ -17867,7 +17867,7 @@ _08161E22: sub_8161E28: @ 8161E28 push {r4,r5,lr} sub sp, 0x4 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty bl zero_enemy_party_data ldr r4, =gSaveBlock1Ptr ldr r0, [r4] @@ -17964,7 +17964,7 @@ sub_8161F18: @ 8161F18 push {r4-r6,lr} adds r6, r0, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData ldr r5, =gSaveBlock1Ptr ldr r1, [r5] ldr r4, =0x000031dc @@ -17972,7 +17972,7 @@ sub_8161F18: @ 8161F18 strh r0, [r1, 0xA] adds r0, r6, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData ldr r1, [r5] adds r1, r4 strb r0, [r1, 0xD] @@ -20073,7 +20073,7 @@ _0816314A: _0816314C: movs r0, 0x64 muls r0, r7 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r5, [sp, 0x18] subs r2, r7, r5 @@ -20142,7 +20142,7 @@ _081631B6: bhi _081631F0 movs r0, 0x64 muls r0, r7 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 adds r1, r3, r4 adds r2, 0x34 @@ -20176,7 +20176,7 @@ _08163222: _08163230: movs r0, 0x64 muls r0, r7 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r1, [r6] adds r1, r5 @@ -20254,11 +20254,11 @@ _081632D2: movs r1, 0x64 adds r0, r6, 0 muls r0, r1 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r0, r2 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =gUnknown_0203BC8C ldr r2, [r1] lsls r1, r4, 4 @@ -20278,20 +20278,20 @@ _081632FC: mov r9, r5 movs r3, 0 _08163308: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r5, r3, r0 adds r0, r5, 0 movs r1, 0xC movs r2, 0 str r3, [sp, 0x38] - bl pokemon_getattr + bl GetMonData ldr r3, [sp, 0x38] cmp r0, 0 beq _0816333E adds r0, r5, 0 movs r1, 0xC movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =gUnknown_0203BC8C ldr r2, [r1] lsls r1, r4, 4 @@ -20337,7 +20337,7 @@ _08163368: movs r1, 0x64 mov r0, r8 muls r0, r1 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r0, r2 ldr r5, =gUnknown_0203BC8C ldr r2, [r5] @@ -20365,7 +20365,7 @@ _08163368: muls r3, r0 mov r1, r9 str r1, [sp, 0x3C] - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r10, r2 _081633B8: ldr r0, [r5] @@ -20400,7 +20400,7 @@ _081633EC: movs r5, 0x64 mov r4, r8 muls r4, r5 - ldr r6, =gUnknown_02024744 + ldr r6, =gEnemyParty adds r4, r6 adds r0, r4, 0 movs r1, 0x20 @@ -20483,7 +20483,7 @@ _08163494: adds r6, r2, r7 movs r0, 0x64 muls r0, r6 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 lsls r5, r7, 1 adds r4, r5, r7 @@ -20519,7 +20519,7 @@ _081634D4: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x20 @@ -20697,7 +20697,7 @@ _0816365C: _0816365E: movs r0, 0x64 muls r0, r7 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r1, [sp, 0x10] subs r2, r7, r1 @@ -20758,7 +20758,7 @@ _081636CE: movs r0, 0x64 adds r6, r5, 0 muls r6, r0 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r6, r1 ldr r3, =gUnknown_0203BC8C ldr r2, [r3] @@ -20794,7 +20794,7 @@ _08163718: adds r0, 0x2 adds r0, r1 ldrh r1, [r0] - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r0, r6, r2 adds r2, r3, 0 str r3, [sp, 0x1C] @@ -20808,7 +20808,7 @@ _08163718: movs r3, 0x64 adds r4, r5, 0 muls r4, r3 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x20 @@ -20880,7 +20880,7 @@ _081637D0: movs r7, 0x64 adds r6, r5, 0 muls r6, r7 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r6, r1 ldr r7, =gUnknown_0203BC8C ldr r2, [r7] @@ -20913,7 +20913,7 @@ _08163818: adds r0, 0x2 adds r0, r4 ldrh r1, [r0] - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r0, r6, r2 adds r2, r7, 0 bl sub_81A7024 @@ -20937,7 +20937,7 @@ _08163846: movs r2, 0x64 mov r4, r10 muls r4, r2 - ldr r7, =gUnknown_02024744 + ldr r7, =gEnemyParty adds r4, r7 adds r0, r4, 0 movs r1, 0x20 @@ -21156,10 +21156,10 @@ _08163A3C: ldr r0, [r6] adds r0, r1 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xC @@ -21314,10 +21314,10 @@ _08163BC4: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r0, r4, r0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] movs r0, 0x8E @@ -21346,7 +21346,7 @@ _08163C10: _08163C18: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2C adds r2, r5, 0 @@ -21840,18 +21840,18 @@ sub_81640E0: @ 81640E0 adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 adds r4, 0x64 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 movs r6, 0 @@ -21930,11 +21930,11 @@ sub_8164188: @ 8164188 lsls r0, 30 lsrs r0, 30 str r0, [sp, 0xC] - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x10] @@ -21942,7 +21942,7 @@ sub_8164188: @ 8164188 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x14] @@ -22080,17 +22080,17 @@ sub_81642A0: @ 81642A0 lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x18] - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x1C] adds r4, 0x64 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x20] bl sub_8165C40 movs r7, 0 @@ -23359,22 +23359,22 @@ sub_8164E04: @ 8164E04 ldrh r0, [r6, 0x2] movs r5, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [r4] ldr r2, =0x00000bd6 adds r1, r2 strh r0, [r1] ldrh r0, [r6] muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [r4] ldr r2, =0x00000bd4 adds r1, r2 @@ -23662,7 +23662,7 @@ _0816508C: ldr r0, [r7] adds r0, r4 mov r1, r10 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081650D4 movs r0, 0x1 @@ -23823,7 +23823,7 @@ _081651E0: _08165206: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2C muls r1, r4 @@ -25150,18 +25150,18 @@ _08165CBA: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08165CF4 adds r0, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xCE lsls r1, 1 cmp r0, r1 @@ -25169,7 +25169,7 @@ _08165CBA: adds r0, r4, 0 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, r6 ble _08165CF4 adds r6, r0, 0 @@ -25452,11 +25452,11 @@ _08165F44: movs r1, 0x64 adds r0, r6, 0 muls r0, r1 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r0, r2 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =gUnknown_0203BC8C ldr r2, [r1] lsls r1, r4, 4 @@ -25476,20 +25476,20 @@ _08165F6E: mov r9, r0 movs r3, 0 _08165F7A: - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r5, r3, r1 adds r0, r5, 0 movs r1, 0xC movs r2, 0 str r3, [sp, 0x34] - bl pokemon_getattr + bl GetMonData ldr r3, [sp, 0x34] cmp r0, 0 beq _08165FB0 adds r0, r5, 0 movs r1, 0xC movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =gUnknown_0203BC8C ldr r2, [r1] lsls r1, r4, 4 @@ -25536,7 +25536,7 @@ _08165FDA: movs r6, 0x64 adds r0, r7, 0 muls r0, r6 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r5, =gUnknown_0203BC8C ldr r2, [r5] @@ -25565,7 +25565,7 @@ _08165FDA: mov r8, r1 adds r3, r5, 0 mov r5, r9 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r10, r2 _0816602E: ldr r0, [r3] @@ -25598,7 +25598,7 @@ _0816605E: movs r2, 0x64 adds r4, r7, 0 muls r4, r2 - ldr r6, =gUnknown_02024744 + ldr r6, =gEnemyParty adds r4, r6 adds r0, r4, 0 movs r1, 0x20 @@ -25768,12 +25768,12 @@ _081661A6: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 cmp r1, 0 beq _081661E2 @@ -26674,7 +26674,7 @@ _08166A58: .4byte _08166BB6 _08166A70: ldr r4, [r5] - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty str r3, [r4, 0xC] ldr r0, =gUnknown_0203BCAC ldr r0, [r0] @@ -26987,11 +26987,11 @@ sub_8166D44: @ 8166D44 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 add r2, sp, 0xC - bl pokemon_getattr + bl GetMonData add r0, sp, 0xC bl StringGetEnd10 ldr r1, =gUnknown_085EC7A0 @@ -27329,7 +27329,7 @@ _0816702E: adds r0, r7 ldr r1, [r0] adds r0, r6, 0 - bl pokemon_getattr + bl GetMonData adds r1, r5, r4 strb r0, [r1] adds r0, r4, 0x1 @@ -27353,7 +27353,7 @@ sub_8167054: @ 8167054 adds r5, r1, 0 adds r0, r5, 0 movs r1, 0x30 - bl pokemon_getattr + bl GetMonData cmp r0, 0xFF beq _081670F0 mov r0, r8 @@ -27368,7 +27368,7 @@ _08167078: ldr r6, [r0] adds r0, r5, 0 adds r1, r6, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 strb r0, [r7] @@ -27403,7 +27403,7 @@ _081670B0: bls _08167078 adds r0, r5, 0 movs r1, 0x30 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 mov r2, r8 @@ -27434,7 +27434,7 @@ _081670F0: thumb_func_start sub_8167104 sub_8167104: @ 8167104 push {r4,r5,lr} - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty ldr r0, =gUnknown_0203BCAC ldr r1, [r0] ldr r2, =0x00008041 @@ -27640,10 +27640,10 @@ sub_81672A4: @ 81672A4 _081672AC: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081672D2 cmp r5, 0 @@ -27680,10 +27680,10 @@ sub_81672E4: @ 81672E4 _081672F2: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0816730A adds r0, r6, 0x1 @@ -27841,10 +27841,10 @@ sub_8167420: @ 8167420 _08167430: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 cmp r3, 0 bne _0816746C @@ -28684,7 +28684,7 @@ sub_8167BA0: @ 8167BA0 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl GetNature adds r4, r0, 0 @@ -29356,10 +29356,10 @@ sub_81681F4: @ 81681F4 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x30 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r2, r0, 24 ldr r0, =gUnknown_0203BCAC @@ -29904,7 +29904,7 @@ sub_816864C: @ 816864C ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -29929,7 +29929,7 @@ _08168684: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -30016,7 +30016,7 @@ _081686D2: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -30050,7 +30050,7 @@ _0816877A: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -30195,7 +30195,7 @@ _08168842: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 bl dp01_tbl5_exec_completed @@ -30247,7 +30247,7 @@ _0816897C: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 bl dp01_tbl5_exec_completed @@ -30638,16 +30638,16 @@ _08168D44: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2E] movs r6, 0 @@ -30675,12 +30675,12 @@ _08168D90: adds r1, r6, 0 adds r1, 0xD mov r0, r8 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r1, r6, 0 adds r1, 0x11 mov r0, r8 - bl pokemon_getattr + bl GetMonData mov r2, r9 adds r1, r2, r6 strb r0, [r1] @@ -30691,25 +30691,25 @@ _08168D90: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r10 strb r0, [r1] adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x80] strb r0, [r2] adds r0, r4, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x44] adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r5, 0x1F ands r0, r5 @@ -30721,7 +30721,7 @@ _08168D90: strb r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r6, 0x1F ands r0, r6 @@ -30733,7 +30733,7 @@ _08168D90: strh r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 2 @@ -30745,7 +30745,7 @@ _08168D90: strb r1, [r3, 0x15] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData movs r1, 0x1F ands r1, r0 lsls r1, 15 @@ -30756,7 +30756,7 @@ _08168D90: str r0, [sp, 0x14] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r6 lsls r0, 4 @@ -30767,7 +30767,7 @@ _08168D90: strh r1, [r3, 0x16] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 1 @@ -30779,55 +30779,55 @@ _08168D90: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x48] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4C] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x7C] strb r0, [r1] adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x28] adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2C] adds r0, r4, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2] adds r0, r4, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x4] adds r0, r4, 0 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x6] adds r0, r4, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x8] adds r0, r4, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0xA] adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData mov r3, sp movs r1, 0x1 ands r0, r1 @@ -30840,7 +30840,7 @@ _08168D90: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData mov r3, sp lsls r0, 7 ldrb r2, [r3, 0x17] @@ -30850,19 +30850,19 @@ _08168D90: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x54] adds r0, r4, 0 movs r1, 0x2 ldr r2, [sp, 0x8C] - bl pokemon_getattr + bl GetMonData ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] - bl pokemon_getattr + bl GetMonData mov r2, sp movs r6, 0 _08168F48: @@ -30878,7 +30878,7 @@ _08168F48: _08168F68: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB b _081692E2 @@ -30886,7 +30886,7 @@ _08168F68: _08168F78: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC b _081692E2 @@ -30900,20 +30900,20 @@ _08168F88: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 mov r8, r9 _08168F9E: adds r1, r6, 0 adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r1, r8 strh r0, [r1] adds r1, r6, 0 adds r1, 0x11 adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r2, r10 adds r1, r2, r6 strb r0, [r1] @@ -30924,10 +30924,10 @@ _08168F9E: ble _08168F9E movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r9 strb r0, [r1, 0xC] mov r2, r9 @@ -30945,7 +30945,7 @@ _08168FDC: _08168FF0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -30960,14 +30960,14 @@ _0816900C: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r8, r2 _08169018: adds r1, r6, 0 adds r1, 0x11 mov r2, r8 adds r0, r4, r2 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -30975,10 +30975,10 @@ _08169018: ble _08169018 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -30987,7 +30987,7 @@ _08169018: _08169048: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -31000,7 +31000,7 @@ _08169048: _08169064: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1 b _0816907E @@ -31008,11 +31008,11 @@ _08169064: _08169074: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x19 _0816907E: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -31031,7 +31031,7 @@ _0816907E: _081690A4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1A b _081693A2 @@ -31039,7 +31039,7 @@ _081690A4: _081690B4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1B b _081693A2 @@ -31047,7 +31047,7 @@ _081690B4: _081690C4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1C b _081693A2 @@ -31055,7 +31055,7 @@ _081690C4: _081690D4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1D b _081693A2 @@ -31063,7 +31063,7 @@ _081690D4: _081690E4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1E b _081693A2 @@ -31071,7 +31071,7 @@ _081690E4: _081690F4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1F b _081693A2 @@ -31079,7 +31079,7 @@ _081690F4: _08169104: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x20 b _081693A2 @@ -31087,7 +31087,7 @@ _08169104: _08169114: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x22 b _081693A2 @@ -31095,7 +31095,7 @@ _08169114: _08169124: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x23 b _081693A2 @@ -31103,7 +31103,7 @@ _08169124: _08169134: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x24 b _081693A2 @@ -31111,7 +31111,7 @@ _08169134: _08169144: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x25 b _081693A2 @@ -31119,7 +31119,7 @@ _08169144: _08169154: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x26 b _081693A2 @@ -31128,31 +31128,31 @@ _08169164: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData strb r0, [r7] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x1] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x2] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x3] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x4] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x5] movs r6, 0x6 b _081693AA @@ -31160,7 +31160,7 @@ _08169164: _081691B4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x27 b _081693A2 @@ -31168,7 +31168,7 @@ _081691B4: _081691C4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x28 b _081693A2 @@ -31176,7 +31176,7 @@ _081691C4: _081691D4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x29 b _081693A2 @@ -31184,7 +31184,7 @@ _081691D4: _081691E4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2A b _081693A2 @@ -31192,7 +31192,7 @@ _081691E4: _081691F4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2B b _081693A2 @@ -31200,7 +31200,7 @@ _081691F4: _08169204: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2C b _081693A2 @@ -31208,7 +31208,7 @@ _08169204: _08169214: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0 b _0816923E @@ -31216,7 +31216,7 @@ _08169214: _08169224: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x9 b _081692E2 @@ -31224,11 +31224,11 @@ _08169224: _08169234: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x37 _0816923E: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -31249,7 +31249,7 @@ _0816923E: _08169268: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x38 b _081693A2 @@ -31257,7 +31257,7 @@ _08169268: _08169278: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x39 b _081692E2 @@ -31265,7 +31265,7 @@ _08169278: _08169288: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A b _081692E2 @@ -31273,7 +31273,7 @@ _08169288: _08169298: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3B b _081692E2 @@ -31281,7 +31281,7 @@ _08169298: _081692A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3C b _081692E2 @@ -31289,7 +31289,7 @@ _081692A8: _081692B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3D b _081692E2 @@ -31297,7 +31297,7 @@ _081692B8: _081692C8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3E b _081692E2 @@ -31305,11 +31305,11 @@ _081692C8: _081692D8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3F _081692E2: - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 strb r0, [r7] @@ -31321,7 +31321,7 @@ _081692E2: _081692F8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x16 b _081693A2 @@ -31329,7 +31329,7 @@ _081692F8: _08169308: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x17 b _081693A2 @@ -31337,7 +31337,7 @@ _08169308: _08169318: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x18 b _081693A2 @@ -31345,7 +31345,7 @@ _08169318: _08169328: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x21 b _081693A2 @@ -31353,7 +31353,7 @@ _08169328: _08169338: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2F b _081693A2 @@ -31361,7 +31361,7 @@ _08169338: _08169348: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x30 b _081693A2 @@ -31369,7 +31369,7 @@ _08169348: _08169358: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x32 b _081693A2 @@ -31377,7 +31377,7 @@ _08169358: _08169368: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x33 b _081693A2 @@ -31385,7 +31385,7 @@ _08169368: _08169378: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x34 b _081693A2 @@ -31393,7 +31393,7 @@ _08169378: _08169388: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x35 b _081693A2 @@ -31401,11 +31401,11 @@ _08169388: _08169398: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x36 _081693A2: - bl pokemon_getattr + bl GetMonData strb r0, [r7] movs r6, 0x1 _081693AA: @@ -31568,7 +31568,7 @@ _08169558: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB @@ -31635,7 +31635,7 @@ _081695BE: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 @@ -31748,7 +31748,7 @@ _081695BE: _081696F0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -31761,7 +31761,7 @@ _081696F0: _08169710: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -31780,7 +31780,7 @@ _08169730: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r6, r3, 0 adds r6, 0x8 @@ -31805,7 +31805,7 @@ _0816974A: ble _0816974A movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 mov r2, r9 @@ -31815,7 +31815,7 @@ _0816974A: _08169788: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gUnknown_02023064 ldr r1, =gUnknown_02024064 @@ -31831,7 +31831,7 @@ _081697B0: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 ldr r5, =gUnknown_02024064 ldrb r2, [r5] @@ -31873,7 +31873,7 @@ _081697B0: _08169814: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gUnknown_02023064 ldr r1, =gUnknown_02024064 @@ -31892,7 +31892,7 @@ _0816982C: _08169844: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -31905,7 +31905,7 @@ _08169844: _08169864: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -31918,7 +31918,7 @@ _08169864: _08169884: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -31931,7 +31931,7 @@ _08169884: _081698A4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -31944,7 +31944,7 @@ _081698A4: _081698C4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -31957,7 +31957,7 @@ _081698C4: _081698E4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -31970,7 +31970,7 @@ _081698E4: _08169904: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -31983,7 +31983,7 @@ _08169904: _08169924: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -31996,7 +31996,7 @@ _08169924: _08169944: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32009,7 +32009,7 @@ _08169944: _08169964: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32022,7 +32022,7 @@ _08169964: _08169984: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32035,7 +32035,7 @@ _08169984: _081699A4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32048,7 +32048,7 @@ _081699A4: _081699C4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32061,7 +32061,7 @@ _081699C4: _081699E4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32075,7 +32075,7 @@ _08169A04: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 ldr r5, =gUnknown_02024064 ldrb r2, [r5] @@ -32122,7 +32122,7 @@ _08169A04: _08169A74: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32135,7 +32135,7 @@ _08169A74: _08169A94: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32148,7 +32148,7 @@ _08169A94: _08169AB4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32161,7 +32161,7 @@ _08169AB4: _08169AD4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32174,7 +32174,7 @@ _08169AD4: _08169AF4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32187,7 +32187,7 @@ _08169AF4: _08169B14: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32201,7 +32201,7 @@ _08169B24: _08169B34: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32214,7 +32214,7 @@ _08169B34: _08169B54: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32227,7 +32227,7 @@ _08169B54: _08169B74: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32240,7 +32240,7 @@ _08169B74: _08169B94: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32253,7 +32253,7 @@ _08169B94: _08169BB4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32266,7 +32266,7 @@ _08169BB4: _08169BD4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32279,7 +32279,7 @@ _08169BD4: _08169BF4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32292,7 +32292,7 @@ _08169BF4: _08169C14: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32305,7 +32305,7 @@ _08169C14: _08169C34: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32318,7 +32318,7 @@ _08169C34: _08169C54: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32331,7 +32331,7 @@ _08169C54: _08169C74: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32344,7 +32344,7 @@ _08169C74: _08169C94: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32357,7 +32357,7 @@ _08169C94: _08169CB4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32370,7 +32370,7 @@ _08169CB4: _08169CD4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32383,7 +32383,7 @@ _08169CD4: _08169CF4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32396,7 +32396,7 @@ _08169CF4: _08169D14: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32409,7 +32409,7 @@ _08169D14: _08169D34: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32422,7 +32422,7 @@ _08169D34: _08169D54: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32435,7 +32435,7 @@ _08169D54: _08169D74: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32448,7 +32448,7 @@ _08169D74: _08169D94: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32461,7 +32461,7 @@ _08169D94: _08169DB4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32474,7 +32474,7 @@ _08169DB4: _08169DD4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -32491,7 +32491,7 @@ _08169DEA: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 add sp, 0x34 @@ -33421,10 +33421,10 @@ sub_816A5D4: @ 816A5D4 ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r8, r0 mov r1, r9 ldrb r0, [r1] @@ -33434,7 +33434,7 @@ sub_816A5D4: @ 816A5D4 muls r0, r5 adds r0, r4 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -33453,10 +33453,10 @@ _0816A664: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -33752,10 +33752,10 @@ sub_816A89C: @ 816A89C ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 movs r1, 0x19 @@ -33972,10 +33972,10 @@ sub_816AA80: @ 816AA80 ldrh r1, [r2] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 diff --git a/asm/rom_817C95C.s b/asm/rom_817C95C.s index 125dd627a..343f21347 100644 --- a/asm/rom_817C95C.s +++ b/asm/rom_817C95C.s @@ -39,7 +39,7 @@ _0817C988: bl battle_side_get_owner lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] bl battle_side_get_owner lsls r0, 24 @@ -66,7 +66,7 @@ _0817C988: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _0817CA10 .pool _0817CA00: @@ -77,31 +77,31 @@ _0817CA00: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _0817CA10: adds r1, r0 str r1, [sp, 0x8] cmp r6, 0 bne _0817CA3C - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] lsls r0, 1 adds r0, r2 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _0817CA4C .pool _0817CA3C: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] lsls r0, 1 adds r0, r2 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _0817CA4C: adds r1, r0 str r1, [sp, 0xC] @@ -140,7 +140,7 @@ _0817CA9C: lsls r0, 24 lsrs r0, 25 mov r8, r0 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] bl battle_get_per_side_status lsls r0, 24 @@ -553,7 +553,7 @@ _0817D0B4: ldr r0, [sp, 0xC] movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0817D0C6 bl _0817E0A6 @@ -941,7 +941,7 @@ _0817D3F2: bl _0817E0A6 _0817D3FE: ldr r0, =gUnknown_0202420B - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r0] ldrb r1, [r1] cmp r0, r1 @@ -1045,7 +1045,7 @@ _0817D4E0: ldr r0, [sp, 0x8] movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0817D4F2 bl _0817E0A6 @@ -1183,7 +1183,7 @@ _0817D608: ldr r0, [sp, 0x8] movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0817D61A bl _0817E0A6 @@ -1251,7 +1251,7 @@ _0817D698: ldr r0, [sp, 0x8] movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0817D6AA bl _0817E0A6 @@ -1348,7 +1348,7 @@ _0817D76C: ldr r0, [sp, 0x8] movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0817D77E bl _0817E0A6 @@ -1491,7 +1491,7 @@ _0817D8A4: ldr r0, [sp, 0x8] movs r1, 0x39 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0817D8B6 bl _0817E0A6 @@ -2564,7 +2564,7 @@ _0817E122: lsls r0, 24 lsrs r0, 24 mov r9, r0 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] bl battle_side_get_owner lsls r0, 24 @@ -2934,11 +2934,11 @@ _0817E434: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r0, r4, r0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0817E454 mov r0, r8 @@ -2947,11 +2947,11 @@ _0817E434: lsrs r0, 24 mov r8, r0 _0817E454: - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty adds r0, r4, r5 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _0817E46A adds r0, r7, 0x1 @@ -2981,12 +2981,12 @@ _0817E484: _0817E48E: mov r1, r8 muls r1, r6 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 adds r0, r6, 0x1 @@ -2996,7 +2996,7 @@ _0817E48E: adds r0, r4, 0 movs r1, 0x2D movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0817E4EE movs r4, 0 @@ -3029,12 +3029,12 @@ _0817E4C4: _0817E4EE: mov r0, r8 muls r0, r6 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r4, r0, r2 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 ldr r3, [sp, 0x8] @@ -3045,7 +3045,7 @@ _0817E4EE: adds r0, r4, 0 movs r1, 0x2D movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0817E5A0 movs r4, 0 @@ -3078,20 +3078,20 @@ _0817E534: bne _0817E590 mov r0, r8 muls r0, r6 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x19 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 ldr r2, [sp, 0x14] mov r0, r8 muls r0, r2 - ldr r3, =gUnknown_02024744 + ldr r3, =gEnemyParty adds r0, r3 movs r1, 0x19 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r4, r0 bls _0817E5A0 b _0817E594 @@ -3115,7 +3115,7 @@ _0817E5A8: movs r4, 0 movs r6, 0 movs r3, 0 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty ldr r7, [sp, 0x10] lsls r0, r7, 3 mov r1, r10 @@ -3141,7 +3141,7 @@ _0817E5C8: adds r1, r6, 0 adds r1, 0xD movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 ldr r2, [sp, 0x1C] @@ -3249,7 +3249,7 @@ sub_817E684: @ 817E684 bl battle_side_get_owner lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] bl battle_side_get_owner lsls r0, 24 @@ -3714,7 +3714,7 @@ sub_817EA80: @ 817EA80 bl battle_side_get_owner lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] bl battle_side_get_owner lsls r0, 24 @@ -4291,7 +4291,7 @@ _0817EEF8: bgt _0817EF10 b _0817F1FA _0817EF10: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r0, [r0] muls r0, r1 adds r0, r5 @@ -4375,7 +4375,7 @@ _0817EF98: mov r1, sp adds r1, r0 adds r1, 0x10 - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage ldr r0, [r0] str r0, [r1] ldr r0, =gUnknown_020241EA @@ -4386,7 +4386,7 @@ _0817EF98: mov r10, r3 mov r8, r0 add r7, sp, 0x10 - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex mov r9, r4 _0817EFC2: lsls r1, r5, 1 @@ -4445,7 +4445,7 @@ _0817EFC2: str r4, [sp, 0xC] bl sub_806957C adds r3, r0, 0 - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage str r3, [r4] ldr r1, =gUnknown_020242AC ldr r2, =gUnknown_0202420B @@ -4480,7 +4480,7 @@ _0817F06A: lsls r0, 28 cmp r0, 0 bge _0817F08C - ldr r4, =gUnknown_020241F0 + ldr r4, =gBattleMoveDamage ldr r1, [r4] lsls r0, r1, 4 subs r0, r1 @@ -4496,7 +4496,7 @@ _0817F08C: bl move_effectiveness_something lsls r0, 24 lsrs r1, r0, 24 - ldr r0, =gUnknown_020241F0 + ldr r0, =gBattleMoveDamage ldr r0, [r0] str r0, [r7] cmp r0, 0 @@ -4545,8 +4545,8 @@ _0817F0D8: movs r7, 0 _0817F0F6: movs r5, 0 - ldr r4, =gUnknown_0202420C - ldr r6, =gUnknown_02024744 + ldr r4, =gEnemyMonIndex + ldr r6, =gEnemyParty ldr r0, =gUnknown_0202420B ldrb r0, [r0] add r0, r10 @@ -4578,7 +4578,7 @@ _0817F11A: adds r0, r6 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r6, r0, 0 lsls r6, 16 lsrs r6, 16 @@ -4590,11 +4590,11 @@ _0817F11A: mov r3, r9 muls r3, r0 adds r0, r3, 0 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -4623,7 +4623,7 @@ _0817F1D4: bgt _0817F1DC b _0817F0CC _0817F1DC: - ldr r2, =gUnknown_020241F0 + ldr r2, =gBattleMoveDamage ldr r1, =gUnknown_020244B0 ldr r0, =gUnknown_0202420B ldrb r0, [r0] @@ -4803,10 +4803,10 @@ sub_817F33C: @ 817F33C adds r0, r5, 0 bl battle_side_get_owner lsls r0, 24 - ldr r6, =gUnknown_02024744 + ldr r6, =gEnemyParty cmp r0, 0 bne _0817F356 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty _0817F356: movs r4, 0 ldr r1, =gUnknown_0202406E @@ -4826,7 +4826,7 @@ _0817F36E: adds r1, r4, 0 adds r1, 0xD movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r0, r7 bne _0817F36C _0817F388: diff --git a/asm/rom_8184DA4.s b/asm/rom_8184DA4.s index e673068ae..a85b47210 100644 --- a/asm/rom_8184DA4.s +++ b/asm/rom_8184DA4.s @@ -1599,7 +1599,7 @@ sub_8185B60: @ 8185B60 bl zero_player_party_data bl zero_enemy_party_data movs r6, 0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty mov r8, r0 _08185B7C: movs r0, 0x64 @@ -1611,7 +1611,7 @@ _08185B7C: adds r1, r5, 0 movs r2, 0x64 bl memcpy - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 movs r2, 0x96 lsls r2, 2 @@ -1953,13 +1953,13 @@ _08185EBE: adds r4, r5, 0 muls r4, r0 adds r0, r4, r6 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r1, r4, r1 movs r2, 0x64 bl memcpy ldr r0, =gUnknown_0203CA18 adds r0, r4, r0 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r4, r1 adds r1, r4, 0 movs r2, 0x64 @@ -1977,7 +1977,7 @@ _08185EBE: sub_8185EFC: @ 8185EFC push {r4-r6,lr} movs r5, 0 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty _08185F02: movs r0, 0x64 adds r4, r5, 0 @@ -1987,7 +1987,7 @@ _08185F02: adds r1, r4, r1 movs r2, 0x64 bl memcpy - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r0, r4, r0 ldr r1, =gUnknown_0203CA18 adds r4, r1 @@ -2476,11 +2476,11 @@ _081862CA: ldrh r1, [r6] movs r0, 0x64 muls r0, r1 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x15 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, sp adds r3, r1, r5 lsls r2, r5, 1 @@ -2510,7 +2510,7 @@ _08186304: ldrb r1, [r4] adds r1, 0xD movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r6] ldrh r0, [r7] mov r2, r9 @@ -2520,7 +2520,7 @@ _08186304: ldrb r1, [r4] adds r1, 0x11 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r3, [sp, 0x34] adds r1, r3, r5 strb r0, [r1] @@ -2541,7 +2541,7 @@ _08186304: adds r7, r1, r0 movs r2, 0x64 mov r9, r2 - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty mov r8, r3 ldr r6, [sp, 0x30] adds r6, 0x8 @@ -2575,7 +2575,7 @@ _08186360: strb r0, [r3] movs r5, 0 ldr r4, =gUnknown_0202406E - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty ldr r3, [sp, 0x3C] ldr r2, [sp, 0x40] _081863A2: @@ -3186,7 +3186,7 @@ sub_818686C: @ 818686C ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -3211,7 +3211,7 @@ _081868AC: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -3267,7 +3267,7 @@ _081868DE: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -3291,7 +3291,7 @@ _08186964: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -3514,10 +3514,10 @@ _08186B26: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -3542,10 +3542,10 @@ _08186B8A: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -3639,7 +3639,7 @@ sub_8186C48: @ 8186C48 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r3, 0 bl sub_8172EF0 @@ -4040,7 +4040,7 @@ sub_8186F94: @ 8186F94 ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -4087,7 +4087,7 @@ sub_8187084: @ 8187084 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -4127,10 +4127,10 @@ _081870B6: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -4397,16 +4397,16 @@ _081873C8: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2E] movs r6, 0 @@ -4434,12 +4434,12 @@ _08187414: adds r1, r6, 0 adds r1, 0xD mov r0, r8 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r1, r6, 0 adds r1, 0x11 mov r0, r8 - bl pokemon_getattr + bl GetMonData mov r2, r9 adds r1, r2, r6 strb r0, [r1] @@ -4450,25 +4450,25 @@ _08187414: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r10 strb r0, [r1] adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x80] strb r0, [r2] adds r0, r4, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x44] adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r5, 0x1F ands r0, r5 @@ -4480,7 +4480,7 @@ _08187414: strb r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r6, 0x1F ands r0, r6 @@ -4492,7 +4492,7 @@ _08187414: strh r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 2 @@ -4504,7 +4504,7 @@ _08187414: strb r1, [r3, 0x15] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData movs r1, 0x1F ands r1, r0 lsls r1, 15 @@ -4515,7 +4515,7 @@ _08187414: str r0, [sp, 0x14] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r6 lsls r0, 4 @@ -4526,7 +4526,7 @@ _08187414: strh r1, [r3, 0x16] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 1 @@ -4538,55 +4538,55 @@ _08187414: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x48] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4C] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x7C] strb r0, [r1] adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x28] adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2C] adds r0, r4, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2] adds r0, r4, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x4] adds r0, r4, 0 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x6] adds r0, r4, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x8] adds r0, r4, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0xA] adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData mov r3, sp movs r1, 0x1 ands r0, r1 @@ -4599,7 +4599,7 @@ _08187414: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData mov r3, sp lsls r0, 7 ldrb r2, [r3, 0x17] @@ -4609,19 +4609,19 @@ _08187414: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x54] adds r0, r4, 0 movs r1, 0x2 ldr r2, [sp, 0x8C] - bl pokemon_getattr + bl GetMonData ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] - bl pokemon_getattr + bl GetMonData mov r2, sp movs r6, 0 _081875CC: @@ -4637,7 +4637,7 @@ _081875CC: _081875EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB b _08187966 @@ -4645,7 +4645,7 @@ _081875EC: _081875FC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xC b _08187966 @@ -4659,20 +4659,20 @@ _0818760C: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r1, r0 mov r8, r9 _08187622: adds r1, r6, 0 adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r1, r8 strh r0, [r1] adds r1, r6, 0 adds r1, 0x11 adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r2, r10 adds r1, r2, r6 strb r0, [r1] @@ -4683,10 +4683,10 @@ _08187622: ble _08187622 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r9 strb r0, [r1, 0xC] mov r2, r9 @@ -4704,7 +4704,7 @@ _08187660: _08187674: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -4719,14 +4719,14 @@ _08187690: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r8, r2 _0818769C: adds r1, r6, 0 adds r1, 0x11 mov r2, r8 adds r0, r4, r2 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -4734,10 +4734,10 @@ _0818769C: ble _0818769C movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -4746,7 +4746,7 @@ _0818769C: _081876CC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -4759,7 +4759,7 @@ _081876CC: _081876E8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1 b _08187702 @@ -4767,11 +4767,11 @@ _081876E8: _081876F8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x19 _08187702: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -4790,7 +4790,7 @@ _08187702: _08187728: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1A b _08187A26 @@ -4798,7 +4798,7 @@ _08187728: _08187738: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1B b _08187A26 @@ -4806,7 +4806,7 @@ _08187738: _08187748: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1C b _08187A26 @@ -4814,7 +4814,7 @@ _08187748: _08187758: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1D b _08187A26 @@ -4822,7 +4822,7 @@ _08187758: _08187768: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1E b _08187A26 @@ -4830,7 +4830,7 @@ _08187768: _08187778: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x1F b _08187A26 @@ -4838,7 +4838,7 @@ _08187778: _08187788: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x20 b _08187A26 @@ -4846,7 +4846,7 @@ _08187788: _08187798: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x22 b _08187A26 @@ -4854,7 +4854,7 @@ _08187798: _081877A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x23 b _08187A26 @@ -4862,7 +4862,7 @@ _081877A8: _081877B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x24 b _08187A26 @@ -4870,7 +4870,7 @@ _081877B8: _081877C8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x25 b _08187A26 @@ -4878,7 +4878,7 @@ _081877C8: _081877D8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x26 b _08187A26 @@ -4887,31 +4887,31 @@ _081877E8: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData strb r0, [r7] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x1] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x2] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x3] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x4] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x5] movs r6, 0x6 b _08187A2E @@ -4919,7 +4919,7 @@ _081877E8: _08187838: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x27 b _08187A26 @@ -4927,7 +4927,7 @@ _08187838: _08187848: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x28 b _08187A26 @@ -4935,7 +4935,7 @@ _08187848: _08187858: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x29 b _08187A26 @@ -4943,7 +4943,7 @@ _08187858: _08187868: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2A b _08187A26 @@ -4951,7 +4951,7 @@ _08187868: _08187878: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2B b _08187A26 @@ -4959,7 +4959,7 @@ _08187878: _08187888: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2C b _08187A26 @@ -4967,7 +4967,7 @@ _08187888: _08187898: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0 b _081878C2 @@ -4975,7 +4975,7 @@ _08187898: _081878A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x9 b _08187966 @@ -4983,11 +4983,11 @@ _081878A8: _081878B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x37 _081878C2: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -5008,7 +5008,7 @@ _081878C2: _081878EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x38 b _08187A26 @@ -5016,7 +5016,7 @@ _081878EC: _081878FC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x39 b _08187966 @@ -5024,7 +5024,7 @@ _081878FC: _0818790C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3A b _08187966 @@ -5032,7 +5032,7 @@ _0818790C: _0818791C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3B b _08187966 @@ -5040,7 +5040,7 @@ _0818791C: _0818792C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3C b _08187966 @@ -5048,7 +5048,7 @@ _0818792C: _0818793C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3D b _08187966 @@ -5056,7 +5056,7 @@ _0818793C: _0818794C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3E b _08187966 @@ -5064,11 +5064,11 @@ _0818794C: _0818795C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3F _08187966: - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 strb r0, [r7] @@ -5080,7 +5080,7 @@ _08187966: _0818797C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x16 b _08187A26 @@ -5088,7 +5088,7 @@ _0818797C: _0818798C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x17 b _08187A26 @@ -5096,7 +5096,7 @@ _0818798C: _0818799C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x18 b _08187A26 @@ -5104,7 +5104,7 @@ _0818799C: _081879AC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x21 b _08187A26 @@ -5112,7 +5112,7 @@ _081879AC: _081879BC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2F b _08187A26 @@ -5120,7 +5120,7 @@ _081879BC: _081879CC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x30 b _08187A26 @@ -5128,7 +5128,7 @@ _081879CC: _081879DC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x32 b _08187A26 @@ -5136,7 +5136,7 @@ _081879DC: _081879EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x33 b _08187A26 @@ -5144,7 +5144,7 @@ _081879EC: _081879FC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x34 b _08187A26 @@ -5152,7 +5152,7 @@ _081879FC: _08187A0C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x35 b _08187A26 @@ -5160,11 +5160,11 @@ _08187A0C: _08187A1C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x36 _08187A26: - bl pokemon_getattr + bl GetMonData strb r0, [r7] movs r6, 0x1 _08187A2E: @@ -5328,7 +5328,7 @@ _08187BDC: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB @@ -5395,7 +5395,7 @@ _08187C42: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 @@ -5508,7 +5508,7 @@ _08187C42: _08187D74: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5520,7 +5520,7 @@ _08187D74: _08187D90: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5538,7 +5538,7 @@ _08187DAC: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r7, r1, r0 adds r6, r4, 0 adds r6, 0x8 @@ -5562,7 +5562,7 @@ _08187DC4: ble _08187DC4 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x15 mov r2, r9 @@ -5572,7 +5572,7 @@ _08187DC4: _08187E00: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r3, =gUnknown_02023064 ldrb r2, [r6] @@ -5587,7 +5587,7 @@ _08187E20: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 ldrb r2, [r6] lsls r2, 9 @@ -5633,7 +5633,7 @@ _08187E20: _08187E88: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldr r3, =gUnknown_02023064 ldrb r2, [r6] @@ -5651,7 +5651,7 @@ _08187E9E: _08187EB0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5663,7 +5663,7 @@ _08187EB0: _08187ECC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5675,7 +5675,7 @@ _08187ECC: _08187EE8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5687,7 +5687,7 @@ _08187EE8: _08187F04: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5699,7 +5699,7 @@ _08187F04: _08187F20: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5711,7 +5711,7 @@ _08187F20: _08187F3C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5723,7 +5723,7 @@ _08187F3C: _08187F58: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5735,7 +5735,7 @@ _08187F58: _08187F74: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5747,7 +5747,7 @@ _08187F74: _08187F90: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5759,7 +5759,7 @@ _08187F90: _08187FAC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5771,7 +5771,7 @@ _08187FAC: _08187FC8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5783,7 +5783,7 @@ _08187FC8: _08187FE4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5795,7 +5795,7 @@ _08187FE4: _08188000: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5807,7 +5807,7 @@ _08188000: _0818801C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5820,7 +5820,7 @@ _08188038: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 ldrb r2, [r6] lsls r2, 9 @@ -5872,7 +5872,7 @@ _08188038: _081880AC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5884,7 +5884,7 @@ _081880AC: _081880C8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5896,7 +5896,7 @@ _081880C8: _081880E4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5908,7 +5908,7 @@ _081880E4: _08188100: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5920,7 +5920,7 @@ _08188100: _0818811C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5932,7 +5932,7 @@ _0818811C: _08188138: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5945,7 +5945,7 @@ _08188146: _08188154: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5957,7 +5957,7 @@ _08188154: _08188170: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5969,7 +5969,7 @@ _08188170: _0818818C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5981,7 +5981,7 @@ _0818818C: _081881A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -5993,7 +5993,7 @@ _081881A8: _081881C4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6005,7 +6005,7 @@ _081881C4: _081881E0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6017,7 +6017,7 @@ _081881E0: _081881FC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6029,7 +6029,7 @@ _081881FC: _08188218: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6041,7 +6041,7 @@ _08188218: _08188234: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6053,7 +6053,7 @@ _08188234: _08188250: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6065,7 +6065,7 @@ _08188250: _0818826C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6077,7 +6077,7 @@ _0818826C: _08188288: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6089,7 +6089,7 @@ _08188288: _081882A4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6101,7 +6101,7 @@ _081882A4: _081882C0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6113,7 +6113,7 @@ _081882C0: _081882DC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6125,7 +6125,7 @@ _081882DC: _081882F8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6137,7 +6137,7 @@ _081882F8: _08188314: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6149,7 +6149,7 @@ _08188314: _08188330: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6161,7 +6161,7 @@ _08188330: _0818834C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6173,7 +6173,7 @@ _0818834C: _08188368: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6185,7 +6185,7 @@ _08188368: _08188384: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6197,7 +6197,7 @@ _08188384: _081883A0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 ldrb r2, [r6] lsls r2, 9 @@ -6233,7 +6233,7 @@ sub_81883C8: @ 81883C8 adds r0, r4, 0x1 adds r0, r2, r0 ldrb r0, [r0] - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 adds r5, r3, r0 movs r3, 0 @@ -6289,11 +6289,11 @@ sub_818843C: @ 818843C mov r2, r10 muls r2, r0 adds r0, r2, 0 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty mov r9, r1 add r0, r9 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -6390,7 +6390,7 @@ sub_818843C: @ 818843C adds r0, r1, 0 add r0, r9 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -6473,10 +6473,10 @@ sub_81885D8: @ 81885D8 mov r1, r9 muls r1, r0 adds r0, r1, 0 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty adds r0, r5 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 @@ -7629,10 +7629,10 @@ sub_8188FD0: @ 8188FD0 ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty adds r0, r4 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r8, r0 mov r1, r9 ldrb r0, [r1] @@ -7642,7 +7642,7 @@ sub_8188FD0: @ 8188FD0 muls r0, r5 adds r0, r4 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -7661,10 +7661,10 @@ _08189060: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -7719,7 +7719,7 @@ sub_81890CC: @ 81890CC ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r1, r2 movs r2, 0x9 bl healthbar_draw_field_maybe @@ -8087,10 +8087,10 @@ sub_81893C8: @ 81893C8 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 movs r1, 0x19 @@ -9035,7 +9035,7 @@ _08189B86: ldrh r0, [r0] movs r6, 0x64 muls r0, r6 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 bl sub_805E990 bl battle_type_is_double @@ -9198,7 +9198,7 @@ sub_8189D40: @ 8189D40 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -9223,7 +9223,7 @@ _08189D8C: ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 adds r0, r3, 0 bl sub_8172EF0 @@ -9285,7 +9285,7 @@ _08189DBE: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -9311,7 +9311,7 @@ _08189E54: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -9597,7 +9597,7 @@ _0818A0EC: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 bl sub_818A514 @@ -9634,10 +9634,10 @@ sub_818A114: @ 818A114 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl nullsub_24 @@ -9931,7 +9931,7 @@ sub_818A37C: @ 818A37C ldrh r0, [r0] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 bl sub_805E990 ldr r1, =gUnknown_020241E4 @@ -9999,7 +9999,7 @@ sub_818A470: @ 818A470 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -10293,16 +10293,16 @@ _0818A790: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2E] movs r6, 0 @@ -10330,12 +10330,12 @@ _0818A7DC: adds r1, r6, 0 adds r1, 0xD mov r0, r8 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r1, r6, 0 adds r1, 0x11 mov r0, r8 - bl pokemon_getattr + bl GetMonData mov r2, r9 adds r1, r2, r6 strb r0, [r1] @@ -10346,25 +10346,25 @@ _0818A7DC: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r10 strb r0, [r1] adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x80] strb r0, [r2] adds r0, r4, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x44] adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r5, 0x1F ands r0, r5 @@ -10376,7 +10376,7 @@ _0818A7DC: strb r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r6, 0x1F ands r0, r6 @@ -10388,7 +10388,7 @@ _0818A7DC: strh r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 2 @@ -10400,7 +10400,7 @@ _0818A7DC: strb r1, [r3, 0x15] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData movs r1, 0x1F ands r1, r0 lsls r1, 15 @@ -10411,7 +10411,7 @@ _0818A7DC: str r0, [sp, 0x14] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r6 lsls r0, 4 @@ -10422,7 +10422,7 @@ _0818A7DC: strh r1, [r3, 0x16] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 1 @@ -10434,55 +10434,55 @@ _0818A7DC: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x48] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4C] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x7C] strb r0, [r1] adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x28] adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2C] adds r0, r4, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2] adds r0, r4, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x4] adds r0, r4, 0 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x6] adds r0, r4, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x8] adds r0, r4, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0xA] adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData mov r3, sp movs r1, 0x1 ands r0, r1 @@ -10495,7 +10495,7 @@ _0818A7DC: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData mov r3, sp lsls r0, 7 ldrb r2, [r3, 0x17] @@ -10505,19 +10505,19 @@ _0818A7DC: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x54] adds r0, r4, 0 movs r1, 0x2 ldr r2, [sp, 0x8C] - bl pokemon_getattr + bl GetMonData ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] - bl pokemon_getattr + bl GetMonData mov r2, sp movs r6, 0 _0818A994: @@ -10533,7 +10533,7 @@ _0818A994: _0818A9B4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB b _0818AD2E @@ -10541,7 +10541,7 @@ _0818A9B4: _0818A9C4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC b _0818AD2E @@ -10555,20 +10555,20 @@ _0818A9D4: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 mov r8, r9 _0818A9EA: adds r1, r6, 0 adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r1, r8 strh r0, [r1] adds r1, r6, 0 adds r1, 0x11 adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r2, r10 adds r1, r2, r6 strb r0, [r1] @@ -10579,10 +10579,10 @@ _0818A9EA: ble _0818A9EA movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r9 strb r0, [r1, 0xC] mov r2, r9 @@ -10600,7 +10600,7 @@ _0818AA28: _0818AA3C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -10615,14 +10615,14 @@ _0818AA58: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r8, r2 _0818AA64: adds r1, r6, 0 adds r1, 0x11 mov r2, r8 adds r0, r4, r2 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -10630,10 +10630,10 @@ _0818AA64: ble _0818AA64 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -10642,7 +10642,7 @@ _0818AA64: _0818AA94: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -10655,7 +10655,7 @@ _0818AA94: _0818AAB0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1 b _0818AACA @@ -10663,11 +10663,11 @@ _0818AAB0: _0818AAC0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x19 _0818AACA: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -10686,7 +10686,7 @@ _0818AACA: _0818AAF0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1A b _0818ADEE @@ -10694,7 +10694,7 @@ _0818AAF0: _0818AB00: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1B b _0818ADEE @@ -10702,7 +10702,7 @@ _0818AB00: _0818AB10: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1C b _0818ADEE @@ -10710,7 +10710,7 @@ _0818AB10: _0818AB20: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1D b _0818ADEE @@ -10718,7 +10718,7 @@ _0818AB20: _0818AB30: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1E b _0818ADEE @@ -10726,7 +10726,7 @@ _0818AB30: _0818AB40: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1F b _0818ADEE @@ -10734,7 +10734,7 @@ _0818AB40: _0818AB50: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x20 b _0818ADEE @@ -10742,7 +10742,7 @@ _0818AB50: _0818AB60: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x22 b _0818ADEE @@ -10750,7 +10750,7 @@ _0818AB60: _0818AB70: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x23 b _0818ADEE @@ -10758,7 +10758,7 @@ _0818AB70: _0818AB80: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x24 b _0818ADEE @@ -10766,7 +10766,7 @@ _0818AB80: _0818AB90: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x25 b _0818ADEE @@ -10774,7 +10774,7 @@ _0818AB90: _0818ABA0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x26 b _0818ADEE @@ -10783,31 +10783,31 @@ _0818ABB0: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData strb r0, [r7] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x1] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x2] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x3] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x4] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x5] movs r6, 0x6 b _0818ADF6 @@ -10815,7 +10815,7 @@ _0818ABB0: _0818AC00: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x27 b _0818ADEE @@ -10823,7 +10823,7 @@ _0818AC00: _0818AC10: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x28 b _0818ADEE @@ -10831,7 +10831,7 @@ _0818AC10: _0818AC20: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x29 b _0818ADEE @@ -10839,7 +10839,7 @@ _0818AC20: _0818AC30: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2A b _0818ADEE @@ -10847,7 +10847,7 @@ _0818AC30: _0818AC40: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2B b _0818ADEE @@ -10855,7 +10855,7 @@ _0818AC40: _0818AC50: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2C b _0818ADEE @@ -10863,7 +10863,7 @@ _0818AC50: _0818AC60: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0 b _0818AC8A @@ -10871,7 +10871,7 @@ _0818AC60: _0818AC70: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x9 b _0818AD2E @@ -10879,11 +10879,11 @@ _0818AC70: _0818AC80: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x37 _0818AC8A: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -10904,7 +10904,7 @@ _0818AC8A: _0818ACB4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x38 b _0818ADEE @@ -10912,7 +10912,7 @@ _0818ACB4: _0818ACC4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x39 b _0818AD2E @@ -10920,7 +10920,7 @@ _0818ACC4: _0818ACD4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A b _0818AD2E @@ -10928,7 +10928,7 @@ _0818ACD4: _0818ACE4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3B b _0818AD2E @@ -10936,7 +10936,7 @@ _0818ACE4: _0818ACF4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3C b _0818AD2E @@ -10944,7 +10944,7 @@ _0818ACF4: _0818AD04: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3D b _0818AD2E @@ -10952,7 +10952,7 @@ _0818AD04: _0818AD14: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3E b _0818AD2E @@ -10960,11 +10960,11 @@ _0818AD14: _0818AD24: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3F _0818AD2E: - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 strb r0, [r7] @@ -10976,7 +10976,7 @@ _0818AD2E: _0818AD44: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x16 b _0818ADEE @@ -10984,7 +10984,7 @@ _0818AD44: _0818AD54: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x17 b _0818ADEE @@ -10992,7 +10992,7 @@ _0818AD54: _0818AD64: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x18 b _0818ADEE @@ -11000,7 +11000,7 @@ _0818AD64: _0818AD74: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x21 b _0818ADEE @@ -11008,7 +11008,7 @@ _0818AD74: _0818AD84: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2F b _0818ADEE @@ -11016,7 +11016,7 @@ _0818AD84: _0818AD94: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x30 b _0818ADEE @@ -11024,7 +11024,7 @@ _0818AD94: _0818ADA4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x32 b _0818ADEE @@ -11032,7 +11032,7 @@ _0818ADA4: _0818ADB4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x33 b _0818ADEE @@ -11040,7 +11040,7 @@ _0818ADB4: _0818ADC4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x34 b _0818ADEE @@ -11048,7 +11048,7 @@ _0818ADC4: _0818ADD4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x35 b _0818ADEE @@ -11056,11 +11056,11 @@ _0818ADD4: _0818ADE4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x36 _0818ADEE: - bl pokemon_getattr + bl GetMonData strb r0, [r7] movs r6, 0x1 _0818ADF6: @@ -11223,7 +11223,7 @@ _0818AFA4: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB @@ -11290,7 +11290,7 @@ _0818B00A: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 @@ -11403,7 +11403,7 @@ _0818B00A: _0818B13C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11416,7 +11416,7 @@ _0818B13C: _0818B15C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11435,7 +11435,7 @@ _0818B17C: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r6, r3, 0 adds r6, 0x8 @@ -11460,7 +11460,7 @@ _0818B196: ble _0818B196 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 mov r2, r9 @@ -11470,7 +11470,7 @@ _0818B196: _0818B1D4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gUnknown_02023064 ldr r1, =gUnknown_02024064 @@ -11486,7 +11486,7 @@ _0818B1FC: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 ldr r5, =gUnknown_02024064 ldrb r2, [r5] @@ -11528,7 +11528,7 @@ _0818B1FC: _0818B260: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gUnknown_02023064 ldr r1, =gUnknown_02024064 @@ -11547,7 +11547,7 @@ _0818B278: _0818B290: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11560,7 +11560,7 @@ _0818B290: _0818B2B0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11573,7 +11573,7 @@ _0818B2B0: _0818B2D0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11586,7 +11586,7 @@ _0818B2D0: _0818B2F0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11599,7 +11599,7 @@ _0818B2F0: _0818B310: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11612,7 +11612,7 @@ _0818B310: _0818B330: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11625,7 +11625,7 @@ _0818B330: _0818B350: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11638,7 +11638,7 @@ _0818B350: _0818B370: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11651,7 +11651,7 @@ _0818B370: _0818B390: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11664,7 +11664,7 @@ _0818B390: _0818B3B0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11677,7 +11677,7 @@ _0818B3B0: _0818B3D0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11690,7 +11690,7 @@ _0818B3D0: _0818B3F0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11703,7 +11703,7 @@ _0818B3F0: _0818B410: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11716,7 +11716,7 @@ _0818B410: _0818B430: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11730,7 +11730,7 @@ _0818B450: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 ldr r5, =gUnknown_02024064 ldrb r2, [r5] @@ -11777,7 +11777,7 @@ _0818B450: _0818B4C0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11790,7 +11790,7 @@ _0818B4C0: _0818B4E0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11803,7 +11803,7 @@ _0818B4E0: _0818B500: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11816,7 +11816,7 @@ _0818B500: _0818B520: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11829,7 +11829,7 @@ _0818B520: _0818B540: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11842,7 +11842,7 @@ _0818B540: _0818B560: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11856,7 +11856,7 @@ _0818B570: _0818B580: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11869,7 +11869,7 @@ _0818B580: _0818B5A0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11882,7 +11882,7 @@ _0818B5A0: _0818B5C0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11895,7 +11895,7 @@ _0818B5C0: _0818B5E0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11908,7 +11908,7 @@ _0818B5E0: _0818B600: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11921,7 +11921,7 @@ _0818B600: _0818B620: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11934,7 +11934,7 @@ _0818B620: _0818B640: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11947,7 +11947,7 @@ _0818B640: _0818B660: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11960,7 +11960,7 @@ _0818B660: _0818B680: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11973,7 +11973,7 @@ _0818B680: _0818B6A0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11986,7 +11986,7 @@ _0818B6A0: _0818B6C0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -11999,7 +11999,7 @@ _0818B6C0: _0818B6E0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12012,7 +12012,7 @@ _0818B6E0: _0818B700: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12025,7 +12025,7 @@ _0818B700: _0818B720: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12038,7 +12038,7 @@ _0818B720: _0818B740: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12051,7 +12051,7 @@ _0818B740: _0818B760: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12064,7 +12064,7 @@ _0818B760: _0818B780: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12077,7 +12077,7 @@ _0818B780: _0818B7A0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12090,7 +12090,7 @@ _0818B7A0: _0818B7C0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12103,7 +12103,7 @@ _0818B7C0: _0818B7E0: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12116,7 +12116,7 @@ _0818B7E0: _0818B800: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12129,7 +12129,7 @@ _0818B800: _0818B820: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -12146,7 +12146,7 @@ _0818B836: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 add sp, 0x34 @@ -12177,7 +12177,7 @@ sub_818B86C: @ 818B86C adds r0, r4, 0x1 adds r0, r2, r0 ldrb r0, [r0] - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r5, r3, r0 movs r3, 0 @@ -12229,7 +12229,7 @@ sub_818B8E0: @ 818B8E0 ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 bl sub_805DD7C ldrb r0, [r6] @@ -12239,7 +12239,7 @@ sub_818B8E0: @ 818B8E0 muls r0, r5 adds r0, r4 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -12358,7 +12358,7 @@ sub_818B9FC: @ 818B9FC ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805DD7C ldrb r0, [r5] @@ -12404,10 +12404,10 @@ sub_818BA6C: @ 818BA6C ldrh r1, [r2] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 @@ -13104,7 +13104,7 @@ _0818C0B8: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 movs r1, 0x40 @@ -13733,10 +13733,10 @@ sub_818C5E8: @ 818C5E8 ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r8, r0 mov r1, r9 ldrb r0, [r1] @@ -13746,7 +13746,7 @@ sub_818C5E8: @ 818C5E8 muls r0, r5 adds r0, r4 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -13765,10 +13765,10 @@ _0818C678: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -13830,7 +13830,7 @@ sub_818C6F4: @ 818C6F4 ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0x9 bl healthbar_draw_field_maybe @@ -14198,10 +14198,10 @@ sub_818C9F0: @ 818C9F0 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 movs r1, 0x19 @@ -14504,7 +14504,7 @@ _0818CCA0: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805DD7C ldrb r0, [r7] @@ -18761,7 +18761,7 @@ _0818F0BA: add r0, r9 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r5, r8 ldr r1, [r5] ldr r7, =0x00000d64 @@ -18785,7 +18785,7 @@ _0818F0E8: adds r1, r5, 0 adds r1, 0xD movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r2, r8 ldr r1, [r2] ldr r3, =0x00000efc @@ -18810,7 +18810,7 @@ _0818F11C: adds r1, r5, 0 adds r1, 0x1A movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [r6] adds r2, r5, r7 ldr r3, =0x00000f04 @@ -19096,12 +19096,12 @@ _0818F38A: subs r4, r0, 0x1 movs r0, 0x64 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x3B movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x18] ldrh r1, [r2] adds r1, r0 @@ -19109,7 +19109,7 @@ _0818F38A: adds r0, r4, 0 movs r1, 0x3C movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r3, [sp, 0x18] ldrh r1, [r3] adds r1, r0 @@ -19117,7 +19117,7 @@ _0818F38A: adds r0, r4, 0 movs r1, 0x3E movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x18] ldrh r1, [r2] adds r1, r0 @@ -19125,7 +19125,7 @@ _0818F38A: adds r0, r4, 0 movs r1, 0x3F movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r3, [sp, 0x18] ldrh r1, [r3] adds r1, r0 @@ -19133,7 +19133,7 @@ _0818F38A: adds r0, r4, 0 movs r1, 0x3D movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x18] ldrh r1, [r2] adds r1, r0 @@ -19141,7 +19141,7 @@ _0818F38A: adds r0, r4, 0 movs r1, 0x3A movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r3, [sp, 0x18] ldrh r1, [r3] adds r1, r0 @@ -19149,7 +19149,7 @@ _0818F38A: adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r1, r0, 3 subs r1, r0 lsls r1, 2 @@ -19162,7 +19162,7 @@ _0818F38A: adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r1, r0, 3 subs r1, r0 lsls r1, 2 @@ -19875,18 +19875,18 @@ sub_818FA20: @ 818FA20 ldr r1, =gUnknown_0203CD70 movs r0, 0 str r0, [r1] - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0x3A movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r5, =gUnknown_0203CD74 str r0, [r5] adds r4, 0x64 adds r0, r4, 0 movs r1, 0x3A movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [r5] adds r1, r0 str r1, [r5] @@ -19940,7 +19940,7 @@ sub_818FA74: @ 818FA74 adds r3, r4, 0 muls r3, r0 str r3, [sp, 0x18] - ldr r6, =gUnknown_02024744 + ldr r6, =gEnemyParty adds r0, r3, r6 ldr r7, =gSaveBlock2Ptr ldr r4, [r7] @@ -20008,7 +20008,7 @@ _0818FB18: lsrs r2, 24 mov r12, r2 ldr r7, [sp, 0x1C] - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty adds r0, r7, r2 mov r2, r12 str r3, [sp, 0x24] @@ -20038,7 +20038,7 @@ _0818FB74: ldr r1, [sp, 0x10] adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x20 @@ -20272,11 +20272,11 @@ _0818FD3C: _0818FD60: movs r0, 0x64 muls r0, r6 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 @@ -20392,11 +20392,11 @@ _0818FE38: _0818FE5C: movs r0, 0x64 muls r0, r6 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 adds r0, r4, 0 movs r2, 0x1 @@ -29613,14 +29613,14 @@ _08194DBE: adds r1, 0xD movs r2, 0 str r3, [sp, 0x4] - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 adds r1, r6, 0 adds r1, 0xD - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r7, r2 movs r2, 0 - bl pokemon_getattr + bl GetMonData ldr r3, [sp, 0x4] cmp r4, r0 bne _08194DBC @@ -29629,7 +29629,7 @@ _08194DEA: bne _08194E00 lsls r2, r6, 24 lsrs r2, 24 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r7, r1 movs r1, 0xA6 str r3, [sp, 0x4] @@ -29650,7 +29650,7 @@ _08194E00: adds r0, r1 adds r1, r3, 0 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0x64 bl memcpy @@ -29698,10 +29698,10 @@ _08194E50: adds r0, r1 movs r1, 0xC movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r0, r5, r0 movs r1, 0xC mov r2, sp @@ -31629,10 +31629,10 @@ _08195E86: sub_8195E8C: @ 8195E8C push {r4,r5,lr} movs r5, 0x1 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _08195EAE adds r0, r4, 0 @@ -42838,7 +42838,7 @@ _0819B77E: movs r0, 0x64 adds r5, r7, 0 muls r5, r0 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r5, r2 adds r1, 0x14 adds r0, r5, 0 @@ -42861,7 +42861,7 @@ _0819B77E: adds r0, r5, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r2, r8 ldr r1, [r2] ldr r2, =0x00000e74 @@ -43135,7 +43135,7 @@ sub_819B9E8: @ 819B9E8 adds r0, 0x14 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 ldr r4, =gStringVar4 @@ -43496,7 +43496,7 @@ sub_819BCF8: @ 819BCF8 adds r0, 0x14 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl SpeciesToNationalPokedexNum @@ -43548,19 +43548,19 @@ sub_819BD70: @ 819BD70 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r4, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r8, r0 adds r0, r4, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 movs r0, 0x58 str r0, [sp] @@ -43666,19 +43666,19 @@ sub_819BE34: @ 819BE34 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r4, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r9, r0 adds r0, r4, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 movs r0, 0x58 str r0, [sp] @@ -43770,19 +43770,19 @@ _0819BF48: adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r4, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r6, r0, 0 adds r0, r4, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r0, r7, 3 adds r0, r7 @@ -44809,14 +44809,14 @@ sub_819C810: @ 819C810 mov r5, r8 push {r5,r6} sub sp, 0x4 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty ldr r5, =gUnknown_03001284 ldr r1, [r5] ldrb r0, [r1, 0x12] movs r6, 0x64 muls r0, r6 adds r0, r4 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r9, r2 ldrb r1, [r1, 0x13] muls r1, r6 @@ -44876,7 +44876,7 @@ sub_819C810: @ 819C810 add r0, r9 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, r8 ldr r2, [r1] ldr r4, [r5] @@ -45005,7 +45005,7 @@ _0819C9C4: adds r0, r1 ldrh r0, [r0] strh r0, [r2, 0x24] - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty ldrb r2, [r2, 0x3] ldr r0, =sub_819DC1C str r0, [sp] @@ -49016,18 +49016,18 @@ _0819EB70: bne _0819EB84 movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty b _0819EB8A .pool _0819EB84: movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty _0819EB8A: adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 ldr r4, =gStringVar4 @@ -49363,18 +49363,18 @@ _0819EE74: bne _0819EE88 movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty b _0819EE8E .pool _0819EE88: movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty _0819EE8E: adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 ldr r4, =gStringVar4 @@ -49440,18 +49440,18 @@ _0819EF2C: bne _0819EF40 movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty b _0819EF46 .pool _0819EF40: movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty _0819EF46: adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 ldr r4, =gStringVar4 @@ -49515,18 +49515,18 @@ _0819EFD0: bne _0819EFEC movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty b _0819EFF2 .pool _0819EFEC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty _0819EFF2: adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl SpeciesToNationalPokedexNum @@ -49923,24 +49923,24 @@ sub_819F304: @ 819F304 movs r0, 0x64 adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r4, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r9, r0 adds r0, r4, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 movs r0, 0x58 str r0, [sp] @@ -50190,11 +50190,11 @@ sub_819F59C: @ 819F59C lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 movs r4, 0 @@ -50206,11 +50206,11 @@ _0819F5B8: beq _0819F5EC movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, r5 @@ -50596,32 +50596,32 @@ sub_819F8E0: @ 819F8E0 ldrb r1, [r1, 0x3] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty b _0819F908 .pool _0819F900: ldrb r1, [r1, 0x3] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty _0819F908: adds r6, r1, r0 adds r0, r6, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r6, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 adds r0, r6, 0 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 movs r0, 0x58 str r0, [sp] @@ -54867,7 +54867,7 @@ _081A1B3E: movs r1, 0x8E lsls r1, 2 adds r0, r1 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r4, 0 muls r1, r5 adds r1, r2 @@ -59061,27 +59061,27 @@ _081A404E: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r8, r0 adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r6, r0, 24 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 ldr r0, =0x000040cf @@ -59443,12 +59443,12 @@ _081A43B2: adds r0, r1 movs r1, 0xC movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] adds r0, r4, 0 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC mov r2, sp @@ -59547,7 +59547,7 @@ _081A448C: movs r2, 0x64 adds r1, r0, 0 muls r1, r2 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 _081A44BA: movs r5, 0 @@ -59575,12 +59575,12 @@ _081A44C6: adds r1, r5, 0 adds r1, 0xD movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 adds r0, r7, 0 mov r1, r8 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r4, r0 beq _081A4508 adds r0, r5, 0x1 @@ -59616,7 +59616,7 @@ _081A4516: movs r1, 0x8E lsls r1, 2 adds r0, r1 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty ldr r4, [sp] adds r1, r4, 0 muls r1, r3 @@ -60465,7 +60465,7 @@ sub_81A4C30: @ 81A4C30 movs r0, 0xFA lsls r0, 1 adds r6, r7, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty mov r8, r0 _081A4C4E: mov r0, r8 @@ -60486,7 +60486,7 @@ _081A4C4E: bl sav2_gender2_inplace_and_xFE strb r5, [r4] adds r4, r7, 0 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty movs r0, 0xFA lsls r0, 1 adds r6, r7, r0 @@ -60773,7 +60773,7 @@ _081A4E96: adds r3, r4, 0 muls r3, r0 mov r8, r3 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty add r1, r8 mov r10, r1 ldr r4, [sp, 0x14] @@ -60806,7 +60806,7 @@ _081A4E96: bl pokemon_setattr movs r7, 0 mov r6, r8 - ldr r3, =gUnknown_02024744 + ldr r3, =gEnemyParty _081A4F32: adds r1, r7, 0 adds r1, 0x1A @@ -60833,7 +60833,7 @@ _081A4F32: muls r6, r2 ldr r3, =gUnknown_08611578 mov r8, r3 - ldr r3, =gUnknown_02024744 + ldr r3, =gEnemyParty adds r5, r4, 0 _081A4F6A: ldr r4, [sp, 0x38] @@ -60869,7 +60869,7 @@ _081A4F9C: movs r1, 0x64 adds r4, r0, 0 muls r4, r1 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x20 @@ -61736,7 +61736,7 @@ sub_81A5718: @ 81A5718 b _081A57D8 .pool _081A576C: - ldr r0, =gUnknown_0202427C + ldr r0, =gBattleMoveFlags ldrb r1, [r0] movs r0, 0x29 ands r0, r1 @@ -63242,7 +63242,7 @@ _081A6408: movs r0, 0x64 adds r5, r7, 0 muls r5, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r5, r0 adds r0, r5, 0 movs r1, 0x28 @@ -63257,7 +63257,7 @@ _081A6408: adds r0, r5, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData mov r2, r8 ldr r1, [r2] ldr r2, =0x00000e74 @@ -63372,7 +63372,7 @@ _081A6534: movs r1, 0x64 mov r0, r8 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 mov r4, r9 ldr r1, [r4] @@ -63424,7 +63424,7 @@ _081A65A2: movs r0, 0x64 mov r6, r8 muls r6, r0 - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty _081A65C4: mov r1, r9 ldr r0, [r1] @@ -63449,7 +63449,7 @@ _081A65E2: movs r2, 0x64 mov r4, r8 muls r4, r2 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r4, r5 bl pokemon_calc_effective_stats movs r0, 0 @@ -63474,7 +63474,7 @@ _081A6602: movs r5, 0x64 mov r4, r8 muls r4, r5 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x20 @@ -63538,7 +63538,7 @@ _081A6682: movs r1, 0x64 mov r0, r8 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 mov r4, r9 ldr r1, [r4] @@ -63593,7 +63593,7 @@ _081A66F4: movs r0, 0x64 mov r6, r8 muls r6, r0 - ldr r3, =gUnknown_02024744 + ldr r3, =gEnemyParty _081A6716: mov r1, r9 ldr r0, [r1] @@ -63618,7 +63618,7 @@ _081A6734: movs r2, 0x64 mov r4, r8 muls r4, r2 - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty adds r0, r4, r5 bl pokemon_calc_effective_stats movs r6, 0 @@ -63640,7 +63640,7 @@ _081A674E: movs r2, 0x64 mov r4, r8 muls r4, r2 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 mov r5, r9 ldr r0, [r5] @@ -64241,7 +64241,7 @@ _081A6C4C: _081A6C50: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gSaveBlock2Ptr ldr r2, [r1] @@ -64489,7 +64489,7 @@ _081A6E0C: movs r0, 0x64 mov r5, r9 muls r5, r0 - ldr r6, =gUnknown_02024744 + ldr r6, =gEnemyParty adds r0, r5, r6 ldrh r1, [r4] ldr r7, [sp, 0x20] @@ -64530,7 +64530,7 @@ _081A6E6E: movs r0, 0x64 mov r4, r9 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x20 @@ -65367,7 +65367,7 @@ _081A759E: bls _081A759E adds r0, r5, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData lsls r2, r0, 16 mov r1, sp strb r0, [r1] @@ -65380,7 +65380,7 @@ _081A759E: bl pokemon_setattr adds r0, r5, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r6, r0, 24 movs r4, 0 @@ -65388,7 +65388,7 @@ _081A75DA: adds r1, r4, 0 adds r1, 0xD adds r0, r5, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 @@ -65687,18 +65687,18 @@ _081A7810: ldrb r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData bl pokemon_ailments_get_primary lsls r0, 24 cmp r0, 0 bne _081A7860 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081A7860 mov r0, r8 @@ -65708,7 +65708,7 @@ _081A7810: mov r8, r0 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 ldr r1, [r7] @@ -65785,18 +65785,18 @@ _081A78DC: ldrb r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData bl pokemon_ailments_get_primary lsls r0, 24 cmp r0, 0 bne _081A7946 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081A7946 mov r0, r8 @@ -65806,7 +65806,7 @@ _081A78DC: mov r8, r0 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 ldr r7, =gUnknown_03001290 @@ -65878,18 +65878,18 @@ _081A79A2: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData bl pokemon_ailments_get_primary lsls r0, 24 cmp r0, 0 bne _081A79D4 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081A79D4 adds r0, r6, 0x1 @@ -66153,10 +66153,10 @@ sub_81A7B90: @ 81A7B90 adds r0, r1 ldr r0, [r0] str r0, [sp, 0x4] - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r0, r5, 16 lsrs r0, 16 @@ -66215,7 +66215,7 @@ _081A7C32: movs r0, 0 b _081A7CE2 _081A7C4A: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty ldr r1, =gBaseStats mov r8, r1 lsls r6, 2 @@ -66262,7 +66262,7 @@ _081A7C4A: ands r0, r1 _081A7CA8: str r0, [sp] - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r1, 0x2E mov r2, sp bl pokemon_setattr @@ -66280,12 +66280,12 @@ _081A7CBA: ldrh r1, [r0] lsls r2, r4, 24 lsrs r2, 24 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty bl sub_80691F4 adds r4, 0x1 cmp r4, 0x3 ble _081A7CBA - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty bl pokemon_calc_effective_stats movs r0, 0x1 _081A7CE2: @@ -66663,16 +66663,16 @@ _081A7FB0: ldrb r1, [r4] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r0, r7, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r7, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 str r4, [sp, 0x8] @@ -66680,7 +66680,7 @@ _081A7FB0: bcc _081A8044 adds r0, r7, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData bl pokemon_ailments_get_primary lsls r0, 24 cmp r0, 0 @@ -66692,7 +66692,7 @@ _081A7FB0: _081A7FFC: adds r0, r7, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 mov r9, r0 @@ -66708,7 +66708,7 @@ _081A8014: adds r1, r4, 0 adds r1, 0xD adds r0, r7, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r1, r9 @@ -66719,7 +66719,7 @@ _081A8014: adds r1, r4, 0 adds r1, 0x11 adds r0, r7, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 cmp r5, r6 @@ -66735,7 +66735,7 @@ _081A8048: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_81A7594 ldr r0, [sp, 0x4] @@ -67338,13 +67338,13 @@ _081A8542: thumb_func_start sub_81A8554 sub_81A8554: @ 81A8554 push {r4-r6,lr} - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty movs r6, 0 movs r4, 0 _081A855C: adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081A856E adds r0, r6, 0x1 @@ -67534,30 +67534,30 @@ _081A86D4: movs r0, 0x64 mov r1, r10 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r0, r7, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 adds r0, r7, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 cmp r4, r5 bcc _081A8762 adds r0, r7, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData bl pokemon_ailments_get_primary lsls r0, 24 cmp r0, 0 bne _081A8762 adds r0, r7, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 mov r8, r0 @@ -67574,7 +67574,7 @@ _081A8732: adds r1, r6, 0 adds r1, 0xD adds r0, r7, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r1, r8 @@ -67585,7 +67585,7 @@ _081A8732: adds r1, r6, 0 adds r1, 0x11 adds r0, r7, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 cmp r4, r5 @@ -67641,7 +67641,7 @@ _081A879C: ldr r0, [r7] adds r0, r1 movs r1, 0xC - bl pokemon_getattr + bl GetMonData ldr r1, [r6] ldr r2, =0x00000e12 adds r1, r2 @@ -67747,10 +67747,10 @@ sub_81A88B0: @ 81A88B0 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081A8904 adds r0, r4, 0 @@ -67764,7 +67764,7 @@ sub_81A88B0: @ 81A88B0 _081A88D6: adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 cmp r0, 0x5 @@ -69533,7 +69533,7 @@ sub_81A975C: @ 81A975C movs r5, 0 movs r0, 0x64 mov r9, r0 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty mov r8, r1 _081A9776: movs r4, 0 @@ -69662,15 +69662,15 @@ _081A986C: adds r0, r6 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty ldr r1, [sp, 0x10] adds r0, r1, r3 movs r1, 0xB movs r2, 0 str r3, [sp, 0x14] - bl pokemon_getattr + bl GetMonData ldr r3, [sp, 0x14] cmp r4, r0 bne _081A993C @@ -69704,14 +69704,14 @@ _081A98C6: adds r1, r5, 0 adds r1, 0xD movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 adds r1, r6, 0 adds r1, 0xD mov r2, r10 adds r0, r7, r2 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r4, r0 bne _081A98C4 _081A98EE: @@ -69734,7 +69734,7 @@ _081A9900: movs r5, 0x8E lsls r5, 2 adds r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty ldr r2, [sp, 0x10] adds r1, r2, r1 movs r2, 0x64 @@ -70127,11 +70127,11 @@ _081A9C56: lsls r0, 2 adds r0, r1 ldr r6, [r0] - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData subs r0, 0x1 str r0, [sp, 0x10] lsls r2, r0, 1 @@ -70193,7 +70193,7 @@ _081A9CD4: subs r0, 0x5 adds r5, r4, r0 _081A9CF6: - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty ldr r2, =gBaseStats ldr r1, [sp, 0x10] lsls r0, r1, 1 @@ -70245,11 +70245,11 @@ _081A9D4C: ldrb r0, [r0, 0x17] cmp r0, 0 beq _081A9D90 - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty adds r0, r4, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0x1 ands r1, r0 str r1, [sp, 0xC] @@ -70262,7 +70262,7 @@ _081A9D7C: .pool _081A9D90: str r0, [sp, 0xC] - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty add r2, sp, 0xC movs r1, 0x2E bl pokemon_setattr @@ -70283,7 +70283,7 @@ _081A9DA4: ldrh r1, [r0] lsls r2, 24 lsrs r2, 24 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty bl sub_80691F4 ldr r0, [sp, 0xC] adds r0, 0x1 @@ -70313,7 +70313,7 @@ _081A9DA4: _081A9DF6: adds r1, r0, 0 adds r1, 0x27 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty add r2, sp, 0x10 bl pokemon_setattr ldr r0, [sp, 0xC] @@ -70322,7 +70322,7 @@ _081A9DF6: cmp r0, 0x5 ble _081A9DF6 _081A9E0C: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty bl pokemon_calc_effective_stats add sp, 0x14 pop {r4-r6} @@ -82265,10 +82265,10 @@ _081B015C: adds r1, r0, 0 movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B017E _081B017A: @@ -83051,10 +83051,10 @@ _081B0836: _081B085C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B089C ldr r4, =gUnknown_0203CEDC @@ -83168,11 +83168,11 @@ sub_81B0948: @ 81B0948 movs r0, 0x64 adds r1, r4, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r0, r7, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 cmp r2, 0 beq _081B09A0 @@ -83263,7 +83263,7 @@ sub_81B0A10: @ 81B0A10 movs r1, 0x64 adds r2, r0, 0 muls r2, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r6, r2, r1 ldr r7, =gUnknown_0203CEDC ldr r1, [r7] @@ -83287,7 +83287,7 @@ sub_81B0A10: @ 81B0A10 bl sub_81B2A70 adds r0, r6, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B0A7C ldr r1, [r7] @@ -83322,7 +83322,7 @@ sub_81B0A9C: @ 81B0A9C lsrs r5, r0, 24 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r6, =gUnknown_0203CEF8 bl sub_81B85AC @@ -83378,7 +83378,7 @@ sub_81B0B08: @ 81B0B08 lsrs r4, r0, 24 movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_80DAE0C lsls r0, 24 @@ -83420,7 +83420,7 @@ sub_81B0B60: @ 81B0B60 lsrs r4, r0, 24 movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_806E25C lsls r0, 24 @@ -83473,10 +83473,10 @@ sub_81B0BC4: @ 81B0BC4 lsrs r4, r0, 24 movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B0BEC adds r0, r4, 0 @@ -83502,7 +83502,7 @@ sub_81B0BFC: @ 81B0BFC movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r6, r1, r0 ldr r0, =gUnknown_0203CE7C ldrh r4, [r0] @@ -83543,7 +83543,7 @@ _081B0C5A: _081B0C66: adds r0, r6, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B0C82 adds r0, r6, 0 @@ -83576,7 +83576,7 @@ sub_81B0C94: @ 81B0C94 lsrs r2, 24 movs r0, 0x64 muls r0, r4 - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty adds r0, r3 bl sub_81B22D8 lsls r0, 24 @@ -83816,11 +83816,11 @@ _081B0E98: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r6, r1, r0 adds r0, r6, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B0EDC ldr r4, =gUnknown_0203CEDC @@ -83978,10 +83978,10 @@ sub_81B0FCC: @ 81B0FCC beq _081B1074 movs r0, 0x64 muls r0, r7 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B10E8 ldr r6, =gUnknown_0203CEDC @@ -84121,10 +84121,10 @@ sub_81B10F8: @ 81B10F8 _081B110A: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B1120 movs r0, 0x2 @@ -84676,10 +84676,10 @@ sub_81B15A4: @ 81B15A4 ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 beq _081B15C4 movs r0, 0x1 @@ -85279,7 +85279,7 @@ _081B1A24: bne _081B1A54 ldr r0, =gUnknown_02024618 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B1AF4 strb r6, [r4] @@ -85302,7 +85302,7 @@ _081B1A5C: ldr r0, =gUnknown_020246E0 _081B1A70: movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B1AF4 strb r5, [r4] @@ -85311,7 +85311,7 @@ _081B1A70: _081B1A88: ldr r0, =gUnknown_0202467C movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B1AF4 movs r0, 0x4 @@ -85389,10 +85389,10 @@ _081B1B0A: asrs r4, r1, 24 movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B1B0A adds r0, r4, 0 @@ -85414,7 +85414,7 @@ GetMonNickname: @ 81B1B44 adds r4, r1, 0 movs r1, 0x2 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 bl StringGetEnd10 pop {r4} @@ -85728,7 +85728,7 @@ sub_81B1E00: @ 81B1E00 sub sp, 0x4 adds r4, r0, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r1, sp @@ -85796,7 +85796,7 @@ sub_81B1E60: @ 81B1E60 ldrsh r0, [r7, r2] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x39 adds r2, r7, 0 @@ -85887,7 +85887,7 @@ sub_81B1F18: @ 81B1F18 movs r0, 0x64 mov r6, r9 muls r6, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r6, r0 mov r0, r8 lsls r4, r0, 2 @@ -85897,11 +85897,11 @@ sub_81B1F18: @ 81B1F18 adds r4, r0 adds r0, r6, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r0, r6, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x2] lsls r5, 24 asrs r5, 24 @@ -86032,7 +86032,7 @@ sub_81B205C: @ 81B205C push {r4,lr} adds r4, r0, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B206E movs r0, 0x7 @@ -86040,7 +86040,7 @@ sub_81B205C: @ 81B205C _081B206E: adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData bl pokemon_ailments_get_primary lsls r0, 24 lsrs r0, 24 @@ -86087,7 +86087,7 @@ sub_81B209C: @ 81B209C _081B20C4: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_81B2134 lsls r0, 16 @@ -86111,7 +86111,7 @@ _081B20FC: _081B2100: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_81B2164 lsls r0, 16 @@ -86140,12 +86140,12 @@ sub_81B2134: @ 81B2134 push {r4,lr} adds r4, r0, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 beq _081B215A adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl sub_802C908 @@ -86166,12 +86166,12 @@ sub_81B2164: @ 81B2164 push {r4,lr} adds r4, r0, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 beq _081B2182 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0x55 bne _081B2182 movs r0, 0x1 @@ -86356,7 +86356,7 @@ sub_81B22D8: @ 81B22D8 lsrs r6, r2, 24 mov r8, r6 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B22FA movs r0, 0x3 @@ -86380,7 +86380,7 @@ _081B22FA: _081B231C: adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 @@ -87230,7 +87230,7 @@ sub_81B2A70: @ 81B2A70 lsls r2, 24 lsrs r4, r2, 24 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B2AC0 cmp r4, 0x1 @@ -87279,7 +87279,7 @@ sub_81B2AC8: @ 81B2AC8 lsrs r4, r2, 24 mov r8, r4 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B2B34 adds r0, r6, 0 @@ -87315,7 +87315,7 @@ _081B2B1C: beq _081B2B34 adds r0, r6, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 adds r1, r7, 0 @@ -87398,7 +87398,7 @@ _081B2BBE: lsrs r4, 24 adds r0, r6, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -87521,7 +87521,7 @@ sub_81B2CD4: @ 81B2CD4 lsrs r4, r2, 24 mov r8, r4 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B2D2E cmp r4, 0 @@ -87548,7 +87548,7 @@ _081B2D16: beq _081B2D2E adds r0, r7, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 @@ -87603,7 +87603,7 @@ sub_81B2D74: @ 81B2D74 lsrs r4, r2, 24 mov r8, r4 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B2DD0 cmp r4, 0 @@ -87631,7 +87631,7 @@ _081B2DB8: beq _081B2DD0 adds r0, r7, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 adds r1, r6, 0 @@ -87683,18 +87683,18 @@ sub_81B2E28: @ 81B2E28 adds r5, r0, 0 adds r6, r1, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B2E5C adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 16 lsrs r1, 16 @@ -88057,7 +88057,7 @@ _081B313C: thumb_func_start sub_81B314C sub_81B314C: @ 81B314C push {r4-r7,lr} - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty movs r6, 0 ldr r0, =gUnknown_0203CEC8 ldrb r0, [r0, 0xB] @@ -88075,17 +88075,17 @@ _081B316A: adds r4, r7, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B319A adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B3194 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B319A _081B3194: @@ -88447,7 +88447,7 @@ _081B345A: adds r0, r1, r6 adds r1, r7, 0 adds r1, 0xD - bl pokemon_getattr + bl GetMonData lsls r1, r4, 1 adds r1, r5 ldrh r1, [r1] @@ -88487,7 +88487,7 @@ _081B34A0: mov r0, r9 adds r0, 0x64 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B34D2 ldr r0, =gUnknown_0203CEC4 @@ -88504,7 +88504,7 @@ _081B34D2: adds r0, r1, 0 add r0, r9 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl itemid_is_mail @@ -88587,7 +88587,7 @@ _081B3594: beq _081B35AC adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B35FE _081B35AC: @@ -88620,7 +88620,7 @@ _081B35D8: _081B35DC: adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData movs r1, 0x6 cmp r0, 0 beq _081B3600 @@ -88660,7 +88660,7 @@ sub_81B3608: @ 81B3608 ldrsb r1, [r4, r1] movs r0, 0x64 muls r0, r1 - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty adds r5, r0, r7 ldr r1, =gStringVar1 adds r0, r5, 0 @@ -88692,7 +88692,7 @@ sub_81B3608: @ 81B3608 _081B3674: adds r0, r5, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 cmp r6, 0 @@ -88891,7 +88891,7 @@ sub_81B3828: @ 81B3828 cmp r0, 0x1 bne _081B3868 bl pokemon_change_order - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty ldrb r2, [r4, 0x9] ldr r0, =gUnknown_020244E9 ldrb r3, [r0] @@ -88905,7 +88905,7 @@ sub_81B3828: @ 81B3828 b _081B3880 .pool _081B3868: - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty ldrb r2, [r4, 0x9] ldr r0, =gUnknown_020244E9 ldrb r3, [r0] @@ -89817,7 +89817,7 @@ swap_pokemon_and_oams: @ 81B3FDC movs r1, 0x64 adds r4, r3, 0 muls r4, r1 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r5, r2, 0 muls r5, r1 @@ -89957,7 +89957,7 @@ sub_81B4134: @ 81B4134 ldr r0, [r4] adds r0, 0xD bl sub_81B302C - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty ldr r1, =gUnknown_0203CEC8 ldrb r1, [r1, 0x9] movs r2, 0x8 @@ -90056,10 +90056,10 @@ _081B4224: mov r1, r8 muls r1, r0 adds r0, r1, 0 - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty adds r0, r7 movs r1, 0xC - bl pokemon_getattr + bl GetMonData strh r0, [r4] lsls r0, 16 cmp r0, 0 @@ -90145,7 +90145,7 @@ sub_81B42D0: @ 81B42D0 asrs r0, 24 movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 adds r1, r4, 0 movs r2, 0 @@ -90193,7 +90193,7 @@ sub_81B4350: @ 81B4350 ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_0203CEFC ldrh r1, [r1] @@ -90299,7 +90299,7 @@ _081B4458: ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrh r1, [r5] bl sub_81B1DB8 @@ -90318,7 +90318,7 @@ _081B4498: ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrh r1, [r5] bl sub_81B1DB8 @@ -90384,10 +90384,10 @@ sub_81B452C: @ 81B452C ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x40 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 ldr r1, =gSaveBlock1Ptr @@ -90418,11 +90418,11 @@ sub_81B4578: @ 81B4578 ldrsb r1, [r6, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r8, r0 @@ -90501,7 +90501,7 @@ sub_81B4624: @ 81B4624 ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_0203CE7C ldrh r1, [r1] @@ -90541,7 +90541,7 @@ sub_81B469C: @ 81B469C ldrsb r1, [r4, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r6, r1, r0 bl sub_81B1BD4 lsls r0, 24 @@ -90563,7 +90563,7 @@ sub_81B469C: @ 81B469C bne _081B4716 adds r0, r6, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B4704 movs r0, 0x9 @@ -90604,11 +90604,11 @@ sub_81B4724: @ 81B4724 ldrsb r1, [r0, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 movs r0, 0x5 @@ -90678,11 +90678,11 @@ sub_81B47E0: @ 81B47E0 ldrsb r1, [r0, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r0, r7, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 movs r0, 0x5 @@ -90774,7 +90774,7 @@ sub_81B48DC: @ 81B48DC ldrsb r1, [r0, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 bl sub_8198C58 lsls r0, 24 @@ -90796,7 +90796,7 @@ _081B4914: _081B491A: adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 ldr r1, =gStringVar1 @@ -90846,7 +90846,7 @@ sub_81B4988: @ 81B4988 ldrsb r1, [r6, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 bl sub_81B1BD4 lsls r0, 24 @@ -90906,7 +90906,7 @@ sub_81B4A08: @ 81B4A08 ldr r0, [r4] adds r0, 0xD bl sub_81B302C - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty ldr r1, =gUnknown_0203CEC8 ldrb r1, [r1, 0x9] movs r2, 0x9 @@ -90958,10 +90958,10 @@ sub_81B4A98: @ 81B4A98 ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x40 - bl pokemon_getattr + bl GetMonData ldr r2, =gSaveBlock1Ptr lsls r1, r0, 3 adds r1, r0 @@ -91090,7 +91090,7 @@ _081B4BC6: ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_80D4700 lsls r0, 24 @@ -91198,10 +91198,10 @@ _081B4CBE: asrs r0, 24 movs r7, 0x64 muls r0, r7 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty adds r0, r6 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 adds r0, r4, 0 @@ -91277,7 +91277,7 @@ sub_81B4D78: @ 81B4D78 ldrsb r1, [r5, r1] movs r0, 0x64 muls r0, r1 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty adds r7, r0, r6 movs r0, 0x5 bl audio_play @@ -91313,7 +91313,7 @@ _081B4DE4: bl sub_81B31B0 adds r0, r7, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 ldr r1, =gStringVar2 @@ -91653,10 +91653,10 @@ sub_81B50C8: @ 81B50C8 mov r1, r8 muls r1, r0 adds r0, r1, 0 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData adds r6, r0, 0 lsls r6, 16 lsrs r6, 16 @@ -91668,7 +91668,7 @@ sub_81B50C8: @ 81B50C8 adds r0, r1, 0 adds r0, r4 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -91680,7 +91680,7 @@ sub_81B50C8: @ 81B50C8 adds r0, r1, 0 adds r0, r4 movs r1, 0x50 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -91760,10 +91760,10 @@ brm_trade_1: @ 81B51D4 asrs r0, 24 movs r6, 0x64 muls r0, r6 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData mov r9, r0 mov r1, r9 lsls r1, 16 @@ -91775,7 +91775,7 @@ brm_trade_1: @ 81B51D4 muls r0, r6 adds r0, r4 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -91785,7 +91785,7 @@ brm_trade_1: @ 81B51D4 muls r0, r6 adds r0, r4 movs r1, 0x50 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -91863,7 +91863,7 @@ sub_81B52E4: @ 81B52E4 ldr r0, [r4] adds r0, 0xD bl sub_81B302C - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty ldr r1, =gUnknown_0203CEC8 ldrb r1, [r1, 0x9] lsls r1, 24 @@ -91909,7 +91909,7 @@ _081B5368: ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 bl GetMonNickname @@ -92366,10 +92366,10 @@ brm_get_selected_species: @ 81B578C ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 pop {r1} @@ -92660,13 +92660,13 @@ party_menu_icon_anim: @ 81B59B4 _081B59EA: adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 str r6, [sp] adds r0, r4, 0 @@ -92821,13 +92821,13 @@ sub_81B5B38: @ 81B5B38 lsrs r5, 24 adds r0, r6, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r6, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 lsls r2, 16 lsrs r2, 16 @@ -92933,7 +92933,7 @@ party_menu_held_item_object: @ 81B5C14 adds r5, r0, 0 adds r4, r1, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B5C3C ldr r0, =gUnknown_08615EC0 @@ -92995,7 +92995,7 @@ sub_81B5C94: @ 81B5C94 push {r4,lr} adds r4, r1, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 adds r1, r4, 0 @@ -93101,10 +93101,10 @@ _081B5D60: _081B5D68: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0 @@ -93133,10 +93133,10 @@ _081B5DA8: _081B5DAC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0 @@ -93279,7 +93279,7 @@ party_menu_pokeball_object: @ 81B5ECC push {r4,lr} adds r4, r1, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B5EEA ldr r0, =gUnknown_08615F08 @@ -93482,7 +93482,7 @@ party_menu_status_condition_object: @ 81B6064 adds r5, r0, 0 adds r4, r1, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B608C ldr r0, =gUnknown_08616008 @@ -93665,16 +93665,16 @@ _081B61D8: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B61FA adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B61B0 _081B61FA: @@ -93970,7 +93970,7 @@ UsingHPEVItemOnShedinja: @ 81B64D0 bne _081B64FC adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldr r1, =0x0000012f cmp r0, r1 bne _081B64FC @@ -94027,7 +94027,7 @@ ExecuteTableBasedItemEffect__: @ 81B6520 bne _081B6558 movs r0, 0x64 muls r0, r3 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r5, 0 adds r2, r3, 0 @@ -94037,7 +94037,7 @@ _081B6558: movs r0, 0x64 adds r4, r3, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r3, 0 bl sub_81B8F38 @@ -94076,7 +94076,7 @@ ItemUseCB_Medicine: @ 81B6588 ldrsb r1, [r0, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 ldr r0, =gUnknown_0203CE7C ldrh r6, [r0] @@ -94095,13 +94095,13 @@ ItemUseCB_Medicine: @ 81B6588 bne _081B65EE adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r10, r0 adds r0, r5, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData cmp r10, r0 bne _081B65EE movs r1, 0 @@ -94189,7 +94189,7 @@ _081B6694: _081B66A8: adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 mov r1, r10 subs r3, r1 @@ -94250,7 +94250,7 @@ sub_81B672C: @ 81B672C ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 bl GetMonNickname @@ -94321,7 +94321,7 @@ sub_81B67C8: @ 81B67C8 ldrsb r1, [r4, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 ldr r0, =gUnknown_0203CE7C ldrh r6, [r0] @@ -94331,7 +94331,7 @@ sub_81B67C8: @ 81B67C8 lsrs r7, r0, 24 adds r0, r5, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 str r0, [sp, 0x4] @@ -94350,7 +94350,7 @@ sub_81B67C8: @ 81B67C8 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r9, r0 @@ -94466,7 +94466,7 @@ _081B693C: _081B6954: adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldr r1, =0x0000012f cmp r0, r1 beq _081B6992 @@ -94494,7 +94494,7 @@ _081B6984: adds r0, r4, 0 movs r1, 0x1F _081B6988: - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 b _081B6994 @@ -94585,14 +94585,14 @@ sub_81B6A10: @ 81B6A10 adds r1, r4, 0 muls r1, r0 mov r8, r1 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty mov r9, r0 _081B6A40: adds r1, r5, 0 adds r1, 0xD mov r0, r8 add r0, r9 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -94821,7 +94821,7 @@ _081B6C34: movs r0, 0x64 adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 movs r0, 0x1 bl audio_play @@ -94832,7 +94832,7 @@ _081B6C34: ldrsh r1, [r7, r0] adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 ldr r0, =gStringVar1 @@ -94944,7 +94944,7 @@ _081B6D4E: adds r1, r4, 0 adds r1, 0xD adds r0, r6, 0 - bl pokemon_getattr + bl GetMonData cmp r0, r5 bne _081B6D60 movs r0, 0x1 @@ -95015,7 +95015,7 @@ sub_81B6DC4: @ 81B6DC4 ldrsb r1, [r7, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 movs r0, 0xE adds r0, r7 @@ -95105,7 +95105,7 @@ sub_81B6EB4: @ 81B6EB4 ldrsb r1, [r2, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r6, r2, 0 adds r6, 0xE @@ -95329,7 +95329,7 @@ _081B70A8: sub_81B70B8: @ 81B70B8 push {r4,lr} sub sp, 0x4 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty ldr r4, =gUnknown_0203CEC8 ldrb r1, [r4, 0x9] ldr r2, =gUnknown_020244E9 @@ -95412,7 +95412,7 @@ sub_81B7154: @ 81B7154 movs r0, 0x64 adds r5, r1, 0 muls r5, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r0 bl sub_81C1B94 adds r1, r0, 0 @@ -95420,7 +95420,7 @@ sub_81B7154: @ 81B7154 lsrs r1, 24 adds r1, 0xD adds r0, r5, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -95464,7 +95464,7 @@ sub_81B71D4: @ 81B71D4 movs r0, 0x64 adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 bl sub_81C1B94 adds r1, r0, 0 @@ -95561,7 +95561,7 @@ sub_81B72C8: @ 81B72C8 ldrsb r1, [r7, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 bl sub_8198C58 lsls r0, 24 @@ -95693,7 +95693,7 @@ dp05_rare_candy: @ 81B7404 ldrsb r1, [r0, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 ldr r0, =gUnknown_0203CEC4 ldr r6, [r0] @@ -95704,7 +95704,7 @@ dp05_rare_candy: @ 81B7404 mov r8, r2 adds r0, r5, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData cmp r0, 0x64 beq _081B7478 adds r0, r5, 0 @@ -95768,7 +95768,7 @@ _081B74B4: ldr r4, =gStringVar2 adds r0, r5, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 @@ -96034,7 +96034,7 @@ _081B772C: ldrsb r1, [r4, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1 bl sub_8069318 @@ -96093,7 +96093,7 @@ sub_81B77AC: @ 81B77AC ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0 bl sub_8069318 @@ -96141,7 +96141,7 @@ sub_81B7810: @ 81B7810 ldrsb r1, [r6, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r0, r7, 0 movs r1, 0 @@ -96193,7 +96193,7 @@ sub_81B787C: @ 81B787C ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 bl GetMonNickname @@ -96249,7 +96249,7 @@ sub_81B7910: @ 81B7910 ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 bl GetMonNickname @@ -96291,27 +96291,27 @@ sub_81B79A0: @ 81B79A0 adds r4, r0, 0 adds r5, r1, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData strh r0, [r5] adds r0, r4, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0x2] adds r0, r4, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0x4] adds r0, r4, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0x8] adds r0, r4, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0xA] adds r0, r4, 0 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0x6] pop {r4,r5} pop {r0} @@ -96362,16 +96362,16 @@ sub_81B7A28: @ 81B7A28 ldrsb r1, [r6, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B7A6E adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 ldrb r0, [r6, 0x9] @@ -96437,7 +96437,7 @@ _081B7AD6: bl sub_81B0FCC adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 subs r3, r7 lsls r3, 16 @@ -96564,7 +96564,7 @@ sub_81B7C10: @ 81B7C10 ldrsb r1, [r0, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 bl GetMonNickname @@ -96859,7 +96859,7 @@ sub_81B7E4C: @ 81B7E4C ldrsb r1, [r7, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 movs r0, 0xE adds r0, r7 @@ -97005,10 +97005,10 @@ sub_81B7FAC: @ 81B7FAC mov r1, r8 muls r1, r0 adds r0, r1, 0 - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty adds r0, r7 movs r1, 0xC - bl pokemon_getattr + bl GetMonData strh r0, [r5] lsls r0, 16 cmp r0, 0 @@ -97106,7 +97106,7 @@ sub_81B8088: @ 81B8088 mov r1, r8 muls r1, r0 adds r0, r1, 0 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty adds r0, r6 adds r1, r5, 0 movs r2, 0 @@ -97154,7 +97154,7 @@ sub_81B8104: @ 81B8104 asrs r2, 24 movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_0203CEDC lsls r2, 4 @@ -97178,7 +97178,7 @@ sub_81B814C: @ 81B814C ldrsb r0, [r4, r0] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 ldrh r1, [r4, 0xC] bl sub_81B1DB8 @@ -97187,7 +97187,7 @@ sub_81B814C: @ 81B814C muls r0, r6 adds r0, r5 movs r1, 0x40 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 ldr r1, =gSaveBlock1Ptr @@ -97217,11 +97217,11 @@ sub_81B81A8: @ 81B81A8 ldrsb r1, [r6, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r7, r0, 16 ldr r0, =gUnknown_020375F0 @@ -97294,7 +97294,7 @@ _081B8264: ldrsb r1, [r2, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrh r1, [r2, 0xC] movs r2, 0 @@ -97401,7 +97401,7 @@ _081B835C: ldrsb r1, [r7, r1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r4, 0 bl sub_81B1DB8 @@ -97541,7 +97541,7 @@ sub_81B8474: @ 81B8474 ldrsb r1, [r0, r1] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 ldr r1, =gUnknown_0203CEE8 movs r0, 0 @@ -97561,7 +97561,7 @@ sub_81B8474: @ 81B8474 adds r4, r1, r0 adds r0, r5, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B84DC ldr r0, =gUnknown_085E9A08 @@ -97639,7 +97639,7 @@ sub_81B856C: @ 81B856C asrs r4, r0, 24 movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_81B85AC lsls r0, 24 @@ -97673,12 +97673,12 @@ sub_81B85AC: @ 81B85AC adds r5, r0, 0 movs r6, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B8608 adds r0, r5, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 bl sub_81B8888 lsls r0, 24 @@ -97693,7 +97693,7 @@ sub_81B85AC: @ 81B85AC bne _081B85EA adds r0, r5, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B8608 _081B85EA: @@ -97707,7 +97707,7 @@ _081B85EA: bne _081B8618 adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B864A _081B8608: @@ -97717,7 +97717,7 @@ _081B8608: _081B8618: adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 ldr r3, =gUnknown_08611C9A @@ -97811,10 +97811,10 @@ _081B86CE: movs r1, 0x64 muls r0, r1 subs r0, 0x64 - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty adds r0, r3, r0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r10, r0 @@ -97822,10 +97822,10 @@ _081B86CE: movs r1, 0x64 muls r0, r1 subs r0, 0x64 - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty adds r0, r3, r0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 adds r1, r5, 0x1 @@ -97841,10 +97841,10 @@ _081B870E: ldrb r0, [r5] muls r0, r7 subs r0, 0x64 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1, r0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r10, r0 beq _081B86B8 cmp r6, 0 @@ -97852,10 +97852,10 @@ _081B870E: ldrb r0, [r5] muls r0, r7 subs r0, 0x64 - ldr r3, =gUnknown_020244EC + ldr r3, =gPlayerParty adds r0, r3, r0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData cmp r6, r0 beq _081B86BC _081B873E: @@ -98246,12 +98246,12 @@ sub_81B8A2C: @ 81B8A2C adds r4, r0, 0 ldr r0, =gUnknown_02024550 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B8A74 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B8A74 ldr r0, =gUnknown_0203CEC8 @@ -98313,11 +98313,11 @@ _081B8AC4: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081B8AF8 ldr r1, =gStringVar1 @@ -98358,12 +98358,12 @@ _081B8B24: movs r7, 0x64 adds r0, r5, 0 muls r0, r7 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty mov r8, r1 adds r6, r0, r1 adds r0, r6, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B8B60 ldr r0, =gStringVar4 @@ -98430,7 +98430,7 @@ _081B8BA8: _081B8BFC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 bl GetMonNickname @@ -98990,7 +98990,7 @@ pokemon_change_order: @ 81B9030 adds r0, r4, 0 bl Alloc adds r5, r0, 0 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r2, r4, 0 bl memcpy movs r4, 0 @@ -99001,7 +99001,7 @@ _081B904A: lsls r0, 24 lsrs r0, 24 muls r0, r6 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r4, 0 muls r1, r6 @@ -99029,7 +99029,7 @@ sub_81B9080: @ 81B9080 adds r0, r4, 0 bl Alloc adds r5, r0, 0 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r2, r4, 0 bl memcpy movs r4, 0 @@ -99040,7 +99040,7 @@ _081B909A: lsls r0, 24 lsrs r0, 24 muls r0, r6 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r4, 0 muls r1, r6 @@ -99067,7 +99067,7 @@ sub_81B90D0: @ 81B90D0 push {r7} movs r6, 0x1 movs r7, 0x64 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty mov r8, r0 _081B90DE: adds r0, r6, 0 @@ -99079,12 +99079,12 @@ _081B90DE: adds r5, r0, r1 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B912C adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B912C movs r0, 0 @@ -99651,7 +99651,7 @@ _081B95A4: ldrh r1, [r5] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 bl sub_806E25C lsls r0, 24 @@ -99688,10 +99688,10 @@ _081B95FA: bhi _081B9614 movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B95F4 movs r0, 0x1 @@ -99757,7 +99757,7 @@ _081B9678: sub_81B968C: @ 81B968C push {lr} sub sp, 0x4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty ldr r0, =gUnknown_020375E0 ldrb r2, [r0] ldr r0, =gUnknown_020244E9 @@ -99791,11 +99791,11 @@ _081B96DC: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r4, 0 adds r1, 0xD - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081B96FA ldrh r0, [r5] @@ -99821,13 +99821,13 @@ sub_81B9718: @ 81B9718 movs r0, 0x64 adds r5, r1, 0 muls r5, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r0 ldr r0, =gUnknown_020375E2 ldrh r1, [r0] adds r1, 0xD adds r0, r5, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -99856,7 +99856,7 @@ sub_81B9770: @ 81B9770 ldrh r0, [r0] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 ldr r4, =gUnknown_020375E2 ldrb r2, [r4] @@ -99876,7 +99876,7 @@ _081B97A2: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 lsls r1, r4, 24 lsrs r1, 24 @@ -99917,7 +99917,7 @@ sub_81B97DC: @ 81B97DC str r0, [sp, 0x8] mov r0, r8 ldr r1, [sp, 0x8] - bl pokemon_getattr + bl GetMonData mov r1, sp adds r1, 0x2 str r1, [sp, 0x14] @@ -99927,7 +99927,7 @@ sub_81B97DC: @ 81B97DC str r3, [sp, 0xC] mov r0, r8 adds r1, r3, 0 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] adds r7, r5, 0 @@ -99935,7 +99935,7 @@ sub_81B97DC: @ 81B97DC str r7, [sp, 0x10] mov r0, r8 adds r1, r7, 0 - bl pokemon_getattr + bl GetMonData mov r1, sp adds r1, 0x5 str r1, [sp, 0x18] @@ -99945,13 +99945,13 @@ sub_81B97DC: @ 81B97DC str r3, [sp, 0x1C] mov r0, r8 adds r1, r3, 0 - bl pokemon_getattr + bl GetMonData add r7, sp, 0x4 mov r10, r7 strb r0, [r7] mov r0, r8 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r6, sp adds r6, 0x6 strb r0, [r6] @@ -100025,10 +100025,10 @@ sub_81B98DC: @ 81B98DC ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 cmp r1, 0 beq _081B990C @@ -100058,12 +100058,12 @@ sub_81B9918: @ 81B9918 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_020375E2 ldrh r1, [r1] adds r1, 0xD - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r8, r0 @@ -100081,12 +100081,12 @@ _081B9958: movs r0, 0x64 adds r5, r6, 0 muls r5, r0 - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty _081B996A: adds r1, r4, 0 adds r1, 0xD adds r0, r5, r7 - bl pokemon_getattr + bl GetMonData cmp r0, 0x39 beq _081B999C adds r4, 0x1 diff --git a/asm/rom_81BAD84.s b/asm/rom_81BAD84.s index b28731146..ffc1631e6 100644 --- a/asm/rom_81BAD84.s +++ b/asm/rom_81BAD84.s @@ -428,7 +428,7 @@ _081BB07A: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -464,7 +464,7 @@ _081BB134: ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -568,7 +568,7 @@ _081BB25C: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 bl dp01_tbl3_exec_completed @@ -633,23 +633,23 @@ _081BB2E2: movs r0, 0x64 mov r1, r10 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r6, r1, r0 adds r0, r6, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r6, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 adds r0, r6, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4] ldr r3, =gExperienceTables adds r4, 0x1 @@ -790,23 +790,23 @@ sub_81BB414: @ 81BB414 movs r0, 0x64 adds r6, r1, 0 muls r6, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r6, r0 adds r0, r6, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 adds r0, r6, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r6, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 ldr r6, =gExperienceTables lsls r1, r4, 2 @@ -907,21 +907,21 @@ _081BB514: movs r0, 0x64 mov r1, r9 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4] adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 ldr r3, =gExperienceTables @@ -1069,11 +1069,11 @@ sub_81BB688: @ 81BB688 movs r0, 0x64 adds r1, r4, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r0, r7, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData bl battle_type_is_double lsls r0, 24 lsrs r0, 24 @@ -1102,7 +1102,7 @@ _081BB708: ldrb r0, [r0] movs r1, 0x64 muls r1, r4 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0 bl healthbar_draw_field_maybe @@ -1135,10 +1135,10 @@ sub_81BB740: @ 81BB740 ldrb r1, [r4, 0x8] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldrb r0, [r4, 0xC] ldr r1, =gUnknown_03005D60 lsls r0, 2 @@ -1179,10 +1179,10 @@ sub_81BB78C: @ 81BB78C ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl nullsub_24 @@ -1476,7 +1476,7 @@ sub_81BB9F4: @ 81BB9F4 ldrh r0, [r0] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 bl sub_805E990 ldr r1, =gUnknown_020241E4 @@ -1544,7 +1544,7 @@ sub_81BBAE8: @ 81BBAE8 ldrh r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 adds r0, r2, 0 bl sub_8172EF0 @@ -1838,16 +1838,16 @@ _081BBE08: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1] adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2E] movs r6, 0 @@ -1875,12 +1875,12 @@ _081BBE54: adds r1, r6, 0 adds r1, 0xD mov r0, r8 - bl pokemon_getattr + bl GetMonData strh r0, [r4] adds r1, r6, 0 adds r1, 0x11 mov r0, r8 - bl pokemon_getattr + bl GetMonData mov r2, r9 adds r1, r2, r6 strb r0, [r1] @@ -1891,25 +1891,25 @@ _081BBE54: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r10 strb r0, [r1] adds r0, r4, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0x80] strb r0, [r2] adds r0, r4, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x44] adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r5, 0x1F ands r0, r5 @@ -1921,7 +1921,7 @@ _081BBE54: strb r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData mov r3, sp movs r6, 0x1F ands r0, r6 @@ -1933,7 +1933,7 @@ _081BBE54: strh r1, [r3, 0x14] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 2 @@ -1945,7 +1945,7 @@ _081BBE54: strb r1, [r3, 0x15] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData movs r1, 0x1F ands r1, r0 lsls r1, 15 @@ -1956,7 +1956,7 @@ _081BBE54: str r0, [sp, 0x14] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r6 lsls r0, 4 @@ -1967,7 +1967,7 @@ _081BBE54: strh r1, [r3, 0x16] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData mov r3, sp ands r0, r5 lsls r0, 1 @@ -1979,55 +1979,55 @@ _081BBE54: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x48] adds r0, r4, 0 movs r1, 0x37 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x4C] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x7C] strb r0, [r1] adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x28] adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2C] adds r0, r4, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x2] adds r0, r4, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x4] adds r0, r4, 0 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x6] adds r0, r4, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0x8] adds r0, r4, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData mov r1, sp strh r0, [r1, 0xA] adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData mov r3, sp movs r1, 0x1 ands r0, r1 @@ -2040,7 +2040,7 @@ _081BBE54: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData mov r3, sp lsls r0, 7 ldrb r2, [r3, 0x17] @@ -2050,19 +2050,19 @@ _081BBE54: strb r1, [r3, 0x17] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [sp, 0x54] adds r0, r4, 0 movs r1, 0x2 ldr r2, [sp, 0x8C] - bl pokemon_getattr + bl GetMonData ldr r0, [sp, 0x84] ldr r1, [sp, 0x8C] bl StringCopy10 adds r0, r4, 0 movs r1, 0x7 ldr r2, [sp, 0x88] - bl pokemon_getattr + bl GetMonData mov r2, sp movs r6, 0 _081BC00C: @@ -2078,7 +2078,7 @@ _081BC00C: _081BC02C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB b _081BC3A6 @@ -2086,7 +2086,7 @@ _081BC02C: _081BC03C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xC b _081BC3A6 @@ -2100,20 +2100,20 @@ _081BC04C: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 mov r8, r9 _081BC062: adds r1, r6, 0 adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r1, r8 strh r0, [r1] adds r1, r6, 0 adds r1, 0x11 adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData mov r2, r10 adds r1, r2, r6 strb r0, [r1] @@ -2124,10 +2124,10 @@ _081BC062: ble _081BC062 movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r9 strb r0, [r1, 0xC] mov r2, r9 @@ -2145,7 +2145,7 @@ _081BC0A0: _081BC0B4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -2160,14 +2160,14 @@ _081BC0D0: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty mov r8, r2 _081BC0DC: adds r1, r6, 0 adds r1, 0x11 mov r2, r8 adds r0, r4, r2 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -2175,10 +2175,10 @@ _081BC0DC: ble _081BC0DC movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData adds r1, r7, r6 strb r0, [r1] adds r6, 0x1 @@ -2187,7 +2187,7 @@ _081BC0DC: _081BC10C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldrb r1, [r3] lsls r1, 9 @@ -2200,7 +2200,7 @@ _081BC10C: _081BC128: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1 b _081BC142 @@ -2208,11 +2208,11 @@ _081BC128: _081BC138: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x19 _081BC142: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -2231,7 +2231,7 @@ _081BC142: _081BC168: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1A b _081BC466 @@ -2239,7 +2239,7 @@ _081BC168: _081BC178: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1B b _081BC466 @@ -2247,7 +2247,7 @@ _081BC178: _081BC188: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1C b _081BC466 @@ -2255,7 +2255,7 @@ _081BC188: _081BC198: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1D b _081BC466 @@ -2263,7 +2263,7 @@ _081BC198: _081BC1A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1E b _081BC466 @@ -2271,7 +2271,7 @@ _081BC1A8: _081BC1B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1F b _081BC466 @@ -2279,7 +2279,7 @@ _081BC1B8: _081BC1C8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x20 b _081BC466 @@ -2287,7 +2287,7 @@ _081BC1C8: _081BC1D8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x22 b _081BC466 @@ -2295,7 +2295,7 @@ _081BC1D8: _081BC1E8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x23 b _081BC466 @@ -2303,7 +2303,7 @@ _081BC1E8: _081BC1F8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x24 b _081BC466 @@ -2311,7 +2311,7 @@ _081BC1F8: _081BC208: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x25 b _081BC466 @@ -2319,7 +2319,7 @@ _081BC208: _081BC218: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x26 b _081BC466 @@ -2328,31 +2328,31 @@ _081BC228: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x27 - bl pokemon_getattr + bl GetMonData strb r0, [r7] adds r0, r4, 0 movs r1, 0x28 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x1] adds r0, r4, 0 movs r1, 0x29 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x2] adds r0, r4, 0 movs r1, 0x2A - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x3] adds r0, r4, 0 movs r1, 0x2B - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x4] adds r0, r4, 0 movs r1, 0x2C - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x5] movs r6, 0x6 b _081BC46E @@ -2360,7 +2360,7 @@ _081BC228: _081BC278: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x27 b _081BC466 @@ -2368,7 +2368,7 @@ _081BC278: _081BC288: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x28 b _081BC466 @@ -2376,7 +2376,7 @@ _081BC288: _081BC298: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x29 b _081BC466 @@ -2384,7 +2384,7 @@ _081BC298: _081BC2A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2A b _081BC466 @@ -2392,7 +2392,7 @@ _081BC2A8: _081BC2B8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2B b _081BC466 @@ -2400,7 +2400,7 @@ _081BC2B8: _081BC2C8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2C b _081BC466 @@ -2408,7 +2408,7 @@ _081BC2C8: _081BC2D8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0 b _081BC302 @@ -2416,7 +2416,7 @@ _081BC2D8: _081BC2E8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x9 b _081BC3A6 @@ -2424,11 +2424,11 @@ _081BC2E8: _081BC2F8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x37 _081BC302: - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 strb r1, [r7] movs r0, 0xFF @@ -2449,7 +2449,7 @@ _081BC302: _081BC32C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x38 b _081BC466 @@ -2457,7 +2457,7 @@ _081BC32C: _081BC33C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x39 b _081BC3A6 @@ -2465,7 +2465,7 @@ _081BC33C: _081BC34C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A b _081BC3A6 @@ -2473,7 +2473,7 @@ _081BC34C: _081BC35C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3B b _081BC3A6 @@ -2481,7 +2481,7 @@ _081BC35C: _081BC36C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3C b _081BC3A6 @@ -2489,7 +2489,7 @@ _081BC36C: _081BC37C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3D b _081BC3A6 @@ -2497,7 +2497,7 @@ _081BC37C: _081BC38C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3E b _081BC3A6 @@ -2505,11 +2505,11 @@ _081BC38C: _081BC39C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3F _081BC3A6: - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 strb r0, [r7] @@ -2521,7 +2521,7 @@ _081BC3A6: _081BC3BC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x16 b _081BC466 @@ -2529,7 +2529,7 @@ _081BC3BC: _081BC3CC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x17 b _081BC466 @@ -2537,7 +2537,7 @@ _081BC3CC: _081BC3DC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x18 b _081BC466 @@ -2545,7 +2545,7 @@ _081BC3DC: _081BC3EC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x21 b _081BC466 @@ -2553,7 +2553,7 @@ _081BC3EC: _081BC3FC: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2F b _081BC466 @@ -2561,7 +2561,7 @@ _081BC3FC: _081BC40C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x30 b _081BC466 @@ -2569,7 +2569,7 @@ _081BC40C: _081BC41C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x32 b _081BC466 @@ -2577,7 +2577,7 @@ _081BC41C: _081BC42C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x33 b _081BC466 @@ -2585,7 +2585,7 @@ _081BC42C: _081BC43C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x34 b _081BC466 @@ -2593,7 +2593,7 @@ _081BC43C: _081BC44C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x35 b _081BC466 @@ -2601,11 +2601,11 @@ _081BC44C: _081BC45C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x36 _081BC466: - bl pokemon_getattr + bl GetMonData strb r0, [r7] movs r6, 0x1 _081BC46E: @@ -2768,7 +2768,7 @@ _081BC61C: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB @@ -2835,7 +2835,7 @@ _081BC682: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x15 @@ -2948,7 +2948,7 @@ _081BC682: _081BC7B4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2961,7 +2961,7 @@ _081BC7B4: _081BC7D4: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -2980,7 +2980,7 @@ _081BC7F4: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r6, r3, 0 adds r6, 0x8 @@ -3005,7 +3005,7 @@ _081BC80E: ble _081BC80E movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x15 mov r2, r9 @@ -3015,7 +3015,7 @@ _081BC80E: _081BC84C: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gUnknown_02023064 ldr r1, =gUnknown_02024064 @@ -3031,7 +3031,7 @@ _081BC874: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 ldr r5, =gUnknown_02024064 ldrb r2, [r5] @@ -3073,7 +3073,7 @@ _081BC874: _081BC8D8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gUnknown_02023064 ldr r1, =gUnknown_02024064 @@ -3092,7 +3092,7 @@ _081BC8F0: _081BC908: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3105,7 +3105,7 @@ _081BC908: _081BC928: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3118,7 +3118,7 @@ _081BC928: _081BC948: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3131,7 +3131,7 @@ _081BC948: _081BC968: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3144,7 +3144,7 @@ _081BC968: _081BC988: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3157,7 +3157,7 @@ _081BC988: _081BC9A8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3170,7 +3170,7 @@ _081BC9A8: _081BC9C8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3183,7 +3183,7 @@ _081BC9C8: _081BC9E8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3196,7 +3196,7 @@ _081BC9E8: _081BCA08: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3209,7 +3209,7 @@ _081BCA08: _081BCA28: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3222,7 +3222,7 @@ _081BCA28: _081BCA48: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3235,7 +3235,7 @@ _081BCA48: _081BCA68: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3248,7 +3248,7 @@ _081BCA68: _081BCA88: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3261,7 +3261,7 @@ _081BCA88: _081BCAA8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3275,7 +3275,7 @@ _081BCAC8: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 ldr r5, =gUnknown_02024064 ldrb r2, [r5] @@ -3322,7 +3322,7 @@ _081BCAC8: _081BCB38: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3335,7 +3335,7 @@ _081BCB38: _081BCB58: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3348,7 +3348,7 @@ _081BCB58: _081BCB78: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3361,7 +3361,7 @@ _081BCB78: _081BCB98: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3374,7 +3374,7 @@ _081BCB98: _081BCBB8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3387,7 +3387,7 @@ _081BCBB8: _081BCBD8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3401,7 +3401,7 @@ _081BCBE8: _081BCBF8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3414,7 +3414,7 @@ _081BCBF8: _081BCC18: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3427,7 +3427,7 @@ _081BCC18: _081BCC38: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3440,7 +3440,7 @@ _081BCC38: _081BCC58: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3453,7 +3453,7 @@ _081BCC58: _081BCC78: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3466,7 +3466,7 @@ _081BCC78: _081BCC98: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3479,7 +3479,7 @@ _081BCC98: _081BCCB8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3492,7 +3492,7 @@ _081BCCB8: _081BCCD8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3505,7 +3505,7 @@ _081BCCD8: _081BCCF8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3518,7 +3518,7 @@ _081BCCF8: _081BCD18: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3531,7 +3531,7 @@ _081BCD18: _081BCD38: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3544,7 +3544,7 @@ _081BCD38: _081BCD58: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3557,7 +3557,7 @@ _081BCD58: _081BCD78: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3570,7 +3570,7 @@ _081BCD78: _081BCD98: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3583,7 +3583,7 @@ _081BCD98: _081BCDB8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3596,7 +3596,7 @@ _081BCDB8: _081BCDD8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3609,7 +3609,7 @@ _081BCDD8: _081BCDF8: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3622,7 +3622,7 @@ _081BCDF8: _081BCE18: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3635,7 +3635,7 @@ _081BCE18: _081BCE38: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3648,7 +3648,7 @@ _081BCE38: _081BCE58: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3661,7 +3661,7 @@ _081BCE58: _081BCE78: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3674,7 +3674,7 @@ _081BCE78: _081BCE98: movs r0, 0x64 muls r0, r5 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_02024064 ldrb r2, [r1] @@ -3691,7 +3691,7 @@ _081BCEAE: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 add sp, 0x34 @@ -3722,7 +3722,7 @@ sub_81BCEE4: @ 81BCEE4 adds r0, r4, 0x1 adds r0, r2, r0 ldrb r0, [r0] - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r5, r3, r0 movs r3, 0 @@ -3774,7 +3774,7 @@ sub_81BCF58: @ 81BCF58 ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 bl sub_805DD7C ldrb r0, [r6] @@ -3784,7 +3784,7 @@ sub_81BCF58: @ 81BCF58 muls r0, r5 adds r0, r4 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 @@ -3903,7 +3903,7 @@ sub_81BD074: @ 81BD074 ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805DD7C ldrb r0, [r5] @@ -3949,10 +3949,10 @@ sub_81BD0E4: @ 81BD0E4 ldrh r1, [r2] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData mov r8, r0 lsls r0, 16 lsrs r0, 16 @@ -4594,7 +4594,7 @@ _081BD6C8: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805E990 movs r1, 0x40 @@ -5077,7 +5077,7 @@ sub_81BDAC8: @ 81BDAC8 ands r0, r1 cmp r0, 0 beq _081BDB02 - ldr r1, =gUnknown_0202420C + ldr r1, =gEnemyMonIndex ldrb r0, [r6] strb r0, [r1] _081BDB02: @@ -5093,7 +5093,7 @@ _081BDB02: beq _081BDB3C movs r0, 0x1 bl battle_get_side_with_given_state - ldr r4, =gUnknown_0202420C + ldr r4, =gEnemyMonIndex strb r0, [r4] ldr r0, =gUnknown_02024210 ldrb r1, [r0] @@ -5109,7 +5109,7 @@ _081BDB02: bl battle_get_side_with_given_state strb r0, [r4] _081BDB3C: - ldr r0, =gUnknown_0202420C + ldr r0, =gEnemyMonIndex ldrb r2, [r0] lsls r2, 8 orrs r2, r5 @@ -5156,10 +5156,10 @@ _081BDBA4: bgt _081BDBD0 movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081BDBA2 ldr r1, =gUnknown_0202406E @@ -5234,10 +5234,10 @@ sub_81BDC10: @ 81BDC10 ldrh r0, [r0] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData mov r8, r0 mov r1, r9 ldrb r0, [r1] @@ -5247,7 +5247,7 @@ sub_81BDC10: @ 81BDC10 muls r0, r5 adds r0, r4 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -5266,10 +5266,10 @@ _081BDCA0: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 mov r1, r9 ldrb r0, [r1] @@ -5310,11 +5310,11 @@ sub_81BDD00: @ 81BDD00 movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData cmp r0, 0x63 bls _081BDD38 bl dp01_tbl3_exec_completed @@ -5325,7 +5325,7 @@ _081BDD38: bl load_gfxc_health_bar adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldrb r1, [r6] lsls r1, 9 adds r0, r5, 0x2 @@ -5382,7 +5382,7 @@ sub_81BDD9C: @ 81BDD9C ldrh r2, [r1] movs r1, 0x64 muls r1, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r1, r2 movs r2, 0x9 bl healthbar_draw_field_maybe @@ -5750,10 +5750,10 @@ sub_81BE098: @ 81BE098 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 movs r1, 0x19 @@ -6054,7 +6054,7 @@ _081BE344: ldrh r2, [r0] movs r0, 0x64 muls r0, r2 - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty adds r0, r2 bl sub_805DD7C ldrb r0, [r7] @@ -9427,35 +9427,35 @@ _081C012A: _081C012C: adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData strh r0, [r6] adds r0, r5, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x2] adds r0, r5, 0 movs r1, 0x19 - bl pokemon_getattr + bl GetMonData str r0, [r6, 0x10] adds r0, r5, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0x5] adds r0, r5, 0 movs r1, 0x2E - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0x8] adds r0, r5, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x2E] adds r0, r5, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [r6, 0xC] adds r0, r5, 0 movs r1, 0x4 - bl pokemon_getattr + bl GetMonData adds r1, r7, 0 adds r1, 0xA5 strb r0, [r1] @@ -9468,7 +9468,7 @@ _081C012C: _081C018C: adds r0, r5, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0x4] b _081C0322 _081C0198: @@ -9485,12 +9485,12 @@ _081C01AA: adds r1, r4, 0 adds r1, 0xD adds r0, r5, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r6] adds r1, r4, 0 adds r1, 0x11 adds r0, r5, 0 - bl pokemon_getattr + bl GetMonData mov r2, r8 adds r1, r2, r4 strb r0, [r1] @@ -9500,13 +9500,13 @@ _081C01AA: bls _081C01AA adds r0, r5, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData mov r1, r9 strb r0, [r1] b _081C0322 _081C01DC: ldr r1, [r7] - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty cmp r1, r0 beq _081C01F8 ldr r2, =0x000040bc @@ -9527,27 +9527,27 @@ _081C01F8: strb r0, [r1] adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x20] adds r0, r5, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x22] adds r0, r5, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x24] adds r0, r5, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x26] adds r0, r5, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x28] adds r0, r5, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x2A] adds r0, r5, 0 movs r1, 0x3D @@ -9561,32 +9561,32 @@ _081C0254: strb r0, [r1] adds r0, r5, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x20] adds r0, r5, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x22] adds r0, r5, 0 movs r1, 0x54 - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x24] adds r0, r5, 0 movs r1, 0x55 - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x26] adds r0, r5, 0 movs r1, 0x57 - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x28] adds r0, r5, 0 movs r1, 0x58 - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x2A] adds r0, r5, 0 movs r1, 0x56 _081C02A0: - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x2C] b _081C0322 _081C02A8: @@ -9595,10 +9595,10 @@ _081C02A8: adds r0, r5, 0 movs r1, 0x7 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData adds r0, r5, 0 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -9609,35 +9609,35 @@ _081C02A8: strb r0, [r6, 0x7] adds r0, r5, 0 movs r1, 0x31 - bl pokemon_getattr + bl GetMonData adds r1, r7, 0 adds r1, 0xA2 strb r0, [r1] adds r0, r5, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData str r0, [r6, 0x48] adds r0, r5, 0 movs r1, 0x23 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0x9] adds r0, r5, 0 movs r1, 0x24 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0xA] adds r0, r5, 0 movs r1, 0x25 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0xB] adds r0, r5, 0 movs r1, 0x20 - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x30] b _081C0322 _081C0314: adds r0, r5, 0 movs r1, 0x52 - bl pokemon_getattr + bl GetMonData strb r0, [r6, 0x6] movs r0, 0x1 b _081C0332 @@ -10367,7 +10367,7 @@ _081C099C: muls r0, r4 adds r0, r7, r0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081C0968 adds r0, r4, 0 @@ -10462,7 +10462,7 @@ sub_81C0A50: @ 81C0A50 push {r4,lr} adds r4, r0, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081C0A84 ldr r0, =gUnknown_0203CF1C @@ -10474,7 +10474,7 @@ sub_81C0A50: @ 81C0A50 bne _081C0A78 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081C0A84 _081C0A78: @@ -15038,7 +15038,7 @@ sub_81C3220: @ 81C3220 adds r6, r0, 0 adds r6, 0x70 ldr r1, [r0] - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty cmp r1, r0 bne _081C326C bl link_get_multiplayer_id @@ -17376,7 +17376,7 @@ _081C4680: cmp r3, 0 beq _081C46E4 ldr r1, [r2] - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty cmp r1, r0 beq _081C46A6 ldr r1, =0x000040bc @@ -17414,7 +17414,7 @@ _081C46D6: .pool _081C46E4: ldr r1, [r2] - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty cmp r1, r0 beq _081C4700 ldr r1, =0x000040bc @@ -17746,7 +17746,7 @@ sub_81C4984: @ 81C4984 beq _081C49CE adds r0, r5, 0 movs r1, 0x8 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -17795,7 +17795,7 @@ sub_81C49E0: @ 81C49E0 sub_81C4A08: @ 81C4A08 push {r4,lr} movs r1, 0x26 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 bl ball_number_to_ball_processing_index @@ -21520,7 +21520,7 @@ sub_81C6A94: @ 81C6A94 mov r6, r8 push {r6,r7} sub sp, 0x4 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty mov r9, r0 movs r0, 0x14 bl Alloc @@ -21566,7 +21566,7 @@ _081C6AF8: muls r0, r6 add r0, r9 movs r1, 0xC - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r1, sp @@ -22592,21 +22592,21 @@ _081C738C: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081C73BA adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081C73BA adds r0, r4, 0 movs r1, 0x52 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081C73E2 _081C73BA: @@ -34643,7 +34643,7 @@ sub_81CD110: @ 81CD110 bne _081CD174 movs r0, 0x64 muls r0, r3 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x8 mov r2, sp @@ -35314,11 +35314,11 @@ _081CD690: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r8, r0 @@ -35668,10 +35668,10 @@ sub_81CD970: @ 81CD970 _081CD998: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 cmp r2, 0 bne _081CD9BE @@ -38507,16 +38507,16 @@ _081CF158: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081CF1AA adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081CF1A4 lsls r1, r5, 24 @@ -38528,7 +38528,7 @@ _081CF158: str r0, [sp] ldr r1, [r6, 0x14] adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 ldr r2, =0x0000ffff ldr r1, [sp] @@ -39494,7 +39494,7 @@ sub_81CF8E4: @ 81CF8E4 movs r0, 0x64 adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 bl pokemon_get_gender @@ -39507,7 +39507,7 @@ sub_81CF8E4: @ 81CF8E4 ldr r2, =gStringVar3 adds r0, r4, 0 movs r1, 0x2 - bl pokemon_getattr + bl GetMonData b _081CF94A .pool _081CF924: @@ -39863,26 +39863,26 @@ _081CFBB0: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081CFC10 adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081CFC0A adds r0, r4, 0 movs r1, 0x4 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081CFC0A adds r0, r4, 0 movs r1, 0x52 - bl pokemon_getattr + bl GetMonData adds r3, r0, 0 cmp r3, 0 beq _081CFC0A @@ -40083,21 +40083,21 @@ _081CFD5C: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x5 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _081CFD8A adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081CFD8A adds r0, r4, 0 movs r1, 0x53 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _081CFDB2 _081CFD8A: @@ -40870,7 +40870,7 @@ sub_81D035C: @ 81D035C movs r0, 0x64 adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 bl pokemon_get_gender @@ -40884,7 +40884,7 @@ sub_81D035C: @ 81D035C ldr r2, =gStringVar3 adds r0, r4, 0 movs r1, 0x2 - bl pokemon_getattr + bl GetMonData b _081D03CC .pool _081D03A4: @@ -41360,12 +41360,12 @@ sub_81D06E4: @ 81D06E4 movs r0, 0x64 adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x2 adds r2, r5, 0 - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 bl level_by_exp strb r0, [r7] @@ -41416,19 +41416,19 @@ sub_81D0760: @ 81D0760 movs r0, 0x64 adds r4, r1, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData strh r0, [r5] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData str r0, [r6] adds r0, r4, 0 movs r1, 0x1 - bl pokemon_getattr + bl GetMonData b _081D07D0 .pool _081D07AC: @@ -41474,10 +41474,10 @@ _081D07FA: ldrb r1, [r1, 0x1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x52 - bl pokemon_getattr + bl GetMonData _081D080A: pop {r1} bx r1 @@ -41503,10 +41503,10 @@ sub_81D0814: @ 81D0814 ldrb r1, [r1, 0x1] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x53 - bl pokemon_getattr + bl GetMonData b _081D0852 .pool _081D0848: @@ -46258,20 +46258,20 @@ sub_81D2C68: @ 81D2C68 _081D2C7E: movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r2, 0 adds r2, r3, 0 - bl pokemon_getattr + bl GetMonData b _081D2CCA .pool _081D2C94: movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r2, 0 - bl pokemon_getattr + bl GetMonData b _081D2CCA .pool _081D2CA8: @@ -46356,11 +46356,11 @@ _081D2D20: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r8, r0 @@ -47860,27 +47860,27 @@ sub_81D388C: @ 81D388C adds r4, r0, 0 adds r5, r1, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData strh r0, [r5] adds r0, r4, 0 movs r1, 0x3B - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0x2] adds r0, r4, 0 movs r1, 0x3C - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0x4] adds r0, r4, 0 movs r1, 0x3D - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0x6] adds r0, r4, 0 movs r1, 0x3E - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0x8] adds r0, r4, 0 movs r1, 0x3F - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0xA] pop {r4,r5} pop {r0} @@ -52990,7 +52990,7 @@ _081D6316: movs r0, 0x64 adds r4, r5, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 mov r1, r8 lsls r0, r1, 4 @@ -53133,7 +53133,7 @@ sub_81D642C: @ 81D642C adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 ldr r5, =gExperienceTables @@ -60048,7 +60048,7 @@ _081D9E24: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x32 b _081D9EB4 @@ -60059,7 +60059,7 @@ _081D9E44: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x33 b _081D9EB4 @@ -60070,7 +60070,7 @@ _081D9E64: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x34 b _081D9EB4 @@ -60081,7 +60081,7 @@ _081D9E84: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x35 b _081D9EB4 @@ -60092,11 +60092,11 @@ _081D9EA4: ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x36 _081D9EB4: - bl pokemon_getattr + bl GetMonData strb r0, [r4] ldr r5, =gUnknown_02039E00 ldr r4, =gUnknown_02039F25 diff --git a/asm/roulette.s b/asm/roulette.s index 42968f49f..d5612e99c 100644 --- a/asm/roulette.s +++ b/asm/roulette.s @@ -353,10 +353,10 @@ _0814054E: _0814056C: movs r0, 0x64 muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 movs r0, 0x98 lsls r0, 1 diff --git a/asm/scrcmd.s b/asm/scrcmd.s index 544ed3684..d172d51a4 100644 --- a/asm/scrcmd.s +++ b/asm/scrcmd.s @@ -3846,11 +3846,11 @@ s7E_load_first_pokenames: @ 809AFFC lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xB muls r1, r0 ldr r0, =gSpeciesNames @@ -3879,7 +3879,7 @@ s7F_load_pokename_team: @ 809B048 lsrs r0, 16 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gUnknown_085102D4 lsls r4, 2 @@ -3887,7 +3887,7 @@ s7F_load_pokename_team: @ 809B048 ldr r4, [r4] movs r1, 0x2 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 bl StringGetEnd10 movs r0, 0 @@ -4312,7 +4312,7 @@ sub_809B3DC: @ 809B3DC _0809B3F4: adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0809B424 adds r0, r4, 0 @@ -4338,12 +4338,12 @@ _0809B42A: movs r0, 0x64 adds r1, r6, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 cmp r5, 0 @@ -5436,7 +5436,7 @@ sCD_set_obedient_bit: @ 809BC44 lsrs r0, 16 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x50 mov r2, sp @@ -5460,11 +5460,11 @@ sCE_check_obedient_bit: @ 809BC7C ldr r4, =gUnknown_020375F0 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x50 movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r4] movs r0, 0 pop {r4} @@ -5584,7 +5584,7 @@ sub_809BD70: @ 809BD70 bhi _0809BDA6 movs r0, 0x64 muls r0, r3 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x23 mov r2, sp diff --git a/asm/script_pokemon_util_80F87D8.s b/asm/script_pokemon_util_80F87D8.s index e874e9b88..7348d6f05 100644 --- a/asm/script_pokemon_util_80F87D8.s +++ b/asm/script_pokemon_util_80F87D8.s @@ -584,10 +584,10 @@ sub_80F8C7C: @ 80F8C7C ldrb r0, [r6] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x46 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 mov r1, sp @@ -1188,7 +1188,7 @@ sp000_heal_pokemon: @ 80F9180 ldrb r0, [r0] cmp r8, r0 bcs _080F922C - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty mov r10, r1 mov r6, sp _080F919E: @@ -1198,7 +1198,7 @@ _080F919E: add r4, r10 adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData lsls r1, r0, 16 strb r0, [r6] lsrs r1, 24 @@ -1209,7 +1209,7 @@ _080F919E: bl pokemon_setattr adds r0, r4, 0 movs r1, 0x15 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r7, r0, 24 movs r5, 0 @@ -1220,7 +1220,7 @@ _080F91D4: adds r1, r5, 0 adds r1, 0xD adds r0, r4, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 adds r1, r7, 0 @@ -1396,11 +1396,11 @@ _080F932C: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, 0 @@ -1409,7 +1409,7 @@ _080F932C: beq _080F9360 adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData cmp r0, r6 bne _080F9360 movs r0, 0x1 @@ -1465,7 +1465,7 @@ sub_80F93A0: @ 80F93A0 lsls r7, r2, 16 lsrs r6, r7, 16 bl zero_enemy_party_data - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty mov r8, r0 movs r0, 0 str r0, [sp] @@ -1517,7 +1517,7 @@ sub_80F9400: @ 80F9400 _080F941C: movs r0, 0x64 muls r0, r3 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 adds r1, r4, 0 bl sub_80691F4 @@ -1618,7 +1618,7 @@ sub_80F94E8: @ 80F94E8 bl CpuSet movs r5, 0 movs r7, 0x64 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty mov r4, sp _080F9502: ldr r0, =gUnknown_0203CEF8 @@ -1641,7 +1641,7 @@ _080F951C: add r0, sp, 0x194 movs r1, 0 str r1, [r0] - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty ldr r2, =0x05000096 adds r1, r4, 0 bl CpuSet diff --git a/asm/secret_base.s b/asm/secret_base.s index 886dd333b..bfa6e8892 100644 --- a/asm/secret_base.s +++ b/asm/secret_base.s @@ -1681,37 +1681,37 @@ sub_80E98AC: @ 80E98AC push {r4,r5,lr} adds r5, r0, 0 movs r1, 0x1A - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x1B - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x1C - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x1D - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x1E - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0x1F - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 16 lsrs r4, 16 @@ -1768,7 +1768,7 @@ _080E995C: movs r4, 0 lsls r5, r6, 2 lsls r3, r6, 1 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty mov r8, r0 adds r1, r6, 0x1 str r1, [sp, 0x4] @@ -1810,12 +1810,12 @@ _080E996E: adds r4, r5, r3 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080E9A54 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080E9A54 movs r4, 0 @@ -1826,13 +1826,13 @@ _080E996E: lsls r7, r0, 1 adds r0, 0x1 str r0, [sp, 0x8] - ldr r2, =gUnknown_020244EC + ldr r2, =gPlayerParty _080E99DA: adds r1, r4, 0 adds r1, 0xD adds r0, r5, r2 str r2, [sp, 0x20] - bl pokemon_getattr + bl GetMonData mov r3, r8 adds r1, r3, r4 lsls r1, 1 @@ -1848,29 +1848,29 @@ _080E99DA: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData ldr r2, [sp, 0xC] adds r1, r2, r7 strh r0, [r1] adds r0, r4, 0 movs r1, 0xC - bl pokemon_getattr + bl GetMonData ldr r3, [sp, 0x10] adds r1, r3, r7 strh r0, [r1] adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r1, [sp, 0x18] add r1, r10 strb r0, [r1] adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData ldr r1, [sp] add r1, r8 str r0, [r1] diff --git a/asm/trade.s b/asm/trade.s index dd0aa2319..eced98662 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -380,7 +380,7 @@ _080774A4: _080774B2: movs r0, 0x64 muls r0, r6 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 str r4, [sp] str r4, [sp, 0x4] @@ -616,17 +616,17 @@ _080776E2: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData ldrb r2, [r7] lsls r2, 19 movs r1, 0xE0 @@ -673,18 +673,18 @@ _08077756: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData ldrb r2, [r7] lsls r2, 19 movs r3, 0xE0 @@ -1233,18 +1233,18 @@ _08077CA8: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData ldrb r2, [r7] lsls r2, 19 movs r1, 0xE0 @@ -1291,18 +1291,18 @@ _08077D1E: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x41 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData ldrb r2, [r7] lsls r2, 19 movs r3, 0xE0 @@ -2143,7 +2143,7 @@ _08078484: .4byte _08078720 _080784DC: ldr r0, =gUnknown_020228C4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty movs r2, 0xC8 bl sub_8078438 ldr r3, =gUnknown_0203229C @@ -2193,7 +2193,7 @@ _08078548: beq _08078552 b _080787AA _08078552: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty movs r2, 0x1 adds r1, r5, 0 eors r1, r2 @@ -2369,13 +2369,13 @@ _080786F0: b _080787A2 .pool _08078720: - ldr r4, =gUnknown_02024744 + ldr r4, =gEnemyParty ldr r6, =0x0000012f movs r5, 0x5 _08078726: adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 cmp r0, 0 @@ -2384,13 +2384,13 @@ _08078726: bne _08078766 adds r0, r4, 0 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 beq _08078766 adds r0, r4, 0 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData mov r0, sp ldr r1, =gUnknown_0832DF94 bl StringCompareWithoutExtCtrlCodes @@ -3381,7 +3381,7 @@ _08078F7E: b _08079028 .pool _08078F9C: - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty ldr r1, =gUnknown_020244E9 ldrb r1, [r1] ldr r2, =gUnknown_0203229C @@ -3488,7 +3488,7 @@ sub_807905C: @ 807905C ldrb r2, [r3] cmp r2, 0x5 bhi _080790A4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty ldrb r2, [r3] adds r0, 0x36 ldrb r3, [r0] @@ -3502,7 +3502,7 @@ sub_807905C: @ 807905C b _080790C0 .pool _080790A4: - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty subs r2, 0x6 lsls r2, 24 lsrs r2, 24 @@ -3536,7 +3536,7 @@ sub_80790D4: @ 80790D4 lsrs r6, r3, 24 movs r5, 0 movs r3, 0 - ldr r7, =gUnknown_02024744 + ldr r7, =gEnemyParty cmp r5, r1 bge _08079102 _080790EE: @@ -3562,7 +3562,7 @@ _08079102: adds r7, r0, r7 adds r0, r7, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r4, r0, 16 movs r0, 0xCD @@ -3574,7 +3574,7 @@ _08079102: _0807912C: adds r0, r7, 0 movs r1, 0x50 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _08079158 _08079138: @@ -4675,21 +4675,21 @@ sub_8079A3C: @ 8079A3C bne _08079A64 movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData b _08079A74 .pool _08079A64: movs r0, 0x64 muls r0, r2 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData _08079A74: adds r0, r4, 0 mov r1, sp @@ -4739,9 +4739,9 @@ sub_8079AA4: @ 8079AA4 movs r0, 0x64 adds r5, r2, 0 muls r5, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty mov r9, r0 - ldr r2, =gUnknown_02024744 + ldr r2, =gEnemyParty mov r8, r2 _08079ADE: cmp r7, 0 @@ -4758,7 +4758,7 @@ _08079AF8: _08079AFE: adds r0, r5, r2 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r1, r4, 1 add r1, sp strh r0, [r1] @@ -4865,10 +4865,10 @@ sub_8079BE0: @ 8079BE0 sub sp, 0x34 lsls r0, 24 lsrs r6, r0, 24 - ldr r7, =gUnknown_02024744 + ldr r7, =gEnemyParty cmp r6, 0 bne _08079BF0 - ldr r7, =gUnknown_020244EC + ldr r7, =gPlayerParty _08079BF0: movs r4, 0 ldr r0, =gUnknown_0203229C @@ -4885,7 +4885,7 @@ _08079C02: adds r0, r7, r0 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData adds r0, r5, 0 mov r1, sp bl StringCopy10 @@ -4954,18 +4954,18 @@ sub_8079C4C: @ 8079C4C bne _08079CB0 movs r0, 0x64 muls r0, r7 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty b _08079CB6 .pool _08079CB0: movs r0, 0x64 muls r0, r7 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty _08079CB6: adds r0, r1 movs r1, 0x38 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r6, r0, 24 ldr r4, =gUnknown_0203229C @@ -5075,7 +5075,7 @@ _08079D94: movs r0, 0x64 adds r4, r7, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 bl pokemon_get_gender @@ -5084,14 +5084,14 @@ _08079D94: adds r0, r4, 0 movs r1, 0x2 add r2, sp, 0xC - bl pokemon_getattr + bl GetMonData b _08079DDE .pool _08079DC0: movs r0, 0x64 adds r4, r7, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 bl pokemon_get_gender @@ -5100,7 +5100,7 @@ _08079DC0: adds r0, r4, 0 movs r1, 0x2 add r2, sp, 0xC - bl pokemon_getattr + bl GetMonData _08079DDE: cmp r5, 0 beq _08079DF0 @@ -5780,11 +5780,11 @@ _0807A34E: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 cmp r1, 0x1 bne _0807A380 @@ -5801,7 +5801,7 @@ _0807A34E: _0807A380: adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 cmp r1, 0 bne _0807A39E @@ -5852,11 +5852,11 @@ _0807A3E2: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 cmp r1, 0x1 bne _0807A414 @@ -5873,7 +5873,7 @@ _0807A3E2: _0807A414: adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 cmp r1, 0 bne _0807A432 @@ -5939,16 +5939,16 @@ _0807A488: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r0 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r0, r5, 16 asrs r0, 16 @@ -5982,16 +5982,16 @@ _0807A4E8: movs r0, 0x64 adds r4, r6, 0 muls r4, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r4, r0 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 adds r0, r4, 0 movs r1, 0x3A - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 lsls r0, r5, 16 asrs r0, 16 @@ -6132,11 +6132,11 @@ _0807A60C: add r4, r8 adds r0, r4, 0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData str r0, [r6, 0x18] adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData stm r6!, {r0} adds r5, 0x1 cmp r5, r7 @@ -6219,7 +6219,7 @@ _0807A6BE: adds r0, r1, 0 add r0, r8 movs r1, 0x50 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0807A6D6 _0807A6D2: @@ -6567,7 +6567,7 @@ _0807A934: muls r0, r5 adds r0, r6, r0 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData str r0, [r4] movs r1, 0xCE lsls r1, 1 @@ -7087,7 +7087,7 @@ sub_807ACFC: @ 807ACFC ldrb r1, [r0] movs r0, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r1, r0 mov r8, r1 movs r4, 0x1 @@ -7102,7 +7102,7 @@ _0807AD22: lsrs r0, 24 movs r1, 0x64 muls r1, r0 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r1, r0 mov r8, r1 movs r4, 0x3 @@ -7116,12 +7116,12 @@ _0807AD40: _0807AD58: mov r0, r8 movs r1, 0x41 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r5, r0, 16 mov r0, r8 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r7, r0, 0 cmp r6, 0 bne _0807AD94 @@ -7705,11 +7705,11 @@ _0807B2D0: ldr r1, [r0] adds r0, r4, 0 bl StringCopy - ldr r5, =gUnknown_02024744 + ldr r5, =gEnemyParty adds r0, r5, 0 movs r1, 0x7 mov r2, sp - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 adds r0, 0x1C mov r1, sp @@ -7721,7 +7721,7 @@ _0807B2D0: strh r0, [r4, 0x1A] adds r0, r5, 0 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x36] ldr r4, =gUnknown_020322A0 movs r5, 0x80 @@ -7859,24 +7859,24 @@ sub_807B464: @ 807B464 lsrs r0, 24 movs r1, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0807B4B8 adds r0, r5, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 adds r0, r4, 0 bl SpeciesToNationalPokedexNum @@ -7921,20 +7921,20 @@ sub_807B4D0: @ 807B4D0 movs r5, 0x64 mov r1, r9 muls r1, r5 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r7, r1, r0 adds r0, r7, 0 movs r1, 0x40 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r6, r0, 16 adds r1, r4, 0 muls r1, r5 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty adds r5, r1, r0 adds r0, r5, 0 movs r1, 0x40 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 mov r8, r0 @@ -7968,7 +7968,7 @@ _0807B52A: strb r1, [r0] adds r0, r7, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0807B566 adds r0, r7, 0 @@ -8543,21 +8543,21 @@ sub_807BAD8: @ 807BAD8 lsrs r0, 24 movs r4, 0x64 muls r0, r4 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData ldr r0, =gStringVar3 mov r1, sp bl StringCopy10 ldrb r0, [r5] muls r0, r4 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData ldr r0, =gStringVar2 mov r1, sp bl StringCopy10 @@ -8582,11 +8582,11 @@ _0807BB68: ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData ldr r0, =gStringVar2 mov r1, sp bl StringCopy10 @@ -10597,7 +10597,7 @@ _0807CEDC: ldrb r0, [r7] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0x1 movs r2, 0 @@ -12702,7 +12702,7 @@ _0807E328: ldrb r0, [r7] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0x1 movs r2, 0 @@ -12818,7 +12818,7 @@ _0807E444: ldrb r0, [r7] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0x1 movs r2, 0 @@ -13218,11 +13218,11 @@ sub_807E784: @ 807E784 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x2 mov r2, sp - bl pokemon_getattr + bl GetMonData ldr r0, =gStringVar1 mov r1, sp bl StringCopy10 @@ -13255,17 +13255,17 @@ sub_807E7E8: @ 807E7E8 adds r5, r2, r1 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData adds r2, r0, 0 lsls r2, 24 lsrs r2, 24 add r4, sp, 0x34 movs r0, 0xFE strb r0, [r4] - ldr r6, =gUnknown_02024744 + ldr r6, =gEnemyParty ldrh r1, [r5, 0xC] movs r3, 0x1 str r3, [sp] @@ -13400,7 +13400,7 @@ _0807E954: movs r1, 0xC bl pokemon_setattr _0807E960: - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty bl pokemon_calc_effective_stats add sp, 0x38 pop {r4-r7} @@ -13466,17 +13466,17 @@ sub_807E9D4: @ 807E9D4 ldrh r0, [r6] movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _0807EA08 ldrh r0, [r6] muls r0, r5 adds r0, r4 movs r1, 0xB - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r0, 16 b _0807EA0A @@ -14221,11 +14221,11 @@ _0807F152: lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty adds r0, r1 adds r1, r4, 0 adds r1, 0x43 - bl pokemon_getattr + bl GetMonData adds r0, r5, r0 lsls r0, 24 lsrs r5, r0, 24 diff --git a/asm/tv.s b/asm/tv.s index 2d7adaeec..d738f8ca5 100644 --- a/asm/tv.s +++ b/asm/tv.s @@ -1414,11 +1414,11 @@ sub_80ECA38: @ 80ECA38 ldrb r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x12] ldrh r0, [r6, 0x2] strh r0, [r4, 0x2] @@ -2137,11 +2137,11 @@ sub_80ED090: @ 80ED090 ldrb r0, [r0] movs r6, 0x64 muls r0, r6 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x2] mov r1, r8 ldrb r0, [r1] @@ -2151,7 +2151,7 @@ sub_80ED090: @ 80ED090 adds r4, r1 movs r1, 0x2 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 bl StripExtCtrlCodes mov r1, r8 @@ -2159,7 +2159,7 @@ sub_80ED090: @ 80ED090 muls r0, r6 adds r0, r5 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData strb r0, [r7, 0x1F] _080ED134: pop {r3} @@ -2370,12 +2370,12 @@ sub_80ED320: @ 80ED320 ldrh r0, [r0] movs r7, 0x64 muls r0, r7 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty adds r0, r6 ldr r4, =gStringVar1 movs r1, 0x2 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData ldr r1, =gSaveBlock2Ptr mov r9, r1 ldr r0, [r1] @@ -2411,7 +2411,7 @@ sub_80ED320: @ 80ED320 adds r0, r6 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x2] bl Random lsls r0, 16 @@ -2439,7 +2439,7 @@ sub_80ED320: @ 80ED320 adds r5, r4, 0x4 movs r1, 0x2 adds r2, r5, 0 - bl pokemon_getattr + bl GetMonData adds r0, r5, 0 bl StripExtCtrlCodes adds r0, r4, 0 @@ -2452,7 +2452,7 @@ sub_80ED320: @ 80ED320 muls r0, r7 adds r0, r6 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData strb r0, [r4, 0x1F] _080ED400: pop {r3,r4} @@ -2614,11 +2614,11 @@ sub_80ED548: @ 80ED548 lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r4, 0x2] adds r0, r4, 0 bl sub_80ECA10 @@ -2694,11 +2694,11 @@ sub_80ED610: @ 80ED610 lsrs r0, 24 movs r7, 0x64 muls r0, r7 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty adds r0, r6 movs r1, 0x20 movs r2, 0 - bl pokemon_getattr + bl GetMonData lsrs r0, 4 movs r1, 0xF ands r0, r1 @@ -2728,7 +2728,7 @@ sub_80ED610: @ 80ED610 adds r4, 0x10 movs r1, 0x2 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 bl StripExtCtrlCodes bl sub_8139688 @@ -2738,7 +2738,7 @@ sub_80ED610: @ 80ED610 adds r0, r6 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r5, 0x2] adds r0, r5, 0 bl sub_80ECA10 @@ -2753,7 +2753,7 @@ sub_80ED610: @ 80ED610 muls r0, r7 adds r0, r6 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 bne _080ED6F4 _080ED6D4: @@ -2767,7 +2767,7 @@ _080ED6F4: muls r0, r7 adds r0, r6 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData _080ED706: strb r0, [r5, 0xE] pop {r3} @@ -3810,21 +3810,21 @@ _080EDFCA: movs r0, 0x64 adds r1, r7, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080EE094 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080EE094 adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData ldr r2, =gUnknown_030060E0 mov r3, r9 lsls r1, r3, 3 @@ -3832,12 +3832,12 @@ _080EDFCA: strb r0, [r6] adds r0, r4, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData strh r0, [r6, 0x2] movs r5, 0 adds r0, r4, 0 movs r1, 0xD - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0 @@ -3848,7 +3848,7 @@ _080EDFCA: _080EE020: adds r0, r4, 0 movs r1, 0xE - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0 @@ -3862,7 +3862,7 @@ _080EE020: _080EE03C: adds r0, r4, 0 movs r1, 0xF - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0 @@ -3876,7 +3876,7 @@ _080EE03C: _080EE058: adds r0, r4, 0 movs r1, 0x10 - bl pokemon_getattr + bl GetMonData lsls r0, 16 lsrs r1, r0, 16 cmp r1, 0 @@ -4450,7 +4450,7 @@ sub_80EE4DC: @ 80EE4DC adds r0, r6, 0 movs r1, 0x2 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 bl StripExtCtrlCodes adds r0, r6, 0 @@ -4468,7 +4468,7 @@ sub_80EE4DC: @ 80EE4DC beq _080EE578 adds r0, r6, 0 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData cmp r0, 0x1 bne _080EE590 _080EE578: @@ -4478,7 +4478,7 @@ _080EE578: _080EE590: adds r0, r6, 0 movs r1, 0x3 - bl pokemon_getattr + bl GetMonData _080EE598: strb r0, [r5, 0x10] _080EE59A: @@ -4494,103 +4494,103 @@ sub_80EE5A4: @ 80EE5A4 push {r4,r5,lr} adds r5, r0, 0 movs r1, 0x32 - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x33 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x34 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x35 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x36 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x43 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x44 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x45 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x46 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x47 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x48 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x49 - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x4A - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x4B - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x4C - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x4D - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 adds r0, r5, 0 movs r1, 0x4E - bl pokemon_getattr + bl GetMonData adds r4, r0 lsls r4, 24 lsrs r4, 24 @@ -4949,60 +4949,60 @@ _080EE944: .4byte _080EE978 .4byte _080EE978 _080EE978: - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x4] adds r0, r4, 0 adds r0, 0x64 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x6] adds r4, 0xC8 adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x8] b _080EEA46 .pool _080EE9A8: - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x4] adds r0, r4, 0 adds r0, 0x64 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x6] adds r0, r4, 0 adds r0, 0xC8 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x8] movs r1, 0x96 lsls r1, 1 adds r0, r4, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0xA] b _080EEA46 .pool _080EE9E8: - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x4] adds r4, 0x64 adds r0, r4, 0 @@ -5026,7 +5026,7 @@ _080EEA00: adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x4] ldr r0, [r6] ldr r2, =0x00000cac @@ -5041,7 +5041,7 @@ _080EEA00: _080EEA3C: movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData strh r0, [r7, 0x6] _080EEA46: adds r0, r7, 0 @@ -6500,11 +6500,11 @@ sub_80EF64C: @ 80EF64C lsrs r0, 24 movs r1, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xB muls r1, r0 ldr r0, =gSpeciesNames @@ -6574,11 +6574,11 @@ sub_80EF704: @ 80EF704 lsrs r0, 24 movs r5, 0x64 muls r0, r5 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xB muls r1, r0 ldr r0, =gSpeciesNames @@ -6593,7 +6593,7 @@ sub_80EF704: @ 80EF704 ldr r4, =gStringVar2 movs r1, 0x2 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 bl StringGetEnd10 ldr r2, =gSaveBlock1Ptr @@ -6744,18 +6744,18 @@ sub_80EF88C: @ 80EF88C lsrs r0, 24 movs r1, 0x64 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r5, r1, r0 ldr r6, =gStringVar1 adds r0, r5, 0 movs r1, 0x2 adds r2, r6, 0 - bl pokemon_getattr + bl GetMonData mov r4, sp adds r0, r5, 0 movs r1, 0x3 mov r2, sp - bl pokemon_getattr + bl GetMonData strb r0, [r4] lsls r0, 24 lsrs r0, 24 @@ -6764,7 +6764,7 @@ sub_80EF88C: @ 80EF88C adds r0, r5, 0 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData movs r1, 0xB muls r0, r1 ldr r1, =gSpeciesNames @@ -7437,12 +7437,12 @@ sub_80EFD98: @ 80EFD98 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r4, =gStringVar1 movs r1, 0x2 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData ldr r0, =gStringVar3 adds r1, r4, 0 bl StringCompare @@ -7476,11 +7476,11 @@ sub_80EFDDC: @ 80EFDDC mov r1, r8 muls r1, r0 adds r0, r1, 0 - ldr r6, =gUnknown_020244EC + ldr r6, =gPlayerParty adds r0, r6 ldr r2, =gStringVar3 movs r1, 0x2 - bl pokemon_getattr + bl GetMonData mov r1, r9 ldrh r0, [r1] mov r1, r8 @@ -7491,7 +7491,7 @@ sub_80EFDDC: @ 80EFDDC mov r10, r1 movs r1, 0x2 mov r2, r10 - bl pokemon_getattr + bl GetMonData mov r1, r9 ldrh r0, [r1] mov r1, r8 @@ -7500,7 +7500,7 @@ sub_80EFDDC: @ 80EFDDC adds r0, r6 movs r1, 0xB movs r2, 0 - bl pokemon_getattr + bl GetMonData adds r5, r0, 0 lsls r5, 16 lsrs r5, 16 @@ -7522,7 +7522,7 @@ sub_80EFDDC: @ 80EFDDC adds r0, r6 movs r1, 0 movs r2, 0 - bl pokemon_getattr + bl GetMonData str r0, [sp] ldr r0, =c2_080CC144 str r0, [sp, 0x4] @@ -7549,7 +7549,7 @@ c2_080CC144: @ 80EFE98 ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r2, =gStringVar2 movs r1, 0x2 @@ -7636,12 +7636,12 @@ sub_80EFF6C: @ 80EFF6C ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 ldr r4, =gStringVar1 movs r1, 0x2 adds r2, r4, 0 - bl pokemon_getattr + bl GetMonData adds r0, r4, 0 bl StringGetEnd10 pop {r4} @@ -7659,11 +7659,11 @@ sub_80EFF9C: @ 80EFF9C ldrh r1, [r0] movs r0, 0x64 muls r0, r1 - ldr r1, =gUnknown_020244EC + ldr r1, =gPlayerParty adds r0, r1 movs r1, 0x1 movs r2, 0 - bl pokemon_getattr + bl GetMonData cmp r4, r0 bne _080EFFD0 ldr r1, =gUnknown_020375F0 diff --git a/asm/wild_encounter.s b/asm/wild_encounter.s index e246350da..22c832755 100644 --- a/asm/wild_encounter.s +++ b/asm/wild_encounter.s @@ -546,10 +546,10 @@ _080B4C8A: bl __modsi3 lsls r0, 24 lsrs r4, r0, 24 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080B4CEA adds r0, r5, 0 @@ -732,10 +732,10 @@ _080B4DF2: cmp r5, 0x18 bls _080B4DF2 _080B4E0E: - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080B4E4C adds r0, r4, 0 @@ -753,7 +753,7 @@ _080B4E0E: bne _080B4E4C adds r0, r4, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData b _080B4E54 .pool _080B4E48: @@ -804,10 +804,10 @@ _080B4E96: _080B4E98: cmp r2, 0 beq _080B4F28 - ldr r5, =gUnknown_020244EC + ldr r5, =gPlayerParty adds r0, r5, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080B4F28 adds r0, r5, 0 @@ -826,13 +826,13 @@ _080B4E98: beq _080B4F28 adds r0, r5, 0 movs r1, 0xB - bl pokemon_getattr + bl GetMonData adds r4, r0, 0 lsls r4, 16 lsrs r4, 16 adds r0, r5, 0 movs r1, 0 - bl pokemon_getattr + bl GetMonData adds r1, r0, 0 adds r0, r4, 0 bl pokemon_species_get_gender_info @@ -849,7 +849,7 @@ _080B4F02: bl sub_80B4D78 lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty str r4, [sp] str r0, [sp, 0x4] movs r0, 0 @@ -865,7 +865,7 @@ _080B4F28: bl sub_80B4D78 lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02024744 + ldr r1, =gEnemyParty str r0, [sp] adds r0, r1, 0 adds r1, r6, 0 @@ -1062,7 +1062,7 @@ _080B50A2: ldrh r1, [r0] lsls r2, r4, 24 lsrs r2, 24 - ldr r0, =gUnknown_02024744 + ldr r0, =gEnemyParty bl sub_80691F4 adds r0, r4, 0x1 lsls r0, 16 @@ -1179,10 +1179,10 @@ _080B519A: bl ApplyCleanseTagWildEncounterRateReduction cmp r4, 0 bne _080B5216 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080B5216 adds r0, r4, 0 @@ -2054,21 +2054,21 @@ _080B58E0: movs r0, 0x64 adds r1, r5, 0 muls r1, r0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty adds r4, r1, r0 adds r0, r4, 0 movs r1, 0x39 - bl pokemon_getattr + bl GetMonData cmp r0, 0 beq _080B5920 adds r0, r4, 0 movs r1, 0x2D - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080B5920 adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 cmp r6, r0 @@ -2097,10 +2097,10 @@ DoKeenEyeIntimidateWildEncounterTest: @ 80B5934 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080B5988 adds r0, r4, 0 @@ -2114,7 +2114,7 @@ DoKeenEyeIntimidateWildEncounterTest: @ 80B5934 _080B595A: adds r0, r4, 0 movs r1, 0x38 - bl pokemon_getattr + bl GetMonData lsls r0, 24 lsrs r0, 24 cmp r0, 0x5 @@ -2257,10 +2257,10 @@ TryGetAbilityInfluencedWildMonIndex: @ 80B5A50 lsrs r6, r1, 24 lsls r2, 24 lsrs r5, r2, 24 - ldr r4, =gUnknown_020244EC + ldr r4, =gPlayerParty adds r0, r4, 0 movs r1, 0x6 - bl pokemon_getattr + bl GetMonData cmp r0, 0 bne _080B5AA4 adds r0, r4, 0 @@ -2333,9 +2333,9 @@ _080B5AE4: ApplyCleanseTagWildEncounterRateReduction: @ 80B5AF0 push {r4,lr} adds r4, r0, 0 - ldr r0, =gUnknown_020244EC + ldr r0, =gPlayerParty movs r1, 0xC - bl pokemon_getattr + bl GetMonData cmp r0, 0xBE bne _080B5B0C ldr r0, [r4] diff --git a/include/abilities.h b/include/abilities.h new file mode 100644 index 000000000..4c47025f8 --- /dev/null +++ b/include/abilities.h @@ -0,0 +1,81 @@ +enum +{ + ABILITY_NONE, + ABILITY_STENCH, + ABILITY_DRIZZLE, + ABILITY_SPEED_BOOST, + ABILITY_BATTLE_ARMOR, + ABILITY_STURDY, + ABILITY_DAMP, + ABILITY_LIMBER, + ABILITY_SAND_VEIL, + ABILITY_STATIC, + ABILITY_VOLT_ABSORB, + ABILITY_WATER_ABSORB, + ABILITY_OBLIVIOUS, + ABILITY_CLOUD_NINE, + ABILITY_COMPOUND_EYES, + ABILITY_INSOMNIA, + ABILITY_COLOR_CHANGE, + ABILITY_IMMUNITY, + ABILITY_FLASH_FIRE, + ABILITY_SHIELD_DUST, + ABILITY_OWN_TEMPO, + ABILITY_SUCTION_CUPS, + ABILITY_INTIMIDATE, + ABILITY_SHADOW_TAG, + ABILITY_ROUGH_SKIN, + ABILITY_WONDER_GUARD, + ABILITY_LEVITATE, + ABILITY_EFFECT_SPORE, + ABILITY_SYNCHRONIZE, + ABILITY_CLEAR_BODY, + ABILITY_NATURAL_CURE, + ABILITY_LIGHTNING_ROD, + ABILITY_SERENE_GRACE, + ABILITY_SWIFT_SWIM, + ABILITY_CHLOROPHYLL, + ABILITY_ILLUMINATE, + ABILITY_TRACE, + ABILITY_HUGE_POWER, + ABILITY_POISON_POINT, + ABILITY_INNER_FOCUS, + ABILITY_MAGMA_ARMOR, + ABILITY_WATER_VEIL, + ABILITY_MAGNET_PULL, + ABILITY_SOUNDPROOF, + ABILITY_RAIN_DISH, + ABILITY_SAND_STREAM, + ABILITY_PRESSURE, + ABILITY_THICK_FAT, + ABILITY_EARLY_BIRD, + ABILITY_FLAME_BODY, + ABILITY_RUN_AWAY, + ABILITY_KEEN_EYE, + ABILITY_HYPER_CUTTER, + ABILITY_PICKUP, + ABILITY_TRUANT, + ABILITY_HUSTLE, + ABILITY_CUTE_CHARM, + ABILITY_PLUS, + ABILITY_MINUS, + ABILITY_FORECAST, + ABILITY_STICKY_HOLD, + ABILITY_SHED_SKIN, + ABILITY_GUTS, + ABILITY_MARVEL_SCALE, + ABILITY_LIQUID_OOZE, + ABILITY_OVERGROW, + ABILITY_BLAZE, + ABILITY_TORRENT, + ABILITY_SWARM, + ABILITY_ROCK_HEAD, + ABILITY_DROUGHT, + ABILITY_ARENA_TRAP, + ABILITY_VITAL_SPIRIT, + ABILITY_WHITE_SMOKE, + ABILITY_PURE_POWER, + ABILITY_SHELL_ARMOR, + ABILITY_CACOPHONY, + ABILITY_AIR_LOCK +}; \ No newline at end of file diff --git a/include/battle.h b/include/battle.h new file mode 100644 index 000000000..fa42a7b53 --- /dev/null +++ b/include/battle.h @@ -0,0 +1,24 @@ +#define BATTLE_TYPE_DOUBLE 0x0001 +#define BATTLE_TYPE_LINK 0x0002 +#define BATTLE_TYPE_WILD 0x0004 +#define BATTLE_TYPE_TRAINER 0x0008 +#define BATTLE_TYPE_FIRST_BATTLE 0x0010 +#define BATTLE_TYPE_20 0x0020 +#define BATTLE_TYPE_40 0x0040 +#define BATTLE_TYPE_SAFARI 0x0080 +#define BATTLE_TYPE_BATTLE_TOWER 0x0100 +#define BATTLE_TYPE_WALLY_TUTORIAL 0x0200 +#define BATTLE_TYPE_ROAMER 0x0400 +#define BATTLE_TYPE_EREADER_TRAINER 0x0800 +#define BATTLE_TYPE_KYOGRE_GROUDON 0x1000 +#define BATTLE_TYPE_LEGENDARY 0x2000 +#define BATTLE_TYPE_REGI 0x4000 + +#define AI_ACTION_UNK1 0x0001 +#define AI_ACTION_UNK2 0x0002 +#define AI_ACTION_UNK3 0x0004 +#define AI_ACTION_UNK4 0x0008 +#define AI_ACTION_UNK5 0x0010 +#define AI_ACTION_UNK6 0x0020 +#define AI_ACTION_UNK7 0x0040 +#define AI_ACTION_UNK8 0x0080 \ No newline at end of file diff --git a/include/pokemon.h b/include/pokemon.h new file mode 100644 index 000000000..b3381a4b0 --- /dev/null +++ b/include/pokemon.h @@ -0,0 +1,311 @@ +#define MON_DATA_PERSONALITY 0 +#define MON_DATA_OT_ID 1 +#define MON_DATA_NICKNAME 2 +#define MON_DATA_LANGUAGE 3 +#define MON_DATA_SANITY_BIT1 4 +#define MON_DATA_SANITY_BIT2 5 +#define MON_DATA_SANITY_BIT3 6 +#define MON_DATA_OT_NAME 7 +#define MON_DATA_MARKINGS 8 +#define MON_DATA_CHECKSUM 9 +#define MON_DATA_10 10 +#define MON_DATA_SPECIES 11 +#define MON_DATA_HELD_ITEM 12 +#define MON_DATA_MOVE1 13 +#define MON_DATA_MOVE2 14 +#define MON_DATA_MOVE3 15 +#define MON_DATA_MOVE4 16 +#define MON_DATA_PP1 17 +#define MON_DATA_PP2 18 +#define MON_DATA_PP3 19 +#define MON_DATA_PP4 20 +#define MON_DATA_PP_BONUSES 21 +#define MON_DATA_COOL 22 +#define MON_DATA_BEAUTY 23 +#define MON_DATA_CUTE 24 +#define MON_DATA_EXP 25 +#define MON_DATA_HP_EV 26 +#define MON_DATA_ATK_EV 27 +#define MON_DATA_DEF_EV 28 +#define MON_DATA_SPD_EV 29 +#define MON_DATA_SPATK_EV 30 +#define MON_DATA_SPDEF_EV 31 +#define MON_DATA_FRIENDSHIP 32 +#define MON_DATA_SMART 33 +#define MON_DATA_POKERUS 34 +#define MON_DATA_MET_LOCATION 35 +#define MON_DATA_MET_LEVEL 36 +#define MON_DATA_MET_GAME 37 +#define MON_DATA_POKEBALL 38 +#define MON_DATA_HP_IV 39 +#define MON_DATA_ATK_IV 40 +#define MON_DATA_DEF_IV 41 +#define MON_DATA_SPD_IV 42 +#define MON_DATA_SPATK_IV 43 +#define MON_DATA_SPDEF_IV 44 +#define MON_DATA_IS_EGG 45 +#define MON_DATA_ALT_ABILITY 46 +#define MON_DATA_TOUGH 47 +#define MON_DATA_SHEEN 48 +#define MON_DATA_OT_GENDER 49 +#define MON_DATA_COOL_RIBBON 50 +#define MON_DATA_BEAUTY_RIBBON 51 +#define MON_DATA_CUTE_RIBBON 52 +#define MON_DATA_SMART_RIBBON 53 +#define MON_DATA_TOUGH_RIBBON 54 +#define MON_DATA_STATUS 55 +#define MON_DATA_LEVEL 56 +#define MON_DATA_HP 57 +#define MON_DATA_MAX_HP 58 +#define MON_DATA_ATK 59 +#define MON_DATA_DEF 60 +#define MON_DATA_SPD 61 +#define MON_DATA_SPATK 62 +#define MON_DATA_SPDEF 63 +#define MON_DATA_64 64 +#define MON_DATA_SPECIES2 65 +#define MON_DATA_IVS 66 +#define MON_DATA_CHAMPION_RIBBON 67 +#define MON_DATA_WINNING_RIBBON 68 +#define MON_DATA_VICTORY_RIBBON 69 +#define MON_DATA_ARTIST_RIBBON 70 +#define MON_DATA_EFFORT_RIBBON 71 +#define MON_DATA_GIFT_RIBBON_1 72 +#define MON_DATA_GIFT_RIBBON_2 73 +#define MON_DATA_GIFT_RIBBON_3 74 +#define MON_DATA_GIFT_RIBBON_4 75 +#define MON_DATA_GIFT_RIBBON_5 76 +#define MON_DATA_GIFT_RIBBON_6 77 +#define MON_DATA_GIFT_RIBBON_7 78 +#define MON_DATA_FATEFUL_ENCOUNTER 79 +#define MON_DATA_KNOWN_MOVES 80 +#define MON_DATA_RIBBON_COUNT 81 +#define MON_DATA_RIBBONS 82 +#define MON_DATA_83 83 +#define MON_DATA_ATK2 84 +#define MON_DATA_DEF2 85 +#define MON_DATA_SPD2 86 +#define MON_DATA_SPATK2 87 +#define MON_DATA_SPDEF2 88 + +#define MON_MALE 0x00 +#define MON_FEMALE 0xFE +#define MON_GENDERLESS 0xFF + +#define TYPE_NORMAL 0x00 +#define TYPE_FIGHTING 0x01 +#define TYPE_FLYING 0x02 +#define TYPE_POISON 0x03 +#define TYPE_GROUND 0x04 +#define TYPE_ROCK 0x05 +#define TYPE_BUG 0x06 +#define TYPE_GHOST 0x07 +#define TYPE_STEEL 0x08 +#define TYPE_MYSTERY 0x09 +#define TYPE_FIRE 0x0a +#define TYPE_WATER 0x0b +#define TYPE_GRASS 0x0c +#define TYPE_ELECTRIC 0x0d +#define TYPE_PSYCHIC 0x0e +#define TYPE_ICE 0x0f +#define TYPE_DRAGON 0x10 +#define TYPE_DARK 0x11 + +enum { + NATURE_HARDY, + NATURE_LONELY, + NATURE_BRAVE, + NATURE_ADAMANT, + NATURE_NAUGHTY, + NATURE_BOLD, + NATURE_DOCILE, + NATURE_RELAXED, + NATURE_IMPISH, + NATURE_LAX, + NATURE_TIMID, + NATURE_HASTY, + NATURE_SERIOUS, + NATURE_JOLLY, + NATURE_NAIVE, + NATURE_MODEST, + NATURE_MILD, + NATURE_QUIET, + NATURE_BASHFUL, + NATURE_RASH, + NATURE_CALM, + NATURE_GENTLE, + NATURE_SASSY, + NATURE_CAREFUL, + NATURE_QUIRKY, +}; + +struct PokemonSubstruct0 +{ + u16 species; + u16 heldItem; + u32 experience; + u8 ppBonuses; + u8 friendship; +}; + +struct PokemonSubstruct1 +{ + u16 moves[4]; + u8 pp[4]; +}; + +struct PokemonSubstruct2 +{ + u8 hpEV; + u8 attackEV; + u8 defenseEV; + u8 speedEV; + u8 spAttackEV; + u8 spDefenseEV; + u8 cool; + u8 beauty; + u8 cute; + u8 smart; + u8 tough; + u8 sheen; +}; + +struct PokemonSubstruct3 +{ + /* 0x00 */ u8 pokerus; + /* 0x01 */ u8 metLocation; + + /* 0x02 */ u16 metLevel:7; + /* 0x02 */ u16 metGame:4; + /* 0x03 */ u16 pokeball:4; + /* 0x03 */ u16 otGender:1; + + /* 0x04 */ u32 hpIV:5; + /* 0x04 */ u32 attackIV:5; + /* 0x05 */ u32 defenseIV:5; + /* 0x05 */ u32 speedIV:5; + /* 0x05 */ u32 spAttackIV:5; + /* 0x06 */ u32 spDefenseIV:5; + /* 0x07 */ u32 isEgg:1; + /* 0x07 */ u32 altAbility:1; + + /* 0x08 */ u32 coolRibbon:3; + /* 0x08 */ u32 beautyRibbon:3; + /* 0x08 */ u32 cuteRibbon:3; + /* 0x09 */ u32 smartRibbon:3; + /* 0x09 */ u32 toughRibbon:3; + /* 0x09 */ u32 championRibbon:1; + /* 0x0A */ u32 winningRibbon:1; + /* 0x0A */ u32 victoryRibbon:1; + /* 0x0A */ u32 artistRibbon:1; + /* 0x0A */ u32 effortRibbon:1; + /* 0x0A */ u32 giftRibbon1:1; + /* 0x0A */ u32 giftRibbon2:1; + /* 0x0A */ u32 giftRibbon3:1; + /* 0x0A */ u32 giftRibbon4:1; + /* 0x0B */ u32 giftRibbon5:1; + /* 0x0B */ u32 giftRibbon6:1; + /* 0x0B */ u32 giftRibbon7:1; + /* 0x0B */ u32 fatefulEncounter:5; // unused in Ruby/Sapphire, but the high bit must be set for Mew/Deoxys to obey in FR/LG/Emerald +}; + +union PokemonSubstruct +{ + struct PokemonSubstruct0 type0; + struct PokemonSubstruct1 type1; + struct PokemonSubstruct2 type2; + struct PokemonSubstruct3 type3; + u16 raw[6]; +}; + +struct BoxPokemon +{ + u32 personality; + u32 otId; + u8 nickname[POKEMON_NAME_LENGTH]; + u8 language; + u8 isBadEgg:1; + u8 hasSpecies:1; + u8 isEgg:1; + u8 unused:5; + u8 otName[OT_NAME_LENGTH]; + u8 markings; + u16 checksum; + u16 unknown; + + union + { + u32 raw[12]; + union PokemonSubstruct substructs[4]; + } secure; +}; + +struct Pokemon +{ + struct BoxPokemon box; + u32 status; + u8 level; + u8 pokerus; + u16 hp; + u16 maxHP; + u16 attack; + u16 defense; + u16 speed; + u16 spAttack; + u16 spDefense; +}; + +extern struct Pokemon gPlayerParty[6]; +extern struct Pokemon gEnemyParty[6]; + +struct BaseStats +{ + /* 0x00 */ u8 baseHP; + /* 0x01 */ u8 baseAttack; + /* 0x02 */ u8 baseDefense; + /* 0x03 */ u8 baseSpeed; + /* 0x04 */ u8 baseSpAttack; + /* 0x05 */ u8 baseSpDefense; + /* 0x06 */ u8 type1; + /* 0x07 */ u8 type2; + /* 0x08 */ u8 catchRate; + /* 0x09 */ u8 expYield; + /* 0x0A */ u16 evYield_HP:2; + /* 0x0A */ u16 evYield_Attack:2; + /* 0x0A */ u16 evYield_Defense:2; + /* 0x0A */ u16 evYield_Speed:2; + /* 0x0B */ u16 evYield_SpAttack:2; + /* 0x0B */ u16 evYield_SpDefense:2; + /* 0x0C */ u16 item1; + /* 0x0E */ u16 item2; + /* 0x10 */ u8 genderRatio; + /* 0x11 */ u8 eggCycles; + /* 0x12 */ u8 friendship; + /* 0x13 */ u8 growthRate; + /* 0x14 */ u8 eggGroup1; + /* 0x15 */ u8 eggGroup2; + /* 0x16 */ u8 ability1; + /* 0x17 */ u8 ability2; + /* 0x18 */ u8 safariZoneFleeRate; + /* 0x19 */ u8 bodyColor; +}; + +struct BattleMove +{ + u8 effect; + u8 power; + u8 type; + u8 accuracy; + u8 pp; + u8 secondaryEffectChance; + u8 target; + u8 priority; + u32 flags; +}; + +// These are full type signatures for GetMonData() and GetBoxMonData(), +// but they are not used since some code erroneously omits the third arg. +// u32 GetMonData(struct Pokemon *mon, s32 field, u8 *data); +u32 GetMonData(); + +u8 pokemon_species_get_gender_info(u16 species, u32 personality); \ No newline at end of file diff --git a/include/species.h b/include/species.h new file mode 100644 index 000000000..5cce48ad6 --- /dev/null +++ b/include/species.h @@ -0,0 +1,445 @@ +enum { + SPECIES_NONE, // 0x000 + SPECIES_BULBASAUR, // 0x001 + SPECIES_IVYSAUR, // 0x002 + SPECIES_VENUSAUR, // 0x003 + SPECIES_CHARMANDER, // 0x004 + SPECIES_CHARMELEON, // 0x005 + SPECIES_CHARIZARD, // 0x006 + SPECIES_SQUIRTLE, // 0x007 + SPECIES_WARTORTLE, // 0x008 + SPECIES_BLASTOISE, // 0x009 + SPECIES_CATERPIE, // 0x00a + SPECIES_METAPOD, // 0x00b + SPECIES_BUTTERFREE, // 0x00c + SPECIES_WEEDLE, // 0x00d + SPECIES_KAKUNA, // 0x00e + SPECIES_BEEDRILL, // 0x00f + SPECIES_PIDGEY, // 0x010 + SPECIES_PIDGEOTTO, // 0x011 + SPECIES_PIDGEOT, // 0x012 + SPECIES_RATTATA, // 0x013 + SPECIES_RATICATE, // 0x014 + SPECIES_SPEAROW, // 0x015 + SPECIES_FEAROW, // 0x016 + SPECIES_EKANS, // 0x017 + SPECIES_ARBOK, // 0x018 + SPECIES_PIKACHU, // 0x019 + SPECIES_RAICHU, // 0x01a + SPECIES_SANDSHREW, // 0x01b + SPECIES_SANDSLASH, // 0x01c + SPECIES_NIDORAN_F, // 0x01d + SPECIES_NIDORINA, // 0x01e + SPECIES_NIDOQUEEN, // 0x01f + SPECIES_NIDORAN_M, // 0x020 + SPECIES_NIDORINO, // 0x021 + SPECIES_NIDOKING, // 0x022 + SPECIES_CLEFAIRY, // 0x023 + SPECIES_CLEFABLE, // 0x024 + SPECIES_VULPIX, // 0x025 + SPECIES_NINETALES, // 0x026 + SPECIES_JIGGLYPUFF, // 0x027 + SPECIES_WIGGLYTUFF, // 0x028 + SPECIES_ZUBAT, // 0x029 + SPECIES_GOLBAT, // 0x02a + SPECIES_ODDISH, // 0x02b + SPECIES_GLOOM, // 0x02c + SPECIES_VILEPLUME, // 0x02d + SPECIES_PARAS, // 0x02e + SPECIES_PARASECT, // 0x02f + SPECIES_VENONAT, // 0x030 + SPECIES_VENOMOTH, // 0x031 + SPECIES_DIGLETT, // 0x032 + SPECIES_DUGTRIO, // 0x033 + SPECIES_MEOWTH, // 0x034 + SPECIES_PERSIAN, // 0x035 + SPECIES_PSYDUCK, // 0x036 + SPECIES_GOLDUCK, // 0x037 + SPECIES_MANKEY, // 0x038 + SPECIES_PRIMEAPE, // 0x039 + SPECIES_GROWLITHE, // 0x03a + SPECIES_ARCANINE, // 0x03b + SPECIES_POLIWAG, // 0x03c + SPECIES_POLIWHIRL, // 0x03d + SPECIES_POLIWRATH, // 0x03e + SPECIES_ABRA, // 0x03f + SPECIES_KADABRA, // 0x040 + SPECIES_ALAKAZAM, // 0x041 + SPECIES_MACHOP, // 0x042 + SPECIES_MACHOKE, // 0x043 + SPECIES_MACHAMP, // 0x044 + SPECIES_BELLSPROUT, // 0x045 + SPECIES_WEEPINBELL, // 0x046 + SPECIES_VICTREEBEL, // 0x047 + SPECIES_TENTACOOL, // 0x048 + SPECIES_TENTACRUEL, // 0x049 + SPECIES_GEODUDE, // 0x04a + SPECIES_GRAVELER, // 0x04b + SPECIES_GOLEM, // 0x04c + SPECIES_PONYTA, // 0x04d + SPECIES_RAPIDASH, // 0x04e + SPECIES_SLOWPOKE, // 0x04f + SPECIES_SLOWBRO, // 0x050 + SPECIES_MAGNEMITE, // 0x051 + SPECIES_MAGNETON, // 0x052 + SPECIES_FARFETCHD, // 0x053 + SPECIES_DODUO, // 0x054 + SPECIES_DODRIO, // 0x055 + SPECIES_SEEL, // 0x056 + SPECIES_DEWGONG, // 0x057 + SPECIES_GRIMER, // 0x058 + SPECIES_MUK, // 0x059 + SPECIES_SHELLDER, // 0x05a + SPECIES_CLOYSTER, // 0x05b + SPECIES_GASTLY, // 0x05c + SPECIES_HAUNTER, // 0x05d + SPECIES_GENGAR, // 0x05e + SPECIES_ONIX, // 0x05f + SPECIES_DROWZEE, // 0x060 + SPECIES_HYPNO, // 0x061 + SPECIES_KRABBY, // 0x062 + SPECIES_KINGLER, // 0x063 + SPECIES_VOLTORB, // 0x064 + SPECIES_ELECTRODE, // 0x065 + SPECIES_EXEGGCUTE, // 0x066 + SPECIES_EXEGGUTOR, // 0x067 + SPECIES_CUBONE, // 0x068 + SPECIES_MAROWAK, // 0x069 + SPECIES_HITMONLEE, // 0x06a + SPECIES_HITMONCHAN, // 0x06b + SPECIES_LICKITUNG, // 0x06c + SPECIES_KOFFING, // 0x06d + SPECIES_WEEZING, // 0x06e + SPECIES_RHYHORN, // 0x06f + SPECIES_RHYDON, // 0x070 + SPECIES_CHANSEY, // 0x071 + SPECIES_TANGELA, // 0x072 + SPECIES_KANGASKHAN, // 0x073 + SPECIES_HORSEA, // 0x074 + SPECIES_SEADRA, // 0x075 + SPECIES_GOLDEEN, // 0x076 + SPECIES_SEAKING, // 0x077 + SPECIES_STARYU, // 0x078 + SPECIES_STARMIE, // 0x079 + SPECIES_MR_MIME, // 0x07a + SPECIES_SCYTHER, // 0x07b + SPECIES_JYNX, // 0x07c + SPECIES_ELECTABUZZ, // 0x07d + SPECIES_MAGMAR, // 0x07e + SPECIES_PINSIR, // 0x07f + SPECIES_TAUROS, // 0x080 + SPECIES_MAGIKARP, // 0x081 + SPECIES_GYARADOS, // 0x082 + SPECIES_LAPRAS, // 0x083 + SPECIES_DITTO, // 0x084 + SPECIES_EEVEE, // 0x085 + SPECIES_VAPOREON, // 0x086 + SPECIES_JOLTEON, // 0x087 + SPECIES_FLAREON, // 0x088 + SPECIES_PORYGON, // 0x089 + SPECIES_OMANYTE, // 0x08a + SPECIES_OMASTAR, // 0x08b + SPECIES_KABUTO, // 0x08c + SPECIES_KABUTOPS, // 0x08d + SPECIES_AERODACTYL, // 0x08e + SPECIES_SNORLAX, // 0x08f + SPECIES_ARTICUNO, // 0x090 + SPECIES_ZAPDOS, // 0x091 + SPECIES_MOLTRES, // 0x092 + SPECIES_DRATINI, // 0x093 + SPECIES_DRAGONAIR, // 0x094 + SPECIES_DRAGONITE, // 0x095 + SPECIES_MEWTWO, // 0x096 + SPECIES_MEW, // 0x097 + SPECIES_CHIKORITA, // 0x098 + SPECIES_BAYLEEF, // 0x099 + SPECIES_MEGANIUM, // 0x09a + SPECIES_CYNDAQUIL, // 0x09b + SPECIES_QUILAVA, // 0x09c + SPECIES_TYPHLOSION, // 0x09d + SPECIES_TOTODILE, // 0x09e + SPECIES_CROCONAW, // 0x09f + SPECIES_FERALIGATR, // 0x0a0 + SPECIES_SENTRET, // 0x0a1 + SPECIES_FURRET, // 0x0a2 + SPECIES_HOOTHOOT, // 0x0a3 + SPECIES_NOCTOWL, // 0x0a4 + SPECIES_LEDYBA, // 0x0a5 + SPECIES_LEDIAN, // 0x0a6 + SPECIES_SPINARAK, // 0x0a7 + SPECIES_ARIADOS, // 0x0a8 + SPECIES_CROBAT, // 0x0a9 + SPECIES_CHINCHOU, // 0x0aa + SPECIES_LANTURN, // 0x0ab + SPECIES_PICHU, // 0x0ac + SPECIES_CLEFFA, // 0x0ad + SPECIES_IGGLYBUFF, // 0x0ae + SPECIES_TOGEPI, // 0x0af + SPECIES_TOGETIC, // 0x0b0 + SPECIES_NATU, // 0x0b1 + SPECIES_XATU, // 0x0b2 + SPECIES_MAREEP, // 0x0b3 + SPECIES_FLAAFFY, // 0x0b4 + SPECIES_AMPHAROS, // 0x0b5 + SPECIES_BELLOSSOM, // 0x0b6 + SPECIES_MARILL, // 0x0b7 + SPECIES_AZUMARILL, // 0x0b8 + SPECIES_SUDOWOODO, // 0x0b9 + SPECIES_POLITOED, // 0x0ba + SPECIES_HOPPIP, // 0x0bb + SPECIES_SKIPLOOM, // 0x0bc + SPECIES_JUMPLUFF, // 0x0bd + SPECIES_AIPOM, // 0x0be + SPECIES_SUNKERN, // 0x0bf + SPECIES_SUNFLORA, // 0x0c0 + SPECIES_YANMA, // 0x0c1 + SPECIES_WOOPER, // 0x0c2 + SPECIES_QUAGSIRE, // 0x0c3 + SPECIES_ESPEON, // 0x0c4 + SPECIES_UMBREON, // 0x0c5 + SPECIES_MURKROW, // 0x0c6 + SPECIES_SLOWKING, // 0x0c7 + SPECIES_MISDREAVUS, // 0x0c8 + SPECIES_UNOWN, // 0x0c9 + SPECIES_WOBBUFFET, // 0x0ca + SPECIES_GIRAFARIG, // 0x0cb + SPECIES_PINECO, // 0x0cc + SPECIES_FORRETRESS, // 0x0cd + SPECIES_DUNSPARCE, // 0x0ce + SPECIES_GLIGAR, // 0x0cf + SPECIES_STEELIX, // 0x0d0 + SPECIES_SNUBBULL, // 0x0d1 + SPECIES_GRANBULL, // 0x0d2 + SPECIES_QWILFISH, // 0x0d3 + SPECIES_SCIZOR, // 0x0d4 + SPECIES_SHUCKLE, // 0x0d5 + SPECIES_HERACROSS, // 0x0d6 + SPECIES_SNEASEL, // 0x0d7 + SPECIES_TEDDIURSA, // 0x0d8 + SPECIES_URSARING, // 0x0d9 + SPECIES_SLUGMA, // 0x0da + SPECIES_MAGCARGO, // 0x0db + SPECIES_SWINUB, // 0x0dc + SPECIES_PILOSWINE, // 0x0dd + SPECIES_CORSOLA, // 0x0de + SPECIES_REMORAID, // 0x0df + SPECIES_OCTILLERY, // 0x0e0 + SPECIES_DELIBIRD, // 0x0e1 + SPECIES_MANTINE, // 0x0e2 + SPECIES_SKARMORY, // 0x0e3 + SPECIES_HOUNDOUR, // 0x0e4 + SPECIES_HOUNDOOM, // 0x0e5 + SPECIES_KINGDRA, // 0x0e6 + SPECIES_PHANPY, // 0x0e7 + SPECIES_DONPHAN, // 0x0e8 + SPECIES_PORYGON2, // 0x0e9 + SPECIES_STANTLER, // 0x0ea + SPECIES_SMEARGLE, // 0x0eb + SPECIES_TYROGUE, // 0x0ec + SPECIES_HITMONTOP, // 0x0ed + SPECIES_SMOOCHUM, // 0x0ee + SPECIES_ELEKID, // 0x0ef + SPECIES_MAGBY, // 0x0f0 + SPECIES_MILTANK, // 0x0f1 + SPECIES_BLISSEY, // 0x0f2 + SPECIES_RAIKOU, // 0x0f3 + SPECIES_ENTEI, // 0x0f4 + SPECIES_SUICUNE, // 0x0f5 + SPECIES_LARVITAR, // 0x0f6 + SPECIES_PUPITAR, // 0x0f7 + SPECIES_TYRANITAR, // 0x0f8 + SPECIES_LUGIA, // 0x0f9 + SPECIES_HO_OH, // 0x0fa + SPECIES_CELEBI, // 0x0fb + + SPECIES_OLD_UNOWN_B, + SPECIES_OLD_UNOWN_C, + SPECIES_OLD_UNOWN_D, + SPECIES_OLD_UNOWN_E, + SPECIES_OLD_UNOWN_F, + SPECIES_OLD_UNOWN_G, + SPECIES_OLD_UNOWN_H, + SPECIES_OLD_UNOWN_I, + SPECIES_OLD_UNOWN_J, + SPECIES_OLD_UNOWN_K, + SPECIES_OLD_UNOWN_L, + SPECIES_OLD_UNOWN_M, + SPECIES_OLD_UNOWN_N, + SPECIES_OLD_UNOWN_O, + SPECIES_OLD_UNOWN_P, + SPECIES_OLD_UNOWN_Q, + SPECIES_OLD_UNOWN_R, + SPECIES_OLD_UNOWN_S, + SPECIES_OLD_UNOWN_T, + SPECIES_OLD_UNOWN_U, + SPECIES_OLD_UNOWN_V, + SPECIES_OLD_UNOWN_W, + SPECIES_OLD_UNOWN_X, + SPECIES_OLD_UNOWN_Y, + SPECIES_OLD_UNOWN_Z, + + SPECIES_TREECKO, // 0x115 + SPECIES_GROVYLE, // 0x116 + SPECIES_SCEPTILE, // 0x117 + SPECIES_TORCHIC, // 0x118 + SPECIES_COMBUSKEN, // 0x119 + SPECIES_BLAZIKEN, // 0x11a + SPECIES_MUDKIP, // 0x11b + SPECIES_MARSHTOMP, // 0x11c + SPECIES_SWAMPERT, // 0x11d + SPECIES_POOCHYENA, // 0x11e + SPECIES_MIGHTYENA, // 0x11f + SPECIES_ZIGZAGOON, // 0x120 + SPECIES_LINOONE, // 0x121 + SPECIES_WURMPLE, // 0x122 + SPECIES_SILCOON, // 0x123 + SPECIES_BEAUTIFLY, // 0x124 + SPECIES_CASCOON, // 0x125 + SPECIES_DUSTOX, // 0x126 + SPECIES_LOTAD, // 0x127 + SPECIES_LOMBRE, // 0x128 + SPECIES_LUDICOLO, // 0x129 + SPECIES_SEEDOT, // 0x12a + SPECIES_NUZLEAF, // 0x12b + SPECIES_SHIFTRY, // 0x12c + SPECIES_NINCADA, // 0x12d + SPECIES_NINJASK, // 0x12e + SPECIES_SHEDINJA, // 0x12f + SPECIES_TAILLOW, // 0x130 + SPECIES_SWELLOW, // 0x131 + SPECIES_SHROOMISH, // 0x132 + SPECIES_BRELOOM, // 0x133 + SPECIES_SPINDA, // 0x134 + SPECIES_WINGULL, // 0x135 + SPECIES_PELIPPER, // 0x136 + SPECIES_SURSKIT, // 0x137 + SPECIES_MASQUERAIN, // 0x138 + SPECIES_WAILMER, // 0x139 + SPECIES_WAILORD, // 0x13a + SPECIES_SKITTY, // 0x13b + SPECIES_DELCATTY, // 0x13c + SPECIES_KECLEON, // 0x13d + SPECIES_BALTOY, // 0x13e + SPECIES_CLAYDOL, // 0x13f + SPECIES_NOSEPASS, // 0x140 + SPECIES_TORKOAL, // 0x141 + SPECIES_SABLEYE, // 0x142 + SPECIES_BARBOACH, // 0x143 + SPECIES_WHISCASH, // 0x144 + SPECIES_LUVDISC, // 0x145 + SPECIES_CORPHISH, // 0x146 + SPECIES_CRAWDAUNT, // 0x147 + SPECIES_FEEBAS, // 0x148 + SPECIES_MILOTIC, // 0x149 + SPECIES_CARVANHA, // 0x14a + SPECIES_SHARPEDO, // 0x14b + SPECIES_TRAPINCH, // 0x14c + SPECIES_VIBRAVA, // 0x14d + SPECIES_FLYGON, // 0x14e + SPECIES_MAKUHITA, // 0x14f + SPECIES_HARIYAMA, // 0x150 + SPECIES_ELECTRIKE, // 0x151 + SPECIES_MANECTRIC, // 0x152 + SPECIES_NUMEL, // 0x153 + SPECIES_CAMERUPT, // 0x154 + SPECIES_SPHEAL, // 0x155 + SPECIES_SEALEO, // 0x156 + SPECIES_WALREIN, // 0x157 + SPECIES_CACNEA, // 0x158 + SPECIES_CACTURNE, // 0x159 + SPECIES_SNORUNT, // 0x15a + SPECIES_GLALIE, // 0x15b + SPECIES_LUNATONE, // 0x15c + SPECIES_SOLROCK, // 0x15d + SPECIES_AZURILL, // 0x15e + SPECIES_SPOINK, // 0x15f + SPECIES_GRUMPIG, // 0x160 + SPECIES_PLUSLE, // 0x161 + SPECIES_MINUN, // 0x162 + SPECIES_MAWILE, // 0x163 + SPECIES_MEDITITE, // 0x164 + SPECIES_MEDICHAM, // 0x165 + SPECIES_SWABLU, // 0x166 + SPECIES_ALTARIA, // 0x167 + SPECIES_WYNAUT, // 0x168 + SPECIES_DUSKULL, // 0x169 + SPECIES_DUSCLOPS, // 0x16a + SPECIES_ROSELIA, // 0x16b + SPECIES_SLAKOTH, // 0x16c + SPECIES_VIGOROTH, // 0x16d + SPECIES_SLAKING, // 0x16e + SPECIES_GULPIN, // 0x16f + SPECIES_SWALOT, // 0x170 + SPECIES_TROPIUS, // 0x171 + SPECIES_WHISMUR, // 0x172 + SPECIES_LOUDRED, // 0x173 + SPECIES_EXPLOUD, // 0x174 + SPECIES_CLAMPERL, // 0x175 + SPECIES_HUNTAIL, // 0x176 + SPECIES_GOREBYSS, // 0x177 + SPECIES_ABSOL, // 0x178 + SPECIES_SHUPPET, // 0x179 + SPECIES_BANETTE, // 0x17a + SPECIES_SEVIPER, // 0x17b + SPECIES_ZANGOOSE, // 0x17c + SPECIES_RELICANTH, // 0x17d + SPECIES_ARON, // 0x17e + SPECIES_LAIRON, // 0x17f + SPECIES_AGGRON, // 0x180 + SPECIES_CASTFORM, // 0x181 + SPECIES_VOLBEAT, // 0x182 + SPECIES_ILLUMISE, // 0x183 + SPECIES_LILEEP, // 0x184 + SPECIES_CRADILY, // 0x185 + SPECIES_ANORITH, // 0x186 + SPECIES_ARMALDO, // 0x187 + SPECIES_RALTS, // 0x188 + SPECIES_KIRLIA, // 0x189 + SPECIES_GARDEVOIR, // 0x18a + SPECIES_BAGON, // 0x18b + SPECIES_SHELGON, // 0x18c + SPECIES_SALAMENCE, // 0x18d + SPECIES_BELDUM, // 0x18e + SPECIES_METANG, // 0x18f + SPECIES_METAGROSS, // 0x190 + SPECIES_REGIROCK, // 0x191 + SPECIES_REGICE, // 0x192 + SPECIES_REGISTEEL, // 0x193 + SPECIES_KYOGRE, // 0x194 + SPECIES_GROUDON, // 0x195 + SPECIES_RAYQUAZA, // 0x196 + SPECIES_LATIAS, // 0x197 + SPECIES_LATIOS, // 0x198 + SPECIES_JIRACHI, // 0x199 + SPECIES_DEOXYS, // 0x19a + SPECIES_CHIMECHO, // 0x19b + SPECIES_EGG, // 0x19c + + SPECIES_UNOWN_B, + SPECIES_UNOWN_C, + SPECIES_UNOWN_D, + SPECIES_UNOWN_E, + SPECIES_UNOWN_F, + SPECIES_UNOWN_G, + SPECIES_UNOWN_H, + SPECIES_UNOWN_I, + SPECIES_UNOWN_J, + SPECIES_UNOWN_K, + SPECIES_UNOWN_L, + SPECIES_UNOWN_M, + SPECIES_UNOWN_N, + SPECIES_UNOWN_O, + SPECIES_UNOWN_P, + SPECIES_UNOWN_Q, + SPECIES_UNOWN_R, + SPECIES_UNOWN_S, + SPECIES_UNOWN_T, + SPECIES_UNOWN_U, + SPECIES_UNOWN_V, + SPECIES_UNOWN_W, + SPECIES_UNOWN_X, + SPECIES_UNOWN_Y, + SPECIES_UNOWN_Z, + SPECIES_UNOWN_EMARK, + SPECIES_UNOWN_QMARK, +}; \ No newline at end of file diff --git a/src/battle_ai.c b/src/battle_ai.c index 7f020fd75..8f3b7cf1e 100644 --- a/src/battle_ai.c +++ b/src/battle_ai.c @@ -1,10 +1,43 @@ #include "global.h" +#include "pokemon.h" +#include "battle.h" +#include "species.h" +#include "abilities.h" #define AIScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24) #define AIScriptRead16(ptr) ((ptr)[0] | (ptr)[1] << 8) #define AIScriptRead8(ptr) ((ptr)[0]) #define AIScriptReadPtr(ptr) (u8*) AIScriptRead32(ptr) +#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(gUnknown_020244A8->ai)) +#define UNK_2016A00_STRUCT ((struct UnknownStruct2 *)(gUnknown_020244A8->unk18)) +#define UNK_2016C00_STRUCT ((struct UnknownStruct4 *)(gUnknown_020244A8->unk1C)) +#define UNK_BATTLE_STRUCT ((struct UnknownStruct1 *)(gUnknown_020244A8)) + +#define AI_ACTION_UNK1 0x0001 +#define AI_ACTION_UNK2 0x0002 +#define AI_ACTION_UNK3 0x0004 +#define AI_ACTION_UNK4 0x0008 +#define AI_ACTION_UNK5 0x0010 +#define AI_ACTION_UNK6 0x0020 +#define AI_ACTION_UNK7 0x0040 +#define AI_ACTION_UNK8 0x0080 + +enum +{ + TARGET, + USER +}; + +// AI states +enum +{ + AIState_SettingUp, + AIState_Processing, + AIState_FinishedProcessing, + AIState_DoNotProcess +}; + //Copied from pokeruby -- hopefully the same struct Trainer { @@ -62,16 +95,16 @@ struct BattlePokemon }; //size should be 0x1C -struct UnknownStruct3 +struct AI_ThinkingStruct { - u8 unk0; - u8 unk1; - u16 unk2; - s8 unk4[4]; - u8 filler8[4]; - u32 unkC; - u8 unk10; - u8 unk11; + u8 aiState; + u8 movesetIndex; + u16 moveConsidered; + s8 score[4]; + u32 funcResult; + u32 aiFlags; + u8 aiAction; + u8 aiLogicId; u8 filler12[6]; u8 unk18[4]; }; @@ -80,7 +113,8 @@ struct UnknownStruct3 struct UnknownStruct2 { u16 unk0[2][8]; - u8 filler20[0x20]; + u8 unk20[2]; + u8 filler20[0x1E]; u8 unk40[4]; u8 unk44[4]; u16 unk48[4]; @@ -89,35 +123,88 @@ struct UnknownStruct2 struct UnknownStruct4 { - u8 filler0[0x20]; + u8 *ptr[8]; u8 unk20; }; +struct SimpleUnknownStruct +{ + u32 unkArray[4]; // unknown size +}; + struct UnknownStruct1 { u8 unk0; - u8 filler1[0x13]; - struct UnknownStruct3 *unk14; + u8 filler1[0x3]; + struct SimpleUnknownStruct *unk4; + u8 filler8[0xC]; + struct AI_ThinkingStruct *ai; struct UnknownStruct2 *unk18; struct UnknownStruct4 *unk1C; }; +struct UnknownStruct5 +{ + u8 filler0[0x3]; + u16 unk4; + u16 unk6; + u8 unk8; + u8 unk9; + u8 fillerA[0x9]; + u8 taunt:4; + u8 unkC:4; + u8 fillerD[0x2]; + u8 unk16; + u8 filler17[0x4]; +}; + +extern struct UnknownStruct5 gUnknown_020242BC[]; + +/* +gAIScriptPtr is a pointer to the next battle AI cmd command to read. +when a command finishes processing, gAIScriptPtr is incremented by +the number of bytes that the current command had reserved for arguments +in order to read the next command correctly. refer to battle_ai_scripts.s for the +AI scripts. +*/ +extern u8 *gAIScriptPtr; + extern u32 gBattleTypeFlags; extern u8 gUnknown_02024064; extern struct BattlePokemon gBattleMons[]; extern u16 gUnknown_020241EA; -extern u8 gUnknown_0202420C; +extern u8 gEnemyMonIndex; extern u8 gUnknown_02024210; extern u16 gUnknown_02024248[]; extern u8 *gUnknown_0202449C; extern struct UnknownStruct1 *gUnknown_020244A8; extern u16 gUnknown_02038BCA; extern u16 gUnknown_02038BCC; -extern const u8 *gAIScriptPtr; -extern u8 gUnknown_0203AB3C; +extern u8 gPlayerMonIndex; extern struct Trainer gTrainers[]; extern const u32 gBitTable[]; -extern const u8 *const gUnknown_082DBEF8[]; +extern u8 *gUnknown_082DBEF8[]; +extern u32 gUnknown_020242AC[]; +extern u16 gUnknown_0202428E[]; +extern struct BattleMove gBattleMoves[]; +extern u8 gUnknown_03005D10[]; +extern u8 gUnknown_0202406E[][2]; +extern struct BaseStats gBaseStats[]; +extern u16 gUnknown_02024400; +extern u8 gUnknown_02024474[]; +extern u8 gBattleMoveFlags; +extern int gBattleMoveDamage; +extern u8 gCritMultiplier; +extern u16 gBattleWeather; + +extern u8 battle_get_per_side_status(u8); +extern u8 b_first_side(u8, u8, u8); +extern u8 battle_get_side_with_given_state(u8); +extern void move_effectiveness_something(u16, u8, u8); +extern u8 itemid_get_x12(); +extern void b_mc_stack_push(u8 *); +extern bool8 b_mc_stack_pop_cursor(void); +extern void sub_8046E7C(u8, u8); typedef void (*BattleAICmdFunc)(void); @@ -125,12 +212,12 @@ extern const BattleAICmdFunc gUnknown_085B083C[]; extern u8 sub_803FECC(); extern u16 Random(); -extern u32 battle_side_get_owner(); +extern u8 battle_side_get_owner(); extern u32 sub_8186438(); extern u32 sub_81A6FB4(); void BattleAI_SetupAIData(u8 a); -u8 sub_8130BDC(void); +u8 BattleAI_GetAIActionToUse(void); u8 sub_8130CF4(void); void sub_8131074(void); void BattleAI_DoAIProcessing(void); @@ -160,58 +247,64 @@ void BattleAI_HandleItemUseBeforeAISetup(u8 a) void BattleAI_SetupAIData(u8 a) { s32 i; - u8 *data = (u8 *)gUnknown_020244A8->unk14; + u8 *data = (u8 *)AI_THINKING_STRUCT; u8 r6; - - for (i = 0; (u32)i < 0x1C; i++) + + // clear AI data. + for (i = 0; (u32)i < sizeof(struct AI_ThinkingStruct); i++) data[i] = 0; + + // conditional score reset, unlike Ruby. for (i = 0; i < 4; i++) { if (a & 1) - gUnknown_020244A8->unk14->unk4[i] = 100; + AI_THINKING_STRUCT->score[i] = 100; else - gUnknown_020244A8->unk14->unk4[i] = 0; + AI_THINKING_STRUCT->score[i] = 0; a >>= 1; } + r6 = sub_803FECC(gUnknown_02024064, 0, 0xFF); + for (i = 0; i < 4; i++) { if (gBitTable[i] & r6) - gUnknown_020244A8->unk14->unk4[i] = 0; - gUnknown_020244A8->unk14->unk18[i] = 100 - (Random() % 16); + AI_THINKING_STRUCT->score[i] = 0; + + AI_THINKING_STRUCT->unk18[i] = 100 - (Random() % 16); } gUnknown_020244A8->unk1C->unk20 = 0; - gUnknown_0203AB3C = gUnknown_02024064; + gPlayerMonIndex = gUnknown_02024064; if (gBattleTypeFlags & 1) { - gUnknown_0202420C = (Random() & 2) + (battle_side_get_owner(gUnknown_02024064) ^ 1); - if (gUnknown_02024210 & gBitTable[gUnknown_0202420C]) - gUnknown_0202420C ^= 2; + gEnemyMonIndex = (Random() & 2) + ((u32)battle_side_get_owner(gUnknown_02024064) ^ 1); + if (gUnknown_02024210 & gBitTable[gEnemyMonIndex]) + gEnemyMonIndex ^= 2; } else { //_08130A60 - gUnknown_0202420C = gUnknown_0203AB3C ^ 1; + gEnemyMonIndex = gPlayerMonIndex ^ 1; } //_08130A68 if (gBattleTypeFlags & 0x1000000) - gUnknown_020244A8->unk14->unkC = sub_8186438(); + AI_THINKING_STRUCT->aiFlags = sub_8186438(); else if (gBattleTypeFlags & 0x80) - gUnknown_020244A8->unk14->unkC = 0x40000000; + AI_THINKING_STRUCT->aiFlags = 0x40000000; else if (gBattleTypeFlags & 0x400) - gUnknown_020244A8->unk14->unkC = 0x20000000; + AI_THINKING_STRUCT->aiFlags = 0x20000000; else if (gBattleTypeFlags & 0x10) - gUnknown_020244A8->unk14->unkC = 0x80000000; + AI_THINKING_STRUCT->aiFlags = 0x80000000; else if (gBattleTypeFlags & 0x80000) - gUnknown_020244A8->unk14->unkC = sub_81A6FB4(); + AI_THINKING_STRUCT->aiFlags = sub_81A6FB4(); else if (gBattleTypeFlags & 0x0C3F0900) - gUnknown_020244A8->unk14->unkC = 7; + AI_THINKING_STRUCT->aiFlags = 7; else if (gBattleTypeFlags & 0x8000) - gUnknown_020244A8->unk14->unkC = gTrainers[gUnknown_02038BCA].aiFlags | gTrainers[gUnknown_02038BCC].aiFlags; + AI_THINKING_STRUCT->aiFlags = gTrainers[gUnknown_02038BCA].aiFlags | gTrainers[gUnknown_02038BCC].aiFlags; else - gUnknown_020244A8->unk14->unkC = gTrainers[gUnknown_02038BCA].aiFlags; + AI_THINKING_STRUCT->aiFlags = gTrainers[gUnknown_02038BCA].aiFlags; if (gBattleTypeFlags & 1) - gUnknown_020244A8->unk14->unkC |= 0x80; + AI_THINKING_STRUCT->aiFlags |= 0x80; } u8 sub_8130BA4(void) @@ -220,60 +313,64 @@ u8 sub_8130BA4(void) u8 ret; if (!(gBattleTypeFlags & 1)) - ret = sub_8130BDC(); + ret = BattleAI_GetAIActionToUse(); else ret = sub_8130CF4(); + gUnknown_020241EA = r4; return ret; } -u8 sub_8130BDC(void) +u8 BattleAI_GetAIActionToUse(void) { - u8 r6; + u8 currentMoveArray[4]; + u8 consideredMoveArray[4]; + u8 numOfBestMoves; s32 i; - u8 arr1[4]; - u8 arr2[4]; sub_8131074(); - while (gUnknown_020244A8->unk14->unkC != 0) + + while (AI_THINKING_STRUCT->aiFlags != 0) { - if (gUnknown_020244A8->unk14->unkC & 1) + if (AI_THINKING_STRUCT->aiFlags & 1) { - gUnknown_020244A8->unk14->unk0 = 0; + AI_THINKING_STRUCT->aiState = AIState_SettingUp; BattleAI_DoAIProcessing(); } - gUnknown_020244A8->unk14->unkC >>= 1; - gUnknown_020244A8->unk14->unk11++; - gUnknown_020244A8->unk14->unk1 = 0; + AI_THINKING_STRUCT->aiFlags >>= 1; + AI_THINKING_STRUCT->aiLogicId++; + AI_THINKING_STRUCT->movesetIndex = 0; } - //_08130C2C - if (gUnknown_020244A8->unk14->unk10 & 2) + + // special flags for safari watch/flee. + if (AI_THINKING_STRUCT->aiAction & 2) return 4; - if (gUnknown_020244A8->unk14->unk10 & 4) + if (AI_THINKING_STRUCT->aiAction & 4) return 5; - r6 = 1; - arr1[0] = gUnknown_020244A8->unk14->unk4[0]; - arr2[0] = 0; + + numOfBestMoves = 1; + currentMoveArray[0] = AI_THINKING_STRUCT->score[0]; + consideredMoveArray[0] = 0; + for (i = 1; i < 4; i++) { - if (gBattleMons[gUnknown_0203AB3C].moves[i] != 0) + if (gBattleMons[gPlayerMonIndex].moves[i] != 0) // emerald adds an extra move ID check for some reason. { - if (arr1[0] == gUnknown_020244A8->unk14->unk4[i]) + // in ruby, the order of these if statements are reversed. + if (currentMoveArray[0] == AI_THINKING_STRUCT->score[i]) { - arr1[r6] = gUnknown_020244A8->unk14->unk4[i]; - arr2[r6++] = i; + currentMoveArray[numOfBestMoves] = AI_THINKING_STRUCT->score[i]; + consideredMoveArray[numOfBestMoves++] = i; } - //_08130CAA - if (arr1[0] < gUnknown_020244A8->unk14->unk4[i]) + if (currentMoveArray[0] < AI_THINKING_STRUCT->score[i]) { - r6 = 1; - arr1[0] = gUnknown_020244A8->unk14->unk4[i]; - arr2[0] = i; + numOfBestMoves = 1; + currentMoveArray[0] = AI_THINKING_STRUCT->score[i]; + consideredMoveArray[0] = i; } } - //_08130CC6 } - return arr2[Random() % r6]; + return consideredMoveArray[Random() % numOfBestMoves]; } #ifdef NONMATCHING @@ -297,7 +394,7 @@ u8 sub_8130CF4(void) for (i = 0; i < 4; i++) //_08130D14 { - if (i == gUnknown_0203AB3C || gBattleMons[i].hp == 0) + if (i == gPlayerMonIndex || gBattleMons[i].hp == 0) { //_08130D2E spC[i] = -1; @@ -311,48 +408,48 @@ u8 sub_8130CF4(void) else BattleAI_SetupAIData(0xF); //_08130D76 - gUnknown_0202420C = i; - if ((i & 1) != (gUnknown_0203AB3C & 1)) + gEnemyMonIndex = i; + if ((i & 1) != (gPlayerMonIndex & 1)) sub_8131074(); //_08130D90 - gUnknown_020244A8->unk14->unk11 = 0; - gUnknown_020244A8->unk14->unk1 = 0; - r4 = gUnknown_020244A8->unk14->unkC; + AI_THINKING_STRUCT->unk11 = 0; + AI_THINKING_STRUCT->unk1 = 0; + r4 = AI_THINKING_STRUCT->aiFlags; while (r4 != 0) { if (r4 & 1) { - gUnknown_020244A8->unk14->unk0 = 0; + AI_THINKING_STRUCT->aiState = AIState_SettingUp; BattleAI_DoAIProcessing(); } r4 >>= 1; - gUnknown_020244A8->unk14->unk11++; - gUnknown_020244A8->unk14->unk1 = 0; + AI_THINKING_STRUCT->unk11++; + AI_THINKING_STRUCT->unk1 = 0; } //_08130DD8 - if (gUnknown_020244A8->unk14->unk10 & 2) + if (AI_THINKING_STRUCT->unk10 & 2) spC[i] = 4; - else if (gUnknown_020244A8->unk14->unk10 & 4) + else if (AI_THINKING_STRUCT->unk10 & 4) spC[i] = 5; else { //_08130E10 - sp10[0] = gUnknown_020244A8->unk14->unk4[0]; + sp10[0] = AI_THINKING_STRUCT->score[0]; sp14[0] = 0; r5 = 1; for (j = 1; j < 4; j++) { - if (gBattleMons[gUnknown_0203AB3C].moves[j] != 0) + if (gBattleMons[gPlayerMonIndex].moves[j] != 0) { - if (sp10[0] == gUnknown_020244A8->unk14->unk4[j]) + if (sp10[0] == AI_THINKING_STRUCT->score[j]) { - sp10[r5] = gUnknown_020244A8->unk14->unk4[j]; + sp10[r5] = AI_THINKING_STRUCT->score[j]; sp14[r5] = j; r5++; } - if (sp10[0] < gUnknown_020244A8->unk14->unk4[j]) + if (sp10[0] < AI_THINKING_STRUCT->score[j]) { - sp10[0] = gUnknown_020244A8->unk14->unk4[j]; + sp10[0] = AI_THINKING_STRUCT->score[j]; sp14[0] = j; r5 = 1; } @@ -362,7 +459,7 @@ u8 sub_8130CF4(void) spC[i] = sp14[Random() % r5]; //asm("":::"r3"); sp0[i] = sp10[0]; - if (i == (gUnknown_0203AB3C ^ 2) && sp0[i] < 100) + if (i == (gPlayerMonIndex ^ 2) && sp0[i] < 100) sp0[i] = -1; } } @@ -391,8 +488,8 @@ u8 sub_8130CF4(void) r4_2 = 1; } } - gUnknown_0202420C = sp8[Random() % r4_2]; - return spC[gUnknown_0202420C]; + gEnemyMonIndex = sp8[Random() % r4_2]; + return spC[gEnemyMonIndex]; } #else __attribute__((naked)) @@ -416,7 +513,7 @@ u8 sub_8130CF4(void) str r1, [sp, 0x20]\n\ mov r10, sp\n\ _08130D14:\n\ - ldr r0, =gUnknown_0203AB3C\n\ + ldr r0, =gPlayerMonIndex\n\ ldrb r0, [r0]\n\ cmp r8, r0\n\ beq _08130D2E\n\ @@ -458,13 +555,13 @@ _08130D70:\n\ movs r0, 0xF\n\ bl BattleAI_SetupAIData\n\ _08130D76:\n\ - ldr r0, =gUnknown_0202420C\n\ + ldr r0, =gEnemyMonIndex\n\ mov r1, r8\n\ strb r1, [r0]\n\ movs r1, 0x1\n\ mov r2, r8\n\ ands r2, r1\n\ - ldr r0, =gUnknown_0203AB3C\n\ + ldr r0, =gPlayerMonIndex\n\ ldrb r0, [r0]\n\ ands r1, r0\n\ cmp r2, r1\n\ @@ -542,7 +639,7 @@ _08130E10:\n\ movs r5, 0x1\n\ movs r3, 0x1\n\ adds r6, r1, 0\n\ - ldr r0, =gUnknown_0203AB3C\n\ + ldr r0, =gPlayerMonIndex\n\ ldrb r1, [r0]\n\ movs r0, 0x58\n\ muls r0, r1\n\ @@ -603,7 +700,7 @@ _08130E72:\n\ ldrb r2, [r6]\n\ mov r0, r10\n\ strh r2, [r0]\n\ - ldr r0, =gUnknown_0203AB3C\n\ + ldr r0, =gPlayerMonIndex\n\ ldrb r1, [r0]\n\ movs r0, 0x2\n\ eors r0, r1\n\ @@ -634,7 +731,7 @@ _08130EC4:\n\ strb r0, [r2]\n\ movs r4, 0x1\n\ mov r8, r4\n\ - ldr r6, =gUnknown_0202420C\n\ + ldr r6, =gEnemyMonIndex\n\ ldr r3, [sp, 0x18]\n\ mov r1, sp\n\ adds r1, 0x2\n\ @@ -693,40 +790,42 @@ _08130EFE:\n\ void BattleAI_DoAIProcessing(void) { - while (gUnknown_020244A8->unk14->unk0 != 2) + while (AI_THINKING_STRUCT->aiState != AIState_FinishedProcessing) { - switch (gUnknown_020244A8->unk14->unk0) + switch (AI_THINKING_STRUCT->aiState) { - case 3: //Needed to match. + case AIState_DoNotProcess: //Needed to match. break; - case 0: - gAIScriptPtr = gUnknown_082DBEF8[gUnknown_020244A8->unk14->unk11]; - if (gBattleMons[gUnknown_0203AB3C].pp[gUnknown_020244A8->unk14->unk1] == 0) + case AIState_SettingUp: + gAIScriptPtr = gUnknown_082DBEF8[AI_THINKING_STRUCT->aiLogicId]; // set AI ptr to logic ID. + if (gBattleMons[gPlayerMonIndex].pp[AI_THINKING_STRUCT->movesetIndex] == 0) { - gUnknown_020244A8->unk14->unk2 = 0; + AI_THINKING_STRUCT->moveConsidered = 0; } else { - gUnknown_020244A8->unk14->unk2 = gBattleMons[gUnknown_0203AB3C].moves[gUnknown_020244A8->unk14->unk1]; + AI_THINKING_STRUCT->moveConsidered = gBattleMons[gPlayerMonIndex].moves[AI_THINKING_STRUCT->movesetIndex]; } - gUnknown_020244A8->unk14->unk0++; + AI_THINKING_STRUCT->aiState++; break; - case 1: - if (gUnknown_020244A8->unk14->unk2 != 0) - gUnknown_085B083C[*gAIScriptPtr](); + case AIState_Processing: + if (AI_THINKING_STRUCT->moveConsidered != 0) + gUnknown_085B083C[*gAIScriptPtr](); // run AI command. else { - gUnknown_020244A8->unk14->unk4[gUnknown_020244A8->unk14->unk1] = 0; - gUnknown_020244A8->unk14->unk10 |= 1; + AI_THINKING_STRUCT->score[AI_THINKING_STRUCT->movesetIndex] = 0; + AI_THINKING_STRUCT->aiAction |= 1; } - if (gUnknown_020244A8->unk14->unk10 & 1) + if (AI_THINKING_STRUCT->aiAction & 1) { - gUnknown_020244A8->unk14->unk1++; - if (gUnknown_020244A8->unk14->unk1 < 4 && !(gUnknown_020244A8->unk14->unk10 & 8)) - gUnknown_020244A8->unk14->unk0 = 0; + AI_THINKING_STRUCT->movesetIndex++; + + if (AI_THINKING_STRUCT->movesetIndex < 4 && !(AI_THINKING_STRUCT->aiAction & 8)) + AI_THINKING_STRUCT->aiState = AIState_SettingUp; else - gUnknown_020244A8->unk14->unk0++; - gUnknown_020244A8->unk14->unk10 &= 0xFE; + AI_THINKING_STRUCT->aiState++; + + AI_THINKING_STRUCT->aiAction &= 0xFE; } break; } @@ -739,12 +838,12 @@ void sub_8131074(void) for (i = 0; i < 4; i++) { - if (gUnknown_020244A8->unk18->unk0[gUnknown_0202420C][i] == gUnknown_02024248[gUnknown_0202420C]) + if (gUnknown_020244A8->unk18->unk0[gEnemyMonIndex][i] == gUnknown_02024248[gEnemyMonIndex]) break; - if (gUnknown_020244A8->unk18->unk0[gUnknown_0202420C][i] != gUnknown_02024248[gUnknown_0202420C] //HACK: This redundant condition is a hack to make the asm match. - && gUnknown_020244A8->unk18->unk0[gUnknown_0202420C][i] == 0) + if (gUnknown_020244A8->unk18->unk0[gEnemyMonIndex][i] != gUnknown_02024248[gEnemyMonIndex] //HACK: This redundant condition is a hack to make the asm match. + && gUnknown_020244A8->unk18->unk0[gEnemyMonIndex][i] == 0) { - gUnknown_020244A8->unk18->unk0[gUnknown_0202420C][i] = gUnknown_02024248[gUnknown_0202420C]; + gUnknown_020244A8->unk18->unk0[gEnemyMonIndex][i] = gUnknown_02024248[gEnemyMonIndex]; break; } } @@ -778,12 +877,1962 @@ void sub_8131160(u8 a) gUnknown_020244A8->unk18->unk44[a] = 0; } -void BattleAICmd_if_random(void) +static void BattleAICmd_if_random_less_than(void) { u16 random = Random(); - - if ((random & 0xFF) < gAIScriptPtr[1]) + + if (random % 256 < gAIScriptPtr[1]) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); else gAIScriptPtr += 6; } + +static void BattleAICmd_if_random_greater_than(void) +{ + u16 random = Random(); + + if (random % 256 > gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_random_equal(void) +{ + u16 random = Random(); + + if (random % 256 == gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_random_not_equal(void) +{ + u16 random = Random(); + + if (random % 256 != gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_score(void) +{ + AI_THINKING_STRUCT->score[AI_THINKING_STRUCT->movesetIndex] += gAIScriptPtr[1]; // add the result to the array of the move consider's score. + + if (AI_THINKING_STRUCT->score[AI_THINKING_STRUCT->movesetIndex] < 0) // if the score is negative, flatten it to 0. + AI_THINKING_STRUCT->score[AI_THINKING_STRUCT->movesetIndex] = 0; + + gAIScriptPtr += 2; // AI return. +} + +static void BattleAICmd_if_hp_less_than(void) +{ + u16 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) < gAIScriptPtr[2]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + else + gAIScriptPtr += 7; +} + +static void BattleAICmd_if_hp_more_than(void) +{ + u16 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) > gAIScriptPtr[2]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + else + gAIScriptPtr += 7; +} + +static void BattleAICmd_if_hp_equal(void) +{ + u16 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) == gAIScriptPtr[2]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + else + gAIScriptPtr += 7; +} + +static void BattleAICmd_if_hp_not_equal(void) +{ + u16 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) != gAIScriptPtr[2]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + else + gAIScriptPtr += 7; +} + +static void BattleAICmd_if_status(void) +{ + u16 index; + u32 arg; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + arg = AIScriptRead32(gAIScriptPtr + 2); + + if ((gBattleMons[index].status1 & arg) != 0) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6); + else + gAIScriptPtr += 10; +} + +static void BattleAICmd_if_not_status(void) +{ + u16 index; + u32 arg; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + arg = AIScriptRead32(gAIScriptPtr + 2); + + if ((gBattleMons[index].status1 & arg) == 0) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6); + else + gAIScriptPtr += 10; +} + +static void BattleAICmd_if_status2(void) +{ + u16 index; + u32 arg; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + arg = AIScriptRead32(gAIScriptPtr + 2); + + if ((gBattleMons[index].status2 & arg) != 0) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6); + else + gAIScriptPtr += 10; +} + +static void BattleAICmd_if_not_status2(void) +{ + u16 index; + u32 arg; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + arg = AIScriptRead32(gAIScriptPtr + 2); + + if ((gBattleMons[index].status2 & arg) == 0) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6); + else + gAIScriptPtr += 10; +} + +static void BattleAICmd_if_status3(void) +{ + u16 index; + u32 arg; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + arg = AIScriptRead32(gAIScriptPtr + 2); + + if ((gUnknown_020242AC[index] & arg) != 0) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6); + else + gAIScriptPtr += 10; +} + +static void BattleAICmd_if_not_status3(void) +{ + u16 index; + u32 arg; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + arg = AIScriptRead32(gAIScriptPtr + 2); + + if ((gUnknown_020242AC[index] & arg) == 0) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6); + else + gAIScriptPtr += 10; +} + +static void BattleAICmd_if_status4(void) +{ + u16 index; + u32 arg1, arg2; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + arg1 = battle_get_per_side_status(index) & 1; + arg2 = AIScriptRead32(gAIScriptPtr + 2); + + if ((gUnknown_0202428E[arg1] & arg2) != 0) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6); + else + gAIScriptPtr += 10; +} + +static void BattleAICmd_if_not_status4(void) +{ + u16 index; + u32 arg1, arg2; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + arg1 = battle_get_per_side_status(index) & 1; + arg2 = AIScriptRead32(gAIScriptPtr + 2); + + if ((gUnknown_0202428E[arg1] & arg2) == 0) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6); + else + gAIScriptPtr += 10; +} + +static void BattleAICmd_if_less_than(void) +{ + if (AI_THINKING_STRUCT->funcResult < gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_more_than(void) +{ + if (AI_THINKING_STRUCT->funcResult > gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_equal(void) +{ + if (AI_THINKING_STRUCT->funcResult == gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_not_equal(void) +{ + if (AI_THINKING_STRUCT->funcResult != gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_less_than_32(void) +{ + u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); + + if (AI_THINKING_STRUCT->funcResult < *temp) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); + else + gAIScriptPtr += 9; +} + +static void BattleAICmd_if_more_than_32(void) +{ + u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); + + if (AI_THINKING_STRUCT->funcResult > *temp) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); + else + gAIScriptPtr += 9; +} + +static void BattleAICmd_if_equal_32(void) +{ + u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); + + if (AI_THINKING_STRUCT->funcResult == *temp) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); + else + gAIScriptPtr += 9; +} + +static void BattleAICmd_if_not_equal_32(void) +{ + u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1); + + if (AI_THINKING_STRUCT->funcResult != *temp) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); + else + gAIScriptPtr += 9; +} + +static void BattleAICmd_if_move(void) +{ + u16 move = AIScriptRead16(gAIScriptPtr + 1); + + if (AI_THINKING_STRUCT->moveConsidered == move) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + else + gAIScriptPtr += 7; +} + +static void BattleAICmd_if_not_move(void) +{ + u16 move = AIScriptRead16(gAIScriptPtr + 1); + + if (AI_THINKING_STRUCT->moveConsidered != move) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + else + gAIScriptPtr += 7; +} + +static void BattleAICmd_if_in_bytes(void) +{ + u8 *ptr = AIScriptReadPtr(gAIScriptPtr + 1); + + while (*ptr != 0xFF) + { + if (AI_THINKING_STRUCT->funcResult == *ptr) + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); + return; + } + ptr++; + } + gAIScriptPtr += 9; +} + +static void BattleAICmd_if_not_in_bytes(void) +{ + u8 *ptr = AIScriptReadPtr(gAIScriptPtr + 1); + + while (*ptr != 0xFF) + { + if (AI_THINKING_STRUCT->funcResult == *ptr) + { + gAIScriptPtr += 9; + return; + } + ptr++; + } + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); +} + +static void BattleAICmd_if_in_words(void) +{ + u16 *ptr = (u16 *)AIScriptReadPtr(gAIScriptPtr + 1); + + while (*ptr != 0xFFFF) + { + if (AI_THINKING_STRUCT->funcResult == *ptr) + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); + return; + } + ptr++; + } + gAIScriptPtr += 9; +} + +static void BattleAICmd_if_not_in_words(void) +{ + u16 *ptr = (u16 *)AIScriptReadPtr(gAIScriptPtr + 1); + + while (*ptr != 0xFFFF) + { + if (AI_THINKING_STRUCT->funcResult == *ptr) + { + gAIScriptPtr += 9; + return; + } + ptr++; + } + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5); +} + +static void BattleAICmd_if_user_can_damage(void) +{ + s32 i; + + for (i = 0; i < 4; i++) + { + if (gBattleMons[gPlayerMonIndex].moves[i] != 0 + && gBattleMoves[gBattleMons[gPlayerMonIndex].moves[i]].power != 0) + break; + } + if (i == 4) + gAIScriptPtr += 5; + else + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1); +} + +static void BattleAICmd_if_user_cant_damage(void) +{ + s32 i; + + for (i = 0; i < 4; i++) + { + if (gBattleMons[gPlayerMonIndex].moves[i] != 0 + && gBattleMoves[gBattleMons[gPlayerMonIndex].moves[i]].power != 0) + break; + } + if (i != 4) + gAIScriptPtr += 5; + else + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1); +} + +static void BattleAICmd_get_turn_count(void) +{ + AI_THINKING_STRUCT->funcResult = gUnknown_03005D10[19]; + gAIScriptPtr += 1; +} + +static void BattleAICmd_get_type(void) +{ + u8 typeVar = gAIScriptPtr[1]; + + switch (typeVar) + { + case 1: // player primary type + AI_THINKING_STRUCT->funcResult = gBattleMons[gPlayerMonIndex].type1; + break; + case 0: // enemy primary type + AI_THINKING_STRUCT->funcResult = gBattleMons[gEnemyMonIndex].type1; + break; + case 3: // player secondary type + AI_THINKING_STRUCT->funcResult = gBattleMons[gPlayerMonIndex].type2; + break; + case 2: // enemy secondary type + AI_THINKING_STRUCT->funcResult = gBattleMons[gEnemyMonIndex].type2; + break; + case 4: // type of move being pointed to + AI_THINKING_STRUCT->funcResult = gBattleMoves[AI_THINKING_STRUCT->moveConsidered].type; + break; + } + gAIScriptPtr += 2; +} + +// util for double battles? whats this doing in the middle of the battle AI macros? +u8 sub_8131E70(u8 index) +{ + switch (index) + { + case 1: + return gPlayerMonIndex; + case 0: + default: + return gEnemyMonIndex; + case 3: + return gPlayerMonIndex ^ 2; + case 2: + return gEnemyMonIndex ^ 2; + } +} + +static void BattleAICmd_unk_5F(void) +{ + u8 index = sub_8131E70(gAIScriptPtr[1]); + + if(gBattleMons[index].type1 == gAIScriptPtr[2] || gBattleMons[index].type2 == gAIScriptPtr[2]) + { + AI_THINKING_STRUCT->funcResult = 1; + } + else + { + AI_THINKING_STRUCT->funcResult = 0; + } + + gAIScriptPtr += 3; +} + +static void BattleAICmd_get_move_power(void) +{ + AI_THINKING_STRUCT->funcResult = gBattleMoves[AI_THINKING_STRUCT->moveConsidered].power; + gAIScriptPtr += 1; +} + +__attribute__((naked)) // not even going to try. if it doesnt match in ruby, it wont match in emerald (yet). +static void BattleAICmd_is_most_powerful_move(void) +{ + asm(".syntax unified\n\ + push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + sub sp, 0x14\n\ + movs r3, 0\n\ + ldr r0, =gUnknown_085B09C8\n\ + ldrh r1, [r0]\n\ + ldr r5, =0x0000ffff\n\ + ldr r6, =gBattleMoves\n\ + ldr r2, =gUnknown_020244A8\n\ + cmp r1, r5\n\ + beq _08131F86\n\ + ldr r0, [r2]\n\ + ldr r0, [r0, 0x14]\n\ + ldrh r1, [r0, 0x2]\n\ + lsls r0, r1, 1\n\ + adds r0, r1\n\ + lsls r0, 2\n\ + adds r0, r6\n\ + ldrb r4, [r0]\n\ + ldr r1, =gUnknown_085B09C8\n\ +_08131F76:\n\ + ldrh r0, [r1]\n\ + cmp r4, r0\n\ + beq _08131F86\n\ + adds r1, 0x2\n\ + adds r3, 0x1\n\ + ldrh r0, [r1]\n\ + cmp r0, r5\n\ + bne _08131F76\n\ +_08131F86:\n\ + ldr r0, [r2]\n\ + ldr r0, [r0, 0x14]\n\ + ldrh r1, [r0, 0x2]\n\ + lsls r0, r1, 1\n\ + adds r0, r1\n\ + lsls r0, 2\n\ + adds r0, r6\n\ + ldrb r0, [r0, 0x1]\n\ + cmp r0, 0x1\n\ + bhi _08131F9C\n\ + b _08132126\n\ +_08131F9C:\n\ + lsls r0, r3, 1\n\ + ldr r1, =gUnknown_085B09C8\n\ + adds r0, r1\n\ + ldrh r3, [r0]\n\ + ldr r0, =0x0000ffff\n\ + cmp r3, r0\n\ + beq _08131FAC\n\ + b _08132126\n\ +_08131FAC:\n\ + ldr r0, =gUnknown_02024400\n\ + movs r1, 0\n\ + strh r1, [r0]\n\ + ldr r0, =gUnknown_0202449C\n\ + ldr r0, [r0]\n\ + strb r1, [r0, 0x13]\n\ + ldr r0, =gUnknown_02024474\n\ + movs r2, 0x1\n\ + strb r2, [r0, 0xE]\n\ + ldr r0, =gBattleMoveFlags\n\ + strb r1, [r0]\n\ + ldr r0, =gCritMultiplier\n\ + strb r2, [r0]\n\ + movs r6, 0\n\ + mov r9, r3\n\ + ldr r2, =gUnknown_085B09C8\n\ + ldrh r2, [r2]\n\ + str r2, [sp, 0x10]\n\ +_08131FD0:\n\ + movs r3, 0\n\ + ldr r5, =gBattleMons\n\ + lsls r4, r6, 1\n\ + ldr r7, =gPlayerMonIndex\n\ + lsls r0, r6, 2\n\ + mov r8, r0\n\ + adds r1, r6, 0x1\n\ + mov r10, r1\n\ + ldr r2, [sp, 0x10]\n\ + cmp r2, r9\n\ + beq _08132014\n\ + ldr r2, =gBattleMoves\n\ + ldrb r1, [r7]\n\ + movs r0, 0x58\n\ + muls r0, r1\n\ + adds r0, r4, r0\n\ + adds r1, r5, 0\n\ + adds r1, 0xC\n\ + adds r0, r1\n\ + ldrh r1, [r0]\n\ + lsls r0, r1, 1\n\ + adds r0, r1\n\ + lsls r0, 2\n\ + adds r0, r2\n\ + ldrb r2, [r0]\n\ + ldr r1, =gUnknown_085B09C8\n\ +_08132004:\n\ + ldrh r0, [r1]\n\ + cmp r2, r0\n\ + beq _08132014\n\ + adds r1, 0x2\n\ + adds r3, 0x1\n\ + ldrh r0, [r1]\n\ + cmp r0, r9\n\ + bne _08132004\n\ +_08132014:\n\ + ldrb r1, [r7]\n\ + movs r0, 0x58\n\ + muls r0, r1\n\ + adds r0, r4, r0\n\ + adds r1, r5, 0\n\ + adds r1, 0xC\n\ + adds r1, r0, r1\n\ + ldrh r0, [r1]\n\ + cmp r0, 0\n\ + beq _081320C0\n\ + lsls r0, r3, 1\n\ + ldr r2, =gUnknown_085B09C8\n\ + adds r0, r2\n\ + ldrh r0, [r0]\n\ + cmp r0, r9\n\ + bne _081320C0\n\ + ldr r0, =gBattleMoves\n\ + ldrh r2, [r1]\n\ + lsls r1, r2, 1\n\ + adds r1, r2\n\ + lsls r1, 2\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x1]\n\ + cmp r0, 0x1\n\ + bls _081320C0\n\ + ldr r5, =gUnknown_020241EA\n\ + strh r2, [r5]\n\ + ldrb r0, [r7]\n\ + ldr r4, =gEnemyMonIndex\n\ + ldrb r1, [r4]\n\ + bl sub_8046E7C\n\ + ldrh r0, [r5]\n\ + ldrb r1, [r7]\n\ + ldrb r2, [r4]\n\ + bl move_effectiveness_something\n\ + mov r4, sp\n\ + add r4, r8\n\ + ldr r2, =gBattleMoveDamage\n\ + ldr r0, =gUnknown_020244A8\n\ + ldr r0, [r0]\n\ + ldr r0, [r0, 0x14]\n\ + adds r0, 0x18\n\ + adds r0, r6\n\ + ldrb r1, [r0]\n\ + ldr r0, [r2]\n\ + muls r0, r1\n\ + movs r1, 0x64\n\ + bl __divsi3\n\ + str r0, [r4]\n\ + cmp r0, 0\n\ + bne _081320C8\n\ + movs r0, 0x1\n\ + str r0, [r4]\n\ + b _081320C8\n\ + .pool\n\ +_081320C0:\n\ + mov r1, sp\n\ + add r1, r8\n\ + movs r0, 0\n\ + str r0, [r1]\n\ +_081320C8:\n\ + mov r6, r10\n\ + cmp r6, 0x3\n\ + bgt _081320D0\n\ + b _08131FD0\n\ +_081320D0:\n\ + movs r6, 0\n\ + ldr r2, =gUnknown_020244A8\n\ + ldr r0, [r2]\n\ + ldr r0, [r0, 0x14]\n\ + ldrb r0, [r0, 0x1]\n\ + lsls r0, 2\n\ + add r0, sp\n\ + ldr r1, [sp]\n\ + ldr r0, [r0]\n\ + ldr r5, =gAIScriptPtr\n\ + cmp r1, r0\n\ + bgt _08132106\n\ + adds r4, r2, 0\n\ + mov r3, sp\n\ +_081320EC:\n\ + adds r3, 0x4\n\ + adds r6, 0x1\n\ + cmp r6, 0x3\n\ + bgt _08132106\n\ + ldr r0, [r4]\n\ + ldr r0, [r0, 0x14]\n\ + ldrb r0, [r0, 0x1]\n\ + lsls r0, 2\n\ + add r0, sp\n\ + ldr r1, [r3]\n\ + ldr r0, [r0]\n\ + cmp r1, r0\n\ + ble _081320EC\n\ +_08132106:\n\ + cmp r6, 0x4\n\ + bne _0813211C\n\ + ldr r0, [r2]\n\ + ldr r1, [r0, 0x14]\n\ + movs r0, 0x2\n\ + str r0, [r1, 0x8]\n\ + b _08132130\n\ + .pool\n\ +_0813211C:\n\ + ldr r0, [r2]\n\ + ldr r1, [r0, 0x14]\n\ + movs r0, 0x1\n\ + str r0, [r1, 0x8]\n\ + b _08132130\n\ +_08132126:\n\ + ldr r0, [r2]\n\ + ldr r1, [r0, 0x14]\n\ + movs r0, 0\n\ + str r0, [r1, 0x8]\n\ + ldr r5, =gAIScriptPtr\n\ +_08132130:\n\ + ldr r0, [r5]\n\ + adds r0, 0x1\n\ + str r0, [r5]\n\ + add sp, 0x14\n\ + pop {r3-r5}\n\ + mov r8, r3\n\ + mov r9, r4\n\ + mov r10, r5\n\ + pop {r4-r7}\n\ + pop {r0}\n\ + bx r0\n\ + .pool\n\ + .syntax divided"); +} + +static void BattleAICmd_get_move(void) +{ + if (gAIScriptPtr[1] == USER) + AI_THINKING_STRUCT->funcResult = gUnknown_02024248[gPlayerMonIndex]; + else + AI_THINKING_STRUCT->funcResult = gUnknown_02024248[gEnemyMonIndex]; + + gAIScriptPtr += 2; +} + +static void BattleAICmd_if_arg_equal(void) +{ + if (gAIScriptPtr[1] == AI_THINKING_STRUCT->funcResult) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_arg_not_equal(void) +{ + if (gAIScriptPtr[1] != AI_THINKING_STRUCT->funcResult) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_would_go_first(void) +{ + if (b_first_side(gPlayerMonIndex, gEnemyMonIndex, 1) == gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_would_not_go_first(void) +{ + if (b_first_side(gPlayerMonIndex, gEnemyMonIndex, 1) != gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_nullsub_2A(void) +{ +} + +static void BattleAICmd_nullsub_2B(void) +{ +} + +static void BattleAICmd_count_alive_pokemon(void) +{ + u8 index; + u8 var, var2; + struct Pokemon *party; + int i; + + AI_THINKING_STRUCT->funcResult = 0; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + if (battle_side_get_owner(index) == 0) + party = gPlayerParty; + else + party = gEnemyParty; + + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + u32 status; + var = gUnknown_0202406E[index][0]; + status = battle_get_per_side_status(index) ^ 2; + var2 = gUnknown_0202406E[battle_get_side_with_given_state(status)][0]; + } + else + { + var = gUnknown_0202406E[index][0]; + var2 = gUnknown_0202406E[index][0]; + } + + for (i = 0; i < 6; i++) + { + if (i != var && i != var2 + && GetMonData(&party[i], MON_DATA_HP) != 0 + && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + { + AI_THINKING_STRUCT->funcResult++; + } + } + + gAIScriptPtr += 2; +} + +static void BattleAICmd_get_considered_move(void) +{ + AI_THINKING_STRUCT->funcResult = AI_THINKING_STRUCT->moveConsidered; + gAIScriptPtr += 1; +} + +static void BattleAICmd_get_considered_move_effect(void) +{ + AI_THINKING_STRUCT->funcResult = gBattleMoves[AI_THINKING_STRUCT->moveConsidered].effect; + gAIScriptPtr += 1; +} + +static void BattleAICmd_get_ability(void) +{ + u8 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + if(gUnknown_02024064 != index) + { + if(UNK_2016A00_STRUCT->unk40[index] != 0) + { + AI_THINKING_STRUCT->funcResult = UNK_2016A00_STRUCT->unk40[index]; + gAIScriptPtr += 2; + return; + } + + // abilities that prevent fleeing. + if (gBattleMons[index].ability == ABILITY_SHADOW_TAG + || gBattleMons[index].ability == ABILITY_MAGNET_PULL + || gBattleMons[index].ability == ABILITY_ARENA_TRAP) + { + AI_THINKING_STRUCT->funcResult = gBattleMons[index].ability; + gAIScriptPtr += 2; + return; + } + + if (gBaseStats[gBattleMons[index].species].ability1 != ABILITY_NONE) + { + if (gBaseStats[gBattleMons[index].species].ability2 != ABILITY_NONE) + { + // AI has no knowledge of opponent, so it guesses which ability. + if(Random() & 1) + { + AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[index].species].ability1; + } + else + { + AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[index].species].ability2; + } + } + else + { + AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[index].species].ability1; // it's definitely ability 1. + } + } + else + { + AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[index].species].ability2; // AI cant actually reach this part since every mon has at least 1 ability. + } + } + else + { + // The AI knows its own ability. + AI_THINKING_STRUCT->funcResult = gBattleMons[index].ability; + } + gAIScriptPtr += 2; +} + +#ifdef NONMATCHING +static void tai60_unk(void) +{ + u8 index = sub_8131E70(gAIScriptPtr[1]); + u8 arg2 = gAIScriptPtr[2]; + u8 var; + + if(gAIScriptPtr[1] == 0 || gAIScriptPtr[1] == 2) + { + // _0813253A + if(UNK_2016A00_STRUCT->unk40[index] != 0) + { + var = UNK_2016A00_STRUCT->unk40[index]; + AI_THINKING_STRUCT->funcResult = var; + } + else + { + // _0813255C + if (gBattleMons[index].ability == ABILITY_SHADOW_TAG + || gBattleMons[index].ability == ABILITY_MAGNET_PULL + || gBattleMons[index].ability == ABILITY_ARENA_TRAP) + { + var = gBattleMons[index].ability; + } + else + { + // _08132588 + if (gBaseStats[gBattleMons[index].species].ability1 != ABILITY_NONE) + { + if (gBaseStats[gBattleMons[index].species].ability2 != ABILITY_NONE) + { + if(gBaseStats[gBattleMons[index].species].ability1 != arg2 && gBaseStats[gBattleMons[index].species].ability2 != arg2) + { + var = 2; + } + else + { + var = gBaseStats[gBattleMons[index].species].ability1; + } + } + else + { + // _081325B4 + var = gBaseStats[gBattleMons[index].species].ability1; + } + } + else + { + // _081325B8 + var = gBaseStats[gBattleMons[index].species].ability2; + } + } + } + } + else + { + // _081325BC + var = gBattleMons[index].ability; + } + + // _081325CA + if(var == ABILITY_NONE) + { + AI_THINKING_STRUCT->funcResult = 2; + } + else if(var == arg2) + { + AI_THINKING_STRUCT->funcResult = 1; + } + else + { + AI_THINKING_STRUCT->funcResult = 0; + } + gAIScriptPtr += 3; +} +#else +__attribute__((naked)) +static void tai60_unk(void) +{ + asm(".syntax unified\n\ + push {r4-r6,lr}\n\ + ldr r4, =gAIScriptPtr\n\ + ldr r0, [r4]\n\ + ldrb r0, [r0, 0x1]\n\ + bl sub_8131E70\n\ + lsls r0, 24\n\ + lsrs r5, r0, 24\n\ + ldr r0, [r4]\n\ + ldrb r3, [r0, 0x2]\n\ + ldrb r0, [r0, 0x1]\n\ + cmp r0, 0\n\ + beq _0813253A\n\ + cmp r0, 0x2\n\ + bne _081325BC\n\ +_0813253A:\n\ + ldr r0, =gUnknown_020244A8\n\ + ldr r4, [r0]\n\ + ldr r1, [r4, 0x18]\n\ + adds r1, 0x40\n\ + adds r2, r1, r5\n\ + ldrb r1, [r2]\n\ + adds r6, r0, 0\n\ + cmp r1, 0\n\ + beq _0813255C\n\ + adds r3, r1, 0\n\ + ldr r0, [r4, 0x14]\n\ + str r3, [r0, 0x8]\n\ + b _081325CA\n\ + .pool\n\ +_0813255C:\n\ + ldr r1, =gBattleMons\n\ + movs r0, 0x58\n\ + muls r0, r5\n\ + adds r4, r0, r1\n\ + adds r0, r4, 0\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, 0x17\n\ + beq _08132576\n\ + cmp r0, 0x2A\n\ + beq _08132576\n\ + cmp r0, 0x47\n\ + bne _08132588\n\ +_08132576:\n\ + movs r0, 0x58\n\ + muls r0, r5\n\ + adds r0, r1\n\ + adds r0, 0x20\n\ + ldrb r3, [r0]\n\ + b _081325CA\n\ + .pool\n\ +_08132588:\n\ + ldr r2, =gBaseStats\n\ + ldrh r1, [r4]\n\ + lsls r0, r1, 3\n\ + subs r0, r1\n\ + lsls r0, 2\n\ + adds r1, r0, r2\n\ + ldrb r4, [r1, 0x16]\n\ + cmp r4, 0\n\ + beq _081325B8\n\ + ldrb r2, [r1, 0x17]\n\ + cmp r2, 0\n\ + beq _081325B4\n\ + adds r0, r3, 0\n\ + cmp r4, r0\n\ + beq _081325CE\n\ + cmp r2, r0\n\ + beq _081325CE\n\ + adds r3, r4, 0\n\ + b _081325CA\n\ + .pool\n\ +_081325B4:\n\ + ldrb r3, [r1, 0x16]\n\ + b _081325CA\n\ +_081325B8:\n\ + ldrb r3, [r1, 0x17]\n\ + b _081325CA\n\ +_081325BC:\n\ + ldr r1, =gBattleMons\n\ + movs r0, 0x58\n\ + muls r0, r5\n\ + adds r0, r1\n\ + adds r0, 0x20\n\ + ldrb r3, [r0]\n\ + ldr r6, =gUnknown_020244A8\n\ +_081325CA:\n\ + cmp r3, 0\n\ + bne _081325E8\n\ +_081325CE:\n\ + ldr r0, [r6]\n\ + ldr r1, [r0, 0x14]\n\ + movs r0, 0x2\n\ + str r0, [r1, 0x8]\n\ + ldr r2, =gAIScriptPtr\n\ + b _08132608\n\ + .pool\n\ +_081325E8:\n\ + ldr r0, =gAIScriptPtr\n\ + ldr r1, [r0]\n\ + adds r2, r0, 0\n\ + ldrb r1, [r1, 0x2]\n\ + cmp r3, r1\n\ + bne _08132600\n\ + ldr r0, [r6]\n\ + ldr r1, [r0, 0x14]\n\ + movs r0, 0x1\n\ + b _08132606\n\ + .pool\n\ +_08132600:\n\ + ldr r0, [r6]\n\ + ldr r1, [r0, 0x14]\n\ + movs r0, 0\n\ +_08132606:\n\ + str r0, [r1, 0x8]\n\ +_08132608:\n\ + ldr r0, [r2]\n\ + adds r0, 0x3\n\ + str r0, [r2]\n\ + pop {r4-r6}\n\ + pop {r0}\n\ + bx r0\n\ + .pool\n\ + .syntax divided"); +} +#endif + +static void BattleAICmd_get_highest_possible_damage(void) +{ + s32 i; + + gUnknown_02024400 = 0; + gUnknown_0202449C[0x13] = 0; + gUnknown_02024474[0xE] = 1; + gBattleMoveFlags = 0; + gCritMultiplier = 1; + AI_THINKING_STRUCT->funcResult = 0; + + for (i = 0; i < 4; i++) + { + gBattleMoveDamage = 40; + gUnknown_020241EA = gBattleMons[gPlayerMonIndex].moves[i]; + + if (gUnknown_020241EA) + { + move_effectiveness_something(gUnknown_020241EA, gPlayerMonIndex, gEnemyMonIndex); + + // reduce by 1/3. + if (gBattleMoveDamage == 120) + gBattleMoveDamage = 80; + if (gBattleMoveDamage == 240) + gBattleMoveDamage = 160; + if (gBattleMoveDamage == 30) + gBattleMoveDamage = 20; + if (gBattleMoveDamage == 15) + gBattleMoveDamage = 10; + + if (gBattleMoveFlags & 8) // if it's a status move, it wont do anything. + gBattleMoveDamage = 0; + + if (AI_THINKING_STRUCT->funcResult < gBattleMoveDamage) + AI_THINKING_STRUCT->funcResult = gBattleMoveDamage; + } + } + gAIScriptPtr += 1; +} + +static void BattleAICmd_if_damage_bonus(void) +{ + u8 damageVar; + + gUnknown_02024400 = 0; + gUnknown_0202449C[0x13] = 0; + gUnknown_02024474[0xE] = 1; + gBattleMoveFlags = 0; + gCritMultiplier = 1; + + gBattleMoveDamage = 40; + gUnknown_020241EA = AI_THINKING_STRUCT->moveConsidered; + + move_effectiveness_something(gUnknown_020241EA, gPlayerMonIndex, gEnemyMonIndex); + + if (gBattleMoveDamage == 120) + gBattleMoveDamage = 80; + if (gBattleMoveDamage == 240) + gBattleMoveDamage = 160; + if (gBattleMoveDamage == 30) + gBattleMoveDamage = 20; + if (gBattleMoveDamage == 15) + gBattleMoveDamage = 10; + + if (gBattleMoveFlags & 8) + gBattleMoveDamage = 0; + + // store gBattleMoveDamage in a u8 variable because gAIScriptPtr[1] is a u8. + damageVar = gBattleMoveDamage; + + if (damageVar == gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_nullsub_32(void) +{ +} + +static void BattleAICmd_nullsub_33(void) +{ +} + +static void BattleAICmd_if_status_in_party(void) +{ + struct Pokemon *party; + int i; + u32 statusToCompareTo; + u8 index; + + switch(gAIScriptPtr[1]) + { + case 1: + index = gPlayerMonIndex; + break; + default: + index = gEnemyMonIndex; + break; + } + + party = (battle_side_get_owner(index) == 0) ? gPlayerParty : gEnemyParty; + + statusToCompareTo = AIScriptRead32(gAIScriptPtr + 2); + + for (i = 0; i < 6; i++) + { + u16 species = GetMonData(&party[i], MON_DATA_SPECIES); + u16 hp = GetMonData(&party[i], MON_DATA_HP); + u32 status = GetMonData(&party[i], MON_DATA_STATUS); + + if (species != SPECIES_NONE && species != SPECIES_EGG && hp != 0 && status == statusToCompareTo) + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6); + return; + } + } + + gAIScriptPtr += 10; +} + +static void BattleAICmd_if_status_not_in_party(void) +{ + struct Pokemon *party; + int i; + u32 statusToCompareTo; + u8 index; + + switch(gAIScriptPtr[1]) + { + case 1: + index = gPlayerMonIndex; + break; + default: + index = gEnemyMonIndex; + break; + } + + party = (battle_side_get_owner(index) == 0) ? gPlayerParty : gEnemyParty; + + statusToCompareTo = AIScriptRead32(gAIScriptPtr + 2); + + for (i = 0; i < 6; i++) + { + u16 species = GetMonData(&party[i], MON_DATA_SPECIES); + u16 hp = GetMonData(&party[i], MON_DATA_HP); + u32 status = GetMonData(&party[i], MON_DATA_STATUS); + + if (species != SPECIES_NONE && species != SPECIES_EGG && hp != 0 && status == statusToCompareTo) + { + gAIScriptPtr += 10; // still bugged in Emerald + } + } + + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6); +} + +static void BattleAICmd_get_weather(void) +{ + if (gBattleWeather & 7) + AI_THINKING_STRUCT->funcResult = 1; + if (gBattleWeather & 0x18) + AI_THINKING_STRUCT->funcResult = 2; + if (gBattleWeather & 0x60) + AI_THINKING_STRUCT->funcResult = 0; + if (gBattleWeather & 0x80) + AI_THINKING_STRUCT->funcResult = 3; + + gAIScriptPtr += 1; +} + +static void BattleAICmd_if_effect(void) +{ + if (gBattleMoves[AI_THINKING_STRUCT->moveConsidered].effect == gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_not_effect(void) +{ + if (gBattleMoves[AI_THINKING_STRUCT->moveConsidered].effect != gAIScriptPtr[1]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +static void BattleAICmd_if_stat_level_less_than(void) +{ + u32 party; + + if (gAIScriptPtr[1] == USER) + party = gPlayerMonIndex; + else + party = gEnemyMonIndex; + + if (gBattleMons[party].statStages[gAIScriptPtr[2]] < gAIScriptPtr[3]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4); + else + gAIScriptPtr += 8; +} + +static void BattleAICmd_if_stat_level_more_than(void) +{ + u32 party; + + if (gAIScriptPtr[1] == USER) + party = gPlayerMonIndex; + else + party = gEnemyMonIndex; + + if (gBattleMons[party].statStages[gAIScriptPtr[2]] > gAIScriptPtr[3]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4); + else + gAIScriptPtr += 8; +} + +static void BattleAICmd_if_stat_level_equal(void) +{ + u32 party; + + if (gAIScriptPtr[1] == USER) + party = gPlayerMonIndex; + else + party = gEnemyMonIndex; + + if (gBattleMons[party].statStages[gAIScriptPtr[2]] == gAIScriptPtr[3]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4); + else + gAIScriptPtr += 8; +} + +static void BattleAICmd_if_stat_level_not_equal(void) +{ + u32 party; + + if (gAIScriptPtr[1] == USER) + party = gPlayerMonIndex; + else + party = gEnemyMonIndex; + + if (gBattleMons[party].statStages[gAIScriptPtr[2]] != gAIScriptPtr[3]) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4); + else + gAIScriptPtr += 8; +} + +static void BattleAICmd_if_can_faint(void) +{ + if (gBattleMoves[AI_THINKING_STRUCT->moveConsidered].power < 2) + { + gAIScriptPtr += 5; + return; + } + + gUnknown_02024400 = 0; + gUnknown_0202449C[0x13] = 0; + gUnknown_02024474[0xE] = 1; + gBattleMoveFlags = 0; + gCritMultiplier = 1; + gUnknown_020241EA = AI_THINKING_STRUCT->moveConsidered; + sub_8046E7C(gPlayerMonIndex, gEnemyMonIndex); + move_effectiveness_something(gUnknown_020241EA, gPlayerMonIndex, gEnemyMonIndex); + + gBattleMoveDamage = gBattleMoveDamage * AI_THINKING_STRUCT->unk18[AI_THINKING_STRUCT->movesetIndex] / 100; + + // moves always do at least 1 damage. + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + + if (gBattleMons[gEnemyMonIndex].hp <= gBattleMoveDamage) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1); + else + gAIScriptPtr += 5; +} + +static void BattleAICmd_if_cant_faint(void) +{ + if (gBattleMoves[AI_THINKING_STRUCT->moveConsidered].power < 2) + { + gAIScriptPtr += 5; + return; + } + + gUnknown_02024400 = 0; + gUnknown_0202449C[0x13] = 0; + gUnknown_02024474[0xE] = 1; + gBattleMoveFlags = 0; + gCritMultiplier = 1; + gUnknown_020241EA = AI_THINKING_STRUCT->moveConsidered; + sub_8046E7C(gPlayerMonIndex, gEnemyMonIndex); + move_effectiveness_something(gUnknown_020241EA, gPlayerMonIndex, gEnemyMonIndex); + + gBattleMoveDamage = gBattleMoveDamage * AI_THINKING_STRUCT->unk18[AI_THINKING_STRUCT->movesetIndex] / 100; + + // this macro is missing the damage 0 = 1 assumption. + + if (gBattleMons[gEnemyMonIndex].hp > gBattleMoveDamage) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1); + else + gAIScriptPtr += 5; +} + +static void BattleAICmd_if_has_move(void) +{ + int i; + u16 *temp_ptr = (u16 *)(gAIScriptPtr + 2); + + switch(gAIScriptPtr[1]) + { + case 1: + // _08132E42 + for (i = 0; i < 4; i++) + { + if (gBattleMons[gPlayerMonIndex].moves[i] == *temp_ptr) + break; + } + if (i == 4) + { + gAIScriptPtr += 8; + return; + } + else + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4); + return; + } + case 3: // new to Emerald + if(gBattleMons[gPlayerMonIndex ^ 2].hp == 0) + { + gAIScriptPtr += 8; + return; + } + else + { + for (i = 0; i < 4; i++) + { + if (gBattleMons[gPlayerMonIndex ^ 2].moves[i] == *temp_ptr) + break; + } + } + if (i == 4) + { + gAIScriptPtr += 8; + return; + } + else + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4); + return; + } + case 0: + case 2: + for (i = 0; i < 4; i++) + { + if (UNK_2016A00_STRUCT->unk0[gEnemyMonIndex][i] == *temp_ptr) + break; + } + if (i == 4) + { + gAIScriptPtr += 8; + return; + } + else + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4); + return; + } + } +} + +static void BattleAICmd_if_dont_have_move(void) +{ + int i; + u16 *temp_ptr = (u16 *)(gAIScriptPtr + 2); + + switch(gAIScriptPtr[1]) + { + case 1: + case 3: // if_dont_have_move does not have the seperate 3 case check in Emerald unlike if_has_move. + for (i = 0; i < 4; i++) + { + if (gBattleMons[gPlayerMonIndex].moves[i] == *temp_ptr) + break; + } + if (i != 4) + { + gAIScriptPtr += 8; + return; + } + else + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4); + return; + } + case 0: + case 2: + for (i = 0; i < 4; i++) + { + if (UNK_2016A00_STRUCT->unk0[gEnemyMonIndex][i] == *temp_ptr) + break; + } + if (i != 4) + { + gAIScriptPtr += 8; + return; + } + else + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4); + return; + } + } +} + +static void BattleAICmd_if_move_effect(void) +{ + int i; + + switch (gAIScriptPtr[1]) + { + case 1: + case 3: // _08133044 + for(i = 0; i < 4; i++) + { + if(gBattleMons[gPlayerMonIndex].moves[i] != 0 && gBattleMoves[gBattleMons[gPlayerMonIndex].moves[i]].effect == gAIScriptPtr[2]) + break; + } + if (i == 4) + gAIScriptPtr += 7; + else + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + break; + case 0: + case 2: // _08133090 + for (i = 0; i < 4; i++) + { + if (gBattleMons[gPlayerMonIndex].moves[i] != 0 && gBattleMoves[UNK_2016A00_STRUCT->unk0[gEnemyMonIndex][i]].effect == gAIScriptPtr[2]) + break; + } + if (i == 4) + gAIScriptPtr += 7; + else + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + break; + } +} + +static void BattleAICmd_if_not_move_effect(void) +{ + int i; + + switch (gAIScriptPtr[1]) + { + case 1: + case 3: // _0813313C + for(i = 0; i < 4; i++) + { + if(gBattleMons[gPlayerMonIndex].moves[i] != 0 && gBattleMoves[gBattleMons[gPlayerMonIndex].moves[i]].effect == gAIScriptPtr[2]) + break; + } + if (i != 4) + gAIScriptPtr += 7; + else + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + break; + case 0: + case 2: // _08133188 + for (i = 0; i < 4; i++) + { + if (UNK_2016A00_STRUCT->unk0[gEnemyMonIndex][i] && gBattleMoves[UNK_2016A00_STRUCT->unk0[gEnemyMonIndex][i]].effect == gAIScriptPtr[2]) + break; + } + if (i != 4) + gAIScriptPtr += 7; + else + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + break; + } +} + +static void BattleAICmd_if_last_move_did_damage(void) +{ + u8 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + if (gAIScriptPtr[2] == 0) + { + if (gUnknown_020242BC[index].unk4 == 0) + { + gAIScriptPtr += 7; + return; + } + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + return; + } + else if (gAIScriptPtr[2] != 1) // ignore the macro if its not 0 or 1. + { + gAIScriptPtr += 7; + return; + } + else if (gUnknown_020242BC[index].unk6 != 0) + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3); + return; + } + gAIScriptPtr += 7; +} + +static void BattleAICmd_if_encored(void) +{ + switch (gAIScriptPtr[1]) + { + case 0: // _08109348 + if (gUnknown_020242BC[gUnknown_02024064].unk4 == AI_THINKING_STRUCT->moveConsidered) + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + return; + } + gAIScriptPtr += 6; + return; + case 1: // _08109370 + if (gUnknown_020242BC[gUnknown_02024064].unk6 == AI_THINKING_STRUCT->moveConsidered) + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + return; + } + gAIScriptPtr += 6; + return; + default: + gAIScriptPtr += 6; + return; + } +} + +static void BattleAICmd_flee(void) +{ + AI_THINKING_STRUCT->aiAction |= (AI_ACTION_UNK1 | AI_ACTION_UNK2 | AI_ACTION_UNK4); // what matters is UNK2 being enabled. +} + +static void BattleAICmd_if_random_100(void) +{ + u8 safariFleeRate = gUnknown_0202449C[0x7B] * 5; // safari flee rate, from 0-20 + + if ((u8)(Random() % 100) < safariFleeRate) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1); + else + gAIScriptPtr += 5; +} + +static void BattleAICmd_watch(void) +{ + AI_THINKING_STRUCT->aiAction |= (AI_ACTION_UNK1 | AI_ACTION_UNK3 | AI_ACTION_UNK4); // what matters is UNK3 being enabled. +} + +static void BattleAICmd_get_hold_effect(void) +{ + u8 index; + u16 status; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + if (gUnknown_02024064 != index) + { + AI_THINKING_STRUCT->funcResult = itemid_get_x12(UNK_2016A00_STRUCT->unk44[index]); + } + else + AI_THINKING_STRUCT->funcResult = itemid_get_x12(gBattleMons[index].item); + + gAIScriptPtr += 2; +} + +static void tai62_unk(void) +{ + u8 index = sub_8131E70(gAIScriptPtr[1]); + u16 item; + u8 var1, var2; + + if((index & 1) == (gPlayerMonIndex & 1)) + item = gBattleMons[index].item; + else + item = UNK_2016A00_STRUCT->unk44[index]; + + // strange way of loading a 16-bit argument from the AI command. + var2 = gAIScriptPtr[2]; + var1 = gAIScriptPtr[3]; + + if((var1 | var2) == item) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 4); + else + gAIScriptPtr += 8; +} + +static void BattleAICmd_get_gender(void) +{ + u8 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + AI_THINKING_STRUCT->funcResult = pokemon_species_get_gender_info(gBattleMons[index].species, gBattleMons[index].personality); + + gAIScriptPtr += 2; +} + +static void BattleAICmd_is_first_turn(void) +{ + u8 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + AI_THINKING_STRUCT->funcResult = gUnknown_020242BC[index].unk16; + + gAIScriptPtr += 2; +} + +static void BattleAICmd_get_stockpile_count(void) +{ + u8 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + AI_THINKING_STRUCT->funcResult = gUnknown_020242BC[index].unk9; + + gAIScriptPtr += 2; +} + +static void BattleAICmd_is_double_battle(void) +{ + AI_THINKING_STRUCT->funcResult = gBattleTypeFlags & BATTLE_TYPE_DOUBLE; + + gAIScriptPtr += 1; +} + +static void BattleAICmd_get_item(void) +{ + u8 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + // this hack and a half matches. whatever. i dont care. someone else fix this mess later. PS: still cant fix this. + AI_THINKING_STRUCT->funcResult = gUnknown_0202449C[0xB8 + (index * 2)]; + + gAIScriptPtr += 2; +} + +static void BattleAICmd_get_move_type_from_result(void) +{ + AI_THINKING_STRUCT->funcResult = gBattleMoves[AI_THINKING_STRUCT->funcResult].type; + + gAIScriptPtr += 1; +} + +static void BattleAICmd_get_move_power_from_result(void) +{ + AI_THINKING_STRUCT->funcResult = gBattleMoves[AI_THINKING_STRUCT->funcResult].power; + + gAIScriptPtr += 1; +} + +static void BattleAICmd_get_move_effect_from_result(void) +{ + AI_THINKING_STRUCT->funcResult = gBattleMoves[AI_THINKING_STRUCT->funcResult].effect; + + gAIScriptPtr += 1; +} + +static void BattleAICmd_get_protect_count(void) +{ + u8 index; + + if (gAIScriptPtr[1] == USER) + index = gPlayerMonIndex; + else + index = gEnemyMonIndex; + + AI_THINKING_STRUCT->funcResult = gUnknown_020242BC[index].unk8; + + gAIScriptPtr += 2; +} + +static void BattleAICmd_nullsub_52(void) +{ +} + +static void BattleAICmd_nullsub_53(void) +{ +} + +static void BattleAICmd_nullsub_54(void) +{ +} + +static void BattleAICmd_nullsub_55(void) +{ +} + +static void BattleAICmd_nullsub_56(void) +{ +} + +static void BattleAICmd_nullsub_57(void) +{ +} + +static void BattleAICmd_call(void) +{ + b_mc_stack_push(gAIScriptPtr + 5); + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1); +} + +static void BattleAICmd_jump(void) +{ + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1); +} + +static void BattleAICmd_end(void) +{ + if (b_mc_stack_pop_cursor() == 0) + AI_THINKING_STRUCT->aiAction |= AI_ACTION_UNK1; +} + +static void BattleAICmd_if_level_cond(void) +{ + switch (gAIScriptPtr[1]) + { + case 0: // greater than + if (gBattleMons[gPlayerMonIndex].level > gBattleMons[gEnemyMonIndex].level) + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + return; + } + gAIScriptPtr += 6; + return; + case 1: // less than + if (gBattleMons[gPlayerMonIndex].level < gBattleMons[gEnemyMonIndex].level) + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + return; + } + gAIScriptPtr += 6; + return; + case 2: // equal + if (gBattleMons[gPlayerMonIndex].level == gBattleMons[gEnemyMonIndex].level) + { + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + return; + } + gAIScriptPtr += 6; + return; + } +} + +static void BattleAICmd_if_taunted(void) +{ + if (gUnknown_020242BC[gEnemyMonIndex].taunt != 0) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1); + else + gAIScriptPtr += 5; +} + +static void BattleAICmd_if_not_taunted(void) +{ + if (gUnknown_020242BC[gEnemyMonIndex].taunt == 0) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1); + else + gAIScriptPtr += 5; +} + +static void tai5E_unk(void) +{ + if((gPlayerMonIndex & 1) == (gEnemyMonIndex & 1)) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1); + else + gAIScriptPtr += 5; +} + +static void tai61_unk(void) +{ + u8 index = sub_8131E70(gAIScriptPtr[1]); + + if(UNK_BATTLE_STRUCT->unk4->unkArray[index] & 1) + gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); + else + gAIScriptPtr += 6; +} + +void b_mc_stack_push(u8 *var) +{ + UNK_2016C00_STRUCT->ptr[UNK_2016C00_STRUCT->unk20++] = var; +} + +void b_mc_stack_push_cursor(void) +{ + UNK_2016C00_STRUCT->ptr[UNK_2016C00_STRUCT->unk20++] = gAIScriptPtr; +} + +bool8 b_mc_stack_pop_cursor(void) +{ + if (UNK_2016C00_STRUCT->unk20 != 0) + { + --UNK_2016C00_STRUCT->unk20; + gAIScriptPtr = UNK_2016C00_STRUCT->ptr[UNK_2016C00_STRUCT->unk20]; + return TRUE; + } + else + return FALSE; +} diff --git a/sym_ewram.txt b/sym_ewram.txt index a86ee41d4..865f17dcb 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -435,7 +435,7 @@ gUnknown_020241EC: @ 20241EC gUnknown_020241EE: @ 20241EE .space 0x2 -gUnknown_020241F0: @ 20241F0 +gBattleMoveDamage: @ 20241F0 .space 0x4 gUnknown_020241F4: @ 20241F4 @@ -453,7 +453,7 @@ gUnknown_0202420A: @ 202420A gUnknown_0202420B: @ 202420B .space 0x1 -gUnknown_0202420C: @ 202420C +gEnemyMonIndex: @ 202420C .space 0x1 gUnknown_0202420D: @ 202420D @@ -468,7 +468,7 @@ gUnknown_0202420F: @ 202420F gUnknown_02024210: @ 2024210 .space 0x1 -gUnknown_02024211: @ 2024211 +gCritMultiplier: @ 2024211 .space 0x1 gUnknown_02024212: @ 2024212 @@ -510,7 +510,7 @@ gUnknown_02024270: @ 2024270 gUnknown_02024274: @ 2024274 .space 0x8 -gUnknown_0202427C: @ 202427C +gBattleMoveFlags: @ 202427C .space 0x4 gUnknown_02024280: @ 2024280 @@ -561,7 +561,7 @@ gUnknown_0202433C: @ 202433C gUnknown_0202437C: @ 202437C .space 0x50 -gUnknown_020243CC: @ 20243CC +gBattleWeather: @ 20243CC .space 0x4 gUnknown_020243D0: @ 20243D0 @@ -657,7 +657,7 @@ gUnknown_020244E9: @ 20244E9 gUnknown_020244EA: @ 20244EA .space 0x2 -gUnknown_020244EC: @ 20244EC +gPlayerParty: @ 20244EC .space 0x64 gUnknown_02024550: @ 2024550 @@ -675,7 +675,7 @@ gUnknown_0202467C: @ 202467C gUnknown_020246E0: @ 20246E0 .space 0x64 -gUnknown_02024744: @ 2024744 +gEnemyParty: @ 2024744 .space 0x64 gUnknown_020247A8: @ 20247A8 @@ -1719,7 +1719,7 @@ gUnknown_0203AB34: @ 203AB34 gAIScriptPtr: @ 203AB38 .space 0x4 -gUnknown_0203AB3C: @ 203AB3C +gPlayerMonIndex: @ 203AB3C .space 0x4 gUnknown_0203AB40: @ 203AB40