Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions remake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,50 @@ a back door, no scene shows the doors locking and no bars show on them, but they
the game by an agent: by either room's back door a child met both Lizalfos in view, and they fought. Unseen: a room a
real kill cleared, entered again; the upper room from the front through to the kills; a child's kill.

## Ganon's Castle's shadow trial

The shadow trial is room 8 of `Banc/InsideGanonCastle`. Read from its placements and its walking map:

- The timed torch, `Obj_CandleStick_TimeExtinguish_A_01` (`16327024096686467244`), stands over the pit about 20 units
from the entrance ledge, with no floor of its own in the walking map. Once lit, it burns 22 seconds
(`ExtinguishTime`). It is the room's only torch that is not lit from the start: three `Obj_CandleStick_A_01` burn from
the start, one on the entrance ledge and two on the pots platform.
- Thirteen glass steps, `Obj_InsideGanonCastle_GlassTruth_A_05`, run from near the ledge past the torch to the pots
platform. Six stand from the start, and the walking map has floor at them. Each of the other seven has an
`AppearDelayFrame` of 20 to 80 and an `AlertFrame` of 210 to 300, and the torch's scene,
`InsideGanonCastle_Dungeon_FocusOnGimmick_08_01`, shows the torch and those steps. So they appear when the torch is
lit (inferred).
- The Golden Gauntlets chest's platform is about 10 units past the pots platform and about 35 from the torch. The
Longshot reaches 20 (`HookshotParam.Range`). The chest appears in the scene
`InsideGanonCastle_Dungeon_AppaerTreasureBox_08`. In the autosave below, a floor switch's record,
`InsideGanonCastle_Dungeon_Room08_StepSwitch`, is set beside the opened chest.

Seen in the game by an agent: a Link started on the glass step 2.6 units from the unlit torch fell into the pit.

Seen in the game, from the entrance ledge, with the Lens of Truth and a magic meter unless said:

- The timed torch lights to a Fire Arrow, or to a plain arrow shot through a lit torch. Din's Fire does not light it.
- That light gets Link to the pots platform and no further. With just the Fairy Bow he leaves the pots platform the way
he came.
- From the pots platform, the Hover Boots cross to the chest's platform. With the bow and the Hover Boots, Link pressed
the platform's switch and opened the chest (read from the autosave the game wrote:
`InsideGanonCastle_Dungeon_Room08_StepSwitch` and `InsideGanonCastle_Room08_Candle_ON` set, the chest open, no
Hookshot).
- The Longshot fired at the torches does nothing.
- The Longshot got Link to the chest's platform in no case: alone, with Din's Fire, with plain arrows, or with the Fire
Arrows. With the Longshot alone and no Lens, he stood on the first chest's platform and opened that chest (read from
the autosave the game wrote); that the Longshot took him there is inferred.

So the ledge and the pots platform reach each other with the Fairy Bow, where SoH's lines ask the Fire Arrows. The torch
has no region: it has no floor, and the Longshot got Link neither to it nor past it, so every way that went through it
is gone, SoH's tricks with them. The pots platform's way to the chest's platform drops the Fire Arrows and keeps SoH's
other terms: the Hover Boots, the Hookshot once the chest is out, and a trick. Measured with `kaepora-reach` over every
set of the Longshot, Din's Fire, the Fire Arrows, the Hover Boots and the Fairy Bow: the pots platform is reached with a
bow and only then, and the chest's platform with a bow and the Hover Boots and only then. Every other line of the room
is SoH's. Not seen: the trial's end beyond the chest's platform and its switch, where the room holds an
`Obj_LiftRock_C_05` and two step switches (`Obj_StepSwitch_A_01`) and the logic asks the Megaton Hammer; and the glass
path found without the Lens of Truth.

## What a new game starts with

A plan's start items name items as a chest or a gift names them. For each, the patcher writes what a find of it writes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,8 @@ void RegionTable_Init_GanonsCastle() {
//Exits
ENTRANCE(RR_GANONS_CASTLE_MAIN, true),
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_SOT_PLATFORM, logic->IsChild || logic->CanUse(RG_FIRE_ARROWS) || logic->CanUse(RG_HOOKSHOT) || logic->CanUse(RG_HOVER_BOOTS) || logic->CanUse(RG_SONG_OF_TIME) || logic->CanMegajump()),
//start the recoil away from the wall
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_TORCH, logic->CanUse(RG_LONGSHOT) || (logic->IsAdult && logic->CanMeleeRecoilHover(RECOIL_HAMMER)) || logic->CanBunnyMegaJumpslash() || (logic->CanUse(RG_FIRE_ARROWS) && ((logic->IsAdult && logic->BunnyHood()) || logic->CanUse(RG_HOVER_BOOTS)))),
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_POTS_PLATFORM, logic->CanUse(RG_FIRE_ARROWS)),
// An arrow shot through the ledge's lit torch lights the timed torch, whose glass steps lead to the pots platform.
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_POTS_PLATFORM, logic->CanUse(RG_FAIRY_BOW)),
});

