Witness: Bugfixes in response to beta tests (#1473)

* Make all Keep Pressure Plates logically required for the Laser Panel

* Added more Tutorial checks

* Added the remaining two Shipwreck Boat EPs to the exclude list for normal

* Improved itempool filling system, added warning if usefuls had to be eaten

* Moved creation of said warning string to utils

* Fixed logic bug causing broken seeds on Mountain Floor 2

* Hints system change

* Expert Logic Fix

* Fixed typo

* Better wording

* Added missing games to junk hints

* Made sure Entrance names are unique

* Fixed missing Obelisk Side

* Disable Non Randomized + EP Shuffle fix

* Fixed disable_non_randomized precompleted EPs being 'disabled' instead of 'precompleted'

* Fixed if/elif error

* Tutorial Gate Open local symbol item becomes local_early_item in expert instead

* Bump required client version. There is a beta client that sends 0.3.9.

* Removed print statement, oops

* Fixed itempool manipulation in pre_fill

* Replaced string concats with fstrings

* Improved make_warning_string function signature

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

* Improved performance on removing multiple items from multiworld itempool

* Comment

* Fixed errors with the code

* Made removal from itempool not fail unit test for multiple references

* Moved all item creation to create_items, got rid of itempool modifying system

* Colored Squares is no longer a good item, that's outdated

* Removed double if

* React to from_pool: false by removing a junk item

* Fixed warning if only Fnc Brain was removed

* Make use of string truthiness instead

* Made reading of plandoed items safer

---------

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
NewSoupVi
2023-03-03 00:08:24 +01:00
committed by GitHub
parent 0cf8206660
commit 805f33c39e
12 changed files with 292 additions and 183 deletions

View File

@@ -27,20 +27,18 @@ class WitnessRegions:
)
def connect(self, world: MultiWorld, player: int, source: str, target: str, player_logic: WitnessPlayerLogic,
panel_hex_to_solve_set=frozenset({frozenset()})):
panel_hex_to_solve_set=frozenset({frozenset()}), backwards: bool = False):
"""
connect two regions and set the corresponding requirement
"""
source_region = world.get_region(source, player)
target_region = world.get_region(target, player)
#print(source_region)
#print(target_region)
#print("---")
backwards = " Backwards" if backwards else ""
connection = Entrance(
player,
source + " to " + target,
source + " to " + target + backwards,
source_region
)
@@ -92,10 +90,18 @@ class WitnessRegions:
self.connect(world, player, region_name, connection[0], player_logic, frozenset({frozenset()}))
continue
backwards_connections = set()
for subset in connection[1]:
if all({panel in player_logic.DOOR_ITEMS_BY_ID for panel in subset}):
if all({reference_logic.CHECKS_BY_HEX[panel]["id"] is None for panel in subset}):
self.connect(world, player, connection[0], region_name, player_logic, frozenset({subset}))
backwards_connections.add(subset)
if backwards_connections:
self.connect(
world, player, connection[0], region_name, player_logic,
frozenset(backwards_connections), True
)
self.connect(world, player, region_name, connection[0], player_logic, connection[1])