2016-11-01 16:29:13 +01:00
|
|
|
.include "asm/macros.inc"
|
2017-11-25 18:42:31 +01:00
|
|
|
.include "asm/macros/battle_script.inc"
|
2016-11-01 16:29:13 +01:00
|
|
|
.include "constants/constants.inc"
|
2017-11-25 18:42:31 +01:00
|
|
|
.include "constants/battle_constants.inc"
|
|
|
|
.include "constants/battle_script_constants.inc"
|
|
|
|
.include "constants/battle_text.inc"
|
2016-09-03 19:20:06 +02:00
|
|
|
|
|
|
|
.section script_data, "aw", %progbits
|
|
|
|
|
2017-07-29 02:31:43 +02:00
|
|
|
.align 2
|
2017-10-06 00:12:01 +02:00
|
|
|
gBattlescriptsForBallThrow:: @ 82DBD08
|
2017-11-26 01:19:57 +01:00
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_SafariBallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
|
|
|
.4byte BattleScript_BallThrow
|
2016-09-03 19:20:06 +02:00
|
|
|
|
2017-09-25 23:26:45 +02:00
|
|
|
.align 2
|
2016-09-03 19:20:06 +02:00
|
|
|
gUnknown_082DBD3C:: @ 82DBD3C
|
2017-11-25 18:42:31 +01:00
|
|
|
.4byte BattleScript_82DBE12
|
|
|
|
.4byte BattleScript_82DBE1C
|
|
|
|
.4byte BattleScript_82DBE1C
|
|
|
|
.4byte BattleScript_82DBE4B
|
|
|
|
.4byte BattleScript_82DBE6F
|
|
|
|
.4byte BattleScript_82DBE91
|
2016-09-03 19:20:06 +02:00
|
|
|
|
2017-09-25 23:26:45 +02:00
|
|
|
.align 2
|
2017-10-06 00:12:01 +02:00
|
|
|
gBattlescriptsForRunningByItem:: @ 82DBD54
|
|
|
|
.4byte BattleScript_RunByUsingItem
|
2016-09-03 19:20:06 +02:00
|
|
|
|
2017-09-25 23:26:45 +02:00
|
|
|
.align 2
|
2017-10-06 17:06:45 +02:00
|
|
|
gBattlescriptsForSafariActions:: @ 82DBD58
|
2017-11-26 00:33:40 +01:00
|
|
|
.4byte BattleScript_ActionWatchesCarefully
|
|
|
|
.4byte BattleScript_ActionGetNear
|
|
|
|
.4byte BattleScript_ActionThrowPokeblock
|
2017-11-25 18:42:31 +01:00
|
|
|
.4byte BattleScript_82DBEE3
|
|
|
|
|
2017-11-26 01:19:57 +01:00
|
|
|
BattleScript_BallThrow::
|
|
|
|
jumpifword COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_WALLY_TUTORIAL, BattleScript_BallThrowByWally
|
2017-11-25 18:42:31 +01:00
|
|
|
printstring STRINGID_PLAYERUSEDITEM
|
2017-11-26 01:19:57 +01:00
|
|
|
handleballthrow
|
2017-11-25 18:42:31 +01:00
|
|
|
|
2017-11-26 01:19:57 +01:00
|
|
|
BattleScript_BallThrowByWally::
|
2017-11-25 18:42:31 +01:00
|
|
|
printstring STRINGID_WALLYUSEDITEM
|
2017-11-26 01:19:57 +01:00
|
|
|
handleballthrow
|
2017-11-25 18:42:31 +01:00
|
|
|
|
2017-11-26 01:19:57 +01:00
|
|
|
BattleScript_SafariBallThrow::
|
2017-11-25 18:42:31 +01:00
|
|
|
printstring STRINGID_PLAYERUSEDITEM
|
|
|
|
updatestatusicon ATTACKER
|
2017-11-26 01:19:57 +01:00
|
|
|
handleballthrow
|
2017-11-25 18:42:31 +01:00
|
|
|
|
|
|
|
BattleScript_SuccessBallThrow::
|
|
|
|
jumpifhalfword EQUAL, gLastUsedItem, 0x5, BattleScript_82DBD92
|
|
|
|
incrementgamestat 0xB
|
|
|
|
BattleScript_82DBD92::
|
|
|
|
printstring STRINGID_GOTCHAPKMNCAUGHT
|
|
|
|
trysetcaughtmondexflags BattleScript_82DBDA5
|
|
|
|
printstring STRINGID_PKMNDATAADDEDTODEX
|
|
|
|
waitstate
|
|
|
|
setbyte gBattleCommunication, 0x0
|
|
|
|
displaydexinfo
|
|
|
|
BattleScript_82DBDA5::
|
|
|
|
printstring STRINGID_GIVENICKNAMECAPTURED
|
|
|
|
waitstate
|
|
|
|
setbyte gBattleCommunication, 0x0
|
|
|
|
trygivecaughtmonnick BattleScript_82DBDC2
|
|
|
|
givecaughtmon
|
2017-11-26 00:33:40 +01:00
|
|
|
printfromtable gCaughtMonStringIds
|
2017-11-25 18:42:31 +01:00
|
|
|
waitmessage 0x40
|
|
|
|
goto BattleScript_82DBDC3
|
|
|
|
BattleScript_82DBDC2::
|
|
|
|
givecaughtmon
|
|
|
|
BattleScript_82DBDC3::
|
|
|
|
setbyte gBattleOutcome, CAUGHT
|
|
|
|
finishturn
|
|
|
|
|
|
|
|
BattleScript_WallyBallThrow::
|
|
|
|
printstring STRINGID_GOTCHAPKMNCAUGHT2
|
|
|
|
setbyte gBattleOutcome, CAUGHT
|
|
|
|
finishturn
|
|
|
|
|
|
|
|
BattleScript_ShakeBallThrow::
|
2017-11-26 00:33:40 +01:00
|
|
|
printfromtable gBallEscapeStringIds
|
2017-11-25 18:42:31 +01:00
|
|
|
waitmessage 0x40
|
|
|
|
jumpifword NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_82DBE01
|
|
|
|
jumpifbyte NOT_EQUAL, gNumSafariBalls, 0x0, BattleScript_82DBE01
|
|
|
|
printstring STRINGID_OUTOFSAFARIBALLS
|
|
|
|
waitmessage 0x40
|
|
|
|
setbyte gBattleOutcome, OUT_OF_BALLS
|
|
|
|
BattleScript_82DBE01::
|
|
|
|
finishaction
|
|
|
|
|
|
|
|
BattleScript_TrainerBallBlock::
|
|
|
|
waitmessage 0x40
|
|
|
|
printstring STRINGID_TRAINERBLOCKEDBALL
|
|
|
|
waitmessage 0x40
|
|
|
|
printstring STRINGID_DONTBEATHIEF
|
|
|
|
waitmessage 0x40
|
|
|
|
finishaction
|
|
|
|
|
|
|
|
BattleScript_82DBE12::
|
|
|
|
setbyte sMOVEEND_STATE, 0xF
|
|
|
|
moveend 0x1, 0x0
|
|
|
|
end
|
|
|
|
|
|
|
|
BattleScript_82DBE1C::
|
|
|
|
printstring STRINGID_EMPTYSTRING3
|
|
|
|
pause 0x30
|
2017-11-26 01:19:57 +01:00
|
|
|
playse SE_KAIFUKU
|
2017-11-25 18:42:31 +01:00
|
|
|
printstring STRINGID_TRAINER1USEDITEM
|
|
|
|
waitmessage 0x40
|
|
|
|
useitemonopponent
|
|
|
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
|
|
|
healthbarupdate ATTACKER
|
|
|
|
datahpupdate ATTACKER
|
|
|
|
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
|
|
|
waitmessage 0x40
|
|
|
|
updatestatusicon ATTACKER
|
|
|
|
setbyte sMOVEEND_STATE, 0xF
|
|
|
|
moveend 0x1, 0x0
|
|
|
|
finishaction
|
|
|
|
|
|
|
|
BattleScript_82DBE4B::
|
|
|
|
printstring STRINGID_EMPTYSTRING3
|
|
|
|
pause 0x30
|
2017-11-26 01:19:57 +01:00
|
|
|
playse SE_KAIFUKU
|
2017-11-25 18:42:31 +01:00
|
|
|
printstring STRINGID_TRAINER1USEDITEM
|
|
|
|
waitmessage 0x40
|
|
|
|
useitemonopponent
|
2017-11-26 00:33:40 +01:00
|
|
|
printfromtable gTrainerItemCuredStatusStringIds
|
2017-11-25 18:42:31 +01:00
|
|
|
waitmessage 0x40
|
|
|
|
updatestatusicon ATTACKER
|
|
|
|
setbyte sMOVEEND_STATE, 0xF
|
|
|
|
moveend 0x1, 0x0
|
|
|
|
finishaction
|
|
|
|
|
|
|
|
BattleScript_82DBE6F::
|
|
|
|
printstring STRINGID_EMPTYSTRING3
|
|
|
|
pause 0x30
|
2017-11-26 01:19:57 +01:00
|
|
|
playse SE_KAIFUKU
|
2017-11-25 18:42:31 +01:00
|
|
|
printstring STRINGID_TRAINER1USEDITEM
|
|
|
|
waitmessage 0x40
|
|
|
|
useitemonopponent
|
2017-11-26 00:33:40 +01:00
|
|
|
printfromtable gStatUpStringIds
|
2017-11-25 18:42:31 +01:00
|
|
|
waitmessage 0x40
|
|
|
|
setbyte sMOVEEND_STATE, 0xF
|
|
|
|
moveend 0x1, 0x0
|
|
|
|
finishaction
|
|
|
|
|
|
|
|
BattleScript_82DBE91::
|
|
|
|
printstring STRINGID_EMPTYSTRING3
|
|
|
|
pause 0x30
|
2017-11-26 01:19:57 +01:00
|
|
|
playse SE_KAIFUKU
|
2017-11-25 18:42:31 +01:00
|
|
|
printstring STRINGID_TRAINER1USEDITEM
|
|
|
|
waitmessage 0x40
|
|
|
|
useitemonopponent
|
2017-11-26 00:33:40 +01:00
|
|
|
printfromtable gMistUsedStringIds
|
2017-11-25 18:42:31 +01:00
|
|
|
waitmessage 0x40
|
|
|
|
setbyte sMOVEEND_STATE, 0xF
|
|
|
|
moveend 0x1, 0x0
|
|
|
|
finishaction
|
|
|
|
|
|
|
|
BattleScript_RunByUsingItem::
|
2017-11-26 01:19:57 +01:00
|
|
|
playse SE_NIGERU
|
2017-11-25 18:42:31 +01:00
|
|
|
setbyte gBattleOutcome, RAN
|
|
|
|
finishturn
|
|
|
|
|
2017-11-26 00:33:40 +01:00
|
|
|
BattleScript_ActionWatchesCarefully::
|
2017-11-25 18:42:31 +01:00
|
|
|
printstring STRINGID_PKMNWATCHINGCAREFULLY
|
|
|
|
waitmessage 0x40
|
|
|
|
end2
|
|
|
|
|
2017-11-26 00:33:40 +01:00
|
|
|
BattleScript_ActionGetNear::
|
|
|
|
printfromtable gSafariGetNearStringIds
|
2017-11-25 18:42:31 +01:00
|
|
|
waitmessage 0x40
|
|
|
|
end2
|
|
|
|
|
2017-11-26 00:33:40 +01:00
|
|
|
BattleScript_ActionThrowPokeblock::
|
2017-11-25 18:42:31 +01:00
|
|
|
printstring STRINGID_THREWPOKEBLOCKATPKMN
|
|
|
|
waitmessage 0x40
|
|
|
|
playanimation ATTACKER, ANIM_x4, NULL
|
2017-11-26 00:33:40 +01:00
|
|
|
printfromtable gSafariPokeblockResultStringIds
|
2017-11-25 18:42:31 +01:00
|
|
|
waitmessage 0x40
|
|
|
|
end2
|
|
|
|
|
|
|
|
BattleScript_82DBEE3::
|
|
|
|
printstring STRINGID_RETURNMON
|
|
|
|
waitmessage 0x40
|
|
|
|
returnatktoball
|
|
|
|
waitstate
|
|
|
|
trainerslidein TARGET
|
|
|
|
waitstate
|
|
|
|
printstring STRINGID_YOUTHROWABALLNOWRIGHT
|
|
|
|
waitmessage 0x40
|
|
|
|
end2
|