Exemplo n.º 1
0
 def CanDefeatBotwoon(self, items: Progression):
     if self.Logic == SMLogic.Normal:
         return items.SpeedBooster or items.CanAccessMaridiaPortal(
             self.world)
     else:
         return items.Ice or items.SpeedBooster and items.Gravity or items.CanAccessMaridiaPortal(
             self.world)
Exemplo n.º 2
0
 def CanReachAqueduct(self, items: Progression):
     if self.Logic == SMLogic.Normal:
         return items.CardMaridiaL1 and (items.CanFly() or items.SpeedBooster or items.Grapple) \
                 or items.CardMaridiaL2 and items.CanAccessMaridiaPortal(self.world)
     else:
         return items.CardMaridiaL1 and (items.Gravity or items.HiJump and (items.Ice or items.CanSpringBallJump()) and items.Grapple) \
                 or items.CardMaridiaL2 and items.CanAccessMaridiaPortal(self.world)
Exemplo n.º 3
0
 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.Ice or items.HiJump or items.SpaceJump)
     else:
         return (items.CanDestroyBombWalls() or items.SpeedBooster) and items.Super and items.Morph or \
             items.CanAccessNorfairUpperPortal() and (items.Ice or items.CanSpringBallJump() or items.HiJump or items.CanFly())
Exemplo n.º 4
0
 def CanEnter(self, items: Progression):
     return items.MoonPearl and (
         (self.world.CanAquire(items, RewardType.Agahnim)
          or items.CanAccessDarkWorldPortal(self.Config) and items.Flippers)
         and items.Hookshot and
         (items.Flippers or items.CanLiftLight() or items.Hammer)
         or items.Hammer and items.CanLiftLight() or items.CanLiftHeavy())
Exemplo n.º 5
0
 def CanEnter(self, items: Progression):
     if self.Logic == SMLogic.Normal:
         return items.Gravity and (
             self.world.CanEnter("Norfair Upper West", items)
             and items.Super and items.CanUsePowerBombs() and
             (items.CanFly() or items.SpeedBooster or items.Grapple)
             or items.CanAccessMaridiaPortal(self.world))
     else:
         return items.Super and self.world.CanEnter("Norfair Upper West", items) and items.CanUsePowerBombs() and (
                 items.Gravity or items.HiJump and (items.Ice or items.CanSpringBallJump()) and items.Grapple) or \
             items.CanAccessMaridiaPortal(self.world)
Exemplo n.º 6
0
 def CanEnterAndLeaveGauntlet(self, items: Progression):
     if self.Logic == SMLogic.Normal:
         return items.CardCrateriaL1 and items.Morph and (
             items.CanFly() or items.SpeedBooster) and (
                 items.CanIbj() or items.CanUsePowerBombs()
                 and items.TwoPowerBombs or items.ScrewAttack)
     else:
         return items.CardCrateriaL1 and (
             items.Morph and (items.Bombs or items.TwoPowerBombs)
             or items.ScrewAttack or items.SpeedBooster
             and items.CanUsePowerBombs() and items.HasEnergyReserves(2))
Exemplo n.º 7
0
 def CanDefeatDraygon(self, items: Progression):
     if self.Logic == SMLogic.Normal:
         return (items.CardMaridiaL1 and items.CardMaridiaL2
                 and self.CanDefeatBotwoon(items)
                 or items.CanAccessMaridiaPortal(self.world)
                 ) and items.CardMaridiaBoss and items.Gravity and (
                     items.SpeedBooster and items.HiJump or items.CanFly())
     else:
         return (items.CardMaridiaL1 and items.CardMaridiaL2
                 and self.CanDefeatBotwoon(items)
                 or items.CanAccessMaridiaPortal(self.world)
                 ) and items.CardMaridiaBoss and items.Gravity
