Merge pull request #372 from DizzyEggg/master

decompile battle_4
This commit is contained in:
Cameron Hall 2017-07-22 18:44:01 -05:00 committed by GitHub
commit 5891cedc1b
21 changed files with 19278 additions and 33519 deletions

1
.gitignore vendored
View File

@ -38,3 +38,4 @@ Thumbs.db
build/
.idea/
*.DS_Store
*.pl

View File

@ -573,7 +573,7 @@ _080127E0:
str r0, [sp]
movs r0, 0
movs r2, 0x6
bl dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f
bl EmitChoosePokemon
b _0801289E
.align 2, 0
_08012808: .4byte gActiveBank
@ -624,7 +624,7 @@ _08012854:
movs r1, 0
_0801286C:
movs r3, 0
bl dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f
bl EmitChoosePokemon
b _0801289E
.align 2, 0
_08012874: .4byte gActionForBanks
@ -643,7 +643,7 @@ _08012884:
movs r1, 0
movs r2, 0x6
movs r3, 0
bl dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f
bl EmitChoosePokemon
_0801289E:
ldr r0, _080128A8 @ =gActiveBank
ldrb r0, [r0]
@ -2789,7 +2789,7 @@ _08013A04:
beq _08013A0E
b _08013B42
_08013A0E:
bl sub_80325B8
bl BattleMusicStop
ldr r1, _08013A3C @ =gBattlescriptCurrInstr
ldr r0, _08013A40 @ =gUnknown_081D8DBE
str r0, [r1]
@ -3936,14 +3936,14 @@ _080143B6:
cmp r0, 0x1F
bne _08014404
adds r0, r2, 0
bl sub_801E3B4
bl BankGetTurnOrder
lsls r0, 24
lsrs r0, 24
ldr r1, [sp]
cmp r0, r1
bcs _08014404
ldrb r0, [r4]
bl sub_801E3B4
bl BankGetTurnOrder
lsls r0, 24
lsrs r0, 24
str r0, [sp]
@ -4261,7 +4261,7 @@ _0801469A:
strb r0, [r5]
_080146AC:
ldr r4, _080146E0 @ =gBattlescriptCurrInstr
ldr r3, _080146E4 @ =gUnknown_081D6BBC
ldr r3, _080146E4 @ =gBattleScriptsEffectsTable
ldr r2, _080146E8 @ =gBattleMoves
ldr r0, _080146EC @ =gCurrentMove
ldrh r1, [r0]
@ -4288,7 +4288,7 @@ _080146CC:
bx r0
.align 2, 0
_080146E0: .4byte gBattlescriptCurrInstr
_080146E4: .4byte gUnknown_081D6BBC
_080146E4: .4byte gBattleScriptsEffectsTable
_080146E8: .4byte gBattleMoves
_080146EC: .4byte gCurrentMove
_080146F0: .4byte gFightStateTracker
@ -5528,8 +5528,8 @@ _08015148: .4byte 0x00016112
_0801514C: .4byte 0x00017130
thumb_func_end bsC_8016D70
thumb_func_start sub_8015150
sub_8015150: @ 8015150
thumb_func_start GetBattleBank
GetBattleBank: @ 8015150
push {lr}
lsls r0, 24
lsrs r0, 24
@ -5592,10 +5592,10 @@ _080151C8:
bx r1
.align 2, 0
_080151D0: .4byte gBank1
thumb_func_end sub_8015150
thumb_func_end GetBattleBank
thumb_func_start sub_80151D4
sub_80151D4: @ 80151D4
thumb_func_start PressurePPLose
PressurePPLose: @ 80151D4
push {r4-r7,lr}
sub sp, 0x4
lsls r0, 24
@ -5695,7 +5695,7 @@ _08015286:
_08015290: .4byte gDisableStructs
_08015294: .4byte gBitTable
_08015298: .4byte gActiveBank
thumb_func_end sub_80151D4
thumb_func_end PressurePPLose
thumb_func_start sub_801529C
sub_801529C: @ 801529C

View File

@ -1819,7 +1819,7 @@ _080166D8:
ldrb r1, [r6]
movs r0, 0x1
movs r2, 0
bl sub_801A02C
bl ItemBattleEffects
lsls r0, 24
cmp r0, 0
beq _080166F2
@ -1840,7 +1840,7 @@ _08016704:
ldrb r1, [r6]
movs r0, 0x1
movs r2, 0x1
bl sub_801A02C
bl ItemBattleEffects
lsls r0, 24
cmp r0, 0
beq _0801671E
@ -2576,7 +2576,7 @@ _08016CE0:
strb r0, [r1, 0x3]
movs r0, 0x1
movs r1, 0
bl sub_801E3EC
bl SetMoveEffect
ldrb r0, [r6]
muls r0, r7
adds r0, r5
@ -3731,7 +3731,7 @@ _08017668:
movs r0, 0x1
movs r1, 0
movs r2, 0x1
bl sub_801A02C
bl ItemBattleEffects
lsls r0, 24
lsrs r0, 24
cmp r0, 0
@ -3823,8 +3823,8 @@ _08017710: .4byte gUnknown_02024AD0
_08017714: .4byte 0xff7fffff
thumb_func_end b_clear_atk_up_if_hit_flag_unless_enraged
thumb_func_start sub_8017718
sub_8017718: @ 8017718
thumb_func_start CantUseMove
CantUseMove: @ 8017718
push {r4-r7,lr}
mov r7, r10
mov r6, r9
@ -4866,7 +4866,7 @@ _08018008: .4byte 0x02000000
_0801800C: .4byte 0x000160e7
_08018010: .4byte gActiveBank
_08018014: .4byte gUnknown_02024ACC
thumb_func_end sub_8017718
thumb_func_end CantUseMove
thumb_func_start sub_8018018
sub_8018018: @ 8018018
@ -8668,8 +8668,8 @@ _0801A024: .4byte gBattleMainFunc
_0801A028: .4byte sub_8013FBC
thumb_func_end b_push_move_exec
thumb_func_start sub_801A02C
sub_801A02C: @ 801A02C
thumb_func_start ItemBattleEffects
ItemBattleEffects: @ 801A02C
push {r4-r7,lr}
mov r7, r10
mov r6, r9
@ -10938,7 +10938,7 @@ _0801B2BC:
bl b_movescr_stack_push_cursor
movs r0, 0
movs r1, 0
bl sub_801E3EC
bl SetMoveEffect
bl b_movescr_stack_pop_cursor
b _0801B3CA
.align 2, 0
@ -11049,7 +11049,7 @@ _0801B3FC: .4byte 0x02000000
_0801B400: .4byte 0x00016003
_0801B404: .4byte gBattlescriptCurrInstr
_0801B408: .4byte gUnknown_081D9AA7
thumb_func_end sub_801A02C
thumb_func_end ItemBattleEffects
thumb_func_start unref_sub_801B40C
unref_sub_801B40C: @ 801B40C
@ -11636,8 +11636,8 @@ _0801B920: .4byte 0x02000000
_0801B924: .4byte 0x00016010
thumb_func_end sub_801B5C0
thumb_func_start sub_801B928
sub_801B928: @ 801B928
thumb_func_start IsPokeDisobedient
IsPokeDisobedient: @ 801B928
push {r4-r7,lr}
mov r7, r9
mov r6, r8
@ -11828,7 +11828,7 @@ _0801BA9E:
ands r5, r4
cmp r5, 0
bne _0801BA9E
ldr r4, _0801BB18 @ =gUnknown_02024BEA
ldr r4, _0801BB18 @ =gRandomMove
ldr r3, _0801BB04 @ =gBattleMons
ldr r0, _0801BB10 @ =gCurrMovePos
ldrb r0, [r0]
@ -11870,7 +11870,7 @@ _0801BB08: .4byte gBankAttacker
_0801BB0C: .4byte gBitTable
_0801BB10: .4byte gCurrMovePos
_0801BB14: .4byte gUnknown_02024BE5
_0801BB18: .4byte gUnknown_02024BEA
_0801BB18: .4byte gRandomMove
_0801BB1C: .4byte gBattleCommunication
_0801BB20: .4byte gDynamicBasePower
_0801BB24: .4byte 0x02000000
@ -12012,6 +12012,6 @@ _0801BC40: .4byte gBankTarget
_0801BC44: .4byte gBattlescriptCurrInstr
_0801BC48: .4byte gUnknown_081D99A0
_0801BC4C: .4byte gHitMarker
thumb_func_end sub_801B928
thumb_func_end IsPokeDisobedient
.align 2, 0 @ Don't pad with nop.

File diff suppressed because it is too large Load Diff

View File

@ -136,7 +136,7 @@ _080360D8:
ldrh r1, [r4]
mov r3, r8
ldrb r2, [r3]
bl ai_rate_move
bl AI_TypeCalc
lsls r0, 24
lsrs r1, r0, 24
movs r0, 0x2
@ -211,7 +211,7 @@ _0803617C:
beq _080361BC
ldrh r1, [r5]
ldrb r2, [r7]
bl ai_rate_move
bl AI_TypeCalc
lsls r0, 24
lsrs r1, r0, 24
movs r0, 0x2
@ -693,7 +693,7 @@ _08036550:
ldrh r1, [r5]
mov r3, r9
ldrb r2, [r3]
bl ai_rate_move
bl AI_TypeCalc
lsls r0, 24
lsrs r1, r0, 24
movs r0, 0x2
@ -770,7 +770,7 @@ _080365F2:
ldrh r1, [r5]
mov r3, r9
ldrb r2, [r3]
bl ai_rate_move
bl AI_TypeCalc
lsls r0, 24
lsrs r1, r0, 24
movs r0, 0x2
@ -1061,7 +1061,7 @@ _08036850:
adds r0, r1
ldrh r0, [r0]
adds r1, r4, 0
bl ai_rate_move
bl AI_TypeCalc
ldr r1, [sp]
ands r1, r0
cmp r1, 0
@ -1096,7 +1096,7 @@ _0803688E:
beq _080368CA
ldrh r1, [r5]
ldrb r2, [r7]
bl ai_rate_move
bl AI_TypeCalc
lsls r0, 24
lsrs r1, r0, 24
movs r0, 0x2

View File

