Skip to content

Commit

Permalink
Dump battle_scripts_2.s
Browse files Browse the repository at this point in the history
  • Loading branch information
PikalaxALT committed Nov 6, 2019
1 parent cbdfbed commit f3be95d
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 23 deletions.
Binary file modified baserom.ips
Binary file not shown.
2 changes: 1 addition & 1 deletion constants/battle.inc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
.equiv B_ANIM_STATS_CHANGE, 0x1
.equiv B_ANIM_SUBSTITUTE_FADE, 0x2
.equiv B_ANIM_SUBSTITUTE_APPEAR, 0x3
.equiv B_ANIM_POKEBLOCK_THROW, 0x4
.equiv B_ANIM_BAIT_THROW, 0x4
.equiv B_ANIM_ITEM_KNOCKOFF, 0x5
.equiv B_ANIM_TURN_TRAP, 0x6
.equiv B_ANIM_ITEM_EFFECT, 0x7
Expand Down
4 changes: 2 additions & 2 deletions data/battle_message.s
Original file line number Diff line number Diff line change
Expand Up @@ -2388,8 +2388,8 @@ gInobedientStringIds::

gSafariPokeblockResultStringIds::
.2byte STRINGID_PKMNWATCHINGCAREFULLY
.2byte STRINGID_PKMNCURIOUSABOUTX
.2byte STRINGID_PKMNENTHRALLEDBYX
.2byte STRINGID_PKMNANGRY
.2byte STRINGID_PKMNEATING

gTrainerItemCuredStatusStringIds::
.2byte STRINGID_PKMNSITEMSNAPPEDOUT
Expand Down
237 changes: 224 additions & 13 deletions data/battle_scripts_2.s
Original file line number Diff line number Diff line change
@@ -1,28 +1,239 @@
#include "constants/moves.h"
#include "constants/battle.h"
#include "constants/battle_move_effects.h"
#include "constants/battle_script_commands.h"
#include "constants/battle_anim.h"
#include "constants/items.h"
#include "constants/abilities.h"
#include "constants/species.h"
#include "constants/pokemon.h"
#include "constants/songs.h"
#include "constants/game_stat.h"
#include "battle_string_ids.h"
.include "asm/macros/battle_script.inc"
@ Define these here since misc_constants.inc conflicts with the C headers
.set NULL, 0
.set FALSE, 0
.set TRUE, 1
.section script_data, "aw", %progbits
.align 2

gBattlescriptsForBallThrow:: @ 81D99B0
.incbin "baserom.gba", 0x1D99B0, 0x34

gBattlescriptsForUsingItem:: @ 81D99E4
.incbin "baserom.gba", 0x1D99E4, 0x18
gBattlescriptsForBallThrow:: @ 81D99B4
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A3C
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A14
.4byte BattleScript_81D9A14

gBattlescriptsForRunningByItem:: @ 81D99FC
.incbin "baserom.gba", 0x1D99FC, 0x8
gBattlescriptsForUsingItem:: @ 81D99E8
.4byte BattleScript_81D9ADB
.4byte BattleScript_81D9AE5
.4byte BattleScript_81D9AE5
.4byte BattleScript_81D9B14
.4byte BattleScript_81D9B38
.4byte BattleScript_81D9B5A

gBattlescriptsForSafariActions:: @ 81D9A04
.incbin "baserom.gba", 0x1D9A04, 0x3E
gBattlescriptsForRunningByItem:: @ 81D9A00
.4byte BattleScript_81D9B7C
.4byte BattleScript_81D9B86

gBattlescriptsForSafariActions:: @ 81D9A08
.4byte BattleScript_81D9BB5
.4byte BattleScript_81D9BC5
.4byte BattleScript_81D9BD3
.4byte BattleScript_81D9BE1

BattleScript_81D9A14:: @ 81D9A14
jumpifword CMP_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_OLD_MAN_TUTORIAL, BattleScript_81D9A34
jumpifword CMP_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_POKEDUDE, BattleScript_81D9A38
printstring STRINGID_PLAYERUSEDITEM
handleballthrow

BattleScript_81D9A34:: @ 81D9A34
printstring STRINGID_WALLYUSEDITEM
handleballthrow