Exemplo n.º 8
0
 def CanEnter(self, items:Progression):
     if self.Logic == SMLogic.Normal:
         return items.Varia and items.CardLowerNorfairL1 and (
                 self.world.CanEnter("Norfair Upper East", items) and items.CanUsePowerBombs() and items.SpaceJump and items.Gravity or
                 items.CanAccessNorfairLowerPortal() and items.CanDestroyBombWalls() and items.Super and items.CanUsePowerBombs() and items.CanFly())
     else:
         return items.Varia and items.CardLowerNorfairL1 and (
                 self.world.CanEnter("Norfair Upper East", items) and items.CanUsePowerBombs() and (items.HiJump or items.Gravity) or
                 items.CanAccessNorfairLowerPortal() and items.CanDestroyBombWalls() and items.Super and (items.CanFly() or items.CanSpringBallJump() or items.SpeedBooster)) and (
             items.CanFly() or items.HiJump or items.CanSpringBallJump() or items.Ice and items.Charge) and (
             items.CanPassBombPassages() or items.ScrewAttack and items.SpaceJump)                     
Exemplo n.º 9
0
 def CanExit(self, items:Progression):
     if self.Logic == SMLogic.Normal:
             # /*Bubble Mountain*/
         return items.CardNorfairL2 or (
             # /* Volcano Room and Blue Gate */
             items.Gravity) and items.Wave and (
             # /*Spikey Acid Snakes and Croc Escape*/
             items.Grapple or items.SpaceJump)
     else:
         # /*Vanilla LN Escape*/
         return (items.Morph and (items.CardNorfairL2 or # /*Bubble Mountain*/ 
                                     (items.Missile or items.Super or items.Wave) and # /* Blue Gate */
                                 (items.SpeedBooster or items.CanFly() or items.Grapple or items.HiJump and 
                                 (items.CanSpringBallJump() or items.Ice))) or # /*Frog Speedway or Croc Escape*/
             # /*Reverse Amphitheater*/
                 items.HasEnergyReserves(5))
Exemplo n.º 10
0
 def CanEnter(self, items: Progression):
     if self.Logic == SMLogic.Normal:
         return items.Gravity and (
             self.world.CanEnter("Norfair Upper West", items)
             and items.CanUsePowerBombs()
             or items.CanAccessMaridiaPortal(self.world)
             and items.CardMaridiaL1 and items.CardMaridiaL2 and
             (items.CanPassBombPassages() or items.ScrewAttack))
     else:
         return self.world.CanEnter(
             "Norfair Upper West", items) and items.CanUsePowerBombs() and (
                 items.Gravity or items.HiJump and
                 (items.CanSpringBallJump() or items.Ice)) or (
                     items.CanAccessMaridiaPortal(self.world)
                 ) and items.CardMaridiaL1 and items.CardMaridiaL2 and (
                     items.CanPassBombPassages() or items.Gravity
                     and items.ScrewAttack or items.Super and
                     (items.Gravity or items.HiJump and
                      (items.CanSpringBallJump() or items.Ice)))
Exemplo n.º 11
0
 def CanEnter(self, items:Progression):
     if self.Logic == SMLogic.Normal:
         return items.Varia and (
                 self.world.CanEnter("Norfair Upper East", items) and items.CanUsePowerBombs() and items.SpaceJump and items.Gravity and (
                     # /* Trivial case, Bubble Mountain access */
                     items.CardNorfairL2 or
                     # /* Frog Speedway -> UN Farming Room gate */
                     items.SpeedBooster and items.Wave
                 ) or
                 items.CanAccessNorfairLowerPortal() and items.CanDestroyBombWalls()
             )
     else:
         return self.world.CanEnter("Norfair Upper East", items) and items.CanUsePowerBombs() and items.Varia and (items.HiJump or items.Gravity) and (
                 # /* Trivial case, Bubble Mountain access */
                 items.CardNorfairL2 or
                 # /* Frog Speedway -> UN Farming Room gate */
                 items.SpeedBooster and (items.Missile or items.Super or items.Wave) # /* Blue Gate */
             ) or items.CanAccessNorfairLowerPortal() and items.CanDestroyBombWalls()
Exemplo n.º 12
0
 def CanBeatArmos(self, items: Progression):
     return items.Sword or items.Hammer or items.Bow or \
         items.CanExtendMagic(2) and (items.Somaria or items.Byrna) or \
         items.CanExtendMagic(4) and (items.Firerod or items.Icerod)