@ -4,7 +4,7 @@
.section script_data, "aw", %progbits
gUnknown_081D6BBC:: @ 81D6BBC
gBattleScriptsEffectsTable:: @ 81D6BBC
.4byte MoveEffect_Hit
.4byte MoveEffect_Sleep
.4byte MoveEffect_PoisonHit
@ -305,11 +305,11 @@ MoveEffect_Sleep: @ 81D6F81
attackcanceler
attackstring
ppreduce
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
jumpifstatus TARGET, SLP, BattleScript_1D6FC4
jumpifcannotsleep BattleScript_1D6FE0
jumpifstatus TARGET, SLP | PSN | BRN | FRZ | PAR | TOX, BattleScript_1D83D6
accuracycheck BattleScript_1D83D6, 0
jumpifstatus TARGET, SLP | PSN | BRN | FRZ | PAR | TOX, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, 0
jumpifhalverset TARGET, 32, BattleScript_1D9037
attackanimation
waitanimation
@ -638,9 +638,9 @@ MoveEffect_Roar: @ 81D72C5
ppreduce
jumpifability TARGET, ABILITY_SUCTION_CUPS, BattleScript_1D988D
jumpifspecialstatusflag TARGET, 0x400, 0, BattleScript_1D93EC
accuracycheck BattleScript_1D83D6, 65535
accuracycheck BattleScript_ButItFailed, 65535
accuracycheck BattleScript_1D6F77, 0
forcerandomswitch BattleScript_1D83D6
forcerandomswitch BattleScript_ButItFailed
MoveEffect_MultiHit: @ 81D72ED
attackcanceler
@ -707,7 +707,7 @@ MoveEffect_Conversion: @ 81D73B1
attackcanceler
attackstring
ppreduce
changetypestoenemyattacktype BattleScript_1D83D6
changetypestoenemyattacktype BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_TypeTransform
@ -737,13 +737,13 @@ MoveEffect_Toxic: @ 81D73F4
attackstring
ppreduce
jumpifability TARGET, ABILITY_IMMUNITY, BattleScript_1D7463
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
jumpifstatus TARGET, PSN, BattleScript_1D7455
jumpifstatus TARGET, TOX, BattleScript_1D7455
jumpifstatus TARGET, SLP | PSN | BRN | FRZ | PAR | TOX, BattleScript_1D83D6
jumpifstatus TARGET, SLP | PSN | BRN | FRZ | PAR | TOX, BattleScript_ButItFailed
jumpiftype TARGET, TYPE_POISON, BattleScript_1D83E8
jumpiftype TARGET, TYPE_STEEL, BattleScript_1D83E8
accuracycheck BattleScript_1D83D6, 0
accuracycheck BattleScript_ButItFailed, 0
jumpifhalverset TARGET, 32, BattleScript_1D9037
attackanimation
waitanimation
@ -810,7 +810,7 @@ MoveEffect_Ohko: @ 81D74E4
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_1D83D6, 65535
accuracycheck BattleScript_ButItFailed, 65535
atk6
jumpifbyte 4, 0x2024c68, 41, BattleScript_1D6F48
koplussomethings BattleScript_1D7505
@ -939,7 +939,7 @@ MoveEffect_FocusEnergy: @ 81D7689
attackcanceler
attackstring
ppreduce
jumpifsecondarytstatus USER, S_FOCUS_ENERGY, BattleScript_1D83D6
jumpifsecondarytstatus USER, S_FOCUS_ENERGY, BattleScript_ButItFailed
setincreasedcriticalchance
attackanimation
waitanimation
@ -958,9 +958,9 @@ MoveEffect_Confuse: @ 81D76BF
attackstring
ppreduce
jumpifability TARGET, ABILITY_OWN_TEMPO, BattleScript_1D98E5
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
jumpifsecondarytstatus TARGET, S_CONFUSED, BattleScript_1D76FE
accuracycheck BattleScript_1D83D6, 0
accuracycheck BattleScript_ButItFailed, 0
jumpifhalverset TARGET, 32, BattleScript_1D9037
attackanimation
waitanimation
@ -1041,13 +1041,13 @@ MoveEffect_Poison: @ 81D7795
attackstring
ppreduce
jumpifability TARGET, ABILITY_IMMUNITY, BattleScript_1D7463
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
jumpifstatus TARGET, PSN, BattleScript_1D7455
jumpifstatus TARGET, TOX, BattleScript_1D7455
jumpiftype TARGET, TYPE_POISON, BattleScript_1D83E8
jumpiftype TARGET, TYPE_STEEL, BattleScript_1D83E8
jumpifstatus TARGET, SLP | PSN | BRN | FRZ | PAR | TOX, BattleScript_1D83D6
accuracycheck BattleScript_1D83D6, 0
jumpifstatus TARGET, SLP | PSN | BRN | FRZ | PAR | TOX, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, 0
jumpifhalverset TARGET, 32, BattleScript_1D9037
attackanimation
waitanimation
@ -1062,12 +1062,12 @@ MoveEffect_Paralyze: @ 81D77F6
attackstring
ppreduce
jumpifability TARGET, ABILITY_LIMBER, BattleScript_1D7859
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
atk6
jumpifbyte 4, 0x2024c68, 41, BattleScript_1D83D6
jumpifbyte 4, 0x2024c68, 41, BattleScript_ButItFailed
jumpifstatus TARGET, PAR, BattleScript_1D784B
jumpifstatus TARGET, SLP | PSN | BRN | FRZ | PAR | TOX, BattleScript_1D83D6
accuracycheck BattleScript_1D83D6, 0
jumpifstatus TARGET, SLP | PSN | BRN | FRZ | PAR | TOX, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, 0
jumpifhalverset TARGET, 32, BattleScript_1D9037
attackanimation
waitanimation
@ -1190,9 +1190,9 @@ MoveEffect_Mimic: @ 81D7988
attackcanceler
attackstring
ppreduce
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
accuracycheck BattleScript_1D83D6, 65535
copyattack BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, 65535
copyattack BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_LearnedMove2
@ -1214,7 +1214,7 @@ MoveEffect_LeechSeed: @ 81D79C2
attackstring
pause 32
ppreduce
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
accuracycheck BattleScript_1D79D9, 0
BattleScript_1D79D9: @ 81D79D9
@ -1240,8 +1240,8 @@ MoveEffect_Disable: @ 81D79FB
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_1D83D6, 0
disablelastusedattack BattleScript_1D83D6
accuracycheck BattleScript_ButItFailed, 0
disablelastusedattack BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_MoveWasDisabled
@ -1285,7 +1285,7 @@ MoveEffect_Encore: @ 81D7A5D
accuracycheck BattleScript_1D6F72, 0
attackstring
ppreduce
setencore BattleScript_1D83D6
setencore BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_EncoreGot
@ -1296,8 +1296,8 @@ MoveEffect_PainSplit: @ 81D7A79
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_1D83D6, 65535
painsplitdamagecalculator BattleScript_1D83D6
accuracycheck BattleScript_ButItFailed, 65535
painsplitdamagecalculator BattleScript_ButItFailed
attackanimation
waitanimation
orword 0x2024c6c, 0x100
@ -1315,7 +1315,7 @@ MoveEffect_Snore: @ 81D7AB0
jumpifstatus USER, SLP, BattleScript_1D7AC2
attackstring
ppreduce
jump BattleScript_1D83D6
jump BattleScript_ButItFailed
BattleScript_1D7AC2: @ 81D7AC2
jumpifhalfword 0, 0x2024be8, 214, BattleScript_1D7AD6
@ -1334,7 +1334,7 @@ MoveEffect_Conversion2: @ 81D7AEA
attackcanceler
attackstring
ppreduce
settypetorandomresistance BattleScript_1D83D6
settypetorandomresistance BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_TypeTransform
@ -1345,8 +1345,8 @@ MoveEffect_LockOn: @ 81D7AFF
attackcanceler
attackstring
ppreduce
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
accuracycheck BattleScript_1D83D6, 0
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, 0
setalwayshitflag
attackanimation
waitanimation
@ -1358,8 +1358,8 @@ MoveEffect_Sketch: @ 81D7B21
attackcanceler
attackstring
ppreduce
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
copymovepermanently BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
copymovepermanently BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_SketchedMove
@ -1371,7 +1371,7 @@ MoveEffect_SleepTalk: @ 81D7B40
jumpifstatus USER, SLP, BattleScript_1D7B52
attackstring
ppreduce
jump BattleScript_1D83D6
jump BattleScript_ButItFailed
BattleScript_1D7B52: @ 81D7B52
printstring BATTLE_TEXT_FastAsleep
@ -1382,7 +1382,7 @@ BattleScript_1D7B52: @ 81D7B52
orword 0x2024c6c, 0x800
selectrandommovefromusermoves BattleScript_1D7B72
pause 64
jump BattleScript_1D83D6
jump BattleScript_ButItFailed
BattleScript_1D7B72: @ 81D7B72
attackanimation
@ -1410,8 +1410,8 @@ MoveEffect_Spite: @ 81D7B99
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_1D83D6, 0
reducepprandom BattleScript_1D83D6
accuracycheck BattleScript_ButItFailed, 0
reducepprandom BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_ReducedBy
@ -1512,8 +1512,8 @@ MoveEffect_MeanLook: @ 81D7CCC
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_1D83D6, 65534
jumpifsecondarytstatus TARGET, S_MEAN_LOOK, BattleScript_1D83D6
accuracycheck BattleScript_ButItFailed, 65534
jumpifsecondarytstatus TARGET, S_MEAN_LOOK, BattleScript_ButItFailed
attackanimation
waitanimation
setbyte 0x2024d21, 32
@ -1526,10 +1526,10 @@ MoveEffect_Nightmare: @ 81D7CF4
attackcanceler
attackstring
ppreduce
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_NIGHTMARE, BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
jumpifsecondarytstatus TARGET, S_NIGHTMARE, BattleScript_ButItFailed
jumpifstatus TARGET, SLP, BattleScript_1D7D1A
jump BattleScript_1D83D6
jump BattleScript_ButItFailed
BattleScript_1D7D1A: @ 81D7D1A
attackanimation
@ -1553,7 +1553,7 @@ MoveEffect_Curse: @ 81D7D3B
ppreduce
jumpifstat USER, 2, 3, 0, BattleScript_1D7D60
jumpifstat USER, 1, 1, 12, BattleScript_1D7D60
jumpifstat USER, 0, 2, 12, BattleScript_1D83D6
jumpifstat USER, 0, 2, 12, BattleScript_ButItFailed
BattleScript_1D7D60: @ 81D7D60
copyarray 0x2024c08, 0x2024c07, 1
@ -1588,8 +1588,8 @@ BattleScript_1D7DC4: @ 81D7DC4
attackcanceler
attackstring
ppreduce
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
cursetarget BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
cursetarget BattleScript_ButItFailed
orword 0x2024c6c, 0x100
setbyte 0x2016002, 0
attackanimation
@ -1640,7 +1640,7 @@ MoveEffect_PerishSong: @ 81D7E3D
attackcanceler
attackstring
ppreduce
setperishsong BattleScript_1D83D6
setperishsong BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_PerishSong
@ -1687,7 +1687,7 @@ MoveEffect_Swagger: @ 81D7EA2
accuracycheck BattleScript_1D6F72, 0
attackstring
ppreduce
jumpifconfusedandattackmaxed 1, BattleScript_1D83D6
jumpifconfusedandattackmaxed 1, BattleScript_ButItFailed
attackanimation
waitanimation
setbyte 0x201601e, 33
@ -1724,8 +1724,8 @@ MoveEffect_Attract: @ 81D7F1F
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_1D83D6, 0
tryinfatuatetarget BattleScript_1D83D6
accuracycheck BattleScript_ButItFailed, 0
tryinfatuatetarget BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_FellLove
@ -1773,10 +1773,10 @@ MoveEffect_BatonPass: @ 81D7F7C
attackcanceler
attackstring
ppreduce
jumpifcannotswitch 129, BattleScript_1D83D6
jumpifcannotswitch 129, BattleScript_ButItFailed
attackanimation
waitanimation
openpartyscreen USER, BattleScript_1D83D6
openpartyscreen USER, BattleScript_ButItFailed
atke2 USER
waitstateatk
atk51 USER, 2
@ -1858,7 +1858,7 @@ MoveEffect_BellyDrum: @ 81D8038
attackcanceler
attackstring
ppreduce
maxattackhalvehp BattleScript_1D83D6
maxattackhalvehp BattleScript_ButItFailed
orword 0x2024c6c, 0x100
attackanimation
waitanimation
@ -1872,7 +1872,7 @@ MoveEffect_PsychUp: @ 81D805A
attackcanceler
attackstring
ppreduce
copyfoestats BattleScript_1D83D6
copyfoestats BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_CopyStatChanges
@ -1971,7 +1971,7 @@ MoveEffect_FutureSight: @ 81D817D
attackcanceler
attackstring
ppreduce
setfutureattack BattleScript_1D83D6
setfutureattack BattleScript_ButItFailed
attackanimation
waitanimation
printfromtable BattleTextList_4015E2
@ -2017,9 +2017,9 @@ MoveEffect_Teleport: @ 81D8233
attackcanceler
attackstring
ppreduce
jumpifhalfword 4, 0x20239f8, 8, BattleScript_1D83D6
jumpifhalfword 4, 0x20239f8, 8, BattleScript_ButItFailed
atk76 USER, 2
jumpifbyte 0, 0x2024d1e, 1, BattleScript_1D83D6
jumpifbyte 0, 0x2024d1e, 1, BattleScript_ButItFailed
jumpifbyte 0, 0x2024d1e, 2, BattleScript_1D8839
attackanimation
waitanimation
@ -2038,7 +2038,7 @@ MoveEffect_BeatUp: @ 81D826E
BattleScript_1D8281: @ 81D8281
atk25
beatupcalculation BattleScript_1D82C4, BattleScript_1D83D6
beatupcalculation BattleScript_1D82C4, BattleScript_ButItFailed
printstring BATTLE_TEXT_PokeAttack
critcalc
jumpifbyte 1, 0x2024c0d, 2, BattleScript_1D829C
@ -2156,7 +2156,7 @@ BattleScript_1D83D4: @ 81D83D4
BattleScript_1D83D5: @ 81D83D5
ppreduce
BattleScript_1D83D6:: @ 81D83D6
BattleScript_ButItFailed:: @ 81D83D6
pause 32
orbyte 0x2024c68, 32
resultmessage
@ -2243,8 +2243,8 @@ MoveEffect_Torment: @ 81D8495
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_1D83D6, 0
settorment BattleScript_1D83D6
accuracycheck BattleScript_ButItFailed, 0
settorment BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_TormentSubject
@ -2257,7 +2257,7 @@ MoveEffect_Flatter: @ 81D84B1
accuracycheck BattleScript_1D6F72, 0
attackstring
ppreduce
jumpifconfusedandattackmaxed 4, BattleScript_1D83D6
jumpifconfusedandattackmaxed 4, BattleScript_ButItFailed
attackanimation
waitanimation
setbyte 0x201601e, 20
@ -2279,12 +2279,12 @@ MoveEffect_WillOWisp: @ 81D850F
attackcanceler
attackstring
ppreduce
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
jumpifstatus TARGET, BRN, BattleScript_1D8575
jumpiftype TARGET, TYPE_FIRE, BattleScript_1D83E8
jumpifability TARGET, ABILITY_WATER_VEIL, BattleScript_1D855B
jumpifstatus TARGET, SLP | PSN | BRN | FRZ | PAR | TOX, BattleScript_1D83D6
accuracycheck BattleScript_1D83D6, 0
jumpifstatus TARGET, SLP | PSN | BRN | FRZ | PAR | TOX, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, 0
jumpifhalverset TARGET, 32, BattleScript_1D9037
attackanimation
waitanimation
@ -2309,7 +2309,7 @@ MoveEffect_Memento: @ 81D8583
jumpifbyte 0, 0x2024d24, 1, BattleScript_1D860A
attackstring
ppreduce
jumpifattackandspecialattackcannotfall BattleScript_1D83D6
jumpifattackandspecialattackcannotfall BattleScript_ButItFailed
setuserhptozero
attackanimation
waitanimation
@ -2415,8 +2415,8 @@ MoveEffect_Taunt: @ 81D86AB
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_1D83D6, 0
settaunt BattleScript_1D83D6
accuracycheck BattleScript_ButItFailed, 0
settaunt BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_TauntFell
@ -2427,7 +2427,7 @@ MoveEffect_HelpingHand: @ 81D86C7
attackcanceler
attackstring
ppreduce
sethelpinghand BattleScript_1D83D6
sethelpinghand BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_ReadyToHelp
@ -2438,9 +2438,9 @@ MoveEffect_Trick: @ 81D86DC
attackcanceler
attackstring
ppreduce
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
accuracycheck BattleScript_1D83D6, 0
itemswap BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, 0
itemswap BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_SwitchedItems
@ -2453,8 +2453,8 @@ MoveEffect_RolePlay: @ 81D870A
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_1D83D6, 65535
copyability BattleScript_1D83D6
accuracycheck BattleScript_ButItFailed, 65535
copyability BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_CopiedObject
@ -2465,7 +2465,7 @@ MoveEffect_Wish: @ 81D8726
attackcanceler
attackstring
ppreduce
atkd4 0, BattleScript_1D83D6
atkd4 0, BattleScript_ButItFailed
attackanimation
waitanimation
jump BattleScript_EndTurn
@ -2484,7 +2484,7 @@ MoveEffect_Ingrain: @ 81D874D
attackcanceler
attackstring
ppreduce
setroots BattleScript_1D83D6
setroots BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_PlantedRoots
@ -2510,7 +2510,7 @@ MoveEffect_Recycle: @ 81D8782
attackcanceler
attackstring
ppreduce
recycleitem BattleScript_1D83D6
recycleitem BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_FoundOne
@ -2562,11 +2562,11 @@ MoveEffect_Yawn: @ 81D87EE
ppreduce
jumpifability TARGET, ABILITY_VITAL_SPIRIT, BattleScript_1D882F
jumpifability TARGET, ABILITY_INSOMNIA, BattleScript_1D882F
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_1D83D6
jumpifsecondarytstatus TARGET, S_SUBSTITUTE, BattleScript_ButItFailed
jumpifhalverset TARGET, 32, BattleScript_1D9037
accuracycheck BattleScript_1D83D6, 65535
jumpifcannotsleep BattleScript_1D83D6
setyawn BattleScript_1D83D6
accuracycheck BattleScript_ButItFailed, 65535
jumpifcannotsleep BattleScript_ButItFailed
setyawn BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_DrowsyMade
@ -2590,7 +2590,7 @@ MoveEffect_Endeavor: @ 81D8852
attackcanceler
attackstring
ppreduce
setdamagetohealthdifference BattleScript_1D83D6
setdamagetohealthdifference BattleScript_ButItFailed
copyarray 0x2024bf0, 0x2024bec, 4
accuracycheck BattleScript_1D6F77, 0
atk6
@ -2608,8 +2608,8 @@ MoveEffect_SkillSwap: @ 81D8893
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_1D83D6, 65535
abilityswap BattleScript_1D83D6
accuracycheck BattleScript_ButItFailed, 65535
abilityswap BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_AbilitySwap
@ -2620,7 +2620,7 @@ MoveEffect_Imprison: @ 81D88AF
attackcanceler
attackstring
ppreduce
imprisoneffect BattleScript_1D83D6
imprisoneffect BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_SealedMove
@ -2631,7 +2631,7 @@ MoveEffect_Refresh: @ 81D88C4
attackcanceler
attackstring
ppreduce
cureifburnedparalysedorpoisoned BattleScript_1D83D6
cureifburnedparalysedorpoisoned BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_StatusNormal
@ -2643,7 +2643,7 @@ MoveEffect_Grudge: @ 81D88DB
attackcanceler
attackstring
ppreduce
setgrudge BattleScript_1D83D6
setgrudge BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_GrudgeBear
@ -2740,7 +2740,7 @@ MoveEffect_WaterSport: @ 81D89D7
attackcanceler
attackstring
ppreduce
settypebasedhalvers BattleScript_1D83D6
settypebasedhalvers BattleScript_ButItFailed
attackanimation
waitanimation
printfromtable BattleTextList_4015D4
@ -2767,7 +2767,7 @@ MoveEffect_Tickle: @ 81D8A0A
jumpifstat TARGET, 0, 2, 0, BattleScript_1D8A7D
BattleScript_1D8A1F: @ 81D8A1F
accuracycheck BattleScript_1D83D6, 0
accuracycheck BattleScript_ButItFailed, 0
attackanimation
waitanimation
setbyte 0x20160dc, 0
@ -2924,7 +2924,7 @@ MoveEffect_Camouflage: @ 81D8C43
attackcanceler
attackstring
ppreduce
settypetoterrain BattleScript_1D83D6
settypetoterrain BattleScript_ButItFailed
attackanimation
waitanimation
printstring BATTLE_TEXT_TypeTransform
@ -3364,7 +3364,7 @@ gUnknown_081D90B2:: @ 81D90B2
gUnknown_081D90F1:: @ 81D90F1
printstring BATTLE_TEXT_UnleashedEnergy
waitmessage 64
jump BattleScript_1D83D6
jump BattleScript_ButItFailed
gUnknown_081D90FC:: @ 81D90FC
attackanimation
@ -3385,7 +3385,7 @@ BattleScript_1D9116: @ 81D9116
atk52 TARGET
jump BattleScript_EndTurn
gUnknown_081D9128:: @ 81D9128
BattleScript_MistProtected:: @ 81D9128
pause 32
printstring BATTLE_TEXT_MistProtect
waitmessage 64
@ -3531,17 +3531,17 @@ BattleScript_RapidSpinAway:: @ 81D92C0
breakfree
return
gUnknown_081D92C2:: @ 81D92C2
BattleScript_WrapFree:: @ 81D92C2
printstring BATTLE_TEXT_GotFreeFrom
waitmessage 64
return
gUnknown_081D92C9:: @ 81D92C9
BattleScript_LeechSeedFree:: @ 81D92C9
printstring BATTLE_TEXT_LeechShed
waitmessage 64
return
gUnknown_081D92D0:: @ 81D92D0
BattleScript_SpikesFree:: @ 81D92D0
printstring BATTLE_TEXT_SpikesBlownAway
waitmessage 64
return
@ -4164,7 +4164,7 @@ BattleScript_1D988D: @ 81D988D
waitmessage 64
jump BattleScript_EndTurn
gUnknown_081D989B:: @ 81D989B
BattleScript_AbilityNoStatLoss:: @ 81D989B
pause 32
printstring BATTLE_TEXT_PreventedStatLoss
waitmessage 64
@ -4188,7 +4188,7 @@ BattleScript_PSNPrevention:: @ 81D98BD
waitmessage 64
return
gUnknown_081D98C9:: @ 81D98C9
BattleScript_ObliviousPreventsAttraction:: @ 81D98C9
pause 32
printstring BATTLE_TEXT_PreventedRomance
waitmessage 64
@ -4214,7 +4214,7 @@ gUnknown_081D98F3:: @ 81D98F3
waitmessage 64
jump BattleScript_EndTurn
gUnknown_081D9903:: @ 81D9903
BattleScript_AbilityNoSpecificStatLoss:: @ 81D9903
pause 32
printstring BATTLE_TEXT_PreventedLoss
waitmessage 64

