sovereignx/data/maps/IslandCave/scripts.inc

123 lines
3.6 KiB
PHP
Raw Normal View History

2017-11-10 01:21:31 +00:00
IslandCave_MapScripts:: @ 8238E2A
2019-02-22 07:28:32 +00:00
map_script MAP_SCRIPT_ON_RESUME, IslandCave_MapScript1_238E3A
map_script MAP_SCRIPT_ON_LOAD, IslandCave_MapScript1_238E58
2019-04-05 00:28:37 +01:00
map_script MAP_SCRIPT_ON_TRANSITION, IslandCave_OnTransition
2017-11-10 01:21:31 +00:00
.byte 0
IslandCave_MapScript1_238E3A: @ 8238E3A
2018-12-22 02:32:45 +00:00
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, IslandCave_EventScript_238E44
2017-11-10 01:21:31 +00:00
end
IslandCave_EventScript_238E44:: @ 8238E44
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_CAUGHT
2019-02-23 01:21:26 +00:00
goto_if_ne Common_EventScript_NopReturn
2017-11-10 01:21:31 +00:00
removeobject VAR_LAST_TALKED
return
IslandCave_MapScript1_238E58: @ 8238E58
2019-02-18 19:17:02 +00:00
call_if_unset FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_238E62
2017-11-10 01:21:31 +00:00
end
IslandCave_EventScript_238E62:: @ 8238E62
setmetatile 7, 19, METATILE_Cave_EntranceCover, 1
setmetatile 8, 19, METATILE_Cave_EntranceCover, 1
setmetatile 9, 19, METATILE_Cave_EntranceCover, 1
setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1
setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1
setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1
2017-11-10 01:21:31 +00:00
return
2019-04-05 00:28:37 +01:00
IslandCave_OnTransition: @ 8238E99
2017-12-27 03:20:29 +00:00
setflag FLAG_LANDMARK_ISLAND_CAVE
2017-11-10 01:21:31 +00:00
call IslandCave_EventScript_238F45
2019-01-02 21:12:43 +00:00
call_if_unset FLAG_DEFEATED_REGICE, IslandCave_EventScript_238EAB
2017-11-10 01:21:31 +00:00
end
IslandCave_EventScript_238EAB:: @ 8238EAB
clearflag FLAG_HIDE_REGICE
2017-11-10 01:21:31 +00:00
return
2017-11-10 08:24:21 +00:00
IslandCave_EventScript_238EAF:: @ 8238EAF
setmetatile 7, 19, METATILE_Cave_SealedChamberEntrance_TopLeft, 1
setmetatile 8, 19, METATILE_Cave_SealedChamberEntrance_TopMid, 1
setmetatile 9, 19, METATILE_Cave_SealedChamberEntrance_TopRight, 1
setmetatile 7, 20, METATILE_Cave_SealedChamberEntrance_BottomLeft, 1
setmetatile 8, 20, METATILE_Cave_SealedChamberEntrance_BottomMid, 0
setmetatile 9, 20, METATILE_Cave_SealedChamberEntrance_BottomRight, 1
2017-11-10 08:24:21 +00:00
special DrawWholeMapView
playse SE_BAN
2019-02-18 19:17:02 +00:00
setflag FLAG_SYS_BRAILLE_REGICE_COMPLETED
2017-11-10 08:24:21 +00:00
end
IslandCave_EventScript_238EEF:: @ 8238EEF
lockall
2018-12-22 02:32:45 +00:00
call_if_set FLAG_TEMP_3, IslandCave_EventScript_238F45
2019-02-18 19:17:02 +00:00
goto_if_set FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_238F13
braillemessage IslandCave_Braille_2A6CD4
2018-10-17 17:25:12 +01:00
setflag FLAG_TEMP_2
special ShouldDoBrailleRegicePuzzle
goto IslandCave_EventScript_238F41
end
IslandCave_EventScript_238F13:: @ 8238F13
2019-08-15 04:38:42 +01:00
msgbox gText_BigHoleInTheWall, MSGBOX_DEFAULT
releaseall
end
IslandCave_EventScript_238F1D:: @ 8238F1D
lockall
2018-12-22 02:32:45 +00:00
call_if_set FLAG_TEMP_3, IslandCave_EventScript_238F45
braillemessage IslandCave_Braille_2A6CD4
2019-02-18 19:17:02 +00:00
goto_if_set FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_238F41
2018-10-17 17:25:12 +01:00
setflag FLAG_TEMP_2
special ShouldDoBrailleRegicePuzzle
goto IslandCave_EventScript_238F41
end
IslandCave_EventScript_238F41:: @ 8238F41
waitbuttonpress
hidebox2
releaseall
end
IslandCave_EventScript_238F45:: @ 8238F45
setvar VAR_REGICE_STEPS_1, 0
setvar VAR_REGICE_STEPS_2, 0
setvar VAR_REGICE_STEPS_3, 0
2018-10-17 17:25:12 +01:00
clearflag FLAG_TEMP_3
return
IslandCave_EventScript_238F58:: @ 8238F58
lock
faceplayer
waitse
playmoncry SPECIES_REGICE, 2
delay 40
waitmoncry
setwildbattle SPECIES_REGICE, 40, ITEM_NONE
setflag FLAG_SYS_CTRL_OBJ_DELETE
2017-11-28 22:02:09 +00:00
special StartRegiBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
2018-12-22 01:28:24 +00:00
goto_if_eq IslandCave_EventScript_238F9F
compare VAR_RESULT, B_OUTCOME_RAN
2018-12-22 01:28:24 +00:00
goto_if_eq IslandCave_EventScript_238FA8
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
2018-12-22 01:28:24 +00:00
goto_if_eq IslandCave_EventScript_238FA8
2019-01-02 21:12:43 +00:00
setflag FLAG_DEFEATED_REGICE
release
end
IslandCave_EventScript_238F9F:: @ 8238F9F
2019-01-02 21:12:43 +00:00
setflag FLAG_DEFEATED_REGICE
2019-08-15 04:38:42 +01:00
goto Common_EventScript_RemoveStaticPokemon
end
IslandCave_EventScript_238FA8:: @ 8238FA8
2019-08-15 04:38:42 +01:00
setvar VAR_0x8004, SPECIES_REGICE
goto Common_EventScript_LegendaryFlewAway
end