areaTable[RR_GANONS_CASTLE_SHADOW_TRIAL_SOT_PLATFORM] = Region("Ganon's Castle Shadow Trial SoT Platform", SCENE_INSIDE_GANONS_CASTLE, {}, {
Expand All @@ -273,27 +272,23 @@ void RegionTable_Init_GanonsCastle() {
}, {
//Exits
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_START, logic->CanUse(RG_FIRE_ARROWS) || logic->CanUse(RG_LONGSHOT) || (logic->CanUse(RG_HOVER_BOOTS)/* && bunny or roll or recoil*/) || logic->CanUse(RG_SONG_OF_TIME) || logic->IsChild),
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_TORCH, logic->CanUse(RG_LONGSHOT)),
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_POTS_PLATFORM, logic->CanUse(RG_FIRE_ARROWS)),
});

areaTable[RR_GANONS_CASTLE_SHADOW_TRIAL_TORCH] = Region("Ganon's Castle Shadow Trial Torch", SCENE_INSIDE_GANONS_CASTLE, {}, {}, {
//Exits
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_START, logic->CanUse(RG_LONGSHOT) || (logic->HasFireSource() && logic->CanUse(RG_HOVER_BOOTS))),
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_POTS_PLATFORM, logic->CanUse(RG_LONGSHOT) || (logic->HasFireSource() && logic->CanUse(RG_HOVER_BOOTS))),
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_CHEST_PLATFORM, logic->CanUse(RG_LONGSHOT) || (logic->HasFireSource() && logic->CanUse(RG_HOVER_BOOTS))),
});
// The timed torch stands over the pit with no floor of its own, and the Longshot fired at it does nothing, so the
// room has no region at it.

areaTable[RR_GANONS_CASTLE_SHADOW_TRIAL_POTS_PLATFORM] = Region("Ganon's Castle Shadow Pots Platform", SCENE_INSIDE_GANONS_CASTLE, {}, {
//Locations
LOCATION(RC_GANONS_CASTLE_SHADOW_TRIAL_POT_1, logic->CanBreakPots()),
LOCATION(RC_GANONS_CASTLE_SHADOW_TRIAL_POT_2, logic->CanBreakPots()),
}, {
//Exits
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_START, logic->CanUse(RG_FIRE_ARROWS)),
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_TORCH, logic->CanUse(RG_LONGSHOT) || (logic->CanUse(RG_FIRE_ARROWS) && ((logic->IsAdult && logic->BunnyHood()) || logic->CanUse(RG_HOVER_BOOTS)))),
// An arrow shot through one of this platform's lit torches lights the timed torch for the way back.
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_START, logic->CanUse(RG_FAIRY_BOW)),
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_SOT_PLATFORM, logic->CanUse(RG_LONGSHOT) || logic->CanUse(RG_FIRE_ARROWS)),
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_CHEST_PLATFORM, logic->CanUse(RG_FIRE_ARROWS) || logic->CanUse(RG_HOVER_BOOTS) || (logic->Get(LOGIC_SHADOW_TRIAL_LATE_CHEST) && logic->CanUse(RG_HOOKSHOT)) || logic->CanMegajump()),
// The torch's light gets Link no further than here.
ENTRANCE(RR_GANONS_CASTLE_SHADOW_TRIAL_CHEST_PLATFORM, logic->CanUse(RG_HOVER_BOOTS) || (logic->Get(LOGIC_SHADOW_TRIAL_LATE_CHEST) && logic->CanUse(RG_HOOKSHOT)) || logic->CanMegajump()),
});