View File

@ -51,7 +51,7 @@ BattleScript_1D9EBC: @ 81D9EBC
atk98 1
pokemoncatchfunction
gUnknown_081D9EC2:: @ 81D9EC2
BattleScript_SuccessBallThrow:: @ 81D9EC2
jumpifhalfword 0, gLastUsedItem, 5, BattleScript_1D9ED0
atk60 11
@ -76,12 +76,12 @@ BattleScript_1D9EF8: @ 81D9EF8
setbyte gBattleOutcome, 7
activesidesomething
gUnknown_081D9F00:: @ 81D9F00
BattleScript_WallyBallThrow:: @ 81D9F00
printstring BATTLE_TEXT_BallCaught2
setbyte gBattleOutcome, 7
activesidesomething
gUnknown_081D9F0A:: @ 81D9F0A
BattleScript_ShakeBallThrow:: @ 81D9F0A
printfromtable BattleTextList_4015E6
waitmessage 64
jumpifbyte 5, gBattleTypeFlags, 128, BattleScript_1D9F34
@ -93,7 +93,7 @@ gUnknown_081D9F0A:: @ 81D9F0A
BattleScript_1D9F34: @ 81D9F34
atkf6
gUnknown_081D9F35:: @ 81D9F35
BattleScript_TrainerBallBlock:: @ 81D9F35
waitmessage 64
printstring BATTLE_TEXT_BlockBall
waitmessage 64

View File

