From e6c6b00109c6aa6e31816bb50b9fb74e7f234a19 Mon Sep 17 00:00:00 2001 From: AkumaGath17 <98751776+AkumaGath17@users.noreply.github.com> Date: Fri, 28 Oct 2022 10:34:46 +0200 Subject: [PATCH] Minecraft: Two by two logical requirement fix (#1152) * [Minecraft] Two by two logical requirement fix * Two by two update * Two by Two logical fix [Description in order] * Two by Two fix [Bucket only= False] Along with the others isolated items checks --- test/minecraft/TestAdvancements.py | 5 +++-- worlds/minecraft/Rules.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/minecraft/TestAdvancements.py b/test/minecraft/TestAdvancements.py index 6ddebcbf..f86d5a73 100644 --- a/test/minecraft/TestAdvancements.py +++ b/test/minecraft/TestAdvancements.py @@ -312,9 +312,10 @@ class TestAdvancements(TestMinecraft): ["Two by Two", False, [], ['Flint and Steel']], ["Two by Two", False, [], ['Progressive Tools']], ["Two by Two", False, [], ['Progressive Weapons']], - ["Two by Two", False, ['Progressive Tools', 'Progressive Tools'], ['Bucket', 'Progressive Tools']], + ["Two by Two", False, [], ['Bucket']], + ["Two by Two", False, ['Progressive Tools', 'Progressive Tools'], ['Bucket', 'Progressive Tools']], + ["Two by Two", False, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Progressive Tools', 'Progressive Tools', 'Progressive Weapons']], ["Two by Two", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Bucket', 'Progressive Weapons']], - ["Two by Two", True, ['Progressive Resource Crafting', 'Progressive Tools', 'Flint and Steel', 'Progressive Tools', 'Progressive Tools', 'Progressive Weapons']], ]) def test_42023(self): diff --git a/worlds/minecraft/Rules.py b/worlds/minecraft/Rules.py index ecdb4597..06576d70 100644 --- a/worlds/minecraft/Rules.py +++ b/worlds/minecraft/Rules.py @@ -173,7 +173,7 @@ def set_advancement_rules(world: MultiWorld, player: int): state.can_reach("Hero of the Village", "Location", player)) # Bad Omen, Hero of the Village set_rule(world.get_location("Bullseye", player), lambda state: state.has("Archery", player) and state.has("Progressive Tools", player, 2) and state._mc_has_iron_ingots(player)) set_rule(world.get_location("Spooky Scary Skeleton", player), lambda state: state._mc_basic_combat(player)) - set_rule(world.get_location("Two by Two", player), lambda state: state._mc_has_iron_ingots(player) and state._mc_can_adventure(player)) # shears > seagrass > turtles; nether > striders; gold carrots > horses skips ingots + set_rule(world.get_location("Two by Two", player), lambda state: state._mc_has_iron_ingots(player) and state.has("Bucket", player) and state._mc_can_adventure(player)) # shears > seagrass > turtles; buckets of tropical fish > axolotls; nether > striders; gold carrots > horses skips ingots # set_rule(world.get_location("Stone Age", player), lambda state: True) set_rule(world.get_location("Two Birds, One Arrow", player), lambda state: state._mc_craft_crossbow(player) and state._mc_can_enchant(player)) # set_rule(world.get_location("We Need to Go Deeper", player), lambda state: True)