lufia2ac: fix client behavior at max blue chests combined with party member or capsule monster shuffle (#2478)

When option combinations at (or near) the maximum location count were used, the client could trip over a wrongly coded limit and stop sending checks.
This commit is contained in:
el-u 2023-11-24 01:59:41 +01:00 committed by GitHub
parent 2f6b6838cd
commit 205c6acb49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 3 deletions

View File

@ -113,7 +113,7 @@ class L2ACSNIClient(SNIClient):
}],
}])
total_blue_chests_checked: int = min(sum(blue_chests_checked.values()), BlueChestCount.range_end)
total_blue_chests_checked: int = min(sum(blue_chests_checked.values()), BlueChestCount.overall_max)
snes_buffered_write(ctx, L2AC_TX_ADDR + 8, total_blue_chests_checked.to_bytes(2, "little"))
location_ids: List[int] = [locations_start_id + i for i in range(total_blue_chests_checked)]

View File

@ -6,7 +6,7 @@ from .Options import BlueChestCount
start_id: int = 0xAC0000
l2ac_location_name_to_id: Dict[str, int] = {
**{f"Blue chest {i + 1}": (start_id + i) for i in range(BlueChestCount.range_end + 7 + 6)},
**{f"Blue chest {i + 1}": (start_id + i) for i in range(BlueChestCount.overall_max)},
**{f"Iris treasure {i + 1}": (start_id + 0x039C + i) for i in range(9)},
"Boss": start_id + 0x01C2,
}

View File

@ -121,6 +121,7 @@ class BlueChestCount(Range):
range_start = 10
range_end = 100
default = 25
overall_max = range_end + 7 + 6 # Have to account for capsule monster and party member items
class Boss(RandomGroupsChoice):

View File

@ -66,7 +66,7 @@ class L2ACWorld(World):
"Party members": {name for name, data in l2ac_item_table.items() if data.type is ItemType.PARTY_MEMBER},
}
data_version: ClassVar[int] = 2
required_client_version: Tuple[int, int, int] = (0, 4, 2)
required_client_version: Tuple[int, int, int] = (0, 4, 4)
# L2ACWorld specific properties
rom_name: bytearray