@ -1027,778 +1027,3 @@ gUnknown_081FA724:: @ 81FA724
.2byte 0x140
.2byte 0x130
.2byte 0xFFFF
.align 2
gBattleScriptingCommandsTable:: @ 81FA73C
.4byte atk00_attackcanceler
.4byte atk01_accuracycheck
.4byte atk02_attackstring
.4byte atk03_ppreduce
.4byte atk04_critcalc
.4byte atk05_damagecalc1
.4byte atk06_typecalc
.4byte atk07_dmg_adjustment
.4byte atk08_dmg_adjustment2
.4byte atk09_attackanimation
.4byte atk0A_waitanimation
.4byte atk0B_healthbarupdate
.4byte atk0C_datahpupdate
.4byte atk0D_critmessage
.4byte atk0E_effectiveness_sound
.4byte atk0F_resultmessage
.4byte atk10_printstring
.4byte atk11_printstring_playeronly
.4byte atk12_waitmessage
.4byte atk13_printfromtable
.4byte atk14_printfromtable_playeronly
.4byte atk15_seteffectwithchancetarget
.4byte atk16_seteffectprimary
.4byte atk17_seteffectsecondary
.4byte atk18_status_effect_clear
.4byte atk19_faint_pokemon
.4byte atk1A_faint_animation
.4byte atk1B_faint_effects_clear
.4byte atk1C_jumpifstatus
.4byte atk1D_jumpifstatus2
.4byte atk1E_jumpifability
.4byte atk1F_jumpifsideaffecting
.4byte atk20_jumpifstat
.4byte atk21_jumpifstatus3
.4byte atk22_jumpiftype
.4byte atk23_getexp
.4byte atk24
.4byte atk25_move_values_cleanup
.4byte atk26_set_multihit
.4byte atk27_decrement_multihit
.4byte atk28_goto
.4byte atk29_jumpifbyte
.4byte atk2A_jumpifhalfword
.4byte atk2B_jumpifword
.4byte atk2C_jumpifarrayequal
.4byte atk2D_jumpifarraynotequal
.4byte atk2E_setbyte
.4byte atk2F_addbyte
.4byte atk30_subbyte
.4byte atk31_copyarray
.4byte atk32_copyarray_withindex
.4byte atk33_orbyte
.4byte atk34_orhalfword
.4byte atk35_orword
.4byte atk36_bicbyte
.4byte atk37_bichalfword
.4byte atk38_bicword
.4byte atk39_pause
.4byte atk3A_waitstate
.4byte atk3B_healthbar_update
.4byte atk3C_return
.4byte atk3D_end
.4byte atk3E_end2
.4byte atk3F_end3
.4byte atk40_jump_if_move_affected_by_protect
.4byte atk41_call
.4byte atk42_jumpiftype2
.4byte atk43_jumpifabilitypresent
.4byte atk44
.4byte atk45_playanimation
.4byte atk46_playanimation2
.4byte atk47_setgraphicalstatchangevalues_setgraphicalstatchangevalues_setgraphicalstatchangevalues
.4byte atk48_playstatchangeanimation
.4byte sub_80217F8
.4byte atk4A_damageflags
.4byte atk4B_cmd4b
.4byte atk4C_switch1
.4byte sub_80225F0
.4byte sub_8022784
.4byte sub_8022830
.4byte atk50_openpartyscreen
.4byte sub_802331C
.4byte sub_8023524
.4byte sub_80237CC
.4byte atk54_802511C
.4byte sub_8023848
.4byte atk56_8025194
.4byte atk57_80251C4_flee
.4byte atk58_cmd58
.4byte atk59_8025230
.4byte sub_8023AF8
.4byte atk5B_80256E0
.4byte atk5C_cmd5c
.4byte sub_8024014
.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_80246A0
.4byte atk69_8025FE0
.4byte atk6A_stash_item_for_side
.4byte sub_80248C0
.4byte sub_80248FC
.4byte sub_8024C4C
.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_8024F40
.4byte atk77_setprotect
.4byte atk78_faintifabilitynotdamp
.4byte atk79_setuserhptozero
.4byte sub_80253E8
.4byte sub_802548C
.4byte sub_8025508
.4byte sub_80256D0
.4byte atk7E_setreflect
.4byte sub_80257DC
.4byte atk80_manipulatedamage
.4byte atk81_setrest
.4byte atk82_jumpifnotfirstturn
.4byte sub_8025A34
.4byte sub_8025AE0
.4byte sub_8025B5C
.4byte atk86_stockpiletobasedamage
.4byte sub_8025D00
.4byte atk88_negativedamage
.4byte atk89_statbuffchange
.4byte atk8A_normalisebuffs
.4byte atk8B_setbide
.4byte atk8C_confuseifrepeatingattackends
.4byte atk8D_setloopcounter
.4byte sub_8026468
.4byte sub_8026590
.4byte sub_802688C
.4byte atk91_givemoney
.4byte atk92_setlightscreen
.4byte sub_8026B78
.4byte atk94_gethalfcurrentenemyhp
.4byte sub_8026E94
.4byte sub_8026EEC
.4byte sub_8027064
.4byte sub_8027238
.4byte sub_8027348
.4byte atk9A_setincreasedcriticalchance
.4byte atk9B_transformdataexecution
.4byte sub_80275D8
.4byte atk9D_copyattack
.4byte sub_80278B8
.4byte sub_8027960
.4byte atkA0_psywavedamageeffect
.4byte atkA1_counterdamagecalculator
.4byte atkA2_mirrorcoatdamagecalculator
.4byte atkA3_disablelastusedattack
.4byte atkA4_setencore
.4byte sub_8027E4C
.4byte sub_8027F44
.4byte atkA7_setalwayshitflag
.4byte atkA8_copymovepermanently
.4byte sub_8028420
.4byte sub_8028558
.4byte atkAB_802A458
.4byte atkAC_remaininghptopower
.4byte sub_8028668
.4byte sub_8028858
.4byte sub_8028AD4
.4byte sub_8028B70
.4byte sub_8028BFC
.4byte atkB2_setperishsong
.4byte atkB3_rolloutdamagecalculation
.4byte atkB4_jumpifconfusedandattackmaxed
.4byte sub_8028EC8
.4byte atkB6_happinesstodamagecalculation
.4byte atkB7_presentdamagecalculation
.4byte sub_80290BC
.4byte atkB9_magnitudedamagecalculation
.4byte sub_8029270
.4byte sub_80293E8
.4byte atkBC_maxattackhalvehp
.4byte atkBD_copyfoestats
.4byte atkBE_breakfree
.4byte sub_802964C
.4byte atkC0_recoverbasedonsunlight
.4byte sub_8029784
.4byte atkC2_selectnexttarget
.4byte atkC3_setfutureattack
.4byte atkC4_802B910
.4byte atkC5_hidepreattack
.4byte atkC6_unhidepostattack
.4byte atkC7_setminimize
.4byte sub_8029DAC
.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 sub_802A170
.4byte sub_802A218
.4byte sub_802A4B0
.4byte atkD4_802C408
.4byte sub_802A5FC
.4byte atkD6_doubledamagedealtifdamaged
.4byte sub_802A6BC
.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 sub_802ADD8
.4byte atkE3_jumpiffainted
.4byte sub_802AEB0
.4byte sub_802AF68
.4byte atkE6_castform_transform
.4byte atkE7_castform_switch
.4byte atkE8_settypebasedhalvers
.4byte sub_802B1C0
.4byte atkEA_recycleitem
.4byte atkEB_settypetoterrain
.4byte sub_802B3E0
.4byte sub_802B4B4
.4byte sub_802B51C
.4byte sub_802B5B8
.4byte sub_802B960
.4byte sub_802B9E0
.4byte sub_802BA90
.4byte atkF3_receive_new_pokemon_maybe
.4byte sub_802BEF0
.4byte sub_802BF20
.4byte sub_802BF48
.4byte sub_802BF54
.align 2
gAccuracyStageRatios:: @ 81FAB1C
.byte 33, 100, 0, 0 @ -6
.byte 36, 100, 0, 0 @ -5
.byte 43, 100, 0, 0 @ -4
.byte 50, 100, 0, 0 @ -3
.byte 60, 100, 0, 0 @ -2
.byte 75, 100, 0, 0 @ -1
.byte 1, 1, 0, 0 @ 0
.byte 133, 100, 0, 0 @ +1
.byte 166, 100, 0, 0 @ +2
.byte 2, 1, 0, 0 @ +3
.byte 233, 100, 0, 0 @ +4
.byte 133, 50, 0, 0 @ +5
.byte 3, 1, 0, 0 @ +6
@ The chance is 1/N for each stage.
.align 1
gCriticalHitChance:: @ 81FAB50
.2byte 16 @ +0
.2byte 8 @ +1
.2byte 4 @ +2
.2byte 3 @ +3
.2byte 2 @ +4
.align 2
gStatusFlagsForMoveEffects:: @ 81FAB5C
.4byte 0x00000000
.4byte 0x00000007
.4byte 0x00000008
.4byte 0x00000010
.4byte 0x00000020
.4byte 0x00000040
.4byte 0x00000080
.4byte 0x00000007
.4byte 0x00000008
.4byte 0x00000000
.4byte 0x00000070
.4byte 0x00000000
.4byte 0x00001000
.4byte 0x0000E000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00400000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x04000000
.4byte 0x08000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000C00
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.4byte 0x00000000
.align 2
gMoveEffectBS_Ptrs:: @ 81FAC4C
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D965A
.4byte BattleScript_1D9669
.4byte BattleScript_1D9678
.4byte BattleScript_1D9687
.4byte BattleScript_1D969D
.4byte BattleScript_1D96BA
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D9696
.4byte BattleScript_1D96AA
.4byte BattleScript_1D963E
.4byte BattleScript_1D96B1
.4byte BattleScript_1D96C8
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D963E
.4byte BattleScript_1D96C8
@ unreferenced bit masks
.byte 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F
gLevelUpStatBoxStats:: @ 81FACEF
.byte 0x3A @ HP
.byte 0x3E @ Sp. Attack
.byte 0x3B @ Attack
.byte 0x3F @ Sp. Defense
.byte 0x3C @ Defense
.byte 0x3D @ Speed
.align 1
gProtectSuccessRates:: @ 81FACF6
.2byte 0xFFFF, 0x7FFF, 0x3FFF, 0x1FFF
.align 1
gUnknown_081FACFE:: @ 81FACFE
.2byte MOVE_METRONOME
.2byte MOVE_STRUGGLE
.2byte MOVE_SKETCH
.2byte MOVE_MIMIC
.2byte 0xFFFE
.2byte MOVE_COUNTER
.2byte MOVE_MIRROR_COAT
.2byte MOVE_PROTECT
.2byte MOVE_DETECT
.2byte MOVE_ENDURE
.2byte MOVE_DESTINY_BOND
.2byte MOVE_SLEEP_TALK
.2byte MOVE_THIEF
.2byte MOVE_FOLLOW_ME
.2byte MOVE_SNATCH
.2byte MOVE_HELPING_HAND
.2byte MOVE_COVET
.2byte MOVE_TRICK
.2byte MOVE_FOCUS_PUNCH
.2byte 0xFFFF
gUnknown_081FAD26:: @ 81FAD26
.byte 1, 200
.byte 4, 150
.byte 9, 100
.byte 16, 80
.byte 32, 40
.byte 48, 20
.align 1
gNaturePowerMoves:: @ 81FAD32
.2byte MOVE_STUN_SPORE
.2byte MOVE_RAZOR_LEAF
.2byte MOVE_EARTHQUAKE
.2byte MOVE_HYDRO_PUMP
.2byte MOVE_SURF
.2byte MOVE_BUBBLE_BEAM
.2byte MOVE_ROCK_SLIDE
.2byte MOVE_SHADOW_BALL
.2byte MOVE_SWIFT
.2byte MOVE_SWIFT
@ weight-based damage table for Low Kick
@ format: min. weight (hectograms), base power
.align 1
gWeightDamage:: @ 81FAD46
.2byte 100, 20
.2byte 250, 40
.2byte 500, 60
.2byte 1000, 80
.2byte 2000, 100
.2byte -1, -1
.align 1
gPickupItems:: @ 81FAD5E
.2byte ITEM_SUPER_POTION, 30
.2byte ITEM_FULL_HEAL, 40
.2byte ITEM_ULTRA_BALL, 50
.2byte ITEM_RARE_CANDY, 60
.2byte ITEM_FULL_RESTORE, 70
.2byte ITEM_REVIVE, 80
.2byte ITEM_NUGGET, 90
.2byte ITEM_PROTEIN, 95
.2byte ITEM_PP_UP, 99
.2byte ITEM_KINGS_ROCK, 1
gTerrainToType:: @ 81FAD86
.byte TYPE_GRASS @ tall grass
.byte TYPE_GRASS @ long grass
.byte TYPE_GROUND @ sand
.byte TYPE_WATER @ underwater
.byte TYPE_WATER @ water
.byte TYPE_WATER @ pond water
.byte TYPE_ROCK @ rock
.byte TYPE_ROCK @ cave
.byte TYPE_NORMAL @ building
.byte TYPE_NORMAL @ plain
gBallCatchBonuses:: @ 81FAD90
.byte 20 @ Ultra Ball
.byte 15 @ Great Ball
.byte 10 @ Poké Ball
.byte 15 @ Safari Ball
.string "$" @ "turn"
.align 2
gPlayerBufferCommands:: @ 81FAD98
.4byte PlayerHandleGetAttributes
.4byte sub_802ECF0
.4byte PlayerHandleSetAttributes
.4byte sub_802F7CC
.4byte PlayerHandleLoadPokeSprite
.4byte PlayerHandleSendOutPoke
.4byte PlayerHandleReturnPokeToBall
.4byte PlayerHandleTrainerThrow
.4byte PlayerHandleTrainerSlide
.4byte PlayerHandleTrainerSlideBack
.4byte sub_802FE7C
.4byte sub_802FF60
.4byte sub_802FF80
.4byte PlayerHandleBallThrow
.4byte PlayerHandlePuase
.4byte PlayerHandleMoveAnimation
.4byte PlayerHandlePrintString
.4byte PlayerHandlePrintStringPlayerOnly
.4byte sub_803037C
.4byte nullsub_42
.4byte sub_8030468
.4byte PlayerHandleOpenBag
.4byte sub_8030594
.4byte sub_8030674
.4byte PlayerHandleHealthBarUpdate
.4byte PlayerHandleExpBarUpdate
.4byte PlayerHandleStatusIconUpdate
.4byte PlayerHandleStatusAnimation
.4byte PlayerHandleStatusXor
.4byte sub_803097C
.4byte PlayerHandleDMATransfer
.4byte sub_8030A3C
.4byte sub_8030A6C
.4byte sub_8030A78
.4byte sub_8030A8C
.4byte sub_8030AA0
.4byte sub_8030AB4
.4byte sub_8030AC8
.4byte sub_8030AE4
.4byte sub_8030B1C
.4byte sub_8030B34
.4byte PlayerHandleHitAnimation
.4byte sub_8030BCC
.4byte PlayerHandleEffectivenessSound
.4byte sub_8030C1C
.4byte PlayerHandleFaintingCry
.4byte PlayerHandleIntroSlide
.4byte PlayerHandleTrainerBallThrow
.4byte sub_8030FAC
.4byte sub_80310A4
.4byte sub_80310F0
.4byte PlayerHandleSpriteInvisibility
.4byte PlayerHandleBattleAnimation
.4byte PlayerHandleLinkStandbyMsg
.4byte PlayerHandleResetActionMoveSelection
.4byte sub_80312A0
.4byte nullsub_43
gUnknown_081FAE7C:: @ 81FAE7C
.byte 0, 2, 3, 1
gUnknown_081FAE80:: @ 81FAE80
.string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW WHITE LIGHT_BLUE WHITE2}$"
gUnknown_081FAE89:: @ 81FAE89
.byte 8, 120
.byte 88, 120
.byte 8, 136
.byte 88, 136
gUnknown_081FAE91:: @ 81FAE91
.byte 144, 120
.byte 190, 120
.byte 144, 136
.byte 190, 136
.byte 72, 72
.byte 32, 90
.byte 80, 80
.byte 80, 88
.align 2
gUnknown_081FAEA4:: @ 81FAEA4
obj_tiles gSmokescreenImpactTiles, 0x180, 55019
.align 2
gUnknown_081FAEAC:: @ 81FAEAC
obj_pal gSmokescreenImpactPalette, 55019
.align 2
gOamData_81FAEB4:: @ 81FAEB4
.2byte 0x0000
.2byte 0x4000
.2byte 0x0400
.align 2
gSpriteAnim_81FAEBC:: @ 81FAEBC
obj_image_anim_frame 0, 4
obj_image_anim_frame 4, 4
obj_image_anim_frame 8, 4
obj_image_anim_end
.align 2
gSpriteAnim_81FAECC:: @ 81FAECC
obj_image_anim_frame 0, 4, OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_frame 4, 4, OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_frame 8, 4, OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_end
.align 2
gSpriteAnim_81FAEDC:: @ 81FAEDC
obj_image_anim_frame 0, 4, OBJ_IMAGE_ANIM_V_FLIP
obj_image_anim_frame 4, 4, OBJ_IMAGE_ANIM_V_FLIP
obj_image_anim_frame 8, 4, OBJ_IMAGE_ANIM_V_FLIP
obj_image_anim_end
.align 2
gSpriteAnim_81FAEEC:: @ 81FAEEC
obj_image_anim_frame 0, 4, OBJ_IMAGE_ANIM_V_FLIP | OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_frame 4, 4, OBJ_IMAGE_ANIM_V_FLIP | OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_frame 8, 4, OBJ_IMAGE_ANIM_V_FLIP | OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_end
.align 2
gSpriteAnimTable_81FAEFC:: @ 81FAEFC
.4byte gSpriteAnim_81FAEBC
.4byte gSpriteAnim_81FAECC
.4byte gSpriteAnim_81FAEDC
.4byte gSpriteAnim_81FAEEC
.align 2
gSpriteTemplate_81FAF0C:: @ 81FAF0C
spr_template 55019, 55019, gOamData_81FAEB4, gSpriteAnimTable_81FAEFC, NULL, gDummySpriteAffineAnimTable, sub_80463CC
.align 2
gUnknown_081FAF24:: @ 81FAF24
obj_tiles gEnemyMonShadow_Gfx, 128, 0xD759
.align 2
gOamData_81FAF2C:: @ 81FAF2C
.2byte 0x4000
.2byte 0x4000
.2byte 0x0C00
.align 2
gSpriteTemplate_81FAF34:: @ 81FAF34
spr_template 55129, 55039, gOamData_81FAF2C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8032978
.align 2
gUnknown_081FAF4C:: @ 81FAF4C
.4byte 0x02008000
.4byte 0x0200a000
.4byte 0x0200c000
.4byte 0x0200e000
.align 2
gOpponentBufferCommands:: @ 81FAF5C
.4byte OpponentHandleGetAttributes
.4byte dp01t_01_2_read_pokmon_data_slice
.4byte OpponentHandleSetAttributes
.4byte sub_8034744
.4byte OpponentHandleLoadPokeSprite
.4byte OpponentHandleSendOutPoke
.4byte OpponentHandleReturnPokeToBall
.4byte OpponentHandleTrainerThrow
.4byte OpponentHandleTrainerSlide
.4byte OpponentHandleTrainerSlideBack
.4byte sub_8035030
.4byte sub_80350D4
.4byte sub_80350E0
.4byte OpponentHandleBallThrow
.4byte OpponentHandlePause
.4byte OpponentHandleMoveAnimation
.4byte OpponentHandlePrintString
.4byte OpponentHandlePrintStringPlayerOnly
.4byte sub_803540C
.4byte sub_803541C
.4byte sub_8035428
.4byte sub_8035590
.4byte sub_80355C0
.4byte sub_80356C0
.4byte OpponentHandleHealthBarUpdate
.4byte OpponentHandleExpBarUpdate
.4byte OpponentHandleStatusIconUpdate
.4byte OpponentHandleStatusAnimation
.4byte OpponentHandleStatusXor
.4byte sub_80358B0
.4byte OpponentHandleDMATransfer
.4byte sub_80358C8
.4byte sub_80358D4
.4byte sub_80358E0
.4byte sub_80358EC
.4byte sub_80358F8
.4byte sub_8035904
.4byte sub_8035910
.4byte sub_803592C
.4byte sub_8035964
.4byte sub_803597C
.4byte OpponentHandleHitAnimation
.4byte sub_8035A14
.4byte OpponentHandleEffectivenessSound
.4byte sub_8035A64
.4byte OpponentHandleFaintingCry
.4byte dp01t_2E_7_battle_intro
.4byte sub_8035B04
.4byte dp01t_30_7_0803D67C
.4byte sub_8035E6C
.4byte sub_8035EB8
.4byte OpponentHandleSpriteInvisibility
.4byte OpponentHandleBattleAnimation
.4byte OpponentHandleLinkStandbyMsg
.4byte OpponentHandleResetActionMoveSelection
.4byte sub_8035FA4
.4byte nullsub_46
@ unreferenced unknown values
.byte 0xB0, 0xB0, 0xC8, 0x98, 0x28, 0x28, 0x28, 0x20
.align 2
gLinkOpponentBufferCommands:: @ 81FB048
.4byte LinkOpponentHandleGetAttributes
.4byte sub_803889C
.4byte sub_80388A8
.4byte sub_8039220
.4byte sub_8039294
.4byte sub_80393E4
.4byte sub_80395B4
.4byte sub_80396D0
.4byte sub_80398A4
.4byte sub_80398B0
.4byte sub_803995C
.4byte sub_8039A00
.4byte sub_8039A0C
.4byte sub_8039A18
.4byte sub_8039A24
.4byte sub_8039A30
.4byte sub_8039CC8
.4byte sub_8039D2C
.4byte sub_8039D38
.4byte sub_8039D44
.4byte sub_8039D50
.4byte sub_8039D5C
.4byte sub_8039D68
.4byte sub_8039D74
.4byte sub_8039D80
.4byte sub_8039E70
.4byte sub_8039E7C
.4byte sub_8039EF0
.4byte sub_8039F58
.4byte sub_8039F64
.4byte sub_8039F70
.4byte sub_8039F7C
.4byte sub_8039F88
.4byte sub_8039F94
.4byte sub_8039FA0
.4byte sub_8039FAC
.4byte sub_8039FB8
.4byte sub_8039FC4
.4byte sub_8039FE0
.4byte sub_803A018
.4byte sub_803A030
.4byte dp01t_29_4_blink
.4byte sub_803A0C8
.4byte sub_803A0D4
.4byte sub_803A118
.4byte sub_803A148
.4byte dp01t_2E_4_battle_intro
.4byte sub_803A1B8
.4byte sub_803A3DC
.4byte sub_803A520
.4byte sub_803A56C
.4byte sub_803A578
.4byte bx_exec_buffer_A_ch0_tbl4
.4byte sub_803A640
.4byte sub_803A64C
.4byte sub_803A658
.4byte nullsub_48
@ 81FB12C
.include "data/battle_moves.inc"
.align 2
gUnknown_081FC1D0:: @ 81FC1D0
.2byte 0x34, 0x10, 0x101
.space 2
.2byte -1, -1, -1
.space 2

296
data/data2b.s Normal file
View File

