diff --git a/Doors.py b/Doors.py index 26d474cc..a7c1d9f3 100644 --- a/Doors.py +++ b/Doors.py @@ -435,7 +435,7 @@ def create_doors(world, player): create_door(player, 'PoD Dark Basement W Up Stairs', Sprl).dir(Up, 0x6a, 0, HTH).ss(S, 0x1b, 0x3c, True), create_door(player, 'PoD Dark Basement E Up Stairs', Sprl).dir(Up, 0x6a, 1, HTH).ss(S, 0x1b, 0x9c, True), create_door(player, 'PoD Dark Alley NE', Nrml).dir(No, 0x6a, Right, High).big_key().pos(0), - create_door(player, 'PoD Mimics 2 SW', Nrml).dir(So, 0x1b, Left, High).pos(1).kill().portal(Z, 0x00), + create_door(player, 'PoD Mimics 2 SW', Nrml).dir(So, 0x1b, Left, High).pos(1).portal(Z, 0x00), create_door(player, 'PoD Mimics 2 NW', Intr).dir(No, 0x1b, Left, High).pos(0), create_door(player, 'PoD Bow Statue SW', Intr).dir(So, 0x1b, Left, High).pos(0), create_door(player, 'PoD Bow Statue Left to Right Barrier - Orange', Lgcl), @@ -1467,6 +1467,11 @@ def create_doors(world, player): world.get_door('GT Spike Crystal Right to Left Barrier - Orange', player).barrier(CrystalBarrier.Orange) world.get_door('GT Spike Crystal Left to Right Bypass', player).barrier(CrystalBarrier.Blue) + # kill certain doors + if world.intensity[player] == 1: # due to ladder & warp being fixed + world.get_door('PoD Mimics 2 SW', player).kill() + + # nifty dynamic logical doors: south_controller = world.get_door('Ice Cross Bottom SE', player) east_controller = world.get_door('Ice Cross Right ES', player) diff --git a/Fill.py b/Fill.py index 1b6d5b75..a4468e7d 100644 --- a/Fill.py +++ b/Fill.py @@ -172,7 +172,8 @@ def valid_key_placement(item, location, key_pool, world): if key_logic.prize_location: prize_loc = world.get_location(key_logic.prize_location, location.player) cr_count = world.crystals_needed_for_gt[location.player] - return key_logic.check_placement(unplaced_keys, location if item.bigkey else None, prize_loc, cr_count) + wild_keys = world.keyshuffle[item.player] + return key_logic.check_placement(unplaced_keys, wild_keys, location if item.bigkey else None, prize_loc, cr_count) else: return not item.is_inside_dungeon_item(world) diff --git a/ItemList.py b/ItemList.py index 29ef71da..7c252859 100644 --- a/ItemList.py +++ b/ItemList.py @@ -545,7 +545,7 @@ def fill_prizes(world, attempts=15): continue break else: - raise FillError("Unable to place dungeon prizes: {}".format(", ".join(list(map(lambda d: d.hint_text, prize_locs))))) + raise FillError(f'Unable to place dungeon prizes {", ".join(list(map(lambda d: d.hint_text, prize_locs)))}') def set_up_shops(world, player): diff --git a/KeyDoorShuffle.py b/KeyDoorShuffle.py index d8c1b73f..fc250852 100644 --- a/KeyDoorShuffle.py +++ b/KeyDoorShuffle.py @@ -62,9 +62,9 @@ class KeyLogic(object): self.sm_doors = {} self.prize_location = None - def check_placement(self, unplaced_keys, big_key_loc=None, prize_loc=None, cr_count=7): + def check_placement(self, unplaced_keys, wild_keys, big_key_loc=None, prize_loc=None, cr_count=7): for rule in self.placement_rules: - if not rule.is_satisfiable(self.outside_keys, unplaced_keys, big_key_loc, prize_loc, cr_count): + if not rule.is_satisfiable(self.outside_keys, wild_keys, unplaced_keys, big_key_loc, prize_loc, cr_count): return False if big_key_loc: for rule_a, rule_b in itertools.combinations(self.placement_rules, 2): @@ -158,7 +158,7 @@ class PlacementRule(object): left -= rule_needed return False - def is_satisfiable(self, outside_keys, unplaced_keys, big_key_loc, prize_location, cr_count): + def is_satisfiable(self, outside_keys, wild_keys, unplaced_keys, big_key_loc, prize_location, cr_count): if self.prize_relevance and prize_location: if self.prize_relevance == 'BigBomb': if prize_location.item.name not in ['Crystal 5', 'Crystal 6']: @@ -186,17 +186,20 @@ class PlacementRule(object): if not bk_blocked and check_locations is None: return True available_keys = outside_keys - empty_chests = 0 # todo: sometimes we need an extra empty chest to accomodate the big key too # dungeon bias seed 563518200 for example threshold = self.needed_keys_wo_bk if bk_blocked else self.needed_keys_w_bk - for loc in check_locations: - if not loc.item: - empty_chests += 1 - elif loc.item and loc.item.name == self.small_key: - available_keys += 1 - place_able_keys = min(empty_chests, unplaced_keys) - available_keys += place_able_keys + if not wild_keys: + empty_chests = 0 + for loc in check_locations: + if not loc.item: + empty_chests += 1 + elif loc.item and loc.item.name == self.small_key: + available_keys += 1 + place_able_keys = min(empty_chests, unplaced_keys) + available_keys += place_able_keys + else: + available_keys += unplaced_keys return available_keys >= threshold diff --git a/Main.py b/Main.py index 2483bb62..dd8590d0 100644 --- a/Main.py +++ b/Main.py @@ -32,7 +32,7 @@ from Utils import output_path, parse_player_names from source.item.FillUtil import create_item_pool_config, massage_item_pool, district_item_pool_config from source.tools.BPS import create_bps_from_data -__version__ = '1.0.1.2-u' +__version__ = '1.0.1.3-u' from source.classes.BabelFish import BabelFish diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 1e059997..dcb80a60 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -183,6 +183,9 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o #### Unstable +* 1.0.1.3 + * Fix for rain prevented doors fouling up key doors + * Couple minor issues * 1.0.1.2 * Removed "good bee" as an in-logic way of killing Mothula * Fixed an issue with Mystery generation and Windows path diff --git a/Rom.py b/Rom.py index 598df466..a552ef90 100644 --- a/Rom.py +++ b/Rom.py @@ -38,7 +38,7 @@ from source.dungeon.RoomList import Room0127 JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '831beb6f60c3c99467552493b3ce6f19' +RANDOMIZERBASEHASH = '0aa072c020b0c1167c3e618b571efbbe' class JsonRom(object): diff --git a/asm/owrando.asm b/asm/owrando.asm index 04ffd047..c709fc43 100644 --- a/asm/owrando.asm +++ b/asm/owrando.asm @@ -157,9 +157,9 @@ db 2, 2, 0, 0 ; Coordinate Index $20-$23 OWOppCoordIndex: ; Horizontal 1st db 0, 0, 2, 2 ; Coordinate Index $20-$23 OWBGIndex: ; Horizontal 1st -db 0, 0, 6, 6 ; BG Scroll Index $e2-$ea +db 0, 0, 6, 6 ; BG Scroll Index $e0-$eb OWOppBGIndex: ; Horizontal 1st -db 6, 6, 0, 0 ; BG Scroll Index $e2-$ea +db 6, 6, 0, 0 ; BG Scroll Index $e0-$eb OWCameraIndex: ; Horizontal 1st db 4, 4, 0, 0 ; Camera Index $0618-$61f OWOppCameraIndex: ; Horizontal 1st diff --git a/data/base2current.bps b/data/base2current.bps index b7f58d18..aa3ecc07 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