summaryrefslogtreecommitdiff
path: root/data/maps/PowerPlant
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2020-01-12 17:04:23 -0500
committerGitHub <noreply@github.com>2020-01-12 17:04:23 -0500
commit92d99d4fd2e5579372b9f4cc39468000553ba3a8 (patch)
tree4ff8e60d1ad6a25dad888a4e78011624b46ad9ec /data/maps/PowerPlant
parent15ff7eb2f87032797f6ce9ef9bb471c468b48a36 (diff)
parent0676e732869d0e62322b001cbab57b8500361005 (diff)
Merge pull request #207 from GriffinRichards/sync-script
Sync scripts with pokeemerald
Diffstat (limited to 'data/maps/PowerPlant')
-rw-r--r--data/maps/PowerPlant/map.json10
-rw-r--r--data/maps/PowerPlant/scripts.inc80
2 files changed, 43 insertions, 47 deletions
diff --git a/data/maps/PowerPlant/map.json b/data/maps/PowerPlant/map.json
index 751b0448a..8fb90e3c7 100644
--- a/data/maps/PowerPlant/map.json
+++ b/data/maps/PowerPlant/map.json
@@ -23,7 +23,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "PowerPlant_EventScript_1BE91C",
+ "script": "PowerPlant_EventScript_ItemMaxPotion",
"flag": "FLAG_HIDE_POWER_PLANT_MAX_POTION"
},
{
@@ -36,7 +36,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "PowerPlant_EventScript_1BE929",
+ "script": "PowerPlant_EventScript_ItemTM17",
"flag": "FLAG_HIDE_POWER_PLANT_TM17"
},
{
@@ -49,7 +49,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "PowerPlant_EventScript_1BE936",
+ "script": "PowerPlant_EventScript_ItemTM25",
"flag": "FLAG_HIDE_POWER_PLANT_TM25"
},
{
@@ -62,7 +62,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "PowerPlant_EventScript_1BE943",
+ "script": "PowerPlant_EventScript_ItemThunderStone",
"flag": "FLAG_HIDE_POWER_PLANT_THUNDER_STONE"
},
{
@@ -75,7 +75,7 @@
"movement_range_y": 1,
"trainer_type": 0,
"trainer_sight_or_berry_tree_id": 0,
- "script": "PowerPlant_EventScript_1BE950",
+ "script": "PowerPlant_EventScript_ItemElixir",
"flag": "FLAG_HIDE_POWER_PLANT_ELIXIR"
},
{
diff --git a/data/maps/PowerPlant/scripts.inc b/data/maps/PowerPlant/scripts.inc
index aa16e1881..bc6e108f8 100644
--- a/data/maps/PowerPlant/scripts.inc
+++ b/data/maps/PowerPlant/scripts.inc
@@ -1,28 +1,24 @@
PowerPlant_MapScripts:: @ 8163764
- map_script 5, PowerPlant_MapScript1_16376F
- map_script 3, PowerPlant_MapScript2_16378D
+ map_script MAP_SCRIPT_ON_RESUME, PowerPlant_OnResume
+ map_script MAP_SCRIPT_ON_TRANSITION, PowerPlant_OnTransition
.byte 0
-PowerPlant_MapScript1_16376F:: @ 816376F
- checkflag FLAG_SYS_SPECIAL_WILD_BATTLE
- call_if TRUE, EventScript_163779
+PowerPlant_OnResume:: @ 816376F
+ call_if_set FLAG_SYS_SPECIAL_WILD_BATTLE, EventScript_163779
end
EventScript_163779:: @ 8163779
specialvar VAR_RESULT, Special_GetBattleOutcome
- compare_var_to_value VAR_RESULT, B_OUTCOME_CAUGHT
- goto_if ne, EventScript_1A77A9
+ compare VAR_RESULT, B_OUTCOME_CAUGHT
+ goto_if_ne EventScript_Return
removeobject VAR_LAST_TALKED
return
-PowerPlant_MapScript2_16378D:: @ 816378D
+PowerPlant_OnTransition:: @ 816378D
setworldmapflag FLAG_WORLD_MAP_POWER_PLANT
- checkflag FLAG_FOUGHT_ZAPDOS
- call_if FALSE, EventScript_1637AC
- checkflag FLAG_FOUGHT_POWER_PLANT_ELECTRODE_1
- call_if FALSE, EventScript_1637B0
- checkflag FLAG_FOUGHT_POWER_PLANT_ELECTRODE_2
- call_if FALSE, EventScript_1637B4
+ call_if_unset FLAG_FOUGHT_ZAPDOS, EventScript_1637AC
+ call_if_unset FLAG_FOUGHT_POWER_PLANT_ELECTRODE_1, EventScript_1637B0
+ call_if_unset FLAG_FOUGHT_POWER_PLANT_ELECTRODE_2, EventScript_1637B4
end
EventScript_1637AC:: @ 81637AC
@@ -39,8 +35,8 @@ EventScript_1637B4:: @ 81637B4
PowerPlant_EventScript_1637B8:: @ 81637B8
special sub_8110AB4
- compare_var_to_value VAR_RESULT, 2
- goto_if eq, EventScript_1A7AE0
+ compare VAR_RESULT, 2
+ goto_if_eq EventScript_1A7AE0
special sub_8112364
lock
faceplayer
@@ -58,30 +54,30 @@ PowerPlant_EventScript_1637B8:: @ 81637B8
waitstate
clearflag FLAG_SYS_SPECIAL_WILD_BATTLE
specialvar VAR_RESULT, Special_GetBattleOutcome
- compare_var_to_value VAR_RESULT, B_OUTCOME_WON
- goto_if eq, EventScript_16381B
- compare_var_to_value VAR_RESULT, B_OUTCOME_RAN
- goto_if eq, EventScript_163824
- compare_var_to_value VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
- goto_if eq, EventScript_163824
+ compare VAR_RESULT, B_OUTCOME_WON
+ goto_if_eq EventScript_16381B
+ compare VAR_RESULT, B_OUTCOME_RAN
+ goto_if_eq EventScript_163824
+ compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
+ goto_if_eq EventScript_163824
setflag FLAG_FOUGHT_ZAPDOS
release
end
EventScript_16381B:: @ 816381B
setflag FLAG_FOUGHT_ZAPDOS
- goto EventScript_1A922D
+ goto EventScript_RemoveStaticMon
end
EventScript_163824:: @ 8163824
setvar VAR_0x8004, SPECIES_ZAPDOS
- goto EventScript_1A9236
+ goto EventScript_MonFlewAway
end
PowerPlant_EventScript_16382F:: @ 816382F
special sub_8110AB4
- compare_var_to_value VAR_RESULT, 2
- goto_if eq, EventScript_1A7AE0
+ compare VAR_RESULT, 2
+ goto_if_eq EventScript_1A7AE0
lock
faceplayer
setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE
@@ -94,25 +90,25 @@ PowerPlant_EventScript_16382F:: @ 816382F
clearflag FLAG_SYS_SPECIAL_WILD_BATTLE
special sub_8112364
specialvar VAR_RESULT, Special_GetBattleOutcome
- compare_var_to_value VAR_RESULT, B_OUTCOME_WON
- goto_if eq, EventScript_163884
- compare_var_to_value VAR_RESULT, B_OUTCOME_RAN
- goto_if eq, EventScript_163884
- compare_var_to_value VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
- goto_if eq, EventScript_163884
+ compare VAR_RESULT, B_OUTCOME_WON
+ goto_if_eq EventScript_163884
+ compare VAR_RESULT, B_OUTCOME_RAN
+ goto_if_eq EventScript_163884
+ compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
+ goto_if_eq EventScript_163884
setflag FLAG_FOUGHT_POWER_PLANT_ELECTRODE_1
release
end
EventScript_163884:: @ 8163884
setflag FLAG_FOUGHT_POWER_PLANT_ELECTRODE_1
- goto EventScript_1A922D
+ goto EventScript_RemoveStaticMon
end
PowerPlant_EventScript_16388D:: @ 816388D
special sub_8110AB4
- compare_var_to_value VAR_RESULT, 2
- goto_if eq, EventScript_1A7AE0
+ compare VAR_RESULT, 2
+ goto_if_eq EventScript_1A7AE0
lock
faceplayer
setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE
@@ -125,17 +121,17 @@ PowerPlant_EventScript_16388D:: @ 816388D
clearflag FLAG_SYS_SPECIAL_WILD_BATTLE
special sub_8112364
specialvar VAR_RESULT, Special_GetBattleOutcome
- compare_var_to_value VAR_RESULT, B_OUTCOME_WON
- goto_if eq, EventScript_1638E2
- compare_var_to_value VAR_RESULT, B_OUTCOME_RAN
- goto_if eq, EventScript_1638E2
- compare_var_to_value VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
- goto_if eq, EventScript_1638E2
+ compare VAR_RESULT, B_OUTCOME_WON
+ goto_if_eq EventScript_1638E2
+ compare VAR_RESULT, B_OUTCOME_RAN
+ goto_if_eq EventScript_1638E2
+ compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
+ goto_if_eq EventScript_1638E2
setflag FLAG_FOUGHT_POWER_PLANT_ELECTRODE_2
release
end
EventScript_1638E2:: @ 81638E2
setflag FLAG_FOUGHT_POWER_PLANT_ELECTRODE_2
- goto EventScript_1A922D
+ goto EventScript_RemoveStaticMon
end