//rename this?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,6 @@ RANDO_ENUM_ITEM(RR_GANONS_CASTLE_WATER_TRIAL_BLOCK_ROOM_END)
RANDO_ENUM_ITEM(RR_GANONS_CASTLE_WATER_TRIAL_FINAL_ROOM)
RANDO_ENUM_ITEM(RR_GANONS_CASTLE_SHADOW_TRIAL_START)
RANDO_ENUM_ITEM(RR_GANONS_CASTLE_SHADOW_TRIAL_SOT_PLATFORM)
RANDO_ENUM_ITEM(RR_GANONS_CASTLE_SHADOW_TRIAL_TORCH)
RANDO_ENUM_ITEM(RR_GANONS_CASTLE_SHADOW_TRIAL_POTS_PLATFORM)
RANDO_ENUM_ITEM(RR_GANONS_CASTLE_SHADOW_TRIAL_CHEST_PLATFORM)
RANDO_ENUM_ITEM(RR_GANONS_CASTLE_SHADOW_TRIAL_LOWER_SWITCH)
Expand Down
34 changes: 34 additions & 0 deletions tests/logic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
# With neither ocarina the Water Temple, and the Longshot in it, stay out of reach.
NO_OCARINA = (("LW Gift From Saria", "Green Rupee"), ("HF Ocarina of Time Item", "Green Rupee"))
NO_TRIALS = {"Ganon's trials": "None"}
# The shadow trial's four items, each held back from its own place, and Kokiri Forest's chests to hand back the ones a
# test gives, so that one does not hang on another: the lake's sun gives the Fire Arrows only after the Water Temple,
# which asks the Longshot. The bridge is open with them, since the Shadow Temple's boss asks the Hover Boots.
SHADOW_TRIAL_ITEMS_HELD_BACK = (("LH Sun", "Green Rupee"), ("Water Temple Longshot Chest", "Green Rupee"),
("DMT Great Fairy Din's Fire", "Green Rupee"),
("Shadow Temple Hover Boots Chest", "Green Rupee"))
GOLDEN_GAUNTLETS_CHEST = "Ganon's Castle Shadow Trial Golden Gauntlets Chest"
# With the Biggoron Quest shuffled, SoH leaves the trade chain's places out of the logic.
GIFTS_VANILLA = {"Gifts": []}

Expand Down Expand Up @@ -663,6 +670,33 @@ def test_the_tower_opens_without_trials(self):
self.assertFalse(self.reachable(tower, no_light_arrows, settings=BRIDGE_OPEN))
self.assertTrue(self.reachable(tower, no_light_arrows, settings=BRIDGE_OPEN | NO_TRIALS))

def test_a_plain_arrow_through_a_lit_torch_opens_the_shadow_trial_to_the_pots_platform(self):
# The Fairy Bow is the Forest Temple's. Past the pots platform the bow alone goes no further.
held_back = SHADOW_TRIAL_ITEMS_HELD_BACK
self.assertTrue(self.reachable("Ganon's Castle Shadow Trial Pot 1", *held_back, settings=BRIDGE_OPEN))
self.assertFalse(self.reachable(GOLDEN_GAUNTLETS_CHEST, *held_back, settings=BRIDGE_OPEN))

def test_the_bow_and_the_hover_boots_reach_the_gauntlets_chest(self):
hover_boots = ("KF Mido Top Left Chest", "Hover Boots")
self.assertTrue(self.reachable(GOLDEN_GAUNTLETS_CHEST, *SHADOW_TRIAL_ITEMS_HELD_BACK, hover_boots,
settings=BRIDGE_OPEN))

def test_the_longshot_and_the_hover_boots_reach_no_gauntlets_chest_without_a_bow(self):
# The Forest Temple's chest holds the only Fairy Bow.
no_bow = ("Forest Temple Bow Chest", "Green Rupee")
longshot = ("KF Mido Top Right Chest", "Progressive Hookshot")
hover_boots = ("KF Mido Top Left Chest", "Hover Boots")
self.assertFalse(self.reachable(GOLDEN_GAUNTLETS_CHEST, *SHADOW_TRIAL_ITEMS_HELD_BACK, no_bow, longshot,
hover_boots, settings=BRIDGE_OPEN))

def test_neither_the_longshot_nor_any_fire_reaches_the_gauntlets_chest_without_the_hover_boots(self):
# Dampe's race gives the first hookshot, so a chest's Progressive Hookshot makes the Longshot.
longshot = ("KF Mido Top Right Chest", "Progressive Hookshot")
dins_fire = ("KF Mido Bottom Left Chest", "Din's Fire")
fire_arrows = ("KF Mido Bottom Right Chest", "Fire Arrows")
self.assertFalse(self.reachable(GOLDEN_GAUNTLETS_CHEST, *SHADOW_TRIAL_ITEMS_HELD_BACK, longshot, dins_fire,
fire_arrows, settings=BRIDGE_OPEN))

