diff --git a/worlds/gl/GauntletLegendsClient.py b/worlds/gl/GauntletLegendsClient.py index 97926d48dae9..48f101323282 100644 --- a/worlds/gl/GauntletLegendsClient.py +++ b/worlds/gl/GauntletLegendsClient.py @@ -615,9 +615,17 @@ async def scout_locations(self, ctx: "GauntletLegendsContext") -> None: _id = level[0] if level[1] == 1: _id = castle_id.index(level[0]) + 1 - raw_locations = [ - location for location in level_locations.get((level[1] << 4) + _id, []) if self.difficulty >= location.difficulty - ] + raw_locations = [] + for location in level_locations.get((level[1] << 4) + _id, []): + if "Chest" in location.name: + if self.glslotdata["chests"]: + raw_locations += [location] + elif "Barrel" in location.name and "Barrel of Gold" not in location.name: + if self.glslotdata["barrels"]: + raw_locations += [location] + else: + if self.difficulty >= location.difficulty: + raw_locations += [location] await ctx.send_msgs( [ { @@ -708,7 +716,7 @@ async def dead(self) -> bool: temp = await self.socket.read(message_format(READ, f"0x{format(PLAYER_KILL, 'x')} 1")) if (temp[0] & 0xF) == 0x1: self.ignore_deathlink = True - return (temp[0] & 0xF) == 0x8 or (temp[0] & 0xF) == 0x1 + return ((temp[0] & 0xF) == 0x8) or ((temp[0] & 0xF) == 0x1) # Returns a number that tells if the player is fighting a boss currently async def boss(self) -> int: @@ -747,7 +755,8 @@ async def level_status(self, ctx: "GauntletLegendsContext") -> bool: elif self.ignore_deathlink: self.ignore_deathlink = False else: - await ctx.send_death(f"{ctx.auth} didn't eat enough meat.") + if self.deathlink_enabled: + await ctx.send_death(f"{ctx.auth} didn't eat enough meat.") await self.var_reset() return True return False diff --git a/worlds/gl/Items.py b/worlds/gl/Items.py index 3a2c2c33338c..8c384038757b 100644 --- a/worlds/gl/Items.py +++ b/worlds/gl/Items.py @@ -86,29 +86,29 @@ class GLItem(Item): "Light Potion": 50, "Acid Potion": 50, "Fire Potion": 50, - "Acid Breath": 33, - "Lightning Breath": 33, - "Fire Breath": 33, - "Light Amulet": 32, - "Acid Amulet": 32, - "Lightning Amulet": 32, - "Fire Amulet": 35, - "Lightning Shield": 33, - "Fire Shield": 33, - "Invisibility": 34, - "Levitate": 32, - "Speed Boots": 33, - "3-Way Shot": 37, - "5-Way Shot": 33, - "Rapid Fire": 36, - "Reflective Shot": 37, - "Reflective Shield": 33, - "Super Shot": 33, - "Timestop": 33, - "Phoenix Familiar": 37, - "Growth": 36, - "Shrink": 35, - "Thunder Hammer": 35, + "Acid Breath": 50, + "Lightning Breath": 50, + "Fire Breath": 50, + "Light Amulet": 50, + "Acid Amulet": 50, + "Lightning Amulet": 50, + "Fire Amulet": 50, + "Lightning Shield": 50, + "Fire Shield": 50, + "Invisibility": 50, + "Levitate": 50, + "Speed Boots": 50, + "3-Way Shot": 50, + "5-Way Shot": 50, + "Rapid Fire": 50, + "Reflective Shot": 50, + "Reflective Shield": 50, + "Super Shot": 50, + "Timestop": 50, + "Phoenix Familiar": 50, + "Growth": 50, + "Shrink": 50, + "Thunder Hammer": 50, "Invulnerability": 25, "Fruit": 100, "Meat": 100, diff --git a/worlds/gl/Rom.py b/worlds/gl/Rom.py index eaa7f293c8ca..bf4abc655b9a 100644 --- a/worlds/gl/Rom.py +++ b/worlds/gl/Rom.py @@ -235,17 +235,17 @@ def locations_to_dict(locations: List[Location]) -> Dict[str, Tuple]: def patch_docks(data: LevelData) -> LevelData: data.stream.seek(0x19AC, 0) - data.stream.write(bytes([0x2, 0xF0, 0x0, 0x18, 0x1, 0x6F])) - data.stream.seek(0x80, 0) - data.stream.write(bytes([0x3, 0x4E, 0x0, 0x1A, 0x1, 0x32])) + data.stream.write(bytes([0x3, 0x20, 0x0, 0x18, 0x1, 0x7C])) + data.stream.seek(0x74, 0) + data.stream.write(bytes([0x3, 0x0, 0x0, 0x1A, 0x1, 0x8])) return data def patch_camp(data: LevelData) -> LevelData: data.stream.seek(0x1B74, 0) - data.stream.write(bytes([0xFF, 0x2, 0x0, 0x3B, 0xFF, 0xF9])) + data.stream.write(bytes([0xFE, 0xE9, 0x0, 0x3B, 0xFF, 0xDC, 0x0, 0x10])) data.stream.seek(0x1B64, 0) - data.stream.write(bytes([0xFE, 0x6B, 0x0, 0x3D, 0xFF, 0xEE])) + data.stream.write(bytes([0xFE, 0x84, 0x0, 0x3D, 0xFF, 0xE0, 0xFF, 0xF0])) return data diff --git a/worlds/gl/__init__.py b/worlds/gl/__init__.py index 320dcb96573c..8b4409b5d720 100644 --- a/worlds/gl/__init__.py +++ b/worlds/gl/__init__.py @@ -2,8 +2,9 @@ import typing import settings -from BaseClasses import ItemClassification, Tutorial +from BaseClasses import ItemClassification, Tutorial, Item, Location from Fill import fast_fill +from typing import List from worlds.AutoWorld import WebWorld, World @@ -152,10 +153,13 @@ def fill_slot_data(self) -> dict: self.options.unlock_character_three.value, self.options.unlock_character_four.value, ] + chests_barrels = self.options.chests_barrels.value return { "player": self.player, "players": self.options.local_players.value, "shards": shard_values, + "chests": bool(chests_barrels == 3 or chests_barrels == 1), + "barrels": bool(chests_barrels == 3 or chests_barrels == 2), "speed": self.options.permanent_speed.value, "keys": self.options.infinite_keys.value, "characters": characters, @@ -223,8 +227,12 @@ def set_rules(self) -> None: "Gates of the Underworld", "Region", self.player, ) - def pre_fill(self) -> None: - locations = self.multiworld.get_unfilled_locations(self.player) + def fill_hook(self, + progitempool: List["Item"], + usefulitempool: List["Item"], + filleritempool: List["Item"], + fill_locations: List["Location"]) -> None: + locations = [location for location in fill_locations if location.player == self.player] items = [item for item in self.multiworld.itempool if item.name == "Death" and item.player == self.player] self.random.shuffle(locations) fast_fill(self.multiworld, items, locations)