Key logic rework for placement rules

--exhaustive per key_counter
--contradictions between rules
Mire Lobby chest fix
This commit is contained in:
aerinon
2020-03-20 09:05:07 -06:00
parent 269de35590
commit a18f5c4d51
7 changed files with 290 additions and 100 deletions

View File

@@ -234,7 +234,7 @@ def valid_key_placement(item, location, itempool, world):
return True
key_logic = world.key_logic[item.player][dungeon.name]
unplaced_keys = len([x for x in itempool if x.name == key_logic.small_key_name and x.player == item.player])
return key_logic.check_placement(unplaced_keys)
return key_logic.check_placement(unplaced_keys, location if item.bigkey else None)
else:
inside_dungeon_item = ((item.smallkey and not world.keyshuffle[item.player])
or (item.bigkey and not world.bigkeyshuffle[item.player]))