@ -0,0 +1,296 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.string "$" @ "turn"
.align 2
gPlayerBufferCommands:: @ 81FAD98
.4byte PlayerHandleGetAttributes
.4byte sub_802ECF0
.4byte PlayerHandleSetAttributes
.4byte sub_802F7CC
.4byte PlayerHandleLoadPokeSprite
.4byte PlayerHandleSendOutPoke
.4byte PlayerHandleReturnPokeToBall
.4byte PlayerHandleTrainerThrow
.4byte PlayerHandleTrainerSlide
.4byte PlayerHandleTrainerSlideBack
.4byte sub_802FE7C
.4byte sub_802FF60
.4byte sub_802FF80
.4byte PlayerHandleBallThrow
.4byte PlayerHandlePuase
.4byte PlayerHandleMoveAnimation
.4byte PlayerHandlePrintString
.4byte PlayerHandlePrintStringPlayerOnly
.4byte sub_803037C
.4byte nullsub_42
.4byte sub_8030468
.4byte PlayerHandleOpenBag
.4byte sub_8030594
.4byte sub_8030674
.4byte PlayerHandleHealthBarUpdate
.4byte PlayerHandleExpBarUpdate
.4byte PlayerHandleStatusIconUpdate
.4byte PlayerHandleStatusAnimation
.4byte PlayerHandleStatusXor
.4byte sub_803097C
.4byte PlayerHandleDMATransfer
.4byte sub_8030A3C
.4byte sub_8030A6C
.4byte sub_8030A78
.4byte sub_8030A8C
.4byte sub_8030AA0
.4byte sub_8030AB4
.4byte sub_8030AC8
.4byte sub_8030AE4
.4byte sub_8030B1C
.4byte sub_8030B34
.4byte PlayerHandleHitAnimation
.4byte sub_8030BCC
.4byte PlayerHandleEffectivenessSound
.4byte sub_8030C1C
.4byte PlayerHandleFaintingCry
.4byte PlayerHandleIntroSlide
.4byte PlayerHandleTrainerBallThrow
.4byte sub_8030FAC
.4byte sub_80310A4
.4byte sub_80310F0
.4byte PlayerHandleSpriteInvisibility
.4byte PlayerHandleBattleAnimation
.4byte PlayerHandleLinkStandbyMsg
.4byte PlayerHandleResetActionMoveSelection
.4byte sub_80312A0
.4byte nullsub_43
gUnknown_081FAE7C:: @ 81FAE7C
.byte 0, 2, 3, 1
gUnknown_081FAE80:: @ 81FAE80
.string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW WHITE LIGHT_BLUE WHITE2}$"
gUnknown_081FAE89:: @ 81FAE89
.byte 8, 120
.byte 88, 120
.byte 8, 136
.byte 88, 136
gUnknown_081FAE91:: @ 81FAE91
.byte 144, 120
.byte 190, 120
.byte 144, 136
.byte 190, 136
.byte 72, 72
.byte 32, 90
.byte 80, 80
.byte 80, 88
.align 2
gUnknown_081FAEA4:: @ 81FAEA4
obj_tiles gSmokescreenImpactTiles, 0x180, 55019
.align 2
gUnknown_081FAEAC:: @ 81FAEAC
obj_pal gSmokescreenImpactPalette, 55019
.align 2
gOamData_81FAEB4:: @ 81FAEB4
.2byte 0x0000
.2byte 0x4000
.2byte 0x0400
.align 2
gSpriteAnim_81FAEBC:: @ 81FAEBC
obj_image_anim_frame 0, 4
obj_image_anim_frame 4, 4
obj_image_anim_frame 8, 4
obj_image_anim_end
.align 2
gSpriteAnim_81FAECC:: @ 81FAECC
obj_image_anim_frame 0, 4, OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_frame 4, 4, OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_frame 8, 4, OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_end
.align 2
gSpriteAnim_81FAEDC:: @ 81FAEDC
obj_image_anim_frame 0, 4, OBJ_IMAGE_ANIM_V_FLIP
obj_image_anim_frame 4, 4, OBJ_IMAGE_ANIM_V_FLIP
obj_image_anim_frame 8, 4, OBJ_IMAGE_ANIM_V_FLIP
obj_image_anim_end
.align 2
gSpriteAnim_81FAEEC:: @ 81FAEEC
obj_image_anim_frame 0, 4, OBJ_IMAGE_ANIM_V_FLIP | OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_frame 4, 4, OBJ_IMAGE_ANIM_V_FLIP | OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_frame 8, 4, OBJ_IMAGE_ANIM_V_FLIP | OBJ_IMAGE_ANIM_H_FLIP
obj_image_anim_end
.align 2
gSpriteAnimTable_81FAEFC:: @ 81FAEFC
.4byte gSpriteAnim_81FAEBC
.4byte gSpriteAnim_81FAECC
.4byte gSpriteAnim_81FAEDC
.4byte gSpriteAnim_81FAEEC
.align 2
gSpriteTemplate_81FAF0C:: @ 81FAF0C
spr_template 55019, 55019, gOamData_81FAEB4, gSpriteAnimTable_81FAEFC, NULL, gDummySpriteAffineAnimTable, sub_80463CC
.align 2
gUnknown_081FAF24:: @ 81FAF24
obj_tiles gEnemyMonShadow_Gfx, 128, 0xD759
.align 2
gOamData_81FAF2C:: @ 81FAF2C
.2byte 0x4000
.2byte 0x4000
.2byte 0x0C00
.align 2
gSpriteTemplate_81FAF34:: @ 81FAF34
spr_template 55129, 55039, gOamData_81FAF2C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8032978
.align 2
gUnknown_081FAF4C:: @ 81FAF4C
.4byte 0x02008000
.4byte 0x0200a000
.4byte 0x0200c000
.4byte 0x0200e000
.align 2
gOpponentBufferCommands:: @ 81FAF5C
.4byte OpponentHandleGetAttributes
.4byte dp01t_01_2_read_pokmon_data_slice
.4byte OpponentHandleSetAttributes
.4byte sub_8034744
.4byte OpponentHandleLoadPokeSprite
.4byte OpponentHandleSendOutPoke
.4byte OpponentHandleReturnPokeToBall
.4byte OpponentHandleTrainerThrow
.4byte OpponentHandleTrainerSlide
.4byte OpponentHandleTrainerSlideBack
.4byte sub_8035030
.4byte sub_80350D4
.4byte sub_80350E0
.4byte OpponentHandleBallThrow
.4byte OpponentHandlePause
.4byte OpponentHandleMoveAnimation
.4byte OpponentHandlePrintString
.4byte OpponentHandlePrintStringPlayerOnly
.4byte sub_803540C
.4byte sub_803541C
.4byte sub_8035428
.4byte sub_8035590
.4byte sub_80355C0
.4byte sub_80356C0
.4byte OpponentHandleHealthBarUpdate
.4byte OpponentHandleExpBarUpdate
.4byte OpponentHandleStatusIconUpdate
.4byte OpponentHandleStatusAnimation
.4byte OpponentHandleStatusXor
.4byte sub_80358B0
.4byte OpponentHandleDMATransfer
.4byte sub_80358C8
.4byte sub_80358D4
.4byte sub_80358E0
.4byte sub_80358EC
.4byte sub_80358F8
.4byte sub_8035904
.4byte sub_8035910
.4byte sub_803592C
.4byte sub_8035964
.4byte sub_803597C
.4byte OpponentHandleHitAnimation
.4byte sub_8035A14
.4byte OpponentHandleEffectivenessSound
.4byte sub_8035A64
.4byte OpponentHandleFaintingCry
.4byte dp01t_2E_7_battle_intro
.4byte sub_8035B04
.4byte dp01t_30_7_0803D67C
.4byte sub_8035E6C
.4byte sub_8035EB8
.4byte OpponentHandleSpriteInvisibility
.4byte OpponentHandleBattleAnimation
.4byte OpponentHandleLinkStandbyMsg
.4byte OpponentHandleResetActionMoveSelection
.4byte sub_8035FA4
.4byte nullsub_46
@ unreferenced unknown values
.byte 0xB0, 0xB0, 0xC8, 0x98, 0x28, 0x28, 0x28, 0x20
.align 2
gLinkOpponentBufferCommands:: @ 81FB048
.4byte LinkOpponentHandleGetAttributes
.4byte sub_803889C
.4byte sub_80388A8
.4byte sub_8039220
.4byte sub_8039294
.4byte sub_80393E4
.4byte sub_80395B4
.4byte sub_80396D0
.4byte sub_80398A4
.4byte sub_80398B0
.4byte sub_803995C
.4byte sub_8039A00
.4byte sub_8039A0C
.4byte sub_8039A18
.4byte sub_8039A24
.4byte sub_8039A30
.4byte sub_8039CC8
.4byte sub_8039D2C
.4byte sub_8039D38
.4byte sub_8039D44
.4byte sub_8039D50
.4byte sub_8039D5C
.4byte sub_8039D68
.4byte sub_8039D74
.4byte sub_8039D80
.4byte sub_8039E70
.4byte sub_8039E7C
.4byte sub_8039EF0
.4byte sub_8039F58
.4byte sub_8039F64
.4byte sub_8039F70
.4byte sub_8039F7C
.4byte sub_8039F88
.4byte sub_8039F94
.4byte sub_8039FA0
.4byte sub_8039FAC
.4byte sub_8039FB8
.4byte sub_8039FC4
.4byte sub_8039FE0
.4byte sub_803A018
.4byte sub_803A030
.4byte dp01t_29_4_blink
.4byte sub_803A0C8
.4byte sub_803A0D4
.4byte sub_803A118
.4byte sub_803A148
.4byte dp01t_2E_4_battle_intro
.4byte sub_803A1B8
.4byte sub_803A3DC
.4byte sub_803A520
.4byte sub_803A56C
.4byte sub_803A578
.4byte bx_exec_buffer_A_ch0_tbl4
.4byte sub_803A640
.4byte sub_803A64C
.4byte sub_803A658
.4byte nullsub_48
@ 81FB12C
.include "data/battle_moves.inc"
.align 2
gUnknown_081FC1D0:: @ 81FC1D0
.2byte 0x34, 0x10, 0x101
.space 2
.2byte -1, -1, -1
.space 2

View File