BattleScript_81D9A38:: @ 81D9A38
printstring STRINGID_POKEDUDEUSED
handleballthrow

BattleScript_81D9A3C:: @ 81D9A3C
printstring STRINGID_PLAYERUSEDITEM
updatestatusicon BS_ATTACKER
handleballthrow

BattleScript_SuccessBallThrow:: @ 81D9A42
.incbin "baserom.gba", 0x1D9A42, 0x46
jumpifhalfword CMP_EQUAL, gLastUsedItem, ITEM_SAFARI_BALL, BattleScript_81D9A50
incrementgamestat GAME_STAT_POKEMON_CAPTURES
BattleScript_81D9A50:: @ 81D9A50
printstring STRINGID_GOTCHAPKMNCAUGHT
trysetcaughtmondexflags BattleScript_81D9A63
printstring STRINGID_PKMNDATAADDEDTODEX
waitstate
setbyte gBattleCommunication, 0
displaydexinfo
BattleScript_81D9A63:: @ 81D9A63
printstring STRINGID_GIVENICKNAMECAPTURED
waitstate
setbyte gBattleCommunication, 0
trygivecaughtmonnick BattleScript_81D9A80
givecaughtmon
printfromtable gCaughtMonStringIds
waitmessage 64
goto BattleScript_81D9A81

BattleScript_81D9A80:: @ 81D9A80
givecaughtmon
BattleScript_81D9A81:: @ 81D9A81
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn

gUnknown_81D9A88:: @ 81D9A88
.incbin "baserom.gba", 0x1D9A88, 0xB
printstring STRINGID_GOTCHAPKMNCAUGHT2
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
atk57
finishturn

BattleScript_ShakeBallThrow:: @ 81D9A93
.incbin "baserom.gba", 0x1D9A93, 0x2E
printfromtable gBallEscapeStringIds
waitmessage 64
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_81D9AC0
jumpifbyte CMP_NOT_EQUAL, gNumSafariBalls, 0, BattleScript_81D9AC0
printstring STRINGID_OUTOFSAFARIBALLS
waitmessage 64
setbyte gBattleOutcome, B_OUTCOME_NO_SAFARI_BALLS
BattleScript_81D9AC0:: @ 81D9AC0
finishaction

BattleScript_TrainerBallBlock:: @ 81D9AC1
.incbin "baserom.gba", 0x1D9AC1, 0x10
waitmessage 64
printstring STRINGID_TRAINERBLOCKEDBALL
waitmessage 64
printstring STRINGID_DONTBEATHIEF
waitmessage 64
finishaction

BattleScript_GhostBallDodge:: @ 81D9AD1
.incbin "baserom.gba", 0x1D9AD1, 0x123
waitmessage 64
printstring STRINGID_ITDODGEDBALL
waitmessage 64
finishaction

BattleScript_81D9ADB:: @ 81D9ADB
moveendcase 15
end

BattleScript_81D9AE5:: @ 81D9AE5
printstring STRINGID_EMPTYSTRING3
pause 48
playse SE_KAIFUKU
printstring STRINGID_TRAINER1USEDITEM
waitmessage 64
useitemonopponent
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
waitmessage 64
updatestatusicon BS_ATTACKER
moveendcase 15
finishaction

BattleScript_81D9B14:: @ 81D9B14
printstring STRINGID_EMPTYSTRING3
pause 48
playse SE_KAIFUKU
printstring STRINGID_TRAINER1USEDITEM
waitmessage 64
useitemonopponent
printfromtable gTrainerItemCuredStatusStringIds
waitmessage 64
updatestatusicon BS_ATTACKER
moveendcase 15
finishaction

BattleScript_81D9B38:: @ 81D9B38
printstring STRINGID_EMPTYSTRING3
pause 48
playse SE_KAIFUKU
printstring STRINGID_TRAINER1USEDITEM
waitmessage 64
useitemonopponent
printfromtable gStatUpStringIds
waitmessage 64
moveendcase 15
finishaction

BattleScript_81D9B5A:: @ 81D9B5A
printstring STRINGID_EMPTYSTRING3
pause 48
playse SE_KAIFUKU
printstring STRINGID_TRAINER1USEDITEM
waitmessage 64
useitemonopponent
printfromtable gMistUsedStringIds
waitmessage 64
moveendcase 15
finishaction

