From 1a9b1a45cae6d547167821601872220853074365 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 4 Sep 2017 15:05:11 +0200 Subject: [PATCH] split battle rodata --- asm/battle_4.s | 904 ++++++++++++------------- asm/battle_controller_linkopponent.s | 142 ++-- asm/menu_helpers.s | 6 +- asm/player_pc.s | 2 +- data/battle_4.s | 50 ++ data/battle_controller_link_opponent.s | 8 + data/battle_controller_link_partner.s | 9 + data/battle_controller_opponent.s | 9 + data/battle_controller_player.s | 8 + data/battle_controller_safari.s | 8 + data/battle_controller_wally.s | 9 + data/data2b.s | 433 ------------ data/data2b_2.s | 30 + data/data2c.s | 110 +++ data/data3.s | 2 - data/rom_8158B30.s | 5 - ld_script.txt | 11 + src/battle_4.c | 595 ++++++++++++++++ 18 files changed, 1374 insertions(+), 967 deletions(-) create mode 100644 data/battle_4.s create mode 100644 data/battle_controller_link_opponent.s create mode 100644 data/battle_controller_link_partner.s create mode 100644 data/battle_controller_opponent.s create mode 100644 data/battle_controller_player.s create mode 100644 data/battle_controller_safari.s create mode 100644 data/battle_controller_wally.s create mode 100644 data/data2b_2.s create mode 100644 data/data2c.s create mode 100644 src/battle_4.c diff --git a/asm/battle_4.s b/asm/battle_4.s index a7e61faec..3fad18089 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -454,8 +454,8 @@ _0804642A: .pool thumb_func_end mcmd_jump_if_move_not_executed - thumb_func_start atk40_801DBA0 -atk40_801DBA0: @ 804643C + thumb_func_start atk40_jump_if_move_affected_by_protect +atk40_jump_if_move_affected_by_protect: @ 804643C push {lr} ldr r1, =gProtectStructs ldr r0, =gBankTarget @@ -500,7 +500,7 @@ _080464A4: pop {r0} bx r0 .pool - thumb_func_end atk40_801DBA0 + thumb_func_end atk40_jump_if_move_affected_by_protect thumb_func_start sub_80464AC sub_80464AC: @ 80464AC @@ -912,7 +912,7 @@ _080467D0: movs r0, 0x32 mov r8, r0 _08046822: - ldr r1, =gUnknown_0831C0F4 + ldr r1, =gAccuracyStageRatios lsls r0, r5, 24 asrs r0, 22 adds r0, r1 @@ -1508,7 +1508,7 @@ _08046D00: cmp r0, 0 bne _08046D70 bl Random - ldr r2, =gUnknown_0831C128 + ldr r2, =gCriticalHitChance lsls r1, r5, 1 adds r1, r2 lsls r0, 16 @@ -1537,8 +1537,8 @@ _08046D74: .pool thumb_func_end atk04_critcalc - thumb_func_start atk05_cmd5 -atk05_cmd5: @ 8046D8C + thumb_func_start atk05_damagecalc1 +atk05_damagecalc1: @ 8046D8C push {r4-r7,lr} sub sp, 0x10 ldr r4, =gUnknown_0202428E @@ -1630,7 +1630,7 @@ _08046E32: pop {r0} bx r0 .pool - thumb_func_end atk05_cmd5 + thumb_func_end atk05_damagecalc1 thumb_func_start sub_8046E7C sub_8046E7C: @ 8046E7C @@ -1834,8 +1834,8 @@ _08047032: bx r0 thumb_func_end battle_attack_damage_modulate_by_effectivity - thumb_func_start sub_8047038 -sub_8047038: @ 8047038 + thumb_func_start atk06_typecalc +atk06_typecalc: @ 8047038 push {r4-r7,lr} mov r7, r8 push {r7} @@ -2108,7 +2108,7 @@ _08047260: pop {r0} bx r0 .pool - thumb_func_end sub_8047038 + thumb_func_end atk06_typecalc thumb_func_start b_wonderguard_and_levitate b_wonderguard_and_levitate: @ 80472A8 @@ -2924,8 +2924,8 @@ _080478EA: .pool thumb_func_end sub_80478B8 - thumb_func_start atk07_cmd7 -atk07_cmd7: @ 80478F4 + thumb_func_start atk07_dmg_adjustment +atk07_dmg_adjustment: @ 80478F4 push {r4-r7,lr} bl Random lsls r0, 16 @@ -3109,10 +3109,10 @@ _08047A84: pop {r0} bx r0 .pool - thumb_func_end atk07_cmd7 + thumb_func_end atk07_dmg_adjustment - thumb_func_start atk08_cmd8 -atk08_cmd8: @ 8047AA4 + thumb_func_start atk08_dmg_adjustment2 +atk08_dmg_adjustment2: @ 8047AA4 push {r4-r7,lr} bl Random lsls r0, 16 @@ -3282,7 +3282,7 @@ _08047C10: pop {r0} bx r0 .pool - thumb_func_end atk08_cmd8 + thumb_func_end atk08_dmg_adjustment2 thumb_func_start atk09_attackanimation atk09_attackanimation: @ 8047C30 @@ -3454,8 +3454,8 @@ _08047DB6: .pool thumb_func_end atk09_attackanimation - thumb_func_start sub_8047DC8 -sub_8047DC8: @ 8047DC8 + thumb_func_start atk0A_waitanimation +atk0A_waitanimation: @ 8047DC8 push {lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -3469,10 +3469,10 @@ _08047DDA: pop {r0} bx r0 .pool - thumb_func_end sub_8047DC8 + thumb_func_end atk0A_waitanimation - thumb_func_start atk0B_graphicalhpupdate -atk0B_graphicalhpupdate: @ 8047DE8 + thumb_func_start atk0B_healthbarupdate +atk0B_healthbarupdate: @ 8047DE8 push {r4,lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -3560,7 +3560,7 @@ _08047EAA: pop {r0} bx r0 .pool - thumb_func_end atk0B_graphicalhpupdate + thumb_func_end atk0B_healthbarupdate thumb_func_start atk0C_datahpupdate atk0C_datahpupdate: @ 8047EC4 @@ -4037,8 +4037,8 @@ _080482F2: .pool thumb_func_end atk0D_critmessage - thumb_func_start atk0E_missmessage -atk0E_missmessage: @ 8048310 + thumb_func_start atk0E_effectiveness_sound +atk0E_effectiveness_sound: @ 8048310 push {r4,lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -4136,7 +4136,7 @@ _080483D0: pop {r0} bx r0 .pool - thumb_func_end atk0E_missmessage + thumb_func_end atk0E_effectiveness_sound thumb_func_start atk0F_resultmessage atk0F_resultmessage: @ 80483E0 @@ -4368,8 +4368,8 @@ _080485BA: .pool thumb_func_end atk10_printstring - thumb_func_start atk11_printstring2 -atk11_printstring2: @ 80485D0 + thumb_func_start atk11_printstring_playeronly +atk11_printstring_playeronly: @ 80485D0 push {r4,r5,lr} ldr r5, =gActiveBank ldr r0, =gBankAttacker @@ -4395,7 +4395,7 @@ atk11_printstring2: @ 80485D0 pop {r0} bx r0 .pool - thumb_func_end atk11_printstring2 + thumb_func_end atk11_printstring_playeronly thumb_func_start atk12_waitmessage atk12_waitmessage: @ 8048614 @@ -4480,8 +4480,8 @@ _080486AE: .pool thumb_func_end atk13_printfromtable - thumb_func_start atk14_printfromtable2 -atk14_printfromtable2: @ 80486C4 + thumb_func_start atk14_printfromtable_playeronly +atk14_printfromtable_playeronly: @ 80486C4 push {r4-r6,lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -4522,7 +4522,7 @@ _0804870E: pop {r0} bx r0 .pool - thumb_func_end atk14_printfromtable2 + thumb_func_end atk14_printfromtable_playeronly thumb_func_start sub_8048728 sub_8048728: @ 8048728 @@ -4726,7 +4726,7 @@ _080488FC: bls _08048906 b _08048F40 _08048906: - ldr r1, =gUnknown_0831C134 + ldr r1, =gStatusFlagsForMoveEffects ldr r2, =gBattleCommunication ldrb r0, [r2, 0x3] lsls r0, 2 @@ -5350,7 +5350,7 @@ _08048DFC: ldr r0, [r0] adds r0, 0x1 bl b_movescr_stack_push - ldr r1, =gUnknown_0831C134 + ldr r1, =gStatusFlagsForMoveEffects ldr r0, =gBattleCommunication ldrb r0, [r0, 0x3] lsls r0, 2 @@ -5387,7 +5387,7 @@ _08048E50: str r0, [r1] _08048E64: ldr r2, =gBattlescriptCurrInstr - ldr r1, =gUnknown_0831C224 + ldr r1, =gMoveEffectBS_Ptrs ldr r5, =gBattleCommunication ldrb r0, [r5, 0x3] lsls r0, 2 @@ -5476,7 +5476,7 @@ _08048F40: mov r0, r8 adds r0, 0x50 adds r1, r0 - ldr r2, =gUnknown_0831C134 + ldr r2, =gStatusFlagsForMoveEffects ldr r0, =gBattleCommunication ldrb r3, [r0, 0x3] lsls r0, r3, 2 @@ -5597,7 +5597,7 @@ _0804908A: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r1, =gUnknown_0831C224 + ldr r1, =gMoveEffectBS_Ptrs ldr r0, =gBattleCommunication ldrb r0, [r0, 0x3] lsls r0, 2 @@ -5651,7 +5651,7 @@ _0804912A: mov r0, r8 adds r0, 0x50 adds r2, r0 - ldr r1, =gUnknown_0831C134 + ldr r1, =gStatusFlagsForMoveEffects ldr r0, =gBattleCommunication ldrb r0, [r0, 0x3] lsls r0, 2 @@ -5705,7 +5705,7 @@ _08049178: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r1, =gUnknown_0831C224 + ldr r1, =gMoveEffectBS_Ptrs ldr r0, =gBattleCommunication ldrb r0, [r0, 0x3] lsls r0, 2 @@ -5746,7 +5746,7 @@ _08049210: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r1, =gUnknown_0831C224 + ldr r1, =gMoveEffectBS_Ptrs ldr r0, =gBattleCommunication ldrb r0, [r0, 0x3] lsls r0, 2 @@ -5867,7 +5867,7 @@ _080492E0: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r1, =gUnknown_0831C224 + ldr r1, =gMoveEffectBS_Ptrs ldr r2, =gBattleCommunication ldrb r0, [r2, 0x3] lsls r0, 2 @@ -5922,7 +5922,7 @@ _080493A8: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r1, =gUnknown_0831C224 + ldr r1, =gMoveEffectBS_Ptrs ldr r0, =gBattleCommunication ldrb r0, [r0, 0x3] lsls r0, 2 @@ -6402,7 +6402,7 @@ _08049836: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r1, =gUnknown_0831C224 + ldr r1, =gMoveEffectBS_Ptrs ldr r0, =gBattleCommunication ldrb r0, [r0, 0x3] lsls r0, 2 @@ -6671,28 +6671,28 @@ _08049AA2: .pool thumb_func_end atk15_seteffectwithchancetarget - thumb_func_start sub_8049AC0 -sub_8049AC0: @ 8049AC0 + thumb_func_start atk16_seteffectprimary +atk16_seteffectprimary: @ 8049AC0 push {lr} movs r0, 0x1 movs r1, 0 bl sub_8048760 pop {r0} bx r0 - thumb_func_end sub_8049AC0 + thumb_func_end atk16_seteffectprimary - thumb_func_start sub_8049AD0 -sub_8049AD0: @ 8049AD0 + thumb_func_start atk17_seteffectsecondary +atk17_seteffectsecondary: @ 8049AD0 push {lr} movs r0, 0 movs r1, 0 bl sub_8048760 pop {r0} bx r0 - thumb_func_end sub_8049AD0 + thumb_func_end atk17_seteffectsecondary - thumb_func_start sub_8049AE0 -sub_8049AE0: @ 8049AE0 + thumb_func_start atk18_status_effect_clear +atk18_status_effect_clear: @ 8049AE0 push {lr} ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] @@ -6719,7 +6719,7 @@ _08049B14: adds r1, 0x50 _08049B1E: adds r2, r1 - ldr r1, =gUnknown_0831C134 + ldr r1, =gStatusFlagsForMoveEffects ldrb r0, [r3, 0x3] lsls r0, 2 adds r0, r1 @@ -6739,10 +6739,10 @@ _08049B1E: pop {r0} bx r0 .pool - thumb_func_end sub_8049AE0 + thumb_func_end atk18_status_effect_clear - thumb_func_start atk19_faintpokemon -atk19_faintpokemon: @ 8049B5C + thumb_func_start atk19_faint_pokemon +atk19_faint_pokemon: @ 8049B5C push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -7048,10 +7048,10 @@ _08049E32: pop {r4-r7} pop {r0} bx r0 - thumb_func_end atk19_faintpokemon + thumb_func_end atk19_faint_pokemon - thumb_func_start sub_8049E40 -sub_8049E40: @ 8049E40 + thumb_func_start atk1A_faint_animation +atk1A_faint_animation: @ 8049E40 push {r4,r5,lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -7075,10 +7075,10 @@ _08049E6A: pop {r0} bx r0 .pool - thumb_func_end sub_8049E40 + thumb_func_end atk1A_faint_animation - thumb_func_start sub_8049E7C -sub_8049E7C: @ 8049E7C + thumb_func_start atk1B_faint_effects_clear +atk1B_faint_effects_clear: @ 8049E7C push {r4,r5,lr} sub sp, 0x4 ldr r0, =gBattleExecBuffer @@ -7137,7 +7137,7 @@ _08049EE8: pop {r0} bx r0 .pool - thumb_func_end sub_8049E7C + thumb_func_end atk1B_faint_effects_clear thumb_func_start atk1C_jumpifstatus atk1C_jumpifstatus: @ 8049F04 @@ -7198,8 +7198,8 @@ _08049F70: .pool thumb_func_end atk1C_jumpifstatus - thumb_func_start atk1D_jumpifsecondarystatus -atk1D_jumpifsecondarystatus: @ 8049F7C + thumb_func_start atk1D_jumpifstatus2 +atk1D_jumpifstatus2: @ 8049F7C push {r4,r5,lr} ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] @@ -7255,7 +7255,7 @@ _08049FE8: pop {r0} bx r0 .pool - thumb_func_end atk1D_jumpifsecondarystatus + thumb_func_end atk1D_jumpifstatus2 thumb_func_start atk1E_jumpifability atk1E_jumpifability: @ 8049FF4 @@ -7362,8 +7362,8 @@ _0804A0CE: bx r0 thumb_func_end atk1E_jumpifability - thumb_func_start sub_804A0DC -sub_804A0DC: @ 804A0DC + thumb_func_start atk1F_jumpifsideaffecting +atk1F_jumpifsideaffecting: @ 804A0DC push {r4-r6,lr} ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] @@ -7416,10 +7416,10 @@ _0804A14E: pop {r4-r6} pop {r0} bx r0 - thumb_func_end sub_804A0DC + thumb_func_end atk1F_jumpifsideaffecting - thumb_func_start sub_804A154 -sub_804A154: @ 804A154 + thumb_func_start atk20_jumpifstat +atk20_jumpifstat: @ 804A154 push {r4,r5,lr} movs r5, 0 ldr r4, =gBattlescriptCurrInstr @@ -7534,10 +7534,10 @@ _0804A240: pop {r0} bx r0 .pool - thumb_func_end sub_804A154 + thumb_func_end atk20_jumpifstat - thumb_func_start atk21_jumpifspecialstatusflag -atk21_jumpifspecialstatusflag: @ 804A24C + thumb_func_start atk21_jumpifstatus3 +atk21_jumpifstatus3: @ 804A24C push {r4-r6,lr} ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] @@ -7600,10 +7600,10 @@ _0804A2CA: pop {r4-r6} pop {r0} bx r0 - thumb_func_end atk21_jumpifspecialstatusflag + thumb_func_end atk21_jumpifstatus3 - thumb_func_start sub_804A2D0 -sub_804A2D0: @ 804A2D0 + thumb_func_start atk22_jumpiftype +atk22_jumpiftype: @ 804A2D0 push {r4-r6,lr} ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] @@ -7648,10 +7648,10 @@ _0804A324: pop {r4-r6} pop {r0} bx r0 - thumb_func_end sub_804A2D0 + thumb_func_end atk22_jumpiftype - thumb_func_start sub_804A32C -sub_804A32C: @ 804A32C + thumb_func_start atk23_getexp +atk23_getexp: @ 804A32C push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -8696,10 +8696,10 @@ _0804ACB2: pop {r0} bx r0 .pool - thumb_func_end sub_804A32C + thumb_func_end atk23_getexp - thumb_func_start sub_804ACD0 -sub_804ACD0: @ 804ACD0 + thumb_func_start atk24 +atk24: @ 804ACD0 push {r4-r7,lr} mov r7, r8 push {r7} @@ -8985,7 +8985,7 @@ _0804AF22: pop {r0} bx r0 .pool - thumb_func_end sub_804ACD0 + thumb_func_end atk24 thumb_func_start sub_804AF30 sub_804AF30: @ 804AF30 @@ -9012,8 +9012,8 @@ sub_804AF30: @ 804AF30 .pool thumb_func_end sub_804AF30 - thumb_func_start atk25_cmd25 -atk25_cmd25: @ 804AF70 + thumb_func_start atk25_move_values_cleanup +atk25_move_values_cleanup: @ 804AF70 push {lr} bl sub_804AF30 ldr r1, =gBattlescriptCurrInstr @@ -9023,10 +9023,10 @@ atk25_cmd25: @ 804AF70 pop {r0} bx r0 .pool - thumb_func_end atk25_cmd25 + thumb_func_end atk25_move_values_cleanup - thumb_func_start atk26_80225F0_storebyteforjump -atk26_80225F0_storebyteforjump: @ 804AF88 + thumb_func_start atk26_set_multihit +atk26_set_multihit: @ 804AF88 ldr r3, =gUnknown_02024212 ldr r2, =gBattlescriptCurrInstr ldr r0, [r2] @@ -9036,10 +9036,10 @@ atk26_80225F0_storebyteforjump: @ 804AF88 str r0, [r2] bx lr .pool - thumb_func_end atk26_80225F0_storebyteforjump + thumb_func_end atk26_set_multihit - thumb_func_start atk27_cmd27 -atk27_cmd27: @ 804AFA0 + thumb_func_start atk27_decrement_multihit +atk27_decrement_multihit: @ 804AFA0 push {lr} ldr r1, =gUnknown_02024212 ldrb r0, [r1] @@ -9072,7 +9072,7 @@ _0804AFDE: pop {r0} bx r0 .pool - thumb_func_end atk27_cmd27 + thumb_func_end atk27_decrement_multihit thumb_func_start atk28_goto atk28_goto: @ 804AFE8 @@ -9177,8 +9177,8 @@ _0804B0A0: bx r0 thumb_func_end atk29_jumpifbyte - thumb_func_start sub_804B0A8 -sub_804B0A8: @ 804B0A8 + thumb_func_start atk2A_jumpifhalfword +atk2A_jumpifhalfword: @ 804B0A8 push {r4-r6,lr} ldr r3, =gBattlescriptCurrInstr ldr r1, [r3] @@ -9262,10 +9262,10 @@ _0804B148: pop {r4-r6} pop {r0} bx r0 - thumb_func_end sub_804B0A8 + thumb_func_end atk2A_jumpifhalfword - thumb_func_start sub_804B150 -sub_804B150: @ 804B150 + thumb_func_start atk2B_jumpifword +atk2B_jumpifword: @ 804B150 push {r4-r6,lr} ldr r3, =gBattlescriptCurrInstr ldr r1, [r3] @@ -9355,10 +9355,10 @@ _0804B1FC: pop {r4-r6} pop {r0} bx r0 - thumb_func_end sub_804B150 + thumb_func_end atk2B_jumpifword - thumb_func_start sub_804B204 -sub_804B204: @ 804B204 + thumb_func_start atk2C_jumpifarrayequal +atk2C_jumpifarrayequal: @ 804B204 push {r4-r7,lr} ldr r2, =gBattlescriptCurrInstr ldr r3, [r2] @@ -9429,10 +9429,10 @@ _0804B284: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_804B204 + thumb_func_end atk2C_jumpifarrayequal - thumb_func_start sub_804B28C -sub_804B28C: @ 804B28C + thumb_func_start atk2D_jumpifarraynotequal +atk2D_jumpifarraynotequal: @ 804B28C push {r4-r7,lr} movs r7, 0 ldr r3, =gBattlescriptCurrInstr @@ -9502,10 +9502,10 @@ _0804B308: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_804B28C + thumb_func_end atk2D_jumpifarraynotequal - thumb_func_start sub_804B310 -sub_804B310: @ 804B310 + thumb_func_start atk2E_setbyte +atk2E_setbyte: @ 804B310 ldr r3, =gBattlescriptCurrInstr ldr r2, [r3] ldrb r1, [r2, 0x1] @@ -9525,10 +9525,10 @@ sub_804B310: @ 804B310 str r0, [r3] bx lr .pool - thumb_func_end sub_804B310 + thumb_func_end atk2E_setbyte - thumb_func_start sub_804B338 -sub_804B338: @ 804B338 + thumb_func_start atk2F_addbyte +atk2F_addbyte: @ 804B338 ldr r3, =gBattlescriptCurrInstr ldr r2, [r3] ldrb r1, [r2, 0x1] @@ -9550,10 +9550,10 @@ sub_804B338: @ 804B338 str r0, [r3] bx lr .pool - thumb_func_end sub_804B338 + thumb_func_end atk2F_addbyte - thumb_func_start sub_804B364 -sub_804B364: @ 804B364 + thumb_func_start atk30_subbyte +atk30_subbyte: @ 804B364 ldr r3, =gBattlescriptCurrInstr ldr r2, [r3] ldrb r1, [r2, 0x1] @@ -9575,7 +9575,7 @@ sub_804B364: @ 804B364 str r0, [r3] bx lr .pool - thumb_func_end sub_804B364 + thumb_func_end atk30_subbyte thumb_func_start atk31_copyarray atk31_copyarray: @ 804B390 @@ -9624,8 +9624,8 @@ _0804B3D4: .pool thumb_func_end atk31_copyarray - thumb_func_start atk32_memcpy_with_offset -atk32_memcpy_with_offset: @ 804B3E4 + thumb_func_start atk32_copyarray_withindex +atk32_copyarray_withindex: @ 804B3E4 push {r4-r7,lr} ldr r3, =gBattlescriptCurrInstr ldr r1, [r3] @@ -9681,7 +9681,7 @@ _0804B440: pop {r0} bx r0 .pool - thumb_func_end atk32_memcpy_with_offset + thumb_func_end atk32_copyarray_withindex thumb_func_start atk33_orbyte atk33_orbyte: @ 804B450 @@ -9900,8 +9900,8 @@ _0804B5CC: .pool thumb_func_end atk39_pause - thumb_func_start sub_804B5E0 -sub_804B5E0: @ 804B5E0 + thumb_func_start atk3A_waitstate +atk3A_waitstate: @ 804B5E0 push {lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -9915,10 +9915,10 @@ _0804B5F2: pop {r0} bx r0 .pool - thumb_func_end sub_804B5E0 + thumb_func_end atk3A_waitstate - thumb_func_start atk3B_8022C68 -atk3B_8022C68: @ 804B600 + thumb_func_start atk3B_healthbar_update +atk3B_healthbar_update: @ 804B600 push {lr} ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] @@ -9949,7 +9949,7 @@ _0804B624: pop {r0} bx r0 .pool - thumb_func_end atk3B_8022C68 + thumb_func_end atk3B_healthbar_update thumb_func_start atk3C_return atk3C_return: @ 804B658 @@ -9959,8 +9959,8 @@ atk3C_return: @ 804B658 bx r0 thumb_func_end atk3C_return - thumb_func_start sub_804B664 -sub_804B664: @ 804B664 + thumb_func_start atk3D_end +atk3D_end: @ 804B664 push {lr} ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -9984,7 +9984,7 @@ _0804B67C: pop {r0} bx r0 .pool - thumb_func_end sub_804B664 + thumb_func_end atk3D_end thumb_func_start atk3E_end2 atk3E_end2: @ 804B6A4 @@ -10100,8 +10100,8 @@ _0804B77C: bx r0 thumb_func_end atk42_jumpiftype2 - thumb_func_start sub_804B784 -sub_804B784: @ 804B784 + thumb_func_start atk43_jumpifabilitypresent +atk43_jumpifabilitypresent: @ 804B784 push {r4,lr} sub sp, 0x4 ldr r4, =gBattlescriptCurrInstr @@ -10139,10 +10139,10 @@ _0804B7C6: pop {r4} pop {r0} bx r0 - thumb_func_end sub_804B784 + thumb_func_end atk43_jumpifabilitypresent - thumb_func_start sub_804B7D0 -sub_804B7D0: @ 804B7D0 + thumb_func_start atk44 +atk44: @ 804B7D0 ldr r0, =gBankAttacker ldrb r0, [r0] ldr r1, =gBattleStruct @@ -10153,10 +10153,10 @@ sub_804B7D0: @ 804B7D0 strb r1, [r0] bx lr .pool - thumb_func_end sub_804B7D0 + thumb_func_end atk44 - thumb_func_start atk46_cmd46 -atk46_cmd46: @ 804B7EC + thumb_func_start atk45_playanimation +atk45_playanimation: @ 804B7EC push {r4-r6,lr} ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] @@ -10244,10 +10244,10 @@ _0804B8AA: pop {r4-r6} pop {r0} bx r0 - thumb_func_end atk46_cmd46 + thumb_func_end atk45_playanimation - thumb_func_start sub_804B8B0 -sub_804B8B0: @ 804B8B0 + thumb_func_start atk46_playanimation2 +atk46_playanimation2: @ 804B8B0 push {r4-r7,lr} ldr r6, =gBattlescriptCurrInstr ldr r0, [r6] @@ -10342,10 +10342,10 @@ _0804B976: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_804B8B0 + thumb_func_end atk46_playanimation2 - thumb_func_start sub_804B97C -sub_804B97C: @ 804B97C + thumb_func_start atk47_setgraphicalstatchangevalues +atk47_setgraphicalstatchangevalues: @ 804B97C push {r4,lr} movs r3, 0 ldr r1, =gBattleScripting @@ -10395,7 +10395,7 @@ _0804B9B4: pop {r0} bx r0 .pool - thumb_func_end sub_804B97C + thumb_func_end atk47_setgraphicalstatchangevalues thumb_func_start atk48_playstatchangeanimation atk48_playstatchangeanimation: @ 804B9D8 @@ -10647,8 +10647,8 @@ _0804BBBA: bx r0 thumb_func_end atk48_playstatchangeanimation - thumb_func_start sub_804BBCC -sub_804BBCC: @ 804BBCC + thumb_func_start atk49_moveendturn +atk49_moveendturn: @ 804BBCC push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -11768,10 +11768,10 @@ _0804C5BA: pop {r0} bx r0 .pool - thumb_func_end sub_804BBCC + thumb_func_end atk49_moveendturn - thumb_func_start atk4A_damagecalc2 -atk4A_damagecalc2: @ 804C5F4 + thumb_func_start atk4A_typecalc2 +atk4A_typecalc2: @ 804C5F4 push {r4-r7,lr} mov r7, r8 push {r7} @@ -12037,10 +12037,10 @@ _0804C804: pop {r0} bx r0 .pool - thumb_func_end atk4A_damagecalc2 + thumb_func_end atk4A_typecalc2 - thumb_func_start atk4B_cmd4b -atk4B_cmd4b: @ 804C844 + thumb_func_start atk4B_return_atk_to_ball +atk4B_return_atk_to_ball: @ 804C844 push {r4,lr} ldr r4, =gActiveBank ldr r0, =gBankAttacker @@ -12071,10 +12071,10 @@ _0804C872: pop {r0} bx r0 .pool - thumb_func_end atk4B_cmd4b + thumb_func_end atk4B_return_atk_to_ball - thumb_func_start atk4C_switch1 -atk4C_switch1: @ 804C894 + thumb_func_start atk4C_copy_poke_data +atk4C_copy_poke_data: @ 804C894 push {r4,r5,lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -12117,10 +12117,10 @@ _0804C8E4: pop {r0} bx r0 .pool - thumb_func_end atk4C_switch1 + thumb_func_end atk4C_copy_poke_data - thumb_func_start sub_804C904 -sub_804C904: @ 804C904 + thumb_func_start atk4D_switch_data_update +atk4D_switch_data_update: @ 804C904 push {r4-r7,lr} sub sp, 0x58 ldr r0, =gBattleExecBuffer @@ -12336,10 +12336,10 @@ _0804CAA4: pop {r0} bx r0 .pool - thumb_func_end sub_804C904 + thumb_func_end atk4D_switch_data_update - thumb_func_start atk4E_switch3 -atk4E_switch3: @ 804CAE8 + thumb_func_start atk4E_switchin_anim +atk4E_switchin_anim: @ 804CAE8 push {r4-r6,lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -12418,10 +12418,10 @@ _0804CB86: pop {r0} bx r0 .pool - thumb_func_end atk4E_switch3 + thumb_func_end atk4E_switchin_anim - thumb_func_start atk4F_jumpifcannotswitch -atk4F_jumpifcannotswitch: @ 804CBB0 + thumb_func_start atk4F_jump_if_cannot_switch +atk4F_jump_if_cannot_switch: @ 804CBB0 push {r4-r7,lr} mov r7, r8 push {r7} @@ -12816,7 +12816,7 @@ _0804CF00: pop {r0} bx r0 .pool - thumb_func_end atk4F_jumpifcannotswitch + thumb_func_end atk4F_jump_if_cannot_switch thumb_func_start sub_804CF10 sub_804CF10: @ 804CF10 @@ -13824,8 +13824,8 @@ _0804D804: .pool thumb_func_end atk50_openpartyscreen - thumb_func_start atk51_cmd51 -atk51_cmd51: @ 804D820 + thumb_func_start atk51_switch_handle_order +atk51_switch_handle_order: @ 804D820 push {r4-r7,lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -14122,10 +14122,10 @@ _0804DA8A: pop {r0} bx r0 .pool - thumb_func_end atk51_cmd51 + thumb_func_end atk51_switch_handle_order - thumb_func_start atk52_cmd52 -atk52_cmd52: @ 804DAAC + thumb_func_start atk52_switch_in_effects +atk52_switch_in_effects: @ 804DAAC push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -14457,10 +14457,10 @@ _0804DD8E: pop {r0} bx r0 .pool - thumb_func_end atk52_cmd52 + thumb_func_end atk52_switch_in_effects - thumb_func_start sub_804DDA8 -sub_804DDA8: @ 804DDA8 + thumb_func_start atk53_trainer_slide +atk53_trainer_slide: @ 804DDA8 push {r4,r5,lr} ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] @@ -14479,10 +14479,10 @@ sub_804DDA8: @ 804DDA8 pop {r0} bx r0 .pool - thumb_func_end sub_804DDA8 + thumb_func_end atk53_trainer_slide - thumb_func_start atk54_802511C -atk54_802511C: @ 804DDD8 + thumb_func_start atk54_effectiveness_sound +atk54_effectiveness_sound: @ 804DDD8 push {r4,r5,lr} ldr r5, =gActiveBank ldr r0, =gBankAttacker @@ -14505,10 +14505,10 @@ atk54_802511C: @ 804DDD8 pop {r0} bx r0 .pool - thumb_func_end atk54_802511C + thumb_func_end atk54_effectiveness_sound - thumb_func_start sub_804DE14 -sub_804DE14: @ 804DE14 + thumb_func_start atk55_play_sound +atk55_play_sound: @ 804DE14 push {r4,r5,lr} ldr r5, =gActiveBank ldr r0, =gBankAttacker @@ -14532,10 +14532,10 @@ sub_804DE14: @ 804DE14 pop {r0} bx r0 .pool - thumb_func_end sub_804DE14 + thumb_func_end atk55_play_sound - thumb_func_start atk56_8025194 -atk56_8025194: @ 804DE50 + thumb_func_start atk56_fainting_cry +atk56_fainting_cry: @ 804DE50 push {r4,r5,lr} ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] @@ -14554,10 +14554,10 @@ atk56_8025194: @ 804DE50 pop {r0} bx r0 .pool - thumb_func_end atk56_8025194 + thumb_func_end atk56_fainting_cry - thumb_func_start atk57_80251C4_flee -atk57_80251C4_flee: @ 804DE80 + thumb_func_start atk57 +atk57: @ 804DE80 push {r4,lr} movs r0, 0 bl GetBankByPlayerAI @@ -14577,10 +14577,10 @@ atk57_80251C4_flee: @ 804DE80 pop {r0} bx r0 .pool - thumb_func_end atk57_80251C4_flee + thumb_func_end atk57 - thumb_func_start atk58_cmd58 -atk58_cmd58: @ 804DEB8 + thumb_func_start atk58_return_to_ball +atk58_return_to_ball: @ 804DEB8 push {r4,r5,lr} ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] @@ -14600,10 +14600,10 @@ atk58_cmd58: @ 804DEB8 pop {r0} bx r0 .pool - thumb_func_end atk58_cmd58 + thumb_func_end atk58_return_to_ball - thumb_func_start atk59_8025230 -atk59_8025230: @ 804DEEC + thumb_func_start atk59_learnmove_inbattle +atk59_learnmove_inbattle: @ 804DEEC push {r4-r7,lr} ldr r0, =gBattlescriptCurrInstr ldr r2, [r0] @@ -14749,10 +14749,10 @@ _0804E018: pop {r0} bx r0 .pool - thumb_func_end atk59_8025230 + thumb_func_end atk59_learnmove_inbattle - thumb_func_start sub_804E038 -sub_804E038: @ 804E038 + thumb_func_start atk5A +atk5A: @ 804E038 push {r4-r7,lr} mov r7, r8 push {r7} @@ -15133,7 +15133,7 @@ _0804E3B8: pop {r0} bx r0 .pool - thumb_func_end sub_804E038 + thumb_func_end atk5A thumb_func_start atk5B_80256E0 atk5B_80256E0: @ 804E3C8 @@ -15280,8 +15280,8 @@ _0804E4FA: .pool thumb_func_end atk5B_80256E0 - thumb_func_start atk5C_cmd5c -atk5C_cmd5c: @ 804E508 + thumb_func_start atk5C_hitanimation +atk5C_hitanimation: @ 804E508 push {r4,lr} ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] @@ -15342,7 +15342,7 @@ _0804E592: pop {r4} pop {r0} bx r0 - thumb_func_end atk5C_cmd5c + thumb_func_end atk5C_hitanimation thumb_func_start sub_804E598 sub_804E598: @ 804E598 @@ -15510,8 +15510,8 @@ _0804E6CA: bx r1 thumb_func_end sub_804E598 - thumb_func_start sub_804E6D8 -sub_804E6D8: @ 804E6D8 + thumb_func_start atk5D_getmoneyreward +atk5D_getmoneyreward: @ 804E6D8 push {r4,lr} ldr r0, =gUnknown_02038BCA ldrh r0, [r0] @@ -15568,7 +15568,7 @@ _0804E6FC: pop {r0} bx r0 .pool - thumb_func_end sub_804E6D8 + thumb_func_end atk5D_getmoneyreward thumb_func_start atk5E_8025A70 atk5E_8025A70: @ 804E764 @@ -15690,8 +15690,8 @@ _0804E856: .pool thumb_func_end atk5F_8025B24 - thumb_func_start atk60_cmd60 -atk60_cmd60: @ 804E868 + thumb_func_start atk60_increment_gamestat +atk60_increment_gamestat: @ 804E868 push {lr} ldr r0, =gBankAttacker ldrb r0, [r0] @@ -15711,7 +15711,7 @@ _0804E882: pop {r0} bx r0 .pool - thumb_func_end atk60_cmd60 + thumb_func_end atk60_increment_gamestat thumb_func_start atk61_8025BA4 atk61_8025BA4: @ 804E898 @@ -15823,8 +15823,8 @@ atk62_08025C6C: @ 804E960 .pool thumb_func_end atk62_08025C6C - thumb_func_start atk63_jumptoattack -atk63_jumptoattack: @ 804E990 + thumb_func_start atk63_jumptorandomattack +atk63_jumptorandomattack: @ 804E990 push {r4,lr} ldr r0, =gBattlescriptCurrInstr ldr r1, [r0] @@ -15863,7 +15863,7 @@ _0804E9C2: pop {r0} bx r0 .pool - thumb_func_end atk63_jumptoattack + thumb_func_end atk63_jumptorandomattack thumb_func_start atk64_statusanimation atk64_statusanimation: @ 804E9F4 @@ -15924,8 +15924,8 @@ _0804EA5C: .pool thumb_func_end atk64_statusanimation - thumb_func_start atk65_8025D90 -atk65_8025D90: @ 804EA84 + thumb_func_start atk65_status2animation +atk65_status2animation: @ 804EA84 push {r4,r5,lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -15993,10 +15993,10 @@ _0804EB04: pop {r0} bx r0 .pool - thumb_func_end atk65_8025D90 + thumb_func_end atk65_status2animation - thumb_func_start atk66_8025E38 -atk66_8025E38: @ 804EB2C + thumb_func_start atk66_chosenstatusanimation +atk66_chosenstatusanimation: @ 804EB2C push {r4,r5,lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -16057,7 +16057,7 @@ _0804EB9E: pop {r0} bx r0 .pool - thumb_func_end atk66_8025E38 + thumb_func_end atk66_chosenstatusanimation thumb_func_start atk67_8025ECC atk67_8025ECC: @ 804EBC0 @@ -16163,8 +16163,8 @@ _0804EC96: .pool thumb_func_end atk67_8025ECC - thumb_func_start sub_804ECA4 -sub_804ECA4: @ 804ECA4 + thumb_func_start atk68_80246A0 +atk68_80246A0: @ 804ECA4 push {r4,r5,lr} movs r1, 0 ldr r2, =gNoOfAllBanks @@ -16189,10 +16189,10 @@ _0804ECC2: pop {r0} bx r0 .pool - thumb_func_end sub_804ECA4 + thumb_func_end atk68_80246A0 - thumb_func_start atk69_8025FE0 -atk69_8025FE0: @ 804ECDC + thumb_func_start atk69_dmg_adjustment2 +atk69_dmg_adjustment2: @ 804ECDC push {r4-r7,lr} ldr r7, =gBattleMons ldr r6, =gBankTarget @@ -16353,10 +16353,10 @@ _0804EE38: pop {r0} bx r0 .pool - thumb_func_end atk69_8025FE0 + thumb_func_end atk69_dmg_adjustment2 - thumb_func_start atk6A_stash_item_for_side -atk6A_stash_item_for_side: @ 804EE58 + thumb_func_start atk6A_removeitem +atk6A_removeitem: @ 804EE58 push {r4-r6,lr} sub sp, 0x4 ldr r6, =gBattlescriptCurrInstr @@ -16403,10 +16403,10 @@ atk6A_stash_item_for_side: @ 804EE58 pop {r0} bx r0 .pool - thumb_func_end atk6A_stash_item_for_side + thumb_func_end atk6A_removeitem - thumb_func_start atk6B_end_battle_80261CC -atk6B_end_battle_80261CC: @ 804EEC8 + thumb_func_start atk6B_atknameinbuff1 +atk6B_atknameinbuff1: @ 804EEC8 ldr r1, =gBattleTextBuff1 movs r0, 0xFD strb r0, [r1] @@ -16429,10 +16429,10 @@ atk6B_end_battle_80261CC: @ 804EEC8 str r0, [r1] bx lr .pool - thumb_func_end atk6B_end_battle_80261CC + thumb_func_end atk6B_atknameinbuff1 - thumb_func_start atk6C_8026208 -atk6C_8026208: @ 804EF04 + thumb_func_start atk6C_lvlbox_display +atk6C_lvlbox_display: @ 804EF04 push {r4,lr} sub sp, 0x4 ldr r0, =gBattleScripting @@ -16641,7 +16641,7 @@ _0804F0F2: pop {r0} bx r0 .pool - thumb_func_end atk6C_8026208 + thumb_func_end atk6C_lvlbox_display thumb_func_start sub_804F100 sub_804F100: @ 804F100 @@ -17097,8 +17097,8 @@ _0804F4CE: bx r1 thumb_func_end sub_804F498 - thumb_func_start sub_804F4D4 -sub_804F4D4: @ 804F4D4 + thumb_func_start atk6D_set_sentpokes_values +atk6D_set_sentpokes_values: @ 804F4D4 push {lr} bl sub_803F988 ldr r1, =gBattlescriptCurrInstr @@ -17108,10 +17108,10 @@ sub_804F4D4: @ 804F4D4 pop {r0} bx r0 .pool - thumb_func_end sub_804F4D4 + thumb_func_end atk6D_set_sentpokes_values - thumb_func_start atk6E_state0_side_becomes_attacker -atk6E_state0_side_becomes_attacker: @ 804F4EC + thumb_func_start atk6E_set_atk_to_player0 +atk6E_set_atk_to_player0: @ 804F4EC push {lr} movs r0, 0 bl GetBankByPlayerAI @@ -17124,10 +17124,10 @@ atk6E_state0_side_becomes_attacker: @ 804F4EC pop {r0} bx r0 .pool - thumb_func_end atk6E_state0_side_becomes_attacker + thumb_func_end atk6E_set_atk_to_player0 - thumb_func_start atk6F_8026810 -atk6F_8026810: @ 804F50C + thumb_func_start atk6F_set_visible +atk6F_set_visible: @ 804F50C push {r4,r5,lr} ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] @@ -17147,10 +17147,10 @@ atk6F_8026810: @ 804F50C pop {r0} bx r0 .pool - thumb_func_end atk6F_8026810 + thumb_func_end atk6F_set_visible - thumb_func_start atk70_record_ability_usage_of_side -atk70_record_ability_usage_of_side: @ 804F540 + thumb_func_start atk70_record_ability +atk70_record_ability: @ 804F540 push {r4,lr} ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] @@ -17169,7 +17169,7 @@ atk70_record_ability_usage_of_side: @ 804F540 pop {r0} bx r0 .pool - thumb_func_end atk70_record_ability_usage_of_side + thumb_func_end atk70_record_ability thumb_func_start sub_804F574 sub_804F574: @ 804F574 @@ -17192,8 +17192,8 @@ sub_804F574: @ 804F574 .pool thumb_func_end sub_804F574 - thumb_func_start atk71_80268A0 -atk71_80268A0: @ 804F59C + thumb_func_start atk71_buffer_move_to_learn +atk71_buffer_move_to_learn: @ 804F59C push {lr} bl sub_804F574 ldr r1, =gBattlescriptCurrInstr @@ -17203,10 +17203,10 @@ atk71_80268A0: @ 804F59C pop {r0} bx r0 .pool - thumb_func_end atk71_80268A0 + thumb_func_end atk71_buffer_move_to_learn - thumb_func_start atk72_flee -atk72_flee: @ 804F5B4 + thumb_func_start atk72_jump_if_can_run_frombattle +atk72_jump_if_can_run_frombattle: @ 804F5B4 push {lr} ldr r0, =gUnknown_0202420D ldrb r0, [r0] @@ -17238,10 +17238,10 @@ _0804F5F0: pop {r0} bx r0 .pool - thumb_func_end atk72_flee + thumb_func_end atk72_jump_if_can_run_frombattle - thumb_func_start atk73_cmd73 -atk73_cmd73: @ 804F5F8 + thumb_func_start atk73_hp_thresholds +atk73_hp_thresholds: @ 804F5F8 push {r4-r6,lr} ldr r0, =gBattleTypeFlags ldr r4, [r0] @@ -17317,10 +17317,10 @@ _0804F68E: pop {r0} bx r0 .pool - thumb_func_end atk73_cmd73 + thumb_func_end atk73_hp_thresholds - thumb_func_start atk74_hp_tresholds_2 -atk74_hp_tresholds_2: @ 804F6A4 + thumb_func_start atk74_hp_thresholds2 +atk74_hp_thresholds2: @ 804F6A4 push {r4-r7,lr} mov r7, r8 push {r7} @@ -17401,7 +17401,7 @@ _0804F73E: pop {r0} bx r0 .pool - thumb_func_end atk74_hp_tresholds_2 + thumb_func_end atk74_hp_thresholds2 thumb_func_start atk75_8026A58 atk75_8026A58: @ 804F754 @@ -17438,8 +17438,8 @@ atk75_8026A58: @ 804F754 .pool thumb_func_end atk75_8026A58 - thumb_func_start sub_804F7AC -sub_804F7AC: @ 804F7AC + thumb_func_start atk76_various +atk76_various: @ 804F7AC push {r4-r7,lr} mov r7, r8 push {r7} @@ -18051,7 +18051,7 @@ _0804FD78: pop {r0} bx r0 .pool - thumb_func_end sub_804F7AC + thumb_func_end atk76_various thumb_func_start atk77_setprotect atk77_setprotect: @ 804FD8C @@ -18089,7 +18089,7 @@ _0804FDBC: bne _0804FDCC movs r6, 0 _0804FDCC: - ldr r2, =gUnknown_0831C3D8 + ldr r2, =sProtectSuccessRates mov r5, r8 ldrb r1, [r5] lsls r0, r1, 3 @@ -18313,8 +18313,8 @@ _0804FFCC: .pool thumb_func_end atk78_faintifabilitynotdamp - thumb_func_start atk79_setuserhptozero -atk79_setuserhptozero: @ 804FFE4 + thumb_func_start atk79_setatkhptozero +atk79_setatkhptozero: @ 804FFE4 push {r4,lr} sub sp, 0x4 ldr r0, =gBattleExecBuffer @@ -18353,10 +18353,10 @@ _08050028: pop {r0} bx r0 .pool - thumb_func_end atk79_setuserhptozero + thumb_func_end atk79_setatkhptozero - thumb_func_start sub_8050044 -sub_8050044: @ 8050044 + thumb_func_start atk7A_jumpwhiletargetvalid +atk7A_jumpwhiletargetvalid: @ 8050044 push {r4-r7,lr} ldr r3, =gBattlescriptCurrInstr ldr r2, [r3] @@ -18430,10 +18430,10 @@ _080500E0: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_8050044 + thumb_func_end atk7A_jumpwhiletargetvalid - thumb_func_start sub_80500E8 -sub_80500E8: @ 80500E8 + thumb_func_start atk7B_healhalfHP_if_possible +atk7B_healhalfHP_if_possible: @ 80500E8 push {r4-r6,lr} ldr r4, =gBattlescriptCurrInstr ldr r1, [r4] @@ -18490,10 +18490,10 @@ _0805015E: pop {r4-r6} pop {r0} bx r0 - thumb_func_end sub_80500E8 + thumb_func_end atk7B_healhalfHP_if_possible - thumb_func_start sub_8050164 -sub_8050164: @ 8050164 + thumb_func_start atk7C_8025508 +atk7C_8025508: @ 8050164 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -18646,10 +18646,10 @@ _080502AE: pop {r0} bx r0 .pool - thumb_func_end sub_8050164 + thumb_func_end atk7C_8025508 - thumb_func_start sub_80502C8 -sub_80502C8: @ 80502C8 + thumb_func_start atk7D_set_rain +atk7D_set_rain: @ 80502C8 push {lr} ldr r2, =gBattleWeather ldrh r0, [r2] @@ -18684,7 +18684,7 @@ _08050304: pop {r0} bx r0 .pool - thumb_func_end sub_80502C8 + thumb_func_end atk7D_set_rain thumb_func_start atk7E_setreflect atk7E_setreflect: @ 805031C @@ -18775,8 +18775,8 @@ _080503D2: .pool thumb_func_end atk7E_setreflect - thumb_func_start sub_80503E8 -sub_80503E8: @ 80503E8 + thumb_func_start atk7F_setseeded +atk7F_setseeded: @ 80503E8 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -18862,7 +18862,7 @@ _08050488: pop {r0} bx r0 .pool - thumb_func_end sub_80503E8 + thumb_func_end atk7F_setseeded thumb_func_start atk80_manipulatedamage atk80_manipulatedamage: @ 80504A8 @@ -19062,15 +19062,15 @@ _0805063A: bx r0 thumb_func_end atk82_jumpifnotfirstturn - thumb_func_start sub_8050640 -sub_8050640: @ 8050640 + thumb_func_start atk83_nop +atk83_nop: @ 8050640 ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x1 str r0, [r1] bx lr .pool - thumb_func_end sub_8050640 + thumb_func_end atk83_nop thumb_func_start sub_8050650 sub_8050650: @ 8050650 @@ -19150,8 +19150,8 @@ _080506E2: bx r1 thumb_func_end sub_8050650 - thumb_func_start sub_80506EC -sub_80506EC: @ 80506EC + thumb_func_start atk84_jump_if_cant_sleep +atk84_jump_if_cant_sleep: @ 80506EC push {r4-r6,lr} ldr r5, =gBattlescriptCurrInstr ldr r1, [r5] @@ -19207,10 +19207,10 @@ _08050762: pop {r4-r6} pop {r0} bx r0 - thumb_func_end sub_80506EC + thumb_func_end atk84_jump_if_cant_sleep - thumb_func_start sub_8050768 -sub_8050768: @ 8050768 + thumb_func_start atk85_stockpile +atk85_stockpile: @ 8050768 push {r4,r5,lr} ldr r5, =gDisableStructs ldr r4, =gBankAttacker @@ -19263,7 +19263,7 @@ _080507CA: pop {r0} bx r0 .pool - thumb_func_end sub_8050768 + thumb_func_end atk85_stockpile thumb_func_start atk86_stockpiletobasedamage atk86_stockpiletobasedamage: @ 80507E4 @@ -19386,8 +19386,8 @@ _080508CA: .pool thumb_func_end atk86_stockpiletobasedamage - thumb_func_start atk87_stockpiletohprecovery -atk87_stockpiletohprecovery: @ 8050904 + thumb_func_start atk87_stockpiletohpheal +atk87_stockpiletohpheal: @ 8050904 push {r4-r7,lr} mov r7, r8 push {r7} @@ -19486,7 +19486,7 @@ _080509D0: pop {r0} bx r0 .pool - thumb_func_end atk87_stockpiletohprecovery + thumb_func_end atk87_stockpiletohpheal thumb_func_start atk88_negativedamage atk88_negativedamage: @ 80509E8 @@ -20186,8 +20186,8 @@ _08050FD2: .pool thumb_func_end atk8C_confuseifrepeatingattackends - thumb_func_start atk8D_setloopcounter -atk8D_setloopcounter: @ 8050FF0 + thumb_func_start atk8D_setmultihit_counter +atk8D_setmultihit_counter: @ 8050FF0 push {r4,r5,lr} ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] @@ -20220,10 +20220,10 @@ _08051026: pop {r0} bx r0 .pool - thumb_func_end atk8D_setloopcounter + thumb_func_end atk8D_setmultihit_counter - thumb_func_start atk8E_cmd8e -atk8E_cmd8e: @ 805103C + thumb_func_start atk8E_prepare_multihit +atk8E_prepare_multihit: @ 805103C ldr r1, =gBattleScripting movs r2, 0 movs r0, 0xFD @@ -20241,7 +20241,7 @@ atk8E_cmd8e: @ 805103C str r0, [r1] bx lr .pool - thumb_func_end atk8E_cmd8e + thumb_func_end atk8E_prepare_multihit thumb_func_start sub_8051064 sub_8051064: @ 8051064 @@ -20333,8 +20333,8 @@ _08051116: .pool thumb_func_end sub_8051064 - thumb_func_start sub_805112C -sub_805112C: @ 805112C + thumb_func_start atk8F_forcerandomswitch +atk8F_forcerandomswitch: @ 805112C push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -20692,10 +20692,10 @@ _08051414: pop {r4-r7} pop {r0} bx r0 - thumb_func_end sub_805112C + thumb_func_end atk8F_forcerandomswitch - thumb_func_start sub_8051424 -sub_8051424: @ 8051424 + thumb_func_start atk90_conversion_type_change +atk90_conversion_type_change: @ 8051424 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -20903,10 +20903,10 @@ _080515B0: pop {r0} bx r0 .pool - thumb_func_end sub_8051424 + thumb_func_end atk90_conversion_type_change - thumb_func_start atk91_givemoney -atk91_givemoney: @ 80515C8 + thumb_func_start atk91_givepaydaymoney +atk91_givepaydaymoney: @ 80515C8 push {r4,lr} ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -20967,7 +20967,7 @@ _08051658: pop {r0} bx r0 .pool - thumb_func_end atk91_givemoney + thumb_func_end atk91_givepaydaymoney thumb_func_start atk92_setlightscreen atk92_setlightscreen: @ 8051664 @@ -21452,8 +21452,8 @@ _08051AA2: .pool thumb_func_end atk94_gethalfcurrentenemyhp - thumb_func_start sub_8051AC0 -sub_8051AC0: @ 8051AC0 + thumb_func_start atk95_setsandstorm +atk95_setsandstorm: @ 8051AC0 push {lr} ldr r2, =gBattleWeather ldrh r1, [r2] @@ -21489,10 +21489,10 @@ _08051AFE: pop {r0} bx r0 .pool - thumb_func_end sub_8051AC0 + thumb_func_end atk95_setsandstorm - thumb_func_start sub_8051B18 -sub_8051B18: @ 8051B18 + thumb_func_start atk96_weatherdamage +atk96_weatherdamage: @ 8051B18 push {r4,r5,lr} sub sp, 0x4 movs r0, 0 @@ -21662,10 +21662,10 @@ _08051C6A: pop {r0} bx r0 .pool - thumb_func_end sub_8051B18 + thumb_func_end atk96_weatherdamage - thumb_func_start atk97_tryinfatuatetarget -atk97_tryinfatuatetarget: @ 8051C90 + thumb_func_start atk97_try_infatuation +atk97_try_infatuation: @ 8051C90 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -21846,10 +21846,10 @@ _08051E2C: pop {r0} bx r0 .pool - thumb_func_end atk97_tryinfatuatetarget + thumb_func_end atk97_try_infatuation - thumb_func_start sub_8051E48 -sub_8051E48: @ 8051E48 + thumb_func_start atk98_status_icon_update +atk98_status_icon_update: @ 8051E48 push {r4-r7,lr} ldr r0, =gBattleExecBuffer ldr r0, [r0] @@ -21960,10 +21960,10 @@ _08051F34: pop {r0} bx r0 .pool - thumb_func_end sub_8051E48 + thumb_func_end atk98_status_icon_update - thumb_func_start atk99_setmisteffect -atk99_setmisteffect: @ 8051F58 + thumb_func_start atk99_setmist +atk99_setmist: @ 8051F58 push {r4-r6,lr} ldr r6, =gSideTimers ldr r4, =gBankAttacker @@ -22034,10 +22034,10 @@ _08051FE6: pop {r0} bx r0 .pool - thumb_func_end atk99_setmisteffect + thumb_func_end atk99_setmist - thumb_func_start atk9A_setincreasedcriticalchance -atk9A_setincreasedcriticalchance: @ 8052000 + thumb_func_start atk9A_set_focusenergy +atk9A_set_focusenergy: @ 8052000 push {lr} ldr r1, =gBattleMons ldr r0, =gBankAttacker @@ -22076,7 +22076,7 @@ _08052048: pop {r0} bx r0 .pool - thumb_func_end atk9A_setincreasedcriticalchance + thumb_func_end atk9A_set_focusenergy thumb_func_start atk9B_transformdataexecution atk9B_transformdataexecution: @ 805205C @@ -22264,8 +22264,8 @@ _080521EC: .pool thumb_func_end atk9B_transformdataexecution - thumb_func_start sub_80521FC -sub_80521FC: @ 80521FC + thumb_func_start atk9C_set_substitute +atk9C_set_substitute: @ 80521FC push {r4-r7,lr} ldr r7, =gBattleMons ldr r6, =gBankAttacker @@ -22344,7 +22344,7 @@ _08052290: pop {r0} bx r0 .pool - thumb_func_end sub_80521FC + thumb_func_end atk9C_set_substitute thumb_func_start sub_80522B8 sub_80522B8: @ 80522B8 @@ -22602,8 +22602,8 @@ _080524CC: bx r0 thumb_func_end atk9D_copyattack - thumb_func_start sub_80524DC -sub_80524DC: @ 80524DC + thumb_func_start atk9E_metronome +atk9E_metronome: @ 80524DC push {r4-r7,lr} mov r7, r8 push {r7} @@ -22671,10 +22671,10 @@ _0805251C: pop {r0} bx r0 .pool - thumb_func_end sub_80524DC + thumb_func_end atk9E_metronome - thumb_func_start atk9F_nightshadedamageeffect -atk9F_nightshadedamageeffect: @ 8052584 + thumb_func_start atk9F_dmgtolevel +atk9F_dmgtolevel: @ 8052584 ldr r3, =gBattleMoveDamage ldr r2, =gBattleMons ldr r0, =gBankAttacker @@ -22691,7 +22691,7 @@ atk9F_nightshadedamageeffect: @ 8052584 str r0, [r1] bx lr .pool - thumb_func_end atk9F_nightshadedamageeffect + thumb_func_end atk9F_dmgtolevel thumb_func_start atkA0_psywavedamageeffect atkA0_psywavedamageeffect: @ 80525B4 @@ -23249,8 +23249,8 @@ _08052A5E: .pool thumb_func_end atkA4_setencore - thumb_func_start sub_8052A70 -sub_8052A70: @ 8052A70 + thumb_func_start atkA5_painsplitdmgcalc +atkA5_painsplitdmgcalc: @ 8052A70 push {r4-r7,lr} ldr r6, =gBattleMons ldr r0, =gBankTarget @@ -23335,7 +23335,7 @@ _08052B2A: pop {r0} bx r0 .pool - thumb_func_end sub_8052A70 + thumb_func_end atkA5_painsplitdmgcalc thumb_func_start atkA6_settypetorandomresistance atkA6_settypetorandomresistance: @ 8052B34 @@ -23942,8 +23942,8 @@ _08053012: bx r1 thumb_func_end move_weather_interaction - thumb_func_start sub_8053018 -sub_8053018: @ 8053018 + thumb_func_start atkA9_sleeptalk_choose_move +atkA9_sleeptalk_choose_move: @ 8053018 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -24076,10 +24076,10 @@ _0805311C: pop {r0} bx r0 .pool - thumb_func_end sub_8053018 + thumb_func_end atkA9_sleeptalk_choose_move - thumb_func_start atkAA_destinybondeffect -atkAA_destinybondeffect: @ 8053150 + thumb_func_start atkAA_set_destinybond +atkAA_set_destinybond: @ 8053150 ldr r1, =gBattleMons ldr r0, =gBankAttacker ldrb r2, [r0] @@ -24098,7 +24098,7 @@ atkAA_destinybondeffect: @ 8053150 str r0, [r1] bx lr .pool - thumb_func_end atkAA_destinybondeffect + thumb_func_end atkAA_set_destinybond thumb_func_start b_feature_update_destiny_bond b_feature_update_destiny_bond: @ 8053180 @@ -24144,8 +24144,8 @@ _080531CA: .pool thumb_func_end b_feature_update_destiny_bond - thumb_func_start atkAB_802A458 -atkAB_802A458: @ 80531E0 + thumb_func_start atkAB_DestinyBondFlagUpdate +atkAB_DestinyBondFlagUpdate: @ 80531E0 push {lr} bl b_feature_update_destiny_bond ldr r1, =gBattlescriptCurrInstr @@ -24155,7 +24155,7 @@ atkAB_802A458: @ 80531E0 pop {r0} bx r0 .pool - thumb_func_end atkAB_802A458 + thumb_func_end atkAB_DestinyBondFlagUpdate thumb_func_start atkAC_remaininghptopower atkAC_remaininghptopower: @ 80531F8 @@ -24204,8 +24204,8 @@ _08053232: .pool thumb_func_end atkAC_remaininghptopower - thumb_func_start atkAD_reducepprandom -atkAD_reducepprandom: @ 8053260 + thumb_func_start atkAD_spite_ppreduce +atkAD_spite_ppreduce: @ 8053260 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -24425,10 +24425,10 @@ _08053422: pop {r0} bx r0 .pool - thumb_func_end atkAD_reducepprandom + thumb_func_end atkAD_spite_ppreduce - thumb_func_start atkAE_clearstatusifnotsoundproofed -atkAE_clearstatusifnotsoundproofed: @ 8053438 + thumb_func_start atkAE_heal_party_status +atkAE_heal_party_status: @ 8053438 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -24740,7 +24740,7 @@ _080536DE: pop {r0} bx r0 .pool - thumb_func_end atkAE_clearstatusifnotsoundproofed + thumb_func_end atkAE_heal_party_status thumb_func_start atkAF_cursetarget atkAF_cursetarget: @ 805371C @@ -24803,8 +24803,8 @@ _0805378C: .pool thumb_func_end atkAF_cursetarget - thumb_func_start atkB0_setspikes -atkB0_setspikes: @ 80537A0 + thumb_func_start atkB0_set_spikes +atkB0_set_spikes: @ 80537A0 push {r4,lr} ldr r4, =gBankAttacker ldrb r0, [r4] @@ -24865,10 +24865,10 @@ _0805381E: pop {r0} bx r0 .pool - thumb_func_end atkB0_setspikes + thumb_func_end atkB0_set_spikes - thumb_func_start atkB1_setforesight -atkB1_setforesight: @ 805382C + thumb_func_start atkB1_set_foresight +atkB1_set_foresight: @ 805382C ldr r1, =gBattleMons ldr r0, =gBankTarget ldrb r2, [r0] @@ -24887,7 +24887,7 @@ atkB1_setforesight: @ 805382C str r0, [r1] bx lr .pool - thumb_func_end atkB1_setforesight + thumb_func_end atkB1_set_foresight thumb_func_start atkB2_setperishsong atkB2_setperishsong: @ 805385C @@ -25154,8 +25154,8 @@ _08053A60: .pool thumb_func_end atkB3_rolloutdamagecalculation - thumb_func_start atkB4_jumpifconfusedandattackmaxed -atkB4_jumpifconfusedandattackmaxed: @ 8053A90 + thumb_func_start atkB4_jumpifconfusedandstatmaxed +atkB4_jumpifconfusedandstatmaxed: @ 8053A90 push {r4,r5,lr} ldr r5, =gBattleMons ldr r0, =gBankTarget @@ -25204,10 +25204,10 @@ _08053AF2: pop {r4,r5} pop {r0} bx r0 - thumb_func_end atkB4_jumpifconfusedandattackmaxed + thumb_func_end atkB4_jumpifconfusedandstatmaxed - thumb_func_start sub_8053AF8 -sub_8053AF8: @ 8053AF8 + thumb_func_start atkB5_furycuttercalc +atkB5_furycuttercalc: @ 8053AF8 push {r4,r5,lr} ldr r0, =gBattleMoveFlags ldrb r1, [r0] @@ -25282,7 +25282,7 @@ _08053B8C: pop {r0} bx r0 .pool - thumb_func_end sub_8053AF8 + thumb_func_end atkB5_furycuttercalc thumb_func_start atkB6_happinesstodamagecalculation atkB6_happinesstodamagecalculation: @ 8053BAC @@ -25423,8 +25423,8 @@ _08053CE6: .pool thumb_func_end atkB7_presentdamagecalculation - thumb_func_start atkB8_setsafeguard -atkB8_setsafeguard: @ 8053CFC + thumb_func_start atkB8_set_safeguard +atkB8_set_safeguard: @ 8053CFC push {r4-r7,lr} ldr r7, =gBankAttacker ldrb r0, [r7] @@ -25493,7 +25493,7 @@ _08053D88: pop {r0} bx r0 .pool - thumb_func_end atkB8_setsafeguard + thumb_func_end atkB8_set_safeguard thumb_func_start atkB9_magnitudedamagecalculation atkB9_magnitudedamagecalculation: @ 8053DA4 @@ -25625,8 +25625,8 @@ _08053E94: .pool thumb_func_end atkB9_magnitudedamagecalculation - thumb_func_start atkBA_802B140 -atkBA_802B140: @ 8053EC8 + thumb_func_start atkBA_jumpifnopursuitswitchdmg +atkBA_jumpifnopursuitswitchdmg: @ 8053EC8 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -25797,10 +25797,10 @@ _0805404A: pop {r0} bx r0 .pool - thumb_func_end atkBA_802B140 + thumb_func_end atkBA_jumpifnopursuitswitchdmg - thumb_func_start sub_805405C -sub_805405C: @ 805405C + thumb_func_start atkBB_setsunny +atkBB_setsunny: @ 805405C push {lr} ldr r2, =gBattleWeather ldrh r1, [r2] @@ -25836,7 +25836,7 @@ _0805409A: pop {r0} bx r0 .pool - thumb_func_end sub_805405C + thumb_func_end atkBB_setsunny thumb_func_start atkBC_maxattackhalvehp atkBC_maxattackhalvehp: @ 80540B4 @@ -26067,8 +26067,8 @@ _080542BA: .pool thumb_func_end atkBE_breakfree - thumb_func_start atkBF_setcurled -atkBF_setcurled: @ 80542C8 + thumb_func_start atkBF_set_defense_curl +atkBF_set_defense_curl: @ 80542C8 ldr r1, =gBattleMons ldr r0, =gBankAttacker ldrb r2, [r0] @@ -26087,7 +26087,7 @@ atkBF_setcurled: @ 80542C8 str r0, [r1] bx lr .pool - thumb_func_end atkBF_setcurled + thumb_func_end atkBF_set_defense_curl thumb_func_start atkC0_recoverbasedonsunlight atkC0_recoverbasedonsunlight: @ 80542F8 @@ -26211,8 +26211,8 @@ _080543F2: .pool thumb_func_end atkC0_recoverbasedonsunlight - thumb_func_start sub_8054400 -sub_8054400: @ 8054400 + thumb_func_start atkC1_hidden_power +atkC1_hidden_power: @ 8054400 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -26349,7 +26349,7 @@ _080544F0: pop {r0} bx r0 .pool - thumb_func_end sub_8054400 + thumb_func_end atkC1_hidden_power thumb_func_start atkC2_selectnexttarget atkC2_selectnexttarget: @ 8054524 @@ -26554,8 +26554,8 @@ _080546CC: .pool thumb_func_end atkC3_setfutureattack - thumb_func_start atkC4_802B910 -atkC4_802B910: @ 80546E4 + thumb_func_start atkC4_beat_up +atkC4_beat_up: @ 80546E4 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -26783,7 +26783,7 @@ _080548E2: pop {r0} bx r0 .pool - thumb_func_end atkC4_802B910 + thumb_func_end atkC4_beat_up thumb_func_start atkC5_hidepreattack atkC5_hidepreattack: @ 80548F4 @@ -26940,8 +26940,8 @@ _08054A2C: .pool thumb_func_end atkC7_setminimize - thumb_func_start sub_8054A48 -sub_8054A48: @ 8054A48 + thumb_func_start atkC8_sethail +atkC8_sethail: @ 8054A48 push {lr} ldr r3, =gBattleWeather ldrh r1, [r3] @@ -26976,7 +26976,7 @@ _08054A86: pop {r0} bx r0 .pool - thumb_func_end sub_8054A48 + thumb_func_end atkC8_sethail thumb_func_start atkC9_jumpifattackandspecialattackcannotfall atkC9_jumpifattackandspecialattackcannotfall: @ 8054AA0 @@ -27375,8 +27375,8 @@ _08054E02: .pool thumb_func_end atkD0_settaunt - thumb_func_start atkD1_sethelpinghand -atkD1_sethelpinghand: @ 8054E0C + thumb_func_start atkD1_set_helpinghand +atkD1_set_helpinghand: @ 8054E0C push {r4,lr} ldr r4, =gBankAttacker ldrb r0, [r4] @@ -27446,10 +27446,10 @@ _08054EAA: pop {r0} bx r0 .pool - thumb_func_end atkD1_sethelpinghand + thumb_func_end atkD1_set_helpinghand - thumb_func_start sub_8054EB4 -sub_8054EB4: @ 8054EB4 + thumb_func_start atkD2_swap_items +atkD2_swap_items: @ 8054EB4 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -27742,10 +27742,10 @@ _08055132: pop {r0} bx r0 .pool - thumb_func_end sub_8054EB4 + thumb_func_end atkD2_swap_items - thumb_func_start sub_8055148 -sub_8055148: @ 8055148 + thumb_func_start atkD3_copy_ability +atkD3_copy_ability: @ 8055148 push {r4,lr} ldr r3, =gBattleMons ldr r4, =gBankTarget @@ -27798,10 +27798,10 @@ _080551B6: pop {r0} bx r0 .pool - thumb_func_end sub_8055148 + thumb_func_end atkD3_copy_ability - thumb_func_start atkD4_802C408 -atkD4_802C408: @ 80551C0 + thumb_func_start atkD4_wish_effect +atkD4_wish_effect: @ 80551C0 push {r4-r7,lr} ldr r7, =gBattlescriptCurrInstr ldr r2, [r7] @@ -27898,10 +27898,10 @@ _0805528C: pop {r4-r7} pop {r0} bx r0 - thumb_func_end atkD4_802C408 + thumb_func_end atkD4_wish_effect - thumb_func_start sub_8055294 -sub_8055294: @ 8055294 + thumb_func_start atkD5_setroots +atkD5_setroots: @ 8055294 push {lr} ldr r1, =gStatuses3 ldr r0, =gBankAttacker @@ -27941,7 +27941,7 @@ _080552E4: pop {r0} bx r0 .pool - thumb_func_end sub_8055294 + thumb_func_end atkD5_setroots thumb_func_start atkD6_doubledamagedealtifdamaged atkD6_doubledamagedealtifdamaged: @ 80552EC @@ -27988,8 +27988,8 @@ _0805532A: .pool thumb_func_end atkD6_doubledamagedealtifdamaged - thumb_func_start sub_805534C -sub_805534C: @ 805534C + thumb_func_start atkD7_setyawn +atkD7_setyawn: @ 805534C push {r4,lr} ldr r1, =gStatuses3 ldr r0, =gBankTarget @@ -28040,7 +28040,7 @@ _080553B0: pop {r0} bx r0 .pool - thumb_func_end sub_805534C + thumb_func_end atkD7_setyawn thumb_func_start atkD8_setdamagetohealthdifference atkD8_setdamagetohealthdifference: @ 80553BC @@ -28736,8 +28736,8 @@ _0805598E: .pool thumb_func_end atkE0_setstealstatchange - thumb_func_start atkE1_802CBE4 -atkE1_802CBE4: @ 805599C + thumb_func_start atkE1_intimidate_string_loader +atkE1_intimidate_string_loader: @ 805599C push {r4-r6,lr} ldr r4, =gBattleScripting ldr r0, =gBattleStruct @@ -28832,10 +28832,10 @@ _08055A6C: pop {r0} bx r0 .pool - thumb_func_end atkE1_802CBE4 + thumb_func_end atkE1_intimidate_string_loader - thumb_func_start atkE2_cmde2 -atkE2_cmde2: @ 8055A78 + thumb_func_start atkE2_switchout_abilities +atkE2_switchout_abilities: @ 8055A78 push {r4-r6,lr} sub sp, 0x4 ldr r5, =gBattlescriptCurrInstr @@ -28887,7 +28887,7 @@ _08055AD2: pop {r0} bx r0 .pool - thumb_func_end atkE2_cmde2 + thumb_func_end atkE2_switchout_abilities thumb_func_start atkE3_jumpiffainted atkE3_jumpiffainted: @ 8055AF4 @@ -28930,8 +28930,8 @@ _08055B42: bx r0 thumb_func_end atkE3_jumpiffainted - thumb_func_start sub_8055B48 -sub_8055B48: @ 8055B48 + thumb_func_start atkE4_getsecretpowereffect +atkE4_getsecretpowereffect: @ 8055B48 push {lr} ldr r0, =gUnknown_02022FF0 ldrb r0, [r0] @@ -29005,10 +29005,10 @@ _08055BE8: pop {r0} bx r0 .pool - thumb_func_end sub_8055B48 + thumb_func_end atkE4_getsecretpowereffect - thumb_func_start atkE5_pickupitemcalculation -atkE5_pickupitemcalculation: @ 8055C00 + thumb_func_start atkE5_pickup +atkE5_pickup: @ 8055C00 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -29240,10 +29240,10 @@ _08055DD8: pop {r0} bx r0 .pool - thumb_func_end atkE5_pickupitemcalculation + thumb_func_end atkE5_pickup - thumb_func_start atkE6_castform_transform -atkE6_castform_transform: @ 8055DFC + thumb_func_start atkE6_castform_change_animation +atkE6_castform_change_animation: @ 8055DFC push {r4,lr} ldr r4, =gActiveBank ldr r0, =gBattleScripting @@ -29285,10 +29285,10 @@ _08055E2C: pop {r0} bx r0 .pool - thumb_func_end atkE6_castform_transform + thumb_func_end atkE6_castform_change_animation - thumb_func_start atkE7_castform_switch -atkE7_castform_switch: @ 8055E64 + thumb_func_start atkE7_castform_data_change +atkE7_castform_data_change: @ 8055E64 push {r4,lr} ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -29313,7 +29313,7 @@ _08055E8E: pop {r0} bx r0 .pool - thumb_func_end atkE7_castform_switch + thumb_func_end atkE7_castform_data_change thumb_func_start atkE8_settypebasedhalvers atkE8_settypebasedhalvers: @ 8055EA4 @@ -29397,8 +29397,8 @@ _08055F52: .pool thumb_func_end atkE8_settypebasedhalvers - thumb_func_start atkE9_seteffectbyweather -atkE9_seteffectbyweather: @ 8055F5C + thumb_func_start atkE9_setweatherballtype +atkE9_setweatherballtype: @ 8055F5C push {lr} sub sp, 0x4 movs r0, 0 @@ -29484,7 +29484,7 @@ _08055FFC: pop {r0} bx r0 .pool - thumb_func_end atkE9_seteffectbyweather + thumb_func_end atkE9_setweatherballtype thumb_func_start atkEA_recycleitem atkEA_recycleitem: @ 8056014 @@ -29576,7 +29576,7 @@ atkEB_settypetoterrain: @ 80560BC movs r0, 0x21 adds r0, r3 mov r12, r0 - ldr r5, =gUnknown_0831C483 + ldr r5, =sTerrainToType ldr r4, =gUnknown_02022FF0 ldrb r0, [r4] adds r0, r5 @@ -29642,8 +29642,8 @@ _0805615E: .pool thumb_func_end atkEB_settypetoterrain - thumb_func_start atkEC_802D2A0 -atkEC_802D2A0: @ 805616C + thumb_func_start atkEC_pursuit_sth +atkEC_pursuit_sth: @ 805616C push {r4-r6,lr} ldr r5, =gBankAttacker ldrb r0, [r5] @@ -29720,10 +29720,10 @@ _08056226: pop {r0} bx r0 .pool - thumb_func_end atkEC_802D2A0 + thumb_func_end atkEC_pursuit_sth - thumb_func_start atkED_802D364 -atkED_802D364: @ 8056230 + thumb_func_start atkED_802B4B4 +atkED_802B4B4: @ 8056230 push {r4,lr} ldr r1, =gUnknown_0202420E ldr r3, =gBankAttacker @@ -29757,10 +29757,10 @@ _0805626A: pop {r0} bx r0 .pool - thumb_func_end atkED_802D364 + thumb_func_end atkED_802B4B4 - thumb_func_start atkEE_removereflectlightscreen -atkEE_removereflectlightscreen: @ 8056284 + thumb_func_start atkEE_removelightscreenreflect +atkEE_removelightscreenreflect: @ 8056284 push {r4,lr} ldr r0, =gBankAttacker ldrb r0, [r0] @@ -29811,10 +29811,10 @@ _080562EA: pop {r0} bx r0 .pool - thumb_func_end atkEE_removereflectlightscreen + thumb_func_end atkEE_removelightscreenreflect - thumb_func_start sub_8056300 -sub_8056300: @ 8056300 + thumb_func_start atkEF_pokeball_catch_calculation +atkEF_pokeball_catch_calculation: @ 8056300 push {r4-r6,lr} movs r4, 0 ldr r0, =gBattleExecBuffer @@ -30005,7 +30005,7 @@ _080564B0: b _080564D2 .pool _080564C8: - ldr r1, =gUnknown_0831C48D + ldr r1, =sBallCatchBonuses ldrh r0, [r2] subs r0, 0x2 adds r0, r1 @@ -30196,10 +30196,10 @@ _08056696: pop {r0} bx r0 .pool - thumb_func_end sub_8056300 + thumb_func_end atkEF_pokeball_catch_calculation - thumb_func_start atkF0_catch_pokemon -atkF0_catch_pokemon: @ 80566A8 + thumb_func_start atkF0_copy_caught_poke +atkF0_copy_caught_poke: @ 80566A8 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -30363,10 +30363,10 @@ _08056792: pop {r0} bx r0 .pool - thumb_func_end atkF0_catch_pokemon + thumb_func_end atkF0_copy_caught_poke - thumb_func_start atkF1_802D95C -atkF1_802D95C: @ 8056850 + thumb_func_start atkF1_setpoke_as_caught +atkF1_setpoke_as_caught: @ 8056850 push {r4,r5,lr} ldr r4, =gEnemyParty adds r0, r4, 0 @@ -30421,10 +30421,10 @@ _080568C2: pop {r0} bx r0 .pool - thumb_func_end atkF1_802D95C + thumb_func_end atkF1_setpoke_as_caught - thumb_func_start sub_80568CC -sub_80568CC: @ 80568CC + thumb_func_start atkF2_display_dex_info +atkF2_display_dex_info: @ 80568CC push {r4,lr} sub sp, 0x4 ldr r0, =gEnemyParty @@ -30573,7 +30573,7 @@ _08056A2C: pop {r0} bx r0 .pool - thumb_func_end sub_80568CC + thumb_func_end atkF2_display_dex_info thumb_func_start sub_8056A3C sub_8056A3C: @ 8056A3C @@ -30795,8 +30795,8 @@ sub_8056BAC: @ 8056BAC .pool thumb_func_end sub_8056BAC - thumb_func_start atkF3_receive_new_pokemon_maybe -atkF3_receive_new_pokemon_maybe: @ 8056BEC + thumb_func_start atkF3_nickname_caught_poke +atkF3_nickname_caught_poke: @ 8056BEC push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -31070,10 +31070,10 @@ _08056E62: pop {r0} bx r0 .pool - thumb_func_end atkF3_receive_new_pokemon_maybe + thumb_func_end atkF3_nickname_caught_poke - thumb_func_start sub_8056E78 -sub_8056E78: @ 8056E78 + thumb_func_start atkF4_802BEF0 +atkF4_802BEF0: @ 8056E78 ldr r2, =gBattleMons ldr r0, =gBankAttacker ldrb r1, [r0] @@ -31091,10 +31091,10 @@ sub_8056E78: @ 8056E78 str r0, [r1] bx lr .pool - thumb_func_end sub_8056E78 + thumb_func_end atkF4_802BEF0 - thumb_func_start atkF5_reset_attacker_bd_x4C -atkF5_reset_attacker_bd_x4C: @ 8056EA8 + thumb_func_start atkF5_removeattackerstatus1 +atkF5_removeattackerstatus1: @ 8056EA8 ldr r1, =gBattleMons ldr r0, =gBankAttacker ldrb r2, [r0] @@ -31110,19 +31110,19 @@ atkF5_reset_attacker_bd_x4C: @ 8056EA8 str r0, [r1] bx lr .pool - thumb_func_end atkF5_reset_attacker_bd_x4C + thumb_func_end atkF5_removeattackerstatus1 - thumb_func_start sub_8056ED0 -sub_8056ED0: @ 8056ED0 + thumb_func_start atkF6_802BF48 +atkF6_802BF48: @ 8056ED0 ldr r1, =gFightStateTracker movs r0, 0xC strb r0, [r1] bx lr .pool - thumb_func_end sub_8056ED0 + thumb_func_end atkF6_802BF48 - thumb_func_start sub_8056EDC -sub_8056EDC: @ 8056EDC + thumb_func_start atkF7_802BF54 +atkF7_802BF54: @ 8056EDC ldr r1, =gFightStateTracker movs r0, 0xC strb r0, [r1] @@ -31132,7 +31132,7 @@ sub_8056EDC: @ 8056EDC strb r0, [r1] bx lr .pool - thumb_func_end sub_8056EDC + thumb_func_end atkF7_802BF54 thumb_func_start sub_8056EF8 sub_8056EF8: @ 8056EF8 diff --git a/asm/battle_controller_linkopponent.s b/asm/battle_controller_linkopponent.s index 385c97d80..73406931b 100644 --- a/asm/battle_controller_linkopponent.s +++ b/asm/battle_controller_linkopponent.s @@ -18,14 +18,14 @@ SetBankFuncToLinkOpponentBufferRunCommand: @ 8064394 ldrb r0, [r0] lsls r0, 2 adds r0, r1 - ldr r1, =sub_80643B0 + ldr r1, =LinkOpponentBufferRunCommand str r1, [r0] bx lr .pool thumb_func_end SetBankFuncToLinkOpponentBufferRunCommand - thumb_func_start sub_80643B0 -sub_80643B0: @ 80643B0 + thumb_func_start LinkOpponentBufferRunCommand +LinkOpponentBufferRunCommand: @ 80643B0 push {lr} ldr r2, =gBattleExecBuffer ldr r1, =gBitTable @@ -44,7 +44,7 @@ sub_80643B0: @ 80643B0 ldrb r0, [r1] cmp r0, 0x38 bhi _080643F8 - ldr r0, =gUnknown_0831C7B4 + ldr r0, =gLinkOpponentBufferCommands ldrb r1, [r1] lsls r1, 2 adds r1, r0 @@ -53,11 +53,11 @@ sub_80643B0: @ 80643B0 b _080643FC .pool _080643F8: - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _080643FC: pop {r0} bx r0 - thumb_func_end sub_80643B0 + thumb_func_end LinkOpponentBufferRunCommand thumb_func_start sub_8064400 sub_8064400: @ 8064400 @@ -77,7 +77,7 @@ sub_8064400: @ 8064400 ldr r0, =SpriteCallbackDummy cmp r1, r0 bne _08064424 - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _08064424: pop {r0} bx r0 @@ -102,7 +102,7 @@ sub_8064438: @ 8064438 ldr r0, =SpriteCallbackDummy cmp r1, r0 bne _0806445C - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _0806445C: pop {r0} bx r0 @@ -147,7 +147,7 @@ sub_8064470: @ 8064470 lsls r0, 2 adds r0, r5 bl DestroySprite - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _080644C2: pop {r4-r6} pop {r0} @@ -183,7 +183,7 @@ sub_80644D8: @ 80644D8 adds r0, r2 movs r1, 0 strb r1, [r0, 0x9] - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _08064510: pop {r4} pop {r0} @@ -949,7 +949,7 @@ _08064B7C: bl FreeSpriteTilesByTag adds r0, r4, 0 bl FreeSpritePaletteByTag - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _08064BB6: pop {r4-r7} pop {r0} @@ -989,7 +989,7 @@ sub_8064BC0: @ 8064BC0 b _08064C0C .pool _08064C08: - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _08064C0C: pop {r4-r6} pop {r0} @@ -1018,7 +1018,7 @@ sub_8064C14: @ 8064C14 adds r0, r3, r0 ldrb r0, [r0] bl sub_8072984 - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _08064C42: pop {r0} bx r0 @@ -1066,7 +1066,7 @@ sub_8064C58: @ 8064C58 adds r0, r1 ldrb r0, [r0] bl sub_8072984 - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _08064CB2: pop {r4-r6} pop {r0} @@ -1082,7 +1082,7 @@ sub_8064CCC: @ 8064CCC lsls r0, 16 cmp r0, 0 bne _08064CDE - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _08064CDE: pop {r0} bx r0 @@ -1116,7 +1116,7 @@ sub_8064CE4: @ 8064CE4 strb r0, [r2] ldr r0, =gDoingBattleAnim strb r3, [r0] - bl sub_8065068 + bl LinkOpponentBufferExecCompleted b _08064D5A .pool _08064D30: @@ -1239,7 +1239,7 @@ _08064E1A: movs r2, 0x80 lsls r2, 1 bl m4aMPlayVolumeControl - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _08064E2A: pop {r4} pop {r0} @@ -1444,7 +1444,7 @@ sub_8065008: @ 8065008 ands r0, r1 cmp r0, 0 bne _0806502A - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _0806502A: pop {r0} bx r0 @@ -1468,15 +1468,15 @@ sub_8065038: @ 8065038 ands r0, r1 cmp r0, 0 bne _0806505A - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _0806505A: pop {r0} bx r0 .pool thumb_func_end sub_8065038 - thumb_func_start sub_8065068 -sub_8065068: @ 8065068 + thumb_func_start LinkOpponentBufferExecCompleted +LinkOpponentBufferExecCompleted: @ 8065068 push {r4,lr} sub sp, 0x4 ldr r1, =gBattleBankFunc @@ -1484,7 +1484,7 @@ sub_8065068: @ 8065068 ldrb r0, [r4] lsls r0, 2 adds r0, r1 - ldr r1, =sub_80643B0 + ldr r1, =LinkOpponentBufferRunCommand str r1, [r0] ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -1523,7 +1523,7 @@ _080650CE: pop {r0} bx r0 .pool - thumb_func_end sub_8065068 + thumb_func_end LinkOpponentBufferExecCompleted thumb_func_start dp01t_00_2_getattr dp01t_00_2_getattr: @ 80650E0 @@ -1573,7 +1573,7 @@ _0806513A: movs r0, 0x1 mov r2, sp bl dp01_build_cmdbuf_x1D_1D_numargs_varargs - bl sub_8065068 + bl LinkOpponentBufferExecCompleted add sp, 0x100 pop {r4-r6} pop {r0} @@ -2461,7 +2461,7 @@ _080658EA: thumb_func_start sub_8065900 sub_8065900: @ 8065900 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8065900 @@ -2503,7 +2503,7 @@ _0806594E: cmp r5, 0x5 bls _08065940 _0806595A: - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r4,r5} pop {r0} bx r0 @@ -3542,7 +3542,7 @@ _080662BA: cmp r3, r0 bcc _080662BA _080662DC: - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r4-r7} pop {r0} bx r0 @@ -3948,7 +3948,7 @@ _0806666C: adds r0, r1 ldrb r0, [r0] bl sub_8072984 - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _080666A8: pop {r4-r6} pop {r0} @@ -4503,7 +4503,7 @@ _08066A76: adds r0, r1 ldr r1, =sub_8064438 str r1, [r0] - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r3} mov r8, r3 pop {r4-r6} @@ -4666,7 +4666,7 @@ _08066CD0: thumb_func_start sub_8066CEC sub_8066CEC: @ 8066CEC push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8066CEC @@ -4674,7 +4674,7 @@ sub_8066CEC: @ 8066CEC thumb_func_start sub_8066CF8 sub_8066CF8: @ 8066CF8 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8066CF8 @@ -4682,7 +4682,7 @@ sub_8066CF8: @ 8066CF8 thumb_func_start sub_8066D04 sub_8066D04: @ 8066D04 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8066D04 @@ -4690,7 +4690,7 @@ sub_8066D04: @ 8066D04 thumb_func_start sub_8066D10 sub_8066D10: @ 8066D10 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8066D10 @@ -4812,7 +4812,7 @@ _08066D32: lsrs r3, r0, 24 cmp r3, 0 beq _08066E30 - bl sub_8065068 + bl LinkOpponentBufferExecCompleted b _08066E58 .pool _08066E30: @@ -5017,7 +5017,7 @@ _08066FA8: lsls r0, 2 adds r0, r2 strb r4, [r0, 0x4] - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _08066FE4: pop {r3-r5} mov r8, r3 @@ -5063,7 +5063,7 @@ sub_8066FF4: @ 8066FF4 thumb_func_start sub_806704C sub_806704C: @ 806704C push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_806704C @@ -5071,7 +5071,7 @@ sub_806704C: @ 806704C thumb_func_start sub_8067058 sub_8067058: @ 8067058 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8067058 @@ -5079,7 +5079,7 @@ sub_8067058: @ 8067058 thumb_func_start sub_8067064 sub_8067064: @ 8067064 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8067064 @@ -5087,7 +5087,7 @@ sub_8067064: @ 8067064 thumb_func_start sub_8067070 sub_8067070: @ 8067070 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8067070 @@ -5095,7 +5095,7 @@ sub_8067070: @ 8067070 thumb_func_start sub_806707C sub_806707C: @ 806707C push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_806707C @@ -5103,7 +5103,7 @@ sub_806707C: @ 806707C thumb_func_start sub_8067088 sub_8067088: @ 8067088 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8067088 @@ -5111,7 +5111,7 @@ sub_8067088: @ 8067088 thumb_func_start sub_8067094 sub_8067094: @ 8067094 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8067094 @@ -5215,7 +5215,7 @@ _0806715A: thumb_func_start sub_8067190 sub_8067190: @ 8067190 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8067190 @@ -5319,7 +5319,7 @@ _08067264: thumb_func_start sub_806727C sub_806727C: @ 806727C push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_806727C @@ -5327,7 +5327,7 @@ sub_806727C: @ 806727C thumb_func_start sub_8067288 sub_8067288: @ 8067288 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8067288 @@ -5335,7 +5335,7 @@ sub_8067288: @ 8067288 thumb_func_start sub_8067294 sub_8067294: @ 8067294 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_8067294 @@ -5343,7 +5343,7 @@ sub_8067294: @ 8067294 thumb_func_start sub_80672A0 sub_80672A0: @ 80672A0 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_80672A0 @@ -5351,7 +5351,7 @@ sub_80672A0: @ 80672A0 thumb_func_start sub_80672AC sub_80672AC: @ 80672AC push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_80672AC @@ -5359,7 +5359,7 @@ sub_80672AC: @ 80672AC thumb_func_start sub_80672B8 sub_80672B8: @ 80672B8 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_80672B8 @@ -5367,7 +5367,7 @@ sub_80672B8: @ 80672B8 thumb_func_start sub_80672C4 sub_80672C4: @ 80672C4 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_80672C4 @@ -5375,7 +5375,7 @@ sub_80672C4: @ 80672C4 thumb_func_start sub_80672D0 sub_80672D0: @ 80672D0 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_80672D0 @@ -5383,7 +5383,7 @@ sub_80672D0: @ 80672D0 thumb_func_start sub_80672DC sub_80672DC: @ 80672DC push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_80672DC @@ -5397,7 +5397,7 @@ sub_80672E8: @ 80672E8 negs r0, r0 ands r0, r1 strb r0, [r2] - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 .pool @@ -5422,7 +5422,7 @@ sub_8067304: @ 8067304 ands r0, r2 orrs r0, r1 strb r0, [r3] - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 .pool @@ -5436,7 +5436,7 @@ sub_806733C: @ 806733C movs r0, 0x7F ands r0, r1 strb r0, [r2] - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 .pool @@ -5457,7 +5457,7 @@ sub_8067354: @ 8067354 ands r0, r2 orrs r0, r1 strb r0, [r3] - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 .pool @@ -5481,7 +5481,7 @@ sub_806737C: @ 806737C lsls r0, 29 cmp r0, 0 bge _080673B0 - bl sub_8065068 + bl LinkOpponentBufferExecCompleted b _080673DA .pool _080673B0: @@ -5515,7 +5515,7 @@ _080673DA: thumb_func_start sub_80673EC sub_80673EC: @ 80673EC push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_80673EC @@ -5546,7 +5546,7 @@ _0806740C: lsls r1, r3, 24 asrs r1, 24 bl PlaySE12WithPanning - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r4} pop {r0} bx r0 @@ -5590,7 +5590,7 @@ _08067478: orrs r0, r1 bl PlayFanfare _0806748C: - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r4,r5} pop {r0} bx r0 @@ -5616,7 +5616,7 @@ sub_8067498: @ 8067498 movs r1, 0x19 movs r2, 0x5 bl PlayCry3 - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 .pool @@ -5638,7 +5638,7 @@ sub_80674D4: @ 80674D4 movs r1, 0x1 orrs r0, r1 strh r0, [r2] - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 .pool @@ -5889,7 +5889,7 @@ sub_8067718: @ 8067718 lsls r0, 24 cmp r0, 0 bne _08067748 - bl sub_8065068 + bl LinkOpponentBufferExecCompleted b _08067812 .pool _08067748: @@ -6025,7 +6025,7 @@ sub_806782C: @ 806782C adds r0, r2 movs r1, 0 strb r1, [r0, 0x5] - bl sub_8065068 + bl LinkOpponentBufferExecCompleted _08067864: pop {r4} pop {r0} @@ -6061,7 +6061,7 @@ sub_8067874: @ 8067874 ldr r1, =sub_8073C30 str r1, [r0] _080678A6: - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 .pool @@ -6070,7 +6070,7 @@ _080678A6: thumb_func_start sub_80678C4 sub_80678C4: @ 80678C4 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_80678C4 @@ -6111,7 +6111,7 @@ sub_80678D0: @ 80678D0 ldrb r0, [r4] bl sub_805E408 _08067916: - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r4} pop {r0} bx r0 @@ -6150,7 +6150,7 @@ sub_8067930: @ 8067930 lsls r0, 24 cmp r0, 0 beq _08067980 - bl sub_8065068 + bl LinkOpponentBufferExecCompleted b _0806798C .pool _08067980: @@ -6180,7 +6180,7 @@ sub_80679A4: @ 80679A4 ldr r1, =gUnknown_02023066 adds r0, r1 bl sub_81851A8 - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 .pool @@ -6189,7 +6189,7 @@ sub_80679A4: @ 80679A4 thumb_func_start sub_80679C4 sub_80679C4: @ 80679C4 push {lr} - bl sub_8065068 + bl LinkOpponentBufferExecCompleted pop {r0} bx r0 thumb_func_end sub_80679C4 @@ -6244,7 +6244,7 @@ _08067A08: bl FadeOutMapMusic movs r0, 0x3 bl BeginFastPaletteFade - bl sub_8065068 + bl LinkOpponentBufferExecCompleted ldr r1, =gBattleBankFunc ldrb r0, [r4] lsls r0, 2 diff --git a/asm/menu_helpers.s b/asm/menu_helpers.s index f01fc8569..acc3065ea 100644 --- a/asm/menu_helpers.s +++ b/asm/menu_helpers.s @@ -587,8 +587,8 @@ _08122208: bx r1 thumb_func_end sub_81221EC - thumb_func_start atk2D_jumpifarraynotequal -atk2D_jumpifarraynotequal: @ 812220C + thumb_func_start sub_812220C +sub_812220C: @ 812220C push {r4-r6,lr} adds r6, r2, 0 ldr r2, [sp, 0x10] @@ -633,7 +633,7 @@ _08122254: pop {r4-r6} pop {r0} bx r0 - thumb_func_end atk2D_jumpifarraynotequal + thumb_func_end sub_812220C thumb_func_start sub_812225C sub_812225C: @ 812225C diff --git a/asm/player_pc.s b/asm/player_pc.s index d117df906..171eacec7 100644 --- a/asm/player_pc.s +++ b/asm/player_pc.s @@ -2252,7 +2252,7 @@ sub_816C110: @ 816C110 movs r1, 0x8 str r1, [sp] movs r1, 0x32 - bl atk2D_jumpifarraynotequal + bl sub_812220C add sp, 0x4 pop {r0} bx r0 diff --git a/data/battle_4.s b/data/battle_4.s new file mode 100644 index 000000000..1c8fb5384 --- /dev/null +++ b/data/battle_4.s @@ -0,0 +1,50 @@ +@ the second big chunk of data + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + +gMoveEffectBS_Ptrs:: @ 831C224 + .incbin "baserom.gba", 0x31c224, 0xa4 + +gUnknown_0831C2C8:: @ 831C2C8 + .incbin "baserom.gba", 0x31c2c8, 0x20 + +gUnknown_0831C2E8:: @ 831C2E8 + .incbin "baserom.gba", 0x31c2e8, 0xd8 + +gUnknown_0831C3C0:: @ 831C3C0 + .incbin "baserom.gba", 0x31c3c0, 0x18 + +sProtectSuccessRates:: @ 831C3D8 + .incbin "baserom.gba", 0x31c3d8, 0x8 + +gUnknown_0831C3E0:: @ 831C3E0 + .incbin "baserom.gba", 0x31c3e0, 0x28 + +gUnknown_0831C408:: @ 831C408 + .incbin "baserom.gba", 0x31c408, 0xc + +gUnknown_0831C414:: @ 831C414 + .incbin "baserom.gba", 0x31c414, 0x14 + +gUnknown_0831C428:: @ 831C428 + .incbin "baserom.gba", 0x31c428, 0x18 + +@ 831C440 + .include "data/pickup_items.inc" + +sTerrainToType:: @ 831C483 + .incbin "baserom.gba", 0x31c483, 0xa + +sBallCatchBonuses:: @ 831C48D + .incbin "baserom.gba", 0x31c48d, 0x7 + +gUnknown_0831C494:: @ 831C494 + .incbin "baserom.gba", 0x31c494, 0x64 + +gUnknown_0831C4F8:: @ 831C4F8 + .incbin "baserom.gba", 0x31c4f8, 0x1c + diff --git a/data/battle_controller_link_opponent.s b/data/battle_controller_link_opponent.s new file mode 100644 index 000000000..71b1f5438 --- /dev/null +++ b/data/battle_controller_link_opponent.s @@ -0,0 +1,8 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + +gLinkOpponentBufferCommands:: @ 831C7B4 + .incbin "baserom.gba", 0x31c7b4, 0xe4 diff --git a/data/battle_controller_link_partner.s b/data/battle_controller_link_partner.s new file mode 100644 index 000000000..25bcb970b --- /dev/null +++ b/data/battle_controller_link_partner.s @@ -0,0 +1,9 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + +gLinkPartnerBufferCommands:: @ 85C9A94 + .incbin "baserom.gba", 0x5c9a94, 0xe4 + diff --git a/data/battle_controller_opponent.s b/data/battle_controller_opponent.s new file mode 100644 index 000000000..7f159fb54 --- /dev/null +++ b/data/battle_controller_opponent.s @@ -0,0 +1,9 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + +gOpponentBufferCommands:: @ 831C6C8 + .incbin "baserom.gba", 0x31c6c8, 0xec + diff --git a/data/battle_controller_player.s b/data/battle_controller_player.s new file mode 100644 index 000000000..1c7ff56fe --- /dev/null +++ b/data/battle_controller_player.s @@ -0,0 +1,8 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + +gPlayerBufferCommands:: @ 831C514 + .incbin "baserom.gba", 0x31c514, 0xe4 diff --git a/data/battle_controller_safari.s b/data/battle_controller_safari.s new file mode 100644 index 000000000..7c6e251c7 --- /dev/null +++ b/data/battle_controller_safari.s @@ -0,0 +1,8 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + + gSafariBufferCommands:: @ 85CDF20 + .incbin "baserom.gba", 0x5cdf20, 0x380 diff --git a/data/battle_controller_wally.s b/data/battle_controller_wally.s new file mode 100644 index 000000000..41c40f9eb --- /dev/null +++ b/data/battle_controller_wally.s @@ -0,0 +1,9 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + +gWallyBufferCommands:: @ 85DFDC0 + .incbin "baserom.gba", 0x5dfdc0, 0xe4 + diff --git a/data/data2b.s b/data/data2b.s index 6517d2724..19bab9c20 100644 --- a/data/data2b.s +++ b/data/data2b.s @@ -257,436 +257,3 @@ gUnknown_0831BCF3:: @ 831BCF3 gUnknown_0831BCF8:: @ 831BCF8 .incbin "baserom.gba", 0x31bcf8, 0x18 - .align 2, 0 -gBattleScriptingCommandsTable:: @ 831BD10 - .4byte atk00_attackcanceler - .4byte atk01_accuracycheck - .4byte atk02_attackstring - .4byte atk03_ppreduce - .4byte atk04_critcalc - .4byte atk05_cmd5 - .4byte sub_8047038 - .4byte atk07_cmd7 - .4byte atk08_cmd8 - .4byte atk09_attackanimation - .4byte sub_8047DC8 - .4byte atk0B_graphicalhpupdate - .4byte atk0C_datahpupdate - .4byte atk0D_critmessage - .4byte atk0E_missmessage - .4byte atk0F_resultmessage - .4byte atk10_printstring - .4byte atk11_printstring2 - .4byte atk12_waitmessage - .4byte atk13_printfromtable - .4byte atk14_printfromtable2 - .4byte atk15_seteffectwithchancetarget - .4byte sub_8049AC0 - .4byte sub_8049AD0 - .4byte sub_8049AE0 - .4byte atk19_faintpokemon - .4byte sub_8049E40 - .4byte sub_8049E7C - .4byte atk1C_jumpifstatus - .4byte atk1D_jumpifsecondarystatus - .4byte atk1E_jumpifability - .4byte sub_804A0DC - .4byte sub_804A154 - .4byte atk21_jumpifspecialstatusflag - .4byte sub_804A2D0 - .4byte sub_804A32C - .4byte sub_804ACD0 - .4byte atk25_cmd25 - .4byte atk26_80225F0_storebyteforjump - .4byte atk27_cmd27 - .4byte atk28_goto - .4byte atk29_jumpifbyte - .4byte sub_804B0A8 - .4byte sub_804B150 - .4byte sub_804B204 - .4byte sub_804B28C - .4byte sub_804B310 - .4byte sub_804B338 - .4byte sub_804B364 - .4byte atk31_copyarray - .4byte atk32_memcpy_with_offset - .4byte atk33_orbyte - .4byte atk34_orhalfword - .4byte atk35_orword - .4byte atk36_bicbyte - .4byte atk37_bichalfword - .4byte atk38_bicword - .4byte atk39_pause - .4byte sub_804B5E0 - .4byte atk3B_8022C68 - .4byte atk3C_return - .4byte sub_804B664 - .4byte atk3E_end2 - .4byte atk3F_end3 - .4byte atk40_801DBA0 - .4byte atk41_call - .4byte atk42_jumpiftype2 - .4byte sub_804B784 - .4byte sub_804B7D0 - .4byte atk46_cmd46 - .4byte sub_804B8B0 - .4byte sub_804B97C - .4byte atk48_playstatchangeanimation - .4byte sub_804BBCC - .4byte atk4A_damagecalc2 - .4byte atk4B_cmd4b - .4byte atk4C_switch1 - .4byte sub_804C904 - .4byte atk4E_switch3 - .4byte atk4F_jumpifcannotswitch - .4byte atk50_openpartyscreen - .4byte atk51_cmd51 - .4byte atk52_cmd52 - .4byte sub_804DDA8 - .4byte atk54_802511C - .4byte sub_804DE14 - .4byte atk56_8025194 - .4byte atk57_80251C4_flee - .4byte atk58_cmd58 - .4byte atk59_8025230 - .4byte sub_804E038 - .4byte atk5B_80256E0 - .4byte atk5C_cmd5c - .4byte sub_804E6D8 - .4byte atk5E_8025A70 - .4byte atk5F_8025B24 - .4byte atk60_cmd60 - .4byte atk61_8025BA4 - .4byte atk62_08025C6C - .4byte atk63_jumptoattack - .4byte atk64_statusanimation - .4byte atk65_8025D90 - .4byte atk66_8025E38 - .4byte atk67_8025ECC - .4byte sub_804ECA4 - .4byte atk69_8025FE0 - .4byte atk6A_stash_item_for_side - .4byte atk6B_end_battle_80261CC - .4byte atk6C_8026208 - .4byte sub_804F4D4 - .4byte atk6E_state0_side_becomes_attacker - .4byte atk6F_8026810 - .4byte atk70_record_ability_usage_of_side - .4byte atk71_80268A0 - .4byte atk72_flee - .4byte atk73_cmd73 - .4byte atk74_hp_tresholds_2 - .4byte atk75_8026A58 - .4byte sub_804F7AC - .4byte atk77_setprotect - .4byte atk78_faintifabilitynotdamp - .4byte atk79_setuserhptozero - .4byte sub_8050044 - .4byte sub_80500E8 - .4byte sub_8050164 - .4byte sub_80502C8 - .4byte atk7E_setreflect - .4byte sub_80503E8 - .4byte atk80_manipulatedamage - .4byte atk81_setrest - .4byte atk82_jumpifnotfirstturn - .4byte sub_8050640 - .4byte sub_80506EC - .4byte sub_8050768 - .4byte atk86_stockpiletobasedamage - .4byte atk87_stockpiletohprecovery - .4byte atk88_negativedamage - .4byte atk89_statbuffchange - .4byte atk8A_normalisebuffs - .4byte atk8B_setbide - .4byte atk8C_confuseifrepeatingattackends - .4byte atk8D_setloopcounter - .4byte atk8E_cmd8e - .4byte sub_805112C - .4byte sub_8051424 - .4byte atk91_givemoney - .4byte atk92_setlightscreen - .4byte atk93_ko_move - .4byte atk94_gethalfcurrentenemyhp - .4byte sub_8051AC0 - .4byte sub_8051B18 - .4byte atk97_tryinfatuatetarget - .4byte sub_8051E48 - .4byte atk99_setmisteffect - .4byte atk9A_setincreasedcriticalchance - .4byte atk9B_transformdataexecution - .4byte sub_80521FC - .4byte atk9D_copyattack - .4byte sub_80524DC - .4byte atk9F_nightshadedamageeffect - .4byte atkA0_psywavedamageeffect - .4byte atkA1_counterdamagecalculator - .4byte atkA2_mirrorcoatdamagecalculator - .4byte atkA3_disablelastusedattack - .4byte atkA4_setencore - .4byte sub_8052A70 - .4byte atkA6_settypetorandomresistance - .4byte atkA7_setalwayshitflag - .4byte atkA8_copymovepermanently - .4byte sub_8053018 - .4byte atkAA_destinybondeffect - .4byte atkAB_802A458 - .4byte atkAC_remaininghptopower - .4byte atkAD_reducepprandom - .4byte atkAE_clearstatusifnotsoundproofed - .4byte atkAF_cursetarget - .4byte atkB0_setspikes - .4byte atkB1_setforesight - .4byte atkB2_setperishsong - .4byte atkB3_rolloutdamagecalculation - .4byte atkB4_jumpifconfusedandattackmaxed - .4byte sub_8053AF8 - .4byte atkB6_happinesstodamagecalculation - .4byte atkB7_presentdamagecalculation - .4byte atkB8_setsafeguard - .4byte atkB9_magnitudedamagecalculation - .4byte atkBA_802B140 - .4byte sub_805405C - .4byte atkBC_maxattackhalvehp - .4byte atkBD_copyfoestats - .4byte atkBE_breakfree - .4byte atkBF_setcurled - .4byte atkC0_recoverbasedonsunlight - .4byte sub_8054400 - .4byte atkC2_selectnexttarget - .4byte atkC3_setfutureattack - .4byte atkC4_802B910 - .4byte atkC5_hidepreattack - .4byte atkC6_unhidepostattack - .4byte atkC7_setminimize - .4byte sub_8054A48 - .4byte atkC9_jumpifattackandspecialattackcannotfall - .4byte atkCA_setforcedtarget - .4byte atkCB_setcharge - .4byte atkCC_callterrainattack - .4byte atkCD_cureifburnedparalysedorpoisoned - .4byte atkCE_settorment - .4byte atkCF_jumpifnodamage - .4byte atkD0_settaunt - .4byte atkD1_sethelpinghand - .4byte sub_8054EB4 - .4byte sub_8055148 - .4byte atkD4_802C408 - .4byte sub_8055294 - .4byte atkD6_doubledamagedealtifdamaged - .4byte sub_805534C - .4byte atkD8_setdamagetohealthdifference - .4byte atkD9_scaledamagebyhealthratio - .4byte atkDA_abilityswap - .4byte atkDB_imprisoneffect - .4byte atkDC_setgrudge - .4byte atkDD_weightdamagecalculation - .4byte atkDE_asistattackselect - .4byte atkDF_setmagiccoat - .4byte atkE0_setstealstatchange - .4byte atkE1_802CBE4 - .4byte atkE2_cmde2 - .4byte atkE3_jumpiffainted - .4byte sub_8055B48 - .4byte atkE5_pickupitemcalculation - .4byte atkE6_castform_transform - .4byte atkE7_castform_switch - .4byte atkE8_settypebasedhalvers - .4byte atkE9_seteffectbyweather - .4byte atkEA_recycleitem - .4byte atkEB_settypetoterrain - .4byte atkEC_802D2A0 - .4byte atkED_802D364 - .4byte atkEE_removereflectlightscreen - .4byte sub_8056300 - .4byte atkF0_catch_pokemon - .4byte atkF1_802D95C - .4byte sub_80568CC - .4byte atkF3_receive_new_pokemon_maybe - .4byte sub_8056E78 - .4byte atkF5_reset_attacker_bd_x4C - .4byte sub_8056ED0 - .4byte sub_8056EDC - .4byte sub_8056EF8 - -gUnknown_0831C0F4:: @ 831C0F4 - .incbin "baserom.gba", 0x31c0f4, 0x34 - -gUnknown_0831C128:: @ 831C128 - .incbin "baserom.gba", 0x31c128, 0xc - -gUnknown_0831C134:: @ 831C134 - .incbin "baserom.gba", 0x31c134, 0xf0 - -gUnknown_0831C224:: @ 831C224 - .incbin "baserom.gba", 0x31c224, 0xa4 - -gUnknown_0831C2C8:: @ 831C2C8 - .incbin "baserom.gba", 0x31c2c8, 0x20 - -gUnknown_0831C2E8:: @ 831C2E8 - .incbin "baserom.gba", 0x31c2e8, 0xd8 - -gUnknown_0831C3C0:: @ 831C3C0 - .incbin "baserom.gba", 0x31c3c0, 0x18 - -gUnknown_0831C3D8:: @ 831C3D8 - .incbin "baserom.gba", 0x31c3d8, 0x8 - -gUnknown_0831C3E0:: @ 831C3E0 - .incbin "baserom.gba", 0x31c3e0, 0x28 - -gUnknown_0831C408:: @ 831C408 - .incbin "baserom.gba", 0x31c408, 0xc - -gUnknown_0831C414:: @ 831C414 - .incbin "baserom.gba", 0x31c414, 0x14 - -gUnknown_0831C428:: @ 831C428 - .incbin "baserom.gba", 0x31c428, 0x18 - -@ 831C440 - .include "data/pickup_items.inc" - -gUnknown_0831C483:: @ 831C483 - .incbin "baserom.gba", 0x31c483, 0xa - -gUnknown_0831C48D:: @ 831C48D - .incbin "baserom.gba", 0x31c48d, 0x7 - -gUnknown_0831C494:: @ 831C494 - .incbin "baserom.gba", 0x31c494, 0x64 - -gUnknown_0831C4F8:: @ 831C4F8 - .incbin "baserom.gba", 0x31c4f8, 0x1c - -gPlayerBufferCommands:: @ 831C514 - .incbin "baserom.gba", 0x31c514, 0xe4 - -gUnknown_0831C5F8:: @ 831C5F8 - .incbin "baserom.gba", 0x31c5f8, 0xc - -gUnknown_0831C604:: @ 831C604 - .incbin "baserom.gba", 0x31c604, 0x1c - -gUnknown_0831C620:: @ 831C620 - .incbin "baserom.gba", 0x31c620, 0x8 - -gUnknown_0831C628:: @ 831C628 - .incbin "baserom.gba", 0x31c628, 0x60 - -gUnknown_0831C688:: @ 831C688 - .incbin "baserom.gba", 0x31c688, 0x18 - -gUnknown_0831C6A0:: @ 831C6A0 - .incbin "baserom.gba", 0x31c6a0, 0x10 - -gUnknown_0831C6B0:: @ 831C6B0 - .incbin "baserom.gba", 0x31c6b0, 0x18 - -gOpponentBufferCommands:: @ 831C6C8 - .incbin "baserom.gba", 0x31c6c8, 0xec - -gUnknown_0831C7B4:: @ 831C7B4 - .incbin "baserom.gba", 0x31c7b4, 0xe4 - -@ 831C898 - .include "data/battle_moves.inc" - - .incbin "baserom.gba", 0x31d93c, 0x10 - -@ 831D94C - .include "data/pokedex_order.inc" - -@ 831E2F0 - .include "data/spinda_spot_graphics.inc" - -@ 831E380 - .include "data/item_effect_info.inc" - -@ 831E818 - .include "data/nature_stat_table.inc" - -@ 831E898 - .include "data/tm_hm_learnsets.inc" - -@ 831F578 - .include "data/trainer_pic_indices.inc" - -@ 831F5CA - .include "data/trainer_class_name_indices.inc" - -@ 831F61C - .include "data/cry_id_table.inc" - -@ 831F72C - .include "data/experience_tables.inc" - -@ 83203CC - .include "data/base_stats.inc" - -@ 83230DC - .include "data/level_up_learnsets.inc" - -@ 832531C - .include "data/evolution_table.inc" - -@ 832937C - .include "data/level_up_learnset_pointers.inc" - -gUnknown_083299EC:: @ 83299EC - .incbin "baserom.gba", 0x3299ec, 0x19b - -gUnknown_08329B87:: @ 8329B87 - .incbin "baserom.gba", 0x329b87, 0x19b - -gUnknown_08329D22:: @ 8329D22 - .incbin "baserom.gba", 0x329d22, 0x4 - -gUnknown_08329D26:: @ 8329D26 - .incbin "baserom.gba", 0x329d26, 0x4 - -gUnknown_08329D2A:: @ 8329D2A - .incbin "baserom.gba", 0x329d2a, 0x4 - -gUnknown_08329D2E:: @ 8329D2E - .incbin "baserom.gba", 0x329d2e, 0x1a - -gUnknown_08329D48:: @ 8329D48 - .incbin "baserom.gba", 0x329d48, 0xc - -gUnknown_08329D54:: @ 8329D54 - .incbin "baserom.gba", 0x329d54, 0x20 - -gHoldEffectToType:: @ 8329D74 - .incbin "baserom.gba", 0x329d74, 0x24 - -gUnknown_08329D98:: @ 8329D98 - .incbin "baserom.gba", 0x329d98, 0x60 - -gUnknown_08329DF8:: @ 8329DF8 - .incbin "baserom.gba", 0x329df8, 0xc0 - -gUnknown_08329EB8:: @ 8329EB8 - .incbin "baserom.gba", 0x329eb8, 0xa - -gUnknown_08329EC2:: @ 8329EC2 - .incbin "baserom.gba", 0x329ec2, 0x6 - -gUnknown_08329EC8:: @ 8329EC8 - .incbin "baserom.gba", 0x329ec8, 0x6 - -gUnknown_08329ECE:: @ 8329ECE - .incbin "baserom.gba", 0x329ece, 0x1c - -gUnknown_08329EEA:: @ 8329EEA - .incbin "baserom.gba", 0x329eea, 0x12 - -gUnknown_08329EFC:: @ 8329EFC - .incbin "baserom.gba", 0x329efc, 0x2 - -gUnknown_08329EFE:: @ 8329EFE - .incbin "baserom.gba", 0x329efe, 0x2a - -gUnknown_08329F28:: @ 8329F28 - .incbin "baserom.gba", 0x329f28, 0x18 diff --git a/data/data2b_2.s b/data/data2b_2.s new file mode 100644 index 000000000..a1088768e --- /dev/null +++ b/data/data2b_2.s @@ -0,0 +1,30 @@ +@ the second big chunk of data + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 2 + + +gUnknown_0831C5F8:: @ 831C5F8 + .incbin "baserom.gba", 0x31c5f8, 0xc + +gUnknown_0831C604:: @ 831C604 + .incbin "baserom.gba", 0x31c604, 0x1c + +gUnknown_0831C620:: @ 831C620 + .incbin "baserom.gba", 0x31c620, 0x8 + +gUnknown_0831C628:: @ 831C628 + .incbin "baserom.gba", 0x31c628, 0x60 + +gUnknown_0831C688:: @ 831C688 + .incbin "baserom.gba", 0x31c688, 0x18 + +gUnknown_0831C6A0:: @ 831C6A0 + .incbin "baserom.gba", 0x31c6a0, 0x10 + +gUnknown_0831C6B0:: @ 831C6B0 + .incbin "baserom.gba", 0x31c6b0, 0x18 diff --git a/data/data2c.s b/data/data2c.s new file mode 100644 index 000000000..75c146269 --- /dev/null +++ b/data/data2c.s @@ -0,0 +1,110 @@ +@ the second big chunk of data + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 2 + + +@ 831C898 + .include "data/battle_moves.inc" + + .incbin "baserom.gba", 0x31d93c, 0x10 + +@ 831D94C + .include "data/pokedex_order.inc" + +@ 831E2F0 + .include "data/spinda_spot_graphics.inc" + +@ 831E380 + .include "data/item_effect_info.inc" + +@ 831E818 + .include "data/nature_stat_table.inc" + +@ 831E898 + .include "data/tm_hm_learnsets.inc" + +@ 831F578 + .include "data/trainer_pic_indices.inc" + +@ 831F5CA + .include "data/trainer_class_name_indices.inc" + +@ 831F61C + .include "data/cry_id_table.inc" + +@ 831F72C + .include "data/experience_tables.inc" + +@ 83203CC + .include "data/base_stats.inc" + +@ 83230DC + .include "data/level_up_learnsets.inc" + +@ 832531C + .include "data/evolution_table.inc" + +@ 832937C + .include "data/level_up_learnset_pointers.inc" + +gUnknown_083299EC:: @ 83299EC + .incbin "baserom.gba", 0x3299ec, 0x19b + +gUnknown_08329B87:: @ 8329B87 + .incbin "baserom.gba", 0x329b87, 0x19b + +gUnknown_08329D22:: @ 8329D22 + .incbin "baserom.gba", 0x329d22, 0x4 + +gUnknown_08329D26:: @ 8329D26 + .incbin "baserom.gba", 0x329d26, 0x4 + +gUnknown_08329D2A:: @ 8329D2A + .incbin "baserom.gba", 0x329d2a, 0x4 + +gUnknown_08329D2E:: @ 8329D2E + .incbin "baserom.gba", 0x329d2e, 0x1a + +gUnknown_08329D48:: @ 8329D48 + .incbin "baserom.gba", 0x329d48, 0xc + +gUnknown_08329D54:: @ 8329D54 + .incbin "baserom.gba", 0x329d54, 0x20 + +gHoldEffectToType:: @ 8329D74 + .incbin "baserom.gba", 0x329d74, 0x24 + +gUnknown_08329D98:: @ 8329D98 + .incbin "baserom.gba", 0x329d98, 0x60 + +gUnknown_08329DF8:: @ 8329DF8 + .incbin "baserom.gba", 0x329df8, 0xc0 + +gUnknown_08329EB8:: @ 8329EB8 + .incbin "baserom.gba", 0x329eb8, 0xa + +gUnknown_08329EC2:: @ 8329EC2 + .incbin "baserom.gba", 0x329ec2, 0x6 + +gUnknown_08329EC8:: @ 8329EC8 + .incbin "baserom.gba", 0x329ec8, 0x6 + +gUnknown_08329ECE:: @ 8329ECE + .incbin "baserom.gba", 0x329ece, 0x1c + +gUnknown_08329EEA:: @ 8329EEA + .incbin "baserom.gba", 0x329eea, 0x12 + +gUnknown_08329EFC:: @ 8329EFC + .incbin "baserom.gba", 0x329efc, 0x2 + +gUnknown_08329EFE:: @ 8329EFE + .incbin "baserom.gba", 0x329efe, 0x2a + +gUnknown_08329F28:: @ 8329F28 + .incbin "baserom.gba", 0x329f28, 0x18 diff --git a/data/data3.s b/data/data3.s index 1a5742a99..c9845a7db 100644 --- a/data/data3.s +++ b/data/data3.s @@ -5055,5 +5055,3 @@ gUnknown_085C9A30:: @ 85C9A30 gUnknown_085C9A53:: @ 85C9A53 .incbin "baserom.gba", 0x5c9a53, 0x41 -gLinkPartnerBufferCommands:: @ 85C9A94 - .incbin "baserom.gba", 0x5c9a94, 0xe4 diff --git a/data/rom_8158B30.s b/data/rom_8158B30.s index 8cf87117a..c8d9baa1a 100644 --- a/data/rom_8158B30.s +++ b/data/rom_8158B30.s @@ -3,8 +3,6 @@ .section .rodata -gSafariBufferCommands:: @ 85CDF20 - .incbin "baserom.gba", 0x5cdf20, 0x380 gUnknown_085CE2A0:: @ 85CE2A0 .incbin "baserom.gba", 0x5ce2a0, 0xb0 @@ -236,6 +234,3 @@ gUnknown_085DFDA0:: @ 85DFDA0 gUnknown_085DFDB8:: @ 85DFDB8 .incbin "baserom.gba", 0x5dfdb8, 0x8 - -gWallyBufferCommands:: @ 85DFDC0 - .incbin "baserom.gba", 0x5dfdc0, 0xe4 diff --git a/ld_script.txt b/ld_script.txt index c875d0579..0f45e0625 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -55,6 +55,7 @@ SECTIONS { src/decompress.o(.text); asm/rom_8034C54.o(.text); asm/battle_3.o(.text); + src/battle_4.o(.text); asm/battle_4.o(.text); asm/battle_5.o(.text); asm/battle_controller_player.o(.text); @@ -282,14 +283,24 @@ SECTIONS { data/data2.o(.rodata); src/rtc.o(.rodata); data/data2b.o(.rodata); + src/battle_4.o(.rodata); + data/battle_4.o(.rodata); + data/battle_controller_player.o(.rodata); + data/data2b_2.o(.rodata); + data/battle_controller_opponent.o(.rodata); + data/battle_controller_link_opponent.o(.rodata); + data/data2c.o(.rodata); src/trig.o(.rodata); data/data3.o(.rodata); + data/battle_controller_link_partner.o(.rodata); data/battle_message.o(.rodata); data/cable_car.o(.rodata); data/save.o(.rodata); data/field_effect_helpers.o(.rodata); data/contest_ai.o(.rodata); + data/battle_controller_safari.o(.rodata); data/rom_8158B30.o(.rodata); + data/battle_controller_wally.o(.rodata); data/player_pc.o(.rodata); data/intro.o(.rodata); data/field_region_map.o(.rodata); diff --git a/src/battle_4.c b/src/battle_4.c new file mode 100644 index 000000000..d6f1cd1f5 --- /dev/null +++ b/src/battle_4.c @@ -0,0 +1,595 @@ +#include "global.h" +#include "battle.h" + +void atk00_attackcanceler(void); +void atk01_accuracycheck(void); +void atk02_attackstring(void); +void atk03_ppreduce(void); +void atk04_critcalc(void); +void atk05_damagecalc1(void); +void atk06_typecalc(void); +void atk07_dmg_adjustment(void); +void atk08_dmg_adjustment2(void); +void atk09_attackanimation(void); +void atk0A_waitanimation(void); +void atk0B_healthbarupdate(void); +void atk0C_datahpupdate(void); +void atk0D_critmessage(void); +void atk0E_effectiveness_sound(void); +void atk0F_resultmessage(void); +void atk10_printstring(void); +void atk11_printstring_playeronly(void); +void atk12_waitmessage(void); +void atk13_printfromtable(void); +void atk14_printfromtable_playeronly(void); +void atk15_seteffectwithchancetarget(void); +void atk16_seteffectprimary(void); +void atk17_seteffectsecondary(void); +void atk18_status_effect_clear(void); +void atk19_faint_pokemon(void); +void atk1A_faint_animation(void); +void atk1B_faint_effects_clear(void); +void atk1C_jumpifstatus(void); +void atk1D_jumpifstatus2(void); +void atk1E_jumpifability(void); +void atk1F_jumpifsideaffecting(void); +void atk20_jumpifstat(void); +void atk21_jumpifstatus3(void); +void atk22_jumpiftype(void); +void atk23_getexp(void); +void atk24(void); +void atk25_move_values_cleanup(void); +void atk26_set_multihit(void); +void atk27_decrement_multihit(void); +void atk28_goto(void); +void atk29_jumpifbyte(void); +void atk2A_jumpifhalfword(void); +void atk2B_jumpifword(void); +void atk2C_jumpifarrayequal(void); +void atk2D_jumpifarraynotequal(void); +void atk2E_setbyte(void); +void atk2F_addbyte(void); +void atk30_subbyte(void); +void atk31_copyarray(void); +void atk32_copyarray_withindex(void); +void atk33_orbyte(void); +void atk34_orhalfword(void); +void atk35_orword(void); +void atk36_bicbyte(void); +void atk37_bichalfword(void); +void atk38_bicword(void); +void atk39_pause(void); +void atk3A_waitstate(void); +void atk3B_healthbar_update(void); +void atk3C_return(void); +void atk3D_end(void); +void atk3E_end2(void); +void atk3F_end3(void); +void atk40_jump_if_move_affected_by_protect(void); +void atk41_call(void); +void atk42_jumpiftype2(void); +void atk43_jumpifabilitypresent(void); +void atk44(void); +void atk45_playanimation(void); +void atk46_playanimation2(void); +void atk47_setgraphicalstatchangevalues(void); +void atk48_playstatchangeanimation(void); +void atk49_moveendturn(void); +void atk4A_typecalc2(void); +void atk4B_return_atk_to_ball(void); +void atk4C_copy_poke_data(void); +void atk4D_switch_data_update(void); +void atk4E_switchin_anim(void); +void atk4F_jump_if_cannot_switch(void); +void atk50_openpartyscreen(void); +void atk51_switch_handle_order(void); +void atk52_switch_in_effects(void); +void atk53_trainer_slide(void); +void atk54_effectiveness_sound(void); +void atk55_play_sound(void); +void atk56_fainting_cry(void); +void atk57(void); +void atk58_return_to_ball(void); +void atk59_learnmove_inbattle(void); +void atk5A(void); +void atk5B_80256E0(void); +void atk5C_hitanimation(void); +void atk5D_getmoneyreward(void); +void atk5E_8025A70(void); +void atk5F_8025B24(void); +void atk60_increment_gamestat(void); +void atk61_8025BA4(void); +void atk62_08025C6C(void); +void atk63_jumptorandomattack(void); +void atk64_statusanimation(void); +void atk65_status2animation(void); +void atk66_chosenstatusanimation(void); +void atk67_8025ECC(void); +void atk68_80246A0(void); +void atk69_dmg_adjustment2(void); +void atk6A_removeitem(void); +void atk6B_atknameinbuff1(void); +void atk6C_lvlbox_display(void); +void atk6D_set_sentpokes_values(void); +void atk6E_set_atk_to_player0(void); +void atk6F_set_visible(void); +void atk70_record_ability(void); +void atk71_buffer_move_to_learn(void); +void atk72_jump_if_can_run_frombattle(void); +void atk73_hp_thresholds(void); +void atk74_hp_thresholds2(void); +void atk75_8026A58(void); +void atk76_various(void); +void atk77_setprotect(void); +void atk78_faintifabilitynotdamp(void); +void atk79_setatkhptozero(void); +void atk7A_jumpwhiletargetvalid(void); +void atk7B_healhalfHP_if_possible(void); +void atk7C_8025508(void); +void atk7D_set_rain(void); +void atk7E_setreflect(void); +void atk7F_setseeded(void); +void atk80_manipulatedamage(void); +void atk81_setrest(void); +void atk82_jumpifnotfirstturn(void); +void atk83_nop(void); +void atk84_jump_if_cant_sleep(void); +void atk85_stockpile(void); +void atk86_stockpiletobasedamage(void); +void atk87_stockpiletohpheal(void); +void atk88_negativedamage(void); +void atk89_statbuffchange(void); +void atk8A_normalisebuffs(void); +void atk8B_setbide(void); +void atk8C_confuseifrepeatingattackends(void); +void atk8D_setmultihit_counter(void); +void atk8E_prepare_multihit(void); +void atk8F_forcerandomswitch(void); +void atk90_conversion_type_change(void); +void atk91_givepaydaymoney(void); +void atk92_setlightscreen(void); +void atk93_ko_move(void); +void atk94_gethalfcurrentenemyhp(void); +void atk95_setsandstorm(void); +void atk96_weatherdamage(void); +void atk97_try_infatuation(void); +void atk98_status_icon_update(void); +void atk99_setmist(void); +void atk9A_set_focusenergy(void); +void atk9B_transformdataexecution(void); +void atk9C_set_substitute(void); +void atk9D_copyattack(void); +void atk9E_metronome(void); +void atk9F_dmgtolevel(void); +void atkA0_psywavedamageeffect(void); +void atkA1_counterdamagecalculator(void); +void atkA2_mirrorcoatdamagecalculator(void); +void atkA3_disablelastusedattack(void); +void atkA4_setencore(void); +void atkA5_painsplitdmgcalc(void); +void atkA6_settypetorandomresistance(void); +void atkA7_setalwayshitflag(void); +void atkA8_copymovepermanently(void); +void atkA9_sleeptalk_choose_move(void); +void atkAA_set_destinybond(void); +void atkAB_DestinyBondFlagUpdate(void); +void atkAC_remaininghptopower(void); +void atkAD_spite_ppreduce(void); +void atkAE_heal_party_status(void); +void atkAF_cursetarget(void); +void atkB0_set_spikes(void); +void atkB1_set_foresight(void); +void atkB2_setperishsong(void); +void atkB3_rolloutdamagecalculation(void); +void atkB4_jumpifconfusedandstatmaxed(void); +void atkB5_furycuttercalc(void); +void atkB6_happinesstodamagecalculation(void); +void atkB7_presentdamagecalculation(void); +void atkB8_set_safeguard(void); +void atkB9_magnitudedamagecalculation(void); +void atkBA_jumpifnopursuitswitchdmg(void); +void atkBB_setsunny(void); +void atkBC_maxattackhalvehp(void); +void atkBD_copyfoestats(void); +void atkBE_breakfree(void); +void atkBF_set_defense_curl(void); +void atkC0_recoverbasedonsunlight(void); +void atkC1_hidden_power(void); +void atkC2_selectnexttarget(void); +void atkC3_setfutureattack(void); +void atkC4_beat_up(void); +void atkC5_hidepreattack(void); +void atkC6_unhidepostattack(void); +void atkC7_setminimize(void); +void atkC8_sethail(void); +void atkC9_jumpifattackandspecialattackcannotfall(void); +void atkCA_setforcedtarget(void); +void atkCB_setcharge(void); +void atkCC_callterrainattack(void); +void atkCD_cureifburnedparalysedorpoisoned(void); +void atkCE_settorment(void); +void atkCF_jumpifnodamage(void); +void atkD0_settaunt(void); +void atkD1_set_helpinghand(void); +void atkD2_swap_items(void); +void atkD3_copy_ability(void); +void atkD4_wish_effect(void); +void atkD5_setroots(void); +void atkD6_doubledamagedealtifdamaged(void); +void atkD7_setyawn(void); +void atkD8_setdamagetohealthdifference(void); +void atkD9_scaledamagebyhealthratio(void); +void atkDA_abilityswap(void); +void atkDB_imprisoneffect(void); +void atkDC_setgrudge(void); +void atkDD_weightdamagecalculation(void); +void atkDE_asistattackselect(void); +void atkDF_setmagiccoat(void); +void atkE0_setstealstatchange(void); +void atkE1_intimidate_string_loader(void); +void atkE2_switchout_abilities(void); +void atkE3_jumpiffainted(void); +void atkE4_getsecretpowereffect(void); +void atkE5_pickup(void); +void atkE6_castform_change_animation(void); +void atkE7_castform_data_change(void); +void atkE8_settypebasedhalvers(void); +void atkE9_setweatherballtype(void); +void atkEA_recycleitem(void); +void atkEB_settypetoterrain(void); +void atkEC_pursuit_sth(void); +void atkED_802B4B4(void); +void atkEE_removelightscreenreflect(void); +void atkEF_pokeball_catch_calculation(void); +void atkF0_copy_caught_poke(void); +void atkF1_setpoke_as_caught(void); +void atkF2_display_dex_info(void); +void atkF3_nickname_caught_poke(void); +void atkF4_802BEF0(void); +void atkF5_removeattackerstatus1(void); +void atkF6_802BF48(void); +void atkF7_802BF54(void); +void sub_8056EF8(void); + +void (* const gBattleScriptingCommandsTable[])(void) = +{ + atk00_attackcanceler, + atk01_accuracycheck, + atk02_attackstring, + atk03_ppreduce, + atk04_critcalc, + atk05_damagecalc1, + atk06_typecalc, + atk07_dmg_adjustment, + atk08_dmg_adjustment2, + atk09_attackanimation, + atk0A_waitanimation, + atk0B_healthbarupdate, + atk0C_datahpupdate, + atk0D_critmessage, + atk0E_effectiveness_sound, + atk0F_resultmessage, + atk10_printstring, + atk11_printstring_playeronly, + atk12_waitmessage, + atk13_printfromtable, + atk14_printfromtable_playeronly, + atk15_seteffectwithchancetarget, + atk16_seteffectprimary, + atk17_seteffectsecondary, + atk18_status_effect_clear, + atk19_faint_pokemon, + atk1A_faint_animation, + atk1B_faint_effects_clear, + atk1C_jumpifstatus, + atk1D_jumpifstatus2, + atk1E_jumpifability, + atk1F_jumpifsideaffecting, + atk20_jumpifstat, + atk21_jumpifstatus3, + atk22_jumpiftype, + atk23_getexp, + atk24, + atk25_move_values_cleanup, + atk26_set_multihit, + atk27_decrement_multihit, + atk28_goto, + atk29_jumpifbyte, + atk2A_jumpifhalfword, + atk2B_jumpifword, + atk2C_jumpifarrayequal, + atk2D_jumpifarraynotequal, + atk2E_setbyte, + atk2F_addbyte, + atk30_subbyte, + atk31_copyarray, + atk32_copyarray_withindex, + atk33_orbyte, + atk34_orhalfword, + atk35_orword, + atk36_bicbyte, + atk37_bichalfword, + atk38_bicword, + atk39_pause, + atk3A_waitstate, + atk3B_healthbar_update, + atk3C_return, + atk3D_end, + atk3E_end2, + atk3F_end3, + atk40_jump_if_move_affected_by_protect, + atk41_call, + atk42_jumpiftype2, + atk43_jumpifabilitypresent, + atk44, + atk45_playanimation, + atk46_playanimation2, + atk47_setgraphicalstatchangevalues, + atk48_playstatchangeanimation, + atk49_moveendturn, + atk4A_typecalc2, + atk4B_return_atk_to_ball, + atk4C_copy_poke_data, + atk4D_switch_data_update, + atk4E_switchin_anim, + atk4F_jump_if_cannot_switch, + atk50_openpartyscreen, + atk51_switch_handle_order, + atk52_switch_in_effects, + atk53_trainer_slide, + atk54_effectiveness_sound, + atk55_play_sound, + atk56_fainting_cry, + atk57, + atk58_return_to_ball, + atk59_learnmove_inbattle, + atk5A, + atk5B_80256E0, + atk5C_hitanimation, + atk5D_getmoneyreward, + atk5E_8025A70, + atk5F_8025B24, + atk60_increment_gamestat, + atk61_8025BA4, + atk62_08025C6C, + atk63_jumptorandomattack, + atk64_statusanimation, + atk65_status2animation, + atk66_chosenstatusanimation, + atk67_8025ECC, + atk68_80246A0, + atk69_dmg_adjustment2, + atk6A_removeitem, + atk6B_atknameinbuff1, + atk6C_lvlbox_display, + atk6D_set_sentpokes_values, + atk6E_set_atk_to_player0, + atk6F_set_visible, + atk70_record_ability, + atk71_buffer_move_to_learn, + atk72_jump_if_can_run_frombattle, + atk73_hp_thresholds, + atk74_hp_thresholds2, + atk75_8026A58, + atk76_various, + atk77_setprotect, + atk78_faintifabilitynotdamp, + atk79_setatkhptozero, + atk7A_jumpwhiletargetvalid, + atk7B_healhalfHP_if_possible, + atk7C_8025508, + atk7D_set_rain, + atk7E_setreflect, + atk7F_setseeded, + atk80_manipulatedamage, + atk81_setrest, + atk82_jumpifnotfirstturn, + atk83_nop, + atk84_jump_if_cant_sleep, + atk85_stockpile, + atk86_stockpiletobasedamage, + atk87_stockpiletohpheal, + atk88_negativedamage, + atk89_statbuffchange, + atk8A_normalisebuffs, + atk8B_setbide, + atk8C_confuseifrepeatingattackends, + atk8D_setmultihit_counter, + atk8E_prepare_multihit, + atk8F_forcerandomswitch, + atk90_conversion_type_change, + atk91_givepaydaymoney, + atk92_setlightscreen, + atk93_ko_move, + atk94_gethalfcurrentenemyhp, + atk95_setsandstorm, + atk96_weatherdamage, + atk97_try_infatuation, + atk98_status_icon_update, + atk99_setmist, + atk9A_set_focusenergy, + atk9B_transformdataexecution, + atk9C_set_substitute, + atk9D_copyattack, + atk9E_metronome, + atk9F_dmgtolevel, + atkA0_psywavedamageeffect, + atkA1_counterdamagecalculator, + atkA2_mirrorcoatdamagecalculator, + atkA3_disablelastusedattack, + atkA4_setencore, + atkA5_painsplitdmgcalc, + atkA6_settypetorandomresistance, + atkA7_setalwayshitflag, + atkA8_copymovepermanently, + atkA9_sleeptalk_choose_move, + atkAA_set_destinybond, + atkAB_DestinyBondFlagUpdate, + atkAC_remaininghptopower, + atkAD_spite_ppreduce, + atkAE_heal_party_status, + atkAF_cursetarget, + atkB0_set_spikes, + atkB1_set_foresight, + atkB2_setperishsong, + atkB3_rolloutdamagecalculation, + atkB4_jumpifconfusedandstatmaxed, + atkB5_furycuttercalc, + atkB6_happinesstodamagecalculation, + atkB7_presentdamagecalculation, + atkB8_set_safeguard, + atkB9_magnitudedamagecalculation, + atkBA_jumpifnopursuitswitchdmg, + atkBB_setsunny, + atkBC_maxattackhalvehp, + atkBD_copyfoestats, + atkBE_breakfree, + atkBF_set_defense_curl, + atkC0_recoverbasedonsunlight, + atkC1_hidden_power, + atkC2_selectnexttarget, + atkC3_setfutureattack, + atkC4_beat_up, + atkC5_hidepreattack, + atkC6_unhidepostattack, + atkC7_setminimize, + atkC8_sethail, + atkC9_jumpifattackandspecialattackcannotfall, + atkCA_setforcedtarget, + atkCB_setcharge, + atkCC_callterrainattack, + atkCD_cureifburnedparalysedorpoisoned, + atkCE_settorment, + atkCF_jumpifnodamage, + atkD0_settaunt, + atkD1_set_helpinghand, + atkD2_swap_items, + atkD3_copy_ability, + atkD4_wish_effect, + atkD5_setroots, + atkD6_doubledamagedealtifdamaged, + atkD7_setyawn, + atkD8_setdamagetohealthdifference, + atkD9_scaledamagebyhealthratio, + atkDA_abilityswap, + atkDB_imprisoneffect, + atkDC_setgrudge, + atkDD_weightdamagecalculation, + atkDE_asistattackselect, + atkDF_setmagiccoat, + atkE0_setstealstatchange, + atkE1_intimidate_string_loader, + atkE2_switchout_abilities, + atkE3_jumpiffainted, + atkE4_getsecretpowereffect, + atkE5_pickup, + atkE6_castform_change_animation, + atkE7_castform_data_change, + atkE8_settypebasedhalvers, + atkE9_setweatherballtype, + atkEA_recycleitem, + atkEB_settypetoterrain, + atkEC_pursuit_sth, + atkED_802B4B4, + atkEE_removelightscreenreflect, + atkEF_pokeball_catch_calculation, + atkF0_copy_caught_poke, + atkF1_setpoke_as_caught, + atkF2_display_dex_info, + atkF3_nickname_caught_poke, + atkF4_802BEF0, + atkF5_removeattackerstatus1, + atkF6_802BF48, + atkF7_802BF54, + sub_8056EF8 +}; + +struct statFractions +{ + u8 dividend; + u8 divisor; +}; + +const struct statFractions gAccuracyStageRatios[] = +{ + { 33, 100}, // -6 + { 36, 100}, // -5 + { 43, 100}, // -4 + { 50, 100}, // -3 + { 60, 100}, // -2 + { 75, 100}, // -1 + { 1, 1}, // 0 + {133, 100}, // +1 + {166, 100}, // +2 + { 2, 1}, // +3 + {233, 100}, // +4 + {133, 50}, // +5 + { 3, 1}, // +6 +}; + +// The chance is 1/N for each stage. +const u16 gCriticalHitChance[] = {16, 8, 4, 3, 2}; + +const u32 gStatusFlagsForMoveEffects[] = +{ + 0x00000000, + 0x00000007, + 0x00000008, + 0x00000010, + 0x00000020, + 0x00000040, + 0x00000080, + 0x00000007, + 0x00000008, + 0x00000000, + 0x00000070, + 0x00000000, + 0x00001000, + 0x0000E000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00400000, + 0x00000000, + 0x00000000, + 0x04000000, + 0x08000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000C00, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000 +};