summaryrefslogtreecommitdiff
path: root/data/maps/TrainerTower_2F
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-01-23 14:46:03 -0500
committerGriffinR <griffin.g.richards@gmail.com>2020-01-24 02:57:45 -0500
commitef1f9ead0ba44c67185dccc616846646d7ce9257 (patch)
treeea1dea4c196acfc062cbe144911fa979e96218b2 /data/maps/TrainerTower_2F
parente97d3532d4d72a1fe9aec755cd2a3c6527484e27 (diff)
Document Trainer Tower scripts
Diffstat (limited to 'data/maps/TrainerTower_2F')
-rw-r--r--data/maps/TrainerTower_2F/map.json135
-rw-r--r--data/maps/TrainerTower_2F/scripts.inc27
2 files changed, 162 insertions, 0 deletions
diff --git a/data/maps/TrainerTower_2F/map.json b/data/maps/TrainerTower_2F/map.json
new file mode 100644
index 000000000..e2e2f4c97
--- /dev/null
+++ b/data/maps/TrainerTower_2F/map.json
@@ -0,0 +1,135 @@
+{
+ "id": "MAP_TRAINER_TOWER_2F",
+ "name": "TrainerTower_2F",
+ "layout": "LAYOUT_TRAINER_TOWER_2F",
+ "music": "MUS_T_TOWER",
+ "region_map_section": "MAPSEC_TRAINER_TOWER_2",
+ "requires_flash": false,
+ "weather": "WEATHER_NONE",
+ "map_type": "MAP_TYPE_8",
+ "unknown_18": 0,
+ "unknown_19": 2,
+ "elevator_flag": 0,
+ "battle_scene": "BATTLE_SCENE_0",
+ "connections": null,
+ "object_events": [
+ {
+ "graphics_id": "OBJECT_EVENT_GFX_TRAINER_TOWER_DUDE",
+ "x": 9,
+ "y": 7,
+ "elevation": 3,
+ "movement_type": "MOVEMENT_TYPE_FACE_DOWN",
+ "movement_range_x": 1,
+ "movement_range_y": 1,
+ "trainer_type": 0,
+ "trainer_sight_or_berry_tree_id": 0,
+ "script": "TrainerTower_EventScript_Owner",
+ "flag": "FLAG_TEMP_6"
+ },
+ {
+ "graphics_id": "OBJECT_EVENT_GFX_VAR_0",
+ "x": 10,
+ "y": 10,
+ "elevation": 3,
+ "movement_type": "MOVEMENT_TYPE_FACE_DOWN",
+ "movement_range_x": 1,
+ "movement_range_y": 1,
+ "trainer_type": 0,
+ "trainer_sight_or_berry_tree_id": 0,
+ "script": "TrainerTower_EventScript_DoublesTrainer1",
+ "flag": "FLAG_TEMP_2"
+ },
+ {
+ "graphics_id": "OBJECT_EVENT_GFX_VAR_1",
+ "x": 15,
+ "y": 13,
+ "elevation": 3,
+ "movement_type": "MOVEMENT_TYPE_FACE_LEFT",
+ "movement_range_x": 1,
+ "movement_range_y": 1,
+ "trainer_type": 0,
+ "trainer_sight_or_berry_tree_id": 0,
+ "script": "TrainerTower_EventScript_SinglesTrainer",
+ "flag": "FLAG_TEMP_3"
+ },
+ {
+ "graphics_id": "OBJECT_EVENT_GFX_VAR_2",
+ "x": 10,
+ "y": 16,
+ "elevation": 3,
+ "movement_type": "MOVEMENT_TYPE_FACE_UP",
+ "movement_range_x": 1,
+ "movement_range_y": 1,
+ "trainer_type": 0,
+ "trainer_sight_or_berry_tree_id": 0,
+ "script": "TrainerTower_EventScript_KnockoutTrainer",
+ "flag": "FLAG_TEMP_4"
+ },
+ {
+ "graphics_id": "OBJECT_EVENT_GFX_VAR_3",
+ "x": 11,
+ "y": 10,
+ "elevation": 3,
+ "movement_type": "MOVEMENT_TYPE_FACE_DOWN",
+ "movement_range_x": 1,
+ "movement_range_y": 1,
+ "trainer_type": 0,
+ "trainer_sight_or_berry_tree_id": 0,
+ "script": "TrainerTower_EventScript_DoublesTrainer2",
+ "flag": "FLAG_TEMP_5"
+ }
+ ],
+ "warp_events": [
+ {
+ "x": 15,
+ "y": 6,
+ "elevation": 3,
+ "dest_map": "MAP_TRAINER_TOWER_3F",
+ "dest_warp_id": 1
+ },
+ {
+ "x": 4,
+ "y": 6,
+ "elevation": 3,
+ "dest_map": "MAP_TRAINER_TOWER_1F",
+ "dest_warp_id": 0
+ },
+ {
+ "x": 13,
+ "y": 5,
+ "elevation": 0,
+ "dest_map": "MAP_TRAINER_TOWER_ELEVATOR",
+ "dest_warp_id": 0
+ }
+ ],
+ "coord_events": [
+ {
+ "type": "trigger",
+ "x": 10,
+ "y": 13,
+ "elevation": 3,
+ "var": "VAR_TEMP_E",
+ "var_value": 0,
+ "script": "TrainerTower_EventScript_SingleBattleTrigger"
+ },
+ {
+ "type": "trigger",
+ "x": 9,
+ "y": 12,
+ "elevation": 3,
+ "var": "VAR_TEMP_F",
+ "var_value": 0,
+ "script": "TrainerTower_EventScript_DoubleBattleTriggerTop"
+ },
+ {
+ "type": "trigger",
+ "x": 9,
+ "y": 13,
+ "elevation": 3,
+ "var": "VAR_TEMP_F",
+ "var_value": 0,
+ "script": "TrainerTower_EventScript_DoubleBattleTriggerBottom"
+ }
+ ],
+ "bg_events": []
+}
diff --git a/data/maps/TrainerTower_2F/scripts.inc b/data/maps/TrainerTower_2F/scripts.inc
new file mode 100644
index 000000000..c34f36a34
--- /dev/null
+++ b/data/maps/TrainerTower_2F/scripts.inc
@@ -0,0 +1,27 @@
+TrainerTower_2F_MapScripts:: @ 81646E6
+ map_script MAP_SCRIPT_ON_RESUME, TrainerTower_OnResume
+ map_script MAP_SCRIPT_ON_TRANSITION, TrainerTower_OnTransition
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, TrainerTower_OnFrame
+ .byte 0
+
+@ Below scripts are unused, the identical versions in the 1F script are used instead
+
+TrainerTower_2F_EventScript_DoublesTrainer1:: @ 81646F6
+ call TrainerTower_EventScript_SpeakToDoublesTrainer1
+ end
+
+TrainerTower_2F_EventScript_SinglesTrainer:: @ 81646FC
+ call TrainerTower_EventScript_SpeakToSinglesTrainer
+ end
+
+TrainerTower_2F_EventScript_KnockoutTrainer:: @ 8164702
+ call TrainerTower_EventScript_SpeakToKnockoutTrainer
+ end
+
+TrainerTower_2F_EventScript_DoublesTrainer2:: @ 8164708
+ call TrainerTower_EventScript_SpeakToDoublesTrainer2
+ end
+
+TrainerTower_2F_EventScript_Owner:: @ 816470E
+ call TrainerTower_EventScript_SpeakToOwner
+ end