Add SMZ3 support (#270)
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
from worlds.smz3.TotalSMZ3.Region import SMRegion
|
||||
from worlds.smz3.TotalSMZ3.Config import Config, SMLogic
|
||||
from worlds.smz3.TotalSMZ3.Location import Location, LocationType
|
||||
from worlds.smz3.TotalSMZ3.Item import Progression
|
||||
|
||||
class Crocomire(SMRegion):
|
||||
Name = "Norfair Upper Crocomire"
|
||||
Area = "Norfair Upper"
|
||||
|
||||
def __init__(self, world, config: Config):
|
||||
super().__init__(world, config)
|
||||
self.Locations = [
|
||||
Location(self, 52, 0x8F8BA4, LocationType.Visible, "Energy Tank, Crocomire",
|
||||
lambda items: self.CanAccessCrocomire(items) and (items.HasEnergyReserves(1) or items.SpaceJump or items.Grapple) if self.Logic == SMLogic.Normal else \
|
||||
lambda items: self.CanAccessCrocomire(items)),
|
||||
Location(self, 54, 0x8F8BC0, LocationType.Visible, "Missile (above Crocomire)",
|
||||
lambda items: items.CanFly() or items.Grapple or items.HiJump and items.SpeedBooster if self.Logic == SMLogic.Normal else \
|
||||
lambda items: (items.CanFly() or items.Grapple or items.HiJump and
|
||||
(items.SpeedBooster or items.CanSpringBallJump() or items.Varia and items.Ice)) and items.CanHellRun()),
|
||||
Location(self, 57, 0x8F8C04, LocationType.Visible, "Power Bomb (Crocomire)",
|
||||
lambda items: self.CanAccessCrocomire(items) and (items.CanFly() or items.HiJump or items.Grapple) if self.Logic == SMLogic.Normal else \
|
||||
lambda items: self.CanAccessCrocomire(items)),
|
||||
Location(self, 58, 0x8F8C14, LocationType.Visible, "Missile (below Crocomire)",
|
||||
lambda items: self.CanAccessCrocomire(items) and items.Morph),
|
||||
Location(self, 59, 0x8F8C2A, LocationType.Visible, "Missile (Grappling Beam)",
|
||||
lambda items: self.CanAccessCrocomire(items) and items.Morph and (items.CanFly() or items.SpeedBooster and items.CanUsePowerBombs()) if self.Logic == SMLogic.Normal else \
|
||||
lambda items: self.CanAccessCrocomire(items) and (items.SpeedBooster or items.Morph and (items.CanFly() or items.Grapple))),
|
||||
Location(self, 60, 0x8F8C36, LocationType.Chozo, "Grappling Beam",
|
||||
lambda items: self.CanAccessCrocomire(items) and items.Morph and (items.CanFly() or items.SpeedBooster and items.CanUsePowerBombs()) if self.Logic == SMLogic.Normal else \
|
||||
lambda items: self.CanAccessCrocomire(items) and (items.SpaceJump or items.Morph or items.Grapple or
|
||||
items.HiJump and items.SpeedBooster))
|
||||
]
|
||||
|
||||
def CanAccessCrocomire(self, items:Progression):
|
||||
return items.CardNorfairBoss if self.Config.Keysanity else items.Super
|
||||
|
||||
def CanEnter(self, items:Progression):
|
||||
if self.Logic == SMLogic.Normal:
|
||||
return ((items.CanDestroyBombWalls() or items.SpeedBooster) and items.Super and items.Morph or items.CanAccessNorfairUpperPortal()) and (
|
||||
items.Varia) and (
|
||||
# /* Ice Beam -> Croc Speedway */
|
||||
(items.CardNorfairL1 if self.Config.Keysanity else items.Super) and items.CanUsePowerBombs() and items.SpeedBooster or
|
||||
# /* Frog Speedway */
|
||||
items.SpeedBooster and items.Wave or
|
||||
# /* Cathedral -> through the floor or Vulcano */
|
||||
items.CanOpenRedDoors() and (items.CardNorfairL2 if self.Config.Keysanity else items.Super) and
|
||||
(items.CanFly() or items.HiJump or items.SpeedBooster) and
|
||||
(items.CanPassBombPassages() or items.Gravity and items.Morph) and items.Wave
|
||||
or
|
||||
# /* Reverse Lava Dive */
|
||||
items.CanAccessNorfairLowerPortal() and items.ScrewAttack and items.SpaceJump and items.Super and
|
||||
items.Gravity and items.Wave and (items.CardNorfairL2 or items.Morph))
|
||||
else:
|
||||
return ((items.CanDestroyBombWalls() or items.SpeedBooster) and items.Super and items.Morph or items.CanAccessNorfairUpperPortal()) and (
|
||||
# /* Ice Beam -> Croc Speedway */
|
||||
(items.CardNorfairL1 if self.Config.Keysanity else items.Super) and items.CanUsePowerBombs() and
|
||||
items.SpeedBooster and (items.HasEnergyReserves(3) or items.Varia) or
|
||||
# /* Frog Speedway */
|
||||
items.SpeedBooster and (items.HasEnergyReserves(2) or items.Varia) and
|
||||
(items.Missile or items.Super or items.Wave) or ( # /* Blue Gate */
|
||||
# /* Cathedral -> through the floor or Vulcano */
|
||||
items.CanHellRun()) and items.CanOpenRedDoors() and (items.CardNorfairL2 if self.Config.Keysanity else items.Super) and
|
||||
(items.CanFly() or items.HiJump or items.SpeedBooster or items.CanSpringBallJump() or items.Varia and items.Ice) and
|
||||
(items.CanPassBombPassages() or items.Varia and items.Morph) and
|
||||
(items.Missile or items.Super or items.Wave) # /* Blue Gate */
|
||||
) or (
|
||||
# /* Reverse Lava Dive */
|
||||
items.CanAccessNorfairLowerPortal()) and items.ScrewAttack and items.SpaceJump and items.Varia and items.Super and (
|
||||
items.HasEnergyReserves(2)) and (items.CardNorfairL2 or items.Morph)
|
||||
@@ -0,0 +1,94 @@
|
||||
from worlds.smz3.TotalSMZ3.Region import SMRegion
|
||||
from worlds.smz3.TotalSMZ3.Config import Config, SMLogic
|
||||
from worlds.smz3.TotalSMZ3.Location import Location, LocationType
|
||||
from worlds.smz3.TotalSMZ3.Item import Progression
|
||||
|
||||
class East(SMRegion):
|
||||
Name = "Norfair Upper East"
|
||||
Area = "Norfair Upper"
|
||||
|
||||
def __init__(self, world, config: Config):
|
||||
super().__init__(world, config)
|
||||
self.Locations = [
|
||||
Location(self, 61, 0x8F8C3E, LocationType.Chozo, "Reserve Tank, Norfair",
|
||||
lambda items: items.CardNorfairL2 and items.Morph and (
|
||||
items.CanFly() or
|
||||
items.Grapple and (items.SpeedBooster or items.CanPassBombPassages()) or
|
||||
items.HiJump or items.Ice
|
||||
) if self.Logic == SMLogic.Normal else \
|
||||
lambda items: items.CardNorfairL2 and items.Morph and items.Super),
|
||||
Location(self, 62, 0x8F8C44, LocationType.Hidden, "Missile (Norfair Reserve Tank)",
|
||||
lambda items: items.CardNorfairL2 and items.Morph and (
|
||||
items.CanFly() or
|
||||
items.Grapple and (items.SpeedBooster or items.CanPassBombPassages()) or
|
||||
items.HiJump or items.Ice
|
||||
) if self.Logic == SMLogic.Normal else \
|
||||
lambda items: items.CardNorfairL2 and items.Morph and items.Super),
|
||||
Location(self, 63, 0x8F8C52, LocationType.Visible, "Missile (bubble Norfair green door)",
|
||||
lambda items: items.CardNorfairL2 and (
|
||||
items.CanFly() or
|
||||
items.Grapple and items.Morph and (items.SpeedBooster or items.CanPassBombPassages()) or
|
||||
items.HiJump or items.Ice
|
||||
) if self.Logic == SMLogic.Normal else \
|
||||
lambda items: items.CardNorfairL2 and items.Super),
|
||||
Location(self, 64, 0x8F8C66, LocationType.Visible, "Missile (bubble Norfair)",
|
||||
lambda items: items.CardNorfairL2),
|
||||
Location(self, 65, 0x8F8C74, LocationType.Hidden, "Missile (Speed Booster)",
|
||||
lambda items: items.CardNorfairL2 and (
|
||||
items.CanFly() or
|
||||
items.Morph and (items.SpeedBooster or items.CanPassBombPassages()) or
|
||||
items.HiJump or items.Ice
|
||||
) if self.Logic == SMLogic.Normal else \
|
||||
lambda items: items.CardNorfairL2 and items.Super),
|
||||
Location(self, 66, 0x8F8C82, LocationType.Chozo, "Speed Booster",
|
||||
lambda items: items.CardNorfairL2 and (
|
||||
items.CanFly() or
|
||||
items.Morph and (items.SpeedBooster or items.CanPassBombPassages()) or
|
||||
items.HiJump or items.Ice
|
||||
) if self.Logic == SMLogic.Normal else \
|
||||
lambda items: items.CardNorfairL2 and items.Super),
|
||||
Location(self, 67, 0x8F8CBC, LocationType.Visible, "Missile (Wave Beam)",
|
||||
lambda items: items.CardNorfairL2 and (
|
||||
items.CanFly() or
|
||||
items.Morph and (items.SpeedBooster or items.CanPassBombPassages()) or
|
||||
items.HiJump or items.Ice
|
||||
) or
|
||||
items.SpeedBooster and items.Wave and items.Morph and items.Super if self.Logic == SMLogic.Normal else \
|
||||
lambda items: items.CardNorfairL2 or items.Varia),
|
||||
Location(self, 68, 0x8F8CCA, LocationType.Chozo, "Wave Beam",
|
||||
lambda items: items.Morph and (
|
||||
items.CardNorfairL2 and (
|
||||
items.CanFly() or
|
||||
items.Morph and (items.SpeedBooster or items.CanPassBombPassages()) or
|
||||
items.HiJump or items.Ice
|
||||
) or
|
||||
items.SpeedBooster and items.Wave and items.Morph and items.Super
|
||||
) if self.Logic == SMLogic.Normal else \
|
||||
lambda items: items.CanOpenRedDoors() and (items.CardNorfairL2 or items.Varia) and
|
||||
(items.Morph or items.Grapple or items.HiJump and items.Varia or items.SpaceJump))
|
||||
]
|
||||
|
||||
# // Todo: Super is not actually needed for Frog Speedway, but changing this will affect locations
|
||||
# // Todo: Ice Beam -> Croc Speedway is not considered
|
||||
def CanEnter(self, items:Progression):
|
||||
if self.Logic == SMLogic.Normal:
|
||||
return ((items.CanDestroyBombWalls() or items.SpeedBooster) and items.Super and items.Morph or
|
||||
items.CanAccessNorfairUpperPortal()
|
||||
) and items.Varia and items.Super and (
|
||||
# /* Cathedral */
|
||||
items.CanOpenRedDoors() and (items.CardNorfairL2 if self.Config.Keysanity else items.Super) and
|
||||
(items.CanFly() or items.HiJump or items.SpeedBooster) or
|
||||
# /* Frog Speedway */
|
||||
items.SpeedBooster and (items.CardNorfairL2 or items.Wave) and items.CanUsePowerBombs()
|
||||
)
|
||||
else:
|
||||
return ((items.CanDestroyBombWalls() or items.SpeedBooster) and items.Super and items.Morph or
|
||||
items.CanAccessNorfairUpperPortal()) and (
|
||||
items.CanHellRun()) and (
|
||||
# /* Cathedral */
|
||||
items.CanOpenRedDoors() and (items.CardNorfairL2 if self.Config.Keysanity else items.Super) and (
|
||||
items.CanFly() or items.HiJump or items.SpeedBooster or
|
||||
items.CanSpringBallJump() or items.Varia and items.Ice
|
||||
) or
|
||||
# /* Frog Speedway */
|
||||
items.SpeedBooster and (items.CardNorfairL2 or items.Missile or items.Super or items.Wave) and items.CanUsePowerBombs())
|
||||
@@ -0,0 +1,44 @@
|
||||
from worlds.smz3.TotalSMZ3.Region import SMRegion
|
||||
from worlds.smz3.TotalSMZ3.Config import Config, SMLogic
|
||||
from worlds.smz3.TotalSMZ3.Location import Location, LocationType
|
||||
from worlds.smz3.TotalSMZ3.Item import Progression
|
||||
|
||||
class West(SMRegion):
|
||||
Name = "Norfair Upper West"
|
||||
Area = "Norfair Upper"
|
||||
|
||||
def __init__(self, world, config: Config):
|
||||
super().__init__(world, config)
|
||||
self.Locations = [
|
||||
Location(self, 49, 0x8F8AE4, LocationType.Hidden, "Missile (lava room)",
|
||||
lambda items: items.Varia and (
|
||||
items.CanOpenRedDoors() and (items.CanFly() or items.HiJump or items.SpeedBooster) or
|
||||
self.world.CanEnter("Norfair Upper East", items) and items.CardNorfairL2
|
||||
) and items.Morph if self.Logic == SMLogic.Normal else \
|
||||
lambda items: items.CanHellRun() and (
|
||||
items.CanOpenRedDoors() and (
|
||||
items.CanFly() or items.HiJump or items.SpeedBooster or
|
||||
items.CanSpringBallJump() or items.Varia and items.Ice
|
||||
) or
|
||||
self.world.CanEnter("Norfair Upper East", items) and items.CardNorfairL2
|
||||
) and items.Morph),
|
||||
Location(self, 50, 0x8F8B24, LocationType.Chozo, "Ice Beam",
|
||||
lambda items: (items.CardNorfairL1 if config.Keysanity else items.Super) and items.CanPassBombPassages() and items.Varia and items.SpeedBooster if self.Logic == SMLogic.Normal else \
|
||||
lambda items: (items.CardNorfairL1 if config.Keysanity else items.Super) and items.Morph and (items.Varia or items.HasEnergyReserves(3))),
|
||||
Location(self, 51, 0x8F8B46, LocationType.Hidden, "Missile (below Ice Beam)",
|
||||
lambda items: (items.CardNorfairL1 if config.Keysanity else items.Super) and items.CanUsePowerBombs() and items.Varia and items.SpeedBooster if self.Logic == SMLogic.Normal else \
|
||||
lambda items:
|
||||
(items.CardNorfairL1 if config.Keysanity else items.Super) and items.CanUsePowerBombs() and (items.Varia or items.HasEnergyReserves(3)) or
|
||||
(items.Missile or items.Super or items.Wave) and items.Varia and items.SpeedBooster and # /* Blue Gate */
|
||||
# /* Access to Croc's room to get spark */
|
||||
(items.CardNorfairBoss if config.Keysanity else items.Super) and items.CardNorfairL1),
|
||||
Location(self, 53, 0x8F8BAC, LocationType.Chozo, "Hi-Jump Boots",
|
||||
lambda items: items.CanOpenRedDoors() and items.CanPassBombPassages()),
|
||||
Location(self, 55, 0x8F8BE6, LocationType.Visible, "Missile (Hi-Jump Boots)",
|
||||
lambda items: items.CanOpenRedDoors() and items.Morph),
|
||||
Location(self, 56, 0x8F8BEC, LocationType.Visible, "Energy Tank (Hi-Jump Boots)",
|
||||
lambda items: items.CanOpenRedDoors())
|
||||
]
|
||||
|
||||
def CanEnter(self, items:Progression):
|
||||
return (items.CanDestroyBombWalls() or items.SpeedBooster) and items.Super and items.Morph or items.CanAccessNorfairUpperPortal()
|
||||
Reference in New Issue
Block a user