def test_no_door_takes_a_key_when_keys_are_not_needed(self):
# The first room's key opens the first lock. The boss key chest holds the only boss key.
no_first_key = ("Forest Temple First Room Chest", "Green Rupee")
Expand Down
16 changes: 8 additions & 8 deletions tests/seedgen_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,8 @@ def test_route_steps_are_in_reach_in_their_sphere(self):

def test_a_route_buys_what_fills_a_bottle_after_a_bottle(self):
# A shop sells goods that fill a bottle only to a Link with an empty bottle. With the Door of Time open, seed
# 70's route buys Blue Fire in the Kakariko Potion Shop in a sphere after its first bottle.
log, _ = self.generate("70", {"Door of Time": "Open"})
# 53's route buys Blue Fire in the Kakariko Potion Shop in a sphere after its first bottle.
log, _ = self.generate("53", {"Door of Time": "Open"})
sphere = {step: number for number, steps in enumerate(log["playthrough"].values()) for step in steps}
steps = playthrough_steps(log)
self.assertEqual(spoiler_item(steps["Kak Potion Shop Item 2"]), "Buy Blue Fire")
Expand Down Expand Up @@ -1860,8 +1860,8 @@ def test_a_great_fairy_may_hold_an_item_another_place_gives(self):
def test_hints_name_the_fairy_outside_ganons_castle_at_ganondorfs_castle(self):
# Her mark stands in the scene the game names Ganondorf's Castle, where the stones place that scene's skulltula,
# and not in the child's Hyrule Castle, which has a fairy of its own. Seed 39's route takes the Lens of Truth
# from her, and seed 64's the Bow, and a stone of each says Ganondorf's Castle is on the way.
for seed, item in (("39", "Lens of Truth"), ("64", "Progressive Bow")):
# from her, and seed 235's the Bow, and a stone of each says Ganondorf's Castle is on the way.
for seed, item in (("39", "Lens of Truth"), ("235", "Progressive Bow")):
spoiler, _ = self.assert_hints_are_true(seed, {"Gifts": ["Great Fairies"]})
self.assertEqual(playthrough_steps(spoiler).get("OGC Great Fairy Reward"), item, seed)
self.assertIn("They say that Ganondorf's Castle is on the way of the hero.", spoiler["hints"].values())
Expand Down Expand Up @@ -2172,10 +2172,10 @@ def test_every_hint_is_true(self):
self.assert_hints_are_true(seed, EVERY_SETTING_CHANGED)

def test_a_place_called_foolish_holds_nothing_the_seed_needs(self):
# With the Kokiri Sword shuffled, seed 74's route takes nothing in Kokiri Forest but the Deku Shield on the
# With the Kokiri Sword shuffled, seed 78's route takes nothing in Kokiri Forest but the Deku Shield on the
# Kokiri Shop's kept shelf, and no place of the forest holds a major item, so SoH's rule alone would call the
# forest foolish. The seed draws foolish hints, which the hint check finds true.
spoiler, _ = self.assert_hints_are_true("74", GIFTS_SHUFFLED | SKULLTULAS_SHUFFLED | SONGS_SHUFFLED
spoiler, _ = self.assert_hints_are_true("78", GIFTS_SHUFFLED | SKULLTULAS_SHUFFLED | SONGS_SHUFFLED
| LOOSE_SHUFFLED | REWARDS_SHUFFLED | SWORD_SHUFFLED)
steps = playthrough_steps(spoiler)
self.assertEqual({step: item for step, item in steps.items() if step.startswith("KF ")},
Expand Down Expand Up @@ -2379,10 +2379,10 @@ def test_each_cow_gives_the_seeds_item_by_a_claim_of_its_own(self):
self.assertTrue(on_route)

def test_a_route_takes_the_fortress_cows_item_once_the_gerudo_let_link_be(self):
# Seed 18 with "Cows" ticked puts an item the route needs in the Gerudo Fortress cow, which only an adult
# Seed 33 with "Cows" ticked puts an item the route needs in the Gerudo Fortress cow, which only an adult
# meets. The Gerudo beside it lets Link be once the carpenters' rescue has moved the Spirit quest on, and the
# route takes the cow's item in a later sphere than the rescue.
spoiler, plan = self.assert_hints_are_true("18", {"Gifts": ["Cows"]})
spoiler, plan = self.assert_hints_are_true("33", {"Gifts": ["Cows"]})
route = list(playthrough_steps(spoiler))
self.assertIn((cow_gifts(plan)["GF Cow"], spoiler["locations"]["GF Cow"]), ITEM_PAIRS)
self.assertLess(route.index("GF Freed All Carpenters"), route.index("GF Cow"))
Expand Down
Loading