BattleScript_81D9B7C:: @ 81D9B7C
playse SE_NIGERU
setbyte gBattleOutcome, B_OUTCOME_RAN
finishturn

BattleScript_81D9B86:: @ 81D9B86
various11 BS_ATTACKER
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 1, BattleScript_81D9B9F
printstring STRINGID_POKEFLUTECATCHY
waitmessage 64
goto BattleScript_81D9BB4

BattleScript_81D9B9F:: @ 81D9B9F
printstring STRINGID_POKEFLUTE
waitmessage 64
fanfare MUS_POKEFUE
waitfanfare BS_ATTACKER
printstring STRINGID_MONHEARINGFLUTEAWOKE
waitmessage 64
updatestatusicon BS_PLAYER2
waitstate
BattleScript_81D9BB4:: @ 81D9BB4
finishaction

BattleScript_81D9BB5:: @ 81D9BB5
printfromtable gSafariPokeblockResultStringIds
waitmessage 64
playanimation BS_OPPONENT1, B_ANIM_SAFARI_REACTION, NULL
end2

BattleScript_81D9BC5:: @ 81D9BC5
printstring STRINGID_THREWROCK
waitmessage 64
playanimation BS_ATTACKER, B_ANIM_ROCK_THROW, NULL
end2

BattleScript_81D9BD3:: @ 81D9BD3
printstring STRINGID_THREWBAIT
waitmessage 64
playanimation BS_ATTACKER, B_ANIM_BAIT_THROW, NULL
end2

BattleScript_81D9BE1:: @ 81D9BE1
printstring STRINGID_RETURNMON
waitmessage 64
returnatktoball
waitstate
trainerslidein BS_TARGET
waitstate
printstring STRINGID_YOUTHROWABALLNOWRIGHT
waitmessage 64
end2
12 changes: 6 additions & 6 deletions include/battle_string_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,13 @@
#define STRINGID_PKMNTURNEDAWAY 280
#define STRINGID_PKMNPRETENDNOTNOTICE 281
#define STRINGID_ENEMYABOUTTOSWITCHPKMN 282
#define STRINGID_CREPTCLOSER 283
#define STRINGID_CANTGETCLOSER 284
#define STRINGID_THREWROCK 283
#define STRINGID_THREWBAIT 284
#define STRINGID_PKMNWATCHINGCAREFULLY 285
#define STRINGID_PKMNCURIOUSABOUTX 286
#define STRINGID_PKMNENTHRALLEDBYX 287
#define STRINGID_PKMNIGNOREDX 288
#define STRINGID_THREWPOKEBLOCKATPKMN 289
#define STRINGID_PKMNANGRY 286
#define STRINGID_PKMNEATING 287
#define STRINGID_DUMMY288 288
#define STRINGID_DUMMY289 289
#define STRINGID_OUTOFSAFARIBALLS 290
#define STRINGID_PKMNSITEMCUREDPARALYSIS 291
#define STRINGID_PKMNSITEMCUREDPOISON 292
Expand Down
4 changes: 3 additions & 1 deletion include/constants/battle_anim.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
#define B_ANIM_STATS_CHANGE 0x1
#define B_ANIM_SUBSTITUTE_FADE 0x2
#define B_ANIM_SUBSTITUTE_APPEAR 0x3
#define B_ANIM_POKEBLOCK_THROW 0x4
#define B_ANIM_BAIT_THROW 0x4
#define B_ANIM_ITEM_KNOCKOFF 0x5
#define B_ANIM_TURN_TRAP 0x6
#define B_ANIM_ITEM_EFFECT 0x7
Expand All @@ -373,6 +373,8 @@
#define B_ANIM_MON_SCARED 0x17
#define B_ANIM_GHOST_GET_OUT 0x18
#define B_ANIM_SILPH_SCOPED 0x19
#define B_ANIM_ROCK_THROW 0x1A
#define B_ANIM_SAFARI_REACTION 0x1B

// special animations table
#define B_ANIM_LVL_UP 0x0
Expand Down

0 comments on commit f3be95d

Please sign in to comment.