hera and tr superbunny logic
This commit is contained in:
parent
4707c36007
commit
3d021356b8
|
@ -552,6 +552,9 @@ class CollectionState(object):
|
||||||
rules.append(self.has_Pearl(player))
|
rules.append(self.has_Pearl(player))
|
||||||
return all(rules)
|
return all(rules)
|
||||||
|
|
||||||
|
def can_superbunny_mirror_with_sword(self, player):
|
||||||
|
return self.has_Mirror(player) and self.has_sword(player)
|
||||||
|
|
||||||
def can_get_glitched_speed_dw(self, player):
|
def can_get_glitched_speed_dw(self, player):
|
||||||
rules = [self.has_Boots(player), any([self.has('Hookshot', player), self.has_sword(player)])]
|
rules = [self.has_Boots(player), any([self.has('Hookshot', player), self.has_sword(player)])]
|
||||||
if self.world.mode[player] != 'inverted':
|
if self.world.mode[player] != 'inverted':
|
||||||
|
|
27
Rules.py
27
Rules.py
|
@ -767,13 +767,12 @@ def overworld_glitches_rules(world, player):
|
||||||
set_rule(world.get_entrance(clip_spot, player), lambda state: state.has_Mirror(player))
|
set_rule(world.get_entrance(clip_spot, player), lambda state: state.has_Mirror(player))
|
||||||
|
|
||||||
# Locations that you can superbunny mirror into, but need a sword to clear.
|
# Locations that you can superbunny mirror into, but need a sword to clear.
|
||||||
superbunny_mirror_weapon = lambda state: state.has_Mirror(player) and state.has_sword(player)
|
|
||||||
mini_moldorm_cave = world.get_region('Mini Moldorm Cave', player)
|
mini_moldorm_cave = world.get_region('Mini Moldorm Cave', player)
|
||||||
for superbunny_mirror_weapon_region in OWGSets.get_sword_required_superbunny_mirror_regions():
|
for superbunny_mirror_weapon_region in OWGSets.get_sword_required_superbunny_mirror_regions():
|
||||||
region = world.get_region(superbunny_mirror_weapon_region, player)
|
region = world.get_region(superbunny_mirror_weapon_region, player)
|
||||||
if check_is_dark_world(region):
|
if check_is_dark_world(region):
|
||||||
for spot in region.locations:
|
for spot in region.locations:
|
||||||
add_rule(world.get_location(spot, player), superbunny_mirror_weapon, 'or')
|
add_rule(world.get_location(spot, player), lambda state: state.can_superbunny_mirror_with_sword(player), 'or')
|
||||||
|
|
||||||
# Regions that require the boots and some other stuff.
|
# Regions that require the boots and some other stuff.
|
||||||
if world.mode[player] != 'inverted':
|
if world.mode[player] != 'inverted':
|
||||||
|
@ -1341,12 +1340,18 @@ def set_bunny_rules(world, player):
|
||||||
return lambda state: any(rule(state) for rule in options)
|
return lambda state: any(rule(state) for rule in options)
|
||||||
|
|
||||||
def get_rule_to_add(region, location = None):
|
def get_rule_to_add(region, location = None):
|
||||||
if world.logic[player] == 'owglitches' and not any([
|
if world.logic['player'] == 'owglitches':
|
||||||
|
if region.name == 'Tower of Hera (Bottom)' and region.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw():
|
||||||
|
return lambda state: state.can_superbunny_mirror_with_sword(player) or state.has_Pearl(player)
|
||||||
|
if region.name == 'Turtle Rock (Entrance)' and region.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw():
|
||||||
|
return lambda state: state.has_Mirror(player) or state.has_Pearl(player)
|
||||||
|
if not any([
|
||||||
location in OWGSets.get_superbunny_accessible_locations() and region.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw(),
|
location in OWGSets.get_superbunny_accessible_locations() and region.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw(),
|
||||||
region.type == RegionType.Dungeon and region.name != 'Swamp Palace (Entrance)',
|
region.type == RegionType.Dungeon and region.name != 'Swamp Palace (Entrance)',
|
||||||
not region.is_light_world]):
|
not region.is_dark_world]):
|
||||||
return lambda state: state.has_Pearl(player)
|
return lambda state: state.has_Pearl(player)
|
||||||
elif world.logic[player] != 'owglitches' and not region.is_light_world:
|
else:
|
||||||
|
if not region.is_dark_world:
|
||||||
return lambda state: state.has_Pearl(player)
|
return lambda state: state.has_Pearl(player)
|
||||||
|
|
||||||
# in this case we are mixed region.
|
# in this case we are mixed region.
|
||||||
|
@ -1425,12 +1430,18 @@ def set_inverted_bunny_rules(world, player):
|
||||||
return lambda state: any(rule(state) for rule in options)
|
return lambda state: any(rule(state) for rule in options)
|
||||||
|
|
||||||
def get_rule_to_add(region, location = None):
|
def get_rule_to_add(region, location = None):
|
||||||
if world.logic[player] == 'owglitches' and not any([
|
if world.logic['player'] == 'owglitches':
|
||||||
location in OWGSets.get_superbunny_accessible_locations() and region.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw(),
|
if region.name == 'Tower of Hera (Bottom)' and region.name not in OWGSets.get_invalid_mirror_bunny_entrances_lw():
|
||||||
|
return lambda state: state.can_superbunny_mirror_with_sword(player) or state.has_Pearl(player)
|
||||||
|
if region.name == 'Turtle Rock (Entrance)' and region.name not in OWGSets.get_invalid_mirror_bunny_entrances_lw():
|
||||||
|
return lambda state: state.has_Mirror(player) or state.has_Pearl(player)
|
||||||
|
if not any([
|
||||||
|
location in OWGSets.get_superbunny_accessible_locations() and region.name not in OWGSets.get_invalid_mirror_bunny_entrances_lw(),
|
||||||
region.type == RegionType.Dungeon and region.name != 'Swamp Palace (Entrance)',
|
region.type == RegionType.Dungeon and region.name != 'Swamp Palace (Entrance)',
|
||||||
not region.is_dark_world]):
|
not region.is_dark_world]):
|
||||||
return lambda state: state.has_Pearl(player)
|
return lambda state: state.has_Pearl(player)
|
||||||
elif world.logic[player] != 'owglitches' and not region.is_dark_world:
|
else:
|
||||||
|
if not region.is_dark_world:
|
||||||
return lambda state: state.has_Pearl(player)
|
return lambda state: state.has_Pearl(player)
|
||||||
# in this case we are mixed region.
|
# in this case we are mixed region.
|
||||||
# we collect possible options.
|
# we collect possible options.
|
||||||
|
|
Loading…
Reference in New Issue