tewtal / alttp_sm_combo_randomizer

ALttP VT Randomizer and API - Super Metroid & ALTTP Combo Version (V10)
MIT License
43 stars 12 forks source link

Inner Maridia missing explicit Supers requirement #83

Closed miketrethewey closed 4 years ago

miketrethewey commented 5 years ago

Sand Pit Rooms, Reserve Tank, and anything in and beyond Aqueduct don't explicitly require Supers in their local location access logic. (src) Sand Pit Rooms & Reserve Tank require Supers for leaving. (Thanks, Natalie!) Inner Maridia access logic doesn't explicitly require Supers. Inner Maridia access logic does refer to the Norfair Portal which needs Death Mountain access. Inner Maridia access logic does refer to Norfair West access which does have Supers, but is only checked if the Norfair Portal cannot be accessed from the Hyrule side.

Sand Pit Logic

Tournament

        $this->locations["Missile (left Maridia sand pit room)"]->setRequirements(function($location, $items) {
-           return ($items->has('HiJump') && ($items->has('SpaceJump') || $items->canSpringBallJump())) || $items->has('Gravity');
+           return $items->has('Super') && (($items->has('HiJump') && ($items->has('SpaceJump') || $items->canSpringBallJump())) || $items->has('Gravity'));
        });
        $this->locations["Reserve Tank, Maridia"]->setRequirements(function($location, $items) {
-           return ($items->has('HiJump') && ($items->has('SpaceJump') || $items->canSpringBallJump())) || $items->has('Gravity');
+           return $items->has('Super') && (($items->has('HiJump') && ($items->has('SpaceJump') || $items->canSpringBallJump())) || $items->has('Gravity'));
        });
        $this->locations["Missile (right Maridia sand pit room)"]->setRequirements(function($location, $items) {
-           return $items->has('HiJump') || $items->has('Gravity');
+           return $items->has('Super') && ($items->has('HiJump') || $items->has('Gravity'));
        });
            $this->locations["Power Bomb (right Maridia sand pit room)"]->setRequirements(function($location, $items) {
-           return ($items->has('HiJump') && $items->canSpringBallJump()) || $items->has('Gravity');
+           return $items->has('Super') && (($items->has('HiJump') && $items->canSpringBallJump()) || $items->has('Gravity'));
        });

Casual

        $this->locations["Missile (left Maridia sand pit room)"]->setRequirements(function($location, $items) {
-           return $items->canPassBombPassages();
+           return $items->has('Super') && $items->canPassBombPassages());
        });
        $this->locations["Reserve Tank, Maridia"]->setRequirements(function($location, $items) {
-           return $items->canPassBombPassages();
+           return $items->has('Super') && $items->canPassBombPassages();
        });

Coded path

Intended path

Suggested solution

The above diffs and... The following locations:

Shoud get a check like:

if($items->canAccessNorfairPortal()) {
  // require Supers in addition to the rest of the local requirements
}
fdtaillefer commented 5 years ago

My proposed fix deviates a bit from the suggested solution: