summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-10-06 18:59:07 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2018-10-06 18:59:07 -0400
commitacbe77abe108d35664829328b34d519e1dbb7f04 (patch)
treedd2ed86fb9b1649202f314e81886e4c05399fdb5
parentd39ec661bccb03f41535229af1e10877722e4206 (diff)
Wall-opening conditions
-rw-r--r--Add-a-new-Unown-puzzle-chamber.md14
1 files changed, 12 insertions, 2 deletions
diff --git a/Add-a-new-Unown-puzzle-chamber.md b/Add-a-new-Unown-puzzle-chamber.md
index c39f6ba..531a07e 100644
--- a/Add-a-new-Unown-puzzle-chamber.md
+++ b/Add-a-new-Unown-puzzle-chamber.md
@@ -83,7 +83,6 @@ RuinsOfAlphRelicanthChamberPuzzle:
And it will work the way you expect.
-![Screenshot](screenshots/
![Screenshot](screenshots/relicanth-puzzle.png)
@@ -160,4 +159,15 @@ And it will work the way you expect.
## 3. Create a condition to open the wall
-TODO
+The wall-opening routines are defined in [engine/events/unown_walls.asm](../blob/master/engine/events/unown_walls.asm). Each wall has a routine that sets the corresponding `WALL_OPENED` event if certain conditions are met:
+
+- `HoOhChamber`: Called when you enter the chamber. Checks if Ho-Oh is the first Pokémon in the party.
+- `OmanyteChamber`: Called when you enter the chamber. Checks if a Water Stone is in the Pack or held by a Pokémon in the party.
+- `SpecialAerodactylChamber`: Called when you use Flash. Checks if you are in the Aerodactyl chamber.
+- `SpecialKabutoChamber`: Called when you use an Escape Rope. Checks if you are in the Kabuto chamber.
+
+`HoOhChamber` and `OmanyteChamber` are called by `scene_script`s in their respective chamber scripts in [maps/\*.asm](../tree/master/maps/); `SpecialAerodactylChamber` `SpecialKabutoChamber` are called by the `OWFlash` and `EscapeRopeFunction` routines in [engine/events/overworld.asm](../blob/master/engine/events/overworld.asm), respectively.
+
+The word "WHIRL" implies that you should use Whirlpool. So, edit [engine/events/unown_walls.asm](../blob/master/engine/events/unown_walls.asm) to define a new `SpecialRelicanthChamber` routine that checks if you are in the Relicanth chamber map, and sets `EVENT_WALL_OPENED_IN_RELICANTH_CHAMBER` if so. Then edit [engine/events/overworld.asm](../blob/master/engine/events/overworld.asm) so that `WhirlpoolFunction` calls `SpecialRelicanthChamber` the way that `EscapeRopeFunction` calls `SpecialKabutoChamber`. (You will, of course, also need to edit [constants/event_flags.asm](../blob/master/event_flags.asm) to define `EVENT_WALL_OPENED_IN_RELICANTH_CHAMBER`, not to mention creating the Relicanth chamber map in the first place.) I won't go into the details of how to do this, since you probably don't want exactly this condition, and the existing four routines are sufficient to show the general pattern.
+
+Anyway, once that's done, you can use Whirlpool in the Relicanth chamber to open the wall.