@ -28,64 +28,83 @@
#define AI_ACTION_UNK7 0x0040
#define AI_ACTION_UNK8 0x0080
#define STATUS_SLEEP 0x7
#define STATUS_POISON 0x8
#define STATUS_BURN 0x10
#define STATUS_FREEZE 0x20
#define STATUS_PARALYSIS 0x40
#define STATUS_TOXIC_POISON 0x80
#define STATUS_SLEEP 0x7
#define STATUS_POISON 0x8
#define STATUS_BURN 0x10
#define STATUS_FREEZE 0x20
#define STATUS_PARALYSIS 0x40
#define STATUS_TOXIC_POISON 0x80
#define STATUS2_CONFUSION 0x00000007
#define STATUS2_UPROAR 0x00000070
#define STATUS2_BIDE 0x00000300 //two bits 0x100 0x200
#define STATUS2_LOCK_CONFUSE 0x00000C00
#define STATUS2_MULTIPLETURNS 0x00001000
#define STATUS2_WRAPPED 0x0000E000
#define STATUS2_INFATUATION 0x000F0000
#define STATUS2_FOCUS_ENERGY 0x00100000
#define STATUS2_TRANSFORMED 0x00200000
#define STATUS2_RECHARGE 0x00400000
#define STATUS2_RAGE 0x00800000
#define STATUS2_SUBSTITUTE 0x01000000
#define STATUS2_DESTINY_BOND 0x02000000
#define STATUS2_ESCAPE_PREVENTION 0x04000000
#define STATUS2_NIGHTMARE 0x08000000
#define STATUS2_CURSED 0x10000000
#define STATUS2_FORESIGHT 0x20000000
#define STATUS2_DEFENSE_CURL 0x40000000
#define STATUS2_TORMENT 0x80000000
#define STATUS3_LEECHSEED_RECEIVER 0x3 //two bits for the bank that gets hp
#define STATUS3_LEECHSEED_BANK 0x3
#define STATUS3_LEECHSEED 0x4
#define STATUS3_ALWAYS_HITS 0x18 //two bits
#define STATUS3_PERISH_SONG 0x20
#define STATUS3_ON_AIR 0x40
#define STATUS3_UNDERGROUND 0x80
#define STATUS3_MINIMIZED 0x100
#define STATUS3_ROOTED 0x400
#define STATUS3_CHARGED_UP 0x200
#define STATUS3_ROOTED 0x400
#define STATUS3_YAWN 0x1800 //two bits
#define STATUS3_IMPRISIONED 0x2000
#define STATUS3_GRUDGE 0x4000
#define STATUS3_CANT_SCORE_A_CRIT 0x8000
#define STATUS3_MUDSPORT 0x10000
#define STATUS3_WATERSPORT 0x20000
#define STATUS3_UNDERWATER 0x40000
#define HITMARKER_x20 0x0000020
#define HITMARKER_DESTINYBOND 0x0000040
#define HITMARKER_NO_ANIMATIONS 0x0000080
#define HITMARKER_IGNORE_SUBSTITUTE 0x0000100
#define HITMARKER_NO_ATTACKSTRING 0x0000200
#define HITMARKER_ATTACKSTRING_PRINTED 0x0000400
#define HITMARKER_NO_PPDEDUCT 0x0000800
#define HITMARKER_IGNORE_SAFEGUARD 0x0002000
#define HITMARKER_SYNCHRONISE_EFFECT 0x0004000
#define HITMARKER_IGNORE_ON_AIR 0x0010000
#define HITMARKER_IGNORE_UNDERGROUND 0x0020000
#define HITMARKER_IGNORE_UNDERWATER 0x0040000
#define HITMARKER_x80000 0x0080000
#define HITMARKER_x100000 0x0100000
#define HITMARKER_x400000 0x0400000
#define HITMARKER_x800000 0x0800000
#define HITMARKER_GRUDGE 0x1000000
#define HITMARKER_OBEYS 0x2000000
#define STATUS3_SEMI_INVULNERABLE ((STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER))
#define HITMARKER_x20 0x00000020
#define HITMARKER_DESTINYBOND 0x00000040
#define HITMARKER_NO_ANIMATIONS 0x00000080
#define HITMARKER_IGNORE_SUBSTITUTE 0x00000100
#define HITMARKER_NO_ATTACKSTRING 0x00000200
#define HITMARKER_ATTACKSTRING_PRINTED 0x00000400
#define HITMARKER_NO_PPDEDUCT 0x00000800
#define HITMARKER_PURSUIT_TRAP 0x00001000
#define HITMARKER_IGNORE_SAFEGUARD 0x00002000
#define HITMARKER_SYNCHRONISE_EFFECT 0x00004000
#define HITMARKER_IGNORE_ON_AIR 0x00010000
#define HITMARKER_IGNORE_UNDERGROUND 0x00020000
#define HITMARKER_IGNORE_UNDERWATER 0x00040000
#define HITMARKER_x80000 0x00080000
#define HITMARKER_x100000 0x00100000
#define HITMARKER_x400000 0x00400000
#define HITMARKER_x800000 0x00800000
#define HITMARKER_GRUDGE 0x01000000
#define HITMARKER_OBEYS 0x02000000
#define HITMARKER_x8000000 0x08000000
#define HITMARKER_FAINTED(bank) ((gBitTable[bank] << 0x1C))
#define HITMARKER_UNK(bank) ((0x10000000 << bank))
#define SIDE_REFLECT 0x1
#define SIDE_LIGHTSCREEN 0x2
#define SIDE_SPIKES 0x10
#define SIDE_SAFEGUARD 0x20
#define SIDE_FUTUREATTACK 0x40
#define SIDE_MIST 0x100
#define SIDE_SPIKES_DMG_DONE 0x200
#define MAX_TRAINER_ITEMS 4
#define MAX_MON_MOVES 4
#define MAX_BANKS_BATTLE 4
@ -165,31 +184,28 @@ struct BattleStruct /* 0x2000000 */
/*0x15DDE*/ u8 unk15DDE;
/*0x15DDF*/ u8 unk15DDF;
/*0x15DE0*/ u8 filler15DE0[0x222];
/*0x16002*/ u8 AnimTurn;
/*0x16003*/ u8 ScriptingActive;
/*0x16004*/ u8 WrappedMove1[4];
/*0x16008*/ u8 WrappedMove2[4];
/*0x16002*/ u8 animTurn;
/*0x16003*/ u8 scriptingActive;
/*0x16004*/ u8 wrappedMove1[4];
/*0x16008*/ u8 wrappedMove2[4];
/*0x1600C*/ u8 cmd49StateTracker;
/*0x1600D*/ u8 unk1600D;
/*0x1600E*/ u8 unk1600E;
/*0x1600F*/ u8 atk23StateTracker;
/*0x16010*/ u8 unk16010;
/*0x16011*/ u8 unk16011;
/*0x16012*/ u8 unk16012;
/*0x16013*/ u8 unk16013;
/*0x1600F*/ u8 cmd23StateTracker;
/*0x16010*/ u8 moveTarget[4];
/*0x16014*/ u8 unk16014;
/*0x16015*/ u8 unk16015;
/*0x16016*/ u8 unk16016;
/*0x16017*/ u8 unk16017;
/*0x16018*/ u8 expGetterID;
/*0x16019*/ u8 unk16019;
/*0x1601A*/ u8 unk1601A;
/*0x1601A*/ u8 atk5A_StateTracker; //also atk5B, statetracker
/*0x1601B*/ u8 wildVictorySong;
/*0x1601C*/ u8 DynamicMoveType;
/*0x1601C*/ u8 dynamicMoveType;
/*0x1601D*/ u8 unk1601D;
/*0x1601E*/ u8 statChanger;
/*0x1601F*/ u8 DmgMultiplier;
/*0x16020*/ u8 WrappedBy[4];
/*0x1601F*/ u8 dmgMultiplier;
/*0x16020*/ u8 wrappedBy[4];
/*0x16024*/ u8 unk16024;
/*0x16025*/ u8 unk16025;
/*0x16026*/ u8 unk16026;
@ -240,7 +256,7 @@ struct BattleStruct /* 0x2000000 */
/*0x16053*/ u8 unk16053;
/*0x16054*/ u8 unk16054;
/*0x16055*/ u8 unk16055;
/*0x16056*/ u8 unk16056;
/*0x16056*/ u8 moneyMultiplier;
/*0x16057*/ u8 unk16057;
/*0x16058*/ u8 unk16058;
/*0x16059*/ u8 unk16059;
@ -250,38 +266,11 @@ struct BattleStruct /* 0x2000000 */
/*0x1605E*/ u8 unk1605E;
/*0x1605F*/ u8 sentInPokes;
/*0x16060*/ u8 unk16060[4];
/*0x16064*/ u8 unk16064;
/*0x16065*/ u8 unk16065;
/*0x16066*/ u8 unk16066;
/*0x16067*/ u8 unk16067;
/*0x16068*/ u8 unk16068;
/*0x16069*/ u8 unk16069;
/*0x1606A*/ u8 unk1606A;
/*0x1606B*/ u8 unk1606B;
/*0x1606C*/ u8 unk1606C;
/*0x1606D*/ u8 unk1606D;
/*0x1606E*/ u8 unk1606E;
/*0x1606F*/ u8 unk1606F;
/*0x16070*/ u8 unk16070;
/*0x16071*/ u8 unk16071;
/*0x16072*/ u8 unk16072;
/*0x16073*/ u8 unk16073;
/*0x16074*/ u8 unk16074;
/*0x16075*/ u8 unk16075;
/*0x16076*/ u8 unk16076;
/*0x16077*/ u8 unk16077;
/*0x16064*/ u8 unk16064[4];
/*0x16068*/ u8 unk16068[4];
/*0x1606C*/ u8 unk1606C[4][3];
/*0x16078*/ u8 unk16078;
/*0x16079*/ u8 unk16079;
/*0x1607A*/ u8 unk1607A;
/*0x1607B*/ u8 unk1607B;
/*0x1607C*/ u8 unk1607C;
/*0x1607D*/ u8 unk1607D;
/*0x1607E*/ u8 unk1607E;
/*0x1607F*/ u8 unk1607F;
/*0x16080*/ u8 unk16080;
/*0x16081*/ u8 unk16081;
/*0x16082*/ u8 unk16082;
/*0x16083*/ u8 unk16083;
/*0x16079*/ u8 caughtNick[11];
/*0x16084*/ u8 unk16084;
/*0x16085*/ u8 unk16085;
/*0x16086*/ u8 unk16086;
@ -302,17 +291,17 @@ struct BattleStruct /* 0x2000000 */
/*0x16098*/ u8 unk16098;
/*0x16099*/ u8 unk16099;
/*0x1609A*/ u8 unk1609a;
/*0x1609B*/ u8 unk1609b;
/*0x1609C*/ u8 unk1609C;
/*0x1609B*/ u8 castformToChangeInto;
/*0x1609C*/ u8 atk6C_statetracker;
/*0x1609D*/ u8 unk1609D;
/*0x1609E*/ u8 unk1609E;
/*0x1609F*/ u8 unk1609F;
/*0x160A0*/ u8 unk160a0;
/*0x160A1*/ u8 AnimTargetsHit;
/*0x160A1*/ u8 animTargetsHit;
/*0x160A2*/ u8 expGetterBank;
/*0x160A3*/ u8 unk160A3;
/*0x160A4*/ u8 AnimArg1;
/*0x160A5*/ u8 AnimArg2;
/*0x160A4*/ u8 animArg1;
/*0x160A5*/ u8 animArg2;
/*0x160A6*/ u8 unk160A6;
/*0x160A7*/ u8 unk160A7;
/*0x160A8*/ u8 unk160A8;
@ -335,12 +324,9 @@ struct BattleStruct /* 0x2000000 */
/*0x160B9*/ u8 unk160B9;
/*0x160BA*/ u8 unk160Ba;
/*0x160BB*/ u8 unk160Bb;
/*0x160BC*/ u8 unk160BC;
/*0x160BD*/ u8 unk160BD;
/*0x160BE*/ u8 unk160BE;
/*0x160BF*/ u8 unk160BF;
/*0x160BC*/ u16 HP_OnSwitchout[2];
/*0x160C0*/ u8 unk160C0;
/*0x160C1*/ u8 unk160C1;
/*0x160C1*/ u8 hpScale;
/*0x160C2*/ u8 unk160C2;
/*0x160C3*/ u8 unk160C3;
/*0x160C4*/ u8 unk160C4;
@ -349,57 +335,68 @@ struct BattleStruct /* 0x2000000 */
/*0x160C7*/ u8 unk160C7;
/*0x160C8*/ u8 unk160C8;
/*0x160C9*/ u8 unk160C9;
/*0x160CA*/ u8 SynchroniseEffect;
/*0x160CA*/ u8 synchroniseEffect;
/*0x160CB*/ u8 linkPlayerIndex;
/*0x160CC*/ u16 UsedHeldItems[4];
/*0x160CC*/ u16 usedHeldItems[4];
u8 filler2[0x72E];
/* 0x16A00 */ struct UnkBattleStruct1 unk_2016A00_2;
};
struct DisableStruct
{
/*0x00*/ u8 filler0[0x3];
/*0x04*/ u16 DisabledMove;
/*0x06*/ u16 EncoredMove;
/*0x08*/ u8 ProtectUses;
/*0x09*/ u8 StockpileCounter;
/*0x0A*/ u8 SubstituteHP;
u8 fillerB[4];
u8 unkF_0:4;
u8 unkF_4:4;
u8 filler10[3];
/*0x13*/ u8 taunt:4;
/*0x13*/ u8 unkC:4;
/*0x14*/ u8 BankPreventingEscape;
/*0x15*/ u8 BankWithSureHit;
/*0x16*/ u8 IsFirstTurn;
/*0x00*/ u32 unk0;
/*0x04*/ u16 disabledMove;
/*0x06*/ u16 encoredMove;
/*0x08*/ u8 protectUses;
/*0x09*/ u8 stockpileCounter;
/*0x0A*/ u8 substituteHP;
/*0x0B*/ u8 disableTimer1 : 4;
/*0x0B*/ u8 disableTimer2 : 4;
/*0x0C*/ u8 encoredMovePos;
/*0x0D*/ u8 unkD;
/*0x0E*/ u8 encoreTimer1 : 4;
/*0x0E*/ u8 encoreTimer2 : 4;
/*0x0F*/ u8 perishSong1 : 4;
/*0x0F*/ u8 perishSong2 : 4;
/*0x10*/ u8 furyCutterCounter;
/*0x11*/ u8 rolloutTimer1 : 4;
/*0x11*/ u8 rolloutTimer2 : 4;
/*0x12*/ u8 chargeTimer1 : 4;
/*0x12*/ u8 chargeTimer2 : 4;
/*0x13*/ u8 tauntTimer1:4;
/*0x13*/ u8 tauntTimer2:4;
/*0x14*/ u8 bankPreventingEscape;
/*0x15*/ u8 bankWithSureHit;
/*0x16*/ u8 isFirstTurn;
/*0x17*/ u8 unk17;
/*0x18*/ u8 TruantCounter;
/*0x19*/ u8 RechargeCounter;
/*0x18*/ u8 truantCounter : 1;
/*0x18*/ u8 unk18_a : 3;
/*0x18*/ u8 unk18_b : 4;
/*0x19*/ u8 rechargeCounter;
/*0x1A*/ u8 unk1A[2];
};
struct BattleResults
{
u8 PlayerFaintCounter; // 0x0
u8 OpponentFaintCounter; // 0x1
u8 playerFaintCounter; // 0x0
u8 opponentFaintCounter; // 0x1
u8 unk2; // 0x2
u8 unk3; // 0x3
u8 unk4; // 0x4
u8 unk5_0:1; // 0x5
u8 unk5_1:1; // 0x5
u16 Poke1Species; // 0x6
u8 PokeString1[10]; // 0x8
u16 poke1Species; // 0x6
u8 pokeString1[10]; // 0x8
u8 unk12;
u8 BattleTurnCounter; // 0x13
u8 PokeString2[10]; // 0x14
u8 battleTurnCounter; // 0x13
u8 pokeString2[10]; // 0x14
u8 filler1E[2];
u16 LastOpponentSpecies; // 0x20
u16 LastUsedMove; // 0x22
u16 OpponentMove; // 0x24
u16 OpponentSpecies; // 0x26
u16 CaughtPoke; // 0x28
u8 CaughtNick[10]; // 0x2A
u16 lastOpponentSpecies; // 0x20
u16 lastUsedMove; // 0x22
u16 opponentMove; // 0x24
u16 opponentSpecies; // 0x26
u16 caughtPoke; // 0x28
u8 caughtNick[10]; // 0x2A
u8 filler34[2];
u8 unk36[10];
};
@ -454,34 +451,34 @@ struct Struct20238C8
struct ProtectStruct
{
/*field0*/
u32 Protected:1;
u32 Endured:1;
u32 OnlyStruggle:1;
u32 HelpingHand:1;
u32 BounceMove:1;
u32 StealMove:1;
u32 Flag0Unknown:1;
u32 PrlzImmobility:1;
u32 protected:1;
u32 endured:1;
u32 onlyStruggle:1;
u32 helpingHand:1;
u32 bounceMove:1;
u32 stealMove:1;
u32 flag0Unknown:1;
u32 prlzImmobility:1;
/*field1*/
u32 ConfusionSelfDmg:1;
u32 NotEffective:1;
u32 ChargingTurn:1;
u32 FleeFlag:2; //for RunAway and Smoke Ball
u32 UsedImprisionedMove:1;
u32 LoveImmobility:1;
u32 UsedDisabledMove:1;
u32 confusionSelfDmg:1;
u32 notEffective:1;
u32 chargingTurn:1;
u32 fleeFlag:2; //for RunAway and Smoke Ball
u32 usedImprisionedMove:1;
u32 loveImmobility:1;
u32 usedDisabledMove:1;
/*field2*/
u32 UsedTauntedMove:1;
u32 Flag2Unknown:1;
u32 FlinchImmobility:1;
u32 NotFirstStrike:1;
u32 Free : 4;
u32 usedTauntedMove:1;
u32 flag2Unknown:1;
u32 flinchImmobility:1;
u32 notFirstStrike:1;
u32 free : 4;
/*field3*/
u32 field3 : 8;
u32 PhysicalDmg;
u32 SpecialDmg;
u8 PhysicalBank;
u8 SpecialBank;
u32 physicalDmg;
u32 specialDmg;
u8 physicalBank;
u8 specialBank;
u16 fieldE;
};
@ -497,7 +494,7 @@ struct SpecialStatus
u8 focusBanded : 1;
u8 field1[3];
u32 moveturnLostHP;
u32 moveturnlostHP_physical;
u32 moveturnLostHP_physical;
u32 moveturnLostHP_special;
u8 moveturnPhysicalBank;
u8 moveturnSpecialBank;
@ -507,18 +504,18 @@ struct SpecialStatus
struct sideTimer
{
u8 reflectTimer;
u8 reflectBank;
u8 lightscreenTimer;
u8 lightscreenBank;
u8 mistTimer;
u8 mistBank;
u8 safeguardTimer;
u8 safeguardBank;
u8 followmeTimer;
u8 followmeTarget;
u8 spikesAmount;
u8 fieldB;
u8 reflectTimer; //0x0
u8 lightscreenTimer; //0x1
u8 mistTimer; //0x2
u8 field3; //0x3
u8 field4; //0x4
u8 field5; //0x5
u8 spikesAmount; //0x6
u8 safeguardTimer; //0x7
u8 followmeTimer; //0x8
u8 followmeTarget; //0x9
u8 fieldA; //0xA
u8 fieldB; //0xB
};
struct WishFutureKnock
@ -528,7 +525,7 @@ struct WishFutureKnock
s32 futureSightDmg[MAX_BANKS_BATTLE];
u16 futureSightMove[MAX_BANKS_BATTLE];
u8 wishCounter[MAX_BANKS_BATTLE];
u8 wishUserBank[MAX_BANKS_BATTLE];
u8 wishUserID[MAX_BANKS_BATTLE];
u8 weatherDuration;
u8 knockedOffPokes[2];
};
@ -554,6 +551,58 @@ extern u8 ewram[];
#define ewram17800 ((struct Struct2017800 *) (ewram + 0x17800))
#define ewram17810 ((struct Struct2017810 *) (ewram + 0x17810))
#define ewram17840 (*(struct Struct2017840 *) (ewram + 0x17840))
#define B_FUNCTION_STACK ((struct funcStack *)(0x02017140))
struct funcStack
{
void* ptr[8];
u8 size;
};
extern u8 gBattleTextBuff1[];
//function declarations of buffer emits
void EmitGetAttributes(u8 buffID, u8 request, u8 c); //0x0
void dp01_build_cmdbuf_x01_a_b_0(u8 a, u8 b, u8 c); //0x1
void EmitSetAttributes(u8 a, u8 request, u8 c, u8 bytes, void *data); //0x2
void EmitSwitchInAnim(u8 a, u8 b, u8 c); //0x5
void EmitReturnPokeToBall(u8 a, u8 b); //0x6
void EmitTrainerSlide(u8 a); //0x8
void EmitFaintAnimation(u8 a); //0xA
void EmitBallThrowAnim(u8 a, u8 shakes); //0xD
//void EmitMoveAnimation(u8 a, u16 move, u8 turn, u16 power, s32 dmg, u8 happiness, void *disable_struct); //0xF
void EmitPrintString(u8 a, u16 stringID); //0x10
//void EmitPrintStringPlayerOnly(u8 a, u16 stringID); //0x11
void EmitChoosePokemon(u8 a, u8 b, u8 c, u8 d, u8 *e); //0x16
//void EmitHealthBarUpdate(u8 a, u16 b); //0x18; Had to declare the second arg as u16 because s16 wont match in atk0b
//void EmitExpBarUpdate(u8 a, u8 b, u16 c); //0x19
void EmitStatusIconUpdate(u8 a, u32 b, u32 c); //0x1A
void EmitStatusAnimation(u8 a, u8 b, u32 c); //0x1B
void EmitStatusXor(u8 a, u8 b); //0x1C
void EmitHitAnimation(u8 a); //0x29
void EmitEffectivenessSound(u8 a, u16 sound); //0x2B
void EmitPlaySound(u8 a, u16 sound); //0x2C
void EmitFaintingCry(u8 a); //0x2D
void EmitBattleIntroSlide(u8 a, u8 b); //0x2E
void dp01_build_cmdbuf_x30_TODO(u8 a, u8 *b, u8 c); //0x30
void dp01_build_cmdbuf_x31_31_31_31(u8 a); //0x31
void EmitSpriteInvisibility(u8 a, u8 b); //0x33
void EmitBattleAnimation(u8 a, u8 b, u16 c); //0x34
void EmitResetActionMoveSelection(u8 a, u8 b); //0x36
void dp01_build_cmdbuf_x37_a(u8 a, u8 b); //0x37
#define REQUEST_ALL_BATTLE 0x0
#define REQUEST_SPECIES_BATTLE 0x1
#define REQUEST_HELDITEM_BATTLE 0x2
#define REQUEST_MOVES_PP_BATTLE 0x3
#define REQUEST_PPMOVE1_BATTLE 0x9
#define REQUEST_PPMOVE2_BATTLE 0xA
#define REQUEST_PPMOVE3_BATTLE 0xB
#define REQUEST_PPMOVE4_BATTLE 0xC
#define REQUEST_STATUS_BATTLE 0x28
#define REQUEST_HP_BATTLE 0x2A
void MarkBufferBankForExecution(u8 bank);
extern u8 gBattleTextBuff1[];
@ -611,7 +660,6 @@ u8 b_first_side(u8, u8, u8);
void TurnValuesCleanUp(u8);
void SpecialStatusesClear(void);
void sub_80138F0(void);
void MarkBufferBankForExecution();
void sub_80155A4();
void CancelMultiTurnMoves(u8);
void PrepareStringBattle();
@ -625,11 +673,11 @@ u8 TurnBasedEffects();
u8 sub_80170DC();
u8 sub_80173A4();
u8 AbilityBattleEffects(u8, u8, u8, u8, u16);
u8 sub_801A02C();
u8 ItemBattleEffects();
// asm/battle_4.o
void AI_CalcDmg(u8, u8);
void TypeCalc(u16, u8, u8);
u8 TypeCalc(u16 move, u8 bank_atk, u8 bank_def);
// asm/battle_5.o
void nullsub_91(void);

