import from github
This commit is contained in:
81
data/maps/AncientTomb/map.json
Normal file
81
data/maps/AncientTomb/map.json
Normal file
@ -0,0 +1,81 @@
|
||||
{
|
||||
"id": "MAP_ANCIENT_TOMB",
|
||||
"name": "AncientTomb",
|
||||
"layout": "LAYOUT_ANCIENT_TOMB",
|
||||
"music": "MUS_SEALED_CHAMBER",
|
||||
"region_map_section": "MAPSEC_ANCIENT_TOMB",
|
||||
"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_REGISTEEL",
|
||||
"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": "AncientTomb_EventScript_Registeel",
|
||||
"flag": "FLAG_HIDE_REGISTEEL"
|
||||
}
|
||||
],
|
||||
"warp_events": [
|
||||
{
|
||||
"x": 8,
|
||||
"y": 29,
|
||||
"elevation": 3,
|
||||
"dest_map": "MAP_ROUTE120",
|
||||
"dest_warp_id": 0
|
||||
},
|
||||
{
|
||||
"x": 8,
|
||||
"y": 20,
|
||||
"elevation": 0,
|
||||
"dest_map": "MAP_ANCIENT_TOMB",
|
||||
"dest_warp_id": 2
|
||||
},
|
||||
{
|
||||
"x": 8,
|
||||
"y": 11,
|
||||
"elevation": 3,
|
||||
"dest_map": "MAP_ANCIENT_TOMB",
|
||||
"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": "AncientTomb_EventScript_CaveEntranceMiddle"
|
||||
},
|
||||
{
|
||||
"type": "sign",
|
||||
"x": 7,
|
||||
"y": 20,
|
||||
"elevation": 0,
|
||||
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
|
||||
"script": "AncientTomb_EventScript_CaveEntranceSide"
|
||||
},
|
||||
{
|
||||
"type": "sign",
|
||||
"x": 9,
|
||||
"y": 20,
|
||||
"elevation": 0,
|
||||
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
|
||||
"script": "AncientTomb_EventScript_CaveEntranceSide"
|
||||
}
|
||||
]
|
||||
}
|
86
data/maps/AncientTomb/scripts.inc
Normal file
86
data/maps/AncientTomb/scripts.inc
Normal file
@ -0,0 +1,86 @@
|
||||
AncientTomb_MapScripts::
|
||||
map_script MAP_SCRIPT_ON_RESUME, AncientTomb_OnResume
|
||||
map_script MAP_SCRIPT_ON_LOAD, AncientTomb_OnLoad
|
||||
map_script MAP_SCRIPT_ON_TRANSITION, AncientTomb_OnTransition
|
||||
.byte 0
|
||||
|
||||
AncientTomb_OnResume:
|
||||
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, AncientTomb_EventScript_TryRemoveRegisteel
|
||||
end
|
||||
|
||||
AncientTomb_EventScript_TryRemoveRegisteel::
|
||||
specialvar VAR_RESULT, GetBattleOutcome
|
||||
goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn
|
||||
removeobject VAR_LAST_TALKED
|
||||
return
|
||||
|
||||
AncientTomb_OnTransition:
|
||||
setflag FLAG_LANDMARK_ANCIENT_TOMB
|
||||
call_if_unset FLAG_DEFEATED_REGISTEEL, AncientTomb_EventScript_ShowRegisteel
|
||||
end
|
||||
|
||||
AncientTomb_EventScript_ShowRegisteel::
|
||||
clearflag FLAG_HIDE_REGISTEEL
|
||||
return
|
||||
|
||||
AncientTomb_OnLoad:
|
||||
call_if_unset FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED, AncientTomb_EventScript_HideRegiEntrance
|
||||
end
|
||||
|
||||
AncientTomb_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
|
||||
|
||||
AncientTomb_EventScript_CaveEntranceMiddle::
|
||||
lockall
|
||||
goto_if_set FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED, AncientTomb_EventScript_BigHoleInWall
|
||||
braillemsgbox AncientTomb_Braille_ShineInTheMiddle
|
||||
releaseall
|
||||
end
|
||||
|
||||
AncientTomb_EventScript_BigHoleInWall::
|
||||
msgbox gText_BigHoleInTheWall, MSGBOX_DEFAULT
|
||||
releaseall
|
||||
end
|
||||
|
||||
AncientTomb_EventScript_CaveEntranceSide::
|
||||
lockall
|
||||
braillemsgbox AncientTomb_Braille_ShineInTheMiddle
|
||||
releaseall
|
||||
end
|
||||
|
||||
AncientTomb_EventScript_Registeel::
|
||||
lock
|
||||
faceplayer
|
||||
waitse
|
||||
playmoncry SPECIES_REGISTEEL, CRY_MODE_ENCOUNTER
|
||||
delay 40
|
||||
waitmoncry
|
||||
setwildbattle SPECIES_REGISTEEL, 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, AncientTomb_EventScript_DefeatedRegisteel
|
||||
goto_if_eq VAR_RESULT, B_OUTCOME_RAN, AncientTomb_EventScript_RanFromRegisteel
|
||||
goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, AncientTomb_EventScript_RanFromRegisteel
|
||||
setflag FLAG_DEFEATED_REGISTEEL
|
||||
release
|
||||
end
|
||||
|
||||
AncientTomb_EventScript_DefeatedRegisteel::
|
||||
setflag FLAG_DEFEATED_REGISTEEL
|
||||
goto Common_EventScript_RemoveStaticPokemon
|
||||
end
|
||||
|
||||
AncientTomb_EventScript_RanFromRegisteel::
|
||||
setvar VAR_0x8004, SPECIES_REGISTEEL
|
||||
goto Common_EventScript_LegendaryFlewAway
|
||||
end
|
||||
|
Reference in New Issue
Block a user