Skip to content

Commit

Permalink
v1.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbrq committed Sep 29, 2024
1 parent 42eac31 commit 27eca18
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
33 changes: 16 additions & 17 deletions worlds/gl/GauntletLegendsClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ async def obj_read(self, mode=0):
log_arr += [arr for arr in b.split]
output_folder = user_path("logs")
os.makedirs(output_folder, exist_ok=True)
self.output_file = os.path.join(output_folder, f"({datetime.datetime.now().strftime('%Y-%m-%d - %I-%M-%S-%p')}) Gauntlet Legends RAMSTATE - {level_names[(self.current_level[1] << 4) + self.current_level[0]]}.txt")
_id = self.current_level[0]
if self.current_level[1] == 1:
_id = castle_id.index(self.current_level[0]) + 1
self.output_file = os.path.join(output_folder, f"({datetime.datetime.now().strftime('%Y-%m-%d - %I-%M-%S-%p')}) Gauntlet Legends RAMSTATE - {level_names[(self.current_level[1] << 4) + _id]}.txt")
with open(self.output_file, 'w+') as f:
for i, arr in enumerate(log_arr):
f.write(f"0x{format(OBJ_ADDR + (0x3C * i), 'x')}: " + " ".join(f"{int(byte):02x}" for byte in arr) + '\n')
Expand Down Expand Up @@ -656,7 +659,7 @@ async def scout_locations(self, ctx: "GauntletLegendsContext") -> None:
elif "Barrel" in location.name and "Barrel of Gold" not in location.name:
if self.glslotdata["barrels"]:
raw_locations += [location]
else:
elif "Mirror" not in location.name:
raw_locations += [location]
await ctx.send_msgs(
[
Expand All @@ -678,7 +681,6 @@ async def scout_locations(self, ctx: "GauntletLegendsContext") -> None:
if "Obelisk" in items_by_id.get(item.item, ItemData(0, "", ItemClassification.filler)).item_name
and item.player == self.slot
]
logger.info(f"Obelisks: {len(self.obelisks)}")
self.useful = [
item
for item in self.location_scouts
Expand All @@ -690,7 +692,6 @@ async def scout_locations(self, ctx: "GauntletLegendsContext") -> None:
self.obelisk_locations = [
location for location in raw_locations if location.id in [item.location for item in self.obelisks]
]
logger.info(f"Obelisk Locations: {len(self.obelisk_locations)}")
self.item_locations = [
location for location in raw_locations
if ("Chest" not in location.name
Expand Down Expand Up @@ -770,11 +771,10 @@ async def level_status(self, ctx: "GauntletLegendsContext") -> bool:
dead = await self.dead()
boss = await self.boss()
if portaling or dead or (self.current_level in boss_level and boss == 0):
if self.in_game:
if portaling or (self.current_level in boss_level and boss == 0):
self.clear_counts[str(self.current_level)] = self.clear_counts.get(str(self.current_level), 0) + 1
if self.current_level in mirror_levels:
await ctx.send_msgs(
if portaling or (self.current_level in boss_level and boss == 0):
self.clear_counts[str(self.current_level)] = self.clear_counts.get(str(self.current_level), 0) + 1
if self.current_level in mirror_levels:
await ctx.send_msgs(
[
{
"cmd": "LocationChecks",
Expand All @@ -788,14 +788,13 @@ async def level_status(self, ctx: "GauntletLegendsContext") -> bool:
},
],
)
if dead and not (self.current_level in boss_level and boss == 0):
if self.deathlink_triggered:
self.deathlink_triggered = False
elif self.ignore_deathlink:
self.ignore_deathlink = False
else:
if self.deathlink_enabled:
await ctx.send_death(f"{ctx.auth} didn't eat enough meat.")
if dead and not (self.current_level in boss_level and boss == 0):
if self.deathlink_triggered:
self.deathlink_triggered = False
elif self.ignore_deathlink:
self.ignore_deathlink = False
elif self.deathlink_enabled:
await ctx.send_death(f"{ctx.auth} didn't eat enough meat.")
self.var_reset()
return True
return False
Expand Down
4 changes: 2 additions & 2 deletions worlds/gl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ def fill_slot_data(self) -> dict:
cshard = self.get_location("Chimera's Keep - Chimera Mirror Shard").item
fshard = self.get_location("Vat of the Plague Fiend - Plague Fiend Mirror Shard").item
shard_values = [
item_dict[fshard.code] if fshard.player == self.player else [0x27, 0x4],
item_dict[dshard.code] if dshard.player == self.player else [0x27, 0x4],
item_dict[yshard.code] if yshard.player == self.player else [0x27, 0x4],
item_dict[cshard.code] if cshard.player == self.player else [0x27, 0x4],
item_dict[dshard.code] if dshard.player == self.player else [0x27, 0x4],
item_dict[fshard.code] if fshard.player == self.player else [0x27, 0x4],
]
characters = [
self.options.unlock_character_one.value,
Expand Down

0 comments on commit 27eca18

Please sign in to comment.