TUNIC: Better logic for Library Lab glass and Fortress leaf piles #3880

This commit is contained in:
Scipio Wright 2024-09-17 17:57:55 -04:00 committed by GitHub
parent dc218b7997
commit 4ea1dddd2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 2 deletions

View File

@ -1339,13 +1339,26 @@ def set_er_location_rules(world: "TunicWorld") -> None:
set_rule(world.get_location("Frog's Domain - Escape Chest"), set_rule(world.get_location("Frog's Domain - Escape Chest"),
lambda state: state.has_any({grapple, laurels}, player)) lambda state: state.has_any({grapple, laurels}, player))
# Library Lab
set_rule(world.get_location("Library Lab - Page 1"),
lambda state: has_stick(state, player) or state.has_any((fire_wand, gun), player))
set_rule(world.get_location("Library Lab - Page 2"),
lambda state: has_stick(state, player) or state.has_any((fire_wand, gun), player))
set_rule(world.get_location("Library Lab - Page 3"),
lambda state: has_stick(state, player) or state.has_any((fire_wand, gun), player))
# Eastern Vault Fortress # Eastern Vault Fortress
set_rule(world.get_location("Fortress Arena - Hexagon Red"), set_rule(world.get_location("Fortress Arena - Hexagon Red"),
lambda state: state.has(vault_key, player)) lambda state: state.has(vault_key, player))
# yes, you can clear the leaves with dagger
# gun isn't included since it can only break one leaf pile at a time, and we don't check how much mana you have
# but really, I expect the player to just throw a bomb at them if they don't have melee
set_rule(world.get_location("Fortress Leaf Piles - Secret Chest"),
lambda state: has_stick(state, player) or state.has(ice_dagger, player))
# Beneath the Vault # Beneath the Vault
set_rule(world.get_location("Beneath the Fortress - Bridge"), set_rule(world.get_location("Beneath the Fortress - Bridge"),
lambda state: state.has_group("Melee Weapons", player, 1) or state.has_any({laurels, fire_wand}, player)) lambda state: has_stick(state, player) or state.has_any({laurels, fire_wand}, player))
# Quarry # Quarry
set_rule(world.get_location("Quarry - [Central] Above Ladder Dash Chest"), set_rule(world.get_location("Quarry - [Central] Above Ladder Dash Chest"),

View File

@ -296,9 +296,20 @@ def set_location_rules(world: "TunicWorld") -> None:
set_rule(world.get_location("Frog's Domain - Escape Chest"), set_rule(world.get_location("Frog's Domain - Escape Chest"),
lambda state: state.has_any({grapple, laurels}, player)) lambda state: state.has_any({grapple, laurels}, player))
# Library Lab
set_rule(world.get_location("Library Lab - Page 1"),
lambda state: has_stick(state, player) or state.has_any((fire_wand, gun), player))
set_rule(world.get_location("Library Lab - Page 2"),
lambda state: has_stick(state, player) or state.has_any((fire_wand, gun), player))
set_rule(world.get_location("Library Lab - Page 3"),
lambda state: has_stick(state, player) or state.has_any((fire_wand, gun), player))
# Eastern Vault Fortress # Eastern Vault Fortress
# yes, you can clear the leaves with dagger
# gun isn't included since it can only break one leaf pile at a time, and we don't check how much mana you have
# but really, I expect the player to just throw a bomb at them if they don't have melee
set_rule(world.get_location("Fortress Leaf Piles - Secret Chest"), set_rule(world.get_location("Fortress Leaf Piles - Secret Chest"),
lambda state: state.has(laurels, player)) lambda state: state.has(laurels, player) and (has_stick(state, player) or state.has(ice_dagger, player)))
set_rule(world.get_location("Fortress Arena - Siege Engine/Vault Key Pickup"), set_rule(world.get_location("Fortress Arena - Siege Engine/Vault Key Pickup"),
lambda state: has_sword(state, player) lambda state: has_sword(state, player)
and (has_ability(prayer, state, world) and (has_ability(prayer, state, world)