pokeemerald/data/maps/BirthIsland_Exterior/scripts.inc

121 lines
3.5 KiB
PHP
Raw Normal View History

2017-11-10 02:21:31 +01:00
BirthIsland_Exterior_MapScripts:: @ 8267F15
map_script MAP_SCRIPT_ON_TRANSITION, BirthIsland_Exterior_OnTransition
2019-10-31 22:00:37 +01:00
map_script MAP_SCRIPT_ON_RESUME, BirthIsland_Exterior_OnResume
map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, BirthIsland_Exterior_OnReturnToField
2017-11-10 02:21:31 +01:00
.byte 0
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_OnReturnToField: @ 8267F25
special SetDeoxysRockPalette
2017-11-10 02:21:31 +01:00
end
BirthIsland_Exterior_OnTransition: @ 8267F29
2019-01-02 22:12:43 +01:00
setflag FLAG_MAP_SCRIPT_CHECKED_DEOXYS
2018-12-25 02:12:51 +01:00
setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL
2018-12-28 20:10:02 +01:00
setvar VAR_DEOXYS_ROCK_STEP_COUNT, 0
setvar VAR_DEOXYS_ROCK_LEVEL, 0
2019-10-31 22:00:37 +01:00
call_if_set FLAG_BATTLED_DEOXYS, BirthIsland_Exterior_EventScript_HideDeoxysAndPuzzle
call_if_unset FLAG_BATTLED_DEOXYS, BirthIsland_Exterior_EventScript_TryShowDeoxysPuzzle
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_EventScript_HideDeoxysAndPuzzle:: @ 8267F4E
setflag FLAG_HIDE_DEOXYS
setflag FLAG_HIDE_BIRTH_ISLAND_DEOXYS_TRIANGLE
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_EventScript_TryShowDeoxysPuzzle:: @ 8267F55
2019-02-23 02:21:26 +01:00
goto_if_set FLAG_DEFEATED_DEOXYS, Common_EventScript_NopReturn
clearflag FLAG_HIDE_BIRTH_ISLAND_DEOXYS_TRIANGLE
2018-12-28 20:10:02 +01:00
clearflag FLAG_DEOXYS_ROCK_COMPLETE
2017-11-10 02:21:31 +01:00
return
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_OnResume: @ 8267F65
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, BirthIsland_Exterior_EventScript_TryRemoveDeoxys
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_EventScript_TryRemoveDeoxys:: @ 8267F6F
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_CAUGHT
2019-02-23 02:21:26 +01:00
goto_if_ne Common_EventScript_NopReturn
2017-11-10 02:21:31 +01:00
removeobject 2
return
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_EventScript_Triangle:: @ 8267F83
2017-11-10 02:21:31 +01:00
lock
faceplayer
2018-12-28 20:10:02 +01:00
special DoDeoxysRockInteraction
2017-11-10 02:21:31 +01:00
waitstate
switch VAR_RESULT
2019-10-31 22:00:37 +01:00
case 0, BirthIsland_Exterior_EventScript_NotSolved1
case 1, BirthIsland_Exterior_EventScript_NotSolved2
case 2, BirthIsland_Exterior_EventScript_Deoxys
case 3, BirthIsland_Exterior_EventScript_NotSolved3
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_EventScript_NotSolved1:: @ 8267FBB
2017-11-10 02:21:31 +01:00
release
end
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_EventScript_NotSolved2:: @ 8267FBD
2017-11-10 02:21:31 +01:00
release
end
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_EventScript_NotSolved3:: @ 8267FBF
2017-11-10 02:21:31 +01:00
release
end
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_EventScript_Deoxys:: @ 8267FC1
2017-11-10 02:21:31 +01:00
waitse
setfieldeffectargument 0, 1
setfieldeffectargument 1, 58
setfieldeffectargument 2, 26
dofieldeffect FLDEFF_65
2017-12-22 08:46:19 +01:00
playbgm MUS_RG_DEOEYE, 0
waitfieldeffect FLDEFF_65
2017-11-10 02:21:31 +01:00
addobject 2
2019-10-31 22:00:37 +01:00
applymovement 2, BirthIsland_Exterior_Movement_DeoxysApproach
2017-11-10 02:21:31 +01:00
waitmovement 0
waitse
playmoncry SPECIES_DEOXYS, 2
delay 40
waitmoncry
setvar VAR_LAST_TALKED, 2
2019-08-15 05:38:42 +02:00
setvar VAR_0x8004, SPECIES_DEOXYS
2019-10-31 22:00:37 +01:00
setvar VAR_0x8005, 30 @ level
2019-08-15 05:38:42 +02:00
setvar VAR_0x8006, ITEM_NONE
2018-02-09 15:55:12 +01:00
special CreateObedientEnemyMon
2017-11-10 02:21:31 +01:00
setflag FLAG_SYS_CTRL_OBJ_DELETE
2017-11-28 23:02:09 +01:00
special BattleSetup_StartLegendaryBattle
2017-11-10 02:21:31 +01:00
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
2019-10-31 22:00:37 +01:00
goto_if_eq BirthIsland_Exterior_EventScript_DefeatedDeoxys
compare VAR_RESULT, B_OUTCOME_RAN
2019-10-31 22:00:37 +01:00
goto_if_eq BirthIsland_Exterior_EventScript_RanFromDeoxys
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
2019-10-31 22:00:37 +01:00
goto_if_eq BirthIsland_Exterior_EventScript_RanFromDeoxys
2019-01-02 22:12:43 +01:00
setflag FLAG_BATTLED_DEOXYS
2017-11-10 02:21:31 +01:00
release
end
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_EventScript_DefeatedDeoxys:: @ 826803B
2019-01-02 22:12:43 +01:00
setflag FLAG_DEFEATED_DEOXYS
2019-08-15 05:38:42 +02:00
setvar VAR_0x8004, SPECIES_DEOXYS
goto Common_EventScript_LegendaryFlewAway
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_EventScript_RanFromDeoxys:: @ 8268049
2019-08-15 05:38:42 +02:00
setvar VAR_0x8004, SPECIES_DEOXYS
goto Common_EventScript_LegendaryFlewAway
2017-11-10 02:21:31 +01:00
end
2019-10-31 22:00:37 +01:00
BirthIsland_Exterior_Movement_DeoxysApproach: @ 8268054
walk_slow_down
walk_slow_down
walk_slow_down
walk_slow_down
walk_slow_down
walk_slow_down
walk_slow_down
2017-11-10 02:21:31 +01:00
step_end