Exemplo n.º 13
0
 def TowerAscend(self, items: Progression):
     return items.BigKeyGT and items.KeyGT >= 3 and items.Bow and items.CanLightTorches(
     )
Exemplo n.º 14
0
 def CanEnter(self, items: Progression):
     return items.CanKillManyEnemies() and (items.Cape or items.MasterSword)
Exemplo n.º 15
0
 def AvailableGlobal(locations, items):
     progression = Progression(items)
     return [l for l in locations if l.Available(progression)]
Exemplo n.º 16
0
 def CanEnter(self, items: Progression):
     return (items.Bombos if self.Medallion == ItemType.Bombos else (
                 items.Ether if self.Medallion == ItemType.Ether else items.Quake)) and items.Sword and \
         items.MoonPearl and items.CanLiftHeavy() and items.Hammer and items.Somaria and \
         self.world.CanEnter("Light World Death Mountain East", items)
Exemplo n.º 17
0
 def CanEnter(self, items: Progression):
     return items.Book or \
         items.Mirror and items.CanLiftHeavy() and items.Flute or \
         items.CanAccessMiseryMirePortal(self.Config) and items.Mirror
Exemplo n.º 18
0
 def CanEnter(self, items: Progression):
     return (
         items.CanDestroyBombWalls() or items.SpeedBooster
     ) and items.Super and items.Morph or items.CanAccessNorfairUpperPortal(
     )
Exemplo n.º 19
0
 def CanEnter(self, items: Progression):
     if self.Logic == SMLogic.Normal:
         return items.CanOpenRedDoors() and (items.CanDestroyBombWalls() or items.SpeedBooster) or \
         items.CanUsePowerBombs() or \
         items.CanAccessNorfairUpperPortal() and items.Morph and items.Wave and \
             (items.Ice or items.HiJump or items.SpaceJump)
     else:
         return items.CanOpenRedDoors() and (items.CanDestroyBombWalls() or items.SpeedBooster) or \
             items.CanUsePowerBombs() or \
             items.CanAccessNorfairUpperPortal() and items.Morph and (items.CanOpenRedDoors() or items.Wave) and \
                 (items.Ice or items.HiJump or items.CanSpringBallJump() or items.CanFly())
Exemplo n.º 20
0
 def CanEnter(self, items: Progression):
     if self.Logic == SMLogic.Normal:
         # /* Ship -> Moat */
         return (
             items.CardCrateriaL2 if self.Config.Keysanity else
             items.CanUsePowerBombs()) and items.Super or (
                 # /* UN Portal -> Red Tower -> Moat
                 items.CardCrateriaL2
                 if self.Config.Keysanity else items.CanUsePowerBombs()
             ) and items.CanAccessNorfairUpperPortal(
             ) and (items.Ice or items.HiJump or items.SpaceJump) or (
                 # /*Through Maridia From Portal*/
                 items.CanAccessMaridiaPortal(self.world)
             ) and items.Gravity and items.Super and (
                 # /* Oasis -> Forgotten Highway */
                 items.CardMaridiaL2 and items.CanDestroyBombWalls() or (
                     # /* Draygon -> Cactus Alley -> Forgotten Highway */
                     self.world.GetLocation("Space Jump").Available(items))
             ) or (
                 # /*Through Maridia from Pipe*/
                 items.CanUsePowerBombs()) and items.Super and items.Gravity
     else:
         # /* Ship -> Moat */
         return (
             items.CardCrateriaL2
             if self.Config.Keysanity else items.CanUsePowerBombs()
         ) and items.Super or (
             # /* UN Portal -> Red Tower -> Moat */
             items.CardCrateriaL2
             if self.Config.Keysanity else items.CanUsePowerBombs()
         ) and items.CanAccessNorfairUpperPortal() and (
             items.Ice or items.HiJump or items.CanFly()
             or items.CanSpringBallJump()) or (
                 # /*Through Maridia From Portal*/
                 items.CanAccessMaridiaPortal(self.world)) and (
                     # /* Oasis -> Forgotten Highway */
                     items.CardMaridiaL2 and items.Super and
                     (items.HiJump and items.CanPassBombPassages()
                      or items.Gravity and items.CanDestroyBombWalls()) or
                     # /* Draygon -> Cactus Alley -> Forgotten Highway */
                     items.Gravity and self.world.GetLocation(
                         "Space Jump").Available(items)) or (
                             # /*Through Maridia from Pipe*/
                             items.CanUsePowerBombs()) and items.Super and (
                                 items.Gravity or items.HiJump and
                                 (items.Ice or items.CanSpringBallJump())
                                 and items.Grapple and items.CardMaridiaL1)
