import from github

This commit is contained in:
2022-05-19 17:14:13 +00:00
parent 5247c34f50
commit ab32b30591
12612 changed files with 1905035 additions and 83 deletions

View File

@ -0,0 +1,81 @@
{
"id": "MAP_DESERT_RUINS",
"name": "DesertRuins",
"layout": "LAYOUT_DESERT_RUINS",
"music": "MUS_SEALED_CHAMBER",
"region_map_section": "MAPSEC_DESERT_RUINS",
"requires_flash": false,
"weather": "WEATHER_NONE",
"map_type": "MAP_TYPE_UNDERGROUND",
"allow_cycling": true,
"allow_escaping": true,
"allow_running": true,
"show_map_name": true,
"battle_scene": "MAP_BATTLE_SCENE_NORMAL",
"connections": null,
"object_events": [
{
"graphics_id": "OBJ_EVENT_GFX_REGIROCK",
"x": 8,
"y": 7,
"elevation": 3,
"movement_type": "MOVEMENT_TYPE_FACE_DOWN",
"movement_range_x": 0,
"movement_range_y": 0,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "DesertRuins_EventScript_Regirock",
"flag": "FLAG_HIDE_REGIROCK"
}
],
"warp_events": [
{
"x": 8,
"y": 29,
"elevation": 3,
"dest_map": "MAP_ROUTE111",
"dest_warp_id": 1
},
{
"x": 8,
"y": 20,
"elevation": 0,
"dest_map": "MAP_DESERT_RUINS",
"dest_warp_id": 2
},
{
"x": 8,
"y": 11,
"elevation": 3,
"dest_map": "MAP_DESERT_RUINS",
"dest_warp_id": 1
}
],
"coord_events": [],
"bg_events": [
{
"type": "sign",
"x": 8,
"y": 20,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "DesertRuins_EventScript_CaveEntranceMiddle"
},
{
"type": "sign",
"x": 7,
"y": 20,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "DesertRuins_EventScript_CaveEntranceSide"
},
{
"type": "sign",
"x": 9,
"y": 20,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "DesertRuins_EventScript_CaveEntranceSide"
}
]
}

View File

@ -0,0 +1,86 @@
DesertRuins_MapScripts::
map_script MAP_SCRIPT_ON_RESUME, DesertRuins_OnResume
map_script MAP_SCRIPT_ON_LOAD, DesertRuins_OnLoad
map_script MAP_SCRIPT_ON_TRANSITION, DesertRuins_OnTransition
.byte 0
DesertRuins_OnResume:
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, DesertRuins_EventScript_TryRemoveRegirock
end
DesertRuins_EventScript_TryRemoveRegirock::
specialvar VAR_RESULT, GetBattleOutcome
goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
DesertRuins_OnLoad:
call_if_unset FLAG_SYS_REGIROCK_PUZZLE_COMPLETED, DesertRuins_EventScript_HideRegiEntrance
end
DesertRuins_EventScript_HideRegiEntrance::
setmetatile 7, 19, METATILE_Cave_EntranceCover, TRUE
setmetatile 8, 19, METATILE_Cave_EntranceCover, TRUE
setmetatile 9, 19, METATILE_Cave_EntranceCover, TRUE
setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
return
DesertRuins_OnTransition:
setflag FLAG_LANDMARK_DESERT_RUINS
call_if_unset FLAG_DEFEATED_REGIROCK, DesertRuins_EventScript_ShowRegirock
end
DesertRuins_EventScript_ShowRegirock::
clearflag FLAG_HIDE_REGIROCK
return
DesertRuins_EventScript_CaveEntranceMiddle::
lockall
goto_if_set FLAG_SYS_REGIROCK_PUZZLE_COMPLETED, DesertRuins_EventScript_BigHoleInWall
braillemsgbox DesertRuins_Braille_UseRockSmash
releaseall
end
DesertRuins_EventScript_BigHoleInWall::
msgbox gText_BigHoleInTheWall, MSGBOX_DEFAULT
releaseall
end
DesertRuins_EventScript_CaveEntranceSide::
lockall
braillemsgbox DesertRuins_Braille_UseRockSmash
releaseall
end
DesertRuins_EventScript_Regirock::
lock
faceplayer
waitse
playmoncry SPECIES_REGIROCK, CRY_MODE_ENCOUNTER
delay 40
waitmoncry
setwildbattle SPECIES_REGIROCK, 40, ITEM_NONE
setflag FLAG_SYS_CTRL_OBJ_DELETE
special StartRegiBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
specialvar VAR_RESULT, GetBattleOutcome
goto_if_eq VAR_RESULT, B_OUTCOME_WON, DesertRuins_EventScript_DefeatedRegirock
goto_if_eq VAR_RESULT, B_OUTCOME_RAN, DesertRuins_EventScript_RanFromRegirock
goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, DesertRuins_EventScript_RanFromRegirock
setflag FLAG_DEFEATED_REGIROCK
release
end
DesertRuins_EventScript_DefeatedRegirock::
setflag FLAG_DEFEATED_REGIROCK
goto Common_EventScript_RemoveStaticPokemon
end
DesertRuins_EventScript_RanFromRegirock::
setvar VAR_0x8004, SPECIES_REGIROCK
goto Common_EventScript_LegendaryFlewAway
end