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:
parent
2f6b6838cd
commit
205c6acb49
|
@ -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"))
|
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)]
|
location_ids: List[int] = [locations_start_id + i for i in range(total_blue_chests_checked)]
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ from .Options import BlueChestCount
|
||||||
start_id: int = 0xAC0000
|
start_id: int = 0xAC0000
|
||||||
|
|
||||||
l2ac_location_name_to_id: Dict[str, int] = {
|
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)},
|
**{f"Iris treasure {i + 1}": (start_id + 0x039C + i) for i in range(9)},
|
||||||
"Boss": start_id + 0x01C2,
|
"Boss": start_id + 0x01C2,
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,6 +121,7 @@ class BlueChestCount(Range):
|
||||||
range_start = 10
|
range_start = 10
|
||||||
range_end = 100
|
range_end = 100
|
||||||
default = 25
|
default = 25
|
||||||
|
overall_max = range_end + 7 + 6 # Have to account for capsule monster and party member items
|
||||||
|
|
||||||
|
|
||||||
class Boss(RandomGroupsChoice):
|
class Boss(RandomGroupsChoice):
|
||||||
|
|
|
@ -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},
|
"Party members": {name for name, data in l2ac_item_table.items() if data.type is ItemType.PARTY_MEMBER},
|
||||||
}
|
}
|
||||||
data_version: ClassVar[int] = 2
|
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
|
# L2ACWorld specific properties
|
||||||
rom_name: bytearray
|
rom_name: bytearray
|
||||||
|
|
Loading…
Reference in New Issue