Exemplo n.º 21
0
 def CanEnter(self, items: Progression):
     return items.CanDestroyBombWalls() or items.SpeedBooster
Exemplo n.º 22
0
 def CanEnter(self, items: Progression):
     return items.MoonPearl and items.Flippers and items.CanLiftHeavy(
     ) and items.CanMeltFreezors()
Exemplo n.º 23
0
 def CanEnter(self, items: Progression):
     return items.CanLiftHeavy() and self.world.CanEnter(
         "Light World Death Mountain East", items)
Exemplo n.º 24
0
 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)
Exemplo n.º 25
0
 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())
Exemplo n.º 26
0
 def CanEnter(self, items: Progression):
     if self.Logic == SMLogic.Normal:
         return items.Super and (
             # /* Over the Moat */
             (items.CardCrateriaL2
              if self.Config.Keysanity else items.CanUsePowerBombs()) and
             (items.SpeedBooster or items.Grapple or items.SpaceJump
              or items.Gravity and (items.CanIbj() or items.HiJump)) or
             # /* Through Maridia -> Forgotten Highway */
             items.CanUsePowerBombs() and items.Gravity or
             # /* From Maridia portal -> Forgotten Highway */
             items.CanAccessMaridiaPortal(self.world) and items.Gravity and
             (items.CanDestroyBombWalls() and items.CardMaridiaL2
              or self.world.GetLocation("Space Jump").Available(items)))
     else:
         return items.Super and (
             # /* Over the Moat */
             (items.CardCrateriaL2
              if self.Config.Keysanity else items.CanUsePowerBombs()) or
             # /* Through Maridia -> Forgotten Highway */
             items.CanUsePowerBombs() and
             (items.Gravity or
              # /* Climb Mt. Everest */
              items.HiJump and (items.Ice or items.CanSpringBallJump())
              and items.Grapple and items.CardMaridiaL1) or
             # /* From Maridia portal -> Forgotten Highway */
             items.CanAccessMaridiaPortal(self.world) and
             (items.HiJump and items.CanPassBombPassages()
              and items.CardMaridiaL2 or items.Gravity and
              (items.CanDestroyBombWalls() and items.CardMaridiaL2
               or self.world.GetLocation("Space Jump").Available(items))))
Exemplo n.º 27
0
 def CanFillWithinWorld(locations, item, items):
     itemWorldProgression = Progression([i for i in items if i.World == item.World].append(item))
     worldList = []
     [worldList.append(l.Region.World) for l in locations if l.Region.World not in worldList]
     worldProgression = {world.Id : Progression([i for i in items if i.World == world]) for world in worldList}
     return [l for l in locations if l.CanFill(item, worldProgression[l.Region.World.Id] and next(ll for ll in item.World.Locations if ll.Id == l.Id).Available(itemWorldProgression))]
Exemplo n.º 28
0
 def CanEnter(self, items: Progression):
     return items.Flute and items.CanLiftHeavy(
     ) or items.CanAccessMiseryMirePortal(Config)
Exemplo n.º 29
0
 def CanUnlockShip(self, items: Progression):
     return items.CardWreckedShipBoss and items.CanPassBombPassages()
Exemplo n.º 30
0
 def CanEnter(self, items: Progression):
     return (items.CanDestroyBombWalls() or items.SpeedBooster or items.CanAccessNorfairUpperPortal()) and \
         items.Super and items.CanPassBombPassages()