From 7e0a07263967e5bfd4f99e63ef63728aaee54d33 Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Fri, 31 Dec 2021 16:46:05 -0800 Subject: [PATCH] Fix cane modes to not assume you can kill things with bombs --- BaseClasses.py | 5 +++++ Rom.py | 2 +- Rules.py | 16 ++++++++-------- data/base2current.bps | Bin 89823 -> 89841 bytes 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 2b23197f..ec35c0bf 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1280,6 +1280,11 @@ class CollectionState(object): return self.has_special_weapon_level(player, 1) return (not self.world.bombbag[player] or self.has('Bomb Upgrade (+10)', player)) and ((hasattr(self.world, "override_bomb_check") and self.world.override_bomb_check) or self.can_farm_bombs(player)) + def can_kill_with_bombs(self, player): + if self.world.swords[player] in ['cane', 'somaria', 'byrna']: + return False + return self.can_use_bombs(player) + def can_hit_crystal(self, player): return (self.can_use_bombs(player) or self.can_shoot_arrows(player) diff --git a/Rom.py b/Rom.py index 771ada98..2aa4ab95 100644 --- a/Rom.py +++ b/Rom.py @@ -33,7 +33,7 @@ from source.classes.SFX import randomize_sfx JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '88d2b2f989e71ff7f9ea9811faa4a4d0' +RANDOMIZERBASEHASH = '7f7d8238e3a7254f21a1c6127521feac' class JsonRom(object): diff --git a/Rules.py b/Rules.py index 33455a0b..ff878d1a 100644 --- a/Rules.py +++ b/Rules.py @@ -339,8 +339,8 @@ def global_rules(world, player): set_rule(world.get_entrance('Mire Falling Bridge WN', player), lambda state: state.has_Boots(player) or state.has('Hookshot', player)) # this is due to the fact the the door opposite is blocked set_rule(world.get_entrance('Mire 2 NE', player), lambda state: state.special_weapon_check(player, 1) and (state.has_real_sword(player) or - (state.has('Fire Rod', player) and (state.can_use_bombs(player) or state.can_extend_magic(player, 9))) or # 9 fr shots or 8 with some bombs - (state.has('Ice Rod', player) and state.can_use_bombs(player)) or # freeze popo and throw, bomb to finish + (state.has('Fire Rod', player) and (state.can_kill_with_bombs(player) or state.can_extend_magic(player, 9))) or # 9 fr shots or 8 with some bombs + (state.has('Ice Rod', player) and state.can_kill_with_bombs(player)) or # freeze popo and throw, bomb to finish state.has('Hammer', player) or state.has('Cane of Somaria', player) or state.can_shoot_arrows(player) or state.has_special_weapon_level(player, 1))) # need to defeat wizzrobes, bombs don't work ... # byrna could work with sufficient magic set_rule(world.get_location('Misery Mire - Spike Chest', player), lambda state: (state.world.can_take_damage and state.has_hearts(player, 4)) or state.has('Cane of Byrna', player) or state.has('Cape', player)) @@ -527,7 +527,7 @@ def global_rules(world, player): set_rule(world.get_entrance('Mire Conveyor to Crystal', player), lambda state: state.can_hit_crystal(player)) set_rule(world.get_entrance('Mire Tall Dark and Roomy to Ranged Crystal', player), lambda state: True) # Can always throw pots - set_rule(world.get_entrance('Mire Fishbone Blue Barrier Bypass', player), lambda state: False) # (state.world.can_take_damage or state.has('Cape', player) or state.has('Cane of Byrna', player)) and state.can_tastate.can_use_bombs(player) // Easy to do but obscure. Should it be in logic? + set_rule(world.get_entrance('Mire Fishbone Blue Barrier Bypass', player), lambda state: False) # (state.world.can_take_damage or state.has('Cape', player) or state.has('Cane of Byrna', player)) and state.can_use_bombs(player) // Easy to do but obscure. Should it be in logic? set_rule(world.get_location('Turtle Rock - Chain Chomps', player), lambda state: state.can_reach('TR Chain Chomps Top', 'Region', player) and state.can_hit_crystal_through_barrier(player)) set_rule(world.get_entrance('TR Chain Chomps Top to Bottom Barrier - Orange', player), lambda state: state.can_reach_orange(world.get_region('TR Chain Chomps Top', player), player)) @@ -632,9 +632,9 @@ def bomb_rules(world, player): cave_kill_locations = ['Mini Moldorm Cave - Far Left', 'Mini Moldorm Cave - Far Right', 'Mini Moldorm Cave - Left', 'Mini Moldorm Cave - Right', 'Mini Moldorm Cave - Generous Guy', 'Spiral Cave'] for location in cave_kill_locations: - add_rule(world.get_location(location, player), lambda state: state.can_kill_most_things(player) or state.can_use_bombs(player)) + add_rule(world.get_location(location, player), lambda state: state.can_kill_most_things(player) or state.can_kill_with_bombs(player)) add_bunny_rule(world.get_location(location, player), player) - add_rule(world.get_entrance('Spiral Cave (top to bottom)', player), lambda state: state.can_kill_most_things(player) or state.can_use_bombs(player)) + add_rule(world.get_entrance('Spiral Cave (top to bottom)', player), lambda state: state.can_kill_most_things(player) or state.can_kill_with_bombs(player)) add_bunny_rule(world.get_entrance('Spiral Cave (top to bottom)', player), player) paradox_switch_chests = ['Paradox Cave Lower - Far Left', 'Paradox Cave Lower - Left', 'Paradox Cave Lower - Right', 'Paradox Cave Lower - Far Right', 'Paradox Cave Lower - Middle'] @@ -660,11 +660,11 @@ def bomb_rules(world, player): ] for killdoor,bombable in easy_kill_rooms: if bombable: - add_rule(world.get_entrance(killdoor, player), lambda state: (state.can_use_bombs(player) or state.can_kill_most_things(player))) + add_rule(world.get_entrance(killdoor, player), lambda state: (state.can_kill_with_bombs(player) or state.can_kill_most_things(player))) else: add_rule(world.get_entrance(killdoor, player), lambda state: state.can_kill_most_things(player)) add_rule(world.get_entrance('Ice Stalfos Hint SE', player), lambda state: state.can_use_bombs(player)) # Need bombs for big stalfos knights - add_rule(world.get_entrance('Mire Cross ES', player), lambda state: state.can_kill_most_things(player)) # 4 Sluggulas. Bombs don't work // or (state.can_use_bombs(player) and state.has('Magic Powder'), player) + add_rule(world.get_entrance('Mire Cross ES', player), lambda state: state.can_kill_most_things(player)) # 4 Sluggulas. Bombs don't work // or (state.can_kill_with_bombs(player) and state.has('Magic Powder'), player) enemy_kill_drops = [ # Location, bool-bombable ('Hyrule Castle - Map Guard Key Drop', True), @@ -686,7 +686,7 @@ def bomb_rules(world, player): ] for location,bombable in enemy_kill_drops: if bombable: - add_rule(world.get_location(location, player), lambda state: state.can_use_bombs(player) or state.can_kill_most_things(player)) + add_rule(world.get_location(location, player), lambda state: state.can_kill_with_bombs(player) or state.can_kill_most_things(player)) else: add_rule(world.get_location(location, player), lambda state: state.can_kill_most_things(player)) diff --git a/data/base2current.bps b/data/base2current.bps index 53614d8debe5f475d8f2f50ab6f0431bcfccfab6..16ef5b3d63bde1584178b87ad0d6cf94ca84df4e 100644 GIT binary patch delta 2074 zcmW;N3s6&68VB&4n+Jr1BqBv{1BP1!vAoniEYB!nsYH#BD)O+wCmOX?MBd50kyuj* zG5N#@DdrXkG-5W4*VnG&TCj{p*J*a`?z(PkE#2)R$a-5OTI!a)?3|hNJ9FloZ_b>V z|2f}Y zcQeFP=rrSZAul9dc<~`MswS-XRX859Bp5xTlE_y49k>y)Ny1jZEev&{ZQ~?`&w~U} zD(Z&Kq72cY5o&bwoWo+qOX&_#7()B$esL2*hv`fSmpi9z(vel&*0ptW(-kBByPHLu ztcM9B-binnRffs;j!?VaRbK?+?}ICmFL!mX-!vm(ek#^NXfTZbJs~!lY7-fQTS5hrv4EU*&#%x8Y-w=P;O-_^Z0+ zmm#9Sun>$jINAZ9)oef|@UmthQb9uPrdxYY3ye72-i%mlblL&Fq(WeNg!} zoUSX)Xpc^}#u98%ZN3M?d{TyAUJ^CTk9($mjx`P|J6Qd)D4oZW^z(4fS^2)gTL#HG6M=U=#XZZ%}%ya4QDtz&fZGK&M9-QL9F06Wos#yG5SC<_C|u#2{%ee){GR*j3( z%ehW(swRztX^zy=fbqzrqi3f3j67mLP#ie(q0uuka$Gi{@h+Lk)S2~%+-+L-G(0l! z*@y23!>g~v{6bba4P=$Y;H;anD5w5YDLAi(n4<&YxBp_xDK!{N6a{25j2&GRto<_k z)$iXL-v)7wk0ddp6cIkC@Yd6kMpG&sW`tO2-G-))NH@l@=+t_s`x-9v*n(C!G?9%? zHLUKP7qng1L>_nUqAPk6FgB46cL7!|cHgm5!jX3hej2NUjrIS+~BY42v%}i+Q zE5Q8Qe?tHk~$}4vxZMj{lX>$40dWP>togA$_mv(sHNBopRqAQ)A z?oUIat(FP%Yx-C51fh-@0JD7mrWIsbjkhUfj@;j{-u_|QOi?bL#q zt!vx|qRlO{?Md{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