View File

@ -392,9 +392,14 @@ struct BattleMove
u8 secondaryEffectChance;
u8 target;
u8 priority;
u32 flags;
u8 flags;
u8 pad[3];
};
#define FLAG_PROTECT_AFFECTED 0x2
#define FLAG_MAGICCOAT_AFFECTED 0x4
#define FLAG_SNATCH_AFFECTED 0x8
struct PokemonStorage
{
/*0x00*/ u8 currentBox;

View File

@ -14,23 +14,22 @@ void sub_800C35C(void);
void sub_800C47C(u8);
void EmitGetAttributes(u8 a, u8 b, u8 c);
void dp01_build_cmdbuf_x01_a_b_0(u8 a, u8 b, u8 c);
void EmitSetAttributes(u8 a, u8 b, u8 c, u8 d, u8 *e);
void dp01_build_cmdbuf_x04_4_4_4(u8 a);
void sub_800C704(u8, u8, u8);
void dp01_build_cmdbuf_x06_a(u8 a, u8 b);
void EmitSwitchInAnim(u8, u8, u8);
void EmitReturnPokeToBall(u8 a, u8 b);
void dp01_build_cmdbuf_x07_7_7_7(u8 a);
void dp01_build_cmdbuf_x08_8_8_8(u8 a);
void EmitTrainerSlide(u8 a);
void dp01_build_cmdbuf_x09_9_9_9(u8 a);
void EmitFaintAnimation(u8 a);
void dp01_build_cmdbuf_x0B_B_B_B(u8 a);
void dp01_build_cmdbuf_x0C_C_C_C(u8 a);
void dp01_build_cmdbuf_x0D_a(u8 a, u8 b);
void EmitBallThrowAnim(u8 a, u8 b);
void EmitMoveAnimation(u8 a, u16 b, u8 c, u16 d, s32 e, u8 f, u8 *g);
void EmitPrintString(u8 a, u16 b);
void dp01_build_cmdbuf_x12_a_bb(u8 a, u8 b, u16 c);
void sub_800CBA4(u8 a, u8 b, u8 c, u8 *d);
void sub_800CBE0(u8 a, u8 *b);
void dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f(u8 a, u8 b, u8 c, u8 d, u8 *e);
void EmitChoosePokemon(u8 a, u8 b, u8 c, u8 d, u8 *e);
void dp01_build_cmdbuf_x17_17_17_17(u8 a);
void EmitHealthBarUpdate(u8 a, s16 b);
void EmitExpBarUpdate(u8 a, u8 b, s16 c);
@ -49,7 +48,7 @@ void dp01_build_cmdbuf_x28_28_28_28(u8 a);
void EmitHitAnimation(u8 a);
void dp01_build_cmdbuf_x2A_2A_2A_2A(u8 a);
void EmitEffectivenessSound(u8 a, u16 b);
void sub_800D074(u8 a, u16 b);
void EmitPlaySound(u8 a, u16 b);
void EmitFaintingCry(u8 a);
void EmitBattleIntroSlide(u8 a, u8 b);
void dp01_build_cmdbuf_x2F_2F_2F_2F(u8 a);

View File

@ -54,7 +54,7 @@ SECTIONS {
src/battle_2.o(.text);
asm/battle_2.o(.text);
asm/battle_3.o(.text);
asm/battle_4.o(.text);
src/battle_4.o(.text);
asm/battle_5.o(.text);
src/battle_6.o(.text);
src/battle_7.o(.text);
@ -331,7 +331,9 @@ SECTIONS {
src/link.o(.rodata);
src/rtc.o(.rodata);
data/main_menu.o(.rodata);
data/data2.o(.rodata);
data/data2a.o(.rodata);
src/battle_4.o(.rodata);
data/data2b.o(.rodata);
src/pokemon_data.o(.rodata);
. = ALIGN(4);
src/trig.o(.rodata);

View File

@ -1584,7 +1584,7 @@ void sub_8010874(void)
for (j = 0; j < (u32)0x1C; j++)
r4[j] = 0;
gDisableStructs[i].IsFirstTurn = 2;
gDisableStructs[i].isFirstTurn= 2;
gUnknown_02024C70[i] = 0;
gLastUsedMove[i] = 0;
gMoveHitWith[i] = 0;
@ -1655,25 +1655,25 @@ void sub_8010874(void)
ewram16113 = 0;
for (i = 0; i < 11; i++)
gBattleResults.unk36[i] = 0;
gBattleResults.BattleTurnCounter = 0;
gBattleResults.PlayerFaintCounter = 0;
gBattleResults.OpponentFaintCounter = 0;
gBattleResults.battleTurnCounter = 0;
gBattleResults.playerFaintCounter = 0;
gBattleResults.opponentFaintCounter = 0;
gBattleResults.unk2 = 0;
gBattleResults.unk3 = 0;
gBattleResults.unk4 = 0;
gBattleResults.unk5_0 = 0;
gBattleResults.unk5_1 = 0;
gBattleResults.LastOpponentSpecies = 0;
gBattleResults.LastUsedMove = 0;
gBattleResults.OpponentMove = 0;
gBattleResults.Poke1Species = 0;
gBattleResults.OpponentSpecies = 0;
gBattleResults.CaughtPoke = 0;
gBattleResults.lastOpponentSpecies = 0;
gBattleResults.lastUsedMove = 0;
gBattleResults.opponentMove = 0;
gBattleResults.poke1Species = 0;
gBattleResults.opponentSpecies = 0;
gBattleResults.caughtPoke = 0;
for (i = 0; i < 10; i++)
{
gBattleResults.PokeString1[i] = 0;
gBattleResults.PokeString2[i] = 0;
gBattleResults.CaughtNick[i] = 0;
gBattleResults.pokeString1[i] = 0;
gBattleResults.pokeString2[i] = 0;
gBattleResults.caughtNick[i] = 0;
}
}
@ -1692,25 +1692,25 @@ void SwitchInClearStructs(void)
{
struct UnknownStruct12 *sp20 = &gUnknown_02024AD0[i];
if ((sp20->unk0 & 0x04000000) && gDisableStructs[i].BankPreventingEscape == gActiveBank)
if ((sp20->unk0 & 0x04000000) && gDisableStructs[i].bankPreventingEscape == gActiveBank)
sp20->unk0 &= ~0x04000000;
if ((gStatuses3[i] & STATUS3_ALWAYS_HITS) && gDisableStructs[i].BankWithSureHit == gActiveBank)
if ((gStatuses3[i] & STATUS3_ALWAYS_HITS) && gDisableStructs[i].bankWithSureHit == gActiveBank)
{
gStatuses3[i] &= ~STATUS3_ALWAYS_HITS;
gDisableStructs[i].BankWithSureHit = 0;
gDisableStructs[i].bankWithSureHit = 0;
}
}
}
if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS)
{
gBattleMons[gActiveBank].status2 &= (STATUS2_CONFUSION | STATUS2_FOCUS_ENERGY | STATUS2_SUBSTITUTE | STATUS2_ESCAPE_PREVENTION | STATUS2_CURSED);
gStatuses3[gActiveBank] &= (STATUS3_LEECHSEED_RECEIVER | STATUS3_LEECHSEED | STATUS3_ALWAYS_HITS | STATUS3_PERISH_SONG | STATUS3_ROOTED | STATUS3_MUDSPORT | STATUS3_WATERSPORT);
gStatuses3[gActiveBank] &= (STATUS3_LEECHSEED_BANK | STATUS3_LEECHSEED | STATUS3_ALWAYS_HITS | STATUS3_PERISH_SONG | STATUS3_ROOTED | STATUS3_MUDSPORT | STATUS3_WATERSPORT);
for (i = 0; i < gNoOfAllBanks; i++)
{
if (GetBankSide(gActiveBank) != GetBankSide(i)
&& (gStatuses3[i] & STATUS3_ALWAYS_HITS) != 0
&& (gDisableStructs[i].BankWithSureHit == gActiveBank))
&& (gDisableStructs[i].bankWithSureHit == gActiveBank))
{
gStatuses3[i] &= ~STATUS3_ALWAYS_HITS;
gStatuses3[i] |= 0x10;
@ -1740,13 +1740,13 @@ void SwitchInClearStructs(void)
if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS)
{
gDisableStructs[gActiveBank].SubstituteHP = sp0.SubstituteHP;
gDisableStructs[gActiveBank].BankWithSureHit = sp0.BankWithSureHit;
gDisableStructs[gActiveBank].unkF_0 = sp0.unkF_0;
gDisableStructs[gActiveBank].unkF_4 = sp0.unkF_4;
gDisableStructs[gActiveBank].substituteHP = sp0.substituteHP;
gDisableStructs[gActiveBank].bankWithSureHit = sp0.bankWithSureHit;
gDisableStructs[gActiveBank].perishSong1 = sp0.perishSong1;
gDisableStructs[gActiveBank].perishSong2 = sp0.perishSong2;
}
gDisableStructs[gActiveBank].IsFirstTurn = 2;
gDisableStructs[gActiveBank].isFirstTurn= 2;
gLastUsedMove[gActiveBank] = 0;
gMoveHitWith[gActiveBank] = 0;
gUnknown_02024C44[gActiveBank] = 0;
@ -1781,7 +1781,7 @@ void UndoEffectsAfterFainting(void)
gStatuses3[gActiveBank] = 0;
for (i = 0; i < gNoOfAllBanks; i++)
{
if ((gBattleMons[i].status2 & STATUS2_ESCAPE_PREVENTION) && gDisableStructs[i].BankPreventingEscape == gActiveBank)
if ((gBattleMons[i].status2 & STATUS2_ESCAPE_PREVENTION) && gDisableStructs[i].bankPreventingEscape == gActiveBank)
gBattleMons[i].status2 &= ~STATUS2_ESCAPE_PREVENTION;
if (gBattleMons[i].status2 & (gBitTable[gActiveBank] << 16))
gBattleMons[i].status2 &= ~(gBitTable[gActiveBank] << 16);
@ -1794,27 +1794,27 @@ void UndoEffectsAfterFainting(void)
ptr = (u8 *)&gDisableStructs[gActiveBank];
for (i = 0; i < (u32)0x1C; i++)
ptr[i] = 0;
gProtectStructs[gActiveBank].Protected = 0;
gProtectStructs[gActiveBank].Endured = 0;
gProtectStructs[gActiveBank].OnlyStruggle = 0;
gProtectStructs[gActiveBank].HelpingHand = 0;
gProtectStructs[gActiveBank].BounceMove = 0;
gProtectStructs[gActiveBank].StealMove = 0;
gProtectStructs[gActiveBank].Flag0Unknown = 0;
gProtectStructs[gActiveBank].PrlzImmobility = 0;
gProtectStructs[gActiveBank].ConfusionSelfDmg = 0;
gProtectStructs[gActiveBank].NotEffective = 0;
gProtectStructs[gActiveBank].ChargingTurn = 0;
gProtectStructs[gActiveBank].FleeFlag = 0;
gProtectStructs[gActiveBank].UsedImprisionedMove = 0;
gProtectStructs[gActiveBank].LoveImmobility = 0;
gProtectStructs[gActiveBank].UsedDisabledMove = 0;
gProtectStructs[gActiveBank].UsedTauntedMove = 0;
gProtectStructs[gActiveBank].Flag2Unknown = 0;
gProtectStructs[gActiveBank].FlinchImmobility = 0;
gProtectStructs[gActiveBank].NotFirstStrike = 0;
gProtectStructs[gActiveBank].protected = 0;
gProtectStructs[gActiveBank].endured = 0;
gProtectStructs[gActiveBank].onlyStruggle = 0;
gProtectStructs[gActiveBank].helpingHand = 0;
gProtectStructs[gActiveBank].bounceMove = 0;
gProtectStructs[gActiveBank].stealMove = 0;
gProtectStructs[gActiveBank].flag0Unknown = 0;
gProtectStructs[gActiveBank].prlzImmobility = 0;
gProtectStructs[gActiveBank].confusionSelfDmg = 0;
gProtectStructs[gActiveBank].notEffective = 0;
gProtectStructs[gActiveBank].chargingTurn = 0;
gProtectStructs[gActiveBank].fleeFlag = 0;
gProtectStructs[gActiveBank].usedImprisionedMove = 0;
gProtectStructs[gActiveBank].loveImmobility = 0;
gProtectStructs[gActiveBank].usedDisabledMove = 0;
gProtectStructs[gActiveBank].usedTauntedMove = 0;
gProtectStructs[gActiveBank].flag2Unknown = 0;
gProtectStructs[gActiveBank].flinchImmobility = 0;
gProtectStructs[gActiveBank].notFirstStrike = 0;
gDisableStructs[gActiveBank].IsFirstTurn = 2;
gDisableStructs[gActiveBank].isFirstTurn= 2;
gLastUsedMove[gActiveBank] = 0;
gMoveHitWith[gActiveBank] = 0;
gUnknown_02024C44[gActiveBank] = 0;
@ -2140,7 +2140,7 @@ void unref_sub_8011A68(void)
{
if (GetBankSide(gActiveBank) == 0)
{
sub_800C704(0, gBattlePartyID[gActiveBank], 0);
EmitSwitchInAnim(0, gBattlePartyID[gActiveBank], 0);
MarkBufferBankForExecution(gActiveBank);
}
}
@ -2191,7 +2191,7 @@ void BattleBeginFirstTurn(void)
return;
while (ewram160F9 < gNoOfAllBanks)
{
if (sub_801A02C(0, gTurnOrder[ewram160F9], 0) != 0)
if (ItemBattleEffects(0, gTurnOrder[ewram160F9], 0) != 0)
r9++;
ewram160F9++;
if (r9 != 0)
@ -2286,8 +2286,8 @@ void BattleTurnPassed(void)
gBattleMainFunc = sub_80138F0;
return;
}
if (gBattleResults.BattleTurnCounter < 0xFF)
gBattleResults.BattleTurnCounter++;
if (gBattleResults.battleTurnCounter < 0xFF)
gBattleResults.battleTurnCounter++;
for (i = 0; i < gNoOfAllBanks; i++)
{
gActionForBanks[i] = 0xFF;

18534
src/battle_4.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -83,7 +83,7 @@ extern void sub_802E220();
extern void sub_802E2D4();
extern void sub_802E004(void);
extern void sub_802DF30(void);
extern void sub_80325B8(void);
extern void BattleMusicStop(void);
extern void PlayerBufferExecCompleted(void);
extern void bx_t1_healthbar_update(void);
extern void nullsub_91(void);
@ -1101,7 +1101,7 @@ void sub_8030594(void)
void sub_8030674(void)
{
sub_80325B8();
BattleMusicStop();
BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, 0);
PlayerBufferExecCompleted();
}

View File

@ -808,7 +808,7 @@ void sub_80324F8(struct Pokemon *pkmn, u8 b)
}
}
void sub_80325B8(void)
void BattleMusicStop(void)
{
u8 r4 = GetBankByPlayerAI(0);

View File

@ -896,7 +896,7 @@ static void BattleAICmd_if_user_cant_damage(void)
static void BattleAICmd_get_turn_count(void)
{
AI_THINKING_STRUCT->funcResult = gBattleResults.BattleTurnCounter;
AI_THINKING_STRUCT->funcResult = gBattleResults.battleTurnCounter;
gAIScriptPtr += 1;
}
@ -1412,8 +1412,8 @@ static void BattleAICmd_get_highest_possible_damage(void)
s32 i;
gDynamicBasePower = 0;
BATTLE_STRUCT->DynamicMoveType = 0;
BATTLE_STRUCT->DmgMultiplier = 1;
BATTLE_STRUCT->dynamicMoveType = 0;
BATTLE_STRUCT->dmgMultiplier = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
AI_THINKING_STRUCT->funcResult = 0;
@ -1452,8 +1452,8 @@ static void BattleAICmd_if_damage_bonus(void)
u8 damageVar;
gDynamicBasePower = 0;
BATTLE_STRUCT->DynamicMoveType = 0;
BATTLE_STRUCT->DmgMultiplier = 1;
BATTLE_STRUCT->dynamicMoveType = 0;
BATTLE_STRUCT->dmgMultiplier = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
@ -1659,8 +1659,8 @@ static void BattleAICmd_if_can_faint(void)
}
gDynamicBasePower = 0;
BATTLE_STRUCT->DynamicMoveType = 0;
BATTLE_STRUCT->DmgMultiplier = 1;
BATTLE_STRUCT->dynamicMoveType = 0;
BATTLE_STRUCT->dmgMultiplier = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
gCurrentMove = AI_THINKING_STRUCT->moveConsidered;
@ -1688,8 +1688,8 @@ static void BattleAICmd_if_cant_faint(void)
}
gDynamicBasePower = 0;
BATTLE_STRUCT->DynamicMoveType = 0;
BATTLE_STRUCT->DmgMultiplier = 1;
BATTLE_STRUCT->dynamicMoveType = 0;
BATTLE_STRUCT->dmgMultiplier = 1;
gBattleMoveFlags = 0;
gCritMultiplier = 1;
gCurrentMove = AI_THINKING_STRUCT->moveConsidered;
@ -1843,7 +1843,7 @@ static void BattleAICmd_if_last_move_did_damage(void)
if (gAIScriptPtr[2] == 0)
{
if (gDisableStructs[index].DisabledMove == 0)
if (gDisableStructs[index].disabledMove == 0)
{
gAIScriptPtr += 7;
return;
@ -1856,7 +1856,7 @@ static void BattleAICmd_if_last_move_did_damage(void)
gAIScriptPtr += 7;
return;
}
else if (gDisableStructs[index].EncoredMove != 0)
else if (gDisableStructs[index].encoredMove != 0)
{
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
return;
@ -1869,7 +1869,7 @@ static void BattleAICmd_if_encored(void)
switch (gAIScriptPtr[1])
{
case 0: // _08109348
if (gDisableStructs[gActiveBank].DisabledMove == AI_THINKING_STRUCT->moveConsidered)
if (gDisableStructs[gActiveBank].disabledMove == AI_THINKING_STRUCT->moveConsidered)
{
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
return;
@ -1877,7 +1877,7 @@ static void BattleAICmd_if_encored(void)
gAIScriptPtr += 6;
return;
case 1: // _08109370
if (gDisableStructs[gActiveBank].EncoredMove == AI_THINKING_STRUCT->moveConsidered)
if (gDisableStructs[gActiveBank].encoredMove == AI_THINKING_STRUCT->moveConsidered)
{
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
return;
@ -1954,7 +1954,7 @@ static void BattleAICmd_is_first_turn(void)
else
index = gBankTarget;
AI_THINKING_STRUCT->funcResult = gDisableStructs[index].IsFirstTurn;
AI_THINKING_STRUCT->funcResult = gDisableStructs[index].isFirstTurn;
gAIScriptPtr += 2;
}
@ -1968,7 +1968,7 @@ static void BattleAICmd_get_stockpile_count(void)
else
index = gBankTarget;
AI_THINKING_STRUCT->funcResult = gDisableStructs[index].StockpileCounter;
AI_THINKING_STRUCT->funcResult = gDisableStructs[index].stockpileCounter;
gAIScriptPtr += 2;
}
@ -2025,7 +2025,7 @@ static void BattleAICmd_get_protect_count(void)
else
index = gBankTarget;
AI_THINKING_STRUCT->funcResult = gDisableStructs[index].ProtectUses;
AI_THINKING_STRUCT->funcResult = gDisableStructs[index].protectUses;
gAIScriptPtr += 2;
}
@ -2104,7 +2104,7 @@ static void BattleAICmd_if_level_compare(void)
static void BattleAICmd_if_taunted(void)
{
if (gDisableStructs[gBankTarget].taunt != 0)
if (gDisableStructs[gBankTarget].tauntTimer1 != 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1);
else
gAIScriptPtr += 5;
@ -2112,7 +2112,7 @@ static void BattleAICmd_if_taunted(void)
static void BattleAICmd_if_not_taunted(void)
{
if (gDisableStructs[gBankTarget].taunt == 0)
if (gDisableStructs[gBankTarget].tauntTimer1 == 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1);
else
gAIScriptPtr += 5;

View File

@ -582,7 +582,7 @@ void dp01_build_cmdbuf_x01_a_b_0(u8 a, u8 b, u8 c)
dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void EmitSetAttributes(u8 a, u8 b, u8 c, u8 d, u8 *e)
void EmitSetAttributes(u8 a, u8 b, u8 c, u8 d, void *e)
{
int i;
@ -590,7 +590,7 @@ void EmitSetAttributes(u8 a, u8 b, u8 c, u8 d, u8 *e)
gBattleBuffersTransferData[1] = b;
gBattleBuffersTransferData[2] = c;
for (i = 0; i < d; i++)
gBattleBuffersTransferData[3 + i] = *(e++);
gBattleBuffersTransferData[3 + i] = *(u8*)(e++);
dp01_prepare_buffer(a, gBattleBuffersTransferData, d + 3);
}
@ -615,7 +615,7 @@ void dp01_build_cmdbuf_x04_4_4_4(u8 a)
dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void sub_800C704(u8 a, u8 b, u8 c)
void EmitSwitchInAnim(u8 a, u8 b, u8 c)
{
gBattleBuffersTransferData[0] = 5;
gBattleBuffersTransferData[1] = b;
@ -624,7 +624,7 @@ void sub_800C704(u8 a, u8 b, u8 c)
dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x06_a(u8 a, u8 b)
void EmitReturnPokeToBall(u8 a, u8 b)
{
gBattleBuffersTransferData[0] = 6;
gBattleBuffersTransferData[1] = b;
@ -640,7 +640,7 @@ void dp01_build_cmdbuf_x07_7_7_7(u8 a)
dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x08_8_8_8(u8 a)
void EmitTrainerSlide(u8 a)
{
gBattleBuffersTransferData[0] = 8;
gBattleBuffersTransferData[1] = 8;
@ -685,7 +685,7 @@ void dp01_build_cmdbuf_x0C_C_C_C(u8 a)
dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x0D_a(u8 a, u8 b)
void EmitBallThrowAnim(u8 a, u8 b)
{
gBattleBuffersTransferData[0] = 13;
gBattleBuffersTransferData[1] = b;
@ -1060,7 +1060,7 @@ void sub_800CBE0(u8 a, u8 *b)
dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f(u8 a, u8 b, u8 c, u8 d, u8 *e)
void EmitChoosePokemon(u8 a, u8 b, u8 c, u8 d, u8 *e)
{
int i;
@ -1284,7 +1284,7 @@ void EmitEffectivenessSound(u8 a, u16 b)
dp01_prepare_buffer(a, gBattleBuffersTransferData, 4);
}
void sub_800D074(u8 a, u16 b)
void EmitPlaySound(u8 a, u16 b)
{
gBattleBuffersTransferData[0] = 44;
gBattleBuffersTransferData[1] = b;

View File

@ -316,14 +316,14 @@ void GabbyAndTyBeforeInterview(void)
{
u8 i;
gSaveBlock1.gabbyAndTyData.mon1 = gBattleResults.Poke1Species;
gSaveBlock1.gabbyAndTyData.mon2 = gBattleResults.OpponentSpecies;
gSaveBlock1.gabbyAndTyData.lastMove = gBattleResults.LastUsedMove;
gSaveBlock1.gabbyAndTyData.mon1 = gBattleResults.poke1Species;
gSaveBlock1.gabbyAndTyData.mon2 = gBattleResults.opponentSpecies;
gSaveBlock1.gabbyAndTyData.lastMove = gBattleResults.lastUsedMove;
if (gSaveBlock1.gabbyAndTyData.battleNum != 0xff)
gSaveBlock1.gabbyAndTyData.battleNum ++;
gSaveBlock1.gabbyAndTyData.valA_0 = gBattleResults.unk5_0;
if (gBattleResults.PlayerFaintCounter)
if (gBattleResults.playerFaintCounter)
gSaveBlock1.gabbyAndTyData.valA_1 = 1;
else
gSaveBlock1.gabbyAndTyData.valA_1 = 0;
@ -489,14 +489,14 @@ void sub_80BDEC8(void)
sub_80BEB20();
sub_80BE778();
if (gBattleResults.CaughtPoke == 0)
if (gBattleResults.caughtPoke == 0)
{
sub_80BE074();
}
else
{
sub_80BE028();
if (sub_80BF77C(0xffff) == 0 && StringCompareWithoutExtCtrlCodes(gSpeciesNames[gBattleResults.CaughtPoke], gBattleResults.CaughtNick) != 0)
if (sub_80BF77C(0xffff) == 0 && StringCompareWithoutExtCtrlCodes(gSpeciesNames[gBattleResults.caughtPoke], gBattleResults.caughtNick) != 0)
{
gUnknown_03005D38.var0 = sub_80BF74C(gSaveBlock1.tvShows);
if (gUnknown_03005D38.var0 != -1 && sub_80BF1B4(TVSHOW_POKEMON_TODAY_CAUGHT) != 1)
@ -527,8 +527,8 @@ void sub_80BDEC8(void)
pokemonToday->var12 = total;
pokemonToday->ball = item;
StringCopy(pokemonToday->playerName, gSaveBlock2.playerName);
StringCopy(pokemonToday->nickname, gBattleResults.CaughtNick);
pokemonToday->species = gBattleResults.CaughtPoke;
StringCopy(pokemonToday->nickname, gBattleResults.caughtNick);
pokemonToday->species = gBattleResults.caughtPoke;
sub_80BE138((TVShow *)pokemonToday);
pokemonToday->language = GAME_LANGUAGE;
pokemonToday->language2 = sub_80BDEAC(pokemonToday->nickname);
@ -550,8 +550,8 @@ void sub_80BE028(void)
worldOfMasters->var00 = TVSHOW_WORLD_OF_MASTERS;
}
worldOfMasters->var02++;
worldOfMasters->var04 = gBattleResults.CaughtPoke;
worldOfMasters->var08 = gBattleResults.Poke1Species;
worldOfMasters->var04 = gBattleResults.caughtPoke;
worldOfMasters->var08 = gBattleResults.poke1Species;
worldOfMasters->var0a = gMapHeader.regionMapSectionId;
}
@ -577,8 +577,8 @@ void sub_80BE074(void)
zero = 0;
pokemonTodayFailed->var00 = TVSHOW_POKEMON_TODAY_FAILED;
pokemonTodayFailed->var01 = zero;
pokemonTodayFailed->species = gBattleResults.Poke1Species;
pokemonTodayFailed->species2 = gBattleResults.LastOpponentSpecies;
pokemonTodayFailed->species = gBattleResults.poke1Species;
pokemonTodayFailed->species2 = gBattleResults.lastOpponentSpecies;
pokemonTodayFailed->var10 = total;
pokemonTodayFailed->var11 = gBattleOutcome;
pokemonTodayFailed->var12 = gMapHeader.regionMapSectionId;

View File

@ -113,7 +113,7 @@ gCurrentMove: @ 2024BE6
gUnknown_02024BE8: @ 2024BE8
.space 0x2
gUnknown_02024BEA: @ 2024BEA
gRandomMove: @ 2024BEA
.space 0x2
gBattleMoveDamage: @ 2024BEC