mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
rename has_blunt_weapon to has_melee_weapon
This commit is contained in:
@@ -523,7 +523,7 @@ class CollectionState(object):
|
||||
return basemagic >= smallmagic
|
||||
|
||||
def can_kill_most_things(self, player: int, enemies=5) -> bool:
|
||||
return (self.has_blunt_weapon(player)
|
||||
return (self.has_melee_weapon(player)
|
||||
or self.has('Cane of Somaria', player)
|
||||
or (self.has('Cane of Byrna', player) and (enemies < 6 or self.can_extend_magic(player)))
|
||||
or self.can_shoot_arrows(player)
|
||||
@@ -554,7 +554,7 @@ class CollectionState(object):
|
||||
def has_beam_sword(self, player: int) -> bool:
|
||||
return self.has('Master Sword', player) or self.has('Tempered Sword', player) or self.has('Golden Sword', player)
|
||||
|
||||
def has_blunt_weapon(self, player: int) -> bool:
|
||||
def has_melee_weapon(self, player: int) -> bool:
|
||||
return self.has_sword(player) or self.has('Hammer', player)
|
||||
|
||||
def has_Mirror(self, player: int) -> bool:
|
||||
|
16
Bosses.py
16
Bosses.py
@@ -17,7 +17,7 @@ def BossFactory(boss, player):
|
||||
def ArmosKnightsDefeatRule(state, player):
|
||||
# Magic amounts are probably a bit overkill
|
||||
return (
|
||||
state.has_blunt_weapon(player) or
|
||||
state.has_melee_weapon(player) or
|
||||
state.can_shoot_arrows(player) or
|
||||
(state.has('Cane of Somaria', player) and state.can_extend_magic(player, 10)) or
|
||||
(state.has('Cane of Byrna', player) and state.can_extend_magic(player, 16)) or
|
||||
@@ -28,7 +28,7 @@ def ArmosKnightsDefeatRule(state, player):
|
||||
|
||||
def LanmolasDefeatRule(state, player):
|
||||
return (
|
||||
state.has_blunt_weapon(player) or
|
||||
state.has_melee_weapon(player) or
|
||||
state.has('Fire Rod', player) or
|
||||
state.has('Ice Rod', player) or
|
||||
state.has('Cane of Somaria', player) or
|
||||
@@ -36,7 +36,7 @@ def LanmolasDefeatRule(state, player):
|
||||
state.can_shoot_arrows(player))
|
||||
|
||||
def MoldormDefeatRule(state, player):
|
||||
return state.has_blunt_weapon(player)
|
||||
return state.has_melee_weapon(player)
|
||||
|
||||
def HelmasaurKingDefeatRule(state, player):
|
||||
# TODO: technically possible with the hammer
|
||||
@@ -48,7 +48,7 @@ def ArrghusDefeatRule(state, player):
|
||||
# TODO: ideally we would have a check for bow and silvers, which combined with the
|
||||
# hookshot is enough. This is not coded yet because the silvers that only work in pyramid feature
|
||||
# makes this complicated
|
||||
if state.has_blunt_weapon(player):
|
||||
if state.has_melee_weapon(player):
|
||||
return True
|
||||
|
||||
return ((state.has('Fire Rod', player) and (state.can_shoot_arrows(player) or state.can_extend_magic(player, 12))) or #assuming mostly gitting two puff with one shot
|
||||
@@ -57,7 +57,7 @@ def ArrghusDefeatRule(state, player):
|
||||
|
||||
def MothulaDefeatRule(state, player):
|
||||
return (
|
||||
state.has_blunt_weapon(player) or
|
||||
state.has_melee_weapon(player) or
|
||||
(state.has('Fire Rod', player) and state.can_extend_magic(player, 10)) or
|
||||
# TODO: Not sure how much (if any) extend magic is needed for these two, since they only apply
|
||||
# to non-vanilla locations, so are harder to test, so sticking with what VT has for now:
|
||||
@@ -67,7 +67,7 @@ def MothulaDefeatRule(state, player):
|
||||
)
|
||||
|
||||
def BlindDefeatRule(state, player):
|
||||
return state.has_blunt_weapon(player) or state.has('Cane of Somaria', player) or state.has('Cane of Byrna', player)
|
||||
return state.has_melee_weapon(player) or state.has('Cane of Somaria', player) or state.has('Cane of Byrna', player)
|
||||
|
||||
def KholdstareDefeatRule(state, player):
|
||||
return (
|
||||
@@ -80,7 +80,7 @@ def KholdstareDefeatRule(state, player):
|
||||
)
|
||||
) and
|
||||
(
|
||||
state.has_blunt_weapon(player) or
|
||||
state.has_melee_weapon(player) or
|
||||
(state.has('Fire Rod', player) and state.can_extend_magic(player, 20)) or
|
||||
# FIXME: this actually only works for the vanilla location for swordless
|
||||
(
|
||||
@@ -93,7 +93,7 @@ def KholdstareDefeatRule(state, player):
|
||||
)
|
||||
|
||||
def VitreousDefeatRule(state, player):
|
||||
return state.can_shoot_arrows(player) or state.has_blunt_weapon(player)
|
||||
return state.can_shoot_arrows(player) or state.has_melee_weapon(player)
|
||||
|
||||
def TrinexxDefeatRule(state, player):
|
||||
if not (state.has('Fire Rod', player) and state.has('Ice Rod', player)):
|
||||
|
@@ -194,7 +194,7 @@ def generate_itempool(world, player):
|
||||
for item in precollected_items:
|
||||
world.push_precollected(ItemFactory(item, player))
|
||||
|
||||
if world.mode[player] == 'standard' and not world.state.has_blunt_weapon(player):
|
||||
if world.mode[player] == 'standard' and not world.state.has_melee_weapon(player):
|
||||
if "Link's Uncle" not in placed_items:
|
||||
found_sword = False
|
||||
found_bow = False
|
||||
|
Reference in New Issue
Block a user