class TestInvertedBombRules(unittest.TestCase): def setUp(self): self.world = MultiWorld(1) self.world.mode[1] = "inverted" args = Namespace for name, option in AutoWorld.AutoWorldRegister.world_types[ "A Link to the Past"].options.items(): setattr(args, name, {1: option.from_any(option.default)}) self.world.set_options(args) self.world.set_default_common_options() self.world.difficulty_requirements[1] = difficulties['normal'] create_inverted_regions(self.world, 1) create_dungeons(self.world, 1) #TODO: Just making sure I haven't missed an entrance. It would be good to test the rules make sense as well. def testInvertedBombRulesAreComplete(self): entrances = list(Inverted_LW_Entrances + Inverted_LW_Dungeon_Entrances + Inverted_LW_Single_Cave_Doors + Inverted_Old_Man_Entrances + Inverted_DW_Entrances + Inverted_DW_Dungeon_Entrances + Inverted_DW_Single_Cave_Doors) must_exits = list(Inverted_LW_Entrances_Must_Exit + Inverted_LW_Dungeon_Entrances_Must_Exit) for entrance_name in (entrances + must_exits): if entrance_name not in [ 'Desert Palace Entrance (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave (Bottom)' ]: entrance = self.world.get_entrance(entrance_name, 1) connect_entrance(self.world, entrance_name, 'Inverted Big Bomb Shop', 1) set_inverted_big_bomb_rules(self.world, 1) entrance.connected_region.entrances.remove(entrance) entrance.connected_region = None def testInvalidEntrancesAreNotUsed(self): entrances = list(Inverted_Blacksmith_Multi_Cave_Doors + Blacksmith_Single_Cave_Doors + Inverted_Bomb_Shop_Multi_Cave_Doors + Inverted_Bomb_Shop_Single_Cave_Doors) invalid_entrances = [ 'Desert Palace Entrance (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave (Bottom)', 'Pyramid Fairy' ] for invalid_entrance in invalid_entrances: self.assertNotIn(invalid_entrance, entrances) def testInvalidEntrances(self): for entrance_name in [ 'Desert Palace Entrance (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave (Bottom)' ]: entrance = self.world.get_entrance(entrance_name, 1) connect_entrance(self.world, entrance_name, 'Inverted Big Bomb Shop', 1) with self.assertRaises(Exception): set_inverted_big_bomb_rules(self.world, 1) entrance.connected_region.entrances.remove(entrance) entrance.connected_region = None
class TestDungeon(unittest.TestCase): def setUp(self): self.world = MultiWorld(1) self.starting_regions = [] # Where to start exploring self.remove_exits = [] # Block dungeon exits self.world.difficulty_requirements[1] = difficulties['normal'] create_regions(self.world, 1) create_dungeons(self.world, 1) create_shops(self.world, 1) for exitname, regionname in mandatory_connections: connect_simple(self.world, exitname, regionname, 1) connect_simple(self.world, 'Big Bomb Shop', 'Big Bomb Shop', 1) self.world.get_region('Menu', 1).exits = [] self.world.swamp_patch_required[1] = True set_rules(self.world, 1) generate_itempool(self.world, 1) self.world.itempool.extend(get_dungeon_item_pool(self.world)) self.world.itempool.extend(ItemFactory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], 1)) def run_tests(self, access_pool): for exit in self.remove_exits: self.world.get_entrance(exit, 1).connected_region = self.world.get_region('Menu', 1) for location, access, *item_pool in access_pool: items = item_pool[0] all_except = item_pool[1] if len(item_pool) > 1 else None with self.subTest(location=location, access=access, items=items, all_except=all_except): if all_except and len(all_except) > 0: items = self.world.itempool[:] items = [item for item in items if item.name not in all_except and not ("Bottle" in item.name and "AnyBottle" in all_except)] items.extend(ItemFactory(item_pool[0], 1)) else: items = ItemFactory(items, 1) state = CollectionState(self.world) state.reachable_regions[1].add(self.world.get_region('Menu', 1)) for region_name in self.starting_regions: region = self.world.get_region(region_name, 1) state.reachable_regions[1].add(region) for exit in region.exits: if exit.connected_region is not None: state.blocked_connections[1].add(exit) for item in items: item.advancement = True state.collect(item) self.assertEqual(self.world.get_location(location, 1).can_reach(state), access)
def link_regions(world: MultiWorld, player: int): world.get_entrance('Hollow Nest S&Q', player).connect(world.get_region('Hollow Nest', player))
def create_regions(world: MultiWorld, player: int): regions = ["First", "Second", "Third", "Last"] bosses = ["Meridian", "Ataraxia", "Merodach"] for x, name in enumerate(regions): fullname = f"{name} Quarter" insidename = fullname if x == 0: insidename = "Menu" region = Region(insidename, RegionType.Generic, fullname, player, world) for store in [ "Alpha Cache", "Beta Cache", "Gamma Cache", "Reward Chest" ]: for y in range(1, 7): loc_name = f"{store} {(x * 6) + y}" region.locations += [ MeritousLocation(player, loc_name, location_table[loc_name], region) ] if x < 3: storage_loc = f"PSI Key Storage {x + 1}" region.locations += [ MeritousLocation(player, storage_loc, location_table[storage_loc], region) ] region.exits += _generate_entrances(player, [f"To {bosses[x]}"], region) else: locations_end_game = [ "Place of Power", "The Last Place You'll Look" ] region.locations += [ MeritousLocation(player, loc_name, location_table[loc_name], region) for loc_name in locations_end_game ] region.exits += _generate_entrances(player, [ "Back to the entrance", "Back to the entrance with the Knife" ], region) world.regions += [region] for x, boss in enumerate(bosses): boss_region = Region(boss, RegionType.Generic, boss, player, world) boss_region.locations += [ MeritousLocation(player, boss, location_table[boss], boss_region), MeritousLocation(player, f"{boss} Defeat", None, boss_region) ] boss_region.exits = _generate_entrances( player, [f"To {regions[x + 1]} Quarter"], boss_region) world.regions.append(boss_region) region_final_boss = Region("Final Boss", RegionType.Generic, "Final Boss", player, world) region_final_boss.locations = [ MeritousLocation(player, "Wervyn Anixil", None, region_final_boss) ] world.regions.append(region_final_boss) region_tfb = Region("True Final Boss", RegionType.Generic, "True Final Boss", player, world) region_tfb.locations = [ MeritousLocation(player, "Wervyn Anixil?", None, region_tfb) ] world.regions.append(region_tfb) entrance_map = { "To Meridian": { "to": "Meridian", "rule": lambda state: state.has_group("PSI Keys", player, 1) and state. has_group("Important Artifacts", player, 1) }, "To Second Quarter": { "to": "Second Quarter", "rule": lambda state: state.has("Meridian Defeated", player) }, "To Ataraxia": { "to": "Ataraxia", "rule": lambda state: state.has_group("PSI Keys", player, 2) and state. has_group("Important Artifacts", player, 2) }, "To Third Quarter": { "to": "Third Quarter", "rule": lambda state: state.has("Ataraxia Defeated", player) }, "To Merodach": { "to": "Merodach", "rule": lambda state: state.has_group("PSI Keys", player, 3) and state. has_group("Important Artifacts", player, 3) }, "To Last Quarter": { "to": "Last Quarter", "rule": lambda state: state.has("Merodach Defeated", player) }, "Back to the entrance": { "to": "Final Boss", "rule": lambda state: state.has("Cursed Seal", player) }, "Back to the entrance with the Knife": { "to": "True Final Boss", "rule": lambda state: state.has_all(["Cursed Seal", "Agate Knife"], player) } } for entrance in entrance_map: connection_data = entrance_map[entrance] connection = world.get_entrance(entrance, player) connection.access_rule = connection_data["rule"] connection.connect(world.get_region(connection_data["to"], player))
def set_advancement_rules(world: MultiWorld, player: int): # Retrieves the appropriate structure compass for the given entrance def get_struct_compass(entrance_name): struct = world.get_entrance(entrance_name, player).connected_region.name return f"Structure Compass ({struct})" set_rule( world.get_entrance("Nether Portal", player), lambda state: state.has('Flint and Steel', player) and (state.has( 'Bucket', player) or state.has('Progressive Tools', player, 3)) and state._mc_has_iron_ingots(player)) set_rule( world.get_entrance("End Portal", player), lambda state: state._mc_enter_stronghold(player) and state.has( '3 Ender Pearls', player, 4)) set_rule( world.get_entrance("Overworld Structure 1", player), lambda state: state._mc_can_adventure(player) and state. _mc_has_structure_compass("Overworld Structure 1", player)) set_rule( world.get_entrance("Overworld Structure 2", player), lambda state: state._mc_can_adventure(player) and state. _mc_has_structure_compass("Overworld Structure 2", player)) set_rule( world.get_entrance("Nether Structure 1", player), lambda state: state._mc_can_adventure(player) and state. _mc_has_structure_compass("Nether Structure 1", player)) set_rule( world.get_entrance("Nether Structure 2", player), lambda state: state._mc_can_adventure(player) and state. _mc_has_structure_compass("Nether Structure 2", player)) set_rule( world.get_entrance("The End Structure", player), lambda state: state._mc_can_adventure(player) and state. _mc_has_structure_compass("The End Structure", player)) set_rule(world.get_location("Ender Dragon", player), lambda state: state._mc_can_kill_ender_dragon(player)) set_rule(world.get_location("Wither", player), lambda state: state._mc_can_kill_wither(player)) set_rule(world.get_location("Blaze Spawner", player), lambda state: state._mc_fortress_loot(player)) set_rule(world.get_location("Who is Cutting Onions?", player), lambda state: state._mc_can_piglin_trade(player)) set_rule(world.get_location("Oh Shiny", player), lambda state: state._mc_can_piglin_trade(player)) set_rule( world.get_location("Suit Up", player), lambda state: state.has( "Progressive Armor", player) and state._mc_has_iron_ingots(player)) set_rule( world.get_location("Very Very Frightening", player), lambda state: state.has("Channeling Book", player) and state. _mc_can_use_anvil(player) and state._mc_can_enchant( player) and state._mc_overworld_villager(player)) set_rule( world.get_location("Hot Stuff", player), lambda state: state.has( "Bucket", player) and state._mc_has_iron_ingots(player)) set_rule( world.get_location("Free the End", player), lambda state: state._mc_can_respawn_ender_dragon( player) and state._mc_can_kill_ender_dragon(player)) set_rule( world.get_location("A Furious Cocktail", player), lambda state: state._mc_can_brew_potions(player) and state.has( "Fishing Rod", player) and # Water Breathing state.can_reach('The Nether', 'Region', player ) and # Regeneration, Fire Resistance, gold nuggets state.can_reach('Village', 'Region', player ) and # Night Vision, Invisibility state.can_reach('Bring Home the Beacon', 'Location', player) ) # Resistance # set_rule(world.get_location("Best Friends Forever", player), lambda state: True) set_rule( world.get_location("Bring Home the Beacon", player), lambda state: state._mc_can_kill_wither( player) and state._mc_has_diamond_pickaxe(player) and state.has( "Progressive Resource Crafting", player, 2)) set_rule( world.get_location("Not Today, Thank You", player), lambda state: state .has("Shield", player) and state._mc_has_iron_ingots(player)) set_rule( world.get_location("Isn't It Iron Pick", player), lambda state: state.has("Progressive Tools", player, 2 ) and state._mc_has_iron_ingots(player)) set_rule(world.get_location("Local Brewery", player), lambda state: state._mc_can_brew_potions(player)) set_rule(world.get_location("The Next Generation", player), lambda state: state._mc_can_kill_ender_dragon(player)) set_rule(world.get_location("Fishy Business", player), lambda state: state.has("Fishing Rod", player)) # set_rule(world.get_location("Hot Tourist Destinations", player), lambda state: True) set_rule( world.get_location("This Boat Has Legs", player), lambda state: (state._mc_fortress_loot(player) or state._mc_complete_raid(player)) and state.has("Saddle", player) and state.has("Fishing Rod", player)) set_rule(world.get_location("Sniper Duel", player), lambda state: state.has("Archery", player)) # set_rule(world.get_location("Nether", player), lambda state: True) set_rule(world.get_location("Great View From Up Here", player), lambda state: state._mc_basic_combat(player)) set_rule( world.get_location("How Did We Get Here?", player), lambda state: state._mc_can_brew_potions( player) and state._mc_has_gold_ingots(player) and # Absorption state.can_reach('End City', 'Region', player) and # Levitation state.can_reach('The Nether', 'Region', player ) and # potion ingredients state.has("Fishing Rod", player) and state.has("Archery", player) and # Pufferfish, Nautilus Shells; spectral arrows state.can_reach("Bring Home the Beacon", "Location", player ) and # Haste 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("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) set_rule(world.get_location("Who's the Pillager Now?", player), lambda state: state._mc_craft_crossbow(player)) set_rule(world.get_location("Getting an Upgrade", player), lambda state: state.has("Progressive Tools", player)) set_rule( world.get_location("Tactical Fishing", player), lambda state: state. has("Bucket", player) and state._mc_has_iron_ingots(player)) set_rule( world.get_location("Zombie Doctor", player), lambda state: state. _mc_can_brew_potions(player) and state._mc_has_gold_ingots(player)) # set_rule(world.get_location("The City at the End of the Game", player), lambda state: True) set_rule(world.get_location("Ice Bucket Challenge", player), lambda state: state._mc_has_diamond_pickaxe(player)) # set_rule(world.get_location("Remote Getaway", player), lambda state: True) set_rule(world.get_location("Into Fire", player), lambda state: state._mc_basic_combat(player)) set_rule(world.get_location("War Pigs", player), lambda state: state._mc_basic_combat(player)) set_rule(world.get_location("Take Aim", player), lambda state: state.has("Archery", player)) set_rule( world.get_location("Total Beelocation", player), lambda state: state.has("Silk Touch Book", player) and state. _mc_can_use_anvil(player) and state._mc_can_enchant(player)) set_rule( world.get_location("Arbalistic", player), lambda state: state._mc_craft_crossbow(player) and state.has( "Piercing IV Book", player) and state._mc_can_use_anvil( player) and state._mc_can_enchant(player)) set_rule( world.get_location("The End... Again...", player), lambda state: state._mc_can_respawn_ender_dragon( player) and state._mc_can_kill_ender_dragon(player)) set_rule(world.get_location("Acquire Hardware", player), lambda state: state._mc_has_iron_ingots(player)) set_rule( world.get_location("Not Quite \"Nine\" Lives", player), lambda state: state._mc_can_piglin_trade(player) and state.has( "Progressive Resource Crafting", player, 2)) set_rule( world.get_location("Cover Me With Diamonds", player), lambda state: state.has("Progressive Armor", player, 2) and state. can_reach("Diamonds!", "Location", player)) set_rule(world.get_location("Sky's the Limit", player), lambda state: state._mc_basic_combat(player)) set_rule( world.get_location("Hired Help", player), lambda state: state.has("Progressive Resource Crafting", player, 2 ) and state._mc_has_iron_ingots(player)) # set_rule(world.get_location("Return to Sender", player), lambda state: True) set_rule( world.get_location("Sweet Dreams", player), lambda state: state.has( "Bed", player) or state.can_reach('Village', 'Region', player)) set_rule( world.get_location("You Need a Mint", player), lambda state: state. _mc_can_respawn_ender_dragon(player) and state._mc_has_bottle(player)) # set_rule(world.get_location("Adventure", player), lambda state: True) set_rule( world.get_location("Monsters Hunted", player), lambda state: state._mc_can_respawn_ender_dragon(player) and state. _mc_can_kill_ender_dragon(player) and state._mc_can_kill_wither(player) and state.has("Fishing Rod", player)) # pufferfish for Water Breathing set_rule(world.get_location("Enchanter", player), lambda state: state._mc_can_enchant(player)) set_rule(world.get_location("Voluntary Exile", player), lambda state: state._mc_basic_combat(player)) set_rule(world.get_location("Eye Spy", player), lambda state: state._mc_enter_stronghold(player)) # set_rule(world.get_location("The End", player), lambda state: True) set_rule( world.get_location("Serious Dedication", player), lambda state: state.can_reach( "Hidden in the Depths", "Location", player) and state._mc_has_gold_ingots(player)) set_rule(world.get_location("Postmortal", player), lambda state: state._mc_complete_raid(player)) # set_rule(world.get_location("Monster Hunter", player), lambda state: True) set_rule(world.get_location("Adventuring Time", player), lambda state: state._mc_can_adventure(player)) # set_rule(world.get_location("A Seedy Place", player), lambda state: True) # set_rule(world.get_location("Those Were the Days", player), lambda state: True) set_rule(world.get_location("Hero of the Village", player), lambda state: state._mc_complete_raid(player)) set_rule(world.get_location("Hidden in the Depths", player), lambda state: state._mc_can_brew_potions(player) and state.has( "Bed", player) and state._mc_has_diamond_pickaxe( player)) # bed mining :) set_rule( world.get_location("Beaconator", player), lambda state: state._mc_can_kill_wither( player) and state._mc_has_diamond_pickaxe(player) and state.has( "Progressive Resource Crafting", player, 2)) set_rule(world.get_location("Withering Heights", player), lambda state: state._mc_can_kill_wither(player)) set_rule( world.get_location("A Balanced Diet", player), lambda state: state._mc_has_bottle(player) and state. _mc_has_gold_ingots(player) and # honey bottle; gapple state.has("Progressive Resource Crafting", player, 2) and state. can_reach('The End', 'Region', player)) # notch apple, chorus fruit set_rule(world.get_location("Subspace Bubble", player), lambda state: state._mc_has_diamond_pickaxe(player)) # set_rule(world.get_location("Husbandry", player), lambda state: True) set_rule( world.get_location("Country Lode, Take Me Home", player), lambda state: state.can_reach( "Hidden in the Depths", "Location", player) and state._mc_has_gold_ingots(player)) set_rule( world.get_location("Bee Our Guest", player), lambda state: state.has( "Campfire", player) and state._mc_has_bottle(player)) # set_rule(world.get_location("What a Deal!", player), lambda state: True) set_rule( world.get_location("Uneasy Alliance", player), lambda state: state._mc_has_diamond_pickaxe(player) and state.has( 'Fishing Rod', player)) set_rule( world.get_location("Diamonds!", player), lambda state: state.has("Progressive Tools", player, 2 ) and state._mc_has_iron_ingots(player)) # set_rule(world.get_location("A Terrible Fortress", player), lambda state: True) # since you don't have to fight anything set_rule(world.get_location("A Throwaway Joke", player), lambda state: state._mc_can_adventure(player)) # kill drowned # set_rule(world.get_location("Minecraft", player), lambda state: True) set_rule( world.get_location("Sticky Situation", player), lambda state: state. has("Campfire", player) and state._mc_has_bottle(player)) set_rule(world.get_location("Ol' Betsy", player), lambda state: state._mc_craft_crossbow(player)) set_rule( world.get_location("Cover Me in Debris", player), lambda state: state.has("Progressive Armor", player, 2) and state.has( "8 Netherite Scrap", player, 2) and state.has( "Progressive Resource Crafting", player) and state.can_reach( "Diamonds!", "Location", player) and state.can_reach( "Hidden in the Depths", "Location", player)) # set_rule(world.get_location("The End?", player), lambda state: True) # set_rule(world.get_location("The Parrots and the Bats", player), lambda state: True) # set_rule(world.get_location("A Complete Catalogue", player), lambda state: True) # kill fish for raw # set_rule(world.get_location("Getting Wood", player), lambda state: True) # set_rule(world.get_location("Time to Mine!", player), lambda state: True) set_rule(world.get_location("Hot Topic", player), lambda state: state.has("Progressive Resource Crafting", player)) # set_rule(world.get_location("Bake Bread", player), lambda state: True) set_rule( world.get_location("The Lie", player), lambda state: state._mc_has_iron_ingots(player) and state.has( "Bucket", player)) set_rule(world.get_location("On a Rail", player), lambda state: state._mc_has_iron_ingots(player) and state.has( 'Progressive Tools', player, 2)) # powered rails # set_rule(world.get_location("Time to Strike!", player), lambda state: True) # set_rule(world.get_location("Cow Tipper", player), lambda state: True) set_rule( world.get_location("When Pigs Fly", player), lambda state: (state._mc_fortress_loot(player) or state._mc_complete_raid(player) ) and state.has("Saddle", player) and state.has( "Fishing Rod", player) and state._mc_can_adventure(player)) set_rule(world.get_location("Overkill", player), lambda state: state._mc_can_brew_potions(player) and (state.has("Progressive Weapons", player) or state.can_reach( 'The Nether', 'Region', player) )) # strength 1 + stone axe crit OR strength 2 + wood axe crit set_rule(world.get_location("Librarian", player), lambda state: state.has("Enchanting", player)) set_rule(world.get_location("Overpowered", player), lambda state: state._mc_has_iron_ingots(player) and state.has( 'Progressive Tools', player, 2) and state._mc_basic_combat( player)) # mine gold blocks w/ iron pick set_rule( world.get_location("Wax On", player), lambda state: state._mc_has_copper_ingots(player) and state.has( 'Campfire', player) and state.has('Progressive Resource Crafting', player, 2)) set_rule( world.get_location("Wax Off", player), lambda state: state._mc_has_copper_ingots(player) and state.has( 'Campfire', player) and state.has('Progressive Resource Crafting', player, 2)) set_rule( world.get_location("The Cutest Predator", player), lambda state: state._mc_has_iron_ingots(player) and state.has( 'Bucket', player)) set_rule( world.get_location("The Healing Power of Friendship", player), lambda state: state._mc_has_iron_ingots(player) and state.has( 'Bucket', player)) set_rule( world.get_location("Is It a Bird?", player), lambda state: state. _mc_has_spyglass(player) and state._mc_can_adventure(player)) set_rule(world.get_location("Is It a Balloon?", player), lambda state: state._mc_has_spyglass(player)) set_rule( world.get_location("Is It a Plane?", player), lambda state: state._mc_has_spyglass( player) and state._mc_can_respawn_ender_dragon(player)) set_rule( world.get_location("Surge Protector", player), lambda state: state.has( "Channeling Book", player) and state._mc_can_use_anvil(player) and state._mc_can_enchant(player) and state._mc_overworld_villager(player)) set_rule( world.get_location("Light as a Rabbit", player), lambda state: state._mc_can_adventure(player) and state. _mc_has_iron_ingots(player) and state.has('Bucket', player)) set_rule(world.get_location("Glow and Behold!", player), lambda state: state._mc_can_adventure(player)) set_rule(world.get_location("Whatever Floats Your Goat!", player), lambda state: state._mc_can_adventure(player)) set_rule( world.get_location("Caves & Cliffs", player), lambda state: state._mc_has_iron_ingots(player) and state.has( 'Bucket', player) and state.has('Progressive Tools', player, 2)) set_rule( world.get_location("Feels like home", player), lambda state: state._mc_has_iron_ingots(player) and state.has( 'Bucket', player) and state.has('Fishing Rod', player) and (state._mc_fortress_loot(player) or state._mc_complete_raid(player) ) and state.has("Saddle", player)) set_rule( world.get_location("Sound of Music", player), lambda state: state.can_reach("Diamonds!", "Location", player ) and state._mc_basic_combat(player)) set_rule( world.get_location("Star Trader", player), lambda state: state._mc_has_iron_ingots(player) and state.has( 'Bucket', player) and (state.can_reach("The Nether", 'Region', player) or state.can_reach( "Nether Fortress", 'Region', player) or state._mc_can_piglin_trade( player)) and # soul sand for water elevator state._mc_overworld_villager(player)) # 1.19 advancements # can make a cake, and can reach a pillager outposts for allays set_rule(world.get_location("Birthday Song", player), lambda state: state.can_reach("The Lie", "Location", player)) # find allay and craft a noteblock set_rule( world.get_location("You've Got a Friend in Me", player), lambda state: state.has("Progressive Tools", player, 2 ) and state._mc_has_iron_ingots(player)) # craft bucket and adventure to find frog spawning biome set_rule( world.get_location("Bukkit Bukkit", player), lambda state: state.has("Bucket", player) and state. _mc_has_iron_ingots(player) and state._mc_can_adventure(player)) # I don't like this one its way to easy to get. just a pain to find. set_rule( world.get_location("It Spreads", player), lambda state: state._mc_can_adventure( player) and state._mc_has_iron_ingots(player) and state.has( "Progressive Tools", player, 2)) # literally just a duplicate of It spreads. set_rule( world.get_location("Sneak 100", player), lambda state: state._mc_can_adventure( player) and state._mc_has_iron_ingots(player) and state.has( "Progressive Tools", player, 2)) set_rule( world.get_location("When the Squad Hops into Town", player), lambda state: state._mc_can_adventure(player) and state.has( "Lead", player)) # lead frogs to the nether and a basalt delta's biomes to find magma cubes. set_rule( world.get_location("With Our Powers Combined!", player), lambda state: state._mc_can_adventure(player) and state.has( "Lead", player))