diff options
Diffstat (limited to 'data/maps/PowerPlant')
-rw-r--r-- | data/maps/PowerPlant/map.json | 179 | ||||
-rw-r--r-- | data/maps/PowerPlant/scripts.inc | 141 |
2 files changed, 320 insertions, 0 deletions
diff --git a/data/maps/PowerPlant/map.json b/data/maps/PowerPlant/map.json new file mode 100644 index 000000000..21ffe2703 --- /dev/null +++ b/data/maps/PowerPlant/map.json @@ -0,0 +1,179 @@ +{ + "id": "MAP_POWER_PLANT", + "name": "PowerPlant", + "layout": "LAYOUT_POWER_PLANT", + "music": "BGM_FRLG_POKEMON_MANSION", + "region_map_section": "MAPSEC_POWER_PLANT", + "requires_flash": false, + "weather": "WEATHER_NONE", + "map_type": "MAP_TYPE_8", + "unknown_18": 0, + "unknown_19": 7, + "elevator_flag": 0, + "battle_scene": "BATTLE_SCENE_3", + "connections": null, + "object_events": [ + { + "graphics_id": "92", + "x": 7, + "y": 27, + "elevation": 3, + "movement_type": "8", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "PowerPlant_EventScript_1BE91C", + "flag": "410" + }, + { + "graphics_id": "92", + "x": 40, + "y": 22, + "elevation": 3, + "movement_type": "8", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "PowerPlant_EventScript_1BE929", + "flag": "411" + }, + { + "graphics_id": "92", + "x": 46, + "y": 37, + "elevation": 3, + "movement_type": "8", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "PowerPlant_EventScript_1BE936", + "flag": "412" + }, + { + "graphics_id": "92", + "x": 45, + "y": 4, + "elevation": 3, + "movement_type": "8", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "PowerPlant_EventScript_1BE943", + "flag": "413" + }, + { + "graphics_id": "92", + "x": 26, + "y": 22, + "elevation": 3, + "movement_type": "8", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "PowerPlant_EventScript_1BE950", + "flag": "414" + }, + { + "graphics_id": "136", + "x": 5, + "y": 11, + "elevation": 3, + "movement_type": "8", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "PowerPlant_EventScript_1637B8", + "flag": "93" + }, + { + "graphics_id": "92", + "x": 36, + "y": 5, + "elevation": 3, + "movement_type": "8", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "PowerPlant_EventScript_16388D", + "flag": "134" + }, + { + "graphics_id": "92", + "x": 30, + "y": 38, + "elevation": 3, + "movement_type": "8", + "movement_range_x": 1, + "movement_range_y": 1, + "trainer_type": 0, + "trainer_sight_or_berry_tree_id": 0, + "script": "PowerPlant_EventScript_16382F", + "flag": "133" + } + ], + "warp_events": [ + { + "x": 4, + "y": 39, + "elevation": 3, + "dest_map": "MAP_ROUTE10", + "dest_warp_id": 2 + }, + { + "x": 5, + "y": 38, + "elevation": 3, + "dest_map": "MAP_ROUTE10", + "dest_warp_id": 2 + }, + { + "x": 6, + "y": 39, + "elevation": 3, + "dest_map": "MAP_ROUTE10", + "dest_warp_id": 2 + }, + { + "x": 1, + "y": 11, + "elevation": 3, + "dest_map": "MAP_ROUTE10", + "dest_warp_id": 4 + }, + { + "x": 0, + "y": 13, + "elevation": 3, + "dest_map": "MAP_ROUTE10", + "dest_warp_id": 2 + } + ], + "coord_events": [], + "bg_events": [ + { + "type": "hidden_item", + "x": 29, + "y": 16, + "elevation": 3, + "item": "ITEM_MAX_ELIXIR", + "flag": "27", + "unknown": 1 + }, + { + "type": "hidden_item", + "x": 8, + "y": 12, + "elevation": 3, + "item": "ITEM_THUNDER_STONE", + "flag": "28", + "unknown": 1 + } + ] +} diff --git a/data/maps/PowerPlant/scripts.inc b/data/maps/PowerPlant/scripts.inc new file mode 100644 index 000000000..cb9b3acdc --- /dev/null +++ b/data/maps/PowerPlant/scripts.inc @@ -0,0 +1,141 @@ +PowerPlant_MapScripts:: @ 8163764 + map_script 5, PowerPlant_MapScript1_16376F + map_script 3, PowerPlant_MapScript2_16378D + .byte 0 + +PowerPlant_MapScript1_16376F:: @ 816376F + checkflag FLAG_0x807 + call_if 1, EventScript_163779 + end + +EventScript_163779:: @ 8163779 + specialvar VAR_RESULT, sub_80CA74C + compare_var_to_value VAR_RESULT, 7 + goto_if 5, EventScript_1A77A9 + removeobject VAR_LAST_TALKED + return + +PowerPlant_MapScript2_16378D:: @ 816378D + setworldmapflag FLAG_WORLD_MAP_POWER_PLANT + checkflag FLAG_0x2BF + call_if 0, EventScript_1637AC + checkflag FLAG_0x2D0 + call_if 0, EventScript_1637B0 + checkflag FLAG_0x2D1 + call_if 0, EventScript_1637B4 + end + +EventScript_1637AC:: @ 81637AC + clearflag FLAG_0x05D + return + +EventScript_1637B0:: @ 81637B0 + clearflag FLAG_0x085 + return + +EventScript_1637B4:: @ 81637B4 + clearflag FLAG_0x086 + return + +PowerPlant_EventScript_1637B8:: @ 81637B8 + special sub_8110AB4 + compare_var_to_value VAR_RESULT, 2 + goto_if_eq EventScript_1A7AE0 + special sub_8112364 + lock + faceplayer + setwildbattle SPECIES_ZAPDOS, 50, ITEM_NONE + waitse + playmoncry SPECIES_ZAPDOS, 2 + message Text_1A6448 + waitmessage + waitmoncry + delay 10 + playbgm BGM_FRLG_LEADER_EYE, 0 + waitbuttonpress + setflag FLAG_0x807 + special sub_807F9D8 + waitstate + clearflag FLAG_0x807 + specialvar VAR_RESULT, sub_80CA74C + compare_var_to_value VAR_RESULT, 1 + goto_if_eq EventScript_16381B + compare_var_to_value VAR_RESULT, 4 + goto_if_eq EventScript_163824 + compare_var_to_value VAR_RESULT, 5 + goto_if_eq EventScript_163824 + setflag FLAG_0x2BF + release + end + +EventScript_16381B:: @ 816381B + setflag FLAG_0x2BF + goto EventScript_1A922D + end + +EventScript_163824:: @ 8163824 + setvar VAR_0x8004, SPECIES_ZAPDOS + goto EventScript_1A9236 + end + +PowerPlant_EventScript_16382F:: @ 816382F + special sub_8110AB4 + compare_var_to_value VAR_RESULT, 2 + goto_if_eq EventScript_1A7AE0 + lock + faceplayer + setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE + waitse + playmoncry SPECIES_ELECTRODE, 2 + delay 40 + waitmoncry + setflag FLAG_0x807 + dowildbattle + clearflag FLAG_0x807 + special sub_8112364 + specialvar VAR_RESULT, sub_80CA74C + compare_var_to_value VAR_RESULT, 1 + goto_if_eq EventScript_163884 + compare_var_to_value VAR_RESULT, 4 + goto_if_eq EventScript_163884 + compare_var_to_value VAR_RESULT, 5 + goto_if_eq EventScript_163884 + setflag FLAG_0x2D0 + release + end + +EventScript_163884:: @ 8163884 + setflag FLAG_0x2D0 + goto EventScript_1A922D + end + +PowerPlant_EventScript_16388D:: @ 816388D + special sub_8110AB4 + compare_var_to_value VAR_RESULT, 2 + goto_if_eq EventScript_1A7AE0 + lock + faceplayer + setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE + waitse + playmoncry SPECIES_ELECTRODE, 2 + delay 40 + waitmoncry + setflag FLAG_0x807 + dowildbattle + clearflag FLAG_0x807 + special sub_8112364 + specialvar VAR_RESULT, sub_80CA74C + compare_var_to_value VAR_RESULT, 1 + goto_if_eq EventScript_1638E2 + compare_var_to_value VAR_RESULT, 4 + goto_if_eq EventScript_1638E2 + compare_var_to_value VAR_RESULT, 5 + goto_if_eq EventScript_1638E2 + setflag FLAG_0x2D1 + release + end + +EventScript_1638E2:: @ 81638E2 + setflag FLAG_0x2D1 + goto EventScript_1A922D + end |