From 38f81c9ec6e557aef2330dd390ead4daedfdcd4f Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 15:29:35 -0500 Subject: [PATCH 01/58] Base init and folder --- worlds/loonyland/__init__.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 worlds/loonyland/__init__.py diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py new file mode 100644 index 000000000000..f79480dd2b85 --- /dev/null +++ b/worlds/loonyland/__init__.py @@ -0,0 +1,31 @@ +from typing import Dict + +from BaseClasses import Tutorial +from ..AutoWorld import WebWorld, World + +class LoonylandWeb(WebWorld): + options_page = False + theme = 'partyTime' + + setup_en = Tutorial( + tutorial_name='Setup Guide', + description='A guide to playing Loonyland', + language='English', + file_name='setup_en.md', + link='setup/en', + authors=['AutomaticFrenzy'] + ) + + tutorials = [setup_en] + +class LoonylandWorld(World): + """ + Loonyland Halloween Hill + """ + game = "Loonyland" + web = LoonylandWeb() + + item_name_to_id: Dict[str, int] = {} + location_name_to_id: Dict[str, int] = {} + + From 3e37062827f30f050645a68d8427875c9e3abb39 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 15:36:04 -0500 Subject: [PATCH 02/58] Add base docs --- worlds/loonyland/docs/en_Loonyland.md | 27 +++++++++++++++++++++++++++ worlds/loonyland/docs/setup_en.md | 12 ++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 worlds/loonyland/docs/en_Loonyland.md create mode 100644 worlds/loonyland/docs/setup_en.md diff --git a/worlds/loonyland/docs/en_Loonyland.md b/worlds/loonyland/docs/en_Loonyland.md new file mode 100644 index 000000000000..be62ffe586f6 --- /dev/null +++ b/worlds/loonyland/docs/en_Loonyland.md @@ -0,0 +1,27 @@ +# Loonyland + +## Where is the options page? + + +## What does randomization do to this game? + + +## What is the goal of lOONYLAND when randomized? + + +## Which items can be in another player's world? + + +## What is considered a location check in Loonyland? + + +## Why isn't my item where the spoiler says it should be? + + +## What does another world's item look like in Loonyland? +It looks like the Archipelago logo. + +## When the player receives an item, what happens? + + +## What are recommended options to tweak for beginners to the rando? diff --git a/worlds/loonyland/docs/setup_en.md b/worlds/loonyland/docs/setup_en.md new file mode 100644 index 000000000000..05c6c7ab8d4c --- /dev/null +++ b/worlds/loonyland/docs/setup_en.md @@ -0,0 +1,12 @@ +# Setup Guide for Loonyland: Halloween Hill + + +## Important + +## Required Software + +https://github.com/AutomaticFrenzy/HamSandwich + +## Configuring your YAML file + +### What is a YAML file and why do I need one? \ No newline at end of file From f63ec52b624bbdc1cf8f55f0cb4ecbc088834dff Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 15:40:23 -0500 Subject: [PATCH 03/58] add base files --- worlds/loonyland/Items.py | 0 worlds/loonyland/Locations.py | 0 worlds/loonyland/Regions.py | 0 worlds/loonyland/Rules.py | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 worlds/loonyland/Items.py create mode 100644 worlds/loonyland/Locations.py create mode 100644 worlds/loonyland/Regions.py create mode 100644 worlds/loonyland/Rules.py diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/Items.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py new file mode 100644 index 000000000000..e69de29bb2d1 From 6ad74ba07a21a5b2cbe289f01b38905b50b8f223 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 16:44:08 -0500 Subject: [PATCH 04/58] base items commit --- worlds/loonyland/Items.py | 70 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/Items.py index e69de29bb2d1..0ea743e30ecd 100644 --- a/worlds/loonyland/Items.py +++ b/worlds/loonyland/Items.py @@ -0,0 +1,70 @@ +from BaseClasses import Item, ItemClassification +from worlds.AutoWorld import World + + +loonyland_base_id: int 2876900 + +class LoonylandItem(Item): + """ + Item from the game Loonyland + """ + game: str = "Loonyland" + + +class ItemCategory(Enum): + ITEM = 0 + CHEAT = 1 + FILLER = 2 + TRAP = 3 + EVENT = 4 + + +class ItemData(NamedTuple): + category: ItemCategory + classification: ItemClassification + +item_frequencies = { + "Heart": 20, + "Lightning": 10, + "Arrow": 10, + "Pants": 10, + "Mushroom": 10, + "Orb": 4, + "Vamp Statue": 8, + "Big Gem": 6, + "Bat Statue": 4 +} + +item_table: Dict[str, ItemData] = { + "Heart": ItemData(ItemCategory.ITEM, ItemClassification.useful + "Lightning": ItemCategory.ITEM, ItemClassification.useful + "Arrow": ItemCategory.ITEM, ItemClassification.useful + "Pants": ItemCategory.ITEM, ItemClassification.useful + "Mushroom": ItemCategory.ITEM, ItemClassification.progression + "Orb": ItemCategory.ITEM, ItemClassification.progression + "Bombs": ItemCategory.ITEM, ItemClassification.progression + "Shock Wand": ItemCategory.ITEM, ItemClassification.progression + "Ice spear": ItemCategory.ITEM, ItemClassification.progression + "Cactus": ItemCategory.ITEM, ItemClassification.progression + "Boomerang": ItemCategory.ITEM, ItemClassification.progression + "Whoopee": ItemCategory.ITEM, ItemClassification.progression + "Hot Pants": ItemCategory.ITEM, ItemClassification.progression + "Skull Key": ItemCategory.ITEM, ItemClassification.progression + "Bat Key": ItemCategory.ITEM, ItemClassification.progression + "Pumpkin Key": ItemCategory.ITEM, ItemClassification.progression + "Boots": ItemCategory.ITEM, ItemClassification.progression + "Stick": ItemCategory.ITEM, ItemClassification.progression + "Fertilizer": ItemCategory.ITEM, ItemClassification.progression + "Silver": ItemCategory.ITEM, ItemClassification.progression + "Doom Daisy": ItemCategory.ITEM, ItemClassification.progression + "Ghost Potion": ItemCategory.ITEM, ItemClassification.progression + "Vamp Statue": ItemCategory.ITEM, ItemClassification.progression + "Cat": ItemCategory.ITEM, ItemClassification.progression + "Big Gem": ItemCategory.ITEM, ItemClassification.progression + "Zombie Reward": ItemCategory.ITEM, ItemClassification.filler + "3 way": ItemCategory.ITEM, ItemClassification.useful + "Happy Stick": ItemCategory.ITEM, ItemClassification.progression + "Bat Statue": ItemCategory.ITEM, ItemClassification.progression + "Lantern": ItemCategory.ITEM, ItemClassification.progression + "Reflect": ItemCategory.ITEM, ItemClassification.useful + "Silver Sling": ItemCategory.ITEM, ItemClassification.progression \ No newline at end of file From 082dda17dda2a23cda7f9841e24ca50c674bfde6 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 16:45:39 -0500 Subject: [PATCH 05/58] forgot to save --- worlds/loonyland/Items.py | 65 ++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/Items.py index 0ea743e30ecd..0eb648164b2d 100644 --- a/worlds/loonyland/Items.py +++ b/worlds/loonyland/Items.py @@ -36,35 +36,36 @@ class ItemData(NamedTuple): } item_table: Dict[str, ItemData] = { - "Heart": ItemData(ItemCategory.ITEM, ItemClassification.useful - "Lightning": ItemCategory.ITEM, ItemClassification.useful - "Arrow": ItemCategory.ITEM, ItemClassification.useful - "Pants": ItemCategory.ITEM, ItemClassification.useful - "Mushroom": ItemCategory.ITEM, ItemClassification.progression - "Orb": ItemCategory.ITEM, ItemClassification.progression - "Bombs": ItemCategory.ITEM, ItemClassification.progression - "Shock Wand": ItemCategory.ITEM, ItemClassification.progression - "Ice spear": ItemCategory.ITEM, ItemClassification.progression - "Cactus": ItemCategory.ITEM, ItemClassification.progression - "Boomerang": ItemCategory.ITEM, ItemClassification.progression - "Whoopee": ItemCategory.ITEM, ItemClassification.progression - "Hot Pants": ItemCategory.ITEM, ItemClassification.progression - "Skull Key": ItemCategory.ITEM, ItemClassification.progression - "Bat Key": ItemCategory.ITEM, ItemClassification.progression - "Pumpkin Key": ItemCategory.ITEM, ItemClassification.progression - "Boots": ItemCategory.ITEM, ItemClassification.progression - "Stick": ItemCategory.ITEM, ItemClassification.progression - "Fertilizer": ItemCategory.ITEM, ItemClassification.progression - "Silver": ItemCategory.ITEM, ItemClassification.progression - "Doom Daisy": ItemCategory.ITEM, ItemClassification.progression - "Ghost Potion": ItemCategory.ITEM, ItemClassification.progression - "Vamp Statue": ItemCategory.ITEM, ItemClassification.progression - "Cat": ItemCategory.ITEM, ItemClassification.progression - "Big Gem": ItemCategory.ITEM, ItemClassification.progression - "Zombie Reward": ItemCategory.ITEM, ItemClassification.filler - "3 way": ItemCategory.ITEM, ItemClassification.useful - "Happy Stick": ItemCategory.ITEM, ItemClassification.progression - "Bat Statue": ItemCategory.ITEM, ItemClassification.progression - "Lantern": ItemCategory.ITEM, ItemClassification.progression - "Reflect": ItemCategory.ITEM, ItemClassification.useful - "Silver Sling": ItemCategory.ITEM, ItemClassification.progression \ No newline at end of file + "Heart": ItemData(ItemCategory.ITEM, ItemClassification.useful), + "Lightning": ItemData(ItemCategory.ITEM, ItemClassification.useful), + "Arrow": ItemData(ItemCategory.ITEM, ItemClassification.useful), + "Pants": ItemData(ItemCategory.ITEM, ItemClassification.useful), + "Mushroom": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Orb": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Bombs": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Shock Wand": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Ice spear": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Cactus": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Boomerang": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Whoopee": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Hot Pants": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Skull Key": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Bat Key": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Pumpkin Key": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Boots": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Stick": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Fertilizer": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Silver": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Doom Daisy": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Ghost Potion": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Vamp Statue": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Cat": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Big Gem": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Zombie Reward": ItemData(ItemCategory.ITEM, ItemClassification.filler), + "3 way": ItemData(ItemCategory.ITEM, ItemClassification.useful), + "Happy Stick": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Bat Statue": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Lantern": ItemData(ItemCategory.ITEM, ItemClassification.progression), + "Reflect": ItemData(ItemCategory.ITEM, ItemClassification.useful), + "Silver Sling": ItemData(ItemCategory.ITEM, ItemClassification.progression) + } \ No newline at end of file From ba96272cef4ab8c0fadc0df15a55b1d3f12cfe9a Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 17:29:07 -0500 Subject: [PATCH 06/58] Ids for Items locations regions --- worlds/loonyland/Items.py | 69 +++++++++--------- worlds/loonyland/Locations.py | 130 ++++++++++++++++++++++++++++++++++ worlds/loonyland/Regions.py | 56 +++++++++++++++ 3 files changed, 223 insertions(+), 32 deletions(-) diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/Items.py index 0eb648164b2d..bb1ae2b8ac48 100644 --- a/worlds/loonyland/Items.py +++ b/worlds/loonyland/Items.py @@ -20,6 +20,7 @@ class ItemCategory(Enum): class ItemData(NamedTuple): + id: int category: ItemCategory classification: ItemClassification @@ -36,36 +37,40 @@ class ItemData(NamedTuple): } item_table: Dict[str, ItemData] = { - "Heart": ItemData(ItemCategory.ITEM, ItemClassification.useful), - "Lightning": ItemData(ItemCategory.ITEM, ItemClassification.useful), - "Arrow": ItemData(ItemCategory.ITEM, ItemClassification.useful), - "Pants": ItemData(ItemCategory.ITEM, ItemClassification.useful), - "Mushroom": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Orb": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Bombs": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Shock Wand": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Ice spear": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Cactus": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Boomerang": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Whoopee": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Hot Pants": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Skull Key": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Bat Key": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Pumpkin Key": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Boots": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Stick": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Fertilizer": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Silver": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Doom Daisy": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Ghost Potion": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Vamp Statue": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Cat": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Big Gem": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Zombie Reward": ItemData(ItemCategory.ITEM, ItemClassification.filler), - "3 way": ItemData(ItemCategory.ITEM, ItemClassification.useful), - "Happy Stick": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Bat Statue": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Lantern": ItemData(ItemCategory.ITEM, ItemClassification.progression), - "Reflect": ItemData(ItemCategory.ITEM, ItemClassification.useful), - "Silver Sling": ItemData(ItemCategory.ITEM, ItemClassification.progression) + "Heart": ItemData(loonyland_base_id + 0, ItemCategory.ITEM, ItemClassification.useful), + "Lightning": ItemData(loonyland_base_id + 1, ItemCategory.ITEM, ItemClassification.useful), + "Arrow": ItemData(loonyland_base_id + 2, ItemCategory.ITEM, ItemClassification.useful), + "Pants": ItemData(loonyland_base_id + 3, ItemCategory.ITEM, ItemClassification.useful), + "Mushroom": ItemData(loonyland_base_id + 4, ItemCategory.ITEM, ItemClassification.progression), + "Orb": ItemData(loonyland_base_id + 5, ItemCategory.ITEM, ItemClassification.progression), + "Bombs": ItemData(loonyland_base_id + 6, ItemCategory.ITEM, ItemClassification.progression), + "Shock Wand": ItemData(loonyland_base_id + 7, ItemCategory.ITEM, ItemClassification.progression), + "Ice spear": ItemData(loonyland_base_id + 8, ItemCategory.ITEM, ItemClassification.progression), + "Cactus": ItemData(loonyland_base_id + 9, ItemCategory.ITEM, ItemClassification.progression), + "Boomerang": ItemData(loonyland_base_id + 10, ItemCategory.ITEM, ItemClassification.progression), + "Whoopee": ItemData(loonyland_base_id + 11, ItemCategory.ITEM, ItemClassification.progression), + "Hot Pants": ItemData(loonyland_base_id + 12, ItemCategory.ITEM, ItemClassification.progression), + "Skull Key": ItemData(loonyland_base_id + 13, ItemCategory.ITEM, ItemClassification.progression), + "Bat Key": ItemData(loonyland_base_id + 14, ItemCategory.ITEM, ItemClassification.progression), + "Pumpkin Key": ItemData(loonyland_base_id + 15, ItemCategory.ITEM, ItemClassification.progression), + "Boots": ItemData(loonyland_base_id + 16, ItemCategory.ITEM, ItemClassification.progression), + "Stick": ItemData(loonyland_base_id + 17, ItemCategory.ITEM, ItemClassification.progression), + "Fertilizer": ItemData(loonyland_base_id + 18, ItemCategory.ITEM, ItemClassification.progression), + "Silver": ItemData(loonyland_base_id + 19, ItemCategory.ITEM, ItemClassification.progression), + "Doom Daisy": ItemData(loonyland_base_id + 20, ItemCategory.ITEM, ItemClassification.progression), + "Ghost Potion": ItemData(loonyland_base_id + 21, ItemCategory.ITEM, ItemClassification.progression), + "Vamp Statue": ItemData(loonyland_base_id + 22, ItemCategory.ITEM, ItemClassification.progression), + "Cat": ItemData(loonyland_base_id + 23, ItemCategory.ITEM, ItemClassification.progression), + "Big Gem": ItemData(loonyland_base_id + 24, ItemCategory.ITEM, ItemClassification.progression), + "Zombie Reward":ItemData(loonyland_base_id + 25, ItemCategory.ITEM, ItemClassification.filler), + "3 way": ItemData(loonyland_base_id + 26, ItemCategory.ITEM, ItemClassification.useful), + "Happy Stick": ItemData(loonyland_base_id + 27, ItemCategory.ITEM, ItemClassification.progression), + "Bat Statue": ItemData(loonyland_base_id + 28, ItemCategory.ITEM, ItemClassification.progression), + "Lantern": ItemData(loonyland_base_id + 29, ItemCategory.ITEM, ItemClassification.progression), + "Reflect": ItemData(loonyland_base_id + 30, ItemCategory.ITEM, ItemClassification.useful), + "Silver Sling": ItemData(loonyland_base_id + 31, ItemCategory.ITEM, ItemClassification.progression) + #TODO add cheats + #TODO filler + #TODO traps + #TODO event } \ No newline at end of file diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index e69de29bb2d1..19af467b118b 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -0,0 +1,130 @@ + +from BaseClasses import Location + + +loonyland_base_id: int 2876900 + + +class LoonylandLocation(Location): + game = "Loonyland" + +class LocationCategory(Enum): + PICKUP = 0 + QUEST = 1 + BADGE = 2 + EVENT = 4 + +class LoonylandLocationData(NamedTuple): + id: int + category: + region: str + name: str + +location_table = { + LoonylandLocationData(0, "Halloween Hill", "Swamp Mud Path" + "Halloween Hill", "Bog Beast Home" + "Halloween Hill", "Rocky Cliffs below Upper Caverns" + "Halloween Hill", "Sapling Shrine" + "Halloween Hill", "Terror Glade" + "Halloween Hill", "Rocky Cliffs Vine" + "Halloween Hill", "Rocky Cliffs Grand Pharoh" + "Halloween Hill", "Rocky Cliffs Rock Corner" + "Halloween Hill", "Mushroom outside town" + "Halloween Hill", "North of UG Passage" + "Halloween Hill", "Top left mushroom spot" + "Halloween Hill", "NE of UG Passage" + "Halloween Hill", "East Woods" + "Halloween Hill", "Rocky Cliffs Ledge" + "Halloween Hill", "Rocky Cliffs Peak" + "Halloween Hill", "Cat Tree" + "The Witch's Cabin", "Bedroom" + "The Witch's Cabin", "Backroom" + "Bonita's Cabin", "Barrel Maze" + "The Bog Pit", "Top Door" + "The Bog Pit", "Post Room" + "The Bog Pit", "Window Drip" + "The Bog Pit", "Green room" + "The Bog Pit", "Arena" + "The Bog Pit", "Kill Wall" + "Underground Tunnel", "Swampdog Door" + "Underground Tunnel", "Scribble Wall" + "Underground Tunnel", "Tiny Passage" + "Underground Tunnel", "fire frogs" + "Underground Tunnel", "Torch Island" + "Underground Tunnel", "Small Room" + "Swamp Gas Cavern", "Scratch Wall" + "Swamp Gas Cavern", "Bat Mound" + "Swamp Gas Cavern", "Stair room" + "Swamp Gas Cavern", "Rock Prison" + "A Tiny Cabin", "Tiny Cabin" + "A Cabin", "Bedside " + "Dusty Crypt", "Pumpkin Door" + "Dusty Crypt", "Maze" + "Musty Crypt", "Big Closed Room" + "Rusty Crypt", "Spike Vine" + "Rusty Crypt", "Boulders" + "A Messy Cabin", "Barrel Mess" + "Under the Lake", "Lightning Rod Secret" + "Under the Lake", "Bat Door" + "Deeper Under the Lake", "SE corner" + "Deeper Under the Lake", "Rhombus" + "Frankenjulie's Laboratory", "Boss Reward" + "Haunted Tower", "Barracks" + "Haunted Tower, Floor 2", "Top Left" + "Haunted Tower Roof", "Boss Reward" + "Haunted Basement", "DoorDoorDoorDoorDoorDoor" + "Abandoned Mines", "Shaft" + "The Shrine of Bombulus", "Bombulus" + "A Gloomy Cavern", "Lockpick" + "Happy Stick Woods", "Happy Stick Hidden" + "Happy Stick Woods", "Happy Stick Reward" + "The Wolf Den", "Wolf Top Left" + "The Wolf Den", "Pumpkin Door" + "The Wolf Den", "Grow Room" + "Upper Creepy Cavern", "The Three ombres" + "Under the Ravine", "Left Vine" + "Under the Ravine", "Right Vine" + "Creepy Caverns", "M Pharoh bat Room" + "Creepy Caverns", "E 2 blue Pharos" + "Creepy Caverns", "M GARGOYLE ROOM" + "Castle Vampy", "Vampire Guard" + "Castle Vampy", "maze top left" + "Castle Vampy", "Top Right Gauntlet" + "Castle Vampy", "Bat Closet" + "Castle Vampy II", "Candle Room" + "Castle Vampy II", "Top Right Top" + "Castle Vampy II", "Bottom Right Middle" + "Castle Vampy II", "Bat room" + "Cabin in the woods", "Gold Skull" + "Castle Vampy III", "Middle" + "Castle Vampy III", "Behind the Pews" + "Castle Vampy III", "AMBUSH!" + "Castle Vampy III", "Halloween" + "Castle Vampy III", "So many bats" + "Castle Vampy IV", "Right Path" + "Castle Vampy IV", "Left Path" + "Castle Vampy IV", "Ballroom Right" + "Castle Vampy IV", "Right Secret Wall" + "Castle Vampy IV", "Ballroom Left" + "Castle Vampy Roof", "Gutsy the Elder" + "Castle Vampy Roof", "Stoney the Elder" + "Castle Vampy Roof", "Drippy the Elder" + "Castle Vampy Roof", "Toasty the Elder" + "Heart of Terror", "Bonkula" + "A Hidey Hole", "Bat Door" + "A Hidey Hole", "Pebbles" + "Swampdog Lair", "Entrance" + "Swampdog Lair", "End" + "The Witch's Cabin", "Ghostbusting" + "A Cabin3", "Hairy Larry" + "Halloween Hill", "Scaredy Cat" + "Halloween Hill", "Silver Bullet" + "Halloween Hill", "Smashing Pumpkins" + "Halloween Hill", "Sticky Shoes" + "A Cabin4", "The Collection" + "A Gloomy Cavern", "The Rescue" + "A Cabin", "Tree Trimming" + "The Witch's Cabin", "Witch Mushrooms" + "Halloween Hill", "Zombie Stomp" + #todo the 40 badge checks + " \ No newline at end of file diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index e69de29bb2d1..2711f9ba7870 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -0,0 +1,56 @@ +region_table: Dict[str, List[str]] = { + "Menu", + "Halloween Hill", + "A Cabin", + "The Witch's Cabin", + "Bonita's Cabin", + "The Bog Pit", + "Underground Tunnel", + "Swamp Gas Cavern", + "A Tiny Cabin", + "A Cabin2", + "Benny's Cocktails", + "Dusty Crypt", + "Musty Crypt", + "Rusty Crypt", + "A Messy Cabin", + "Under the Lake", + "Deeper Under the Lake", + "Frankenjulie's Laboratory", + "Haunted Tower", + "Haunted Tower, Floor 2", + "Haunted Tower, Floor 3", + "Haunted Tower Roof", + "Haunted Basement", + "Abandoned Mines", + "The Shrine of Bombulus", + "A Gloomy Cavern", + "Happy Stick Woods", + "The Wolf Den", + "A Cabin3", + "Upper Creepy Cavern", + "Under the Ravine", + "Creepy Caverns", + "Castle Vampy", + "Castle Vampy II", + "Cabin in the woods", + "Castle Vampy III", + "Castle Vampy IV", + "A Cabin4", + "Castle Vampy Roof", + "Castle Vampy Roof2", + "Castle Vampy Roof3", + "Castle Vampy Roof4", + "The Evilizer", + "Heart of Terror", + "A Hidey Hole", + "Empty Rooftop", + "Swampdog Lair", + "Larry's Lair", + + "Bowling" + "Survival", + "Boss Bash", + "Loony Ball", + "Remix" +} \ No newline at end of file From f84b0483341d9f09a28818358da69d159322a610 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 18:23:50 -0500 Subject: [PATCH 07/58] location ids and categories all da rules --- worlds/loonyland/Locations.py | 212 ++++++++++++++--------------- worlds/loonyland/Rules.py | 243 ++++++++++++++++++++++++++++++++++ 2 files changed, 349 insertions(+), 106 deletions(-) diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index 19af467b118b..8d57ed8d3326 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -21,110 +21,110 @@ class LoonylandLocationData(NamedTuple): name: str location_table = { - LoonylandLocationData(0, "Halloween Hill", "Swamp Mud Path" - "Halloween Hill", "Bog Beast Home" - "Halloween Hill", "Rocky Cliffs below Upper Caverns" - "Halloween Hill", "Sapling Shrine" - "Halloween Hill", "Terror Glade" - "Halloween Hill", "Rocky Cliffs Vine" - "Halloween Hill", "Rocky Cliffs Grand Pharoh" - "Halloween Hill", "Rocky Cliffs Rock Corner" - "Halloween Hill", "Mushroom outside town" - "Halloween Hill", "North of UG Passage" - "Halloween Hill", "Top left mushroom spot" - "Halloween Hill", "NE of UG Passage" - "Halloween Hill", "East Woods" - "Halloween Hill", "Rocky Cliffs Ledge" - "Halloween Hill", "Rocky Cliffs Peak" - "Halloween Hill", "Cat Tree" - "The Witch's Cabin", "Bedroom" - "The Witch's Cabin", "Backroom" - "Bonita's Cabin", "Barrel Maze" - "The Bog Pit", "Top Door" - "The Bog Pit", "Post Room" - "The Bog Pit", "Window Drip" - "The Bog Pit", "Green room" - "The Bog Pit", "Arena" - "The Bog Pit", "Kill Wall" - "Underground Tunnel", "Swampdog Door" - "Underground Tunnel", "Scribble Wall" - "Underground Tunnel", "Tiny Passage" - "Underground Tunnel", "fire frogs" - "Underground Tunnel", "Torch Island" - "Underground Tunnel", "Small Room" - "Swamp Gas Cavern", "Scratch Wall" - "Swamp Gas Cavern", "Bat Mound" - "Swamp Gas Cavern", "Stair room" - "Swamp Gas Cavern", "Rock Prison" - "A Tiny Cabin", "Tiny Cabin" - "A Cabin", "Bedside " - "Dusty Crypt", "Pumpkin Door" - "Dusty Crypt", "Maze" - "Musty Crypt", "Big Closed Room" - "Rusty Crypt", "Spike Vine" - "Rusty Crypt", "Boulders" - "A Messy Cabin", "Barrel Mess" - "Under the Lake", "Lightning Rod Secret" - "Under the Lake", "Bat Door" - "Deeper Under the Lake", "SE corner" - "Deeper Under the Lake", "Rhombus" - "Frankenjulie's Laboratory", "Boss Reward" - "Haunted Tower", "Barracks" - "Haunted Tower, Floor 2", "Top Left" - "Haunted Tower Roof", "Boss Reward" - "Haunted Basement", "DoorDoorDoorDoorDoorDoor" - "Abandoned Mines", "Shaft" - "The Shrine of Bombulus", "Bombulus" - "A Gloomy Cavern", "Lockpick" - "Happy Stick Woods", "Happy Stick Hidden" - "Happy Stick Woods", "Happy Stick Reward" - "The Wolf Den", "Wolf Top Left" - "The Wolf Den", "Pumpkin Door" - "The Wolf Den", "Grow Room" - "Upper Creepy Cavern", "The Three ombres" - "Under the Ravine", "Left Vine" - "Under the Ravine", "Right Vine" - "Creepy Caverns", "M Pharoh bat Room" - "Creepy Caverns", "E 2 blue Pharos" - "Creepy Caverns", "M GARGOYLE ROOM" - "Castle Vampy", "Vampire Guard" - "Castle Vampy", "maze top left" - "Castle Vampy", "Top Right Gauntlet" - "Castle Vampy", "Bat Closet" - "Castle Vampy II", "Candle Room" - "Castle Vampy II", "Top Right Top" - "Castle Vampy II", "Bottom Right Middle" - "Castle Vampy II", "Bat room" - "Cabin in the woods", "Gold Skull" - "Castle Vampy III", "Middle" - "Castle Vampy III", "Behind the Pews" - "Castle Vampy III", "AMBUSH!" - "Castle Vampy III", "Halloween" - "Castle Vampy III", "So many bats" - "Castle Vampy IV", "Right Path" - "Castle Vampy IV", "Left Path" - "Castle Vampy IV", "Ballroom Right" - "Castle Vampy IV", "Right Secret Wall" - "Castle Vampy IV", "Ballroom Left" - "Castle Vampy Roof", "Gutsy the Elder" - "Castle Vampy Roof", "Stoney the Elder" - "Castle Vampy Roof", "Drippy the Elder" - "Castle Vampy Roof", "Toasty the Elder" - "Heart of Terror", "Bonkula" - "A Hidey Hole", "Bat Door" - "A Hidey Hole", "Pebbles" - "Swampdog Lair", "Entrance" - "Swampdog Lair", "End" - "The Witch's Cabin", "Ghostbusting" - "A Cabin3", "Hairy Larry" - "Halloween Hill", "Scaredy Cat" - "Halloween Hill", "Silver Bullet" - "Halloween Hill", "Smashing Pumpkins" - "Halloween Hill", "Sticky Shoes" - "A Cabin4", "The Collection" - "A Gloomy Cavern", "The Rescue" - "A Cabin", "Tree Trimming" - "The Witch's Cabin", "Witch Mushrooms" - "Halloween Hill", "Zombie Stomp" - #todo the 40 badge checks + LoonylandLocationData(0, LocationCategory.PICKUP, "Halloween Hill", "Swamp Mud Path"), + LoonylandLocationData(1, LocationCategory.PICKUP, "Halloween Hill", "Bog Beast Home"), + LoonylandLocationData(2, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs below Upper Caverns"), + LoonylandLocationData(3, LocationCategory.PICKUP, "Halloween Hill", "Sapling Shrine"), + LoonylandLocationData(4, LocationCategory.PICKUP, "Halloween Hill", "Terror Glade"), + LoonylandLocationData(5, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs Vine"), + LoonylandLocationData(6, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs Grand Pharoh"), + LoonylandLocationData(7, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs Rock Corner"), + LoonylandLocationData(8, LocationCategory.PICKUP, "Halloween Hill", "Mushroom outside town"), + LoonylandLocationData(9, LocationCategory.PICKUP, "Halloween Hill", "North of UG Passage"), + LoonylandLocationData(10, LocationCategory.PICKUP, "Halloween Hill", "Top left mushroom spot"), + LoonylandLocationData(11, LocationCategory.PICKUP, "Halloween Hill", "NE of UG Passage"), + LoonylandLocationData(12, LocationCategory.PICKUP, "Halloween Hill", "East Woods"), + LoonylandLocationData(13, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs Ledge"), + LoonylandLocationData(14, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs Peak"), + LoonylandLocationData(15, LocationCategory.PICKUP, "Halloween Hill", "Cat Tree"), + LoonylandLocationData(16, LocationCategory.PICKUP, "The Witch's Cabin", "Bedroom"), + LoonylandLocationData(17, LocationCategory.PICKUP, "The Witch's Cabin", "Backroom"), + LoonylandLocationData(18, LocationCategory.PICKUP, "Bonita's Cabin", "Barrel Maze"), + LoonylandLocationData(19, LocationCategory.PICKUP, "The Bog Pit", "Top Door"), + LoonylandLocationData(20, LocationCategory.PICKUP, "The Bog Pit", "Post Room"), + LoonylandLocationData(21, LocationCategory.PICKUP, "The Bog Pit", "Window Drip"), + LoonylandLocationData(22, LocationCategory.PICKUP, "The Bog Pit", "Green room"), + LoonylandLocationData(23, LocationCategory.PICKUP, "The Bog Pit", "Arena"), + LoonylandLocationData(24, LocationCategory.PICKUP, "The Bog Pit", "Kill Wall"), + LoonylandLocationData(25, LocationCategory.PICKUP, "Underground Tunnel", "Swampdog Door"), + LoonylandLocationData(26, LocationCategory.PICKUP, "Underground Tunnel", "Scribble Wall"), + LoonylandLocationData(27, LocationCategory.PICKUP, "Underground Tunnel", "Tiny Passage"), + LoonylandLocationData(28, LocationCategory.PICKUP, "Underground Tunnel", "fire frogs"), + LoonylandLocationData(29, LocationCategory.PICKUP, "Underground Tunnel", "Torch Island"), + LoonylandLocationData(30, LocationCategory.PICKUP, "Underground Tunnel", "Small Room"), + LoonylandLocationData(31, LocationCategory.PICKUP, "Swamp Gas Cavern", "Scratch Wall"), + LoonylandLocationData(32, LocationCategory.PICKUP, "Swamp Gas Cavern", "Bat Mound"), + LoonylandLocationData(33, LocationCategory.PICKUP, "Swamp Gas Cavern", "Stair room"), + LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern", "Rock Prison"), + LoonylandLocationData(35, LocationCategory.PICKUP, "A Tiny Cabin", "Tiny Cabin"), + LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin", "Bedside "), + LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt", "Pumpkin Door"), + LoonylandLocationData(38, LocationCategory.PICKUP, "Dusty Crypt", "Maze"), + LoonylandLocationData(39, LocationCategory.PICKUP, "Musty Crypt", "Big Closed Room"), + LoonylandLocationData(40, LocationCategory.PICKUP, "Rusty Crypt", "Spike Vine"), + LoonylandLocationData(41, LocationCategory.PICKUP, "Rusty Crypt", "Boulders"), + LoonylandLocationData(42, LocationCategory.PICKUP, "A Messy Cabin", "Barrel Mess"), + LoonylandLocationData(43, LocationCategory.PICKUP, "Under the Lake", "Lightning Rod Secret"), + LoonylandLocationData(44, LocationCategory.PICKUP, "Under the Lake", "Bat Door"), + LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under the Lake", "SE corner"), + LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under the Lake", "Rhombus"), + LoonylandLocationData(47, LocationCategory.PICKUP, "Frankenjulie's Laboratory", "Boss Reward"), + LoonylandLocationData(48, LocationCategory.PICKUP, "Haunted Tower", "Barracks"), + LoonylandLocationData(49, LocationCategory.PICKUP, "Haunted Tower, Floor 2", "Top Left"), + LoonylandLocationData(50, LocationCategory.PICKUP, "Haunted Tower Roof", "Boss Reward"), + LoonylandLocationData(51, LocationCategory.PICKUP, "Haunted Basement", "DoorDoorDoorDoorDoorDoor"), + LoonylandLocationData(52, LocationCategory.PICKUP, "Abandoned Mines", "Shaft"), + LoonylandLocationData(53, LocationCategory.PICKUP, "The Shrine of Bombulus", "Bombulus"), + LoonylandLocationData(54, LocationCategory.PICKUP, "A Gloomy Cavern", "Lockpick"), + LoonylandLocationData(55, LocationCategory.PICKUP, "Happy Stick Woods", "Happy Stick Hidden"), + LoonylandLocationData(56, LocationCategory.PICKUP, "Happy Stick Woods", "Happy Stick Reward"), + LoonylandLocationData(57, LocationCategory.PICKUP, "The Wolf Den", "Wolf Top Left"), + LoonylandLocationData(58, LocationCategory.PICKUP, "The Wolf Den", "Pumpkin Door"), + LoonylandLocationData(59, LocationCategory.PICKUP, "The Wolf Den", "Grow Room"), + LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Cavern", "The Three ombres"), + LoonylandLocationData(61, LocationCategory.PICKUP, "Under the Ravine", "Left Vine"), + LoonylandLocationData(62, LocationCategory.PICKUP, "Under the Ravine", "Right Vine"), + LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns", "M Pharoh bat Room"), + LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns", "E 2 blue Pharos"), + LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns", "M GARGOYLE ROOM"), + LoonylandLocationData(66, LocationCategory.PICKUP, "Castle Vampy", "Vampire Guard"), + LoonylandLocationData(67, LocationCategory.PICKUP, "Castle Vampy", "maze top left"), + LoonylandLocationData(68, LocationCategory.PICKUP, "Castle Vampy", "Top Right Gauntlet"), + LoonylandLocationData(69, LocationCategory.PICKUP, "Castle Vampy", "Bat Closet"), + LoonylandLocationData(70, LocationCategory.PICKUP, "Castle Vampy II", "Candle Room"), + LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II", "Top Right Top"), + LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II", "Bottom Right Middle"), + LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II", "Bat room"), + LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin in the woods", "Gold Skull"), + LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III", "Middle"), + LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III", "Behind the Pews"), + LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III", "AMBUSH!"), + LoonylandLocationData(78, LocationCategory.PICKUP, "Castle Vampy III", "Halloween"), + LoonylandLocationData(79, LocationCategory.PICKUP, "Castle Vampy III", "So many bats"), + LoonylandLocationData(80, LocationCategory.PICKUP, "Castle Vampy IV", "Right Path"), + LoonylandLocationData(81, LocationCategory.PICKUP, "Castle Vampy IV", "Left Path"), + LoonylandLocationData(82, LocationCategory.PICKUP, "Castle Vampy IV", "Ballroom Right"), + LoonylandLocationData(83, LocationCategory.PICKUP, "Castle Vampy IV", "Right Secret Wall"), + LoonylandLocationData(84, LocationCategory.PICKUP, "Castle Vampy IV", "Ballroom Left"), + LoonylandLocationData(85, LocationCategory.PICKUP, "Castle Vampy Roof", "Gutsy the Elder"), + LoonylandLocationData(86, LocationCategory.PICKUP, "Castle Vampy Roof", "Stoney the Elder"), + LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof", "Drippy the Elder"), + LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof", "Toasty the Elder"), + LoonylandLocationData(89, LocationCategory.PICKUP, "Heart of Terror", "Bonkula"), + LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey Hole", "Bat Door"), + LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey Hole", "Pebbles"), + LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair", "Entrance"), + LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair", "End"), + LoonylandLocationData(94, LocationCategory.QUEST, "The Witch's Cabin", "Ghostbusting"), + LoonylandLocationData(95, LocationCategory.QUEST, "A Cabin3", "Hairy Larry"), + LoonylandLocationData(96, LocationCategory.QUEST, "Halloween Hill", "Scaredy Cat"), + LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill", "Silver Bullet"), + LoonylandLocationData(98, LocationCategory.QUEST, "Halloween Hill", "Smashing Pumpkins"), + LoonylandLocationData(99, LocationCategory.QUEST, "Halloween Hill", "Sticky Shoes"), + LoonylandLocationData(100, LocationCategory.QUEST, "A Cabin4", "The Collection"), + LoonylandLocationData(101, LocationCategory.QUEST, "A Gloomy Cavern", "The Rescue"), + LoonylandLocationData(102, LocationCategory.QUEST, "A Cabin", "Tree Trimming"), + LoonylandLocationData(103, LocationCategory.QUEST, "The Witch's Cabin", "Witch Mushrooms"), + LoonylandLocationData(104, LocationCategory.QUEST, "Halloween Hill", "Zombie Stomp"), + #todo the 40 badge locations " \ No newline at end of file diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index e69de29bb2d1..96bce2c64062 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -0,0 +1,243 @@ +class LoonylandRules: + + access_rules = { + "Halloween Hill - Swamp Mud Path": lambda state: state.has("Boots", player), + "Halloween Hill - Bog Beast Home": lambda state: true, + "Halloween Hill - Rocky Cliffs below Upper Caverns": lambda state: CanEnterRockyCliffs(state, player)), + "Halloween Hill - Sapling Shrine": lambda state: state.has("Boots", player), + "Halloween Hill - Terror Glade": lambda state: true), + "Halloween Hill - Rocky Cliffs Vine": lambda state: state.has("Fertilizer", player), + "Halloween Hill - Rocky Cliffs Grand Pharoh": lambda state: CanEnterRockyCliffs(state, player), + "Halloween Hill - Rocky Cliffs Rock Corner": lambda state: CanEnterRockyCliffs(state, player) and HaveBombs(state, player), + "Halloween Hill - Mushroom outside town": lambda state: true, + "Halloween Hill - North of UG Passage": lambda state: true, + "Halloween Hill - Top left mushroom spot": lambda state: true, + "Halloween Hill - NE of UG Passage": lambda state: true, + "Halloween Hill - East Woods": lambda state: true, + "Halloween Hill - Rocky Cliffs Ledge": lambda state: CanEnterRockyCliffs(state, player), + "Halloween Hill - Rocky Cliffs Peak": lambda state: CanEnterRockyCliffs(state, player), + "Halloween Hill - Cat Tree": lambda state: true, + "The Witch's Cabin - Bedroom": lambda state: HaveLightSource(state, player), + "The Witch's Cabin - Backroom": lambda state: true, + "Bonita's Cabin - Barrel Maze": lambda state: true, + "The Bog Pit - Top Door": lambda state: state.has("Skull Key", player), + "The Bog Pit - Post Room": lambda state: true, + "The Bog Pit - Window Drip": lambda state: true, + "The Bog Pit - Green room": lambda state: true, + "The Bog Pit - Arena": lambda state: true, + "The Bog Pit - Kill Wall": lambda state: true, + "Underground Tunnel - Swampdog Door": lambda state: state.has("Pumpkin Key", player), + "Underground Tunnel - Scribble Wall": lambda state: HaveSpecialWeaponBullet(state, player), + "Underground Tunnel - Tiny Passage": lambda state: true, + "Underground Tunnel - fire frogs": lambda state: true, + "Underground Tunnel - Torch Island": lambda state: state.has("Boots", player), + "Underground Tunnel - Small Room": lambda state: true, + "Swamp Gas Cavern - Scratch Wall": lambda state: state.has("Boots", player) and HaveSpecialWeaponBullet)state, player), + "Swamp Gas Cavern - Bat Mound": lambda state: state.has("Boots", player) and state.has("Bat Key", player), + "Swamp Gas Cavern - Stair room": lambda state: state.has("Boots", player), + "Swamp Gas Cavern - Rock Prison": lambda state: state.has("Boots", player) and HaveBombs(state, player), + "A Tiny Cabin - Tiny Cabin": lambda state: state.has("Skull Key", player), + "A Cabin - Bedside ": lambda state: CanEnterZombiton(state, player), + "Dusty Crypt - Pumpkin Door": lambda state: HaveLightSource(state, player) and state.has("Pumpkin Key", player), + "Dusty Crypt - Maze": lambda state: HaveLightSource(state, player), + "Musty Crypt - Big Closed Room": lambda state: HaveLightSource(state, player) and CanEnterZombiton(state, player) and HaveSpecialWeaponBullet(state, player) + "Rusty Crypt - Spike Vine": lambda state: HaveLightSource(state, player) and state.has("Fertilizer", player), + "Rusty Crypt - Boulders": lambda state: HaveLightSource(state, player), + "A Messy Cabin - Barrel Mess": lambda state: CanEnterZombiton(state, player), + "Under the Lake - Lightning Rod Secret": lambda state: HaveLightSource(state, player) and HaveAllOrbs(state, player), + "Under the Lake - Bat Door": lambda state: HaveLightSource(state, player) and HaveAllOrbs(state, player) and state.has("Bat Key", player), + "Deeper Under the Lake - SE corner": lambda state: HaveLightSource(state, player) and HaveAllOrbs(state, player), + "Deeper Under the Lake - Rhombus": lambda state: HaveLightSource(state, player) and HaveAllOrbs(state, player), + "Frankenjulie's Laboratory - Boss Reward": lambda state: HaveLightSource(state, player) and HaveAllOrbs(state, player), + "Haunted Tower - Barracks": lambda state: state.has("Ghost Potion", player) and state.has("Bat Key", player), + "Haunted Tower, Floor 2 - Top Left": lambda state: state.has("Ghost Potion", player), + "Haunted Tower Roof - Boss Reward": lambda state: state.has("Ghost Potion", player), + "Haunted Basement - DoorDoorDoorDoorDoorDoor": lambda state: state.has("Ghost Potion", player) and HaveLightSource(state, player) and state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), + "Abandoned Mines - Shaft": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), + "The Shrine of Bombulus - Bombulus": lambda state: CanEnterRockyCliffs(state, player), + "A Gloomy Cavern - Lockpick": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), + "Happy Stick Woods - Happy Stick Hidden": lambda state: state.has("Talisman", player), + "Happy Stick Woods - Happy Stick Reward": lambda state: state.has("Talisman", player), + "The Wolf Den - Wolf Top Left": lambda state: HaveLightSource(state, player) and state.has("Silver Sling", player), + "The Wolf Den - Pumpkin Door": lambda state: HaveLightSource(state, player) and state.has("Silver Sling", player) and state.has("Pumpkin Key", player), + "The Wolf Den - Grow Room": lambda state: HaveLightSource(state, player) and state.has("Silver Sling", player) and state.has("Fertilizer", player), + "Upper Creepy Cavern - The Three ombres": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), + "Under the Ravine - Left Vine": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player) and state.has("Fertilizer", player), + "Under the Ravine - Right Vine": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player) and state.has("Fertilizer", player), + "Creepy Caverns - M Pharoh bat Room": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player) and state.has("Bat Key", player), + "Creepy Caverns - E 2 blue Pharos": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), + "Creepy Caverns - M GARGOYLE ROOM": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), + "Castle Vampy - Vampire Guard": lambda state: CanEnterVampy(state, player), + "Castle Vampy - maze top left": lambda state: CanEnterVampy(state, player), + "Castle Vampy - Top Right Gauntlet": lambda state: CanEnterVampy(state, player), + "Castle Vampy - Bat Closet": lambda state: CanEnterVampy(state, player), + "Castle Vampy II - Candle Room": lambda state: CanEnterVampyII(state, player), + "Castle Vampy II - Top Right Top": lambda state: CanEnterVampyII(state, player), + "Castle Vampy II - Bottom Right Middle": lambda state: CanEnterVampyII(state, player), + "Castle Vampy II - Bat room": lambda state: CanEnterVampyII(state, player) and HaveSpecialWeaponBullet(state, player), + "Cabin in the woods - Gold Skull": lambda state: true, + "Castle Vampy III - Middle": lambda state: CanEnterVampyIII(state, player), + "Castle Vampy III - Behind the Pews": lambda state: CanEnterVampyIII(state, player), + "Castle Vampy III - AMBUSH!": lambda state: CanEnterVampyIII(state, player), + "Castle Vampy III - Halloween": lambda state: CanEnterVampyIII(state, player), + "Castle Vampy III - So many bats": lambda state: CanEnterVampyIII(state, player), + "Castle Vampy IV - Right Path": lambda state: CanEnterVampyIV(state, player), + "Castle Vampy IV - Left Path": lambda state: CanEnterVampyIV(state, player), + "Castle Vampy IV - Ballroom Right": lambda state: CanEnterVampyIV(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Castle Vampy IV - Right Secret Wall": lambda state: CanEnterVampyIV(state, player), + "Castle Vampy IV - Ballroom Left": lambda state: CanEnterVampyIV(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Castle Vampy Roof - Gutsy the Elder": lambda state: CanEnterVampy(state, player) and HaveAllBats(state, player) and HaveSpecialWeaponDamage(state, player), + "Castle Vampy Roof - Stoney the Elder": lambda state: CanEnterVampy(state, player) and HaveAllBats(state, player), + "Castle Vampy Roof - Drippy the Elder": lambda state: CanEnterVampy(state, player) and HaveAllBats(state, player)), + "Castle Vampy Roof - Toasty the Elder": lambda state: CanEnterVampy(state, player) and HaveAllBats(state, player), + "Heart of Terror - Bonkula": lambda state: CanEnterVampyIV(state, player) and HaveAllVamps(state, player), + "A Hidey Hole - Bat Door": lambda state: state.has("Bat Key", player), + "A Hidey Hole - Pebbles": lambda state: true, + "Swampdog Lair - Entrance": lambda state: state.has("Boots", player), + "Swampdog Lair - End": lambda state: state.has("Boots", player) and HaveLightSource(state, player) and state.has("Fertilizer", player), + "The Witch's Cabin - Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Daisy", player) and HaveAllMushrooms(state, player), + "A Cabin3 - Hairy Larry": lambda state: HaveLightSource(state, player) and state.has("Silver Sling", player) and state.has("Boots", player) , + "Halloween Hill - Scaredy Cat": lambda state: state.has("Cat", player), + "Halloween Hill - Silver Bullet": lambda state: state.has("Silver", player) and CanCleanseCrypts(state, player), + "Halloween Hill - Smashing Pumpkins": lambda state: CanCleanseCrypts(state, player), + "Halloween Hill - Sticky Shoes": lambda state: true + "A Cabin4 - The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and CanEnterVampy(state, player), + "A Gloomy Cavern - The Rescue": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), + "A Cabin - Tree Trimming": lambda state: true, + "The Witch's Cabin - Witch Mushrooms": lambda state: HaveAllMushrooms(state, player), + "Halloween Hill - Zombie Stomp": lambda state: CanCleanseCrypts(state, player) + } + + +def HaveLightSource(state: CollectionState, player: int) +{ + return (state.has("Lantern", player) or (state.has("Stick", player) and state.has("Boots", player))) +} + +def HaveBombs(state: CollectionState, player: int) +{ + return state.has("Bombs", player) + #or werewolf badge when badges are added +} + +def HaveAnyBigGem(state: CollectionState, player: int) +{ + return state.has("Big Gem", player) +} + +def HaveAllOrbs(state: CollectionState, player: int) +{ + return (state.count("Orb", player) >= 4) +} + +def HaveAllBats(state: CollectionState, player: int) +{ + return (state.count("Bat Statue", player) >= 4) +} + +def HaveAllVamps(state: CollectionState, player: int) +{ + return (state.count("Vampire Statue", player) >= 8) +} + +def HaveSpecialWeaponDamage(state: CollectionState, player: int) +{ + return ( + state.has("Bombs", player) or + state.has("Shock Wand", player) or + #state.has("Ice Spear") ice doesn't hurt elder + state.has("Cactus", player) or + state.has("Boomerang", player) or + state.has("Whoopee", player) or + state.has("Hot Pants", player) + ) +} + +def HaveSpecialWeaponBullet(state: CollectionState, player: int) +{ + return ( + state.has("Bombs", player) or + #state.has("Shock Wand") or shock wand isn't bullet + state.has("Ice Spear", player) or + state.has("Cactus", player) or + state.has("Boomerang", player) or + state.has("Whoopee", player) or + state.has("Hot Pants", player) + ) + #return true slingshot counts + +} + +def HaveSpecialWeaponRangeDamage(state: CollectionState, player: int) +{ + return ( + state.has("Bombs", player) or + state.has("Shock Wand", player) or + #state.has("Ice Spear") or Ice spear no damage + state.has("Cactus", player) or + state.has("Boomerang", player) or + #state.has("Whoopee") or whopee not ranged + #state.has("Hot Pants") hot pants not ranged + ) + #return true slingshot counts +} + +def HaveSpecialWeaponThroughWalls(state: CollectionState, player: int) +{ + return ( + state.has("Bombs", player) or + state.has("Shock Wand", player) or + #state.has("Ice Spear") or Ice spear no damage + #state.has("Cactus") or + #state.has("Boomerang") or + state.has("Whoopee", player) + #state.has("Hot Pants") + ) + ) +} + +def HaveAllMushrooms(state: CollectionState, player: int) +{ + return state.count("Mushroom", player) >= 10 +} + +def CanCleanseCrypts(state: CollectionState, player: int) +{ + return (HaveLightSource(state, player) and CanEnterZombiton(state, player) and HaveSpecialWeaponRangeDamage(state, player)) +} + +#these will get removed in favor of region access reqs eventually +def CanEnterZombiton(state: CollectionState, player: int) +{ + return state.has("Boots", player) +} + +def CanEnterRockyCliffs(state: CollectionState, player: int) +{ + return HaveAnyBigGem(state, player) +} + +def CanEnterVampy(state: CollectionState, player: int) +{ + return CanEnterRockyCliffs(state, player) and HaveLightSource(state, player) +} + +def CanEnterVampyII(state: CollectionState, player: int) +{ + return CanEnterVampy(state, player) && state.has("Skull Key", player) +} + +def CanEnterVampyIII(state: CollectionState, player: int) +{ + return CanEnterVampyII(state, player) && state.has("Bat Key", player) +} + +def CanEnterVampyIV(state: CollectionState, player: int) +{ + return CanEnterVampyIII(inv) && state.has("Pumpkin Key", player) +} + +def CanEnterRockyCliffs(state: CollectionState, player: int) +{ + return state.has("Big Gem", player) +} \ No newline at end of file From 296051d17567d70a518015a1ada517727207d6b9 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 18:28:25 -0500 Subject: [PATCH 08/58] python syntax --- worlds/loonyland/Rules.py | 81 +++++++++++---------------------------- 1 file changed, 22 insertions(+), 59 deletions(-) diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index 96bce2c64062..e73293867ce6 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -109,39 +109,28 @@ class LoonylandRules: } -def HaveLightSource(state: CollectionState, player: int) -{ +def HaveLightSource(state: CollectionState, player: int) -> bool: return (state.has("Lantern", player) or (state.has("Stick", player) and state.has("Boots", player))) -} -def HaveBombs(state: CollectionState, player: int) -{ + +def HaveBombs(state: CollectionState, player: int) -> bool: return state.has("Bombs", player) #or werewolf badge when badges are added -} -def HaveAnyBigGem(state: CollectionState, player: int) -{ + +def HaveAnyBigGem(state: CollectionState, player: int) -> bool: return state.has("Big Gem", player) -} -def HaveAllOrbs(state: CollectionState, player: int) -{ +def HaveAllOrbs(state: CollectionState, player: int) -> bool: return (state.count("Orb", player) >= 4) -} -def HaveAllBats(state: CollectionState, player: int) -{ +def HaveAllBats(state: CollectionState, player: int) -> bool: return (state.count("Bat Statue", player) >= 4) -} -def HaveAllVamps(state: CollectionState, player: int) -{ +def HaveAllVamps(state: CollectionState, player: int) -> bool: return (state.count("Vampire Statue", player) >= 8) -} -def HaveSpecialWeaponDamage(state: CollectionState, player: int) -{ +def HaveSpecialWeaponDamage(state: CollectionState, player: int) -> bool: return ( state.has("Bombs", player) or state.has("Shock Wand", player) or @@ -151,10 +140,8 @@ def HaveSpecialWeaponDamage(state: CollectionState, player: int) state.has("Whoopee", player) or state.has("Hot Pants", player) ) -} -def HaveSpecialWeaponBullet(state: CollectionState, player: int) -{ +def HaveSpecialWeaponBullet(state: CollectionState, player: int) -> bool: return ( state.has("Bombs", player) or #state.has("Shock Wand") or shock wand isn't bullet @@ -165,11 +152,8 @@ def HaveSpecialWeaponBullet(state: CollectionState, player: int) state.has("Hot Pants", player) ) #return true slingshot counts - -} -def HaveSpecialWeaponRangeDamage(state: CollectionState, player: int) -{ +def HaveSpecialWeaponRangeDamage(state: CollectionState, player: int) -> bool: return ( state.has("Bombs", player) or state.has("Shock Wand", player) or @@ -180,10 +164,8 @@ def HaveSpecialWeaponRangeDamage(state: CollectionState, player: int) #state.has("Hot Pants") hot pants not ranged ) #return true slingshot counts -} -def HaveSpecialWeaponThroughWalls(state: CollectionState, player: int) -{ +def HaveSpecialWeaponThroughWalls(state: CollectionState, player: int) -> bool: return ( state.has("Bombs", player) or state.has("Shock Wand", player) or @@ -194,50 +176,31 @@ def HaveSpecialWeaponThroughWalls(state: CollectionState, player: int) #state.has("Hot Pants") ) ) -} -def HaveAllMushrooms(state: CollectionState, player: int) -{ +def HaveAllMushrooms(state: CollectionState, player: int) -> bool: return state.count("Mushroom", player) >= 10 -} -def CanCleanseCrypts(state: CollectionState, player: int) -{ +def CanCleanseCrypts(state: CollectionState, player: int) -> bool: return (HaveLightSource(state, player) and CanEnterZombiton(state, player) and HaveSpecialWeaponRangeDamage(state, player)) -} #these will get removed in favor of region access reqs eventually -def CanEnterZombiton(state: CollectionState, player: int) -{ +def CanEnterZombiton(state: CollectionState, player: int) -> bool: return state.has("Boots", player) -} -def CanEnterRockyCliffs(state: CollectionState, player: int) -{ +def CanEnterRockyCliffs(state: CollectionState, player: int) -> bool: return HaveAnyBigGem(state, player) -} -def CanEnterVampy(state: CollectionState, player: int) -{ +def CanEnterVampy(state: CollectionState, player: int) -> bool: return CanEnterRockyCliffs(state, player) and HaveLightSource(state, player) -} -def CanEnterVampyII(state: CollectionState, player: int) -{ +def CanEnterVampyII(state: CollectionState, player: int) -> bool: return CanEnterVampy(state, player) && state.has("Skull Key", player) -} -def CanEnterVampyIII(state: CollectionState, player: int) -{ +def CanEnterVampyIII(state: CollectionState, player: int) -> bool: return CanEnterVampyII(state, player) && state.has("Bat Key", player) -} -def CanEnterVampyIV(state: CollectionState, player: int) -{ +def CanEnterVampyIV(state: CollectionState, player: int) -> bool: return CanEnterVampyIII(inv) && state.has("Pumpkin Key", player) -} -def CanEnterRockyCliffs(state: CollectionState, player: int) -{ - return state.has("Big Gem", player) -} \ No newline at end of file +def CanEnterRockyCliffs(state: CollectionState, player: int) -> bool: + return state.has("Big Gem", player) \ No newline at end of file From 2746992530e320e4c8b8673a7c12f323dc3ddbd7 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 18:32:33 -0500 Subject: [PATCH 09/58] add logical regions formatting and cleanup --- worlds/loonyland/Regions.py | 8 +++++++- worlds/loonyland/Rules.py | 9 +++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index 2711f9ba7870..e661a68d74fe 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -1,4 +1,5 @@ -region_table: Dict[str, List[str]] = { +region_table: [str] = { + # "Menu", "Halloween Hill", "A Cabin", @@ -48,6 +49,11 @@ "Swampdog Lair", "Larry's Lair", + #logical regions + "Rocky Cliffs" + "Zombiton" + + #gamemodes "Bowling" "Survival", "Boss Bash", diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index e73293867ce6..6af137f55af7 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -188,8 +188,8 @@ def CanEnterZombiton(state: CollectionState, player: int) -> bool: return state.has("Boots", player) def CanEnterRockyCliffs(state: CollectionState, player: int) -> bool: - return HaveAnyBigGem(state, player) - + return state.has("Big Gem", player) + def CanEnterVampy(state: CollectionState, player: int) -> bool: return CanEnterRockyCliffs(state, player) and HaveLightSource(state, player) @@ -200,7 +200,4 @@ def CanEnterVampyIII(state: CollectionState, player: int) -> bool: return CanEnterVampyII(state, player) && state.has("Bat Key", player) def CanEnterVampyIV(state: CollectionState, player: int) -> bool: - return CanEnterVampyIII(inv) && state.has("Pumpkin Key", player) - -def CanEnterRockyCliffs(state: CollectionState, player: int) -> bool: - return state.has("Big Gem", player) \ No newline at end of file + return CanEnterVampyIII(inv) && state.has("Pumpkin Key", player) \ No newline at end of file From 794f76752613d3e599b8b5dd735663baa3fe5c5c Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 18:46:17 -0500 Subject: [PATCH 10/58] base options --- worlds/loonyland/Options.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 worlds/loonyland/Options.py diff --git a/worlds/loonyland/Options.py b/worlds/loonyland/Options.py new file mode 100644 index 000000000000..8d142429df5b --- /dev/null +++ b/worlds/loonyland/Options.py @@ -0,0 +1,13 @@ +from dataclasses import dataclass + +from Options import Toggle, Range, Choice, PerGameCommonOptions + +class WinCondition(Choice) + display_name = "Win Condition" + option_evilizer = 0 + option_40badges = 1 + default = 0 + +@dataclass +class LoonylandOptions(PerGameCommonOptions): + win_condition: WinCondition \ No newline at end of file From 9b14761f53e6f104d844e250684d9e83c7c24451 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 18:46:33 -0500 Subject: [PATCH 11/58] naming, typos --- worlds/loonyland/Items.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/Items.py index bb1ae2b8ac48..a95229336751 100644 --- a/worlds/loonyland/Items.py +++ b/worlds/loonyland/Items.py @@ -36,7 +36,7 @@ class ItemData(NamedTuple): "Bat Statue": 4 } -item_table: Dict[str, ItemData] = { +Loonyland_items: Dict[str, ItemData] = { "Heart": ItemData(loonyland_base_id + 0, ItemCategory.ITEM, ItemClassification.useful), "Lightning": ItemData(loonyland_base_id + 1, ItemCategory.ITEM, ItemClassification.useful), "Arrow": ItemData(loonyland_base_id + 2, ItemCategory.ITEM, ItemClassification.useful), @@ -45,7 +45,7 @@ class ItemData(NamedTuple): "Orb": ItemData(loonyland_base_id + 5, ItemCategory.ITEM, ItemClassification.progression), "Bombs": ItemData(loonyland_base_id + 6, ItemCategory.ITEM, ItemClassification.progression), "Shock Wand": ItemData(loonyland_base_id + 7, ItemCategory.ITEM, ItemClassification.progression), - "Ice spear": ItemData(loonyland_base_id + 8, ItemCategory.ITEM, ItemClassification.progression), + "Ice Spear": ItemData(loonyland_base_id + 8, ItemCategory.ITEM, ItemClassification.progression), "Cactus": ItemData(loonyland_base_id + 9, ItemCategory.ITEM, ItemClassification.progression), "Boomerang": ItemData(loonyland_base_id + 10, ItemCategory.ITEM, ItemClassification.progression), "Whoopee": ItemData(loonyland_base_id + 11, ItemCategory.ITEM, ItemClassification.progression), From 015d2fab3f6e8a1ab5d76fe47fd06063c1737417 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 18:47:01 -0500 Subject: [PATCH 12/58] base init.py --- worlds/loonyland/__init__.py | 51 +++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index f79480dd2b85..dc22956bf8e5 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -1,31 +1,34 @@ -from typing import Dict +# world/Loonyland/__init__.py -from BaseClasses import Tutorial -from ..AutoWorld import WebWorld, World +import settings +import typing +from .options import LoonylandOptions +from .items import Loonyland_items, item_frequencies, LoonylandItem +from .locations import Loonyland_locations, LoonylandLocation +from worlds.AutoWorld import World +from BaseClasses import Region, Location, Entrance, Item, RegionType, ItemClassification -class LoonylandWeb(WebWorld): - options_page = False - theme = 'partyTime' - setup_en = Tutorial( - tutorial_name='Setup Guide', - description='A guide to playing Loonyland', - language='English', - file_name='setup_en.md', - link='setup/en', - authors=['AutomaticFrenzy'] - ) - - tutorials = [setup_en] +class MyGameSettings(settings.Group): -class LoonylandWorld(World): - """ - Loonyland Halloween Hill - """ - game = "Loonyland" - web = LoonylandWeb() - item_name_to_id: Dict[str, int] = {} - location_name_to_id: Dict[str, int] = {} +class MyGameWorld(World): + """Insert description of the world/game here.""" + game = "Loonyland" + options_dataclass = LoonylandOptions # options the player can set + options: LoonylandOptions # typing hints for option results + settings: typing.ClassVar[MyGameSettings] # will be automatically assigned from type hint + topology_present = True # show path to required location checks in spoiler + # ID of first item and location, could be hard-coded but code may be easier + # to read with this as a property. + base_id = 2876900 + # instead of dynamic numbering, IDs could be part of data + # The following two dicts are required for the generation to know which + # items exist. They could be generated from json or something else. They can + # include events, but don't have to since events will be placed manually. + item_name_to_id = {name: id for + id, name in enumerate(mygame_items, base_id)} + location_name_to_id = {name: id for + id, name in enumerate(mygame_locations, base_id)} From 0481d0a395d8228d15d12163253b2fdcab5bfe54 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 6 Dec 2024 21:34:39 -0500 Subject: [PATCH 13/58] renaming, lots of work in init.py --- worlds/loonyland/Items.py | 73 +++---- worlds/loonyland/Locations.py | 222 +++++++++++----------- worlds/loonyland/Options.py | 4 +- worlds/loonyland/Regions.py | 12 +- worlds/loonyland/Rules.py | 346 +++++++++++++++++----------------- worlds/loonyland/__init__.py | 121 ++++++++---- 6 files changed, 416 insertions(+), 362 deletions(-) diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/Items.py index a95229336751..36ba790366c9 100644 --- a/worlds/loonyland/Items.py +++ b/worlds/loonyland/Items.py @@ -1,8 +1,11 @@ +from typing import NamedTuple, Dict + from BaseClasses import Item, ItemClassification from worlds.AutoWorld import World +from enum import Enum -loonyland_base_id: int 2876900 +loonyland_base_id: int = 2876900 class LoonylandItem(Item): """ @@ -19,7 +22,7 @@ class ItemCategory(Enum): EVENT = 4 -class ItemData(NamedTuple): +class LoonylandItemData(NamedTuple): id: int category: ItemCategory classification: ItemClassification @@ -36,39 +39,39 @@ class ItemData(NamedTuple): "Bat Statue": 4 } -Loonyland_items: Dict[str, ItemData] = { - "Heart": ItemData(loonyland_base_id + 0, ItemCategory.ITEM, ItemClassification.useful), - "Lightning": ItemData(loonyland_base_id + 1, ItemCategory.ITEM, ItemClassification.useful), - "Arrow": ItemData(loonyland_base_id + 2, ItemCategory.ITEM, ItemClassification.useful), - "Pants": ItemData(loonyland_base_id + 3, ItemCategory.ITEM, ItemClassification.useful), - "Mushroom": ItemData(loonyland_base_id + 4, ItemCategory.ITEM, ItemClassification.progression), - "Orb": ItemData(loonyland_base_id + 5, ItemCategory.ITEM, ItemClassification.progression), - "Bombs": ItemData(loonyland_base_id + 6, ItemCategory.ITEM, ItemClassification.progression), - "Shock Wand": ItemData(loonyland_base_id + 7, ItemCategory.ITEM, ItemClassification.progression), - "Ice Spear": ItemData(loonyland_base_id + 8, ItemCategory.ITEM, ItemClassification.progression), - "Cactus": ItemData(loonyland_base_id + 9, ItemCategory.ITEM, ItemClassification.progression), - "Boomerang": ItemData(loonyland_base_id + 10, ItemCategory.ITEM, ItemClassification.progression), - "Whoopee": ItemData(loonyland_base_id + 11, ItemCategory.ITEM, ItemClassification.progression), - "Hot Pants": ItemData(loonyland_base_id + 12, ItemCategory.ITEM, ItemClassification.progression), - "Skull Key": ItemData(loonyland_base_id + 13, ItemCategory.ITEM, ItemClassification.progression), - "Bat Key": ItemData(loonyland_base_id + 14, ItemCategory.ITEM, ItemClassification.progression), - "Pumpkin Key": ItemData(loonyland_base_id + 15, ItemCategory.ITEM, ItemClassification.progression), - "Boots": ItemData(loonyland_base_id + 16, ItemCategory.ITEM, ItemClassification.progression), - "Stick": ItemData(loonyland_base_id + 17, ItemCategory.ITEM, ItemClassification.progression), - "Fertilizer": ItemData(loonyland_base_id + 18, ItemCategory.ITEM, ItemClassification.progression), - "Silver": ItemData(loonyland_base_id + 19, ItemCategory.ITEM, ItemClassification.progression), - "Doom Daisy": ItemData(loonyland_base_id + 20, ItemCategory.ITEM, ItemClassification.progression), - "Ghost Potion": ItemData(loonyland_base_id + 21, ItemCategory.ITEM, ItemClassification.progression), - "Vamp Statue": ItemData(loonyland_base_id + 22, ItemCategory.ITEM, ItemClassification.progression), - "Cat": ItemData(loonyland_base_id + 23, ItemCategory.ITEM, ItemClassification.progression), - "Big Gem": ItemData(loonyland_base_id + 24, ItemCategory.ITEM, ItemClassification.progression), - "Zombie Reward":ItemData(loonyland_base_id + 25, ItemCategory.ITEM, ItemClassification.filler), - "3 way": ItemData(loonyland_base_id + 26, ItemCategory.ITEM, ItemClassification.useful), - "Happy Stick": ItemData(loonyland_base_id + 27, ItemCategory.ITEM, ItemClassification.progression), - "Bat Statue": ItemData(loonyland_base_id + 28, ItemCategory.ITEM, ItemClassification.progression), - "Lantern": ItemData(loonyland_base_id + 29, ItemCategory.ITEM, ItemClassification.progression), - "Reflect": ItemData(loonyland_base_id + 30, ItemCategory.ITEM, ItemClassification.useful), - "Silver Sling": ItemData(loonyland_base_id + 31, ItemCategory.ITEM, ItemClassification.progression) +loony_item_table: Dict[str, LoonylandItemData] = { + "Heart": LoonylandItemData(loonyland_base_id + 0, ItemCategory.ITEM, ItemClassification.useful), + "Lightning": LoonylandItemData(loonyland_base_id + 1, ItemCategory.ITEM, ItemClassification.useful), + "Arrow": LoonylandItemData(loonyland_base_id + 2, ItemCategory.ITEM, ItemClassification.useful), + "Pants": LoonylandItemData(loonyland_base_id + 3, ItemCategory.ITEM, ItemClassification.useful), + "Mushroom": LoonylandItemData(loonyland_base_id + 4, ItemCategory.ITEM, ItemClassification.progression), + "Orb": LoonylandItemData(loonyland_base_id + 5, ItemCategory.ITEM, ItemClassification.progression), + "Bombs": LoonylandItemData(loonyland_base_id + 6, ItemCategory.ITEM, ItemClassification.progression), + "Shock Wand": LoonylandItemData(loonyland_base_id + 7, ItemCategory.ITEM, ItemClassification.progression), + "Ice Spear": LoonylandItemData(loonyland_base_id + 8, ItemCategory.ITEM, ItemClassification.progression), + "Cactus": LoonylandItemData(loonyland_base_id + 9, ItemCategory.ITEM, ItemClassification.progression), + "Boomerang": LoonylandItemData(loonyland_base_id + 10, ItemCategory.ITEM, ItemClassification.progression), + "Whoopee": LoonylandItemData(loonyland_base_id + 11, ItemCategory.ITEM, ItemClassification.progression), + "Hot Pants": LoonylandItemData(loonyland_base_id + 12, ItemCategory.ITEM, ItemClassification.progression), + "Skull Key": LoonylandItemData(loonyland_base_id + 13, ItemCategory.ITEM, ItemClassification.progression), + "Bat Key": LoonylandItemData(loonyland_base_id + 14, ItemCategory.ITEM, ItemClassification.progression), + "Pumpkin Key": LoonylandItemData(loonyland_base_id + 15, ItemCategory.ITEM, ItemClassification.progression), + "Boots": LoonylandItemData(loonyland_base_id + 16, ItemCategory.ITEM, ItemClassification.progression), + "Stick": LoonylandItemData(loonyland_base_id + 17, ItemCategory.ITEM, ItemClassification.progression), + "Fertilizer": LoonylandItemData(loonyland_base_id + 18, ItemCategory.ITEM, ItemClassification.progression), + "Silver": LoonylandItemData(loonyland_base_id + 19, ItemCategory.ITEM, ItemClassification.progression), + "Doom Daisy": LoonylandItemData(loonyland_base_id + 20, ItemCategory.ITEM, ItemClassification.progression), + "Ghost Potion": LoonylandItemData(loonyland_base_id + 21, ItemCategory.ITEM, ItemClassification.progression), + "Vamp Statue": LoonylandItemData(loonyland_base_id + 22, ItemCategory.ITEM, ItemClassification.progression), + "Cat": LoonylandItemData(loonyland_base_id + 23, ItemCategory.ITEM, ItemClassification.progression), + "Big Gem": LoonylandItemData(loonyland_base_id + 24, ItemCategory.ITEM, ItemClassification.progression), + "Zombie Reward":LoonylandItemData(loonyland_base_id + 25, ItemCategory.ITEM, ItemClassification.filler), + "3 way": LoonylandItemData(loonyland_base_id + 26, ItemCategory.ITEM, ItemClassification.useful), + "Happy Stick": LoonylandItemData(loonyland_base_id + 27, ItemCategory.ITEM, ItemClassification.progression), + "Bat Statue": LoonylandItemData(loonyland_base_id + 28, ItemCategory.ITEM, ItemClassification.progression), + "Lantern": LoonylandItemData(loonyland_base_id + 29, ItemCategory.ITEM, ItemClassification.progression), + "Reflect": LoonylandItemData(loonyland_base_id + 30, ItemCategory.ITEM, ItemClassification.useful), + "Silver Sling": LoonylandItemData(loonyland_base_id + 31, ItemCategory.ITEM, ItemClassification.progression) #TODO add cheats #TODO filler #TODO traps diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index 8d57ed8d3326..70969b92df05 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -1,8 +1,10 @@ +from enum import Enum +from typing import NamedTuple, Dict from BaseClasses import Location -loonyland_base_id: int 2876900 +loonyland_base_id: int = 2876900 class LoonylandLocation(Location): @@ -16,115 +18,115 @@ class LocationCategory(Enum): class LoonylandLocationData(NamedTuple): id: int - category: + category: LocationCategory region: str - name: str -location_table = { - LoonylandLocationData(0, LocationCategory.PICKUP, "Halloween Hill", "Swamp Mud Path"), - LoonylandLocationData(1, LocationCategory.PICKUP, "Halloween Hill", "Bog Beast Home"), - LoonylandLocationData(2, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs below Upper Caverns"), - LoonylandLocationData(3, LocationCategory.PICKUP, "Halloween Hill", "Sapling Shrine"), - LoonylandLocationData(4, LocationCategory.PICKUP, "Halloween Hill", "Terror Glade"), - LoonylandLocationData(5, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs Vine"), - LoonylandLocationData(6, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs Grand Pharoh"), - LoonylandLocationData(7, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs Rock Corner"), - LoonylandLocationData(8, LocationCategory.PICKUP, "Halloween Hill", "Mushroom outside town"), - LoonylandLocationData(9, LocationCategory.PICKUP, "Halloween Hill", "North of UG Passage"), - LoonylandLocationData(10, LocationCategory.PICKUP, "Halloween Hill", "Top left mushroom spot"), - LoonylandLocationData(11, LocationCategory.PICKUP, "Halloween Hill", "NE of UG Passage"), - LoonylandLocationData(12, LocationCategory.PICKUP, "Halloween Hill", "East Woods"), - LoonylandLocationData(13, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs Ledge"), - LoonylandLocationData(14, LocationCategory.PICKUP, "Halloween Hill", "Rocky Cliffs Peak"), - LoonylandLocationData(15, LocationCategory.PICKUP, "Halloween Hill", "Cat Tree"), - LoonylandLocationData(16, LocationCategory.PICKUP, "The Witch's Cabin", "Bedroom"), - LoonylandLocationData(17, LocationCategory.PICKUP, "The Witch's Cabin", "Backroom"), - LoonylandLocationData(18, LocationCategory.PICKUP, "Bonita's Cabin", "Barrel Maze"), - LoonylandLocationData(19, LocationCategory.PICKUP, "The Bog Pit", "Top Door"), - LoonylandLocationData(20, LocationCategory.PICKUP, "The Bog Pit", "Post Room"), - LoonylandLocationData(21, LocationCategory.PICKUP, "The Bog Pit", "Window Drip"), - LoonylandLocationData(22, LocationCategory.PICKUP, "The Bog Pit", "Green room"), - LoonylandLocationData(23, LocationCategory.PICKUP, "The Bog Pit", "Arena"), - LoonylandLocationData(24, LocationCategory.PICKUP, "The Bog Pit", "Kill Wall"), - LoonylandLocationData(25, LocationCategory.PICKUP, "Underground Tunnel", "Swampdog Door"), - LoonylandLocationData(26, LocationCategory.PICKUP, "Underground Tunnel", "Scribble Wall"), - LoonylandLocationData(27, LocationCategory.PICKUP, "Underground Tunnel", "Tiny Passage"), - LoonylandLocationData(28, LocationCategory.PICKUP, "Underground Tunnel", "fire frogs"), - LoonylandLocationData(29, LocationCategory.PICKUP, "Underground Tunnel", "Torch Island"), - LoonylandLocationData(30, LocationCategory.PICKUP, "Underground Tunnel", "Small Room"), - LoonylandLocationData(31, LocationCategory.PICKUP, "Swamp Gas Cavern", "Scratch Wall"), - LoonylandLocationData(32, LocationCategory.PICKUP, "Swamp Gas Cavern", "Bat Mound"), - LoonylandLocationData(33, LocationCategory.PICKUP, "Swamp Gas Cavern", "Stair room"), - LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern", "Rock Prison"), - LoonylandLocationData(35, LocationCategory.PICKUP, "A Tiny Cabin", "Tiny Cabin"), - LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin", "Bedside "), - LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt", "Pumpkin Door"), - LoonylandLocationData(38, LocationCategory.PICKUP, "Dusty Crypt", "Maze"), - LoonylandLocationData(39, LocationCategory.PICKUP, "Musty Crypt", "Big Closed Room"), - LoonylandLocationData(40, LocationCategory.PICKUP, "Rusty Crypt", "Spike Vine"), - LoonylandLocationData(41, LocationCategory.PICKUP, "Rusty Crypt", "Boulders"), - LoonylandLocationData(42, LocationCategory.PICKUP, "A Messy Cabin", "Barrel Mess"), - LoonylandLocationData(43, LocationCategory.PICKUP, "Under the Lake", "Lightning Rod Secret"), - LoonylandLocationData(44, LocationCategory.PICKUP, "Under the Lake", "Bat Door"), - LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under the Lake", "SE corner"), - LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under the Lake", "Rhombus"), - LoonylandLocationData(47, LocationCategory.PICKUP, "Frankenjulie's Laboratory", "Boss Reward"), - LoonylandLocationData(48, LocationCategory.PICKUP, "Haunted Tower", "Barracks"), - LoonylandLocationData(49, LocationCategory.PICKUP, "Haunted Tower, Floor 2", "Top Left"), - LoonylandLocationData(50, LocationCategory.PICKUP, "Haunted Tower Roof", "Boss Reward"), - LoonylandLocationData(51, LocationCategory.PICKUP, "Haunted Basement", "DoorDoorDoorDoorDoorDoor"), - LoonylandLocationData(52, LocationCategory.PICKUP, "Abandoned Mines", "Shaft"), - LoonylandLocationData(53, LocationCategory.PICKUP, "The Shrine of Bombulus", "Bombulus"), - LoonylandLocationData(54, LocationCategory.PICKUP, "A Gloomy Cavern", "Lockpick"), - LoonylandLocationData(55, LocationCategory.PICKUP, "Happy Stick Woods", "Happy Stick Hidden"), - LoonylandLocationData(56, LocationCategory.PICKUP, "Happy Stick Woods", "Happy Stick Reward"), - LoonylandLocationData(57, LocationCategory.PICKUP, "The Wolf Den", "Wolf Top Left"), - LoonylandLocationData(58, LocationCategory.PICKUP, "The Wolf Den", "Pumpkin Door"), - LoonylandLocationData(59, LocationCategory.PICKUP, "The Wolf Den", "Grow Room"), - LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Cavern", "The Three ombres"), - LoonylandLocationData(61, LocationCategory.PICKUP, "Under the Ravine", "Left Vine"), - LoonylandLocationData(62, LocationCategory.PICKUP, "Under the Ravine", "Right Vine"), - LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns", "M Pharoh bat Room"), - LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns", "E 2 blue Pharos"), - LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns", "M GARGOYLE ROOM"), - LoonylandLocationData(66, LocationCategory.PICKUP, "Castle Vampy", "Vampire Guard"), - LoonylandLocationData(67, LocationCategory.PICKUP, "Castle Vampy", "maze top left"), - LoonylandLocationData(68, LocationCategory.PICKUP, "Castle Vampy", "Top Right Gauntlet"), - LoonylandLocationData(69, LocationCategory.PICKUP, "Castle Vampy", "Bat Closet"), - LoonylandLocationData(70, LocationCategory.PICKUP, "Castle Vampy II", "Candle Room"), - LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II", "Top Right Top"), - LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II", "Bottom Right Middle"), - LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II", "Bat room"), - LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin in the woods", "Gold Skull"), - LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III", "Middle"), - LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III", "Behind the Pews"), - LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III", "AMBUSH!"), - LoonylandLocationData(78, LocationCategory.PICKUP, "Castle Vampy III", "Halloween"), - LoonylandLocationData(79, LocationCategory.PICKUP, "Castle Vampy III", "So many bats"), - LoonylandLocationData(80, LocationCategory.PICKUP, "Castle Vampy IV", "Right Path"), - LoonylandLocationData(81, LocationCategory.PICKUP, "Castle Vampy IV", "Left Path"), - LoonylandLocationData(82, LocationCategory.PICKUP, "Castle Vampy IV", "Ballroom Right"), - LoonylandLocationData(83, LocationCategory.PICKUP, "Castle Vampy IV", "Right Secret Wall"), - LoonylandLocationData(84, LocationCategory.PICKUP, "Castle Vampy IV", "Ballroom Left"), - LoonylandLocationData(85, LocationCategory.PICKUP, "Castle Vampy Roof", "Gutsy the Elder"), - LoonylandLocationData(86, LocationCategory.PICKUP, "Castle Vampy Roof", "Stoney the Elder"), - LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof", "Drippy the Elder"), - LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof", "Toasty the Elder"), - LoonylandLocationData(89, LocationCategory.PICKUP, "Heart of Terror", "Bonkula"), - LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey Hole", "Bat Door"), - LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey Hole", "Pebbles"), - LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair", "Entrance"), - LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair", "End"), - LoonylandLocationData(94, LocationCategory.QUEST, "The Witch's Cabin", "Ghostbusting"), - LoonylandLocationData(95, LocationCategory.QUEST, "A Cabin3", "Hairy Larry"), - LoonylandLocationData(96, LocationCategory.QUEST, "Halloween Hill", "Scaredy Cat"), - LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill", "Silver Bullet"), - LoonylandLocationData(98, LocationCategory.QUEST, "Halloween Hill", "Smashing Pumpkins"), - LoonylandLocationData(99, LocationCategory.QUEST, "Halloween Hill", "Sticky Shoes"), - LoonylandLocationData(100, LocationCategory.QUEST, "A Cabin4", "The Collection"), - LoonylandLocationData(101, LocationCategory.QUEST, "A Gloomy Cavern", "The Rescue"), - LoonylandLocationData(102, LocationCategory.QUEST, "A Cabin", "Tree Trimming"), - LoonylandLocationData(103, LocationCategory.QUEST, "The Witch's Cabin", "Witch Mushrooms"), - LoonylandLocationData(104, LocationCategory.QUEST, "Halloween Hill", "Zombie Stomp"), +loonyland_location_table: Dict[str, LoonylandLocationData] = { + "Swamp Mud Path": LoonylandLocationData(0, LocationCategory.PICKUP, "Halloween Hill"), + "Bog Beast Home": LoonylandLocationData(1, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs below Upper Caverns": LoonylandLocationData(2, LocationCategory.PICKUP, "Halloween Hill"), + "Sapling Shrine": LoonylandLocationData(3, LocationCategory.PICKUP, "Halloween Hill"), + "Terror Glade": LoonylandLocationData(4, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs Vine": LoonylandLocationData(5, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs Grand Pharoh": LoonylandLocationData(6, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs Rock Corner": LoonylandLocationData(7, LocationCategory.PICKUP, "Halloween Hill"), + "Mushroom outside town": LoonylandLocationData(8, LocationCategory.PICKUP, "Halloween Hill"), + "North of UG Passage": LoonylandLocationData(9, LocationCategory.PICKUP, "Halloween Hill"), + "Top left mushroom spot": LoonylandLocationData(10, LocationCategory.PICKUP, "Halloween Hill"), + "NE of UG Passage": LoonylandLocationData(11, LocationCategory.PICKUP, "Halloween Hill"), + "East Woods": LoonylandLocationData(12, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs Ledge": LoonylandLocationData(13, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs Peak": LoonylandLocationData(14, LocationCategory.PICKUP, "Halloween Hill"), + "Cat Tree": LoonylandLocationData(15, LocationCategory.PICKUP, "Halloween Hill"), + "Bedroom": LoonylandLocationData(16, LocationCategory.PICKUP, "The Witch's Cabin"), + "Backroom": LoonylandLocationData(17, LocationCategory.PICKUP, "The Witch's Cabin"), + "Barrel Maze": LoonylandLocationData(18, LocationCategory.PICKUP, "Bonita's Cabin"), + "Top Door": LoonylandLocationData(19, LocationCategory.PICKUP, "The Bog Pit"), + "Post Room": LoonylandLocationData(20, LocationCategory.PICKUP, "The Bog Pit"), + "Window Drip": LoonylandLocationData(21, LocationCategory.PICKUP, "The Bog Pit"), + "Green room": LoonylandLocationData(22, LocationCategory.PICKUP, "The Bog Pit"), + "Arena": LoonylandLocationData(23, LocationCategory.PICKUP, "The Bog Pit"), + "Kill Wall": LoonylandLocationData(24, LocationCategory.PICKUP, "The Bog Pit"), + "Swampdog Door": LoonylandLocationData(25, LocationCategory.PICKUP, "Underground Tunnel"), + "Scribble Wall": LoonylandLocationData(26, LocationCategory.PICKUP, "Underground Tunnel"), + "Tiny Passage": LoonylandLocationData(27, LocationCategory.PICKUP, "Underground Tunnel"), + "fire frogs": LoonylandLocationData(28, LocationCategory.PICKUP, "Underground Tunnel"), + "Torch Island": LoonylandLocationData(29, LocationCategory.PICKUP, "Underground Tunnel"), + "Small Room": LoonylandLocationData(30, LocationCategory.PICKUP, "Underground Tunnel"), + "Scratch Wall": LoonylandLocationData(31, LocationCategory.PICKUP, "Swamp Gas Cavern"), + "Bat Mound": LoonylandLocationData(32, LocationCategory.PICKUP, "Swamp Gas Cavern"), + "Stair room": LoonylandLocationData(33, LocationCategory.PICKUP, "Swamp Gas Cavern"), + "Rock Prison": LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern"), + "Tiny Cabin": LoonylandLocationData(35, LocationCategory.PICKUP, "A Tiny Cabin"), + "Bedside ": LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin"), + "Pumpkin Door": LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt"), + "Maze": LoonylandLocationData(38, LocationCategory.PICKUP, "Dusty Crypt"), + "Big Closed Room": LoonylandLocationData(39, LocationCategory.PICKUP, "Musty Crypt"), + "Spike Vine": LoonylandLocationData(40, LocationCategory.PICKUP, "Rusty Crypt"), + "Boulders": LoonylandLocationData(41, LocationCategory.PICKUP, "Rusty Crypt"), + "Barrel Mess": LoonylandLocationData(42, LocationCategory.PICKUP, "A Messy Cabin"), + "Lightning Rod Secret": LoonylandLocationData(43, LocationCategory.PICKUP, "Under the Lake"), + "Bat Door": LoonylandLocationData(44, LocationCategory.PICKUP, "Under the Lake"), + "SE corner": LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under the Lake"), + "Rhombus": LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under the Lake"), + "Boss Reward": LoonylandLocationData(47, LocationCategory.PICKUP, "Frankenjulie's Laboratory"), + "Barracks": LoonylandLocationData(48, LocationCategory.PICKUP, "Haunted Tower"), + "Top Left": LoonylandLocationData(49, LocationCategory.PICKUP, "Haunted Tower, Floor 2"), + "Boss Reward": LoonylandLocationData(50, LocationCategory.PICKUP, "Haunted Tower Roof"), + "DoorDoorDoorDoorDoorDoor": LoonylandLocationData(51, LocationCategory.PICKUP, "Haunted Basement"), + "Shaft": LoonylandLocationData(52, LocationCategory.PICKUP, "Abandoned Mines"), + "Bombulus": LoonylandLocationData(53, LocationCategory.PICKUP, "The Shrine of Bombulus"), + "Lockpick": LoonylandLocationData(54, LocationCategory.PICKUP, "A Gloomy Cavern"), + "Happy Stick Hidden": LoonylandLocationData(55, LocationCategory.PICKUP, "Happy Stick Woods"), + "Happy Stick Reward": LoonylandLocationData(56, LocationCategory.PICKUP, "Happy Stick Woods"), + "Wolf Top Left": LoonylandLocationData(57, LocationCategory.PICKUP, "The Wolf Den"), + "Pumpkin Door": LoonylandLocationData(58, LocationCategory.PICKUP, "The Wolf Den"), + "Grow Room": LoonylandLocationData(59, LocationCategory.PICKUP, "The Wolf Den"), + "The Three ombres": LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Cavern"), + "Left Vine": LoonylandLocationData(61, LocationCategory.PICKUP, "Under the Ravine"), + "Right Vine": LoonylandLocationData(62, LocationCategory.PICKUP, "Under the Ravine"), + "M Pharoh bat Room": LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns"), + "E 2 blue Pharos": LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns"), + "M GARGOYLE ROOM": LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns"), + "Vampire Guard": LoonylandLocationData(66, LocationCategory.PICKUP, "Castle Vampy"), + "maze top left": LoonylandLocationData(67, LocationCategory.PICKUP, "Castle Vampy"), + "Top Right Gauntlet": LoonylandLocationData(68, LocationCategory.PICKUP, "Castle Vampy"), + "Bat Closet": LoonylandLocationData(69, LocationCategory.PICKUP, "Castle Vampy"), + "Candle Room": LoonylandLocationData(70, LocationCategory.PICKUP, "Castle Vampy II"), + "Top Right Top": LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II"), + "Bottom Right Middle": LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II"), + "Bat room": LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II"), + "Gold Skull": LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin in the woods"), + "Middle": LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III"), + "Behind the Pews": LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III"), + "AMBUSH!": LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III"), + "Halloween": LoonylandLocationData(78, LocationCategory.PICKUP, "Castle Vampy III"), + "So many bats": LoonylandLocationData(79, LocationCategory.PICKUP, "Castle Vampy III"), + "Right Path": LoonylandLocationData(80, LocationCategory.PICKUP, "Castle Vampy IV"), + "Left Path": LoonylandLocationData(81, LocationCategory.PICKUP, "Castle Vampy IV"), + "Ballroom Right": LoonylandLocationData(82, LocationCategory.PICKUP, "Castle Vampy IV"), + "Right Secret Wall": LoonylandLocationData(83, LocationCategory.PICKUP, "Castle Vampy IV"), + "Ballroom Left": LoonylandLocationData(84, LocationCategory.PICKUP, "Castle Vampy IV"), + "Gutsy the Elder": LoonylandLocationData(85, LocationCategory.PICKUP, "Castle Vampy Roof"), + "Stoney the Elder": LoonylandLocationData(86, LocationCategory.PICKUP, "Castle Vampy Roof"), + "Drippy the Elder": LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof"), + "Toasty the Elder": LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof"), + "Bonkula": LoonylandLocationData(89, LocationCategory.PICKUP, "Heart of Terror"), + "Bat Door": LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey Hole"), + "Pebbles": LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey Hole"), + "Entrance": LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair"), + "End": LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair"), + "Save Halloween Hill": LoonylandLocationData(94, LocationCategory.QUEST, "The Evilizer"), + "Ghostbusting": LoonylandLocationData(95, LocationCategory.QUEST, "The Witch's Cabin"), + "Hairy Larry": LoonylandLocationData(96, LocationCategory.QUEST, "A Cabin3"), + "Scaredy Cat": LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill"), + "Silver Bullet": LoonylandLocationData(98, LocationCategory.QUEST, "Halloween Hill"), + "Smashing Pumpkins": LoonylandLocationData(99, LocationCategory.QUEST, "Halloween Hill"), + "Sticky Shoes": LoonylandLocationData(100, LocationCategory.QUEST, "Halloween Hill"), + "The Collection": LoonylandLocationData(101, LocationCategory.QUEST, "A Cabin4"), + "The Rescue": LoonylandLocationData(102, LocationCategory.QUEST, "A Gloomy Cavern"), + "Tree Trimming": LoonylandLocationData(103, LocationCategory.QUEST, "A Cabin"), + "Witch Mushrooms": LoonylandLocationData(104, LocationCategory.QUEST, "The Witch's Cabin"), + "Zombie Stomp": LoonylandLocationData(105, LocationCategory.QUEST, "Halloween Hill") #todo the 40 badge locations - " \ No newline at end of file +} \ No newline at end of file diff --git a/worlds/loonyland/Options.py b/worlds/loonyland/Options.py index 8d142429df5b..f6e23384eb6f 100644 --- a/worlds/loonyland/Options.py +++ b/worlds/loonyland/Options.py @@ -1,8 +1,8 @@ from dataclasses import dataclass -from Options import Toggle, Range, Choice, PerGameCommonOptions +from Options import Choice, PerGameCommonOptions -class WinCondition(Choice) +class WinCondition(Choice): display_name = "Win Condition" option_evilizer = 0 option_40badges = 1 diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index e661a68d74fe..8f52d2f21e71 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -1,5 +1,4 @@ region_table: [str] = { - # "Menu", "Halloween Hill", "A Cabin", @@ -50,13 +49,18 @@ "Larry's Lair", #logical regions - "Rocky Cliffs" - "Zombiton" + "Rocky Cliffs", + "Zombiton", #gamemodes - "Bowling" + "Bowling", "Survival", "Boss Bash", "Loony Ball", "Remix" +} + +region_data_table: Dict[str, CliqueRegionData] = { + "Menu": CliqueRegionData(["The Button Realm"]), + "The Button Realm": CliqueRegionData(), } \ No newline at end of file diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index 6af137f55af7..86df26d1e03b 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -1,203 +1,195 @@ -class LoonylandRules: +from BaseClasses import CollectionState +from worlds.generic.Rules import add_item_rule, add_rule + + +def have_light_source(state: CollectionState, player: int) -> bool: + return state.has("Lantern", player) or (state.has("Stick", player) and state.has("Boots", player)) - access_rules = { - "Halloween Hill - Swamp Mud Path": lambda state: state.has("Boots", player), - "Halloween Hill - Bog Beast Home": lambda state: true, - "Halloween Hill - Rocky Cliffs below Upper Caverns": lambda state: CanEnterRockyCliffs(state, player)), - "Halloween Hill - Sapling Shrine": lambda state: state.has("Boots", player), - "Halloween Hill - Terror Glade": lambda state: true), - "Halloween Hill - Rocky Cliffs Vine": lambda state: state.has("Fertilizer", player), - "Halloween Hill - Rocky Cliffs Grand Pharoh": lambda state: CanEnterRockyCliffs(state, player), - "Halloween Hill - Rocky Cliffs Rock Corner": lambda state: CanEnterRockyCliffs(state, player) and HaveBombs(state, player), - "Halloween Hill - Mushroom outside town": lambda state: true, - "Halloween Hill - North of UG Passage": lambda state: true, - "Halloween Hill - Top left mushroom spot": lambda state: true, - "Halloween Hill - NE of UG Passage": lambda state: true, - "Halloween Hill - East Woods": lambda state: true, - "Halloween Hill - Rocky Cliffs Ledge": lambda state: CanEnterRockyCliffs(state, player), - "Halloween Hill - Rocky Cliffs Peak": lambda state: CanEnterRockyCliffs(state, player), - "Halloween Hill - Cat Tree": lambda state: true, - "The Witch's Cabin - Bedroom": lambda state: HaveLightSource(state, player), - "The Witch's Cabin - Backroom": lambda state: true, - "Bonita's Cabin - Barrel Maze": lambda state: true, - "The Bog Pit - Top Door": lambda state: state.has("Skull Key", player), - "The Bog Pit - Post Room": lambda state: true, - "The Bog Pit - Window Drip": lambda state: true, - "The Bog Pit - Green room": lambda state: true, - "The Bog Pit - Arena": lambda state: true, - "The Bog Pit - Kill Wall": lambda state: true, - "Underground Tunnel - Swampdog Door": lambda state: state.has("Pumpkin Key", player), - "Underground Tunnel - Scribble Wall": lambda state: HaveSpecialWeaponBullet(state, player), - "Underground Tunnel - Tiny Passage": lambda state: true, - "Underground Tunnel - fire frogs": lambda state: true, - "Underground Tunnel - Torch Island": lambda state: state.has("Boots", player), - "Underground Tunnel - Small Room": lambda state: true, - "Swamp Gas Cavern - Scratch Wall": lambda state: state.has("Boots", player) and HaveSpecialWeaponBullet)state, player), - "Swamp Gas Cavern - Bat Mound": lambda state: state.has("Boots", player) and state.has("Bat Key", player), - "Swamp Gas Cavern - Stair room": lambda state: state.has("Boots", player), - "Swamp Gas Cavern - Rock Prison": lambda state: state.has("Boots", player) and HaveBombs(state, player), - "A Tiny Cabin - Tiny Cabin": lambda state: state.has("Skull Key", player), - "A Cabin - Bedside ": lambda state: CanEnterZombiton(state, player), - "Dusty Crypt - Pumpkin Door": lambda state: HaveLightSource(state, player) and state.has("Pumpkin Key", player), - "Dusty Crypt - Maze": lambda state: HaveLightSource(state, player), - "Musty Crypt - Big Closed Room": lambda state: HaveLightSource(state, player) and CanEnterZombiton(state, player) and HaveSpecialWeaponBullet(state, player) - "Rusty Crypt - Spike Vine": lambda state: HaveLightSource(state, player) and state.has("Fertilizer", player), - "Rusty Crypt - Boulders": lambda state: HaveLightSource(state, player), - "A Messy Cabin - Barrel Mess": lambda state: CanEnterZombiton(state, player), - "Under the Lake - Lightning Rod Secret": lambda state: HaveLightSource(state, player) and HaveAllOrbs(state, player), - "Under the Lake - Bat Door": lambda state: HaveLightSource(state, player) and HaveAllOrbs(state, player) and state.has("Bat Key", player), - "Deeper Under the Lake - SE corner": lambda state: HaveLightSource(state, player) and HaveAllOrbs(state, player), - "Deeper Under the Lake - Rhombus": lambda state: HaveLightSource(state, player) and HaveAllOrbs(state, player), - "Frankenjulie's Laboratory - Boss Reward": lambda state: HaveLightSource(state, player) and HaveAllOrbs(state, player), - "Haunted Tower - Barracks": lambda state: state.has("Ghost Potion", player) and state.has("Bat Key", player), - "Haunted Tower, Floor 2 - Top Left": lambda state: state.has("Ghost Potion", player), - "Haunted Tower Roof - Boss Reward": lambda state: state.has("Ghost Potion", player), - "Haunted Basement - DoorDoorDoorDoorDoorDoor": lambda state: state.has("Ghost Potion", player) and HaveLightSource(state, player) and state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), - "Abandoned Mines - Shaft": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), - "The Shrine of Bombulus - Bombulus": lambda state: CanEnterRockyCliffs(state, player), - "A Gloomy Cavern - Lockpick": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), - "Happy Stick Woods - Happy Stick Hidden": lambda state: state.has("Talisman", player), - "Happy Stick Woods - Happy Stick Reward": lambda state: state.has("Talisman", player), - "The Wolf Den - Wolf Top Left": lambda state: HaveLightSource(state, player) and state.has("Silver Sling", player), - "The Wolf Den - Pumpkin Door": lambda state: HaveLightSource(state, player) and state.has("Silver Sling", player) and state.has("Pumpkin Key", player), - "The Wolf Den - Grow Room": lambda state: HaveLightSource(state, player) and state.has("Silver Sling", player) and state.has("Fertilizer", player), - "Upper Creepy Cavern - The Three ombres": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), - "Under the Ravine - Left Vine": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player) and state.has("Fertilizer", player), - "Under the Ravine - Right Vine": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player) and state.has("Fertilizer", player), - "Creepy Caverns - M Pharoh bat Room": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player) and state.has("Bat Key", player), - "Creepy Caverns - E 2 blue Pharos": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), - "Creepy Caverns - M GARGOYLE ROOM": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), - "Castle Vampy - Vampire Guard": lambda state: CanEnterVampy(state, player), - "Castle Vampy - maze top left": lambda state: CanEnterVampy(state, player), - "Castle Vampy - Top Right Gauntlet": lambda state: CanEnterVampy(state, player), - "Castle Vampy - Bat Closet": lambda state: CanEnterVampy(state, player), - "Castle Vampy II - Candle Room": lambda state: CanEnterVampyII(state, player), - "Castle Vampy II - Top Right Top": lambda state: CanEnterVampyII(state, player), - "Castle Vampy II - Bottom Right Middle": lambda state: CanEnterVampyII(state, player), - "Castle Vampy II - Bat room": lambda state: CanEnterVampyII(state, player) and HaveSpecialWeaponBullet(state, player), - "Cabin in the woods - Gold Skull": lambda state: true, - "Castle Vampy III - Middle": lambda state: CanEnterVampyIII(state, player), - "Castle Vampy III - Behind the Pews": lambda state: CanEnterVampyIII(state, player), - "Castle Vampy III - AMBUSH!": lambda state: CanEnterVampyIII(state, player), - "Castle Vampy III - Halloween": lambda state: CanEnterVampyIII(state, player), - "Castle Vampy III - So many bats": lambda state: CanEnterVampyIII(state, player), - "Castle Vampy IV - Right Path": lambda state: CanEnterVampyIV(state, player), - "Castle Vampy IV - Left Path": lambda state: CanEnterVampyIV(state, player), - "Castle Vampy IV - Ballroom Right": lambda state: CanEnterVampyIV(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), - "Castle Vampy IV - Right Secret Wall": lambda state: CanEnterVampyIV(state, player), - "Castle Vampy IV - Ballroom Left": lambda state: CanEnterVampyIV(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), - "Castle Vampy Roof - Gutsy the Elder": lambda state: CanEnterVampy(state, player) and HaveAllBats(state, player) and HaveSpecialWeaponDamage(state, player), - "Castle Vampy Roof - Stoney the Elder": lambda state: CanEnterVampy(state, player) and HaveAllBats(state, player), - "Castle Vampy Roof - Drippy the Elder": lambda state: CanEnterVampy(state, player) and HaveAllBats(state, player)), - "Castle Vampy Roof - Toasty the Elder": lambda state: CanEnterVampy(state, player) and HaveAllBats(state, player), - "Heart of Terror - Bonkula": lambda state: CanEnterVampyIV(state, player) and HaveAllVamps(state, player), - "A Hidey Hole - Bat Door": lambda state: state.has("Bat Key", player), - "A Hidey Hole - Pebbles": lambda state: true, - "Swampdog Lair - Entrance": lambda state: state.has("Boots", player), - "Swampdog Lair - End": lambda state: state.has("Boots", player) and HaveLightSource(state, player) and state.has("Fertilizer", player), - "The Witch's Cabin - Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Daisy", player) and HaveAllMushrooms(state, player), - "A Cabin3 - Hairy Larry": lambda state: HaveLightSource(state, player) and state.has("Silver Sling", player) and state.has("Boots", player) , - "Halloween Hill - Scaredy Cat": lambda state: state.has("Cat", player), - "Halloween Hill - Silver Bullet": lambda state: state.has("Silver", player) and CanCleanseCrypts(state, player), - "Halloween Hill - Smashing Pumpkins": lambda state: CanCleanseCrypts(state, player), - "Halloween Hill - Sticky Shoes": lambda state: true - "A Cabin4 - The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and CanEnterVampy(state, player), - "A Gloomy Cavern - The Rescue": lambda state: HaveLightSource(state, player) and CanEnterRockyCliffs(state, player), - "A Cabin - Tree Trimming": lambda state: true, - "The Witch's Cabin - Witch Mushrooms": lambda state: HaveAllMushrooms(state, player), - "Halloween Hill - Zombie Stomp": lambda state: CanCleanseCrypts(state, player) - } - - -def HaveLightSource(state: CollectionState, player: int) -> bool: - return (state.has("Lantern", player) or (state.has("Stick", player) and state.has("Boots", player))) +def have_bombs(state: CollectionState, player: int) -> bool: + return state.has("Bombs", player) + # or werewolf badge when badges are added -def HaveBombs(state: CollectionState, player: int) -> bool: - return state.has("Bombs", player) - #or werewolf badge when badges are added +def have_all_orbs(state: CollectionState, player: int) -> bool: + return state.count("Orb", player) >= 4 -def HaveAnyBigGem(state: CollectionState, player: int) -> bool: - return state.has("Big Gem", player) -def HaveAllOrbs(state: CollectionState, player: int) -> bool: - return (state.count("Orb", player) >= 4) +def have_all_bats(state: CollectionState, player: int) -> bool: + return state.count("Bat Statue", player) >= 4 -def HaveAllBats(state: CollectionState, player: int) -> bool: - return (state.count("Bat Statue", player) >= 4) -def HaveAllVamps(state: CollectionState, player: int) -> bool: - return (state.count("Vampire Statue", player) >= 8) +def have_all_vamps(state: CollectionState, player: int) -> bool: + return state.count("Vampire Statue", player) >= 8 -def HaveSpecialWeaponDamage(state: CollectionState, player: int) -> bool: - return ( - state.has("Bombs", player) or - state.has("Shock Wand", player) or - #state.has("Ice Spear") ice doesn't hurt elder - state.has("Cactus", player) or - state.has("Boomerang", player) or - state.has("Whoopee", player) or - state.has("Hot Pants", player) + +def have_special_weapon_damage(state: CollectionState, player: int) -> bool: + return ( + state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) ) -def HaveSpecialWeaponBullet(state: CollectionState, player: int) -> bool: + +def have_special_weapon_bullet(state: CollectionState, player: int) -> bool: return ( - state.has("Bombs", player) or - #state.has("Shock Wand") or shock wand isn't bullet - state.has("Ice Spear", player) or - state.has("Cactus", player) or - state.has("Boomerang", player) or - state.has("Whoopee", player) or - state.has("Hot Pants", player) + state.has_any(("Bombs", "Ice Spear", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) ) - #return true slingshot counts -def HaveSpecialWeaponRangeDamage(state: CollectionState, player: int) -> bool: + +# return true slingshot counts + +def have_special_weapon_range_damage(state: CollectionState, player: int) -> bool: return ( - state.has("Bombs", player) or - state.has("Shock Wand", player) or - #state.has("Ice Spear") or Ice spear no damage - state.has("Cactus", player) or - state.has("Boomerang", player) or - #state.has("Whoopee") or whopee not ranged - #state.has("Hot Pants") hot pants not ranged + state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang"), player) ) - #return true slingshot counts + # return true slingshot counts + -def HaveSpecialWeaponThroughWalls(state: CollectionState, player: int) -> bool: +def have_special_weapon_through_walls(state: CollectionState, player: int) -> bool: return ( - state.has("Bombs", player) or - state.has("Shock Wand", player) or - #state.has("Ice Spear") or Ice spear no damage - #state.has("Cactus") or - #state.has("Boomerang") or - state.has("Whoopee", player) - #state.has("Hot Pants") - ) + state.has_any(("Bombs", "Shock Wand", "Whoopee"), player) + # state.has("Hot Pants") ) -def HaveAllMushrooms(state: CollectionState, player: int) -> bool: - return state.count("Mushroom", player) >= 10 -def CanCleanseCrypts(state: CollectionState, player: int) -> bool: - return (HaveLightSource(state, player) and CanEnterZombiton(state, player) and HaveSpecialWeaponRangeDamage(state, player)) +def can_cleanse_crypts(state: CollectionState, player: int) -> bool: + return (have_light_source(state, player) and can_enter_zombiton(state, player) and have_special_weapon_range_damage( + state, player)) + -#these will get removed in favor of region access reqs eventually -def CanEnterZombiton(state: CollectionState, player: int) -> bool: - return state.has("Boots", player) +# these will get removed in favor of region access reqs eventually +def can_enter_zombiton(state: CollectionState, player: int) -> bool: + return state.has("Boots", player) -def CanEnterRockyCliffs(state: CollectionState, player: int) -> bool: - return state.has("Big Gem", player) - -def CanEnterVampy(state: CollectionState, player: int) -> bool: - return CanEnterRockyCliffs(state, player) and HaveLightSource(state, player) -def CanEnterVampyII(state: CollectionState, player: int) -> bool: - return CanEnterVampy(state, player) && state.has("Skull Key", player) +def can_enter_rocky_cliffs(state: CollectionState, player: int) -> bool: + return state.has("Big Gem", player) -def CanEnterVampyIII(state: CollectionState, player: int) -> bool: - return CanEnterVampyII(state, player) && state.has("Bat Key", player) -def CanEnterVampyIV(state: CollectionState, player: int) -> bool: - return CanEnterVampyIII(inv) && state.has("Pumpkin Key", player) \ No newline at end of file +def can_enter_vampy(state: CollectionState, player: int) -> bool: + return can_enter_rocky_cliffs(state, player) and have_light_source(state, player) + + +def can_enter_vampy_ii(state: CollectionState, player: int) -> bool: + return can_enter_vampy(state, player) and state.has("Skull Key", player) + + +def can_enter_vampy_iii(state: CollectionState, player: int) -> bool: + return can_enter_vampy_ii(state, player) and state.has("Bat Key", player) + + +def can_enter_vampy_iv(state: CollectionState, player: int) -> bool: + return can_enter_vampy_iii(state, player) and state.has("Pumpkin Key", player) + +def set_rules(multiworld, world, player): + + access_rules = { + "Halloween Hill - Swamp Mud Path": lambda state: state.has("Boots", player), + "Halloween Hill - Bog Beast Home": True, + "Halloween Hill - Rocky Cliffs below Upper Caverns": lambda state: can_enter_rocky_cliffs(state, player), + "Halloween Hill - Sapling Shrine": lambda state: state.has("Boots", player), + "Halloween Hill - Terror Glade": True, + "Halloween Hill - Rocky Cliffs Vine": lambda state: state.has("Fertilizer", player), + "Halloween Hill - Rocky Cliffs Grand Pharoh": lambda state: can_enter_rocky_cliffs(state, player), + "Halloween Hill - Rocky Cliffs Rock Corner": lambda state: can_enter_rocky_cliffs(state, player) and have_bombs(state, player), + "Halloween Hill - Mushroom outside town": True, + "Halloween Hill - North of UG Passage": True, + "Halloween Hill - Top left mushroom spot": True, + "Halloween Hill - NE of UG Passage": True, + "Halloween Hill - East Woods": True, + "Halloween Hill - Rocky Cliffs Ledge": lambda state: can_enter_rocky_cliffs(state, player), + "Halloween Hill - Rocky Cliffs Peak": lambda state: can_enter_rocky_cliffs(state, player), + "Halloween Hill - Cat Tree": True, + "The Witch's Cabin - Bedroom": lambda state: have_light_source(state, player), + "The Witch's Cabin - Backroom": True, + "Bonita's Cabin - Barrel Maze": True, + "The Bog Pit - Top Door": lambda state: state.has("Skull Key", player), + "The Bog Pit - Post Room": True, + "The Bog Pit - Window Drip": True, + "The Bog Pit - Green room": True, + "The Bog Pit - Arena": True, + "The Bog Pit - Kill Wall": True, + "Underground Tunnel - Swampdog Door": lambda state: state.has("Pumpkin Key", player), + "Underground Tunnel - Scribble Wall": lambda state: have_special_weapon_bullet(state, player), + "Underground Tunnel - Tiny Passage": True, + "Underground Tunnel - fire frogs": True, + "Underground Tunnel - Torch Island": lambda state: state.has("Boots", player), + "Underground Tunnel - Small Room": True, + "Swamp Gas Cavern - Scratch Wall": lambda state: state.has("Boots", player) and have_special_weapon_bullet(state, player), + "Swamp Gas Cavern - Bat Mound": lambda state: state.has("Boots", player) and state.has("Bat Key", player), + "Swamp Gas Cavern - Stair room": lambda state: state.has("Boots", player), + "Swamp Gas Cavern - Rock Prison": lambda state: state.has("Boots", player) and have_bombs(state, player), + "A Tiny Cabin - Tiny Cabin": lambda state: state.has("Skull Key", player), + "A Cabin - Bedside ": lambda state: can_enter_zombiton(state, player), + "Dusty Crypt - Pumpkin Door": lambda state: have_light_source(state, player) and state.has("Pumpkin Key", player), + "Dusty Crypt - Maze": lambda state: have_light_source(state, player), + "Musty Crypt - Big Closed Room": lambda state: have_light_source(state, player) and can_enter_zombiton(state, player) and have_special_weapon_bullet(state, player), + "Rusty Crypt - Spike Vine": lambda state: have_light_source(state, player) and state.has("Fertilizer", player), + "Rusty Crypt - Boulders": lambda state: have_light_source(state, player), + "A Messy Cabin - Barrel Mess": lambda state: can_enter_zombiton(state, player), + "Under the Lake - Lightning Rod Secret": lambda state: have_light_source(state, player) and have_all_orbs(state, player), + "Under the Lake - Bat Door": lambda state: have_light_source(state, player) and have_all_orbs(state, player) and state.has("Bat Key", player), + "Deeper Under the Lake - SE corner": lambda state: have_light_source(state, player) and have_all_orbs(state, player), + "Deeper Under the Lake - Rhombus": lambda state: have_light_source(state, player) and have_all_orbs(state, player), + "Frankenjulie's Laboratory - Boss Reward": lambda state: have_light_source(state, player) and have_all_orbs(state, player), + "Haunted Tower - Barracks": lambda state: state.has("Ghost Potion", player) and state.has("Bat Key", player), + "Haunted Tower, Floor 2 - Top Left": lambda state: state.has("Ghost Potion", player), + "Haunted Tower Roof - Boss Reward": lambda state: state.has("Ghost Potion", player), + "Haunted Basement - DoorDoorDoorDoorDoorDoor": lambda state: state.has("Ghost Potion", player) and have_light_source(state, player) and state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), + "Abandoned Mines - Shaft": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), + "The Shrine of Bombulus - Bombulus": lambda state: can_enter_rocky_cliffs(state, player), + "A Gloomy Cavern - Lockpick": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), + "Happy Stick Woods - Happy Stick Hidden": lambda state: state.has("Talisman", player), + "Happy Stick Woods - Happy Stick Reward": lambda state: state.has("Talisman", player), + "The Wolf Den - Wolf Top Left": lambda state: have_light_source(state, player) and state.has("Silver Sling", player), + "The Wolf Den - Pumpkin Door": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Pumpkin Key", player), + "The Wolf Den - Grow Room": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Fertilizer", player), + "Upper Creepy Cavern - The Three ombres": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), + "Under the Ravine - Left Vine": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player) and state.has("Fertilizer", player), + "Under the Ravine - Right Vine": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player) and state.has("Fertilizer", player), + "Creepy Caverns - M Pharoh bat Room": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player) and state.has("Bat Key", player), + "Creepy Caverns - E 2 blue Pharos": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), + "Creepy Caverns - M GARGOYLE ROOM": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), + "Castle Vampy - Vampire Guard": lambda state: can_enter_vampy(state, player), + "Castle Vampy - maze top left": lambda state: can_enter_vampy(state, player), + "Castle Vampy - Top Right Gauntlet": lambda state: can_enter_vampy(state, player), + "Castle Vampy - Bat Closet": lambda state: can_enter_vampy(state, player), + "Castle Vampy II - Candle Room": lambda state: can_enter_vampy_ii(state, player), + "Castle Vampy II - Top Right Top": lambda state: can_enter_vampy_ii(state, player), + "Castle Vampy II - Bottom Right Middle": lambda state: can_enter_vampy_ii(state, player), + "Castle Vampy II - Bat room": lambda state: can_enter_vampy_ii(state, player) and have_special_weapon_bullet(state, player), + "Cabin in the woods - Gold Skull": True, + "Castle Vampy III - Middle": lambda state: can_enter_vampy_iii(state, player), + "Castle Vampy III - Behind the Pews": lambda state: can_enter_vampy_iii(state, player), + "Castle Vampy III - AMBUSH!": lambda state: can_enter_vampy_iii(state, player), + "Castle Vampy III - Halloween": lambda state: can_enter_vampy_iii(state, player), + "Castle Vampy III - So many bats": lambda state: can_enter_vampy_iii(state, player), + "Castle Vampy IV - Right Path": lambda state: can_enter_vampy_iv(state, player), + "Castle Vampy IV - Left Path": lambda state: can_enter_vampy_iv(state, player), + "Castle Vampy IV - Ballroom Right": lambda state: can_enter_vampy_iv(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Castle Vampy IV - Right Secret Wall": lambda state: can_enter_vampy_iv(state, player), + "Castle Vampy IV - Ballroom Left": lambda state: can_enter_vampy_iv(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Castle Vampy Roof - Gutsy the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player) and have_special_weapon_damage(state, player), + "Castle Vampy Roof - Stoney the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), + "Castle Vampy Roof - Drippy the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), + "Castle Vampy Roof - Toasty the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), + "Heart of Terror - Bonkula": lambda state: can_enter_vampy_iv(state, player) and have_all_vamps(state, player), + "A Hidey Hole - Bat Door": lambda state: state.has("Bat Key", player), + "A Hidey Hole - Pebbles": True, + "Swampdog Lair - Entrance": lambda state: state.has("Boots", player), + "Swampdog Lair - End": lambda state: state.has("Boots", player) and have_light_source(state, player) and state.has("Fertilizer", player), + "The Witch's Cabin - Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Daisy", player) and state.has("Mushroom", player, 10), + "A Cabin3 - Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Boots", player) , + "Halloween Hill - Scaredy Cat": lambda state: state.has("Cat", player), + "Halloween Hill - Silver Bullet": lambda state: state.has("Silver", player) and can_cleanse_crypts(state, player), + "Halloween Hill - Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), + "Halloween Hill - Sticky Shoes": True, + "A Cabin4 - The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and can_enter_vampy(state, player), + "A Gloomy Cavern - The Rescue": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), + "A Cabin - Tree Trimming": True, + "The Witch's Cabin - Witch Mushrooms": lambda state: state.has("Mushroom", player, 10), + "Halloween Hill - Zombie Stomp": lambda state: can_cleanse_crypts(state, player) + } + for loc in multiworld.get_locations(player): + if loc.name in access_rules: + add_rule(loc, access_rules[loc.name]) + diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index dc22956bf8e5..6d0ab6343be9 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -1,34 +1,87 @@ -# world/Loonyland/__init__.py - -import settings -import typing -from .options import LoonylandOptions -from .items import Loonyland_items, item_frequencies, LoonylandItem -from .locations import Loonyland_locations, LoonylandLocation -from worlds.AutoWorld import World -from BaseClasses import Region, Location, Entrance, Item, RegionType, ItemClassification - - -class MyGameSettings(settings.Group): - - -class MyGameWorld(World): - """Insert description of the world/game here.""" - game = "Loonyland" - options_dataclass = LoonylandOptions # options the player can set - options: LoonylandOptions # typing hints for option results - settings: typing.ClassVar[MyGameSettings] # will be automatically assigned from type hint - topology_present = True # show path to required location checks in spoiler - - # ID of first item and location, could be hard-coded but code may be easier - # to read with this as a property. - base_id = 2876900 - # instead of dynamic numbering, IDs could be part of data - - # The following two dicts are required for the generation to know which - # items exist. They could be generated from json or something else. They can - # include events, but don't have to since events will be placed manually. - item_name_to_id = {name: id for - id, name in enumerate(mygame_items, base_id)} - location_name_to_id = {name: id for - id, name in enumerate(mygame_locations, base_id)} +from typing import List, Dict, Any + +from BaseClasses import Region, Tutorial +from worlds.AutoWorld import WebWorld, World +from .Items import LoonylandItem, item_frequencies, loony_item_table +from .Locations import LoonylandLocation, LoonylandLocationData, loonyland_location_table #, locked_locations +from .Options import LoonylandOptions +from .Regions import region_table +from .Rules import set_rules + + +class LoonylandWebWorld(World): + theme = "partyTime" + + setup_en = Tutorial( + tutorial_name="Start Guide", + description="A guide to playing Loonyland.", + language="English", + file_name="guide_en.md", + link="guide/en", + authors=["Phar"] + ) + + tutorials = [setup_en] + +class LoonylandWorld(World): + """The greatest game of all time.""" + + game = "Loonyland" + web = LoonylandWebWorld(World) + options: LoonylandOptions + options_dataclass = LoonylandOptions + #location_name_to_id = location_table + #item_name_to_id = item_table + + def create_item(self, name: str) -> LoonylandItem: + return LoonylandItem(name, loony_item_table[name].classification, loony_item_table[name].id, self.player) + + def create_items(self) -> None: + item_pool: List[LoonylandItem] = [] + for name, item in loony_item_table.items(): + if item.id: #and item.can_create(self): + item_pool.append(self.create_item(name)) + + self.multiworld.itempool += item_pool + + def create_regions(self) -> None: + # Create regions. + for region_name in region_table: + region = Region(region_name, self.player, self.multiworld) + self.multiworld.regions.append(region) + + # Create locations. + for region_name in region_table: + region = self.get_region(region_name) + region.add_locations({ + location_name: location_data.id for location_name, location_data in loonyland_location_table.items() + if location_data.region == region_name # and location_data.can_create(self) + }, LoonylandLocation) + #region.add_exits(region_table[region_name].connecting_regions) + + # Place locked locations. + #for location_name, location_data in locked_locations.items(): + # Ignore locations we never created. + # if not location_data.can_create(self): + # continue + + # locked_item = self.create_item(location_data_table[location_name].locked_item) + # self.get_location(location_name).place_locked_item(locked_item) + + # Set priority location for the Big Red Button! + #self.options.priority_locations.value.add("The Big Red Button") + + def get_filler_item_name(self) -> str: + return "A Cool Filler Item (No Satisfaction Guaranteed)" + + def set_rules(self): + set_rules(self.multiworld, self, self.player) + + # Completion condition. + self.multiworld.completion_condition[self.player] = lambda state: state.can_reach_location("Save Halloween Hill", self.player) + + def fill_slot_data(self) -> Dict[str, Any]: + return { + + "sampledata": "plerp" + } \ No newline at end of file From 4d14feba752114dad0ce8a769b6a40c1c373db28 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 7 Dec 2024 08:11:42 -0500 Subject: [PATCH 14/58] naming locations to avoid duplicates remove bad copied code from regions Support location_name_to_id and item_name_to_id in init.py --- worlds/loonyland/Locations.py | 6 +++--- worlds/loonyland/Regions.py | 5 ----- worlds/loonyland/__init__.py | 10 +++++----- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index 70969b92df05..07ba67c4619c 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -59,17 +59,17 @@ class LoonylandLocationData(NamedTuple): "Rock Prison": LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern"), "Tiny Cabin": LoonylandLocationData(35, LocationCategory.PICKUP, "A Tiny Cabin"), "Bedside ": LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin"), - "Pumpkin Door": LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt"), + "Crypt Pumpkin Door": LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt"), "Maze": LoonylandLocationData(38, LocationCategory.PICKUP, "Dusty Crypt"), "Big Closed Room": LoonylandLocationData(39, LocationCategory.PICKUP, "Musty Crypt"), "Spike Vine": LoonylandLocationData(40, LocationCategory.PICKUP, "Rusty Crypt"), "Boulders": LoonylandLocationData(41, LocationCategory.PICKUP, "Rusty Crypt"), "Barrel Mess": LoonylandLocationData(42, LocationCategory.PICKUP, "A Messy Cabin"), "Lightning Rod Secret": LoonylandLocationData(43, LocationCategory.PICKUP, "Under the Lake"), - "Bat Door": LoonylandLocationData(44, LocationCategory.PICKUP, "Under the Lake"), + "Lake Bat Door": LoonylandLocationData(44, LocationCategory.PICKUP, "Under the Lake"), "SE corner": LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under the Lake"), "Rhombus": LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under the Lake"), - "Boss Reward": LoonylandLocationData(47, LocationCategory.PICKUP, "Frankenjulie's Laboratory"), + "Frankenjulie's Reward": LoonylandLocationData(47, LocationCategory.PICKUP, "Frankenjulie's Laboratory"), "Barracks": LoonylandLocationData(48, LocationCategory.PICKUP, "Haunted Tower"), "Top Left": LoonylandLocationData(49, LocationCategory.PICKUP, "Haunted Tower, Floor 2"), "Boss Reward": LoonylandLocationData(50, LocationCategory.PICKUP, "Haunted Tower Roof"), diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index 8f52d2f21e71..0516f1285ecd 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -59,8 +59,3 @@ "Loony Ball", "Remix" } - -region_data_table: Dict[str, CliqueRegionData] = { - "Menu": CliqueRegionData(["The Button Realm"]), - "The Button Realm": CliqueRegionData(), -} \ No newline at end of file diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 6d0ab6343be9..6922838a2356 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -9,7 +9,7 @@ from .Rules import set_rules -class LoonylandWebWorld(World): +class LoonylandWebWorld(WebWorld): theme = "partyTime" setup_en = Tutorial( @@ -18,7 +18,7 @@ class LoonylandWebWorld(World): language="English", file_name="guide_en.md", link="guide/en", - authors=["Phar"] + authors=["AutomaticFrenzy"] ) tutorials = [setup_en] @@ -27,11 +27,11 @@ class LoonylandWorld(World): """The greatest game of all time.""" game = "Loonyland" - web = LoonylandWebWorld(World) + web = LoonylandWebWorld() options: LoonylandOptions options_dataclass = LoonylandOptions - #location_name_to_id = location_table - #item_name_to_id = item_table + location_name_to_id = {name: data.id for name, data in loonyland_location_table.items()} + item_name_to_id = {name: data.id for name, data in loony_item_table.items()} def create_item(self, name: str) -> LoonylandItem: return LoonylandItem(name, loony_item_table[name].classification, loony_item_table[name].id, self.player) From 2f04521a80f831dceafa10fa0a3781402721bb99 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 7 Dec 2024 12:09:18 -0500 Subject: [PATCH 15/58] Entrance Information Locations include region in their name regions implemented Rules cleanup Working on regions and entrances in init --- worlds/loonyland/EntranceRules.py | 0 worlds/loonyland/Entrances.py | 217 ++++++++++++++++++++++++++++++ worlds/loonyland/Locations.py | 5 + worlds/loonyland/Regions.py | 155 +++++++++++++-------- worlds/loonyland/Rules.py | 58 ++++---- worlds/loonyland/__init__.py | 17 ++- 6 files changed, 358 insertions(+), 94 deletions(-) create mode 100644 worlds/loonyland/EntranceRules.py create mode 100644 worlds/loonyland/Entrances.py diff --git a/worlds/loonyland/EntranceRules.py b/worlds/loonyland/EntranceRules.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py new file mode 100644 index 000000000000..4b7baedf15a3 --- /dev/null +++ b/worlds/loonyland/Entrances.py @@ -0,0 +1,217 @@ +from typing import NamedTuple, Dict + +from BaseClasses import Entrance + + +class LoonylandEntrance(Entrance): + game = "Loonyland" + + +class EntranceData(NamedTuple): + source_region: str + target_region: str + is_real_loading_zone: bool + +loonyland_entrance_table: Dict[str, EntranceData] = { + #base + "Menu -> Halloween Hill": EntranceData("Menu", "Halloween Hill", False), + + #loading zones, can be randomized + "Halloween Hill -> A Cabin Trees": EntranceData("Halloween Hill", "A Cabin Trees", True), + "Halloween Hill -> The Witch's Cabin Front": EntranceData("Halloween Hill", "The Witch's Cabin Front", True), + "Halloween Hill -> Bonita's Cabin": EntranceData("Halloween Hill", "Bonita's Cabin", True), + "Halloween Hill -> Underground Tunnel Top": EntranceData("Halloween Hill", "Underground Tunnel Top", True), + "Halloween Hill -> The Bog Pit": EntranceData("Halloween Hill", "The Bog Pit", True), + "Slurpy Swamp Mud -> Swamp Gas Cavern Front": EntranceData("Slurpy Swamp Mud", "Swamp Gas Cavern", True), + "Slurpy Swamp Mud -> Swamp Gas Cavern Back": EntranceData("Slurpy Swamp Mud", "Swamp Gas Cavern", True), + "Halloween Hill -> A Tiny Cabin": EntranceData("Halloween Hill", "A Tiny Cabin", True), + "Halloween Hill -> The Witch's Cabin Back": EntranceData("Halloween Hill", "The Witch's Cabin Back", True), + "Zombiton -> A Cabin Seer": EntranceData("Zombiton", "A Cabin Seer", True), + "Zombiton -> Benny's Cocktails": EntranceData("Zombiton", "Benny's Cocktails", True), + "Halloween Hill -> Dusty Crypt": EntranceData("Halloween Hill", "Dusty Crypt", True), + "Zombiton -> Musty Crypt": EntranceData("Zombiton", "Musty Crypt", True), + "Zombiton -> A Messy Cabin": EntranceData("Zombiton", "A Messy Cabin", True), + "Halloween Hill -> Rusty Crypt": EntranceData("Halloween Hill", "Rusty Crypt", True), + "Halloween Hill -> Under The Lake": EntranceData("Halloween Hill", "Under The Lake", True), + "Halloween Hill -> Haunted Tower": EntranceData("Halloween Hill", "Haunted Tower", True), + "Halloween Hill -> Abandoned Mines": EntranceData("Halloween Hill", "Abandoned Mines", True), + "Halloween Hill -> The Shrine Of Bombulus": EntranceData("Halloween Hill", "The Shrine Of Bombulus", True), + "Halloween Hill -> A Gloomy Cavern": EntranceData("Halloween Hill", "A Gloomy Cavern", True), + "Halloween Hill -> Happy Stick Woods": EntranceData("Halloween Hill", "Happy Stick Woods", True), + "Zombiton -> A Cabin Larry": EntranceData("Zombiton", "A Cabin Larry", True), + "Halloween Hill -> The Wolf Den": EntranceData("Halloween Hill", "The Wolf Den", True), + "Halloween Hill -> Upper Creepy Caverns": EntranceData("Halloween Hill", "Upper Creepy Caverns", True), + "Halloween Hill -> Creepy Caverns Left": EntranceData("Halloween Hill", "Creepy Caverns Left", True), + "Vampy Land -> Castle Vampy": EntranceData("Vampy Land", "Castle Vampy", True), + "Halloween Hill -> Cabin In The Woods": EntranceData("Halloween Hill", "Cabin In The Woods", True), + "Halloween Hill -> A Cabin Collector": EntranceData("Halloween Hill", "A Cabin Collector", True), + "Halloween Hill -> A Hidey-Hole": EntranceData("Halloween Hill", "A Hidey-Hole", True), + "Halloween Hill -> Creepy Caverns Right": EntranceData("Halloween Hill", "Creepy Caverns", True), + "Halloween Hill -> Swampdog Lair": EntranceData("Halloween Hill", "Swampdog Lair", True), + "A Cabin -> Halloween Hill": EntranceData("A Cabin", "Halloween Hill", True), + "The Witch's Cabin Front -> Halloween Hill": EntranceData("The Witch's Cabin Front", "Halloween Hill", True), + "The Witch's Cabin Back -> Halloween Hill": EntranceData("The Witch's Cabin Back", "Halloween Hill", True), + "Bonita's Cabin -> Halloween Hill": EntranceData("Bonita's Cabin", "Halloween Hill", True), + "The Bog Pit -> Halloween Hill": EntranceData("The Bog Pit", "Halloween Hill", True), + "Underground Tunnel Top -> Halloween Hill": EntranceData("Underground Tunnel Top", "Halloween Hill", True), + "Underground Tunnel Zombie -> Benny's Cocktails": EntranceData("Underground Tunnel Zombie", "Benny's Cocktails", True), + "Swamp Gas Cavern Front -> Slurpy Swamp Mud": EntranceData("Swamp Gas Cavern Front", "Slurpy Swamp Mud", True), + "Swamp Gas Cavern Back -> Slurpy Swamp Mud": EntranceData("Swamp Gas Cavern Back", "Slurpy Swamp Mud", True), + "A Tiny Cabin -> Halloween Hill": EntranceData("A Tiny Cabin", "Halloween Hill", True), + "A Cabin Seer -> Zombiton": EntranceData("A Cabin Seer", "Zombiton", True), + "Benny's Cocktails -> Zombiton": EntranceData("Benny's Cocktails", "Zombiton", True), + "Benny's Cocktails -> Underground Tunnel Zombie": EntranceData("Benny's Cocktails", "Underground Tunnel Zombie", True), + "Dusty Crypt -> Halloween Hill": EntranceData("Dusty Crypt", "Halloween Hill", True), + "Musty Crypt -> Zombiton": EntranceData("Musty Crypt", "Zombiton", True), + "Rusty Crypt -> Halloween Hill": EntranceData("Rusty Crypt", "Halloween Hill", True), + "A Messy Cabin -> Zombiton": EntranceData("A Messy Cabin", "Zombiton", True), + "Under The Lake -> Halloween Hill": EntranceData("Under The Lake", "Halloween Hill", True), + "Under The Lake -> Deeper Under The Lake": EntranceData("Under The Lake", "Deeper Under The Lake", True), + "Deeper Under The Lake -> Under The Lake": EntranceData("Deeper Under The Lake", "Under The Lake", True), + "Deeper Under The Lake -> Frankenjulie's Laboratory": EntranceData("Deeper Under The Lake", "Frankenjulie's Laboratory", True), + "Frankenjulie's Laboratory -> Deeper Under The Lake": EntranceData("Frankenjulie's Laboratory", "Deeper Under The Lake", True), + "Frankenjulie's Laboratory -> Halloween Hill": EntranceData("Frankenjulie's Laboratory", "Halloween Hill", True), + "Haunted Tower -> Halloween Hill": EntranceData("Haunted Tower", "Halloween Hill", True), + "Haunted Tower -> Haunted Tower, Floor 2": EntranceData("Haunted Tower", "Haunted Tower, Floor 2", True), + "Haunted Tower -> Haunted Basement": EntranceData("Haunted Tower", "Haunted Basement", True), + "Haunted Tower, Floor 2 -> Haunted Tower": EntranceData("Haunted Tower, Floor 2", "Haunted Tower", True), + "Haunted Tower, Floor 2 -> Haunted Tower, Floor 3": EntranceData("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True), + "Haunted Tower, Floor 3 -> Haunted Tower, Floor 2": EntranceData("Haunted Tower, Floor 3", "Haunted Tower, Floor 2", True), + "Haunted Tower, Floor 3 -> Haunted Tower Roof": EntranceData("Haunted Tower, Floor 3", "Haunted Tower Roof", True), + "Haunted Tower Roof -> Halloween Hill": EntranceData("Haunted Tower Roof", "Halloween Hill", True), + "Haunted Tower Roof -> Haunted Tower, Floor 3": EntranceData("Haunted Tower Roof", "Haunted Tower, Floor 3", True), + "Haunted Basement -> Haunted Tower": EntranceData("Haunted Basement", "Haunted Tower", True), + "Abandoned Mines -> Halloween Hill": EntranceData("Abandoned Mines", "Halloween Hill", True), + "The Shrine Of Bombulus -> Halloween Hill": EntranceData("The Shrine Of Bombulus", "Halloween Hill", True), + "A Gloomy Cavern -> Halloween Hill": EntranceData("A Gloomy Cavern", "Halloween Hill", True), + "Happy Stick Woods -> Halloween Hill": EntranceData("Happy Stick Woods", "Halloween Hill", True), + "The Wolf Den -> Halloween Hill": EntranceData("The Wolf Den", "Halloween Hill", True), + "The Wolf Den -> Larry's Lair": EntranceData("The Wolf Den", "Larry's Lair", True), + "A Cabin Larry -> Zombiton": EntranceData("A Cabin Larry", "Zombiton", True), + "Upper Creepy Caverns -> Halloween Hill": EntranceData("Upper Creepy Caverns", "Halloween Hill", True), + "Upper Creepy Caverns -> Creepy Caverns Left": EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True), + "Upper Creepy Caverns -> Creepy Caverns Middle": EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True), + "Under The Ravine -> Creepy Caverns Middle": EntranceData("Under The Ravine", "Creepy Caverns Middle", True), + "Under The Ravine -> Creepy Caverns Right": EntranceData("Under The Ravine", "Creepy Caverns Right", True), + "Creepy Caverns Left -> Halloween Hill": EntranceData("Creepy Caverns Left", "Halloween Hill", True), + "Creepy Caverns Left -> Upper Creepy Caverns": EntranceData("Creepy Caverns Left", "Upper Creepy Caverns", True), + "Creepy Caverns Middle -> Upper Creepy Caverns": EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True), + "Creepy Caverns Middle -> Under The Ravine": EntranceData("Creepy Caverns Middle", "Under The Ravine", True), + "Creepy Caverns Right -> Under The Ravine": EntranceData("Creepy Caverns Right", "Under The Ravine", True), + "Creepy Caverns Right -> Vampy Land": EntranceData("Creepy Caverns Right", "Vampy Land", True), + "Castle Vampy -> Halloween Hill": EntranceData("Castle Vampy", "Halloween Hill", True), + "Castle Vampy -> Castle Vampy II": EntranceData("Castle Vampy", "Castle Vampy II", True), + "Castle Vampy -> Castle Vampy II NE": EntranceData("Castle Vampy", "Castle Vampy II NE", True), + "Castle Vampy -> Castle Vampy II SE": EntranceData("Castle Vampy", "Castle Vampy II SE", True), + "Castle Vampy -> Castle Vampy II SW": EntranceData("Castle Vampy", "Castle Vampy II SW", True), + "Castle Vampy -> Castle Vampy II NW": EntranceData("Castle Vampy", "Castle Vampy II NW", True), + "Castle Vampy II Main -> Castle Vampy": EntranceData("Castle Vampy II", "Castle Vampy", True), + "Castle Vampy II Main -> Castle Vampy III Main": EntranceData("Castle Vampy II Main", "Castle Vampy III Main", True), + "Castle Vampy II NE -> Castle Vampy": EntranceData("Castle Vampy II NE", "Castle Vampy", True), + "Castle Vampy II NE -> Castle Vampy III NE": EntranceData("Castle Vampy II NE", "Castle Vampy III NE", True), + "Castle Vampy II SE -> Castle Vampy": EntranceData("Castle Vampy II SE", "Castle Vampy", True), + "Castle Vampy II SE -> Castle Vampy III SE": EntranceData("Castle Vampy II SE", "Castle Vampy III SE", True), + "Castle Vampy II SW -> Castle Vampy": EntranceData("Castle Vampy II SW", "Castle Vampy", True), + "Castle Vampy II SW -> Castle Vampy III SW": EntranceData("Castle Vampy II SW", "Castle Vampy III SW", True), + "Castle Vampy II NW -> Castle Vampy": EntranceData("Castle Vampy II NW", "Castle Vampy", True), + "Castle Vampy II NW -> Castle Vampy III NW": EntranceData("Castle Vampy II NW", "Castle Vampy III NW", True), + "Cabin In The Woods -> Halloween Hill": EntranceData("Cabin In The Woods", "Halloween Hill", True), + "Castle Vampy III -> Castle Vampy II": EntranceData("Castle Vampy III", "Castle Vampy II", True), + "Castle Vampy III -> Castle Vampy IV": EntranceData("Castle Vampy III", "Castle Vampy IV", True), + "Castle Vampy III NE -> Castle Vampy II NE": EntranceData("Castle Vampy III NE", "Castle Vampy II NE", True), + "Castle Vampy III NE -> Castle Vampy IV NE": EntranceData("Castle Vampy III NE", "Castle Vampy IV NE", True), + "Castle Vampy III SE -> Castle Vampy II SE": EntranceData("Castle Vampy III SE", "Castle Vampy II SE", True), + "Castle Vampy III SE -> Castle Vampy IV SE": EntranceData("Castle Vampy III SE", "Castle Vampy IV SE", True), + "Castle Vampy III SW -> Castle Vampy II SW": EntranceData("Castle Vampy III SW", "Castle Vampy II SW", True), + "Castle Vampy III SW -> Castle Vampy IV SW": EntranceData("Castle Vampy III SW", "Castle Vampy IV SW", True), + "Castle Vampy III NW -> Castle Vampy II NW": EntranceData("Castle Vampy III NW", "Castle Vampy II NW", True), + "Castle Vampy III NW -> Castle Vampy IV NW": EntranceData("Castle Vampy III NW", "Castle Vampy IV NW", True), + "Castle Vampy IV -> Castle Vampy III": EntranceData("Castle Vampy IV", "Castle Vampy III", True), + "Castle Vampy IV -> The Heart Of Terror": EntranceData("Castle Vampy IV", "The Heart Of Terror", True), + "Castle Vampy IV NE -> Castle Vampy III NE": EntranceData("Castle Vampy IV NE", "Castle Vampy III NE", True), + "Castle Vampy IV NE -> Castle Vampy Roof NE": EntranceData("Castle Vampy IV NE", "Castle Vampy Roof NE", True), + "Castle Vampy IV SE -> Castle Vampy III SE": EntranceData("Castle Vampy IV SE", "Castle Vampy III SE", True), + "Castle Vampy IV SE -> Castle Vampy Roof SE": EntranceData("Castle Vampy IV SE", "Castle Vampy Roof SE", True), + "Castle Vampy IV SW -> Castle Vampy III SW": EntranceData("Castle Vampy IV SW", "Castle Vampy III SW", True), + "Castle Vampy IV SW -> Castle Vampy Roof SW": EntranceData("Castle Vampy IV SW", "Castle Vampy Roof SW", True), + "Castle Vampy IV NW -> Castle Vampy III NW": EntranceData("Castle Vampy IV NW", "Castle Vampy III NW", True), + "Castle Vampy IV Nw -> Castle Vampy Roof NW": EntranceData("Castle Vampy IV NW", "Castle Vampy Roof NW", True), + "A Cabin Collector -> Halloween Hill": EntranceData("A Cabin Collector", "Halloween Hill", True), + "Castle Vampy Roof NE -> Castle Vampy IV NE": EntranceData("Castle Vampy Roof", "Castle Vampy IV", True), + "Castle Vampy Roof SE -> Castle Vampy IV SE": EntranceData("Castle Vampy Roof", "Castle Vampy IV", True), + "Castle Vampy Roof SW -> Castle Vampy IV SW": EntranceData("Castle Vampy Roof", "Castle Vampy IV", True), + "Castle Vampy Roof NW -> Castle Vampy IV NW": EntranceData("Castle Vampy Roof", "Castle Vampy IV", True), + "The Evilizer -> Halloween Hill": EntranceData("The Evilizer", "Halloween Hill", True), + "The Heart Of Terror -> The Evilizer": EntranceData("The Heart Of Terror", "The Evilizer", True), + "A Hidey-Hole -> Halloween Hill": EntranceData("A Hidey-Hole", "Halloween Hill", True), + "Empty Rooftop -> Halloween Hill": EntranceData("Empty Rooftop", "Halloween Hill", True), + "Swampdog Lair -> Halloween Hill": EntranceData("Swampdog Lair", "Halloween Hill", True), + "Larry's Lair -> Halloween Hill": EntranceData("Larry's Lair", "Halloween Hill", True), + + #logical zone connections, cant be randomized + + "Halloween Hill -> Slurpy Swamp Mud": EntranceData("Halloween Hill", "Slurpy Swamp Mud", False), + "Slurpy Swamp Mud -> Halloween Hill": EntranceData("Slurpy Swamp Mud", "Halloween Hill", False), + + "Zombiton -> Halloween Hill": EntranceData("Zombiton", "Halloween Hill", False), #one way + #"Halloween Hill -> Zombiton": EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges + + "Halloween Hill -> Rocky Cliffs": EntranceData("Halloween Hill", "Rocky Cliffs", False), + "Rocky Cliffs -> Halloween Hill": EntranceData("Rocky Cliffs", "Halloween Hill", False), + + "Vampy Land -> Halloween Hill": EntranceData("Vampy Land", "Halloween Hill", False), #one way + #"Halloween Hill -> Vampy Land": EntranceData("Halloween Hill", "Vampy Land", False), TODO possible with badges/rando + + "Underground Tunnel Top -> Underground Tunnel Mud": + EntranceData("Underground Tunnel Top", "Underground Tunnel Mud", False), + "Underground Tunnel Mud -> Underground Tunnel Top": + EntranceData("Underground Tunnel Mud", "Underground Tunnel Top", False), + "Underground Tunnel Mud -> Underground Tunnel Zombie": + EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", False), #one way + #"Underground Tunnel Zombie -> Underground Tunnel Mud": + # EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", False), # TODO possible with badges/bridge rando + + "Swamp Gas Cavern Front -> Swamp Gas Cavern Back": + EntranceData("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False), # one way + #"Swamp Gas Cavern Back -> Swamp Gas Cavern Front": + # EntranceData("Swamp Gas Cavern Back", "Swamp Gas Cavern Front", False), # TODO possible with badges + + + #probably need these with molecular dispersion + # "The Witch's Cabin Front -> The Witch's Cabin Back": EntranceData("The Witch's Cabin Front", "The Witch's Cabin Back", False), + # "The Witch's Cabin Back -> The Witch's Cabin Front": EntranceData("The Witch's Cabin Back", "The Witch's Cabin Front", False), + # "Creepy Caverns Left -> Creepy Caverns Middle": EntranceData("Creepy Caverns Left", "Creepy Caverns Middle", False), + # "Creepy Caverns Middle -> Creepy Caverns Left": EntranceData("Creepy Caverns Middle", "Creepy Caverns Left", False), + # "Creepy Caverns Middle -> Creepy Caverns Right": EntranceData("Creepy Caverns Middle", "Creepy Caverns Right", False), + # "Creepy Caverns Right -> Creepy Caverns Middle": EntranceData("Creepy Caverns Right", "Creepy Caverns Middle", False), + + # "Castle Vampy II Main -> Castle Vampy II NE": EntranceData("Castle Vampy II Main", "Castle Vampy II NE", False), + # "Castle Vampy II NE -> Castle Vampy II Main": EntranceData("Castle Vampy II NE", "Castle Vampy II Main", False), + # "Castle Vampy II Main -> Castle Vampy II SE": EntranceData("Castle Vampy II Main", "Castle Vampy II SE", False), + # "Castle Vampy II SE -> Castle Vampy II Main": EntranceData("Castle Vampy II SE", "Castle Vampy II Main", False), + # "Castle Vampy II Main -> Castle Vampy II SW": EntranceData("Castle Vampy II Main", "Castle Vampy II SW", False), + # "Castle Vampy II SW -> Castle Vampy II Main": EntranceData("Castle Vampy II SW", "Castle Vampy II Main", False), + # "Castle Vampy II Main -> Castle Vampy II NW": EntranceData("Castle Vampy II Main", "Castle Vampy II NW", False), + # "Castle Vampy II NW -> Castle Vampy II Main": EntranceData("Castle Vampy II NW", "Castle Vampy II Main", False), + + # "Castle Vampy III Main -> Castle Vampy III NE": EntranceData("Castle Vampy III Main", "Castle Vampy III NE", False), + # "Castle Vampy III NE -> Castle Vampy III Main": EntranceData("Castle Vampy III NE", "Castle Vampy III Main", False), + # "Castle Vampy III Main -> Castle Vampy III SE": EntranceData("Castle Vampy III Main", "Castle Vampy III SE", False), + # "Castle Vampy III SE -> Castle Vampy III Main": EntranceData("Castle Vampy III SE", "Castle Vampy III Main", False), + # "Castle Vampy III Main -> Castle Vampy III SW": EntranceData("Castle Vampy III Main", "Castle Vampy III SW", False), + # "Castle Vampy III SW -> Castle Vampy III Main": EntranceData("Castle Vampy III SW", "Castle Vampy III Main", False), + # "Castle Vampy III Main -> Castle Vampy III NW": EntranceData("Castle Vampy III Main", "Castle Vampy III NW", False), + # "Castle Vampy III NW -> Castle Vampy III Main": EntranceData("Castle Vampy III NW", "Castle Vampy III Main", False), + + # "Castle Vampy IV Main -> Castle Vampy IV NE": EntranceData("Castle Vampy IV Main", "Castle Vampy IV NE", False), + # "Castle Vampy IV NE -> Castle Vampy IV Main": EntranceData("Castle Vampy IV NE", "Castle Vampy IV Main", False), + # "Castle Vampy IV Main -> Castle Vampy IV SE": EntranceData("Castle Vampy IV Main", "Castle Vampy IV SE", False), + # "Castle Vampy IV SE -> Castle Vampy IV Main": EntranceData("Castle Vampy IV SE", "Castle Vampy IV Main", False), + # "Castle Vampy IV Main -> Castle Vampy IV SW": EntranceData("Castle Vampy IV Main", "Castle Vampy IV SW", False), + # "Castle Vampy IV SW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV SW", "Castle Vampy IV Main", False), + # "Castle Vampy IV Main -> Castle Vampy IV NW": EntranceData("Castle Vampy IV Main", "Castle Vampy IV NW", False), + # "Castle Vampy IV NW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV NW", "Castle Vampy IV Main", False), + + + +} \ No newline at end of file diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index 07ba67c4619c..cc242e74d6ce 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -129,4 +129,9 @@ class LoonylandLocationData(NamedTuple): "Witch Mushrooms": LoonylandLocationData(104, LocationCategory.QUEST, "The Witch's Cabin"), "Zombie Stomp": LoonylandLocationData(105, LocationCategory.QUEST, "Halloween Hill") #todo the 40 badge locations + } + +loonyland_location_table = { + f"{data.region} - {name}": data + for name, data in loonyland_location_table.items() } \ No newline at end of file diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index 0516f1285ecd..fe19929cb6d5 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -1,61 +1,98 @@ -region_table: [str] = { - "Menu", - "Halloween Hill", - "A Cabin", - "The Witch's Cabin", - "Bonita's Cabin", - "The Bog Pit", - "Underground Tunnel", - "Swamp Gas Cavern", - "A Tiny Cabin", - "A Cabin2", - "Benny's Cocktails", - "Dusty Crypt", - "Musty Crypt", - "Rusty Crypt", - "A Messy Cabin", - "Under the Lake", - "Deeper Under the Lake", - "Frankenjulie's Laboratory", - "Haunted Tower", - "Haunted Tower, Floor 2", - "Haunted Tower, Floor 3", - "Haunted Tower Roof", - "Haunted Basement", - "Abandoned Mines", - "The Shrine of Bombulus", - "A Gloomy Cavern", - "Happy Stick Woods", - "The Wolf Den", - "A Cabin3", - "Upper Creepy Cavern", - "Under the Ravine", - "Creepy Caverns", - "Castle Vampy", - "Castle Vampy II", - "Cabin in the woods", - "Castle Vampy III", - "Castle Vampy IV", - "A Cabin4", - "Castle Vampy Roof", - "Castle Vampy Roof2", - "Castle Vampy Roof3", - "Castle Vampy Roof4", - "The Evilizer", - "Heart of Terror", - "A Hidey Hole", - "Empty Rooftop", - "Swampdog Lair", - "Larry's Lair", - - #logical regions - "Rocky Cliffs", - "Zombiton", - +from typing import NamedTuple, Dict, List + +from BaseClasses import Region + + +class LoonylandRegion(Region): + game = "Loonyland" + + +class LoonylandRegionData(NamedTuple): + id: int + real: bool + map: str + +loonyland_region_table: Dict[str, LoonylandRegionData] = { + "Menu": LoonylandRegionData(0, False, ""), + "Halloween Hill": LoonylandRegionData(0, False, "Halloween Hill"), + "Slurpy Swamp Mud": LoonylandRegionData(0, False, "Halloween Hill"), + "Zombiton": LoonylandRegionData(0, False, "Halloween Hill"), + "Rocky Cliffs": LoonylandRegionData(0, False, "Halloween Hill"), + "Vampy Land": LoonylandRegionData(0, False, "Halloween Hill"), + "A Cabin Trees": LoonylandRegionData(0, True, "A Cabin"), + "The Witch's Cabin Front": LoonylandRegionData(0, False, "The Witch's Cabin"), + "The Witch's Cabin Back": LoonylandRegionData(0, False, "The Witch's Cabin"), + "Bonita's Cabin": LoonylandRegionData(0, True, ""), + "The Bog Pit": LoonylandRegionData(0, True, ""), + "Underground Tunnel Top": LoonylandRegionData(0, True, ""), + "Underground Tunnel Mud": LoonylandRegionData(0, False, "Underground Tunnel"), + "Underground Tunnel Zombie": LoonylandRegionData(0, False, "Underground Tunnel"), + "Swamp Gas Cavern Front": LoonylandRegionData(0, False, "Swamp Gas Cavern"), + "Swamp Gas Cavern Back": LoonylandRegionData(0, False, "Swamp Gas Cavern"), + "A Tiny Cabin": LoonylandRegionData(0, True, ""), + "A Cabin Seer": LoonylandRegionData(0, True, ""), + "Benny's Cocktails": LoonylandRegionData(0, True, ""), + "Dusty Crypt": LoonylandRegionData(0, True, ""), + "Musty Crypt": LoonylandRegionData(0, True, ""), + "Rusty Crypt": LoonylandRegionData(0, True, ""), + "A Messy Cabin": LoonylandRegionData(0, True, ""), + "Under the Lake": LoonylandRegionData(0, True, ""), + "Deeper Under the Lake": LoonylandRegionData(0, True, ""), + "Frankenjulie's Laboratory": LoonylandRegionData(0, True, ""), + "Haunted Tower": LoonylandRegionData(0, True, ""), + "Haunted Tower, Floor 2": LoonylandRegionData(0, True, ""), + "Haunted Tower, Floor 3": LoonylandRegionData(0, True, ""), + "Haunted Tower Roof": LoonylandRegionData(0, True, ""), + "Haunted Basement": LoonylandRegionData(0, True, ""), + "Abandoned Mines": LoonylandRegionData(0, True, ""), + "The Shrine of Bombulus": LoonylandRegionData(0, True, ""), + "A Gloomy Cavern": LoonylandRegionData(0, True, ""), + "Happy Stick Woods": LoonylandRegionData(0, True, ""), + "The Wolf Den": LoonylandRegionData(0, True, ""), + "A Cabin Larry": LoonylandRegionData(0, True, ""), + "Upper Creepy Cavern": LoonylandRegionData(0, True, ""), + "Under the Ravine": LoonylandRegionData(0, True, ""), + "Creepy Caverns Left": LoonylandRegionData(0, False, "Creepy Caverns Left"), + "Creepy Caverns Middle": LoonylandRegionData(0, False, "Creepy Caverns Middle"), + "Creepy Caverns Right": LoonylandRegionData(0, False, "Creepy Caverns Right"), + "Castle Vampy": LoonylandRegionData(0, True, ""), + "Castle Vampy II Main": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy II NW": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy II NE": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy II SW": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy II SE": LoonylandRegionData(0, False, "Castle Vampy II"), + "Cabin in the woods": LoonylandRegionData(0, True, ""), + "Castle Vampy III Main": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy III NW": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy III NE": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy III SW": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy III SE": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy IV Main": LoonylandRegionData(0, False, "Castle Vampy IV"), + "Castle Vampy IV NW": LoonylandRegionData(0, False, "Castle Vampy IV"), + "Castle Vampy IV NE": LoonylandRegionData(0, False, "Castle Vampy IV"), + "Castle Vampy IV SW": LoonylandRegionData(0, False, "Castle Vampy IV"), + "Castle Vampy IV SE": LoonylandRegionData(0, False, "Castle Vampy IV"), + "A Cabin Collector": LoonylandRegionData(0, True, ""), + "Castle Vampy Roof NE": LoonylandRegionData(0, True, ""), + "Castle Vampy Roof SE": LoonylandRegionData(0, True, ""), + "Castle Vampy Roof SW": LoonylandRegionData(0, True, ""), + "Castle Vampy Roof NW": LoonylandRegionData(0, True, ""), + "The Evilizer": LoonylandRegionData(0, True, ""), + "Heart of Terror": LoonylandRegionData(0, True, ""), + "A Hidey Hole": LoonylandRegionData(0, True, ""), + "Empty Rooftop": LoonylandRegionData(0, True, ""), + "Swampdog Lair": LoonylandRegionData(0, True, ""), + "Larry's Lair": LoonylandRegionData(0, True, ""), + #gamemodes - "Bowling", - "Survival", - "Boss Bash", - "Loony Ball", - "Remix" + "Bowling": LoonylandRegionData(0, False, ""), + "Survival": LoonylandRegionData(0, False, ""), + "Boss Bash": LoonylandRegionData(0, False, ""), + "Loony Ball": LoonylandRegionData(0, False, ""), + "Remix": LoonylandRegionData(0, False, ""), + #"Bowling", + #"Survival", + #"Boss Bash", + #"Loony Ball", + #"Remix" } diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index 86df26d1e03b..6baf98423a64 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -12,15 +12,15 @@ def have_bombs(state: CollectionState, player: int) -> bool: def have_all_orbs(state: CollectionState, player: int) -> bool: - return state.count("Orb", player) >= 4 + return state.has("Orb", player, 4) def have_all_bats(state: CollectionState, player: int) -> bool: - return state.count("Bat Statue", player) >= 4 + return state.has("Bat Statue", player, 4) def have_all_vamps(state: CollectionState, player: int) -> bool: - return state.count("Vampire Statue", player) >= 8 + return state.has("Vampire Statue", player, 8) def have_special_weapon_damage(state: CollectionState, player: int) -> bool: @@ -35,13 +35,13 @@ def have_special_weapon_bullet(state: CollectionState, player: int) -> bool: ) -# return true slingshot counts +# return lambda state: True slingshot counts def have_special_weapon_range_damage(state: CollectionState, player: int) -> bool: return ( state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang"), player) ) - # return true slingshot counts + # return lambda state: True slingshot counts def have_special_weapon_through_walls(state: CollectionState, player: int) -> bool: @@ -84,36 +84,36 @@ def set_rules(multiworld, world, player): access_rules = { "Halloween Hill - Swamp Mud Path": lambda state: state.has("Boots", player), - "Halloween Hill - Bog Beast Home": True, + #"Halloween Hill - Bog Beast Home": lambda state: True, "Halloween Hill - Rocky Cliffs below Upper Caverns": lambda state: can_enter_rocky_cliffs(state, player), "Halloween Hill - Sapling Shrine": lambda state: state.has("Boots", player), - "Halloween Hill - Terror Glade": True, + #"Halloween Hill - Terror Glade": lambda state: True, "Halloween Hill - Rocky Cliffs Vine": lambda state: state.has("Fertilizer", player), "Halloween Hill - Rocky Cliffs Grand Pharoh": lambda state: can_enter_rocky_cliffs(state, player), "Halloween Hill - Rocky Cliffs Rock Corner": lambda state: can_enter_rocky_cliffs(state, player) and have_bombs(state, player), - "Halloween Hill - Mushroom outside town": True, - "Halloween Hill - North of UG Passage": True, - "Halloween Hill - Top left mushroom spot": True, - "Halloween Hill - NE of UG Passage": True, - "Halloween Hill - East Woods": True, + #"Halloween Hill - Mushroom outside town": lambda state: True, + #"Halloween Hill - North of UG Passage": lambda state: True, + #"Halloween Hill - Top left mushroom spot": lambda state: True, + #"Halloween Hill - NE of UG Passage": lambda state: True, + #"Halloween Hill - East Woods": lambda state: True, "Halloween Hill - Rocky Cliffs Ledge": lambda state: can_enter_rocky_cliffs(state, player), "Halloween Hill - Rocky Cliffs Peak": lambda state: can_enter_rocky_cliffs(state, player), - "Halloween Hill - Cat Tree": True, + #"Halloween Hill - Cat Tree": lambda state: True, "The Witch's Cabin - Bedroom": lambda state: have_light_source(state, player), - "The Witch's Cabin - Backroom": True, - "Bonita's Cabin - Barrel Maze": True, + #"The Witch's Cabin - Backroom": lambda state: True, + #"Bonita's Cabin - Barrel Maze": lambda state: True, "The Bog Pit - Top Door": lambda state: state.has("Skull Key", player), - "The Bog Pit - Post Room": True, - "The Bog Pit - Window Drip": True, - "The Bog Pit - Green room": True, - "The Bog Pit - Arena": True, - "The Bog Pit - Kill Wall": True, + #"The Bog Pit - Post Room": lambda state: True, + #"The Bog Pit - Window Drip": lambda state: True, + #"The Bog Pit - Green room": lambda state: True, + "The Bog Pit - Arena": lambda state: True, + "The Bog Pit - Kill Wall": lambda state: True, "Underground Tunnel - Swampdog Door": lambda state: state.has("Pumpkin Key", player), "Underground Tunnel - Scribble Wall": lambda state: have_special_weapon_bullet(state, player), - "Underground Tunnel - Tiny Passage": True, - "Underground Tunnel - fire frogs": True, + "Underground Tunnel - Tiny Passage": lambda state: True, + "Underground Tunnel - fire frogs": lambda state: True, "Underground Tunnel - Torch Island": lambda state: state.has("Boots", player), - "Underground Tunnel - Small Room": True, + "Underground Tunnel - Small Room": lambda state: True, "Swamp Gas Cavern - Scratch Wall": lambda state: state.has("Boots", player) and have_special_weapon_bullet(state, player), "Swamp Gas Cavern - Bat Mound": lambda state: state.has("Boots", player) and state.has("Bat Key", player), "Swamp Gas Cavern - Stair room": lambda state: state.has("Boots", player), @@ -138,8 +138,8 @@ def set_rules(multiworld, world, player): "Abandoned Mines - Shaft": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), "The Shrine of Bombulus - Bombulus": lambda state: can_enter_rocky_cliffs(state, player), "A Gloomy Cavern - Lockpick": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "Happy Stick Woods - Happy Stick Hidden": lambda state: state.has("Talisman", player), - "Happy Stick Woods - Happy Stick Reward": lambda state: state.has("Talisman", player), + "Happy Stick Woods - Happy Stick Hidden": lambda state: state.has("Happy Stick", player), + "Happy Stick Woods - Happy Stick Reward": lambda state: state.has("Happy Stick", player), "The Wolf Den - Wolf Top Left": lambda state: have_light_source(state, player) and state.has("Silver Sling", player), "The Wolf Den - Pumpkin Door": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Pumpkin Key", player), "The Wolf Den - Grow Room": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Fertilizer", player), @@ -157,7 +157,7 @@ def set_rules(multiworld, world, player): "Castle Vampy II - Top Right Top": lambda state: can_enter_vampy_ii(state, player), "Castle Vampy II - Bottom Right Middle": lambda state: can_enter_vampy_ii(state, player), "Castle Vampy II - Bat room": lambda state: can_enter_vampy_ii(state, player) and have_special_weapon_bullet(state, player), - "Cabin in the woods - Gold Skull": True, + "Cabin in the woods - Gold Skull": lambda state: True, "Castle Vampy III - Middle": lambda state: can_enter_vampy_iii(state, player), "Castle Vampy III - Behind the Pews": lambda state: can_enter_vampy_iii(state, player), "Castle Vampy III - AMBUSH!": lambda state: can_enter_vampy_iii(state, player), @@ -174,7 +174,7 @@ def set_rules(multiworld, world, player): "Castle Vampy Roof - Toasty the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), "Heart of Terror - Bonkula": lambda state: can_enter_vampy_iv(state, player) and have_all_vamps(state, player), "A Hidey Hole - Bat Door": lambda state: state.has("Bat Key", player), - "A Hidey Hole - Pebbles": True, + #"A Hidey Hole - Pebbles": lambda state: True, "Swampdog Lair - Entrance": lambda state: state.has("Boots", player), "Swampdog Lair - End": lambda state: state.has("Boots", player) and have_light_source(state, player) and state.has("Fertilizer", player), "The Witch's Cabin - Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Daisy", player) and state.has("Mushroom", player, 10), @@ -182,10 +182,10 @@ def set_rules(multiworld, world, player): "Halloween Hill - Scaredy Cat": lambda state: state.has("Cat", player), "Halloween Hill - Silver Bullet": lambda state: state.has("Silver", player) and can_cleanse_crypts(state, player), "Halloween Hill - Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), - "Halloween Hill - Sticky Shoes": True, + "Halloween Hill - Sticky Shoes": lambda state: True, "A Cabin4 - The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and can_enter_vampy(state, player), "A Gloomy Cavern - The Rescue": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "A Cabin - Tree Trimming": True, + "A Cabin - Tree Trimming": lambda state: True, "The Witch's Cabin - Witch Mushrooms": lambda state: state.has("Mushroom", player, 10), "Halloween Hill - Zombie Stomp": lambda state: can_cleanse_crypts(state, player) } diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 6922838a2356..eb825f7d2aac 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -5,7 +5,8 @@ from .Items import LoonylandItem, item_frequencies, loony_item_table from .Locations import LoonylandLocation, LoonylandLocationData, loonyland_location_table #, locked_locations from .Options import LoonylandOptions -from .Regions import region_table +from .Regions import loonyland_region_table +from .Entrances import loonyland_entrance_table, LoonylandEntrance from .Rules import set_rules @@ -40,24 +41,28 @@ def create_items(self) -> None: item_pool: List[LoonylandItem] = [] for name, item in loony_item_table.items(): if item.id: #and item.can_create(self): - item_pool.append(self.create_item(name)) + for i in range(item_frequencies.get(name, 1)): + item_pool.append(self.create_item(name)) self.multiworld.itempool += item_pool def create_regions(self) -> None: # Create regions. - for region_name in region_table: + for region_name in loonyland_region_table: region = Region(region_name, self.player, self.multiworld) self.multiworld.regions.append(region) + #connect regions + # Create locations. - for region_name in region_table: + for region_name in loonyland_region_table: region = self.get_region(region_name) region.add_locations({ location_name: location_data.id for location_name, location_data in loonyland_location_table.items() if location_data.region == region_name # and location_data.can_create(self) }, LoonylandLocation) - #region.add_exits(region_table[region_name].connecting_regions) + region.add_exits() + # Place locked locations. #for location_name, location_data in locked_locations.items(): @@ -78,7 +83,7 @@ def set_rules(self): set_rules(self.multiworld, self, self.player) # Completion condition. - self.multiworld.completion_condition[self.player] = lambda state: state.can_reach_location("Save Halloween Hill", self.player) + self.multiworld.completion_condition[self.player] = lambda state: state.can_reach_location("The Evilizer - Save Halloween Hill", self.player) def fill_slot_data(self) -> Dict[str, Any]: return { From 4bbf9a7783982cfef7148b4043bc7ae88307766d Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 7 Dec 2024 14:22:49 -0500 Subject: [PATCH 16/58] remove entrance rules, put it in entrance table add rules to entrance table new logical regions --- worlds/loonyland/EntranceRules.py | 0 worlds/loonyland/Entrances.py | 418 +++++++++++++++--------------- worlds/loonyland/Regions.py | 3 + 3 files changed, 215 insertions(+), 206 deletions(-) delete mode 100644 worlds/loonyland/EntranceRules.py diff --git a/worlds/loonyland/EntranceRules.py b/worlds/loonyland/EntranceRules.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index 4b7baedf15a3..5a789b78337d 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -1,6 +1,9 @@ -from typing import NamedTuple, Dict +import typing +from typing import NamedTuple, Dict, List -from BaseClasses import Entrance +from BaseClasses import Entrance, CollectionState +from worlds.generic.Rules import CollectionRule +from worlds.loonyland import LoonylandWorld class LoonylandEntrance(Entrance): @@ -11,207 +14,210 @@ class EntranceData(NamedTuple): source_region: str target_region: str is_real_loading_zone: bool - -loonyland_entrance_table: Dict[str, EntranceData] = { - #base - "Menu -> Halloween Hill": EntranceData("Menu", "Halloween Hill", False), - - #loading zones, can be randomized - "Halloween Hill -> A Cabin Trees": EntranceData("Halloween Hill", "A Cabin Trees", True), - "Halloween Hill -> The Witch's Cabin Front": EntranceData("Halloween Hill", "The Witch's Cabin Front", True), - "Halloween Hill -> Bonita's Cabin": EntranceData("Halloween Hill", "Bonita's Cabin", True), - "Halloween Hill -> Underground Tunnel Top": EntranceData("Halloween Hill", "Underground Tunnel Top", True), - "Halloween Hill -> The Bog Pit": EntranceData("Halloween Hill", "The Bog Pit", True), - "Slurpy Swamp Mud -> Swamp Gas Cavern Front": EntranceData("Slurpy Swamp Mud", "Swamp Gas Cavern", True), - "Slurpy Swamp Mud -> Swamp Gas Cavern Back": EntranceData("Slurpy Swamp Mud", "Swamp Gas Cavern", True), - "Halloween Hill -> A Tiny Cabin": EntranceData("Halloween Hill", "A Tiny Cabin", True), - "Halloween Hill -> The Witch's Cabin Back": EntranceData("Halloween Hill", "The Witch's Cabin Back", True), - "Zombiton -> A Cabin Seer": EntranceData("Zombiton", "A Cabin Seer", True), - "Zombiton -> Benny's Cocktails": EntranceData("Zombiton", "Benny's Cocktails", True), - "Halloween Hill -> Dusty Crypt": EntranceData("Halloween Hill", "Dusty Crypt", True), - "Zombiton -> Musty Crypt": EntranceData("Zombiton", "Musty Crypt", True), - "Zombiton -> A Messy Cabin": EntranceData("Zombiton", "A Messy Cabin", True), - "Halloween Hill -> Rusty Crypt": EntranceData("Halloween Hill", "Rusty Crypt", True), - "Halloween Hill -> Under The Lake": EntranceData("Halloween Hill", "Under The Lake", True), - "Halloween Hill -> Haunted Tower": EntranceData("Halloween Hill", "Haunted Tower", True), - "Halloween Hill -> Abandoned Mines": EntranceData("Halloween Hill", "Abandoned Mines", True), - "Halloween Hill -> The Shrine Of Bombulus": EntranceData("Halloween Hill", "The Shrine Of Bombulus", True), - "Halloween Hill -> A Gloomy Cavern": EntranceData("Halloween Hill", "A Gloomy Cavern", True), - "Halloween Hill -> Happy Stick Woods": EntranceData("Halloween Hill", "Happy Stick Woods", True), - "Zombiton -> A Cabin Larry": EntranceData("Zombiton", "A Cabin Larry", True), - "Halloween Hill -> The Wolf Den": EntranceData("Halloween Hill", "The Wolf Den", True), - "Halloween Hill -> Upper Creepy Caverns": EntranceData("Halloween Hill", "Upper Creepy Caverns", True), - "Halloween Hill -> Creepy Caverns Left": EntranceData("Halloween Hill", "Creepy Caverns Left", True), - "Vampy Land -> Castle Vampy": EntranceData("Vampy Land", "Castle Vampy", True), - "Halloween Hill -> Cabin In The Woods": EntranceData("Halloween Hill", "Cabin In The Woods", True), - "Halloween Hill -> A Cabin Collector": EntranceData("Halloween Hill", "A Cabin Collector", True), - "Halloween Hill -> A Hidey-Hole": EntranceData("Halloween Hill", "A Hidey-Hole", True), - "Halloween Hill -> Creepy Caverns Right": EntranceData("Halloween Hill", "Creepy Caverns", True), - "Halloween Hill -> Swampdog Lair": EntranceData("Halloween Hill", "Swampdog Lair", True), - "A Cabin -> Halloween Hill": EntranceData("A Cabin", "Halloween Hill", True), - "The Witch's Cabin Front -> Halloween Hill": EntranceData("The Witch's Cabin Front", "Halloween Hill", True), - "The Witch's Cabin Back -> Halloween Hill": EntranceData("The Witch's Cabin Back", "Halloween Hill", True), - "Bonita's Cabin -> Halloween Hill": EntranceData("Bonita's Cabin", "Halloween Hill", True), - "The Bog Pit -> Halloween Hill": EntranceData("The Bog Pit", "Halloween Hill", True), - "Underground Tunnel Top -> Halloween Hill": EntranceData("Underground Tunnel Top", "Halloween Hill", True), - "Underground Tunnel Zombie -> Benny's Cocktails": EntranceData("Underground Tunnel Zombie", "Benny's Cocktails", True), - "Swamp Gas Cavern Front -> Slurpy Swamp Mud": EntranceData("Swamp Gas Cavern Front", "Slurpy Swamp Mud", True), - "Swamp Gas Cavern Back -> Slurpy Swamp Mud": EntranceData("Swamp Gas Cavern Back", "Slurpy Swamp Mud", True), - "A Tiny Cabin -> Halloween Hill": EntranceData("A Tiny Cabin", "Halloween Hill", True), - "A Cabin Seer -> Zombiton": EntranceData("A Cabin Seer", "Zombiton", True), - "Benny's Cocktails -> Zombiton": EntranceData("Benny's Cocktails", "Zombiton", True), - "Benny's Cocktails -> Underground Tunnel Zombie": EntranceData("Benny's Cocktails", "Underground Tunnel Zombie", True), - "Dusty Crypt -> Halloween Hill": EntranceData("Dusty Crypt", "Halloween Hill", True), - "Musty Crypt -> Zombiton": EntranceData("Musty Crypt", "Zombiton", True), - "Rusty Crypt -> Halloween Hill": EntranceData("Rusty Crypt", "Halloween Hill", True), - "A Messy Cabin -> Zombiton": EntranceData("A Messy Cabin", "Zombiton", True), - "Under The Lake -> Halloween Hill": EntranceData("Under The Lake", "Halloween Hill", True), - "Under The Lake -> Deeper Under The Lake": EntranceData("Under The Lake", "Deeper Under The Lake", True), - "Deeper Under The Lake -> Under The Lake": EntranceData("Deeper Under The Lake", "Under The Lake", True), - "Deeper Under The Lake -> Frankenjulie's Laboratory": EntranceData("Deeper Under The Lake", "Frankenjulie's Laboratory", True), - "Frankenjulie's Laboratory -> Deeper Under The Lake": EntranceData("Frankenjulie's Laboratory", "Deeper Under The Lake", True), - "Frankenjulie's Laboratory -> Halloween Hill": EntranceData("Frankenjulie's Laboratory", "Halloween Hill", True), - "Haunted Tower -> Halloween Hill": EntranceData("Haunted Tower", "Halloween Hill", True), - "Haunted Tower -> Haunted Tower, Floor 2": EntranceData("Haunted Tower", "Haunted Tower, Floor 2", True), - "Haunted Tower -> Haunted Basement": EntranceData("Haunted Tower", "Haunted Basement", True), - "Haunted Tower, Floor 2 -> Haunted Tower": EntranceData("Haunted Tower, Floor 2", "Haunted Tower", True), - "Haunted Tower, Floor 2 -> Haunted Tower, Floor 3": EntranceData("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True), - "Haunted Tower, Floor 3 -> Haunted Tower, Floor 2": EntranceData("Haunted Tower, Floor 3", "Haunted Tower, Floor 2", True), - "Haunted Tower, Floor 3 -> Haunted Tower Roof": EntranceData("Haunted Tower, Floor 3", "Haunted Tower Roof", True), - "Haunted Tower Roof -> Halloween Hill": EntranceData("Haunted Tower Roof", "Halloween Hill", True), - "Haunted Tower Roof -> Haunted Tower, Floor 3": EntranceData("Haunted Tower Roof", "Haunted Tower, Floor 3", True), - "Haunted Basement -> Haunted Tower": EntranceData("Haunted Basement", "Haunted Tower", True), - "Abandoned Mines -> Halloween Hill": EntranceData("Abandoned Mines", "Halloween Hill", True), - "The Shrine Of Bombulus -> Halloween Hill": EntranceData("The Shrine Of Bombulus", "Halloween Hill", True), - "A Gloomy Cavern -> Halloween Hill": EntranceData("A Gloomy Cavern", "Halloween Hill", True), - "Happy Stick Woods -> Halloween Hill": EntranceData("Happy Stick Woods", "Halloween Hill", True), - "The Wolf Den -> Halloween Hill": EntranceData("The Wolf Den", "Halloween Hill", True), - "The Wolf Den -> Larry's Lair": EntranceData("The Wolf Den", "Larry's Lair", True), - "A Cabin Larry -> Zombiton": EntranceData("A Cabin Larry", "Zombiton", True), - "Upper Creepy Caverns -> Halloween Hill": EntranceData("Upper Creepy Caverns", "Halloween Hill", True), - "Upper Creepy Caverns -> Creepy Caverns Left": EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True), - "Upper Creepy Caverns -> Creepy Caverns Middle": EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True), - "Under The Ravine -> Creepy Caverns Middle": EntranceData("Under The Ravine", "Creepy Caverns Middle", True), - "Under The Ravine -> Creepy Caverns Right": EntranceData("Under The Ravine", "Creepy Caverns Right", True), - "Creepy Caverns Left -> Halloween Hill": EntranceData("Creepy Caverns Left", "Halloween Hill", True), - "Creepy Caverns Left -> Upper Creepy Caverns": EntranceData("Creepy Caverns Left", "Upper Creepy Caverns", True), - "Creepy Caverns Middle -> Upper Creepy Caverns": EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True), - "Creepy Caverns Middle -> Under The Ravine": EntranceData("Creepy Caverns Middle", "Under The Ravine", True), - "Creepy Caverns Right -> Under The Ravine": EntranceData("Creepy Caverns Right", "Under The Ravine", True), - "Creepy Caverns Right -> Vampy Land": EntranceData("Creepy Caverns Right", "Vampy Land", True), - "Castle Vampy -> Halloween Hill": EntranceData("Castle Vampy", "Halloween Hill", True), - "Castle Vampy -> Castle Vampy II": EntranceData("Castle Vampy", "Castle Vampy II", True), - "Castle Vampy -> Castle Vampy II NE": EntranceData("Castle Vampy", "Castle Vampy II NE", True), - "Castle Vampy -> Castle Vampy II SE": EntranceData("Castle Vampy", "Castle Vampy II SE", True), - "Castle Vampy -> Castle Vampy II SW": EntranceData("Castle Vampy", "Castle Vampy II SW", True), - "Castle Vampy -> Castle Vampy II NW": EntranceData("Castle Vampy", "Castle Vampy II NW", True), - "Castle Vampy II Main -> Castle Vampy": EntranceData("Castle Vampy II", "Castle Vampy", True), - "Castle Vampy II Main -> Castle Vampy III Main": EntranceData("Castle Vampy II Main", "Castle Vampy III Main", True), - "Castle Vampy II NE -> Castle Vampy": EntranceData("Castle Vampy II NE", "Castle Vampy", True), - "Castle Vampy II NE -> Castle Vampy III NE": EntranceData("Castle Vampy II NE", "Castle Vampy III NE", True), - "Castle Vampy II SE -> Castle Vampy": EntranceData("Castle Vampy II SE", "Castle Vampy", True), - "Castle Vampy II SE -> Castle Vampy III SE": EntranceData("Castle Vampy II SE", "Castle Vampy III SE", True), - "Castle Vampy II SW -> Castle Vampy": EntranceData("Castle Vampy II SW", "Castle Vampy", True), - "Castle Vampy II SW -> Castle Vampy III SW": EntranceData("Castle Vampy II SW", "Castle Vampy III SW", True), - "Castle Vampy II NW -> Castle Vampy": EntranceData("Castle Vampy II NW", "Castle Vampy", True), - "Castle Vampy II NW -> Castle Vampy III NW": EntranceData("Castle Vampy II NW", "Castle Vampy III NW", True), - "Cabin In The Woods -> Halloween Hill": EntranceData("Cabin In The Woods", "Halloween Hill", True), - "Castle Vampy III -> Castle Vampy II": EntranceData("Castle Vampy III", "Castle Vampy II", True), - "Castle Vampy III -> Castle Vampy IV": EntranceData("Castle Vampy III", "Castle Vampy IV", True), - "Castle Vampy III NE -> Castle Vampy II NE": EntranceData("Castle Vampy III NE", "Castle Vampy II NE", True), - "Castle Vampy III NE -> Castle Vampy IV NE": EntranceData("Castle Vampy III NE", "Castle Vampy IV NE", True), - "Castle Vampy III SE -> Castle Vampy II SE": EntranceData("Castle Vampy III SE", "Castle Vampy II SE", True), - "Castle Vampy III SE -> Castle Vampy IV SE": EntranceData("Castle Vampy III SE", "Castle Vampy IV SE", True), - "Castle Vampy III SW -> Castle Vampy II SW": EntranceData("Castle Vampy III SW", "Castle Vampy II SW", True), - "Castle Vampy III SW -> Castle Vampy IV SW": EntranceData("Castle Vampy III SW", "Castle Vampy IV SW", True), - "Castle Vampy III NW -> Castle Vampy II NW": EntranceData("Castle Vampy III NW", "Castle Vampy II NW", True), - "Castle Vampy III NW -> Castle Vampy IV NW": EntranceData("Castle Vampy III NW", "Castle Vampy IV NW", True), - "Castle Vampy IV -> Castle Vampy III": EntranceData("Castle Vampy IV", "Castle Vampy III", True), - "Castle Vampy IV -> The Heart Of Terror": EntranceData("Castle Vampy IV", "The Heart Of Terror", True), - "Castle Vampy IV NE -> Castle Vampy III NE": EntranceData("Castle Vampy IV NE", "Castle Vampy III NE", True), - "Castle Vampy IV NE -> Castle Vampy Roof NE": EntranceData("Castle Vampy IV NE", "Castle Vampy Roof NE", True), - "Castle Vampy IV SE -> Castle Vampy III SE": EntranceData("Castle Vampy IV SE", "Castle Vampy III SE", True), - "Castle Vampy IV SE -> Castle Vampy Roof SE": EntranceData("Castle Vampy IV SE", "Castle Vampy Roof SE", True), - "Castle Vampy IV SW -> Castle Vampy III SW": EntranceData("Castle Vampy IV SW", "Castle Vampy III SW", True), - "Castle Vampy IV SW -> Castle Vampy Roof SW": EntranceData("Castle Vampy IV SW", "Castle Vampy Roof SW", True), - "Castle Vampy IV NW -> Castle Vampy III NW": EntranceData("Castle Vampy IV NW", "Castle Vampy III NW", True), - "Castle Vampy IV Nw -> Castle Vampy Roof NW": EntranceData("Castle Vampy IV NW", "Castle Vampy Roof NW", True), - "A Cabin Collector -> Halloween Hill": EntranceData("A Cabin Collector", "Halloween Hill", True), - "Castle Vampy Roof NE -> Castle Vampy IV NE": EntranceData("Castle Vampy Roof", "Castle Vampy IV", True), - "Castle Vampy Roof SE -> Castle Vampy IV SE": EntranceData("Castle Vampy Roof", "Castle Vampy IV", True), - "Castle Vampy Roof SW -> Castle Vampy IV SW": EntranceData("Castle Vampy Roof", "Castle Vampy IV", True), - "Castle Vampy Roof NW -> Castle Vampy IV NW": EntranceData("Castle Vampy Roof", "Castle Vampy IV", True), - "The Evilizer -> Halloween Hill": EntranceData("The Evilizer", "Halloween Hill", True), - "The Heart Of Terror -> The Evilizer": EntranceData("The Heart Of Terror", "The Evilizer", True), - "A Hidey-Hole -> Halloween Hill": EntranceData("A Hidey-Hole", "Halloween Hill", True), - "Empty Rooftop -> Halloween Hill": EntranceData("Empty Rooftop", "Halloween Hill", True), - "Swampdog Lair -> Halloween Hill": EntranceData("Swampdog Lair", "Halloween Hill", True), - "Larry's Lair -> Halloween Hill": EntranceData("Larry's Lair", "Halloween Hill", True), - - #logical zone connections, cant be randomized - - "Halloween Hill -> Slurpy Swamp Mud": EntranceData("Halloween Hill", "Slurpy Swamp Mud", False), - "Slurpy Swamp Mud -> Halloween Hill": EntranceData("Slurpy Swamp Mud", "Halloween Hill", False), - - "Zombiton -> Halloween Hill": EntranceData("Zombiton", "Halloween Hill", False), #one way - #"Halloween Hill -> Zombiton": EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges - - "Halloween Hill -> Rocky Cliffs": EntranceData("Halloween Hill", "Rocky Cliffs", False), - "Rocky Cliffs -> Halloween Hill": EntranceData("Rocky Cliffs", "Halloween Hill", False), - - "Vampy Land -> Halloween Hill": EntranceData("Vampy Land", "Halloween Hill", False), #one way - #"Halloween Hill -> Vampy Land": EntranceData("Halloween Hill", "Vampy Land", False), TODO possible with badges/rando - - "Underground Tunnel Top -> Underground Tunnel Mud": - EntranceData("Underground Tunnel Top", "Underground Tunnel Mud", False), - "Underground Tunnel Mud -> Underground Tunnel Top": - EntranceData("Underground Tunnel Mud", "Underground Tunnel Top", False), - "Underground Tunnel Mud -> Underground Tunnel Zombie": - EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", False), #one way - #"Underground Tunnel Zombie -> Underground Tunnel Mud": - # EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", False), # TODO possible with badges/bridge rando - - "Swamp Gas Cavern Front -> Swamp Gas Cavern Back": - EntranceData("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False), # one way - #"Swamp Gas Cavern Back -> Swamp Gas Cavern Front": - # EntranceData("Swamp Gas Cavern Back", "Swamp Gas Cavern Front", False), # TODO possible with badges - - - #probably need these with molecular dispersion - # "The Witch's Cabin Front -> The Witch's Cabin Back": EntranceData("The Witch's Cabin Front", "The Witch's Cabin Back", False), - # "The Witch's Cabin Back -> The Witch's Cabin Front": EntranceData("The Witch's Cabin Back", "The Witch's Cabin Front", False), - # "Creepy Caverns Left -> Creepy Caverns Middle": EntranceData("Creepy Caverns Left", "Creepy Caverns Middle", False), - # "Creepy Caverns Middle -> Creepy Caverns Left": EntranceData("Creepy Caverns Middle", "Creepy Caverns Left", False), - # "Creepy Caverns Middle -> Creepy Caverns Right": EntranceData("Creepy Caverns Middle", "Creepy Caverns Right", False), - # "Creepy Caverns Right -> Creepy Caverns Middle": EntranceData("Creepy Caverns Right", "Creepy Caverns Middle", False), - - # "Castle Vampy II Main -> Castle Vampy II NE": EntranceData("Castle Vampy II Main", "Castle Vampy II NE", False), - # "Castle Vampy II NE -> Castle Vampy II Main": EntranceData("Castle Vampy II NE", "Castle Vampy II Main", False), - # "Castle Vampy II Main -> Castle Vampy II SE": EntranceData("Castle Vampy II Main", "Castle Vampy II SE", False), - # "Castle Vampy II SE -> Castle Vampy II Main": EntranceData("Castle Vampy II SE", "Castle Vampy II Main", False), - # "Castle Vampy II Main -> Castle Vampy II SW": EntranceData("Castle Vampy II Main", "Castle Vampy II SW", False), - # "Castle Vampy II SW -> Castle Vampy II Main": EntranceData("Castle Vampy II SW", "Castle Vampy II Main", False), - # "Castle Vampy II Main -> Castle Vampy II NW": EntranceData("Castle Vampy II Main", "Castle Vampy II NW", False), - # "Castle Vampy II NW -> Castle Vampy II Main": EntranceData("Castle Vampy II NW", "Castle Vampy II Main", False), - - # "Castle Vampy III Main -> Castle Vampy III NE": EntranceData("Castle Vampy III Main", "Castle Vampy III NE", False), - # "Castle Vampy III NE -> Castle Vampy III Main": EntranceData("Castle Vampy III NE", "Castle Vampy III Main", False), - # "Castle Vampy III Main -> Castle Vampy III SE": EntranceData("Castle Vampy III Main", "Castle Vampy III SE", False), - # "Castle Vampy III SE -> Castle Vampy III Main": EntranceData("Castle Vampy III SE", "Castle Vampy III Main", False), - # "Castle Vampy III Main -> Castle Vampy III SW": EntranceData("Castle Vampy III Main", "Castle Vampy III SW", False), - # "Castle Vampy III SW -> Castle Vampy III Main": EntranceData("Castle Vampy III SW", "Castle Vampy III Main", False), - # "Castle Vampy III Main -> Castle Vampy III NW": EntranceData("Castle Vampy III Main", "Castle Vampy III NW", False), - # "Castle Vampy III NW -> Castle Vampy III Main": EntranceData("Castle Vampy III NW", "Castle Vampy III Main", False), - - # "Castle Vampy IV Main -> Castle Vampy IV NE": EntranceData("Castle Vampy IV Main", "Castle Vampy IV NE", False), - # "Castle Vampy IV NE -> Castle Vampy IV Main": EntranceData("Castle Vampy IV NE", "Castle Vampy IV Main", False), - # "Castle Vampy IV Main -> Castle Vampy IV SE": EntranceData("Castle Vampy IV Main", "Castle Vampy IV SE", False), - # "Castle Vampy IV SE -> Castle Vampy IV Main": EntranceData("Castle Vampy IV SE", "Castle Vampy IV Main", False), - # "Castle Vampy IV Main -> Castle Vampy IV SW": EntranceData("Castle Vampy IV Main", "Castle Vampy IV SW", False), - # "Castle Vampy IV SW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV SW", "Castle Vampy IV Main", False), - # "Castle Vampy IV Main -> Castle Vampy IV NW": EntranceData("Castle Vampy IV Main", "Castle Vampy IV NW", False), - # "Castle Vampy IV NW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV NW", "Castle Vampy IV Main", False), - - - -} \ No newline at end of file + #rule: typing.Callable[[player, state], bool] + rule: CollectionRule + +def have_light_source(state: CollectionState, player: int) -> bool: + return state.has("Lantern", player) or (state.has("Stick", player) and state.has("Boots", player)) + +def set_entrances(multiworld, world, player): + + loonyland_entrance_table: List[EntranceData] = [ + #base + EntranceData("Menu", "Halloween Hill", False, lambda state: True ), + + # loading zones, can be randomized + EntranceData("Halloween Hill", "A Cabin Trees", True, lambda state: True ), + EntranceData("Halloween Hill", "The Witch's Cabin Front", True, lambda state: True ), + EntranceData("Halloween Hill", "Bonita's Cabin", True, lambda state: True ), + EntranceData("Halloween Hill", "Underground Tunnel Top", True, lambda state: True ), + EntranceData("Halloween Hill", "The Bog Pit", True, lambda state: True ), + EntranceData("Slurpy Swamp Mud", "Swamp Gas Cavern Front", True, lambda state: True ), + EntranceData("Slurpy Swamp Mud", "Swamp Gas Cavern Back", True, lambda state: True ), + EntranceData("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), + EntranceData("Halloween Hill", "The Witch's Cabin Back", True, lambda state: True), + EntranceData("Zombiton", "A Cabin Seer", True, lambda state: True), + EntranceData("Zombiton", "Benny's Cocktails", True, lambda state: True), + EntranceData("Halloween Hill", "Dusty Crypt", True, lambda state: True), + EntranceData("Zombiton", "Musty Crypt", True, lambda state: True), + EntranceData("Zombiton", "A Messy Cabin", True, lambda state: True), + EntranceData("Halloween Hill", "Rusty Crypt", True, lambda state: True), + EntranceData("Halloween Hill", "Under The Lake", True, lambda state: have_light_source(state, player) and state.has("Orb", player, 4)), + EntranceData("Halloween Hill", "Haunted Tower", True, lambda state: True), + EntranceData("Rocky Cliffs", "Abandoned Mines", True, lambda state: True), + EntranceData("Rocky Cliffs", "The Shrine Of Bombulus", True, lambda state: True), + EntranceData("Rocky Cliffs", "A Gloomy Cavern", True, lambda state: True), + EntranceData("Halloween Hill", "Happy Stick Woods", True, lambda state: True), + EntranceData("Zombiton", "A Cabin Larry", True, lambda state: True), + EntranceData("Halloween Hill", "The Wolf Den", True, lambda state: True), + EntranceData("Rocky Cliffs", "Upper Creepy Caverns", True, lambda state: state.has("Bombs", player)), + EntranceData("Rocky Cliffs", "Creepy Caverns Left", True, lambda state: True), + EntranceData("Vampy Land", "Castle Vampy", True, lambda state: True), + EntranceData("Halloween Hill", "Cabin In The Woods", True, lambda state: True), + EntranceData("Halloween Hill", "A Cabin Collector", True, lambda state: True), + EntranceData("Halloween Hill", "A Hidey-Hole", True, lambda state: True), + EntranceData("Vampy Land", "Creepy Caverns", True, lambda state: True), + EntranceData("Halloween Hill", "Swampdog Lair", True, lambda state: True), + EntranceData("A Cabin Trees", "Halloween Hill", True,lambda state: True), + EntranceData("The Witch's Cabin Front", "Halloween Hill", True, lambda state: True), + EntranceData("The Witch's Cabin Back", "Halloween Hill", True, lambda state: True), + EntranceData("Bonita's Cabin", "Halloween Hill", True, lambda state: True), + EntranceData("The Bog Pit", "Halloween Hill", True, lambda state: have_light_source(state, player)), + EntranceData("Underground Tunnel Top", "Halloween Hill", True, lambda state: True), + EntranceData("Underground Tunnel Zombie", "Benny's Cocktails", True, lambda state: True), + EntranceData("Swamp Gas Cavern Front", "Slurpy Swamp Mud", True, lambda state: state.has("Boots")), + EntranceData("Swamp Gas Cavern Back", "Slurpy Swamp Mud", True, lambda state: state.has("Boots")), + EntranceData("A Tiny Cabin", "Halloween Hill", True, lambda state: True), + EntranceData("A Cabin Seer", "Zombiton", True, lambda state: True), + EntranceData("Benny's Cocktails", "Zombiton", True,lambda state: True), + EntranceData("Benny's Cocktails", "Underground Tunnel Zombie", True, lambda state: True), + EntranceData("Dusty Crypt", "Halloween Hill", True, lambda state: True), + EntranceData("Musty Crypt", "Zombiton", True, lambda state: True), + EntranceData("Rusty Crypt", "Halloween Hill", True, lambda state: True), + EntranceData("A Messy Cabin", "Zombiton", True, lambda state: True), + EntranceData("Under The Lake", "Halloween Hill", True, lambda state: True), + EntranceData("Under The Lake", "Deeper Under The Lake", True, lambda state: True), + EntranceData("Deeper Under The Lake", "Under The Lake", True, lambda state: True), + EntranceData("Deeper Under The Lake", "Frankenjulie's Laboratory", True, lambda state: True), + EntranceData("Frankenjulie's Laboratory", "Deeper Under The Lake", True, lambda state: True), + EntranceData("Frankenjulie's Laboratory", "Halloween Hill", True, lambda state: True), + EntranceData("Haunted Tower", "Halloween Hill", True, lambda state: True), + EntranceData("Haunted Tower", "Haunted Tower, Floor 2", True, lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower", "Haunted Basement", True, lambda state: state.has("Bat Key", player) and + state.has("Pumpkin Key", player) and + state.has("Skull Key", player)), + EntranceData("Haunted Tower, Floor 2", "Haunted Tower", True, lambda state: True), + EntranceData("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True, lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower, Floor 3", "Haunted Tower, Floor 2", True, lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower, Floor 3", "Haunted Tower Roof", True, lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower Roof", "Halloween Hill", True, lambda state: True), + EntranceData("Haunted Tower Roof", "Haunted Tower, Floor 3", True, lambda state: True), + EntranceData("Haunted Basement", "Haunted Tower", True, lambda state: True), + EntranceData("Abandoned Mines", "Rocky Cliffs", True, lambda state: True), + EntranceData("The Shrine Of Bombulus", "Rocky Cliffs", True, lambda state: True), + EntranceData("A Gloomy Cavern", "Rocky Cliffs", True, lambda state: True), + EntranceData("Happy Stick Woods", "Halloween Hill", True, lambda state: True), + EntranceData("The Wolf Den", "Halloween Hill", True, lambda state: True), + EntranceData("The Wolf Den", "Larry's Lair", True, lambda state: state.has("Silver Sling")), + EntranceData("A Cabin Larry", "Zombiton", True, lambda state: True), + EntranceData("Upper Creepy Caverns", "Rocky Cliffs", True, lambda state: state.has("Bombs")), + EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True, lambda state: True), + EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True, lambda state: True), + EntranceData("Under The Ravine", "Creepy Caverns Middle", True, lambda state: True), + EntranceData("Under The Ravine", "Creepy Caverns Right", True, lambda state: True), + EntranceData("Creepy Caverns Left", "Rocky Cliffs", True, lambda state: True), + EntranceData("Creepy Caverns Left", "Upper Creepy Caverns", True, lambda state: True), + EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True, lambda state: True), + EntranceData("Creepy Caverns Middle", "Under The Ravine", True, lambda state: True), + EntranceData("Creepy Caverns Right", "Under The Ravine", True, lambda state: True), + EntranceData("Creepy Caverns Right", "Vampy Land", True, lambda state: True), + EntranceData("Castle Vampy", "Halloween Hill", True, lambda state: True), + EntranceData("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key")), + EntranceData("Castle Vampy Skull Jail", "Castle Vampy II", True, lambda state: state.has("Skull Key")), + EntranceData("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", 4)), + EntranceData("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", 4)), + EntranceData("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", 4)), + EntranceData("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", 4)), + EntranceData("Castle Vampy II", "Castle Vampy Skull Jail", True, lambda state: True), + EntranceData("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, lambda state: state.has("Bat Key")), + EntranceData("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, lambda state: state.has("Bat Key")), + EntranceData("Castle Vampy II NE", "Castle Vampy", True, lambda state: True), + EntranceData("Castle Vampy II NE", "Castle Vampy III NE", True, lambda state: True), + EntranceData("Castle Vampy II SE", "Castle Vampy", True, lambda state: True), + EntranceData("Castle Vampy II SE", "Castle Vampy III SE", True, lambda state: True), + EntranceData("Castle Vampy II SW", "Castle Vampy", True, lambda state: True), + EntranceData("Castle Vampy II SW", "Castle Vampy III SW", True, lambda state: True), + EntranceData("Castle Vampy II NW", "Castle Vampy", True, lambda state: True), + EntranceData("Castle Vampy II NW", "Castle Vampy III NW", True, lambda state: True), + EntranceData("Cabin In The Woods", "Halloween Hill", True, lambda state: True), + EntranceData("Castle Vampy III Main", "Castle Vampy II Bat Jail", True, lambda state: True), + EntranceData("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", True, lambda state: state.has("Pumpkin Key")), + EntranceData("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True, lambda state: state.has("Pumpkin Key")), + EntranceData("Castle Vampy III NE", "Castle Vampy II NE", True, lambda state: True), + EntranceData("Castle Vampy III NE", "Castle Vampy IV NE", True, lambda state: True), + EntranceData("Castle Vampy III SE", "Castle Vampy II SE", True, lambda state: True), + EntranceData("Castle Vampy III SE", "Castle Vampy IV SE", True, lambda state: True), + EntranceData("Castle Vampy III SW", "Castle Vampy II SW", True, lambda state: True), + EntranceData("Castle Vampy III SW", "Castle Vampy IV SW", True, lambda state: True), + EntranceData("Castle Vampy III NW", "Castle Vampy II NW", True, lambda state: True), + EntranceData("Castle Vampy III NW", "Castle Vampy IV NW", True, lambda state: True), + EntranceData("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True, lambda state: True), + EntranceData("Castle Vampy IV", "The Heart Of Terror", True, lambda state: state.has("Vamp Statue", player, 8)), + EntranceData("Castle Vampy IV NE", "Castle Vampy III NE", True, lambda state: True), + EntranceData("Castle Vampy IV NE", "Castle Vampy Roof NE", True, lambda state: True), + EntranceData("Castle Vampy IV SE", "Castle Vampy III SE", True, lambda state: True), + EntranceData("Castle Vampy IV SE", "Castle Vampy Roof SE", True, lambda state: True), + EntranceData("Castle Vampy IV SW", "Castle Vampy III SW", True, lambda state: True), + EntranceData("Castle Vampy IV SW", "Castle Vampy Roof SW", True, lambda state: True), + EntranceData("Castle Vampy IV NW", "Castle Vampy III NW", True, lambda state: True), + EntranceData("Castle Vampy IV NW", "Castle Vampy Roof NW", True, lambda state: True), + EntranceData("A Cabin Collector", "Halloween Hill", True, lambda state: True), + EntranceData("Castle Vampy Roof NE", "Castle Vampy IV NE", True, lambda state: True), + EntranceData("Castle Vampy Roof SE", "Castle Vampy IV SE", True, lambda state: True), + EntranceData("Castle Vampy Roof SW", "Castle Vampy IV SW", True, lambda state: True), + EntranceData("Castle Vampy Roof NW", "Castle Vampy IV NW", True, lambda state: True), + EntranceData("The Evilizer", "Halloween Hill", True, lambda state: True), + EntranceData("The Heart Of Terror", "The Evilizer", True, lambda state: True), + EntranceData("A Hidey-Hole", "Halloween Hill", True, lambda state: True), + EntranceData("Empty Rooftop", "Halloween Hill", True, lambda state: True), + EntranceData("Swampdog Lair", "Halloween Hill", True, lambda state: True), + EntranceData("Larry's Lair", "Halloween Hill", True, lambda state: True), + + #logical zone connections, cant be randomized + + EntranceData("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots")), + EntranceData("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots")), + + EntranceData("Zombiton", "Halloween Hill", False, lambda state: True), #one way + #EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges + + EntranceData("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem")), + EntranceData("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem")), + + EntranceData("Vampy Land", "Halloween Hill", False, lambda state: True), #one way + #EntranceData("Halloween Hill", "Vampy Land", False), TODO possible with badges/rando + + EntranceData("Underground Tunnel Top", "Underground Tunnel Mud", False, lambda state: state.has("Boots")), + EntranceData("Underground Tunnel Mud", "Underground Tunnel Top", False, lambda state: state.has("Boots")), + EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots")), #one way + #EntranceData("Underground Tunnel Zombie", "Underground Tunnel Mud", False), # TODO possible with badges/bridge rando + + EntranceData("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots")) # one way + #EntranceData("Swamp Gas Cavern Back", "Swamp Gas Cavern Front", False), # TODO possible with badges + + + #probably need these with molecular dispersion + # "The Witch's Cabin Front -> The Witch's Cabin Back": EntranceData("The Witch's Cabin Front", "The Witch's Cabin Back", False), + # "The Witch's Cabin Back -> The Witch's Cabin Front": EntranceData("The Witch's Cabin Back", "The Witch's Cabin Front", False), + # "Creepy Caverns Left -> Creepy Caverns Middle": EntranceData("Creepy Caverns Left", "Creepy Caverns Middle", False), + # "Creepy Caverns Middle -> Creepy Caverns Left": EntranceData("Creepy Caverns Middle", "Creepy Caverns Left", False), + # "Creepy Caverns Middle -> Creepy Caverns Right": EntranceData("Creepy Caverns Middle", "Creepy Caverns Right", False), + # "Creepy Caverns Right -> Creepy Caverns Middle": EntranceData("Creepy Caverns Right", "Creepy Caverns Middle", False), + + # "Castle Vampy II Main -> Castle Vampy II NE": EntranceData("Castle Vampy II Main", "Castle Vampy II NE", False), + # "Castle Vampy II NE -> Castle Vampy II Main": EntranceData("Castle Vampy II NE", "Castle Vampy II Main", False), + # "Castle Vampy II Main -> Castle Vampy II SE": EntranceData("Castle Vampy II Main", "Castle Vampy II SE", False), + # "Castle Vampy II SE -> Castle Vampy II Main": EntranceData("Castle Vampy II SE", "Castle Vampy II Main", False), + # "Castle Vampy II Main -> Castle Vampy II SW": EntranceData("Castle Vampy II Main", "Castle Vampy II SW", False), + # "Castle Vampy II SW -> Castle Vampy II Main": EntranceData("Castle Vampy II SW", "Castle Vampy II Main", False), + # "Castle Vampy II Main -> Castle Vampy II NW": EntranceData("Castle Vampy II Main", "Castle Vampy II NW", False), + # "Castle Vampy II NW -> Castle Vampy II Main": EntranceData("Castle Vampy II NW", "Castle Vampy II Main", False), + + # "Castle Vampy III Main -> Castle Vampy III NE": EntranceData("Castle Vampy III Main", "Castle Vampy III NE", False), + # "Castle Vampy III NE -> Castle Vampy III Main": EntranceData("Castle Vampy III NE", "Castle Vampy III Main", False), + # "Castle Vampy III Main -> Castle Vampy III SE": EntranceData("Castle Vampy III Main", "Castle Vampy III SE", False), + # "Castle Vampy III SE -> Castle Vampy III Main": EntranceData("Castle Vampy III SE", "Castle Vampy III Main", False), + # "Castle Vampy III Main -> Castle Vampy III SW": EntranceData("Castle Vampy III Main", "Castle Vampy III SW", False), + # "Castle Vampy III SW -> Castle Vampy III Main": EntranceData("Castle Vampy III SW", "Castle Vampy III Main", False), + # "Castle Vampy III Main -> Castle Vampy III NW": EntranceData("Castle Vampy III Main", "Castle Vampy III NW", False), + # "Castle Vampy III NW -> Castle Vampy III Main": EntranceData("Castle Vampy III NW", "Castle Vampy III Main", False), + + # "Castle Vampy IV Main -> Castle Vampy IV NE": EntranceData("Castle Vampy IV Main", "Castle Vampy IV NE", False), + # "Castle Vampy IV NE -> Castle Vampy IV Main": EntranceData("Castle Vampy IV NE", "Castle Vampy IV Main", False), + # "Castle Vampy IV Main -> Castle Vampy IV SE": EntranceData("Castle Vampy IV Main", "Castle Vampy IV SE", False), + # "Castle Vampy IV SE -> Castle Vampy IV Main": EntranceData("Castle Vampy IV SE", "Castle Vampy IV Main", False), + # "Castle Vampy IV Main -> Castle Vampy IV SW": EntranceData("Castle Vampy IV Main", "Castle Vampy IV SW", False), + # "Castle Vampy IV SW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV SW", "Castle Vampy IV Main", False), + # "Castle Vampy IV Main -> Castle Vampy IV NW": EntranceData("Castle Vampy IV Main", "Castle Vampy IV NW", False), + # "Castle Vampy IV NW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV NW", "Castle Vampy IV Main", False), + ] \ No newline at end of file diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index fe19929cb6d5..44eb6f891d64 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -56,17 +56,20 @@ class LoonylandRegionData(NamedTuple): "Creepy Caverns Middle": LoonylandRegionData(0, False, "Creepy Caverns Middle"), "Creepy Caverns Right": LoonylandRegionData(0, False, "Creepy Caverns Right"), "Castle Vampy": LoonylandRegionData(0, True, ""), + "Castle Vampy Skull Jail": LoonylandRegionData(0, False, "Castle Vampy"), "Castle Vampy II Main": LoonylandRegionData(0, False, "Castle Vampy II"), "Castle Vampy II NW": LoonylandRegionData(0, False, "Castle Vampy II"), "Castle Vampy II NE": LoonylandRegionData(0, False, "Castle Vampy II"), "Castle Vampy II SW": LoonylandRegionData(0, False, "Castle Vampy II"), "Castle Vampy II SE": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy II Bat Jail": LoonylandRegionData(0, False, "Castle Vampy II"), "Cabin in the woods": LoonylandRegionData(0, True, ""), "Castle Vampy III Main": LoonylandRegionData(0, False, "Castle Vampy III"), "Castle Vampy III NW": LoonylandRegionData(0, False, "Castle Vampy III"), "Castle Vampy III NE": LoonylandRegionData(0, False, "Castle Vampy III"), "Castle Vampy III SW": LoonylandRegionData(0, False, "Castle Vampy III"), "Castle Vampy III SE": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy III Pumpkin Jail": LoonylandRegionData(0, False, "Castle Vampy III"), "Castle Vampy IV Main": LoonylandRegionData(0, False, "Castle Vampy IV"), "Castle Vampy IV NW": LoonylandRegionData(0, False, "Castle Vampy IV"), "Castle Vampy IV NE": LoonylandRegionData(0, False, "Castle Vampy IV"), From 9bbcc8849b86e19d56dcdec86873f8a48676255a Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 7 Dec 2024 14:31:39 -0500 Subject: [PATCH 17/58] start adding exits to regions --- worlds/loonyland/Entrances.py | 6 ++++-- worlds/loonyland/__init__.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index 5a789b78337d..7adad6f2db23 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -1,7 +1,7 @@ import typing from typing import NamedTuple, Dict, List -from BaseClasses import Entrance, CollectionState +from BaseClasses import Entrance, CollectionState, Region from worlds.generic.Rules import CollectionRule from worlds.loonyland import LoonylandWorld @@ -220,4 +220,6 @@ def set_entrances(multiworld, world, player): # "Castle Vampy IV SW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV SW", "Castle Vampy IV Main", False), # "Castle Vampy IV Main -> Castle Vampy IV NW": EntranceData("Castle Vampy IV Main", "Castle Vampy IV NW", False), # "Castle Vampy IV NW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV NW", "Castle Vampy IV Main", False), - ] \ No newline at end of file + ] + for region in world.get_regions(): + region.addExits() diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index eb825f7d2aac..a21e769756fa 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -61,7 +61,8 @@ def create_regions(self) -> None: location_name: location_data.id for location_name, location_data in loonyland_location_table.items() if location_data.region == region_name # and location_data.can_create(self) }, LoonylandLocation) - region.add_exits() + #region.add_exits() + # Place locked locations. From 9b916f63a292ad3951b83106a974be604898ebe1 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 7 Dec 2024 15:22:30 -0500 Subject: [PATCH 18/58] entrance adding to region code capitalization issues --- worlds/loonyland/Entrances.py | 11 ++++++----- worlds/loonyland/Locations.py | 14 +++++++------- worlds/loonyland/Regions.py | 8 ++++---- worlds/loonyland/Rules.py | 14 +++++++------- worlds/loonyland/__init__.py | 4 ++-- 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index 7adad6f2db23..3f1dd41fd7e5 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -3,7 +3,6 @@ from BaseClasses import Entrance, CollectionState, Region from worlds.generic.Rules import CollectionRule -from worlds.loonyland import LoonylandWorld class LoonylandEntrance(Entrance): @@ -165,8 +164,8 @@ def set_entrances(multiworld, world, player): #logical zone connections, cant be randomized - EntranceData("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots")), - EntranceData("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots")), + #EntranceData("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots")), + #EntranceData("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots")), EntranceData("Zombiton", "Halloween Hill", False, lambda state: True), #one way #EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges @@ -221,5 +220,7 @@ def set_entrances(multiworld, world, player): # "Castle Vampy IV Main -> Castle Vampy IV NW": EntranceData("Castle Vampy IV Main", "Castle Vampy IV NW", False), # "Castle Vampy IV NW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV NW", "Castle Vampy IV Main", False), ] - for region in world.get_regions(): - region.addExits() + for region in multiworld.get_regions(player): + for entry in loonyland_entrance_table: + if entry.source_region == region.name: + region.connect(region, world.get_region(entry.target_region), rule= entry.rule) diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index cc242e74d6ce..e9846018b179 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -65,10 +65,10 @@ class LoonylandLocationData(NamedTuple): "Spike Vine": LoonylandLocationData(40, LocationCategory.PICKUP, "Rusty Crypt"), "Boulders": LoonylandLocationData(41, LocationCategory.PICKUP, "Rusty Crypt"), "Barrel Mess": LoonylandLocationData(42, LocationCategory.PICKUP, "A Messy Cabin"), - "Lightning Rod Secret": LoonylandLocationData(43, LocationCategory.PICKUP, "Under the Lake"), - "Lake Bat Door": LoonylandLocationData(44, LocationCategory.PICKUP, "Under the Lake"), - "SE corner": LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under the Lake"), - "Rhombus": LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under the Lake"), + "Lightning Rod Secret": LoonylandLocationData(43, LocationCategory.PICKUP, "Under The Lake"), + "Lake Bat Door": LoonylandLocationData(44, LocationCategory.PICKUP, "Under The Lake"), + "SE corner": LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under The Lake"), + "Rhombus": LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under The Lake"), "Frankenjulie's Reward": LoonylandLocationData(47, LocationCategory.PICKUP, "Frankenjulie's Laboratory"), "Barracks": LoonylandLocationData(48, LocationCategory.PICKUP, "Haunted Tower"), "Top Left": LoonylandLocationData(49, LocationCategory.PICKUP, "Haunted Tower, Floor 2"), @@ -96,7 +96,7 @@ class LoonylandLocationData(NamedTuple): "Top Right Top": LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II"), "Bottom Right Middle": LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II"), "Bat room": LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II"), - "Gold Skull": LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin in the woods"), + "Gold Skull": LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin In The Woods"), "Middle": LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III"), "Behind the Pews": LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III"), "AMBUSH!": LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III"), @@ -112,8 +112,8 @@ class LoonylandLocationData(NamedTuple): "Drippy the Elder": LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof"), "Toasty the Elder": LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof"), "Bonkula": LoonylandLocationData(89, LocationCategory.PICKUP, "Heart of Terror"), - "Bat Door": LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey Hole"), - "Pebbles": LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey Hole"), + "Bat Door": LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey-Hole"), + "Pebbles": LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey-Hole"), "Entrance": LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair"), "End": LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair"), "Save Halloween Hill": LoonylandLocationData(94, LocationCategory.QUEST, "The Evilizer"), diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index 44eb6f891d64..1eb0df91edb6 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -36,8 +36,8 @@ class LoonylandRegionData(NamedTuple): "Musty Crypt": LoonylandRegionData(0, True, ""), "Rusty Crypt": LoonylandRegionData(0, True, ""), "A Messy Cabin": LoonylandRegionData(0, True, ""), - "Under the Lake": LoonylandRegionData(0, True, ""), - "Deeper Under the Lake": LoonylandRegionData(0, True, ""), + "Under The Lake": LoonylandRegionData(0, True, ""), + "Deeper Under The Lake": LoonylandRegionData(0, True, ""), "Frankenjulie's Laboratory": LoonylandRegionData(0, True, ""), "Haunted Tower": LoonylandRegionData(0, True, ""), "Haunted Tower, Floor 2": LoonylandRegionData(0, True, ""), @@ -63,7 +63,7 @@ class LoonylandRegionData(NamedTuple): "Castle Vampy II SW": LoonylandRegionData(0, False, "Castle Vampy II"), "Castle Vampy II SE": LoonylandRegionData(0, False, "Castle Vampy II"), "Castle Vampy II Bat Jail": LoonylandRegionData(0, False, "Castle Vampy II"), - "Cabin in the woods": LoonylandRegionData(0, True, ""), + "Cabin In The Woods": LoonylandRegionData(0, True, ""), "Castle Vampy III Main": LoonylandRegionData(0, False, "Castle Vampy III"), "Castle Vampy III NW": LoonylandRegionData(0, False, "Castle Vampy III"), "Castle Vampy III NE": LoonylandRegionData(0, False, "Castle Vampy III"), @@ -82,7 +82,7 @@ class LoonylandRegionData(NamedTuple): "Castle Vampy Roof NW": LoonylandRegionData(0, True, ""), "The Evilizer": LoonylandRegionData(0, True, ""), "Heart of Terror": LoonylandRegionData(0, True, ""), - "A Hidey Hole": LoonylandRegionData(0, True, ""), + "A Hidey-Hole": LoonylandRegionData(0, True, ""), "Empty Rooftop": LoonylandRegionData(0, True, ""), "Swampdog Lair": LoonylandRegionData(0, True, ""), "Larry's Lair": LoonylandRegionData(0, True, ""), diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index 6baf98423a64..6e06b3680a19 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -126,10 +126,10 @@ def set_rules(multiworld, world, player): "Rusty Crypt - Spike Vine": lambda state: have_light_source(state, player) and state.has("Fertilizer", player), "Rusty Crypt - Boulders": lambda state: have_light_source(state, player), "A Messy Cabin - Barrel Mess": lambda state: can_enter_zombiton(state, player), - "Under the Lake - Lightning Rod Secret": lambda state: have_light_source(state, player) and have_all_orbs(state, player), - "Under the Lake - Bat Door": lambda state: have_light_source(state, player) and have_all_orbs(state, player) and state.has("Bat Key", player), - "Deeper Under the Lake - SE corner": lambda state: have_light_source(state, player) and have_all_orbs(state, player), - "Deeper Under the Lake - Rhombus": lambda state: have_light_source(state, player) and have_all_orbs(state, player), + "Under The Lake - Lightning Rod Secret": lambda state: have_light_source(state, player) and have_all_orbs(state, player), + "Under The Lake - Bat Door": lambda state: have_light_source(state, player) and have_all_orbs(state, player) and state.has("Bat Key", player), + "Deeper Under The Lake - SE corner": lambda state: have_light_source(state, player) and have_all_orbs(state, player), + "Deeper Under The Lake - Rhombus": lambda state: have_light_source(state, player) and have_all_orbs(state, player), "Frankenjulie's Laboratory - Boss Reward": lambda state: have_light_source(state, player) and have_all_orbs(state, player), "Haunted Tower - Barracks": lambda state: state.has("Ghost Potion", player) and state.has("Bat Key", player), "Haunted Tower, Floor 2 - Top Left": lambda state: state.has("Ghost Potion", player), @@ -157,7 +157,7 @@ def set_rules(multiworld, world, player): "Castle Vampy II - Top Right Top": lambda state: can_enter_vampy_ii(state, player), "Castle Vampy II - Bottom Right Middle": lambda state: can_enter_vampy_ii(state, player), "Castle Vampy II - Bat room": lambda state: can_enter_vampy_ii(state, player) and have_special_weapon_bullet(state, player), - "Cabin in the woods - Gold Skull": lambda state: True, + "Cabin In The Woods - Gold Skull": lambda state: True, "Castle Vampy III - Middle": lambda state: can_enter_vampy_iii(state, player), "Castle Vampy III - Behind the Pews": lambda state: can_enter_vampy_iii(state, player), "Castle Vampy III - AMBUSH!": lambda state: can_enter_vampy_iii(state, player), @@ -173,8 +173,8 @@ def set_rules(multiworld, world, player): "Castle Vampy Roof - Drippy the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), "Castle Vampy Roof - Toasty the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), "Heart of Terror - Bonkula": lambda state: can_enter_vampy_iv(state, player) and have_all_vamps(state, player), - "A Hidey Hole - Bat Door": lambda state: state.has("Bat Key", player), - #"A Hidey Hole - Pebbles": lambda state: True, + "A Hidey-Hole - Bat Door": lambda state: state.has("Bat Key", player), + #"A Hidey-Hole - Pebbles": lambda state: True, "Swampdog Lair - Entrance": lambda state: state.has("Boots", player), "Swampdog Lair - End": lambda state: state.has("Boots", player) and have_light_source(state, player) and state.has("Fertilizer", player), "The Witch's Cabin - Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Daisy", player) and state.has("Mushroom", player, 10), diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index a21e769756fa..c379e153f94d 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -6,7 +6,7 @@ from .Locations import LoonylandLocation, LoonylandLocationData, loonyland_location_table #, locked_locations from .Options import LoonylandOptions from .Regions import loonyland_region_table -from .Entrances import loonyland_entrance_table, LoonylandEntrance +from .Entrances import set_entrances, LoonylandEntrance from .Rules import set_rules @@ -62,7 +62,7 @@ def create_regions(self) -> None: if location_data.region == region_name # and location_data.can_create(self) }, LoonylandLocation) #region.add_exits() - + set_entrances(self.multiworld, self, self.player) # Place locked locations. From d738ebf4ec468490f55e7d748cf8bfbcf10e09d9 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 7 Dec 2024 15:54:50 -0500 Subject: [PATCH 19/58] Name fixing --- worlds/loonyland/Entrances.py | 46 ++++++++-------- worlds/loonyland/Locations.py | 98 +++++++++++++++++------------------ worlds/loonyland/Regions.py | 8 +-- worlds/loonyland/Rules.py | 98 +++++++++++++++++------------------ 4 files changed, 125 insertions(+), 125 deletions(-) diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index 3f1dd41fd7e5..deca05975b8b 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -55,7 +55,7 @@ def set_entrances(multiworld, world, player): EntranceData("Halloween Hill", "Cabin In The Woods", True, lambda state: True), EntranceData("Halloween Hill", "A Cabin Collector", True, lambda state: True), EntranceData("Halloween Hill", "A Hidey-Hole", True, lambda state: True), - EntranceData("Vampy Land", "Creepy Caverns", True, lambda state: True), + EntranceData("Vampy Land", "Creepy Caverns Right", True, lambda state: True), EntranceData("Halloween Hill", "Swampdog Lair", True, lambda state: True), EntranceData("A Cabin Trees", "Halloween Hill", True,lambda state: True), EntranceData("The Witch's Cabin Front", "Halloween Hill", True, lambda state: True), @@ -97,9 +97,9 @@ def set_entrances(multiworld, world, player): EntranceData("A Gloomy Cavern", "Rocky Cliffs", True, lambda state: True), EntranceData("Happy Stick Woods", "Halloween Hill", True, lambda state: True), EntranceData("The Wolf Den", "Halloween Hill", True, lambda state: True), - EntranceData("The Wolf Den", "Larry's Lair", True, lambda state: state.has("Silver Sling")), + EntranceData("The Wolf Den", "Larry's Lair", True, lambda state: state.has("Silver Sling", player)), EntranceData("A Cabin Larry", "Zombiton", True, lambda state: True), - EntranceData("Upper Creepy Caverns", "Rocky Cliffs", True, lambda state: state.has("Bombs")), + EntranceData("Upper Creepy Caverns", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True, lambda state: True), EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True, lambda state: True), EntranceData("Under The Ravine", "Creepy Caverns Middle", True, lambda state: True), @@ -111,15 +111,15 @@ def set_entrances(multiworld, world, player): EntranceData("Creepy Caverns Right", "Under The Ravine", True, lambda state: True), EntranceData("Creepy Caverns Right", "Vampy Land", True, lambda state: True), EntranceData("Castle Vampy", "Halloween Hill", True, lambda state: True), - EntranceData("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key")), - EntranceData("Castle Vampy Skull Jail", "Castle Vampy II", True, lambda state: state.has("Skull Key")), - EntranceData("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", 4)), - EntranceData("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", 4)), - EntranceData("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", 4)), - EntranceData("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", 4)), - EntranceData("Castle Vampy II", "Castle Vampy Skull Jail", True, lambda state: True), - EntranceData("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, lambda state: state.has("Bat Key")), - EntranceData("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, lambda state: state.has("Bat Key")), + EntranceData("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), + EntranceData("Castle Vampy Skull Jail", "Castle Vampy II Main", True, lambda state: state.has("Skull Key", player)), + EntranceData("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", player, 4)), + EntranceData("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", player,4)), + EntranceData("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", player,4)), + EntranceData("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", player,4)), + EntranceData("Castle Vampy II Main", "Castle Vampy Skull Jail", True, lambda state: True), + EntranceData("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, lambda state: state.has("Bat Key", player)), + EntranceData("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, lambda state: state.has("Bat Key", player)), EntranceData("Castle Vampy II NE", "Castle Vampy", True, lambda state: True), EntranceData("Castle Vampy II NE", "Castle Vampy III NE", True, lambda state: True), EntranceData("Castle Vampy II SE", "Castle Vampy", True, lambda state: True), @@ -130,8 +130,8 @@ def set_entrances(multiworld, world, player): EntranceData("Castle Vampy II NW", "Castle Vampy III NW", True, lambda state: True), EntranceData("Cabin In The Woods", "Halloween Hill", True, lambda state: True), EntranceData("Castle Vampy III Main", "Castle Vampy II Bat Jail", True, lambda state: True), - EntranceData("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", True, lambda state: state.has("Pumpkin Key")), - EntranceData("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True, lambda state: state.has("Pumpkin Key")), + EntranceData("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", True, lambda state: state.has("Pumpkin Key", player)), + EntranceData("Castle Vampy III Pumpkin Jail", "Castle Vampy IV Main", True, lambda state: state.has("Pumpkin Key", player)), EntranceData("Castle Vampy III NE", "Castle Vampy II NE", True, lambda state: True), EntranceData("Castle Vampy III NE", "Castle Vampy IV NE", True, lambda state: True), EntranceData("Castle Vampy III SE", "Castle Vampy II SE", True, lambda state: True), @@ -140,8 +140,8 @@ def set_entrances(multiworld, world, player): EntranceData("Castle Vampy III SW", "Castle Vampy IV SW", True, lambda state: True), EntranceData("Castle Vampy III NW", "Castle Vampy II NW", True, lambda state: True), EntranceData("Castle Vampy III NW", "Castle Vampy IV NW", True, lambda state: True), - EntranceData("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True, lambda state: True), - EntranceData("Castle Vampy IV", "The Heart Of Terror", True, lambda state: state.has("Vamp Statue", player, 8)), + EntranceData("Castle Vampy IV Main", "Castle Vampy III Pumpkin Jail", True, lambda state: True), + EntranceData("Castle Vampy IV Main", "The Heart Of Terror", True, lambda state: state.has("Vamp Statue", player, 8)), EntranceData("Castle Vampy IV NE", "Castle Vampy III NE", True, lambda state: True), EntranceData("Castle Vampy IV NE", "Castle Vampy Roof NE", True, lambda state: True), EntranceData("Castle Vampy IV SE", "Castle Vampy III SE", True, lambda state: True), @@ -170,18 +170,18 @@ def set_entrances(multiworld, world, player): EntranceData("Zombiton", "Halloween Hill", False, lambda state: True), #one way #EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges - EntranceData("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem")), - EntranceData("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem")), + EntranceData("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player)), + EntranceData("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player)), EntranceData("Vampy Land", "Halloween Hill", False, lambda state: True), #one way #EntranceData("Halloween Hill", "Vampy Land", False), TODO possible with badges/rando - EntranceData("Underground Tunnel Top", "Underground Tunnel Mud", False, lambda state: state.has("Boots")), - EntranceData("Underground Tunnel Mud", "Underground Tunnel Top", False, lambda state: state.has("Boots")), - EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots")), #one way + EntranceData("Underground Tunnel Top", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), + EntranceData("Underground Tunnel Mud", "Underground Tunnel Top", False, lambda state: state.has("Boots", player)), + EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player)), #one way #EntranceData("Underground Tunnel Zombie", "Underground Tunnel Mud", False), # TODO possible with badges/bridge rando - EntranceData("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots")) # one way + EntranceData("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), # one way #EntranceData("Swamp Gas Cavern Back", "Swamp Gas Cavern Front", False), # TODO possible with badges @@ -223,4 +223,4 @@ def set_entrances(multiworld, world, player): for region in multiworld.get_regions(player): for entry in loonyland_entrance_table: if entry.source_region == region.name: - region.connect(region, world.get_region(entry.target_region), rule= entry.rule) + region.connect(connecting_region= world.get_region(entry.target_region), rule= entry.rule) diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index e9846018b179..cd2edb62acbb 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -22,24 +22,24 @@ class LoonylandLocationData(NamedTuple): region: str loonyland_location_table: Dict[str, LoonylandLocationData] = { - "Swamp Mud Path": LoonylandLocationData(0, LocationCategory.PICKUP, "Halloween Hill"), + "Swamp Mud Path": LoonylandLocationData(0, LocationCategory.PICKUP, "Slurpy Swamp Mud"), "Bog Beast Home": LoonylandLocationData(1, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs below Upper Caverns": LoonylandLocationData(2, LocationCategory.PICKUP, "Halloween Hill"), - "Sapling Shrine": LoonylandLocationData(3, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs below Upper Caverns": LoonylandLocationData(2, LocationCategory.PICKUP, "Rocky Cliffs"), + "Sapling Shrine": LoonylandLocationData(3, LocationCategory.PICKUP, "Slurpy Swamp Mud"), "Terror Glade": LoonylandLocationData(4, LocationCategory.PICKUP, "Halloween Hill"), "Rocky Cliffs Vine": LoonylandLocationData(5, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs Grand Pharoh": LoonylandLocationData(6, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs Rock Corner": LoonylandLocationData(7, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs Grand Pharoh": LoonylandLocationData(6, LocationCategory.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs Rock Corner": LoonylandLocationData(7, LocationCategory.PICKUP, "Rocky Cliffs"), "Mushroom outside town": LoonylandLocationData(8, LocationCategory.PICKUP, "Halloween Hill"), "North of UG Passage": LoonylandLocationData(9, LocationCategory.PICKUP, "Halloween Hill"), "Top left mushroom spot": LoonylandLocationData(10, LocationCategory.PICKUP, "Halloween Hill"), "NE of UG Passage": LoonylandLocationData(11, LocationCategory.PICKUP, "Halloween Hill"), "East Woods": LoonylandLocationData(12, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs Ledge": LoonylandLocationData(13, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs Peak": LoonylandLocationData(14, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs Ledge": LoonylandLocationData(13, LocationCategory.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs Peak": LoonylandLocationData(14, LocationCategory.PICKUP, "Rocky Cliffs"), "Cat Tree": LoonylandLocationData(15, LocationCategory.PICKUP, "Halloween Hill"), - "Bedroom": LoonylandLocationData(16, LocationCategory.PICKUP, "The Witch's Cabin"), - "Backroom": LoonylandLocationData(17, LocationCategory.PICKUP, "The Witch's Cabin"), + "Bedroom": LoonylandLocationData(16, LocationCategory.PICKUP, "The Witch's Cabin Front"), + "Backroom": LoonylandLocationData(17, LocationCategory.PICKUP, "The Witch's Cabin Back"), "Barrel Maze": LoonylandLocationData(18, LocationCategory.PICKUP, "Bonita's Cabin"), "Top Door": LoonylandLocationData(19, LocationCategory.PICKUP, "The Bog Pit"), "Post Room": LoonylandLocationData(20, LocationCategory.PICKUP, "The Bog Pit"), @@ -47,18 +47,18 @@ class LoonylandLocationData(NamedTuple): "Green room": LoonylandLocationData(22, LocationCategory.PICKUP, "The Bog Pit"), "Arena": LoonylandLocationData(23, LocationCategory.PICKUP, "The Bog Pit"), "Kill Wall": LoonylandLocationData(24, LocationCategory.PICKUP, "The Bog Pit"), - "Swampdog Door": LoonylandLocationData(25, LocationCategory.PICKUP, "Underground Tunnel"), - "Scribble Wall": LoonylandLocationData(26, LocationCategory.PICKUP, "Underground Tunnel"), - "Tiny Passage": LoonylandLocationData(27, LocationCategory.PICKUP, "Underground Tunnel"), - "fire frogs": LoonylandLocationData(28, LocationCategory.PICKUP, "Underground Tunnel"), - "Torch Island": LoonylandLocationData(29, LocationCategory.PICKUP, "Underground Tunnel"), - "Small Room": LoonylandLocationData(30, LocationCategory.PICKUP, "Underground Tunnel"), - "Scratch Wall": LoonylandLocationData(31, LocationCategory.PICKUP, "Swamp Gas Cavern"), - "Bat Mound": LoonylandLocationData(32, LocationCategory.PICKUP, "Swamp Gas Cavern"), - "Stair room": LoonylandLocationData(33, LocationCategory.PICKUP, "Swamp Gas Cavern"), - "Rock Prison": LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern"), + "Swampdog Door": LoonylandLocationData(25, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Scribble Wall": LoonylandLocationData(26, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Tiny Passage": LoonylandLocationData(27, LocationCategory.PICKUP, "Underground Tunnel Top"), + "fire frogs": LoonylandLocationData(28, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Torch Island": LoonylandLocationData(29, LocationCategory.PICKUP, "Underground Tunnel Mud"), + "Small Room": LoonylandLocationData(30, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Scratch Wall": LoonylandLocationData(31, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), + "Bat Mound": LoonylandLocationData(32, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), + "Stair room": LoonylandLocationData(33, LocationCategory.PICKUP, "Swamp Gas Cavern Back"), + "Rock Prison": LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), "Tiny Cabin": LoonylandLocationData(35, LocationCategory.PICKUP, "A Tiny Cabin"), - "Bedside ": LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin"), + "Bedside ": LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin Seer"), "Crypt Pumpkin Door": LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt"), "Maze": LoonylandLocationData(38, LocationCategory.PICKUP, "Dusty Crypt"), "Big Closed Room": LoonylandLocationData(39, LocationCategory.PICKUP, "Musty Crypt"), @@ -75,58 +75,58 @@ class LoonylandLocationData(NamedTuple): "Boss Reward": LoonylandLocationData(50, LocationCategory.PICKUP, "Haunted Tower Roof"), "DoorDoorDoorDoorDoorDoor": LoonylandLocationData(51, LocationCategory.PICKUP, "Haunted Basement"), "Shaft": LoonylandLocationData(52, LocationCategory.PICKUP, "Abandoned Mines"), - "Bombulus": LoonylandLocationData(53, LocationCategory.PICKUP, "The Shrine of Bombulus"), + "Bombulus": LoonylandLocationData(53, LocationCategory.PICKUP, "The Shrine Of Bombulus"), "Lockpick": LoonylandLocationData(54, LocationCategory.PICKUP, "A Gloomy Cavern"), "Happy Stick Hidden": LoonylandLocationData(55, LocationCategory.PICKUP, "Happy Stick Woods"), "Happy Stick Reward": LoonylandLocationData(56, LocationCategory.PICKUP, "Happy Stick Woods"), "Wolf Top Left": LoonylandLocationData(57, LocationCategory.PICKUP, "The Wolf Den"), "Pumpkin Door": LoonylandLocationData(58, LocationCategory.PICKUP, "The Wolf Den"), "Grow Room": LoonylandLocationData(59, LocationCategory.PICKUP, "The Wolf Den"), - "The Three ombres": LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Cavern"), + "The Three ombres": LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Caverns"), "Left Vine": LoonylandLocationData(61, LocationCategory.PICKUP, "Under the Ravine"), "Right Vine": LoonylandLocationData(62, LocationCategory.PICKUP, "Under the Ravine"), - "M Pharoh bat Room": LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns"), - "E 2 blue Pharos": LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns"), - "M GARGOYLE ROOM": LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns"), + "M Pharoh bat Room": LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns Middle"), + "E 2 blue Pharos": LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns Right"), + "M GARGOYLE ROOM": LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns Middle"), "Vampire Guard": LoonylandLocationData(66, LocationCategory.PICKUP, "Castle Vampy"), "maze top left": LoonylandLocationData(67, LocationCategory.PICKUP, "Castle Vampy"), "Top Right Gauntlet": LoonylandLocationData(68, LocationCategory.PICKUP, "Castle Vampy"), "Bat Closet": LoonylandLocationData(69, LocationCategory.PICKUP, "Castle Vampy"), - "Candle Room": LoonylandLocationData(70, LocationCategory.PICKUP, "Castle Vampy II"), - "Top Right Top": LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II"), - "Bottom Right Middle": LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II"), - "Bat room": LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II"), + "Candle Room": LoonylandLocationData(70, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Top Right Top": LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Bottom Right Middle": LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Bat room": LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II Main"), "Gold Skull": LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin In The Woods"), - "Middle": LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III"), - "Behind the Pews": LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III"), - "AMBUSH!": LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III"), - "Halloween": LoonylandLocationData(78, LocationCategory.PICKUP, "Castle Vampy III"), - "So many bats": LoonylandLocationData(79, LocationCategory.PICKUP, "Castle Vampy III"), - "Right Path": LoonylandLocationData(80, LocationCategory.PICKUP, "Castle Vampy IV"), - "Left Path": LoonylandLocationData(81, LocationCategory.PICKUP, "Castle Vampy IV"), - "Ballroom Right": LoonylandLocationData(82, LocationCategory.PICKUP, "Castle Vampy IV"), - "Right Secret Wall": LoonylandLocationData(83, LocationCategory.PICKUP, "Castle Vampy IV"), - "Ballroom Left": LoonylandLocationData(84, LocationCategory.PICKUP, "Castle Vampy IV"), - "Gutsy the Elder": LoonylandLocationData(85, LocationCategory.PICKUP, "Castle Vampy Roof"), - "Stoney the Elder": LoonylandLocationData(86, LocationCategory.PICKUP, "Castle Vampy Roof"), - "Drippy the Elder": LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof"), - "Toasty the Elder": LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof"), - "Bonkula": LoonylandLocationData(89, LocationCategory.PICKUP, "Heart of Terror"), + "Middle": LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Behind the Pews": LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III Main"), + "AMBUSH!": LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Halloween": LoonylandLocationData(78, LocationCategory.PICKUP, "Castle Vampy III Main"), + "So many bats": LoonylandLocationData(79, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Right Path": LoonylandLocationData(80, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Left Path": LoonylandLocationData(81, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Ballroom Right": LoonylandLocationData(82, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Right Secret Wall": LoonylandLocationData(83, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Ballroom Left": LoonylandLocationData(84, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Gutsy the Elder": LoonylandLocationData(85, LocationCategory.PICKUP, "Castle Vampy Roof NW"), + "Stoney the Elder": LoonylandLocationData(86, LocationCategory.PICKUP, "Castle Vampy Roof NE"), + "Drippy the Elder": LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof SW"), + "Toasty the Elder": LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof SE"), + "Bonkula": LoonylandLocationData(89, LocationCategory.PICKUP, "The Heart Of Terror"), "Bat Door": LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey-Hole"), "Pebbles": LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey-Hole"), "Entrance": LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair"), "End": LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair"), "Save Halloween Hill": LoonylandLocationData(94, LocationCategory.QUEST, "The Evilizer"), - "Ghostbusting": LoonylandLocationData(95, LocationCategory.QUEST, "The Witch's Cabin"), - "Hairy Larry": LoonylandLocationData(96, LocationCategory.QUEST, "A Cabin3"), + "Ghostbusting": LoonylandLocationData(95, LocationCategory.QUEST, "The Witch's Cabin Front"), + "Hairy Larry": LoonylandLocationData(96, LocationCategory.QUEST, "A Cabin Larry"), "Scaredy Cat": LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill"), "Silver Bullet": LoonylandLocationData(98, LocationCategory.QUEST, "Halloween Hill"), "Smashing Pumpkins": LoonylandLocationData(99, LocationCategory.QUEST, "Halloween Hill"), "Sticky Shoes": LoonylandLocationData(100, LocationCategory.QUEST, "Halloween Hill"), - "The Collection": LoonylandLocationData(101, LocationCategory.QUEST, "A Cabin4"), + "The Collection": LoonylandLocationData(101, LocationCategory.QUEST, "A Cabin Collector"), "The Rescue": LoonylandLocationData(102, LocationCategory.QUEST, "A Gloomy Cavern"), - "Tree Trimming": LoonylandLocationData(103, LocationCategory.QUEST, "A Cabin"), - "Witch Mushrooms": LoonylandLocationData(104, LocationCategory.QUEST, "The Witch's Cabin"), + "Tree Trimming": LoonylandLocationData(103, LocationCategory.QUEST, "A Cabin Trees"), + "Witch Mushrooms": LoonylandLocationData(104, LocationCategory.QUEST, "The Witch's Cabin Front"), "Zombie Stomp": LoonylandLocationData(105, LocationCategory.QUEST, "Halloween Hill") #todo the 40 badge locations } diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index 1eb0df91edb6..fe0b768ca707 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -45,13 +45,13 @@ class LoonylandRegionData(NamedTuple): "Haunted Tower Roof": LoonylandRegionData(0, True, ""), "Haunted Basement": LoonylandRegionData(0, True, ""), "Abandoned Mines": LoonylandRegionData(0, True, ""), - "The Shrine of Bombulus": LoonylandRegionData(0, True, ""), + "The Shrine Of Bombulus": LoonylandRegionData(0, True, ""), "A Gloomy Cavern": LoonylandRegionData(0, True, ""), "Happy Stick Woods": LoonylandRegionData(0, True, ""), "The Wolf Den": LoonylandRegionData(0, True, ""), "A Cabin Larry": LoonylandRegionData(0, True, ""), - "Upper Creepy Cavern": LoonylandRegionData(0, True, ""), - "Under the Ravine": LoonylandRegionData(0, True, ""), + "Upper Creepy Caverns": LoonylandRegionData(0, True, ""), + "Under The Ravine": LoonylandRegionData(0, True, ""), "Creepy Caverns Left": LoonylandRegionData(0, False, "Creepy Caverns Left"), "Creepy Caverns Middle": LoonylandRegionData(0, False, "Creepy Caverns Middle"), "Creepy Caverns Right": LoonylandRegionData(0, False, "Creepy Caverns Right"), @@ -81,7 +81,7 @@ class LoonylandRegionData(NamedTuple): "Castle Vampy Roof SW": LoonylandRegionData(0, True, ""), "Castle Vampy Roof NW": LoonylandRegionData(0, True, ""), "The Evilizer": LoonylandRegionData(0, True, ""), - "Heart of Terror": LoonylandRegionData(0, True, ""), + "The Heart Of Terror": LoonylandRegionData(0, True, ""), "A Hidey-Hole": LoonylandRegionData(0, True, ""), "Empty Rooftop": LoonylandRegionData(0, True, ""), "Swampdog Lair": LoonylandRegionData(0, True, ""), diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index 6e06b3680a19..79975e274fd0 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -83,24 +83,24 @@ def can_enter_vampy_iv(state: CollectionState, player: int) -> bool: def set_rules(multiworld, world, player): access_rules = { - "Halloween Hill - Swamp Mud Path": lambda state: state.has("Boots", player), + "Slurpy Swamp Mud - Swamp Mud Path": lambda state: state.has("Boots", player), #"Halloween Hill - Bog Beast Home": lambda state: True, - "Halloween Hill - Rocky Cliffs below Upper Caverns": lambda state: can_enter_rocky_cliffs(state, player), - "Halloween Hill - Sapling Shrine": lambda state: state.has("Boots", player), + "Rocky Cliffs - Rocky Cliffs below Upper Caverns": lambda state: can_enter_rocky_cliffs(state, player), + "Slurpy Swamp Mud - Sapling Shrine": lambda state: state.has("Boots", player), #"Halloween Hill - Terror Glade": lambda state: True, "Halloween Hill - Rocky Cliffs Vine": lambda state: state.has("Fertilizer", player), - "Halloween Hill - Rocky Cliffs Grand Pharoh": lambda state: can_enter_rocky_cliffs(state, player), - "Halloween Hill - Rocky Cliffs Rock Corner": lambda state: can_enter_rocky_cliffs(state, player) and have_bombs(state, player), + "Rocky Cliffs - Rocky Cliffs Grand Pharoh": lambda state: can_enter_rocky_cliffs(state, player), + "Rocky Cliffs - Rocky Cliffs Rock Corner": lambda state: can_enter_rocky_cliffs(state, player) and have_bombs(state, player), #"Halloween Hill - Mushroom outside town": lambda state: True, #"Halloween Hill - North of UG Passage": lambda state: True, #"Halloween Hill - Top left mushroom spot": lambda state: True, #"Halloween Hill - NE of UG Passage": lambda state: True, #"Halloween Hill - East Woods": lambda state: True, - "Halloween Hill - Rocky Cliffs Ledge": lambda state: can_enter_rocky_cliffs(state, player), - "Halloween Hill - Rocky Cliffs Peak": lambda state: can_enter_rocky_cliffs(state, player), + "Rocky Cliffs - Rocky Cliffs Ledge": lambda state: can_enter_rocky_cliffs(state, player), + "Rocky Cliffs - Rocky Cliffs Peak": lambda state: can_enter_rocky_cliffs(state, player), #"Halloween Hill - Cat Tree": lambda state: True, - "The Witch's Cabin - Bedroom": lambda state: have_light_source(state, player), - #"The Witch's Cabin - Backroom": lambda state: True, + "The Witch's Cabin Front - Bedroom": lambda state: have_light_source(state, player), + #"The Witch's Cabin Back - Backroom": lambda state: True, #"Bonita's Cabin - Barrel Maze": lambda state: True, "The Bog Pit - Top Door": lambda state: state.has("Skull Key", player), #"The Bog Pit - Post Room": lambda state: True, @@ -108,18 +108,18 @@ def set_rules(multiworld, world, player): #"The Bog Pit - Green room": lambda state: True, "The Bog Pit - Arena": lambda state: True, "The Bog Pit - Kill Wall": lambda state: True, - "Underground Tunnel - Swampdog Door": lambda state: state.has("Pumpkin Key", player), - "Underground Tunnel - Scribble Wall": lambda state: have_special_weapon_bullet(state, player), - "Underground Tunnel - Tiny Passage": lambda state: True, - "Underground Tunnel - fire frogs": lambda state: True, - "Underground Tunnel - Torch Island": lambda state: state.has("Boots", player), - "Underground Tunnel - Small Room": lambda state: True, - "Swamp Gas Cavern - Scratch Wall": lambda state: state.has("Boots", player) and have_special_weapon_bullet(state, player), - "Swamp Gas Cavern - Bat Mound": lambda state: state.has("Boots", player) and state.has("Bat Key", player), - "Swamp Gas Cavern - Stair room": lambda state: state.has("Boots", player), - "Swamp Gas Cavern - Rock Prison": lambda state: state.has("Boots", player) and have_bombs(state, player), + "Underground Tunnel Top - Swampdog Door": lambda state: state.has("Pumpkin Key", player), + "Underground Tunnel Top - Scribble Wall": lambda state: have_special_weapon_bullet(state, player), + "Underground Tunnel Top - Tiny Passage": lambda state: True, + "Underground Tunnel Top - fire frogs": lambda state: True, + "Underground Tunnel Mud - Torch Island": lambda state: state.has("Boots", player), + "Underground Tunnel Top - Small Room": lambda state: True, + "Swamp Gas Cavern Front - Scratch Wall": lambda state: state.has("Boots", player) and have_special_weapon_bullet(state, player), + "Swamp Gas Cavern Front - Bat Mound": lambda state: state.has("Boots", player) and state.has("Bat Key", player), + "Swamp Gas Cavern Back- Stair room": lambda state: state.has("Boots", player), + "Swamp Gas Cavern Front - Rock Prison": lambda state: state.has("Boots", player) and have_bombs(state, player), "A Tiny Cabin - Tiny Cabin": lambda state: state.has("Skull Key", player), - "A Cabin - Bedside ": lambda state: can_enter_zombiton(state, player), + "A Cabin Seer - Bedside ": lambda state: can_enter_zombiton(state, player), "Dusty Crypt - Pumpkin Door": lambda state: have_light_source(state, player) and state.has("Pumpkin Key", player), "Dusty Crypt - Maze": lambda state: have_light_source(state, player), "Musty Crypt - Big Closed Room": lambda state: have_light_source(state, player) and can_enter_zombiton(state, player) and have_special_weapon_bullet(state, player), @@ -136,57 +136,57 @@ def set_rules(multiworld, world, player): "Haunted Tower Roof - Boss Reward": lambda state: state.has("Ghost Potion", player), "Haunted Basement - DoorDoorDoorDoorDoorDoor": lambda state: state.has("Ghost Potion", player) and have_light_source(state, player) and state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), "Abandoned Mines - Shaft": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "The Shrine of Bombulus - Bombulus": lambda state: can_enter_rocky_cliffs(state, player), + "The Shrine Of Bombulus - Bombulus": lambda state: can_enter_rocky_cliffs(state, player), "A Gloomy Cavern - Lockpick": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), "Happy Stick Woods - Happy Stick Hidden": lambda state: state.has("Happy Stick", player), "Happy Stick Woods - Happy Stick Reward": lambda state: state.has("Happy Stick", player), "The Wolf Den - Wolf Top Left": lambda state: have_light_source(state, player) and state.has("Silver Sling", player), "The Wolf Den - Pumpkin Door": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Pumpkin Key", player), "The Wolf Den - Grow Room": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Fertilizer", player), - "Upper Creepy Cavern - The Three ombres": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), + "Upper Creepy Caverns - The Three ombres": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), "Under the Ravine - Left Vine": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player) and state.has("Fertilizer", player), "Under the Ravine - Right Vine": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player) and state.has("Fertilizer", player), - "Creepy Caverns - M Pharoh bat Room": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player) and state.has("Bat Key", player), - "Creepy Caverns - E 2 blue Pharos": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "Creepy Caverns - M GARGOYLE ROOM": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), + "Creepy Caverns Middle - M Pharoh bat Room": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player) and state.has("Bat Key", player), + "Creepy Caverns Right - E 2 blue Pharos": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), + "Creepy Caverns Middle - M GARGOYLE ROOM": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), "Castle Vampy - Vampire Guard": lambda state: can_enter_vampy(state, player), "Castle Vampy - maze top left": lambda state: can_enter_vampy(state, player), "Castle Vampy - Top Right Gauntlet": lambda state: can_enter_vampy(state, player), "Castle Vampy - Bat Closet": lambda state: can_enter_vampy(state, player), - "Castle Vampy II - Candle Room": lambda state: can_enter_vampy_ii(state, player), - "Castle Vampy II - Top Right Top": lambda state: can_enter_vampy_ii(state, player), - "Castle Vampy II - Bottom Right Middle": lambda state: can_enter_vampy_ii(state, player), - "Castle Vampy II - Bat room": lambda state: can_enter_vampy_ii(state, player) and have_special_weapon_bullet(state, player), + "Castle Vampy II Main - Candle Room": lambda state: can_enter_vampy_ii(state, player), + "Castle Vampy II Main - Top Right Top": lambda state: can_enter_vampy_ii(state, player), + "Castle Vampy II Main - Bottom Right Middle": lambda state: can_enter_vampy_ii(state, player), + "Castle Vampy II Main - Bat room": lambda state: can_enter_vampy_ii(state, player) and have_special_weapon_bullet(state, player), "Cabin In The Woods - Gold Skull": lambda state: True, - "Castle Vampy III - Middle": lambda state: can_enter_vampy_iii(state, player), - "Castle Vampy III - Behind the Pews": lambda state: can_enter_vampy_iii(state, player), - "Castle Vampy III - AMBUSH!": lambda state: can_enter_vampy_iii(state, player), - "Castle Vampy III - Halloween": lambda state: can_enter_vampy_iii(state, player), - "Castle Vampy III - So many bats": lambda state: can_enter_vampy_iii(state, player), - "Castle Vampy IV - Right Path": lambda state: can_enter_vampy_iv(state, player), - "Castle Vampy IV - Left Path": lambda state: can_enter_vampy_iv(state, player), - "Castle Vampy IV - Ballroom Right": lambda state: can_enter_vampy_iv(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), - "Castle Vampy IV - Right Secret Wall": lambda state: can_enter_vampy_iv(state, player), - "Castle Vampy IV - Ballroom Left": lambda state: can_enter_vampy_iv(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), - "Castle Vampy Roof - Gutsy the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player) and have_special_weapon_damage(state, player), - "Castle Vampy Roof - Stoney the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), - "Castle Vampy Roof - Drippy the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), - "Castle Vampy Roof - Toasty the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), - "Heart of Terror - Bonkula": lambda state: can_enter_vampy_iv(state, player) and have_all_vamps(state, player), + "Castle Vampy III Main - Middle": lambda state: can_enter_vampy_iii(state, player), + "Castle Vampy III Main - Behind the Pews": lambda state: can_enter_vampy_iii(state, player), + "Castle Vampy III Main - AMBUSH!": lambda state: can_enter_vampy_iii(state, player), + "Castle Vampy III Main - Halloween": lambda state: can_enter_vampy_iii(state, player), + "Castle Vampy III Main - So many bats": lambda state: can_enter_vampy_iii(state, player), + "Castle Vampy IV Main - Right Path": lambda state: can_enter_vampy_iv(state, player), + "Castle Vampy IV Main - Left Path": lambda state: can_enter_vampy_iv(state, player), + "Castle Vampy IV Main - Ballroom Right": lambda state: can_enter_vampy_iv(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Castle Vampy IV Main - Right Secret Wall": lambda state: can_enter_vampy_iv(state, player), + "Castle Vampy IV Main - Ballroom Left": lambda state: can_enter_vampy_iv(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Castle Vampy Roof NW - Gutsy the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player) and have_special_weapon_damage(state, player), + "Castle Vampy Roof NE - Stoney the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), + "Castle Vampy Roof SW - Drippy the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), + "Castle Vampy Roof SE - Toasty the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), + "The Heart Of Terror - Bonkula": lambda state: can_enter_vampy_iv(state, player) and have_all_vamps(state, player), "A Hidey-Hole - Bat Door": lambda state: state.has("Bat Key", player), #"A Hidey-Hole - Pebbles": lambda state: True, "Swampdog Lair - Entrance": lambda state: state.has("Boots", player), "Swampdog Lair - End": lambda state: state.has("Boots", player) and have_light_source(state, player) and state.has("Fertilizer", player), - "The Witch's Cabin - Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Daisy", player) and state.has("Mushroom", player, 10), - "A Cabin3 - Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Boots", player) , + "The Witch's Cabin Front - Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Daisy", player) and state.has("Mushroom", player, 10), + "A Cabin Larry - Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Boots", player) , "Halloween Hill - Scaredy Cat": lambda state: state.has("Cat", player), "Halloween Hill - Silver Bullet": lambda state: state.has("Silver", player) and can_cleanse_crypts(state, player), "Halloween Hill - Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), "Halloween Hill - Sticky Shoes": lambda state: True, - "A Cabin4 - The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and can_enter_vampy(state, player), + "A Cabin Collector - The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and can_enter_vampy(state, player), "A Gloomy Cavern - The Rescue": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "A Cabin - Tree Trimming": lambda state: True, - "The Witch's Cabin - Witch Mushrooms": lambda state: state.has("Mushroom", player, 10), + "A Cabin Trees - Tree Trimming": lambda state: True, + "The Witch's Cabin Front - Witch Mushrooms": lambda state: state.has("Mushroom", player, 10), "Halloween Hill - Zombie Stomp": lambda state: can_cleanse_crypts(state, player) } for loc in multiworld.get_locations(player): From 0883679f835ddb731b2033b96b1e7fffec346984 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 7 Dec 2024 16:05:45 -0500 Subject: [PATCH 20/58] hey its generating --- worlds/loonyland/Entrances.py | 4 ++-- worlds/loonyland/Rules.py | 6 +++--- worlds/loonyland/__init__.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index deca05975b8b..c426f4acf262 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -164,8 +164,8 @@ def set_entrances(multiworld, world, player): #logical zone connections, cant be randomized - #EntranceData("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots")), - #EntranceData("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots")), + EntranceData("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + EntranceData("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", player)), EntranceData("Zombiton", "Halloween Hill", False, lambda state: True), #one way #EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index 79975e274fd0..f3d0f4b87e24 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -20,7 +20,7 @@ def have_all_bats(state: CollectionState, player: int) -> bool: def have_all_vamps(state: CollectionState, player: int) -> bool: - return state.has("Vampire Statue", player, 8) + return state.has("Vamp Statue", player, 8) def have_special_weapon_damage(state: CollectionState, player: int) -> bool: @@ -116,7 +116,7 @@ def set_rules(multiworld, world, player): "Underground Tunnel Top - Small Room": lambda state: True, "Swamp Gas Cavern Front - Scratch Wall": lambda state: state.has("Boots", player) and have_special_weapon_bullet(state, player), "Swamp Gas Cavern Front - Bat Mound": lambda state: state.has("Boots", player) and state.has("Bat Key", player), - "Swamp Gas Cavern Back- Stair room": lambda state: state.has("Boots", player), + "Swamp Gas Cavern Back - Stair room": lambda state: state.has("Boots", player), "Swamp Gas Cavern Front - Rock Prison": lambda state: state.has("Boots", player) and have_bombs(state, player), "A Tiny Cabin - Tiny Cabin": lambda state: state.has("Skull Key", player), "A Cabin Seer - Bedside ": lambda state: can_enter_zombiton(state, player), @@ -177,7 +177,7 @@ def set_rules(multiworld, world, player): #"A Hidey-Hole - Pebbles": lambda state: True, "Swampdog Lair - Entrance": lambda state: state.has("Boots", player), "Swampdog Lair - End": lambda state: state.has("Boots", player) and have_light_source(state, player) and state.has("Fertilizer", player), - "The Witch's Cabin Front - Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Daisy", player) and state.has("Mushroom", player, 10), + "The Witch's Cabin Front - Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), "A Cabin Larry - Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Boots", player) , "Halloween Hill - Scaredy Cat": lambda state: state.has("Cat", player), "Halloween Hill - Silver Bullet": lambda state: state.has("Silver", player) and can_cleanse_crypts(state, player), diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index c379e153f94d..10c77e50b466 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -81,11 +81,11 @@ def get_filler_item_name(self) -> str: return "A Cool Filler Item (No Satisfaction Guaranteed)" def set_rules(self): - set_rules(self.multiworld, self, self.player) - # Completion condition. self.multiworld.completion_condition[self.player] = lambda state: state.can_reach_location("The Evilizer - Save Halloween Hill", self.player) + set_rules(self.multiworld, self, self.player) + def fill_slot_data(self) -> Dict[str, Any]: return { From ea1e364b1a157a5a8a622a7d2a15d84277f348e4 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 7 Dec 2024 16:33:21 -0500 Subject: [PATCH 21/58] Should be working Name typos Win con event added --- worlds/loonyland/Locations.py | 4 ++-- worlds/loonyland/Rules.py | 3 ++- worlds/loonyland/__init__.py | 12 ++++++++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index cd2edb62acbb..a1679c8c9b94 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -83,8 +83,8 @@ class LoonylandLocationData(NamedTuple): "Pumpkin Door": LoonylandLocationData(58, LocationCategory.PICKUP, "The Wolf Den"), "Grow Room": LoonylandLocationData(59, LocationCategory.PICKUP, "The Wolf Den"), "The Three ombres": LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Caverns"), - "Left Vine": LoonylandLocationData(61, LocationCategory.PICKUP, "Under the Ravine"), - "Right Vine": LoonylandLocationData(62, LocationCategory.PICKUP, "Under the Ravine"), + "Left Vine": LoonylandLocationData(61, LocationCategory.PICKUP, "Under The Ravine"), + "Right Vine": LoonylandLocationData(62, LocationCategory.PICKUP, "Under The Ravine"), "M Pharoh bat Room": LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns Middle"), "E 2 blue Pharos": LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns Right"), "M GARGOYLE ROOM": LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns Middle"), diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index f3d0f4b87e24..f19791d67586 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -187,7 +187,8 @@ def set_rules(multiworld, world, player): "A Gloomy Cavern - The Rescue": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), "A Cabin Trees - Tree Trimming": lambda state: True, "The Witch's Cabin Front - Witch Mushrooms": lambda state: state.has("Mushroom", player, 10), - "Halloween Hill - Zombie Stomp": lambda state: can_cleanse_crypts(state, player) + "Halloween Hill - Zombie Stomp": lambda state: can_cleanse_crypts(state, player), + "The Evilizer - Save Halloween Hill": lambda state: True } for loc in multiworld.get_locations(player): if loc.name in access_rules: diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 10c77e50b466..d45c1c9b814f 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -1,6 +1,6 @@ from typing import List, Dict, Any -from BaseClasses import Region, Tutorial +from BaseClasses import Region, Tutorial, ItemClassification from worlds.AutoWorld import WebWorld, World from .Items import LoonylandItem, item_frequencies, loony_item_table from .Locations import LoonylandLocation, LoonylandLocationData, loonyland_location_table #, locked_locations @@ -46,6 +46,10 @@ def create_items(self) -> None: self.multiworld.itempool += item_pool + def create_event(self, event: str) -> LoonylandItem: + # while we are at it, we can also add a helper to create events + return LoonylandItem(event, ItemClassification.progression, None, self.player) + def create_regions(self) -> None: # Create regions. for region_name in loonyland_region_table: @@ -82,7 +86,11 @@ def get_filler_item_name(self) -> str: def set_rules(self): # Completion condition. - self.multiworld.completion_condition[self.player] = lambda state: state.can_reach_location("The Evilizer - Save Halloween Hill", self.player) + # self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) + final_loc = self.multiworld.get_location("The Evilizer - Save Halloween Hill", self.player) + final_loc.address = None + final_loc.place_locked_item(self.create_event("Victory")) + self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) set_rules(self.multiworld, self, self.player) From ac66ddec199bc9d2135de6a54b542e38bcaa0883 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 7 Dec 2024 16:59:11 -0500 Subject: [PATCH 22/58] fix tests --- worlds/loonyland/Entrances.py | 6 ++++++ worlds/loonyland/Options.py | 1 + worlds/loonyland/__init__.py | 8 +++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index c426f4acf262..c1efba61751d 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -24,6 +24,11 @@ def set_entrances(multiworld, world, player): loonyland_entrance_table: List[EntranceData] = [ #base EntranceData("Menu", "Halloween Hill", False, lambda state: True ), + EntranceData("Menu", "Bowling", False, lambda state: True), + EntranceData("Menu", "Survival", False, lambda state: True), + EntranceData("Menu", "Boss Bash", False, lambda state: True), + EntranceData("Menu", "Loony Ball", False, lambda state: True), + EntranceData("Menu", "Remix", False, lambda state: True), # loading zones, can be randomized EntranceData("Halloween Hill", "A Cabin Trees", True, lambda state: True ), @@ -157,6 +162,7 @@ def set_entrances(multiworld, world, player): EntranceData("Castle Vampy Roof NW", "Castle Vampy IV NW", True, lambda state: True), EntranceData("The Evilizer", "Halloween Hill", True, lambda state: True), EntranceData("The Heart Of Terror", "The Evilizer", True, lambda state: True), + EntranceData("The Heart Of Terror", "Empty Rooftop", True, lambda state: state.can_reach_location("The Evilizer - Save Halloween Hill", player)), EntranceData("A Hidey-Hole", "Halloween Hill", True, lambda state: True), EntranceData("Empty Rooftop", "Halloween Hill", True, lambda state: True), EntranceData("Swampdog Lair", "Halloween Hill", True, lambda state: True), diff --git a/worlds/loonyland/Options.py b/worlds/loonyland/Options.py index f6e23384eb6f..574a173c4799 100644 --- a/worlds/loonyland/Options.py +++ b/worlds/loonyland/Options.py @@ -3,6 +3,7 @@ from Options import Choice, PerGameCommonOptions class WinCondition(Choice): + """Sets Win Condition.""" display_name = "Win Condition" option_evilizer = 0 option_40badges = 1 diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index d45c1c9b814f..e042545e1c10 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -10,6 +10,8 @@ from .Rules import set_rules +loonyland_base_id: int = 2876900 + class LoonylandWebWorld(WebWorld): theme = "partyTime" @@ -31,7 +33,7 @@ class LoonylandWorld(World): web = LoonylandWebWorld() options: LoonylandOptions options_dataclass = LoonylandOptions - location_name_to_id = {name: data.id for name, data in loonyland_location_table.items()} + location_name_to_id = {name: data.id + loonyland_base_id for name, data in loonyland_location_table.items()} item_name_to_id = {name: data.id for name, data in loony_item_table.items()} def create_item(self, name: str) -> LoonylandItem: @@ -62,7 +64,7 @@ def create_regions(self) -> None: for region_name in loonyland_region_table: region = self.get_region(region_name) region.add_locations({ - location_name: location_data.id for location_name, location_data in loonyland_location_table.items() + location_name: location_data.id + loonyland_base_id for location_name, location_data in loonyland_location_table.items() if location_data.region == region_name # and location_data.can_create(self) }, LoonylandLocation) #region.add_exits() @@ -87,7 +89,7 @@ def get_filler_item_name(self) -> str: def set_rules(self): # Completion condition. # self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) - final_loc = self.multiworld.get_location("The Evilizer - Save Halloween Hill", self.player) + final_loc = self.get_location("The Evilizer - Save Halloween Hill") final_loc.address = None final_loc.place_locked_item(self.create_event("Victory")) self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) From f5a333fd685795746082f74f2752e5eb744a1d60 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 7 Dec 2024 17:24:10 -0500 Subject: [PATCH 23/58] move logic to regions and clean up rules file put zombie stomp into zombiton --- worlds/loonyland/Entrances.py | 37 ++++----- worlds/loonyland/Locations.py | 2 +- worlds/loonyland/Rules.py | 144 +++++++++++++++++----------------- 3 files changed, 92 insertions(+), 91 deletions(-) diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index c1efba61751d..71e660931985 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -42,25 +42,25 @@ def set_entrances(multiworld, world, player): EntranceData("Halloween Hill", "The Witch's Cabin Back", True, lambda state: True), EntranceData("Zombiton", "A Cabin Seer", True, lambda state: True), EntranceData("Zombiton", "Benny's Cocktails", True, lambda state: True), - EntranceData("Halloween Hill", "Dusty Crypt", True, lambda state: True), - EntranceData("Zombiton", "Musty Crypt", True, lambda state: True), + EntranceData("Halloween Hill", "Dusty Crypt", True, lambda state: have_light_source(state, player)), + EntranceData("Zombiton", "Musty Crypt", True, lambda state: have_light_source(state, player)), EntranceData("Zombiton", "A Messy Cabin", True, lambda state: True), - EntranceData("Halloween Hill", "Rusty Crypt", True, lambda state: True), + EntranceData("Halloween Hill", "Rusty Crypt", True, lambda state: have_light_source(state, player)), EntranceData("Halloween Hill", "Under The Lake", True, lambda state: have_light_source(state, player) and state.has("Orb", player, 4)), - EntranceData("Halloween Hill", "Haunted Tower", True, lambda state: True), - EntranceData("Rocky Cliffs", "Abandoned Mines", True, lambda state: True), + EntranceData("Halloween Hill", "Haunted Tower", True, lambda state: state.has("Ghost Potion", player)), + EntranceData("Rocky Cliffs", "Abandoned Mines", True, lambda state: have_light_source(state, player)), EntranceData("Rocky Cliffs", "The Shrine Of Bombulus", True, lambda state: True), - EntranceData("Rocky Cliffs", "A Gloomy Cavern", True, lambda state: True), - EntranceData("Halloween Hill", "Happy Stick Woods", True, lambda state: True), + EntranceData("Rocky Cliffs", "A Gloomy Cavern", True, lambda state: have_light_source(state, player)), + EntranceData("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", player)), EntranceData("Zombiton", "A Cabin Larry", True, lambda state: True), - EntranceData("Halloween Hill", "The Wolf Den", True, lambda state: True), - EntranceData("Rocky Cliffs", "Upper Creepy Caverns", True, lambda state: state.has("Bombs", player)), - EntranceData("Rocky Cliffs", "Creepy Caverns Left", True, lambda state: True), + EntranceData("Halloween Hill", "The Wolf Den", True, lambda state: state.has("Silver Sling", player) and have_light_source(state, player)), + EntranceData("Rocky Cliffs", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player) and state.has("Bombs", player)), + EntranceData("Rocky Cliffs", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), EntranceData("Vampy Land", "Castle Vampy", True, lambda state: True), EntranceData("Halloween Hill", "Cabin In The Woods", True, lambda state: True), EntranceData("Halloween Hill", "A Cabin Collector", True, lambda state: True), EntranceData("Halloween Hill", "A Hidey-Hole", True, lambda state: True), - EntranceData("Vampy Land", "Creepy Caverns Right", True, lambda state: True), + EntranceData("Vampy Land", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), EntranceData("Halloween Hill", "Swampdog Lair", True, lambda state: True), EntranceData("A Cabin Trees", "Halloween Hill", True,lambda state: True), EntranceData("The Witch's Cabin Front", "Halloween Hill", True, lambda state: True), @@ -87,7 +87,8 @@ def set_entrances(multiworld, world, player): EntranceData("Frankenjulie's Laboratory", "Halloween Hill", True, lambda state: True), EntranceData("Haunted Tower", "Halloween Hill", True, lambda state: True), EntranceData("Haunted Tower", "Haunted Tower, Floor 2", True, lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower", "Haunted Basement", True, lambda state: state.has("Bat Key", player) and + EntranceData("Haunted Tower", "Haunted Basement", True, lambda state: have_light_source(state, player) and + state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), EntranceData("Haunted Tower, Floor 2", "Haunted Tower", True, lambda state: True), @@ -105,13 +106,13 @@ def set_entrances(multiworld, world, player): EntranceData("The Wolf Den", "Larry's Lair", True, lambda state: state.has("Silver Sling", player)), EntranceData("A Cabin Larry", "Zombiton", True, lambda state: True), EntranceData("Upper Creepy Caverns", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), - EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True, lambda state: True), - EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True, lambda state: True), - EntranceData("Under The Ravine", "Creepy Caverns Middle", True, lambda state: True), - EntranceData("Under The Ravine", "Creepy Caverns Right", True, lambda state: True), + EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), + EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), + EntranceData("Under The Ravine", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), + EntranceData("Under The Ravine", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), EntranceData("Creepy Caverns Left", "Rocky Cliffs", True, lambda state: True), - EntranceData("Creepy Caverns Left", "Upper Creepy Caverns", True, lambda state: True), - EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True, lambda state: True), + EntranceData("Creepy Caverns Left", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), + EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), EntranceData("Creepy Caverns Middle", "Under The Ravine", True, lambda state: True), EntranceData("Creepy Caverns Right", "Under The Ravine", True, lambda state: True), EntranceData("Creepy Caverns Right", "Vampy Land", True, lambda state: True), diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index a1679c8c9b94..a72bed685267 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -127,7 +127,7 @@ class LoonylandLocationData(NamedTuple): "The Rescue": LoonylandLocationData(102, LocationCategory.QUEST, "A Gloomy Cavern"), "Tree Trimming": LoonylandLocationData(103, LocationCategory.QUEST, "A Cabin Trees"), "Witch Mushrooms": LoonylandLocationData(104, LocationCategory.QUEST, "The Witch's Cabin Front"), - "Zombie Stomp": LoonylandLocationData(105, LocationCategory.QUEST, "Halloween Hill") + "Zombie Stomp": LoonylandLocationData(105, LocationCategory.QUEST, "Zombiton") #todo the 40 badge locations } diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index f19791d67586..7524935d2660 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -85,19 +85,19 @@ def set_rules(multiworld, world, player): access_rules = { "Slurpy Swamp Mud - Swamp Mud Path": lambda state: state.has("Boots", player), #"Halloween Hill - Bog Beast Home": lambda state: True, - "Rocky Cliffs - Rocky Cliffs below Upper Caverns": lambda state: can_enter_rocky_cliffs(state, player), + #"Rocky Cliffs - Rocky Cliffs below Upper Caverns": lambda state: True, "Slurpy Swamp Mud - Sapling Shrine": lambda state: state.has("Boots", player), #"Halloween Hill - Terror Glade": lambda state: True, "Halloween Hill - Rocky Cliffs Vine": lambda state: state.has("Fertilizer", player), - "Rocky Cliffs - Rocky Cliffs Grand Pharoh": lambda state: can_enter_rocky_cliffs(state, player), - "Rocky Cliffs - Rocky Cliffs Rock Corner": lambda state: can_enter_rocky_cliffs(state, player) and have_bombs(state, player), + #"Rocky Cliffs - Rocky Cliffs Grand Pharoh": lambda state: True, + "Rocky Cliffs - Rocky Cliffs Rock Corner": lambda state: have_bombs(state, player), #"Halloween Hill - Mushroom outside town": lambda state: True, #"Halloween Hill - North of UG Passage": lambda state: True, #"Halloween Hill - Top left mushroom spot": lambda state: True, #"Halloween Hill - NE of UG Passage": lambda state: True, #"Halloween Hill - East Woods": lambda state: True, - "Rocky Cliffs - Rocky Cliffs Ledge": lambda state: can_enter_rocky_cliffs(state, player), - "Rocky Cliffs - Rocky Cliffs Peak": lambda state: can_enter_rocky_cliffs(state, player), + #"Rocky Cliffs - Rocky Cliffs Ledge": lambda state: True, + #"Rocky Cliffs - Rocky Cliffs Peak": lambda state: True, #"Halloween Hill - Cat Tree": lambda state: True, "The Witch's Cabin Front - Bedroom": lambda state: have_light_source(state, player), #"The Witch's Cabin Back - Backroom": lambda state: True, @@ -106,73 +106,73 @@ def set_rules(multiworld, world, player): #"The Bog Pit - Post Room": lambda state: True, #"The Bog Pit - Window Drip": lambda state: True, #"The Bog Pit - Green room": lambda state: True, - "The Bog Pit - Arena": lambda state: True, - "The Bog Pit - Kill Wall": lambda state: True, + #"The Bog Pit - Arena": lambda state: True, + #"The Bog Pit - Kill Wall": lambda state: True, "Underground Tunnel Top - Swampdog Door": lambda state: state.has("Pumpkin Key", player), "Underground Tunnel Top - Scribble Wall": lambda state: have_special_weapon_bullet(state, player), - "Underground Tunnel Top - Tiny Passage": lambda state: True, - "Underground Tunnel Top - fire frogs": lambda state: True, + #"Underground Tunnel Top - Tiny Passage": lambda state: True, + #"Underground Tunnel Top - fire frogs": lambda state: True, "Underground Tunnel Mud - Torch Island": lambda state: state.has("Boots", player), - "Underground Tunnel Top - Small Room": lambda state: True, - "Swamp Gas Cavern Front - Scratch Wall": lambda state: state.has("Boots", player) and have_special_weapon_bullet(state, player), - "Swamp Gas Cavern Front - Bat Mound": lambda state: state.has("Boots", player) and state.has("Bat Key", player), - "Swamp Gas Cavern Back - Stair room": lambda state: state.has("Boots", player), - "Swamp Gas Cavern Front - Rock Prison": lambda state: state.has("Boots", player) and have_bombs(state, player), - "A Tiny Cabin - Tiny Cabin": lambda state: state.has("Skull Key", player), - "A Cabin Seer - Bedside ": lambda state: can_enter_zombiton(state, player), - "Dusty Crypt - Pumpkin Door": lambda state: have_light_source(state, player) and state.has("Pumpkin Key", player), - "Dusty Crypt - Maze": lambda state: have_light_source(state, player), - "Musty Crypt - Big Closed Room": lambda state: have_light_source(state, player) and can_enter_zombiton(state, player) and have_special_weapon_bullet(state, player), - "Rusty Crypt - Spike Vine": lambda state: have_light_source(state, player) and state.has("Fertilizer", player), - "Rusty Crypt - Boulders": lambda state: have_light_source(state, player), - "A Messy Cabin - Barrel Mess": lambda state: can_enter_zombiton(state, player), - "Under The Lake - Lightning Rod Secret": lambda state: have_light_source(state, player) and have_all_orbs(state, player), - "Under The Lake - Bat Door": lambda state: have_light_source(state, player) and have_all_orbs(state, player) and state.has("Bat Key", player), - "Deeper Under The Lake - SE corner": lambda state: have_light_source(state, player) and have_all_orbs(state, player), - "Deeper Under The Lake - Rhombus": lambda state: have_light_source(state, player) and have_all_orbs(state, player), - "Frankenjulie's Laboratory - Boss Reward": lambda state: have_light_source(state, player) and have_all_orbs(state, player), + #"Underground Tunnel Top - Small Room": lambda state: True, + "Swamp Gas Cavern Front - Scratch Wall": lambda state: have_special_weapon_bullet(state, player), + "Swamp Gas Cavern Front - Bat Mound": lambda state: state.has("Bat Key", player), + #"Swamp Gas Cavern Back - Stair room": lambda state: True, + "Swamp Gas Cavern Front - Rock Prison": lambda state: have_bombs(state, player), + #"A Tiny Cabin - Tiny Cabin": lambda state: True, + #"A Cabin Seer - Bedside ": lambda state: True + "Dusty Crypt - Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + #"Dusty Crypt - Maze": lambda state: True, + "Musty Crypt - Big Closed Room": lambda state: have_special_weapon_bullet(state, player), + "Rusty Crypt - Spike Vine": lambda state: state.has("Fertilizer", player), + #"Rusty Crypt - Boulders": lambda state: True, + #"A Messy Cabin - Barrel Mess": lambda state: True, + #"Under The Lake - Lightning Rod Secret": True, + "Under The Lake - Bat Door": lambda state: state.has("Bat Key", player), + #"Deeper Under The Lake - SE corner": lambda state: True, + #"Deeper Under The Lake - Rhombus": lambda state: True, + #"Frankenjulie's Laboratory - Boss Reward": lambda state: True, "Haunted Tower - Barracks": lambda state: state.has("Ghost Potion", player) and state.has("Bat Key", player), "Haunted Tower, Floor 2 - Top Left": lambda state: state.has("Ghost Potion", player), - "Haunted Tower Roof - Boss Reward": lambda state: state.has("Ghost Potion", player), - "Haunted Basement - DoorDoorDoorDoorDoorDoor": lambda state: state.has("Ghost Potion", player) and have_light_source(state, player) and state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), - "Abandoned Mines - Shaft": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "The Shrine Of Bombulus - Bombulus": lambda state: can_enter_rocky_cliffs(state, player), - "A Gloomy Cavern - Lockpick": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "Happy Stick Woods - Happy Stick Hidden": lambda state: state.has("Happy Stick", player), - "Happy Stick Woods - Happy Stick Reward": lambda state: state.has("Happy Stick", player), - "The Wolf Den - Wolf Top Left": lambda state: have_light_source(state, player) and state.has("Silver Sling", player), - "The Wolf Den - Pumpkin Door": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Pumpkin Key", player), - "The Wolf Den - Grow Room": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Fertilizer", player), - "Upper Creepy Caverns - The Three ombres": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "Under the Ravine - Left Vine": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player) and state.has("Fertilizer", player), - "Under the Ravine - Right Vine": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player) and state.has("Fertilizer", player), - "Creepy Caverns Middle - M Pharoh bat Room": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player) and state.has("Bat Key", player), - "Creepy Caverns Right - E 2 blue Pharos": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "Creepy Caverns Middle - M GARGOYLE ROOM": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "Castle Vampy - Vampire Guard": lambda state: can_enter_vampy(state, player), - "Castle Vampy - maze top left": lambda state: can_enter_vampy(state, player), - "Castle Vampy - Top Right Gauntlet": lambda state: can_enter_vampy(state, player), - "Castle Vampy - Bat Closet": lambda state: can_enter_vampy(state, player), - "Castle Vampy II Main - Candle Room": lambda state: can_enter_vampy_ii(state, player), - "Castle Vampy II Main - Top Right Top": lambda state: can_enter_vampy_ii(state, player), - "Castle Vampy II Main - Bottom Right Middle": lambda state: can_enter_vampy_ii(state, player), - "Castle Vampy II Main - Bat room": lambda state: can_enter_vampy_ii(state, player) and have_special_weapon_bullet(state, player), - "Cabin In The Woods - Gold Skull": lambda state: True, - "Castle Vampy III Main - Middle": lambda state: can_enter_vampy_iii(state, player), - "Castle Vampy III Main - Behind the Pews": lambda state: can_enter_vampy_iii(state, player), - "Castle Vampy III Main - AMBUSH!": lambda state: can_enter_vampy_iii(state, player), - "Castle Vampy III Main - Halloween": lambda state: can_enter_vampy_iii(state, player), - "Castle Vampy III Main - So many bats": lambda state: can_enter_vampy_iii(state, player), - "Castle Vampy IV Main - Right Path": lambda state: can_enter_vampy_iv(state, player), - "Castle Vampy IV Main - Left Path": lambda state: can_enter_vampy_iv(state, player), - "Castle Vampy IV Main - Ballroom Right": lambda state: can_enter_vampy_iv(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), - "Castle Vampy IV Main - Right Secret Wall": lambda state: can_enter_vampy_iv(state, player), - "Castle Vampy IV Main - Ballroom Left": lambda state: can_enter_vampy_iv(state, player) and state.has("Ghost Potion", player) and state.has("Silver Sling", player), - "Castle Vampy Roof NW - Gutsy the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player) and have_special_weapon_damage(state, player), - "Castle Vampy Roof NE - Stoney the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), - "Castle Vampy Roof SW - Drippy the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), - "Castle Vampy Roof SE - Toasty the Elder": lambda state: can_enter_vampy(state, player) and have_all_bats(state, player), - "The Heart Of Terror - Bonkula": lambda state: can_enter_vampy_iv(state, player) and have_all_vamps(state, player), + #"Haunted Tower Roof - Boss Reward": lambda state: True, + "Haunted Basement - DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), + #"Abandoned Mines - Shaft": lambda state: True, + #"The Shrine Of Bombulus - Bombulus": lambda state: True, + #"A Gloomy Cavern - Lockpick": lambda state: True, + #"Happy Stick Woods - Happy Stick Hidden": lambda state: True, + #"Happy Stick Woods - Happy Stick Reward": lambda state: True, + #"The Wolf Den - Wolf Top Left": lambda state: True, + "The Wolf Den - Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "The Wolf Den - Grow Room": lambda state: state.has("Fertilizer", player), + "Upper Creepy Caverns - The Three ombres": lambda state: True, + "Under the Ravine - Left Vine": lambda state: state.has("Fertilizer", player), + "Under the Ravine - Right Vine": lambda state: state.has("Fertilizer", player), + "Creepy Caverns Middle - M Pharoh bat Room": lambda state: state.has("Bat Key", player), + #"Creepy Caverns Right - E 2 blue Pharos": lambda state: True, + #"Creepy Caverns Middle - M GARGOYLE ROOM": lambda state: True, + #"Castle Vampy - Vampire Guard": lambda state: True, + #"Castle Vampy - maze top left": lambda state: True, + #"Castle Vampy - Top Right Gauntlet": lambda state: True, + #"Castle Vampy - Bat Closet": lambda state: True, + #"Castle Vampy II Main - Candle Room": lambda state: True, + #"Castle Vampy II Main - Top Right Top": lambda state: True, + #"Castle Vampy II Main - Bottom Right Middle": lambda state: True, + #"Castle Vampy II Main - Bat room": lambda state: True, + #"Cabin In The Woods - Gold Skull": lambda state: True, + #"Castle Vampy III Main - Middle": lambda state: True, + #"Castle Vampy III Main - Behind the Pews": lambda state: True, + #"Castle Vampy III Main - AMBUSH!": lambda state: True, + #"Castle Vampy III Main - Halloween": lambda state: True, + #"Castle Vampy III Main - So many bats": lambda state: True, + #"Castle Vampy IV Main - Right Path": lambda state: True, + #"Castle Vampy IV Main - Left Path": lambda state: True, + "Castle Vampy IV Main - Ballroom Right": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), + #"Castle Vampy IV Main - Right Secret Wall": lambda state: True, + "Castle Vampy IV Main - Ballroom Left": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Castle Vampy Roof NW - Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), + #"Castle Vampy Roof NE - Stoney the Elder": lambda state: True, + #"Castle Vampy Roof SW - Drippy the Elder": lambda state: True, + #"Castle Vampy Roof SE - Toasty the Elder": lambda state: True, + #"The Heart Of Terror - Bonkula": lambda state: True, "A Hidey-Hole - Bat Door": lambda state: state.has("Bat Key", player), #"A Hidey-Hole - Pebbles": lambda state: True, "Swampdog Lair - Entrance": lambda state: state.has("Boots", player), @@ -182,13 +182,13 @@ def set_rules(multiworld, world, player): "Halloween Hill - Scaredy Cat": lambda state: state.has("Cat", player), "Halloween Hill - Silver Bullet": lambda state: state.has("Silver", player) and can_cleanse_crypts(state, player), "Halloween Hill - Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), - "Halloween Hill - Sticky Shoes": lambda state: True, + #"Halloween Hill - Sticky Shoes": lambda state: True, "A Cabin Collector - The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and can_enter_vampy(state, player), - "A Gloomy Cavern - The Rescue": lambda state: have_light_source(state, player) and can_enter_rocky_cliffs(state, player), - "A Cabin Trees - Tree Trimming": lambda state: True, + #"A Gloomy Cavern - The Rescue": lambda state: True, + #"A Cabin Trees - Tree Trimming": lambda state: True, "The Witch's Cabin Front - Witch Mushrooms": lambda state: state.has("Mushroom", player, 10), - "Halloween Hill - Zombie Stomp": lambda state: can_cleanse_crypts(state, player), - "The Evilizer - Save Halloween Hill": lambda state: True + "Zombiton - Zombie Stomp": lambda state: can_cleanse_crypts(state, player), + #"The Evilizer - Save Halloween Hill": lambda state: True } for loc in multiworld.get_locations(player): if loc.name in access_rules: From bd926f35088e2f3b02af1057e1fd348fd9ff6b5f Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Wed, 11 Dec 2024 10:38:50 -0500 Subject: [PATCH 24/58] Renaming zones, starting on extra subregions for ER --- worlds/loonyland/Entrances.py | 472 ++++++++++++++++++++++------------ worlds/loonyland/Locations.py | 215 ++++++++-------- worlds/loonyland/Regions.py | 32 ++- worlds/loonyland/Rules.py | 222 ++++++++-------- worlds/loonyland/__init__.py | 2 +- 5 files changed, 561 insertions(+), 382 deletions(-) diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index 71e660931985..a62362f065f7 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -13,17 +13,18 @@ class EntranceData(NamedTuple): source_region: str target_region: str is_real_loading_zone: bool - #rule: typing.Callable[[player, state], bool] + # rule: typing.Callable[[player, state], bool] rule: CollectionRule + def have_light_source(state: CollectionState, player: int) -> bool: return state.has("Lantern", player) or (state.has("Stick", player) and state.has("Boots", player)) -def set_entrances(multiworld, world, player): +def set_entrances(multiworld, world, player): loonyland_entrance_table: List[EntranceData] = [ - #base - EntranceData("Menu", "Halloween Hill", False, lambda state: True ), + # base + EntranceData("Menu", "Halloween Hill", False, lambda state: True), EntranceData("Menu", "Bowling", False, lambda state: True), EntranceData("Menu", "Survival", False, lambda state: True), EntranceData("Menu", "Boss Bash", False, lambda state: True), @@ -31,168 +32,317 @@ def set_entrances(multiworld, world, player): EntranceData("Menu", "Remix", False, lambda state: True), # loading zones, can be randomized - EntranceData("Halloween Hill", "A Cabin Trees", True, lambda state: True ), - EntranceData("Halloween Hill", "The Witch's Cabin Front", True, lambda state: True ), - EntranceData("Halloween Hill", "Bonita's Cabin", True, lambda state: True ), - EntranceData("Halloween Hill", "Underground Tunnel Top", True, lambda state: True ), - EntranceData("Halloween Hill", "The Bog Pit", True, lambda state: True ), - EntranceData("Slurpy Swamp Mud", "Swamp Gas Cavern Front", True, lambda state: True ), - EntranceData("Slurpy Swamp Mud", "Swamp Gas Cavern Back", True, lambda state: True ), + EntranceData("Halloween Hill", "A Cabin Trees", True, lambda state: True), + EntranceData("Halloween Hill", "The Witch's Cabin Front", True, lambda state: True), + EntranceData("Halloween Hill", "Bonita's Cabin", True, lambda state: True), + EntranceData("Halloween Hill", "Underground Tunnel Top", True, lambda state: True), + EntranceData("Halloween Hill", "The Bog Pit", True, lambda state: True), + EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False, lambda state: True), + EntranceData("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern Front", True, lambda state: True), + EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False, lambda state: True), + EntranceData("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True, lambda state: True), EntranceData("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), EntranceData("Halloween Hill", "The Witch's Cabin Back", True, lambda state: True), EntranceData("Zombiton", "A Cabin Seer", True, lambda state: True), EntranceData("Zombiton", "Benny's Cocktails", True, lambda state: True), - EntranceData("Halloween Hill", "Dusty Crypt", True, lambda state: have_light_source(state, player)), - EntranceData("Zombiton", "Musty Crypt", True, lambda state: have_light_source(state, player)), + EntranceData("Halloween Hill", "Dusty Crypt Entrance", True, lambda state: True), + EntranceData("Zombiton", "Musty Crypt Entrance", True, lambda state: True), EntranceData("Zombiton", "A Messy Cabin", True, lambda state: True), - EntranceData("Halloween Hill", "Rusty Crypt", True, lambda state: have_light_source(state, player)), - EntranceData("Halloween Hill", "Under The Lake", True, lambda state: have_light_source(state, player) and state.has("Orb", player, 4)), + EntranceData("Halloween Hill", "Rusty Crypt Entrance", True, lambda state: True), + EntranceData("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), EntranceData("Halloween Hill", "Haunted Tower", True, lambda state: state.has("Ghost Potion", player)), - EntranceData("Rocky Cliffs", "Abandoned Mines", True, lambda state: have_light_source(state, player)), - EntranceData("Rocky Cliffs", "The Shrine Of Bombulus", True, lambda state: True), - EntranceData("Rocky Cliffs", "A Gloomy Cavern", True, lambda state: have_light_source(state, player)), - EntranceData("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", player)), - EntranceData("Zombiton", "A Cabin Larry", True, lambda state: True), - EntranceData("Halloween Hill", "The Wolf Den", True, lambda state: state.has("Silver Sling", player) and have_light_source(state, player)), - EntranceData("Rocky Cliffs", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player) and state.has("Bombs", player)), - EntranceData("Rocky Cliffs", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), - EntranceData("Vampy Land", "Castle Vampy", True, lambda state: True), - EntranceData("Halloween Hill", "Cabin In The Woods", True, lambda state: True), - EntranceData("Halloween Hill", "A Cabin Collector", True, lambda state: True), - EntranceData("Halloween Hill", "A Hidey-Hole", True, lambda state: True), - EntranceData("Vampy Land", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), - EntranceData("Halloween Hill", "Swampdog Lair", True, lambda state: True), - EntranceData("A Cabin Trees", "Halloween Hill", True,lambda state: True), - EntranceData("The Witch's Cabin Front", "Halloween Hill", True, lambda state: True), - EntranceData("The Witch's Cabin Back", "Halloween Hill", True, lambda state: True), - EntranceData("Bonita's Cabin", "Halloween Hill", True, lambda state: True), - EntranceData("The Bog Pit", "Halloween Hill", True, lambda state: have_light_source(state, player)), - EntranceData("Underground Tunnel Top", "Halloween Hill", True, lambda state: True), - EntranceData("Underground Tunnel Zombie", "Benny's Cocktails", True, lambda state: True), - EntranceData("Swamp Gas Cavern Front", "Slurpy Swamp Mud", True, lambda state: state.has("Boots")), - EntranceData("Swamp Gas Cavern Back", "Slurpy Swamp Mud", True, lambda state: state.has("Boots")), - EntranceData("A Tiny Cabin", "Halloween Hill", True, lambda state: True), - EntranceData("A Cabin Seer", "Zombiton", True, lambda state: True), - EntranceData("Benny's Cocktails", "Zombiton", True,lambda state: True), - EntranceData("Benny's Cocktails", "Underground Tunnel Zombie", True, lambda state: True), - EntranceData("Dusty Crypt", "Halloween Hill", True, lambda state: True), - EntranceData("Musty Crypt", "Zombiton", True, lambda state: True), - EntranceData("Rusty Crypt", "Halloween Hill", True, lambda state: True), - EntranceData("A Messy Cabin", "Zombiton", True, lambda state: True), - EntranceData("Under The Lake", "Halloween Hill", True, lambda state: True), - EntranceData("Under The Lake", "Deeper Under The Lake", True, lambda state: True), - EntranceData("Deeper Under The Lake", "Under The Lake", True, lambda state: True), - EntranceData("Deeper Under The Lake", "Frankenjulie's Laboratory", True, lambda state: True), - EntranceData("Frankenjulie's Laboratory", "Deeper Under The Lake", True, lambda state: True), - EntranceData("Frankenjulie's Laboratory", "Halloween Hill", True, lambda state: True), - EntranceData("Haunted Tower", "Halloween Hill", True, lambda state: True), - EntranceData("Haunted Tower", "Haunted Tower, Floor 2", True, lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower", "Haunted Basement", True, lambda state: have_light_source(state, player) and - state.has("Bat Key", player) and - state.has("Pumpkin Key", player) and - state.has("Skull Key", player)), - EntranceData("Haunted Tower, Floor 2", "Haunted Tower", True, lambda state: True), - EntranceData("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True, lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower, Floor 3", "Haunted Tower, Floor 2", True, lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower, Floor 3", "Haunted Tower Roof", True, lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower Roof", "Halloween Hill", True, lambda state: True), - EntranceData("Haunted Tower Roof", "Haunted Tower, Floor 3", True, lambda state: True), - EntranceData("Haunted Basement", "Haunted Tower", True, lambda state: True), - EntranceData("Abandoned Mines", "Rocky Cliffs", True, lambda state: True), - EntranceData("The Shrine Of Bombulus", "Rocky Cliffs", True, lambda state: True), - EntranceData("A Gloomy Cavern", "Rocky Cliffs", True, lambda state: True), - EntranceData("Happy Stick Woods", "Halloween Hill", True, lambda state: True), - EntranceData("The Wolf Den", "Halloween Hill", True, lambda state: True), - EntranceData("The Wolf Den", "Larry's Lair", True, lambda state: state.has("Silver Sling", player)), - EntranceData("A Cabin Larry", "Zombiton", True, lambda state: True), - EntranceData("Upper Creepy Caverns", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), - EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), - EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), - EntranceData("Under The Ravine", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), - EntranceData("Under The Ravine", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), - EntranceData("Creepy Caverns Left", "Rocky Cliffs", True, lambda state: True), - EntranceData("Creepy Caverns Left", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), - EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), - EntranceData("Creepy Caverns Middle", "Under The Ravine", True, lambda state: True), - EntranceData("Creepy Caverns Right", "Under The Ravine", True, lambda state: True), - EntranceData("Creepy Caverns Right", "Vampy Land", True, lambda state: True), - EntranceData("Castle Vampy", "Halloween Hill", True, lambda state: True), - EntranceData("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), - EntranceData("Castle Vampy Skull Jail", "Castle Vampy II Main", True, lambda state: state.has("Skull Key", player)), - EntranceData("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", player, 4)), - EntranceData("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", player,4)), - EntranceData("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", player,4)), - EntranceData("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", player,4)), - EntranceData("Castle Vampy II Main", "Castle Vampy Skull Jail", True, lambda state: True), - EntranceData("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, lambda state: state.has("Bat Key", player)), - EntranceData("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, lambda state: state.has("Bat Key", player)), - EntranceData("Castle Vampy II NE", "Castle Vampy", True, lambda state: True), - EntranceData("Castle Vampy II NE", "Castle Vampy III NE", True, lambda state: True), - EntranceData("Castle Vampy II SE", "Castle Vampy", True, lambda state: True), - EntranceData("Castle Vampy II SE", "Castle Vampy III SE", True, lambda state: True), - EntranceData("Castle Vampy II SW", "Castle Vampy", True, lambda state: True), - EntranceData("Castle Vampy II SW", "Castle Vampy III SW", True, lambda state: True), - EntranceData("Castle Vampy II NW", "Castle Vampy", True, lambda state: True), - EntranceData("Castle Vampy II NW", "Castle Vampy III NW", True, lambda state: True), - EntranceData("Cabin In The Woods", "Halloween Hill", True, lambda state: True), - EntranceData("Castle Vampy III Main", "Castle Vampy II Bat Jail", True, lambda state: True), - EntranceData("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", True, lambda state: state.has("Pumpkin Key", player)), - EntranceData("Castle Vampy III Pumpkin Jail", "Castle Vampy IV Main", True, lambda state: state.has("Pumpkin Key", player)), - EntranceData("Castle Vampy III NE", "Castle Vampy II NE", True, lambda state: True), - EntranceData("Castle Vampy III NE", "Castle Vampy IV NE", True, lambda state: True), - EntranceData("Castle Vampy III SE", "Castle Vampy II SE", True, lambda state: True), - EntranceData("Castle Vampy III SE", "Castle Vampy IV SE", True, lambda state: True), - EntranceData("Castle Vampy III SW", "Castle Vampy II SW", True, lambda state: True), - EntranceData("Castle Vampy III SW", "Castle Vampy IV SW", True, lambda state: True), - EntranceData("Castle Vampy III NW", "Castle Vampy II NW", True, lambda state: True), - EntranceData("Castle Vampy III NW", "Castle Vampy IV NW", True, lambda state: True), - EntranceData("Castle Vampy IV Main", "Castle Vampy III Pumpkin Jail", True, lambda state: True), - EntranceData("Castle Vampy IV Main", "The Heart Of Terror", True, lambda state: state.has("Vamp Statue", player, 8)), - EntranceData("Castle Vampy IV NE", "Castle Vampy III NE", True, lambda state: True), - EntranceData("Castle Vampy IV NE", "Castle Vampy Roof NE", True, lambda state: True), - EntranceData("Castle Vampy IV SE", "Castle Vampy III SE", True, lambda state: True), - EntranceData("Castle Vampy IV SE", "Castle Vampy Roof SE", True, lambda state: True), - EntranceData("Castle Vampy IV SW", "Castle Vampy III SW", True, lambda state: True), - EntranceData("Castle Vampy IV SW", "Castle Vampy Roof SW", True, lambda state: True), - EntranceData("Castle Vampy IV NW", "Castle Vampy III NW", True, lambda state: True), - EntranceData("Castle Vampy IV NW", "Castle Vampy Roof NW", True, lambda state: True), - EntranceData("A Cabin Collector", "Halloween Hill", True, lambda state: True), - EntranceData("Castle Vampy Roof NE", "Castle Vampy IV NE", True, lambda state: True), - EntranceData("Castle Vampy Roof SE", "Castle Vampy IV SE", True, lambda state: True), - EntranceData("Castle Vampy Roof SW", "Castle Vampy IV SW", True, lambda state: True), - EntranceData("Castle Vampy Roof NW", "Castle Vampy IV NW", True, lambda state: True), - EntranceData("The Evilizer", "Halloween Hill", True, lambda state: True), - EntranceData("The Heart Of Terror", "The Evilizer", True, lambda state: True), - EntranceData("The Heart Of Terror", "Empty Rooftop", True, lambda state: state.can_reach_location("The Evilizer - Save Halloween Hill", player)), - EntranceData("A Hidey-Hole", "Halloween Hill", True, lambda state: True), - EntranceData("Empty Rooftop", "Halloween Hill", True, lambda state: True), - EntranceData("Swampdog Lair", "Halloween Hill", True, lambda state: True), - EntranceData("Larry's Lair", "Halloween Hill", True, lambda state: True), - - #logical zone connections, cant be randomized - - EntranceData("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), - EntranceData("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", player)), - - EntranceData("Zombiton", "Halloween Hill", False, lambda state: True), #one way - #EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges - - EntranceData("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player)), - EntranceData("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player)), - - EntranceData("Vampy Land", "Halloween Hill", False, lambda state: True), #one way - #EntranceData("Halloween Hill", "Vampy Land", False), TODO possible with badges/rando - - EntranceData("Underground Tunnel Top", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), - EntranceData("Underground Tunnel Mud", "Underground Tunnel Top", False, lambda state: state.has("Boots", player)), - EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player)), #one way - #EntranceData("Underground Tunnel Zombie", "Underground Tunnel Mud", False), # TODO possible with badges/bridge rando - - EntranceData("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), # one way - #EntranceData("Swamp Gas Cavern Back", "Swamp Gas Cavern Front", False), # TODO possible with badges - - - #probably need these with molecular dispersion + EntranceData("Rocky Cliffs", "Abandoned Mines Entrance", True, lambda state: True), + EntranceData("Rocky Cliffs", "The Shrine Of Bombulus", True, lambda state: True), + EntranceData("Rocky Cliffs", "A Gloomy Cavern Entrance", True, + lambda state: have_light_source(state, player)), + EntranceData("Halloween Hill", "Happy Stick Woods", True, + lambda state: state.has("Happy Stick", player)), + EntranceData("Zombiton", "A Cabin Larry", True, lambda state: True), + EntranceData("Halloween Hill", "The Wolf Den Entrance", True, lambda state: True), + EntranceData("Rocky Cliffs", "Upper Creepy Caverns", True, + lambda state: have_light_source(state, player) and state.has("Bombs", player)), + EntranceData("Rocky Cliffs", "Creepy Caverns Left", True, + lambda state: have_light_source(state, player)), + EntranceData("Vampy Land", "Castle Vampy", True, lambda state: True), + EntranceData("Halloween Hill", "Cabin In The Woods", True, lambda state: True), + EntranceData("Halloween Hill", "A Cabin Collector", True, lambda state: True), + EntranceData("Halloween Hill", "A Hidey-Hole", True, lambda state: True), + EntranceData("Vampy Land", "Creepy Caverns Right", True, + lambda state: have_light_source(state, player)), + EntranceData("Halloween Hill", "Swampdog Lair", True, lambda state: True), + EntranceData("A Cabin Trees", "Halloween Hill", True, lambda state: True), + EntranceData("The Witch's Cabin Front", "Halloween Hill", True, lambda state: True), + EntranceData("The Witch's Cabin Back", "Halloween Hill", True, lambda state: True), + EntranceData("Bonita's Cabin", "Halloween Hill", True, lambda state: True), + EntranceData("The Bog Pit", "Halloween Hill", True, + lambda state: have_light_source(state, player)), + EntranceData("Underground Tunnel Top", "Halloween Hill", True, lambda state: True), + EntranceData("Underground Tunnel Zombie", "Benny's Cocktails", True, lambda state: True), + EntranceData("Swamp Gas Cavern Front", "Slurpy Swamp Mud North Warp", True, lambda state: True), + EntranceData("Swamp Gas Cavern Back", "Slurpy Swamp Mud East Warp", True, lambda state: True), + EntranceData("A Tiny Cabin", "Halloween Hill", True, lambda state: True), + EntranceData("A Cabin Seer", "Zombiton", True, lambda state: True), + EntranceData("Benny's Cocktails", "Zombiton", True, lambda state: True), + EntranceData("Benny's Cocktails", "Underground Tunnel Zombie", True, + lambda state: True), + EntranceData("Dusty Crypt", "Dusty Crypt Entrance", True, + lambda state: True), + EntranceData("Dusty Crypt Entrance", "Dusty Crypt", True, + lambda state: have_light_source(state, player)), + EntranceData("Dusty Crypt Entrance", "Halloween Hill", True, + lambda state: True), + EntranceData("Musty Crypt", "Musty Crypt Entrance", True, + lambda state: True), + EntranceData("Musty Crypt Entrance", "Musty Crypt", True, + lambda state: have_light_source(state, player)), + EntranceData("Musty Crypt Entrance", "Zombiton", True, + lambda state: True), + EntranceData("Rusty Crypt", "Rusty Crypt Entrance", True, + lambda state: True), + EntranceData("Rusty Crypt Entrance", "Rusty Crypt", True, + lambda state: have_light_source(state, player)), + EntranceData("Rusty Crypt Entrance", "Halloween Hill", True, + lambda state: True), + EntranceData("A Messy Cabin", "Zombiton", True, lambda state: True), + EntranceData("Under The Lake Entrance", "Under The Lake", True, + lambda state: have_light_source(state, player)), + EntranceData("Under The Lake Entrance", "Halloween Hill", True, + lambda state: True), + EntranceData("Under The Lake", "Under The Lake Entrance", True, + lambda state: True), + EntranceData("Under The Lake", "Under The Lake Exit", True, + lambda state: True), + EntranceData("Under The Lake Exit", "Deeper Under The Lake", True, + lambda state: True), + # EntranceData("Under The Lake Exit", "Under The Lake", True, lambda state: Hmmm), One way, possible with badges/items + EntranceData("Deeper Under The Lake", "Under The Lake Exit", True, + lambda state: True), + EntranceData("Deeper Under The Lake", "Frankenjulie's Laboratory", True, + lambda state: True), + EntranceData("Frankenjulie's Laboratory", "Deeper Under The Lake", True, + lambda state: True), + EntranceData("Frankenjulie's Laboratory", "Halloween Hill", True, + lambda state: True), + EntranceData("Haunted Tower", "Halloween Hill", True, + lambda state: True), + EntranceData("Haunted Tower", "Haunted Tower, Floor 2", True, + lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower", "Haunted Basement Entrance", True, + lambda state: state.has("Bat Key", player) and + state.has("Pumpkin Key", player) and + state.has("Skull Key", player)), + EntranceData("Haunted Basement Entrance", "Haunted Tower", True, + lambda state: state.has("Bat Key", player) and + state.has("Pumpkin Key", player) and + state.has("Skull Key", player)), + EntranceData("Haunted Basement Entrance", "Haunted Basement", True, + lambda state: have_light_source(state, player)), + EntranceData("Haunted Tower, Floor 2", "Haunted Tower", True, + lambda state: True), + EntranceData("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True, + lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower, Floor 3", "Haunted Tower, Floor 2", True, + lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower, Floor 3", "Haunted Tower Roof", True, + lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower Roof", "Halloween Hill", True, + lambda state: True), + EntranceData("Haunted Tower Roof", "Haunted Tower, Floor 3", True, + lambda state: True), + EntranceData("Haunted Basement", "Haunted Basement Entrance", True, + lambda state: True), + EntranceData("Abandoned Mines", "Abandoned Mines Entrance", True, + lambda state: True), + EntranceData("Abandoned Mines Entrance", "Abandoned Mines", True, + lambda state: have_light_source(state, player)), + EntranceData("Abandoned Mines Entrance", "Rocky Cliffs", True, + lambda state: True), + EntranceData("The Shrine Of Bombulus", "Rocky Cliffs", True, + lambda state: True), + EntranceData("A Gloomy Cavern", "A Gloomy Cavern Entrance", True, + lambda state: True), + EntranceData("A Gloomy Cavern Entrance", "A Gloomy Cavern", True, + lambda state: have_light_source(state, player)), + EntranceData("A Gloomy Cavern Entrance", "Rocky Cliffs", True, + lambda state: True), + EntranceData("Happy Stick Woods", "Halloween Hill", True, + lambda state: True), + EntranceData("The Wolf Den", "The Wolf Den Entrance", True, + lambda state: True), + EntranceData("The Wolf Den Entrance", "The Wolf Den", True, + lambda state: state.has("Silver Sling", + player) and have_light_source(state, + player)), + EntranceData("The Wolf Den Entrance", "Halloween Hill", True, + lambda state: True), + EntranceData("The Wolf Den", "Larry's Lair", True, + lambda state: state.has("Silver Sling", player)), + EntranceData("A Cabin Larry", "Zombiton", True, lambda state: True), + EntranceData("Upper Creepy Caverns", "Rocky Cliffs", True, + lambda state: state.has("Bombs", player)), + EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True, + lambda state: have_light_source(state, player)), + EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True, + lambda state: have_light_source(state, player)), + EntranceData("Under The Ravine", "Creepy Caverns Middle", True, + lambda state: have_light_source(state, player)), + EntranceData("Under The Ravine", "Creepy Caverns Right", True, + lambda state: have_light_source(state, player)), + EntranceData("Creepy Caverns Left", "Rocky Cliffs", True, + lambda state: True), + EntranceData("Creepy Caverns Left", "Upper Creepy Caverns", True, + lambda state: have_light_source(state, player)), + EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True, + lambda state: have_light_source(state, player)), + EntranceData("Creepy Caverns Middle", "Under The Ravine", True, + lambda state: True), + EntranceData("Creepy Caverns Right", "Under The Ravine", True, + lambda state: True), + EntranceData("Creepy Caverns Right", "Vampy Land", True, + lambda state: True), + EntranceData("Castle Vampy", "Halloween Hill", True, lambda state: True), + EntranceData("Castle Vampy", "Castle Vampy Skull Jail", False, + lambda state: state.has("Skull Key", player)), + EntranceData("Castle Vampy Skull Jail", "Castle Vampy II Main", True, + lambda state: state.has("Skull Key", player)), + EntranceData("Castle Vampy", "Castle Vampy II NE", True, + lambda state: state.has("Bat Statue", player, 4)), + EntranceData("Castle Vampy", "Castle Vampy II SE", True, + lambda state: state.has("Bat Statue", player, 4)), + EntranceData("Castle Vampy", "Castle Vampy II SW", True, + lambda state: state.has("Bat Statue", player, 4)), + EntranceData("Castle Vampy", "Castle Vampy II NW", True, + lambda state: state.has("Bat Statue", player, 4)), + EntranceData("Castle Vampy II Main", "Castle Vampy Skull Jail", True, + lambda state: True), + EntranceData("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, + lambda state: state.has("Bat Key", player)), + EntranceData("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, + lambda state: state.has("Bat Key", player)), + EntranceData("Castle Vampy II NE", "Castle Vampy", True, + lambda state: True), + EntranceData("Castle Vampy II NE", "Castle Vampy III NE", True, + lambda state: True), + EntranceData("Castle Vampy II SE", "Castle Vampy", True, + lambda state: True), + EntranceData("Castle Vampy II SE", "Castle Vampy III SE", True, + lambda state: True), + EntranceData("Castle Vampy II SW", "Castle Vampy", True, + lambda state: True), + EntranceData("Castle Vampy II SW", "Castle Vampy III SW", True, + lambda state: True), + EntranceData("Castle Vampy II NW", "Castle Vampy", True, + lambda state: True), + EntranceData("Castle Vampy II NW", "Castle Vampy III NW", True, + lambda state: True), + EntranceData("Cabin In The Woods", "Halloween Hill", True, + lambda state: True), + EntranceData("Castle Vampy III Main", "Castle Vampy II Bat Jail", True, + lambda state: True), + EntranceData("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", + True, lambda state: state.has("Pumpkin Key", player)), + EntranceData("Castle Vampy III Pumpkin Jail", "Castle Vampy IV Main", + True, lambda state: state.has("Pumpkin Key", player)), + EntranceData("Castle Vampy III NE", "Castle Vampy II NE", True, + lambda state: True), + EntranceData("Castle Vampy III NE", "Castle Vampy IV NE", True, + lambda state: True), + EntranceData("Castle Vampy III SE", "Castle Vampy II SE", True, + lambda state: True), + EntranceData("Castle Vampy III SE", "Castle Vampy IV SE", True, + lambda state: True), + EntranceData("Castle Vampy III SW", "Castle Vampy II SW", True, + lambda state: True), + EntranceData("Castle Vampy III SW", "Castle Vampy IV SW", True, + lambda state: True), + EntranceData("Castle Vampy III NW", "Castle Vampy II NW", True, + lambda state: True), + EntranceData("Castle Vampy III NW", "Castle Vampy IV NW", True, + lambda state: True), + EntranceData("Castle Vampy IV Main", "Castle Vampy III Pumpkin Jail", + True, lambda state: True), + EntranceData("Castle Vampy IV Main", "The Heart Of Terror", True, + lambda state: state.has("Vamp Statue", player, 8)), + EntranceData("Castle Vampy IV NE", "Castle Vampy III NE", True, + lambda state: True), + EntranceData("Castle Vampy IV NE", "Castle Vampy Roof NE", True, + lambda state: True), + EntranceData("Castle Vampy IV SE", "Castle Vampy III SE", True, + lambda state: True), + EntranceData("Castle Vampy IV SE", "Castle Vampy Roof SE", True, + lambda state: True), + EntranceData("Castle Vampy IV SW", "Castle Vampy III SW", True, + lambda state: True), + EntranceData("Castle Vampy IV SW", "Castle Vampy Roof SW", True, + lambda state: True), + EntranceData("Castle Vampy IV NW", "Castle Vampy III NW", True, + lambda state: True), + EntranceData("Castle Vampy IV NW", "Castle Vampy Roof NW", True, + lambda state: True), + EntranceData("A Cabin Collector", "Halloween Hill", True, + lambda state: True), + EntranceData("Castle Vampy Roof NE", "Castle Vampy IV NE", True, + lambda state: True), + EntranceData("Castle Vampy Roof SE", "Castle Vampy IV SE", True, + lambda state: True), + EntranceData("Castle Vampy Roof SW", "Castle Vampy IV SW", True, + lambda state: True), + EntranceData("Castle Vampy Roof NW", "Castle Vampy IV NW", True, + lambda state: True), + EntranceData("The Evilizer", "Halloween Hill", True, lambda state: True), + EntranceData("The Heart Of Terror", "The Evilizer", True, + lambda state: True), + EntranceData("The Heart Of Terror", "Empty Rooftop", True, + lambda state: state.can_reach_location( + "Q: Save Halloween Hill", player)), + EntranceData("A Hidey-Hole", "Halloween Hill", True, lambda state: True), + EntranceData("Empty Rooftop", "Halloween Hill", True, + lambda state: True), + EntranceData("Swampdog Lair", "Halloween Hill", True, + lambda state: True), + EntranceData("Larry's Lair", "Halloween Hill", True, lambda state: True), + + # logical zone connections, cant be randomized + + EntranceData("Halloween Hill", "Slurpy Swamp Mud", False, + lambda state: state.has("Boots", player)), + EntranceData("Slurpy Swamp Mud", "Halloween Hill", False, + lambda state: state.has("Boots", player)), + + #EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False, lambda state: True), + EntranceData("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, + lambda state: state.has("Boots", player)), + + #EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False, lambda state: True), + EntranceData("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, + lambda state: state.has("Boots", player)), + + EntranceData("Zombiton", "Halloween Hill", False, lambda state: True), + # one way + # EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges + + EntranceData("Halloween Hill", "Rocky Cliffs", False, + lambda state: state.has("Big Gem", player)), + EntranceData("Rocky Cliffs", "Halloween Hill", False, + lambda state: state.has("Big Gem", player)), + + EntranceData("Vampy Land", "Halloween Hill", False, lambda state: True), + # one way + # EntranceData("Halloween Hill", "Vampy Land", False), TODO possible with badges/rando + + EntranceData("Underground Tunnel Top", "Underground Tunnel Mud", False, + lambda state: state.has("Boots", player)), + EntranceData("Underground Tunnel Mud", "Underground Tunnel Top", False, + lambda state: state.has("Boots", player)), + EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", + False, lambda state: state.has("Boots", player)), # one way + # EntranceData("Underground Tunnel Zombie", "Underground Tunnel Mud", False), # TODO possible with badges/bridge rando + + EntranceData("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False, + lambda state: state.has("Boots", player)), # one way + # EntranceData("Swamp Gas Cavern Back", "Swamp Gas Cavern Front", False), # TODO possible with badges + + # probably need these with molecular dispersion # "The Witch's Cabin Front -> The Witch's Cabin Back": EntranceData("The Witch's Cabin Front", "The Witch's Cabin Back", False), # "The Witch's Cabin Back -> The Witch's Cabin Front": EntranceData("The Witch's Cabin Back", "The Witch's Cabin Front", False), # "Creepy Caverns Left -> Creepy Caverns Middle": EntranceData("Creepy Caverns Left", "Creepy Caverns Middle", False), @@ -230,4 +380,4 @@ def set_entrances(multiworld, world, player): for region in multiworld.get_regions(player): for entry in loonyland_entrance_table: if entry.source_region == region.name: - region.connect(connecting_region= world.get_region(entry.target_region), rule= entry.rule) + region.connect(connecting_region= world.get_region(entry.target_region), rule= entry.rule) \ No newline at end of file diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index a72bed685267..7fa6fdafefef 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -22,116 +22,111 @@ class LoonylandLocationData(NamedTuple): region: str loonyland_location_table: Dict[str, LoonylandLocationData] = { - "Swamp Mud Path": LoonylandLocationData(0, LocationCategory.PICKUP, "Slurpy Swamp Mud"), - "Bog Beast Home": LoonylandLocationData(1, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs below Upper Caverns": LoonylandLocationData(2, LocationCategory.PICKUP, "Rocky Cliffs"), - "Sapling Shrine": LoonylandLocationData(3, LocationCategory.PICKUP, "Slurpy Swamp Mud"), - "Terror Glade": LoonylandLocationData(4, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs Vine": LoonylandLocationData(5, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs Grand Pharoh": LoonylandLocationData(6, LocationCategory.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs Rock Corner": LoonylandLocationData(7, LocationCategory.PICKUP, "Rocky Cliffs"), - "Mushroom outside town": LoonylandLocationData(8, LocationCategory.PICKUP, "Halloween Hill"), - "North of UG Passage": LoonylandLocationData(9, LocationCategory.PICKUP, "Halloween Hill"), - "Top left mushroom spot": LoonylandLocationData(10, LocationCategory.PICKUP, "Halloween Hill"), - "NE of UG Passage": LoonylandLocationData(11, LocationCategory.PICKUP, "Halloween Hill"), - "East Woods": LoonylandLocationData(12, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs Ledge": LoonylandLocationData(13, LocationCategory.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs Peak": LoonylandLocationData(14, LocationCategory.PICKUP, "Rocky Cliffs"), - "Cat Tree": LoonylandLocationData(15, LocationCategory.PICKUP, "Halloween Hill"), - "Bedroom": LoonylandLocationData(16, LocationCategory.PICKUP, "The Witch's Cabin Front"), - "Backroom": LoonylandLocationData(17, LocationCategory.PICKUP, "The Witch's Cabin Back"), - "Barrel Maze": LoonylandLocationData(18, LocationCategory.PICKUP, "Bonita's Cabin"), - "Top Door": LoonylandLocationData(19, LocationCategory.PICKUP, "The Bog Pit"), - "Post Room": LoonylandLocationData(20, LocationCategory.PICKUP, "The Bog Pit"), - "Window Drip": LoonylandLocationData(21, LocationCategory.PICKUP, "The Bog Pit"), - "Green room": LoonylandLocationData(22, LocationCategory.PICKUP, "The Bog Pit"), - "Arena": LoonylandLocationData(23, LocationCategory.PICKUP, "The Bog Pit"), - "Kill Wall": LoonylandLocationData(24, LocationCategory.PICKUP, "The Bog Pit"), - "Swampdog Door": LoonylandLocationData(25, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Scribble Wall": LoonylandLocationData(26, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Tiny Passage": LoonylandLocationData(27, LocationCategory.PICKUP, "Underground Tunnel Top"), - "fire frogs": LoonylandLocationData(28, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Torch Island": LoonylandLocationData(29, LocationCategory.PICKUP, "Underground Tunnel Mud"), - "Small Room": LoonylandLocationData(30, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Scratch Wall": LoonylandLocationData(31, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), - "Bat Mound": LoonylandLocationData(32, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), - "Stair room": LoonylandLocationData(33, LocationCategory.PICKUP, "Swamp Gas Cavern Back"), - "Rock Prison": LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), - "Tiny Cabin": LoonylandLocationData(35, LocationCategory.PICKUP, "A Tiny Cabin"), - "Bedside ": LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin Seer"), - "Crypt Pumpkin Door": LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt"), - "Maze": LoonylandLocationData(38, LocationCategory.PICKUP, "Dusty Crypt"), - "Big Closed Room": LoonylandLocationData(39, LocationCategory.PICKUP, "Musty Crypt"), - "Spike Vine": LoonylandLocationData(40, LocationCategory.PICKUP, "Rusty Crypt"), - "Boulders": LoonylandLocationData(41, LocationCategory.PICKUP, "Rusty Crypt"), - "Barrel Mess": LoonylandLocationData(42, LocationCategory.PICKUP, "A Messy Cabin"), - "Lightning Rod Secret": LoonylandLocationData(43, LocationCategory.PICKUP, "Under The Lake"), - "Lake Bat Door": LoonylandLocationData(44, LocationCategory.PICKUP, "Under The Lake"), - "SE corner": LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under The Lake"), - "Rhombus": LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under The Lake"), + "Swamp: Mud Path": LoonylandLocationData(0, LocationCategory.PICKUP, "Slurpy Swamp Mud"), + "Swamp: Bog Beast": LoonylandLocationData(1, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Upper Ledge": LoonylandLocationData(2, LocationCategory.PICKUP, "Rocky Cliffs"), + "Swamp: Sapling Shrine": LoonylandLocationData(3, LocationCategory.PICKUP, "Slurpy Swamp Mud"), + "Terror Glade: South Trees": LoonylandLocationData(4, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Vine": LoonylandLocationData(5, LocationCategory.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Grand Pharoh": LoonylandLocationData(6, LocationCategory.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Rock Corner": LoonylandLocationData(7, LocationCategory.PICKUP, "Rocky Cliffs"), + "Swamp: Outside Luniton": LoonylandLocationData(8, LocationCategory.PICKUP, "Halloween Hill"), + "Swamp: East 1": LoonylandLocationData(9, LocationCategory.PICKUP, "Halloween Hill"), + "Swamp: Top Left dry": LoonylandLocationData(10, LocationCategory.PICKUP, "Halloween Hill"), + "Swamp: East 2": LoonylandLocationData(11, LocationCategory.PICKUP, "Halloween Hill"), + "Woods: Above Castle": LoonylandLocationData(12, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Entrance Ledge": LoonylandLocationData(13, LocationCategory.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Peak": LoonylandLocationData(14, LocationCategory.PICKUP, "Rocky Cliffs"), + "Woods: SW of Cabin": LoonylandLocationData(15, LocationCategory.PICKUP, "Halloween Hill"), + "Witch's Cabin: Bedroom": LoonylandLocationData(16, LocationCategory.PICKUP, "The Witch's Cabin Front"), + "Witch's Cabin: Backroom": LoonylandLocationData(17, LocationCategory.PICKUP, "The Witch's Cabin Back"), + "Bonita's Cabin: Barrel Maze": LoonylandLocationData(18, LocationCategory.PICKUP, "Bonita's Cabin"), + "Bog Pit: Top Door": LoonylandLocationData(19, LocationCategory.PICKUP, "The Bog Pit"), + "Bog Pit: Posts Room": LoonylandLocationData(20, LocationCategory.PICKUP, "The Bog Pit"), + "Bog Pit: Drippy Window": LoonylandLocationData(21, LocationCategory.PICKUP, "The Bog Pit"), + "Bog Pit: Green room": LoonylandLocationData(22, LocationCategory.PICKUP, "The Bog Pit"), + "Bog Pit: Arena": LoonylandLocationData(23, LocationCategory.PICKUP, "The Bog Pit"), + "Bog Pit: Sw Switch": LoonylandLocationData(24, LocationCategory.PICKUP, "The Bog Pit"), + "Tunnel: Swampdog Pumpkin Door": LoonylandLocationData(25, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Tunnel: Scratch Wall": LoonylandLocationData(26, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Tunnel: Narrow Passage": LoonylandLocationData(27, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Tunnel: Top Frogs": LoonylandLocationData(28, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Tunnel: Torch Island": LoonylandLocationData(29, LocationCategory.PICKUP, "Underground Tunnel Mud"), + "Tunnel: Small Room": LoonylandLocationData(30, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Swamp Gas: Scratch Wall": LoonylandLocationData(31, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), + "Swamp Gas: Bat Door": LoonylandLocationData(32, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), + "Swamp Gas: Stair room": LoonylandLocationData(33, LocationCategory.PICKUP, "Swamp Gas Cavern Back"), + "Swamp Gas: Rock Prison": LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), + "A Tiny Cabin": LoonylandLocationData(35, LocationCategory.PICKUP, "A Tiny Cabin"), + "Seer: Bedside": LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin Seer"), + "Dusty Crypt: Pumpkin Door": LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt"), + "Dusty Crypt: Maze": LoonylandLocationData(38, LocationCategory.PICKUP, "Dusty Crypt"), + "Musty Crypt: Maze Room": LoonylandLocationData(39, LocationCategory.PICKUP, "Musty Crypt"), + "Rusty Crypt: Vine": LoonylandLocationData(40, LocationCategory.PICKUP, "Rusty Crypt"), + "Rusty Crypt: Boulders": LoonylandLocationData(41, LocationCategory.PICKUP, "Rusty Crypt"), + "A Messy Cabin": LoonylandLocationData(42, LocationCategory.PICKUP, "A Messy Cabin"), + "Under The Lake: Behind Lightning Rod": LoonylandLocationData(43, LocationCategory.PICKUP, "Under The Lake"), + "Under The Lake: Bat Door": LoonylandLocationData(44, LocationCategory.PICKUP, "Under The Lake"), + "Deeper Lake: Corner": LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under The Lake"), + "Deeper Lake: Rhombus": LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under The Lake"), "Frankenjulie's Reward": LoonylandLocationData(47, LocationCategory.PICKUP, "Frankenjulie's Laboratory"), - "Barracks": LoonylandLocationData(48, LocationCategory.PICKUP, "Haunted Tower"), - "Top Left": LoonylandLocationData(49, LocationCategory.PICKUP, "Haunted Tower, Floor 2"), - "Boss Reward": LoonylandLocationData(50, LocationCategory.PICKUP, "Haunted Tower Roof"), - "DoorDoorDoorDoorDoorDoor": LoonylandLocationData(51, LocationCategory.PICKUP, "Haunted Basement"), - "Shaft": LoonylandLocationData(52, LocationCategory.PICKUP, "Abandoned Mines"), - "Bombulus": LoonylandLocationData(53, LocationCategory.PICKUP, "The Shrine Of Bombulus"), - "Lockpick": LoonylandLocationData(54, LocationCategory.PICKUP, "A Gloomy Cavern"), - "Happy Stick Hidden": LoonylandLocationData(55, LocationCategory.PICKUP, "Happy Stick Woods"), - "Happy Stick Reward": LoonylandLocationData(56, LocationCategory.PICKUP, "Happy Stick Woods"), - "Wolf Top Left": LoonylandLocationData(57, LocationCategory.PICKUP, "The Wolf Den"), - "Pumpkin Door": LoonylandLocationData(58, LocationCategory.PICKUP, "The Wolf Den"), - "Grow Room": LoonylandLocationData(59, LocationCategory.PICKUP, "The Wolf Den"), - "The Three ombres": LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Caverns"), - "Left Vine": LoonylandLocationData(61, LocationCategory.PICKUP, "Under The Ravine"), - "Right Vine": LoonylandLocationData(62, LocationCategory.PICKUP, "Under The Ravine"), - "M Pharoh bat Room": LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns Middle"), - "E 2 blue Pharos": LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns Right"), - "M GARGOYLE ROOM": LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns Middle"), - "Vampire Guard": LoonylandLocationData(66, LocationCategory.PICKUP, "Castle Vampy"), - "maze top left": LoonylandLocationData(67, LocationCategory.PICKUP, "Castle Vampy"), - "Top Right Gauntlet": LoonylandLocationData(68, LocationCategory.PICKUP, "Castle Vampy"), - "Bat Closet": LoonylandLocationData(69, LocationCategory.PICKUP, "Castle Vampy"), - "Candle Room": LoonylandLocationData(70, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Top Right Top": LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Bottom Right Middle": LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Bat room": LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Gold Skull": LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin In The Woods"), - "Middle": LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Behind the Pews": LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III Main"), - "AMBUSH!": LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Halloween": LoonylandLocationData(78, LocationCategory.PICKUP, "Castle Vampy III Main"), - "So many bats": LoonylandLocationData(79, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Right Path": LoonylandLocationData(80, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Left Path": LoonylandLocationData(81, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Ballroom Right": LoonylandLocationData(82, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Right Secret Wall": LoonylandLocationData(83, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Ballroom Left": LoonylandLocationData(84, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Gutsy the Elder": LoonylandLocationData(85, LocationCategory.PICKUP, "Castle Vampy Roof NW"), - "Stoney the Elder": LoonylandLocationData(86, LocationCategory.PICKUP, "Castle Vampy Roof NE"), - "Drippy the Elder": LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof SW"), - "Toasty the Elder": LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof SE"), + "Tower: Barracks": LoonylandLocationData(48, LocationCategory.PICKUP, "Haunted Tower"), + "Tower F2: Skull Puzzle": LoonylandLocationData(49, LocationCategory.PICKUP, "Haunted Tower, Floor 2"), + "PolterGuy's Reward": LoonylandLocationData(50, LocationCategory.PICKUP, "Haunted Tower Roof"), + "Tower Basement: DoorDoorDoorDoorDoorDoor": LoonylandLocationData(51, LocationCategory.PICKUP, "Haunted Basement"), + "Abandoned Mine: Shaft": LoonylandLocationData(52, LocationCategory.PICKUP, "Abandoned Mines"), + "Shrine of Bombulus: Prize": LoonylandLocationData(53, LocationCategory.PICKUP, "The Shrine Of Bombulus"), + "Gloomy Cavern: Lockpick": LoonylandLocationData(54, LocationCategory.PICKUP, "A Gloomy Cavern"), + "Happy Stick: Hidden": LoonylandLocationData(55, LocationCategory.PICKUP, "Happy Stick Woods"), + "Happy Stick: Reward": LoonylandLocationData(56, LocationCategory.PICKUP, "Happy Stick Woods"), + "Wolf Den: Top Left": LoonylandLocationData(57, LocationCategory.PICKUP, "The Wolf Den"), + "Wolf Den: Pumpkin Door": LoonylandLocationData(58, LocationCategory.PICKUP, "The Wolf Den"), + "Wolf Den: Vine": LoonylandLocationData(59, LocationCategory.PICKUP, "The Wolf Den"), + "Upper Cavern: Three Gold Skeletons": LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Caverns"), + "Under The Ravine: Left Vine": LoonylandLocationData(61, LocationCategory.PICKUP, "Under The Ravine"), + "Under The Ravine: Right Vine": LoonylandLocationData(62, LocationCategory.PICKUP, "Under The Ravine"), + "Creepy Caverns M: Pharaoh Bat Door": LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns Middle"), + "Creepy Caverns E: Top Pharaohs": LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns Right"), + "Creepy Caverns M: Gargoyles": LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns Middle"), + "Castle Vampy: Top Room": LoonylandLocationData(66, LocationCategory.PICKUP, "Castle Vampy"), + "Castle Vampy: Maze": LoonylandLocationData(67, LocationCategory.PICKUP, "Castle Vampy"), + "Castle Vampy: Gauntlet": LoonylandLocationData(68, LocationCategory.PICKUP, "Castle Vampy"), + "Castle Vampy: Bat Closet": LoonylandLocationData(69, LocationCategory.PICKUP, "Castle Vampy"), + "Castle Vampy II: Candle Room": LoonylandLocationData(70, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Castle Vampy II: Bloodsucker Room": LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Castle Vampy II: Vampire Lord": LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Castle Vampy II: Bat Room": LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Cabin in the Woods: Gold Skull": LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin In The Woods"), + "Castle Vampy III: Center": LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: Behind the Pews": LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: AMBUSH!": LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: Halloween": LoonylandLocationData(78, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: Bat room": LoonylandLocationData(79, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Castle Vampy IV: Right Path": LoonylandLocationData(80, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Left Path": LoonylandLocationData(81, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Ballroom Right": LoonylandLocationData(82, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Right Secret Wall": LoonylandLocationData(83, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Ballroom Left": LoonylandLocationData(84, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Roof NW: Gutsy the Elder": LoonylandLocationData(85, LocationCategory.PICKUP, "Castle Vampy Roof NW"), + "Roof NE: Stoney the Elder": LoonylandLocationData(86, LocationCategory.PICKUP, "Castle Vampy Roof NE"), + "Roof SW: Drippy the Elder": LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof SW"), + "Roof SE: Toasty the Elder": LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof SE"), "Bonkula": LoonylandLocationData(89, LocationCategory.PICKUP, "The Heart Of Terror"), - "Bat Door": LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey-Hole"), - "Pebbles": LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey-Hole"), - "Entrance": LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair"), - "End": LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair"), - "Save Halloween Hill": LoonylandLocationData(94, LocationCategory.QUEST, "The Evilizer"), - "Ghostbusting": LoonylandLocationData(95, LocationCategory.QUEST, "The Witch's Cabin Front"), - "Hairy Larry": LoonylandLocationData(96, LocationCategory.QUEST, "A Cabin Larry"), - "Scaredy Cat": LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill"), - "Silver Bullet": LoonylandLocationData(98, LocationCategory.QUEST, "Halloween Hill"), - "Smashing Pumpkins": LoonylandLocationData(99, LocationCategory.QUEST, "Halloween Hill"), - "Sticky Shoes": LoonylandLocationData(100, LocationCategory.QUEST, "Halloween Hill"), - "The Collection": LoonylandLocationData(101, LocationCategory.QUEST, "A Cabin Collector"), - "The Rescue": LoonylandLocationData(102, LocationCategory.QUEST, "A Gloomy Cavern"), - "Tree Trimming": LoonylandLocationData(103, LocationCategory.QUEST, "A Cabin Trees"), - "Witch Mushrooms": LoonylandLocationData(104, LocationCategory.QUEST, "The Witch's Cabin Front"), - "Zombie Stomp": LoonylandLocationData(105, LocationCategory.QUEST, "Zombiton") + "Hidey-Hole: Bat Door": LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey-Hole"), + "Hidey-Hole: Pebbles": LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey-Hole"), + "Swampdog Lair: Entrance": LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair"), + "Swampdog Lair: End": LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair"), + "Q: Save Halloween Hill": LoonylandLocationData(94, LocationCategory.QUEST, "The Evilizer"), + "Q: Ghostbusting": LoonylandLocationData(95, LocationCategory.QUEST, "The Witch's Cabin Front"), + "Q: Hairy Larry": LoonylandLocationData(96, LocationCategory.QUEST, "A Cabin Larry"), + "Q: Scaredy Cat": LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill"), + "Q: Silver Bullet": LoonylandLocationData(98, LocationCategory.QUEST, "Halloween Hill"), + "Q: Smashing Pumpkins": LoonylandLocationData(99, LocationCategory.QUEST, "Halloween Hill"), + "Q: Sticky Shoes": LoonylandLocationData(100, LocationCategory.QUEST, "Halloween Hill"), + "Q: The Collection": LoonylandLocationData(101, LocationCategory.QUEST, "A Cabin Collector"), + "Q: The Rescue": LoonylandLocationData(102, LocationCategory.QUEST, "A Gloomy Cavern"), + "Q: Tree Trimming": LoonylandLocationData(103, LocationCategory.QUEST, "A Cabin Trees"), + "Q: Witch Mushrooms": LoonylandLocationData(104, LocationCategory.QUEST, "The Witch's Cabin Front"), + "Q: Zombie Stomp": LoonylandLocationData(105, LocationCategory.QUEST, "Zombiton") #todo the 40 badge locations - } - -loonyland_location_table = { - f"{data.region} - {name}": data - for name, data in loonyland_location_table.items() -} \ No newline at end of file + } \ No newline at end of file diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index fe0b768ca707..9f6044a6400d 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -16,6 +16,8 @@ class LoonylandRegionData(NamedTuple): "Menu": LoonylandRegionData(0, False, ""), "Halloween Hill": LoonylandRegionData(0, False, "Halloween Hill"), "Slurpy Swamp Mud": LoonylandRegionData(0, False, "Halloween Hill"), + "Slurpy Swamp Mud North Warp": LoonylandRegionData(0, False, "Halloween Hill"), + "Slurpy Swamp Mud East Warp": LoonylandRegionData(0, False, "Halloween Hill"), "Zombiton": LoonylandRegionData(0, False, "Halloween Hill"), "Rocky Cliffs": LoonylandRegionData(0, False, "Halloween Hill"), "Vampy Land": LoonylandRegionData(0, False, "Halloween Hill"), @@ -33,10 +35,15 @@ class LoonylandRegionData(NamedTuple): "A Cabin Seer": LoonylandRegionData(0, True, ""), "Benny's Cocktails": LoonylandRegionData(0, True, ""), "Dusty Crypt": LoonylandRegionData(0, True, ""), + "Dusty Crypt Entrance": LoonylandRegionData(0, False, ""), "Musty Crypt": LoonylandRegionData(0, True, ""), + "Musty Crypt Entrance": LoonylandRegionData(0, False, ""), "Rusty Crypt": LoonylandRegionData(0, True, ""), + "Rusty Crypt Entrance": LoonylandRegionData(0, False, ""), "A Messy Cabin": LoonylandRegionData(0, True, ""), "Under The Lake": LoonylandRegionData(0, True, ""), + "Under The Lake Entrance": LoonylandRegionData(0, False, ""), + "Under The Lake Exit": LoonylandRegionData(0, False, ""), "Deeper Under The Lake": LoonylandRegionData(0, True, ""), "Frankenjulie's Laboratory": LoonylandRegionData(0, True, ""), "Haunted Tower": LoonylandRegionData(0, True, ""), @@ -44,17 +51,31 @@ class LoonylandRegionData(NamedTuple): "Haunted Tower, Floor 3": LoonylandRegionData(0, True, ""), "Haunted Tower Roof": LoonylandRegionData(0, True, ""), "Haunted Basement": LoonylandRegionData(0, True, ""), + "Haunted Basement Entrance": LoonylandRegionData(0, False, ""), "Abandoned Mines": LoonylandRegionData(0, True, ""), + "Abandoned Mines Entrance": LoonylandRegionData(0, False, ""), "The Shrine Of Bombulus": LoonylandRegionData(0, True, ""), "A Gloomy Cavern": LoonylandRegionData(0, True, ""), + "A Gloomy Cavern Entrance": LoonylandRegionData(0, False, ""), "Happy Stick Woods": LoonylandRegionData(0, True, ""), "The Wolf Den": LoonylandRegionData(0, True, ""), + "The Wolf Den Entrance": LoonylandRegionData(0, False, ""), + "The Wolf Den Exit": LoonylandRegionData(0, False, ""), "A Cabin Larry": LoonylandRegionData(0, True, ""), "Upper Creepy Caverns": LoonylandRegionData(0, True, ""), + "Upper Creepy Caverns Left Warp": LoonylandRegionData(0, False, ""), + "Upper Creepy Caverns Middle Warp": LoonylandRegionData(0, False, ""), + "Upper Creepy Caverns Right Warp": LoonylandRegionData(0, False, ""), "Under The Ravine": LoonylandRegionData(0, True, ""), - "Creepy Caverns Left": LoonylandRegionData(0, False, "Creepy Caverns Left"), - "Creepy Caverns Middle": LoonylandRegionData(0, False, "Creepy Caverns Middle"), - "Creepy Caverns Right": LoonylandRegionData(0, False, "Creepy Caverns Right"), + "Creepy Caverns Left": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Left Bottom Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Left Top Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Middle": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Middle Top Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Middle Right Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Right": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Right Left Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Right Bottom Warp": LoonylandRegionData(0, False, "Creepy Caverns"), "Castle Vampy": LoonylandRegionData(0, True, ""), "Castle Vampy Skull Jail": LoonylandRegionData(0, False, "Castle Vampy"), "Castle Vampy II Main": LoonylandRegionData(0, False, "Castle Vampy II"), @@ -82,9 +103,12 @@ class LoonylandRegionData(NamedTuple): "Castle Vampy Roof NW": LoonylandRegionData(0, True, ""), "The Evilizer": LoonylandRegionData(0, True, ""), "The Heart Of Terror": LoonylandRegionData(0, True, ""), + "The Heart Of Terror Entrance": LoonylandRegionData(0, False, ""), + "The Heart Of Terror Exit": LoonylandRegionData(0, False, ""), "A Hidey-Hole": LoonylandRegionData(0, True, ""), "Empty Rooftop": LoonylandRegionData(0, True, ""), "Swampdog Lair": LoonylandRegionData(0, True, ""), + "Swampdog Lair Entrance": LoonylandRegionData(0, False, ""), "Larry's Lair": LoonylandRegionData(0, True, ""), #gamemodes @@ -98,4 +122,4 @@ class LoonylandRegionData(NamedTuple): #"Boss Bash", #"Loony Ball", #"Remix" -} +} \ No newline at end of file diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index 7524935d2660..d490c63b356d 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -83,112 +83,122 @@ def can_enter_vampy_iv(state: CollectionState, player: int) -> bool: def set_rules(multiworld, world, player): access_rules = { - "Slurpy Swamp Mud - Swamp Mud Path": lambda state: state.has("Boots", player), - #"Halloween Hill - Bog Beast Home": lambda state: True, - #"Rocky Cliffs - Rocky Cliffs below Upper Caverns": lambda state: True, - "Slurpy Swamp Mud - Sapling Shrine": lambda state: state.has("Boots", player), - #"Halloween Hill - Terror Glade": lambda state: True, - "Halloween Hill - Rocky Cliffs Vine": lambda state: state.has("Fertilizer", player), - #"Rocky Cliffs - Rocky Cliffs Grand Pharoh": lambda state: True, - "Rocky Cliffs - Rocky Cliffs Rock Corner": lambda state: have_bombs(state, player), - #"Halloween Hill - Mushroom outside town": lambda state: True, - #"Halloween Hill - North of UG Passage": lambda state: True, - #"Halloween Hill - Top left mushroom spot": lambda state: True, - #"Halloween Hill - NE of UG Passage": lambda state: True, - #"Halloween Hill - East Woods": lambda state: True, - #"Rocky Cliffs - Rocky Cliffs Ledge": lambda state: True, - #"Rocky Cliffs - Rocky Cliffs Peak": lambda state: True, - #"Halloween Hill - Cat Tree": lambda state: True, - "The Witch's Cabin Front - Bedroom": lambda state: have_light_source(state, player), - #"The Witch's Cabin Back - Backroom": lambda state: True, - #"Bonita's Cabin - Barrel Maze": lambda state: True, - "The Bog Pit - Top Door": lambda state: state.has("Skull Key", player), - #"The Bog Pit - Post Room": lambda state: True, - #"The Bog Pit - Window Drip": lambda state: True, - #"The Bog Pit - Green room": lambda state: True, - #"The Bog Pit - Arena": lambda state: True, - #"The Bog Pit - Kill Wall": lambda state: True, - "Underground Tunnel Top - Swampdog Door": lambda state: state.has("Pumpkin Key", player), - "Underground Tunnel Top - Scribble Wall": lambda state: have_special_weapon_bullet(state, player), - #"Underground Tunnel Top - Tiny Passage": lambda state: True, - #"Underground Tunnel Top - fire frogs": lambda state: True, - "Underground Tunnel Mud - Torch Island": lambda state: state.has("Boots", player), - #"Underground Tunnel Top - Small Room": lambda state: True, - "Swamp Gas Cavern Front - Scratch Wall": lambda state: have_special_weapon_bullet(state, player), - "Swamp Gas Cavern Front - Bat Mound": lambda state: state.has("Bat Key", player), - #"Swamp Gas Cavern Back - Stair room": lambda state: True, - "Swamp Gas Cavern Front - Rock Prison": lambda state: have_bombs(state, player), - #"A Tiny Cabin - Tiny Cabin": lambda state: True, - #"A Cabin Seer - Bedside ": lambda state: True - "Dusty Crypt - Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - #"Dusty Crypt - Maze": lambda state: True, - "Musty Crypt - Big Closed Room": lambda state: have_special_weapon_bullet(state, player), - "Rusty Crypt - Spike Vine": lambda state: state.has("Fertilizer", player), - #"Rusty Crypt - Boulders": lambda state: True, - #"A Messy Cabin - Barrel Mess": lambda state: True, - #"Under The Lake - Lightning Rod Secret": True, - "Under The Lake - Bat Door": lambda state: state.has("Bat Key", player), - #"Deeper Under The Lake - SE corner": lambda state: True, - #"Deeper Under The Lake - Rhombus": lambda state: True, - #"Frankenjulie's Laboratory - Boss Reward": lambda state: True, - "Haunted Tower - Barracks": lambda state: state.has("Ghost Potion", player) and state.has("Bat Key", player), - "Haunted Tower, Floor 2 - Top Left": lambda state: state.has("Ghost Potion", player), - #"Haunted Tower Roof - Boss Reward": lambda state: True, - "Haunted Basement - DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), - #"Abandoned Mines - Shaft": lambda state: True, - #"The Shrine Of Bombulus - Bombulus": lambda state: True, - #"A Gloomy Cavern - Lockpick": lambda state: True, - #"Happy Stick Woods - Happy Stick Hidden": lambda state: True, - #"Happy Stick Woods - Happy Stick Reward": lambda state: True, - #"The Wolf Den - Wolf Top Left": lambda state: True, - "The Wolf Den - Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - "The Wolf Den - Grow Room": lambda state: state.has("Fertilizer", player), - "Upper Creepy Caverns - The Three ombres": lambda state: True, - "Under the Ravine - Left Vine": lambda state: state.has("Fertilizer", player), - "Under the Ravine - Right Vine": lambda state: state.has("Fertilizer", player), - "Creepy Caverns Middle - M Pharoh bat Room": lambda state: state.has("Bat Key", player), - #"Creepy Caverns Right - E 2 blue Pharos": lambda state: True, - #"Creepy Caverns Middle - M GARGOYLE ROOM": lambda state: True, - #"Castle Vampy - Vampire Guard": lambda state: True, - #"Castle Vampy - maze top left": lambda state: True, - #"Castle Vampy - Top Right Gauntlet": lambda state: True, - #"Castle Vampy - Bat Closet": lambda state: True, - #"Castle Vampy II Main - Candle Room": lambda state: True, - #"Castle Vampy II Main - Top Right Top": lambda state: True, - #"Castle Vampy II Main - Bottom Right Middle": lambda state: True, - #"Castle Vampy II Main - Bat room": lambda state: True, - #"Cabin In The Woods - Gold Skull": lambda state: True, - #"Castle Vampy III Main - Middle": lambda state: True, - #"Castle Vampy III Main - Behind the Pews": lambda state: True, - #"Castle Vampy III Main - AMBUSH!": lambda state: True, - #"Castle Vampy III Main - Halloween": lambda state: True, - #"Castle Vampy III Main - So many bats": lambda state: True, - #"Castle Vampy IV Main - Right Path": lambda state: True, - #"Castle Vampy IV Main - Left Path": lambda state: True, - "Castle Vampy IV Main - Ballroom Right": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), - #"Castle Vampy IV Main - Right Secret Wall": lambda state: True, - "Castle Vampy IV Main - Ballroom Left": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), - "Castle Vampy Roof NW - Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), - #"Castle Vampy Roof NE - Stoney the Elder": lambda state: True, - #"Castle Vampy Roof SW - Drippy the Elder": lambda state: True, - #"Castle Vampy Roof SE - Toasty the Elder": lambda state: True, - #"The Heart Of Terror - Bonkula": lambda state: True, - "A Hidey-Hole - Bat Door": lambda state: state.has("Bat Key", player), - #"A Hidey-Hole - Pebbles": lambda state: True, - "Swampdog Lair - Entrance": lambda state: state.has("Boots", player), - "Swampdog Lair - End": lambda state: state.has("Boots", player) and have_light_source(state, player) and state.has("Fertilizer", player), - "The Witch's Cabin Front - Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), - "A Cabin Larry - Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Boots", player) , - "Halloween Hill - Scaredy Cat": lambda state: state.has("Cat", player), - "Halloween Hill - Silver Bullet": lambda state: state.has("Silver", player) and can_cleanse_crypts(state, player), - "Halloween Hill - Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), - #"Halloween Hill - Sticky Shoes": lambda state: True, - "A Cabin Collector - The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and can_enter_vampy(state, player), - #"A Gloomy Cavern - The Rescue": lambda state: True, - #"A Cabin Trees - Tree Trimming": lambda state: True, - "The Witch's Cabin Front - Witch Mushrooms": lambda state: state.has("Mushroom", player, 10), - "Zombiton - Zombie Stomp": lambda state: can_cleanse_crypts(state, player), - #"The Evilizer - Save Halloween Hill": lambda state: True + "Swamp: Mud Path": lambda state: state.has("Boots", player), + # "Swamp: Bog Beast": lambda state: True, + # "Rocky Cliffs: Upper Ledge": lambda state: True, + "Swamp: Sapling Shrine": lambda state: state.has("Boots", player), + # "Terror Glade: South Trees": lambda state: True, + "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", player), + # "Rocky Cliffs: Grand Pharoh": lambda state: True, + "Rocky Cliffs: Rock Corner": lambda state: have_bombs(state, player), + # "Swamp: Outside Luniton": lambda state: True, + # "Swamp: East 1": lambda state: True, + # "Swamp: Top Left dry": lambda state: True, + # "Swamp: East 2": lambda state: True, + # "Woods: Above Castle": lambda state: True, + # "Rocky Cliffs: Entrance Ledge": lambda state: True, + # "Rocky Cliffs: Peak": lambda state: True, + # "Woods: SW of Cabin": lambda state: True, + "Witch's Cabin: Bedroom": lambda state: have_light_source(state, player), + # "Witch's Cabin: Backroom" lambda state: True, + # "Bonita's Cabin: Barrel Maze": lambda state: True, + "Bog Pit: Top Door": lambda state: state.has("Skull Key", player), + # "Bog Pit: Posts Room": lambda state: True, + # "Bog Pit: Drippy Window": lambda state: True, + # "Bog Pit: Green room": lambda state: True, + # "Bog Pit: Arena": lambda state: True, + # "Bog Pit: SW Switch": lambda state: True, + "Tunnel: Swampdog Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Tunnel: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), + # "Tunnel: Narrow Passage": lambda state: True, + # "Tunnel: Top Frogs": lambda state: True, + "Tunnel: Torch Island": lambda state: state.has("Boots", player), + # "Tunnel: Small Room": lambda state: True, + "Swamp Gas: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), + "Swamp Gas: Bat Door": lambda state: state.has("Bat Key", player), + # "Swamp Gas: Stair room": lambda state: True, + "Swamp Gas: Rock Prison": lambda state: have_bombs(state, player), + # "A Tiny Cabin": lambda state: True, + # "Seer: Bedside": lambda state: True + "Dusty Crypt: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + # "Dusty Crypt: Maze": lambda state: True, + "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, player), + "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", player), + # "Rusty Crypt: Boulders": lambda state: True, + # "A Messy Cabin": lambda state: True, + # "Under The Lake: Behind Lightning Rod": True, + "Under The Lake: Bat Door": lambda state: state.has("Bat Key", player), + # "Deeper Lake: Corner": lambda state: True, + # "Deeper Lake: Rhombus": lambda state: True, + # "Frankenjulie's Reward": lambda state: True, + "Tower: Barracks": lambda state: state.has("Ghost Potion", player) and state.has("Bat Key", player), + "Tower F2: Skull Puzzle": lambda state: state.has("Ghost Potion", player), + # "PolterGuy's Reward": lambda state: True, + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has("Skull Key", + player) and state.has( + "Pumpkin Key", player), + # "Abandoned Mine: Shaft": lambda state: True, + # "Shrine of Bombulus: Prize": lambda state: True, + # "Gloomy Cavern: Lockpick": lambda state: True, + # "Happy Stick: Hidden": lambda state: True, + # "Happy Stick: Reward": lambda state: True, + # "Wolf Den: Top Left": lambda state: True, + "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Wolf Den: Vine": lambda state: state.has("Fertilizer", player), + "Upper Cavern: Three Gold Skeletons": lambda state: True, + "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", player), + "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", player), + "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", player), + # "Creepy Caverns E: Top Pharaohs": lambda state: True, + # "Creepy Caverns M: Gargoyles": lambda state: True, + # "Castle Vampy: Top Room": lambda state: True, + # "Castle Vampy: Maze": lambda state: True, + # "Castle Vampy: Gauntlet": lambda state: True, + # "Castle Vampy: Bat Closet": lambda state: True, + # "Castle Vampy II: Candle Room": lambda state: True, + # "Castle Vampy II: Bloodsucker Room": lambda state: True, + # "Castle Vampy II: Vampire Lord": lambda state: True, + # "Castle Vampy II: Bat Room": lambda state: True, + # "Cabin in the Woods: Gold Skull": lambda state: True, + # "Castle Vampy III: Center": lambda state: True, + # "Castle Vampy III: Behind the Pews": lambda state: True, + # "Castle Vampy III: AMBUSH!": lambda state: True, + # "Castle Vampy III: Halloween": lambda state: True, + # "Castle Vampy III: Too Many Bats": lambda state: True, + # "Castle Vampy IV: Right Path": lambda state: True, + # "Castle Vampy IV: Left Path": lambda state: True, + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", + player), + # "Castle Vampy IV: Right Secret Wall": lambda state: True, + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", + player), + "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), + # "Roof NE: Stoney the Elder": lambda state: True, + # "Roof SW: Drippy the Elder": lambda state: True, + # "Roof SE: Toasty the Elder": lambda state: True, + # "Bonkula": lambda state: True, + "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), + # "Hidey-Hole: Pebbles":: lambda state: True, + "Swampdog Lair: Entrance": lambda state: state.has("Boots", player), + "Swampdog Lair: End": lambda state: state.has("Boots", player) and have_light_source(state, player) and state.has( + "Fertilizer", player), + "Q: Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Doom Daisy", player) and state.has( + "Mushroom", player, 10), + "Q: Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", + player) and state.has("Boots", + player), + "Q: Scaredy Cat": lambda state: state.has("Cat", player), + "Q: Silver Bullet": lambda state: state.has("Silver", player) and can_cleanse_crypts(state, player), + "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), + # "Q: Sticky Shoes": lambda state: True, + "Q: The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", + player) and can_enter_vampy( + state, player), + # "Q: The Rescue": lambda state: True, + # "Q: Tree Trimming": lambda state: True, + "Q: Witch Mushrooms": lambda state: state.has("Mushroom", player, 10), + "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), + # "The Evilizer - Save Halloween Hill": lambda state: True } for loc in multiworld.get_locations(player): if loc.name in access_rules: diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index e042545e1c10..5db673ad5545 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -89,7 +89,7 @@ def get_filler_item_name(self) -> str: def set_rules(self): # Completion condition. # self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) - final_loc = self.get_location("The Evilizer - Save Halloween Hill") + final_loc = self.get_location("Q: Save Halloween Hill") final_loc.address = None final_loc.place_locked_item(self.create_event("Victory")) self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) From 83f4f0111602de5ad68b5ae66f791c934687fd63 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Wed, 11 Dec 2024 10:40:16 -0500 Subject: [PATCH 25/58] auto formatting pass --- worlds/loonyland/Entrances.py | 558 +++++++++++++++++----------------- worlds/loonyland/Items.py | 85 +++--- worlds/loonyland/Locations.py | 222 +++++++------- worlds/loonyland/Options.py | 6 +- worlds/loonyland/Regions.py | 137 ++++----- worlds/loonyland/Rules.py | 15 +- worlds/loonyland/__init__.py | 33 +- 7 files changed, 532 insertions(+), 524 deletions(-) diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index a62362f065f7..797076b404c4 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -52,294 +52,294 @@ def set_entrances(multiworld, world, player): EntranceData("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), EntranceData("Halloween Hill", "Haunted Tower", True, lambda state: state.has("Ghost Potion", player)), EntranceData("Rocky Cliffs", "Abandoned Mines Entrance", True, lambda state: True), - EntranceData("Rocky Cliffs", "The Shrine Of Bombulus", True, lambda state: True), - EntranceData("Rocky Cliffs", "A Gloomy Cavern Entrance", True, - lambda state: have_light_source(state, player)), - EntranceData("Halloween Hill", "Happy Stick Woods", True, - lambda state: state.has("Happy Stick", player)), - EntranceData("Zombiton", "A Cabin Larry", True, lambda state: True), - EntranceData("Halloween Hill", "The Wolf Den Entrance", True, lambda state: True), - EntranceData("Rocky Cliffs", "Upper Creepy Caverns", True, - lambda state: have_light_source(state, player) and state.has("Bombs", player)), - EntranceData("Rocky Cliffs", "Creepy Caverns Left", True, - lambda state: have_light_source(state, player)), - EntranceData("Vampy Land", "Castle Vampy", True, lambda state: True), - EntranceData("Halloween Hill", "Cabin In The Woods", True, lambda state: True), - EntranceData("Halloween Hill", "A Cabin Collector", True, lambda state: True), - EntranceData("Halloween Hill", "A Hidey-Hole", True, lambda state: True), - EntranceData("Vampy Land", "Creepy Caverns Right", True, - lambda state: have_light_source(state, player)), - EntranceData("Halloween Hill", "Swampdog Lair", True, lambda state: True), - EntranceData("A Cabin Trees", "Halloween Hill", True, lambda state: True), - EntranceData("The Witch's Cabin Front", "Halloween Hill", True, lambda state: True), - EntranceData("The Witch's Cabin Back", "Halloween Hill", True, lambda state: True), - EntranceData("Bonita's Cabin", "Halloween Hill", True, lambda state: True), - EntranceData("The Bog Pit", "Halloween Hill", True, - lambda state: have_light_source(state, player)), - EntranceData("Underground Tunnel Top", "Halloween Hill", True, lambda state: True), - EntranceData("Underground Tunnel Zombie", "Benny's Cocktails", True, lambda state: True), - EntranceData("Swamp Gas Cavern Front", "Slurpy Swamp Mud North Warp", True, lambda state: True), + EntranceData("Rocky Cliffs", "The Shrine Of Bombulus", True, lambda state: True), + EntranceData("Rocky Cliffs", "A Gloomy Cavern Entrance", True, + lambda state: have_light_source(state, player)), + EntranceData("Halloween Hill", "Happy Stick Woods", True, + lambda state: state.has("Happy Stick", player)), + EntranceData("Zombiton", "A Cabin Larry", True, lambda state: True), + EntranceData("Halloween Hill", "The Wolf Den Entrance", True, lambda state: True), + EntranceData("Rocky Cliffs", "Upper Creepy Caverns", True, + lambda state: have_light_source(state, player) and state.has("Bombs", player)), + EntranceData("Rocky Cliffs", "Creepy Caverns Left", True, + lambda state: have_light_source(state, player)), + EntranceData("Vampy Land", "Castle Vampy", True, lambda state: True), + EntranceData("Halloween Hill", "Cabin In The Woods", True, lambda state: True), + EntranceData("Halloween Hill", "A Cabin Collector", True, lambda state: True), + EntranceData("Halloween Hill", "A Hidey-Hole", True, lambda state: True), + EntranceData("Vampy Land", "Creepy Caverns Right", True, + lambda state: have_light_source(state, player)), + EntranceData("Halloween Hill", "Swampdog Lair", True, lambda state: True), + EntranceData("A Cabin Trees", "Halloween Hill", True, lambda state: True), + EntranceData("The Witch's Cabin Front", "Halloween Hill", True, lambda state: True), + EntranceData("The Witch's Cabin Back", "Halloween Hill", True, lambda state: True), + EntranceData("Bonita's Cabin", "Halloween Hill", True, lambda state: True), + EntranceData("The Bog Pit", "Halloween Hill", True, + lambda state: have_light_source(state, player)), + EntranceData("Underground Tunnel Top", "Halloween Hill", True, lambda state: True), + EntranceData("Underground Tunnel Zombie", "Benny's Cocktails", True, lambda state: True), + EntranceData("Swamp Gas Cavern Front", "Slurpy Swamp Mud North Warp", True, lambda state: True), EntranceData("Swamp Gas Cavern Back", "Slurpy Swamp Mud East Warp", True, lambda state: True), - EntranceData("A Tiny Cabin", "Halloween Hill", True, lambda state: True), - EntranceData("A Cabin Seer", "Zombiton", True, lambda state: True), - EntranceData("Benny's Cocktails", "Zombiton", True, lambda state: True), - EntranceData("Benny's Cocktails", "Underground Tunnel Zombie", True, - lambda state: True), - EntranceData("Dusty Crypt", "Dusty Crypt Entrance", True, - lambda state: True), - EntranceData("Dusty Crypt Entrance", "Dusty Crypt", True, - lambda state: have_light_source(state, player)), - EntranceData("Dusty Crypt Entrance", "Halloween Hill", True, - lambda state: True), - EntranceData("Musty Crypt", "Musty Crypt Entrance", True, - lambda state: True), - EntranceData("Musty Crypt Entrance", "Musty Crypt", True, - lambda state: have_light_source(state, player)), - EntranceData("Musty Crypt Entrance", "Zombiton", True, - lambda state: True), - EntranceData("Rusty Crypt", "Rusty Crypt Entrance", True, - lambda state: True), - EntranceData("Rusty Crypt Entrance", "Rusty Crypt", True, - lambda state: have_light_source(state, player)), - EntranceData("Rusty Crypt Entrance", "Halloween Hill", True, - lambda state: True), - EntranceData("A Messy Cabin", "Zombiton", True, lambda state: True), - EntranceData("Under The Lake Entrance", "Under The Lake", True, - lambda state: have_light_source(state, player)), - EntranceData("Under The Lake Entrance", "Halloween Hill", True, - lambda state: True), - EntranceData("Under The Lake", "Under The Lake Entrance", True, - lambda state: True), - EntranceData("Under The Lake", "Under The Lake Exit", True, - lambda state: True), - EntranceData("Under The Lake Exit", "Deeper Under The Lake", True, - lambda state: True), - # EntranceData("Under The Lake Exit", "Under The Lake", True, lambda state: Hmmm), One way, possible with badges/items - EntranceData("Deeper Under The Lake", "Under The Lake Exit", True, - lambda state: True), - EntranceData("Deeper Under The Lake", "Frankenjulie's Laboratory", True, - lambda state: True), - EntranceData("Frankenjulie's Laboratory", "Deeper Under The Lake", True, - lambda state: True), - EntranceData("Frankenjulie's Laboratory", "Halloween Hill", True, - lambda state: True), - EntranceData("Haunted Tower", "Halloween Hill", True, - lambda state: True), - EntranceData("Haunted Tower", "Haunted Tower, Floor 2", True, - lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower", "Haunted Basement Entrance", True, - lambda state: state.has("Bat Key", player) and - state.has("Pumpkin Key", player) and - state.has("Skull Key", player)), - EntranceData("Haunted Basement Entrance", "Haunted Tower", True, - lambda state: state.has("Bat Key", player) and - state.has("Pumpkin Key", player) and - state.has("Skull Key", player)), - EntranceData("Haunted Basement Entrance", "Haunted Basement", True, - lambda state: have_light_source(state, player)), - EntranceData("Haunted Tower, Floor 2", "Haunted Tower", True, - lambda state: True), - EntranceData("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True, - lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower, Floor 3", "Haunted Tower, Floor 2", True, - lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower, Floor 3", "Haunted Tower Roof", True, - lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower Roof", "Halloween Hill", True, - lambda state: True), - EntranceData("Haunted Tower Roof", "Haunted Tower, Floor 3", True, - lambda state: True), - EntranceData("Haunted Basement", "Haunted Basement Entrance", True, - lambda state: True), - EntranceData("Abandoned Mines", "Abandoned Mines Entrance", True, - lambda state: True), - EntranceData("Abandoned Mines Entrance", "Abandoned Mines", True, - lambda state: have_light_source(state, player)), - EntranceData("Abandoned Mines Entrance", "Rocky Cliffs", True, - lambda state: True), - EntranceData("The Shrine Of Bombulus", "Rocky Cliffs", True, - lambda state: True), - EntranceData("A Gloomy Cavern", "A Gloomy Cavern Entrance", True, - lambda state: True), - EntranceData("A Gloomy Cavern Entrance", "A Gloomy Cavern", True, - lambda state: have_light_source(state, player)), - EntranceData("A Gloomy Cavern Entrance", "Rocky Cliffs", True, - lambda state: True), - EntranceData("Happy Stick Woods", "Halloween Hill", True, - lambda state: True), - EntranceData("The Wolf Den", "The Wolf Den Entrance", True, - lambda state: True), - EntranceData("The Wolf Den Entrance", "The Wolf Den", True, - lambda state: state.has("Silver Sling", - player) and have_light_source(state, - player)), - EntranceData("The Wolf Den Entrance", "Halloween Hill", True, - lambda state: True), - EntranceData("The Wolf Den", "Larry's Lair", True, - lambda state: state.has("Silver Sling", player)), - EntranceData("A Cabin Larry", "Zombiton", True, lambda state: True), - EntranceData("Upper Creepy Caverns", "Rocky Cliffs", True, - lambda state: state.has("Bombs", player)), - EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True, - lambda state: have_light_source(state, player)), - EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True, - lambda state: have_light_source(state, player)), - EntranceData("Under The Ravine", "Creepy Caverns Middle", True, - lambda state: have_light_source(state, player)), - EntranceData("Under The Ravine", "Creepy Caverns Right", True, - lambda state: have_light_source(state, player)), - EntranceData("Creepy Caverns Left", "Rocky Cliffs", True, - lambda state: True), - EntranceData("Creepy Caverns Left", "Upper Creepy Caverns", True, - lambda state: have_light_source(state, player)), - EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True, - lambda state: have_light_source(state, player)), - EntranceData("Creepy Caverns Middle", "Under The Ravine", True, - lambda state: True), - EntranceData("Creepy Caverns Right", "Under The Ravine", True, - lambda state: True), - EntranceData("Creepy Caverns Right", "Vampy Land", True, - lambda state: True), - EntranceData("Castle Vampy", "Halloween Hill", True, lambda state: True), - EntranceData("Castle Vampy", "Castle Vampy Skull Jail", False, - lambda state: state.has("Skull Key", player)), - EntranceData("Castle Vampy Skull Jail", "Castle Vampy II Main", True, - lambda state: state.has("Skull Key", player)), - EntranceData("Castle Vampy", "Castle Vampy II NE", True, - lambda state: state.has("Bat Statue", player, 4)), - EntranceData("Castle Vampy", "Castle Vampy II SE", True, - lambda state: state.has("Bat Statue", player, 4)), - EntranceData("Castle Vampy", "Castle Vampy II SW", True, - lambda state: state.has("Bat Statue", player, 4)), - EntranceData("Castle Vampy", "Castle Vampy II NW", True, - lambda state: state.has("Bat Statue", player, 4)), - EntranceData("Castle Vampy II Main", "Castle Vampy Skull Jail", True, - lambda state: True), - EntranceData("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, - lambda state: state.has("Bat Key", player)), - EntranceData("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, - lambda state: state.has("Bat Key", player)), - EntranceData("Castle Vampy II NE", "Castle Vampy", True, - lambda state: True), - EntranceData("Castle Vampy II NE", "Castle Vampy III NE", True, - lambda state: True), - EntranceData("Castle Vampy II SE", "Castle Vampy", True, - lambda state: True), - EntranceData("Castle Vampy II SE", "Castle Vampy III SE", True, - lambda state: True), - EntranceData("Castle Vampy II SW", "Castle Vampy", True, - lambda state: True), - EntranceData("Castle Vampy II SW", "Castle Vampy III SW", True, - lambda state: True), - EntranceData("Castle Vampy II NW", "Castle Vampy", True, - lambda state: True), - EntranceData("Castle Vampy II NW", "Castle Vampy III NW", True, - lambda state: True), - EntranceData("Cabin In The Woods", "Halloween Hill", True, - lambda state: True), - EntranceData("Castle Vampy III Main", "Castle Vampy II Bat Jail", True, - lambda state: True), - EntranceData("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", - True, lambda state: state.has("Pumpkin Key", player)), - EntranceData("Castle Vampy III Pumpkin Jail", "Castle Vampy IV Main", - True, lambda state: state.has("Pumpkin Key", player)), - EntranceData("Castle Vampy III NE", "Castle Vampy II NE", True, - lambda state: True), - EntranceData("Castle Vampy III NE", "Castle Vampy IV NE", True, - lambda state: True), - EntranceData("Castle Vampy III SE", "Castle Vampy II SE", True, - lambda state: True), - EntranceData("Castle Vampy III SE", "Castle Vampy IV SE", True, - lambda state: True), - EntranceData("Castle Vampy III SW", "Castle Vampy II SW", True, - lambda state: True), - EntranceData("Castle Vampy III SW", "Castle Vampy IV SW", True, - lambda state: True), - EntranceData("Castle Vampy III NW", "Castle Vampy II NW", True, - lambda state: True), - EntranceData("Castle Vampy III NW", "Castle Vampy IV NW", True, - lambda state: True), - EntranceData("Castle Vampy IV Main", "Castle Vampy III Pumpkin Jail", - True, lambda state: True), - EntranceData("Castle Vampy IV Main", "The Heart Of Terror", True, - lambda state: state.has("Vamp Statue", player, 8)), - EntranceData("Castle Vampy IV NE", "Castle Vampy III NE", True, - lambda state: True), - EntranceData("Castle Vampy IV NE", "Castle Vampy Roof NE", True, - lambda state: True), - EntranceData("Castle Vampy IV SE", "Castle Vampy III SE", True, - lambda state: True), - EntranceData("Castle Vampy IV SE", "Castle Vampy Roof SE", True, - lambda state: True), - EntranceData("Castle Vampy IV SW", "Castle Vampy III SW", True, - lambda state: True), - EntranceData("Castle Vampy IV SW", "Castle Vampy Roof SW", True, - lambda state: True), - EntranceData("Castle Vampy IV NW", "Castle Vampy III NW", True, - lambda state: True), - EntranceData("Castle Vampy IV NW", "Castle Vampy Roof NW", True, - lambda state: True), - EntranceData("A Cabin Collector", "Halloween Hill", True, - lambda state: True), - EntranceData("Castle Vampy Roof NE", "Castle Vampy IV NE", True, - lambda state: True), - EntranceData("Castle Vampy Roof SE", "Castle Vampy IV SE", True, - lambda state: True), - EntranceData("Castle Vampy Roof SW", "Castle Vampy IV SW", True, - lambda state: True), - EntranceData("Castle Vampy Roof NW", "Castle Vampy IV NW", True, - lambda state: True), - EntranceData("The Evilizer", "Halloween Hill", True, lambda state: True), - EntranceData("The Heart Of Terror", "The Evilizer", True, - lambda state: True), - EntranceData("The Heart Of Terror", "Empty Rooftop", True, - lambda state: state.can_reach_location( - "Q: Save Halloween Hill", player)), - EntranceData("A Hidey-Hole", "Halloween Hill", True, lambda state: True), - EntranceData("Empty Rooftop", "Halloween Hill", True, - lambda state: True), - EntranceData("Swampdog Lair", "Halloween Hill", True, - lambda state: True), - EntranceData("Larry's Lair", "Halloween Hill", True, lambda state: True), + EntranceData("A Tiny Cabin", "Halloween Hill", True, lambda state: True), + EntranceData("A Cabin Seer", "Zombiton", True, lambda state: True), + EntranceData("Benny's Cocktails", "Zombiton", True, lambda state: True), + EntranceData("Benny's Cocktails", "Underground Tunnel Zombie", True, + lambda state: True), + EntranceData("Dusty Crypt", "Dusty Crypt Entrance", True, + lambda state: True), + EntranceData("Dusty Crypt Entrance", "Dusty Crypt", True, + lambda state: have_light_source(state, player)), + EntranceData("Dusty Crypt Entrance", "Halloween Hill", True, + lambda state: True), + EntranceData("Musty Crypt", "Musty Crypt Entrance", True, + lambda state: True), + EntranceData("Musty Crypt Entrance", "Musty Crypt", True, + lambda state: have_light_source(state, player)), + EntranceData("Musty Crypt Entrance", "Zombiton", True, + lambda state: True), + EntranceData("Rusty Crypt", "Rusty Crypt Entrance", True, + lambda state: True), + EntranceData("Rusty Crypt Entrance", "Rusty Crypt", True, + lambda state: have_light_source(state, player)), + EntranceData("Rusty Crypt Entrance", "Halloween Hill", True, + lambda state: True), + EntranceData("A Messy Cabin", "Zombiton", True, lambda state: True), + EntranceData("Under The Lake Entrance", "Under The Lake", True, + lambda state: have_light_source(state, player)), + EntranceData("Under The Lake Entrance", "Halloween Hill", True, + lambda state: True), + EntranceData("Under The Lake", "Under The Lake Entrance", True, + lambda state: True), + EntranceData("Under The Lake", "Under The Lake Exit", True, + lambda state: True), + EntranceData("Under The Lake Exit", "Deeper Under The Lake", True, + lambda state: True), + # EntranceData("Under The Lake Exit", "Under The Lake", True, lambda state: Hmmm), One way, possible with badges/items + EntranceData("Deeper Under The Lake", "Under The Lake Exit", True, + lambda state: True), + EntranceData("Deeper Under The Lake", "Frankenjulie's Laboratory", True, + lambda state: True), + EntranceData("Frankenjulie's Laboratory", "Deeper Under The Lake", True, + lambda state: True), + EntranceData("Frankenjulie's Laboratory", "Halloween Hill", True, + lambda state: True), + EntranceData("Haunted Tower", "Halloween Hill", True, + lambda state: True), + EntranceData("Haunted Tower", "Haunted Tower, Floor 2", True, + lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower", "Haunted Basement Entrance", True, + lambda state: state.has("Bat Key", player) and + state.has("Pumpkin Key", player) and + state.has("Skull Key", player)), + EntranceData("Haunted Basement Entrance", "Haunted Tower", True, + lambda state: state.has("Bat Key", player) and + state.has("Pumpkin Key", player) and + state.has("Skull Key", player)), + EntranceData("Haunted Basement Entrance", "Haunted Basement", True, + lambda state: have_light_source(state, player)), + EntranceData("Haunted Tower, Floor 2", "Haunted Tower", True, + lambda state: True), + EntranceData("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True, + lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower, Floor 3", "Haunted Tower, Floor 2", True, + lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower, Floor 3", "Haunted Tower Roof", True, + lambda state: state.has("Ghost Potion", player)), + EntranceData("Haunted Tower Roof", "Halloween Hill", True, + lambda state: True), + EntranceData("Haunted Tower Roof", "Haunted Tower, Floor 3", True, + lambda state: True), + EntranceData("Haunted Basement", "Haunted Basement Entrance", True, + lambda state: True), + EntranceData("Abandoned Mines", "Abandoned Mines Entrance", True, + lambda state: True), + EntranceData("Abandoned Mines Entrance", "Abandoned Mines", True, + lambda state: have_light_source(state, player)), + EntranceData("Abandoned Mines Entrance", "Rocky Cliffs", True, + lambda state: True), + EntranceData("The Shrine Of Bombulus", "Rocky Cliffs", True, + lambda state: True), + EntranceData("A Gloomy Cavern", "A Gloomy Cavern Entrance", True, + lambda state: True), + EntranceData("A Gloomy Cavern Entrance", "A Gloomy Cavern", True, + lambda state: have_light_source(state, player)), + EntranceData("A Gloomy Cavern Entrance", "Rocky Cliffs", True, + lambda state: True), + EntranceData("Happy Stick Woods", "Halloween Hill", True, + lambda state: True), + EntranceData("The Wolf Den", "The Wolf Den Entrance", True, + lambda state: True), + EntranceData("The Wolf Den Entrance", "The Wolf Den", True, + lambda state: state.has("Silver Sling", + player) and have_light_source(state, + player)), + EntranceData("The Wolf Den Entrance", "Halloween Hill", True, + lambda state: True), + EntranceData("The Wolf Den", "Larry's Lair", True, + lambda state: state.has("Silver Sling", player)), + EntranceData("A Cabin Larry", "Zombiton", True, lambda state: True), + EntranceData("Upper Creepy Caverns", "Rocky Cliffs", True, + lambda state: state.has("Bombs", player)), + EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True, + lambda state: have_light_source(state, player)), + EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True, + lambda state: have_light_source(state, player)), + EntranceData("Under The Ravine", "Creepy Caverns Middle", True, + lambda state: have_light_source(state, player)), + EntranceData("Under The Ravine", "Creepy Caverns Right", True, + lambda state: have_light_source(state, player)), + EntranceData("Creepy Caverns Left", "Rocky Cliffs", True, + lambda state: True), + EntranceData("Creepy Caverns Left", "Upper Creepy Caverns", True, + lambda state: have_light_source(state, player)), + EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True, + lambda state: have_light_source(state, player)), + EntranceData("Creepy Caverns Middle", "Under The Ravine", True, + lambda state: True), + EntranceData("Creepy Caverns Right", "Under The Ravine", True, + lambda state: True), + EntranceData("Creepy Caverns Right", "Vampy Land", True, + lambda state: True), + EntranceData("Castle Vampy", "Halloween Hill", True, lambda state: True), + EntranceData("Castle Vampy", "Castle Vampy Skull Jail", False, + lambda state: state.has("Skull Key", player)), + EntranceData("Castle Vampy Skull Jail", "Castle Vampy II Main", True, + lambda state: state.has("Skull Key", player)), + EntranceData("Castle Vampy", "Castle Vampy II NE", True, + lambda state: state.has("Bat Statue", player, 4)), + EntranceData("Castle Vampy", "Castle Vampy II SE", True, + lambda state: state.has("Bat Statue", player, 4)), + EntranceData("Castle Vampy", "Castle Vampy II SW", True, + lambda state: state.has("Bat Statue", player, 4)), + EntranceData("Castle Vampy", "Castle Vampy II NW", True, + lambda state: state.has("Bat Statue", player, 4)), + EntranceData("Castle Vampy II Main", "Castle Vampy Skull Jail", True, + lambda state: True), + EntranceData("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, + lambda state: state.has("Bat Key", player)), + EntranceData("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, + lambda state: state.has("Bat Key", player)), + EntranceData("Castle Vampy II NE", "Castle Vampy", True, + lambda state: True), + EntranceData("Castle Vampy II NE", "Castle Vampy III NE", True, + lambda state: True), + EntranceData("Castle Vampy II SE", "Castle Vampy", True, + lambda state: True), + EntranceData("Castle Vampy II SE", "Castle Vampy III SE", True, + lambda state: True), + EntranceData("Castle Vampy II SW", "Castle Vampy", True, + lambda state: True), + EntranceData("Castle Vampy II SW", "Castle Vampy III SW", True, + lambda state: True), + EntranceData("Castle Vampy II NW", "Castle Vampy", True, + lambda state: True), + EntranceData("Castle Vampy II NW", "Castle Vampy III NW", True, + lambda state: True), + EntranceData("Cabin In The Woods", "Halloween Hill", True, + lambda state: True), + EntranceData("Castle Vampy III Main", "Castle Vampy II Bat Jail", True, + lambda state: True), + EntranceData("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", + True, lambda state: state.has("Pumpkin Key", player)), + EntranceData("Castle Vampy III Pumpkin Jail", "Castle Vampy IV Main", + True, lambda state: state.has("Pumpkin Key", player)), + EntranceData("Castle Vampy III NE", "Castle Vampy II NE", True, + lambda state: True), + EntranceData("Castle Vampy III NE", "Castle Vampy IV NE", True, + lambda state: True), + EntranceData("Castle Vampy III SE", "Castle Vampy II SE", True, + lambda state: True), + EntranceData("Castle Vampy III SE", "Castle Vampy IV SE", True, + lambda state: True), + EntranceData("Castle Vampy III SW", "Castle Vampy II SW", True, + lambda state: True), + EntranceData("Castle Vampy III SW", "Castle Vampy IV SW", True, + lambda state: True), + EntranceData("Castle Vampy III NW", "Castle Vampy II NW", True, + lambda state: True), + EntranceData("Castle Vampy III NW", "Castle Vampy IV NW", True, + lambda state: True), + EntranceData("Castle Vampy IV Main", "Castle Vampy III Pumpkin Jail", + True, lambda state: True), + EntranceData("Castle Vampy IV Main", "The Heart Of Terror", True, + lambda state: state.has("Vamp Statue", player, 8)), + EntranceData("Castle Vampy IV NE", "Castle Vampy III NE", True, + lambda state: True), + EntranceData("Castle Vampy IV NE", "Castle Vampy Roof NE", True, + lambda state: True), + EntranceData("Castle Vampy IV SE", "Castle Vampy III SE", True, + lambda state: True), + EntranceData("Castle Vampy IV SE", "Castle Vampy Roof SE", True, + lambda state: True), + EntranceData("Castle Vampy IV SW", "Castle Vampy III SW", True, + lambda state: True), + EntranceData("Castle Vampy IV SW", "Castle Vampy Roof SW", True, + lambda state: True), + EntranceData("Castle Vampy IV NW", "Castle Vampy III NW", True, + lambda state: True), + EntranceData("Castle Vampy IV NW", "Castle Vampy Roof NW", True, + lambda state: True), + EntranceData("A Cabin Collector", "Halloween Hill", True, + lambda state: True), + EntranceData("Castle Vampy Roof NE", "Castle Vampy IV NE", True, + lambda state: True), + EntranceData("Castle Vampy Roof SE", "Castle Vampy IV SE", True, + lambda state: True), + EntranceData("Castle Vampy Roof SW", "Castle Vampy IV SW", True, + lambda state: True), + EntranceData("Castle Vampy Roof NW", "Castle Vampy IV NW", True, + lambda state: True), + EntranceData("The Evilizer", "Halloween Hill", True, lambda state: True), + EntranceData("The Heart Of Terror", "The Evilizer", True, + lambda state: True), + EntranceData("The Heart Of Terror", "Empty Rooftop", True, + lambda state: state.can_reach_location( + "Q: Save Halloween Hill", player)), + EntranceData("A Hidey-Hole", "Halloween Hill", True, lambda state: True), + EntranceData("Empty Rooftop", "Halloween Hill", True, + lambda state: True), + EntranceData("Swampdog Lair", "Halloween Hill", True, + lambda state: True), + EntranceData("Larry's Lair", "Halloween Hill", True, lambda state: True), - # logical zone connections, cant be randomized + # logical zone connections, cant be randomized - EntranceData("Halloween Hill", "Slurpy Swamp Mud", False, - lambda state: state.has("Boots", player)), - EntranceData("Slurpy Swamp Mud", "Halloween Hill", False, - lambda state: state.has("Boots", player)), + EntranceData("Halloween Hill", "Slurpy Swamp Mud", False, + lambda state: state.has("Boots", player)), + EntranceData("Slurpy Swamp Mud", "Halloween Hill", False, + lambda state: state.has("Boots", player)), - #EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False, lambda state: True), - EntranceData("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, - lambda state: state.has("Boots", player)), + # EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False, lambda state: True), + EntranceData("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, + lambda state: state.has("Boots", player)), - #EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False, lambda state: True), - EntranceData("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, - lambda state: state.has("Boots", player)), + # EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False, lambda state: True), + EntranceData("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, + lambda state: state.has("Boots", player)), - EntranceData("Zombiton", "Halloween Hill", False, lambda state: True), - # one way - # EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges + EntranceData("Zombiton", "Halloween Hill", False, lambda state: True), + # one way + # EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges - EntranceData("Halloween Hill", "Rocky Cliffs", False, - lambda state: state.has("Big Gem", player)), - EntranceData("Rocky Cliffs", "Halloween Hill", False, - lambda state: state.has("Big Gem", player)), + EntranceData("Halloween Hill", "Rocky Cliffs", False, + lambda state: state.has("Big Gem", player)), + EntranceData("Rocky Cliffs", "Halloween Hill", False, + lambda state: state.has("Big Gem", player)), - EntranceData("Vampy Land", "Halloween Hill", False, lambda state: True), - # one way - # EntranceData("Halloween Hill", "Vampy Land", False), TODO possible with badges/rando + EntranceData("Vampy Land", "Halloween Hill", False, lambda state: True), + # one way + # EntranceData("Halloween Hill", "Vampy Land", False), TODO possible with badges/rando - EntranceData("Underground Tunnel Top", "Underground Tunnel Mud", False, - lambda state: state.has("Boots", player)), - EntranceData("Underground Tunnel Mud", "Underground Tunnel Top", False, - lambda state: state.has("Boots", player)), - EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", - False, lambda state: state.has("Boots", player)), # one way - # EntranceData("Underground Tunnel Zombie", "Underground Tunnel Mud", False), # TODO possible with badges/bridge rando + EntranceData("Underground Tunnel Top", "Underground Tunnel Mud", False, + lambda state: state.has("Boots", player)), + EntranceData("Underground Tunnel Mud", "Underground Tunnel Top", False, + lambda state: state.has("Boots", player)), + EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", + False, lambda state: state.has("Boots", player)), # one way + # EntranceData("Underground Tunnel Zombie", "Underground Tunnel Mud", False), # TODO possible with badges/bridge rando - EntranceData("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False, - lambda state: state.has("Boots", player)), # one way + EntranceData("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False, + lambda state: state.has("Boots", player)), # one way # EntranceData("Swamp Gas Cavern Back", "Swamp Gas Cavern Front", False), # TODO possible with badges # probably need these with molecular dispersion @@ -380,4 +380,4 @@ def set_entrances(multiworld, world, player): for region in multiworld.get_regions(player): for entry in loonyland_entrance_table: if entry.source_region == region.name: - region.connect(connecting_region= world.get_region(entry.target_region), rule= entry.rule) \ No newline at end of file + region.connect(connecting_region=world.get_region(entry.target_region), rule=entry.rule) diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/Items.py index 36ba790366c9..59267020c833 100644 --- a/worlds/loonyland/Items.py +++ b/worlds/loonyland/Items.py @@ -4,29 +4,30 @@ from worlds.AutoWorld import World from enum import Enum +loonyland_base_id: int = 2876900 -loonyland_base_id: int = 2876900 class LoonylandItem(Item): """ Item from the game Loonyland """ game: str = "Loonyland" - - + + class ItemCategory(Enum): ITEM = 0 CHEAT = 1 FILLER = 2 TRAP = 3 EVENT = 4 - - + + class LoonylandItemData(NamedTuple): id: int category: ItemCategory classification: ItemClassification + item_frequencies = { "Heart": 20, "Lightning": 10, @@ -37,43 +38,43 @@ class LoonylandItemData(NamedTuple): "Vamp Statue": 8, "Big Gem": 6, "Bat Statue": 4 -} - +} + loony_item_table: Dict[str, LoonylandItemData] = { - "Heart": LoonylandItemData(loonyland_base_id + 0, ItemCategory.ITEM, ItemClassification.useful), - "Lightning": LoonylandItemData(loonyland_base_id + 1, ItemCategory.ITEM, ItemClassification.useful), - "Arrow": LoonylandItemData(loonyland_base_id + 2, ItemCategory.ITEM, ItemClassification.useful), - "Pants": LoonylandItemData(loonyland_base_id + 3, ItemCategory.ITEM, ItemClassification.useful), - "Mushroom": LoonylandItemData(loonyland_base_id + 4, ItemCategory.ITEM, ItemClassification.progression), - "Orb": LoonylandItemData(loonyland_base_id + 5, ItemCategory.ITEM, ItemClassification.progression), - "Bombs": LoonylandItemData(loonyland_base_id + 6, ItemCategory.ITEM, ItemClassification.progression), - "Shock Wand": LoonylandItemData(loonyland_base_id + 7, ItemCategory.ITEM, ItemClassification.progression), - "Ice Spear": LoonylandItemData(loonyland_base_id + 8, ItemCategory.ITEM, ItemClassification.progression), - "Cactus": LoonylandItemData(loonyland_base_id + 9, ItemCategory.ITEM, ItemClassification.progression), - "Boomerang": LoonylandItemData(loonyland_base_id + 10, ItemCategory.ITEM, ItemClassification.progression), - "Whoopee": LoonylandItemData(loonyland_base_id + 11, ItemCategory.ITEM, ItemClassification.progression), - "Hot Pants": LoonylandItemData(loonyland_base_id + 12, ItemCategory.ITEM, ItemClassification.progression), - "Skull Key": LoonylandItemData(loonyland_base_id + 13, ItemCategory.ITEM, ItemClassification.progression), - "Bat Key": LoonylandItemData(loonyland_base_id + 14, ItemCategory.ITEM, ItemClassification.progression), - "Pumpkin Key": LoonylandItemData(loonyland_base_id + 15, ItemCategory.ITEM, ItemClassification.progression), - "Boots": LoonylandItemData(loonyland_base_id + 16, ItemCategory.ITEM, ItemClassification.progression), - "Stick": LoonylandItemData(loonyland_base_id + 17, ItemCategory.ITEM, ItemClassification.progression), - "Fertilizer": LoonylandItemData(loonyland_base_id + 18, ItemCategory.ITEM, ItemClassification.progression), - "Silver": LoonylandItemData(loonyland_base_id + 19, ItemCategory.ITEM, ItemClassification.progression), - "Doom Daisy": LoonylandItemData(loonyland_base_id + 20, ItemCategory.ITEM, ItemClassification.progression), + "Heart": LoonylandItemData(loonyland_base_id + 0, ItemCategory.ITEM, ItemClassification.useful), + "Lightning": LoonylandItemData(loonyland_base_id + 1, ItemCategory.ITEM, ItemClassification.useful), + "Arrow": LoonylandItemData(loonyland_base_id + 2, ItemCategory.ITEM, ItemClassification.useful), + "Pants": LoonylandItemData(loonyland_base_id + 3, ItemCategory.ITEM, ItemClassification.useful), + "Mushroom": LoonylandItemData(loonyland_base_id + 4, ItemCategory.ITEM, ItemClassification.progression), + "Orb": LoonylandItemData(loonyland_base_id + 5, ItemCategory.ITEM, ItemClassification.progression), + "Bombs": LoonylandItemData(loonyland_base_id + 6, ItemCategory.ITEM, ItemClassification.progression), + "Shock Wand": LoonylandItemData(loonyland_base_id + 7, ItemCategory.ITEM, ItemClassification.progression), + "Ice Spear": LoonylandItemData(loonyland_base_id + 8, ItemCategory.ITEM, ItemClassification.progression), + "Cactus": LoonylandItemData(loonyland_base_id + 9, ItemCategory.ITEM, ItemClassification.progression), + "Boomerang": LoonylandItemData(loonyland_base_id + 10, ItemCategory.ITEM, ItemClassification.progression), + "Whoopee": LoonylandItemData(loonyland_base_id + 11, ItemCategory.ITEM, ItemClassification.progression), + "Hot Pants": LoonylandItemData(loonyland_base_id + 12, ItemCategory.ITEM, ItemClassification.progression), + "Skull Key": LoonylandItemData(loonyland_base_id + 13, ItemCategory.ITEM, ItemClassification.progression), + "Bat Key": LoonylandItemData(loonyland_base_id + 14, ItemCategory.ITEM, ItemClassification.progression), + "Pumpkin Key": LoonylandItemData(loonyland_base_id + 15, ItemCategory.ITEM, ItemClassification.progression), + "Boots": LoonylandItemData(loonyland_base_id + 16, ItemCategory.ITEM, ItemClassification.progression), + "Stick": LoonylandItemData(loonyland_base_id + 17, ItemCategory.ITEM, ItemClassification.progression), + "Fertilizer": LoonylandItemData(loonyland_base_id + 18, ItemCategory.ITEM, ItemClassification.progression), + "Silver": LoonylandItemData(loonyland_base_id + 19, ItemCategory.ITEM, ItemClassification.progression), + "Doom Daisy": LoonylandItemData(loonyland_base_id + 20, ItemCategory.ITEM, ItemClassification.progression), "Ghost Potion": LoonylandItemData(loonyland_base_id + 21, ItemCategory.ITEM, ItemClassification.progression), - "Vamp Statue": LoonylandItemData(loonyland_base_id + 22, ItemCategory.ITEM, ItemClassification.progression), - "Cat": LoonylandItemData(loonyland_base_id + 23, ItemCategory.ITEM, ItemClassification.progression), - "Big Gem": LoonylandItemData(loonyland_base_id + 24, ItemCategory.ITEM, ItemClassification.progression), - "Zombie Reward":LoonylandItemData(loonyland_base_id + 25, ItemCategory.ITEM, ItemClassification.filler), - "3 way": LoonylandItemData(loonyland_base_id + 26, ItemCategory.ITEM, ItemClassification.useful), - "Happy Stick": LoonylandItemData(loonyland_base_id + 27, ItemCategory.ITEM, ItemClassification.progression), - "Bat Statue": LoonylandItemData(loonyland_base_id + 28, ItemCategory.ITEM, ItemClassification.progression), - "Lantern": LoonylandItemData(loonyland_base_id + 29, ItemCategory.ITEM, ItemClassification.progression), - "Reflect": LoonylandItemData(loonyland_base_id + 30, ItemCategory.ITEM, ItemClassification.useful), + "Vamp Statue": LoonylandItemData(loonyland_base_id + 22, ItemCategory.ITEM, ItemClassification.progression), + "Cat": LoonylandItemData(loonyland_base_id + 23, ItemCategory.ITEM, ItemClassification.progression), + "Big Gem": LoonylandItemData(loonyland_base_id + 24, ItemCategory.ITEM, ItemClassification.progression), + "Zombie Reward": LoonylandItemData(loonyland_base_id + 25, ItemCategory.ITEM, ItemClassification.filler), + "3 way": LoonylandItemData(loonyland_base_id + 26, ItemCategory.ITEM, ItemClassification.useful), + "Happy Stick": LoonylandItemData(loonyland_base_id + 27, ItemCategory.ITEM, ItemClassification.progression), + "Bat Statue": LoonylandItemData(loonyland_base_id + 28, ItemCategory.ITEM, ItemClassification.progression), + "Lantern": LoonylandItemData(loonyland_base_id + 29, ItemCategory.ITEM, ItemClassification.progression), + "Reflect": LoonylandItemData(loonyland_base_id + 30, ItemCategory.ITEM, ItemClassification.useful), "Silver Sling": LoonylandItemData(loonyland_base_id + 31, ItemCategory.ITEM, ItemClassification.progression) - #TODO add cheats - #TODO filler - #TODO traps - #TODO event - } \ No newline at end of file + # TODO add cheats + # TODO filler + # TODO traps + # TODO event +} diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index 7fa6fdafefef..cb317301bddc 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -3,130 +3,132 @@ from BaseClasses import Location - loonyland_base_id: int = 2876900 class LoonylandLocation(Location): game = "Loonyland" - + + class LocationCategory(Enum): PICKUP = 0 QUEST = 1 BADGE = 2 EVENT = 4 - + + class LoonylandLocationData(NamedTuple): id: int category: LocationCategory region: str - + + loonyland_location_table: Dict[str, LoonylandLocationData] = { "Swamp: Mud Path": LoonylandLocationData(0, LocationCategory.PICKUP, "Slurpy Swamp Mud"), "Swamp: Bog Beast": LoonylandLocationData(1, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Upper Ledge": LoonylandLocationData(2, LocationCategory.PICKUP, "Rocky Cliffs"), - "Swamp: Sapling Shrine": LoonylandLocationData(3, LocationCategory.PICKUP, "Slurpy Swamp Mud"), - "Terror Glade: South Trees": LoonylandLocationData(4, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Vine": LoonylandLocationData(5, LocationCategory.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Grand Pharoh": LoonylandLocationData(6, LocationCategory.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Rock Corner": LoonylandLocationData(7, LocationCategory.PICKUP, "Rocky Cliffs"), - "Swamp: Outside Luniton": LoonylandLocationData(8, LocationCategory.PICKUP, "Halloween Hill"), - "Swamp: East 1": LoonylandLocationData(9, LocationCategory.PICKUP, "Halloween Hill"), - "Swamp: Top Left dry": LoonylandLocationData(10, LocationCategory.PICKUP, "Halloween Hill"), - "Swamp: East 2": LoonylandLocationData(11, LocationCategory.PICKUP, "Halloween Hill"), - "Woods: Above Castle": LoonylandLocationData(12, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Entrance Ledge": LoonylandLocationData(13, LocationCategory.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Peak": LoonylandLocationData(14, LocationCategory.PICKUP, "Rocky Cliffs"), - "Woods: SW of Cabin": LoonylandLocationData(15, LocationCategory.PICKUP, "Halloween Hill"), - "Witch's Cabin: Bedroom": LoonylandLocationData(16, LocationCategory.PICKUP, "The Witch's Cabin Front"), - "Witch's Cabin: Backroom": LoonylandLocationData(17, LocationCategory.PICKUP, "The Witch's Cabin Back"), - "Bonita's Cabin: Barrel Maze": LoonylandLocationData(18, LocationCategory.PICKUP, "Bonita's Cabin"), - "Bog Pit: Top Door": LoonylandLocationData(19, LocationCategory.PICKUP, "The Bog Pit"), - "Bog Pit: Posts Room": LoonylandLocationData(20, LocationCategory.PICKUP, "The Bog Pit"), - "Bog Pit: Drippy Window": LoonylandLocationData(21, LocationCategory.PICKUP, "The Bog Pit"), - "Bog Pit: Green room": LoonylandLocationData(22, LocationCategory.PICKUP, "The Bog Pit"), - "Bog Pit: Arena": LoonylandLocationData(23, LocationCategory.PICKUP, "The Bog Pit"), - "Bog Pit: Sw Switch": LoonylandLocationData(24, LocationCategory.PICKUP, "The Bog Pit"), - "Tunnel: Swampdog Pumpkin Door": LoonylandLocationData(25, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Tunnel: Scratch Wall": LoonylandLocationData(26, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Tunnel: Narrow Passage": LoonylandLocationData(27, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Tunnel: Top Frogs": LoonylandLocationData(28, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Tunnel: Torch Island": LoonylandLocationData(29, LocationCategory.PICKUP, "Underground Tunnel Mud"), - "Tunnel: Small Room": LoonylandLocationData(30, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Swamp Gas: Scratch Wall": LoonylandLocationData(31, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), - "Swamp Gas: Bat Door": LoonylandLocationData(32, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), - "Swamp Gas: Stair room": LoonylandLocationData(33, LocationCategory.PICKUP, "Swamp Gas Cavern Back"), - "Swamp Gas: Rock Prison": LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), - "A Tiny Cabin": LoonylandLocationData(35, LocationCategory.PICKUP, "A Tiny Cabin"), - "Seer: Bedside": LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin Seer"), - "Dusty Crypt: Pumpkin Door": LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt"), - "Dusty Crypt: Maze": LoonylandLocationData(38, LocationCategory.PICKUP, "Dusty Crypt"), - "Musty Crypt: Maze Room": LoonylandLocationData(39, LocationCategory.PICKUP, "Musty Crypt"), - "Rusty Crypt: Vine": LoonylandLocationData(40, LocationCategory.PICKUP, "Rusty Crypt"), - "Rusty Crypt: Boulders": LoonylandLocationData(41, LocationCategory.PICKUP, "Rusty Crypt"), - "A Messy Cabin": LoonylandLocationData(42, LocationCategory.PICKUP, "A Messy Cabin"), - "Under The Lake: Behind Lightning Rod": LoonylandLocationData(43, LocationCategory.PICKUP, "Under The Lake"), - "Under The Lake: Bat Door": LoonylandLocationData(44, LocationCategory.PICKUP, "Under The Lake"), - "Deeper Lake: Corner": LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under The Lake"), - "Deeper Lake: Rhombus": LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under The Lake"), - "Frankenjulie's Reward": LoonylandLocationData(47, LocationCategory.PICKUP, "Frankenjulie's Laboratory"), - "Tower: Barracks": LoonylandLocationData(48, LocationCategory.PICKUP, "Haunted Tower"), - "Tower F2: Skull Puzzle": LoonylandLocationData(49, LocationCategory.PICKUP, "Haunted Tower, Floor 2"), - "PolterGuy's Reward": LoonylandLocationData(50, LocationCategory.PICKUP, "Haunted Tower Roof"), - "Tower Basement: DoorDoorDoorDoorDoorDoor": LoonylandLocationData(51, LocationCategory.PICKUP, "Haunted Basement"), - "Abandoned Mine: Shaft": LoonylandLocationData(52, LocationCategory.PICKUP, "Abandoned Mines"), - "Shrine of Bombulus: Prize": LoonylandLocationData(53, LocationCategory.PICKUP, "The Shrine Of Bombulus"), - "Gloomy Cavern: Lockpick": LoonylandLocationData(54, LocationCategory.PICKUP, "A Gloomy Cavern"), - "Happy Stick: Hidden": LoonylandLocationData(55, LocationCategory.PICKUP, "Happy Stick Woods"), - "Happy Stick: Reward": LoonylandLocationData(56, LocationCategory.PICKUP, "Happy Stick Woods"), - "Wolf Den: Top Left": LoonylandLocationData(57, LocationCategory.PICKUP, "The Wolf Den"), - "Wolf Den: Pumpkin Door": LoonylandLocationData(58, LocationCategory.PICKUP, "The Wolf Den"), - "Wolf Den: Vine": LoonylandLocationData(59, LocationCategory.PICKUP, "The Wolf Den"), - "Upper Cavern: Three Gold Skeletons": LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Caverns"), - "Under The Ravine: Left Vine": LoonylandLocationData(61, LocationCategory.PICKUP, "Under The Ravine"), - "Under The Ravine: Right Vine": LoonylandLocationData(62, LocationCategory.PICKUP, "Under The Ravine"), - "Creepy Caverns M: Pharaoh Bat Door": LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns Middle"), - "Creepy Caverns E: Top Pharaohs": LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns Right"), - "Creepy Caverns M: Gargoyles": LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns Middle"), - "Castle Vampy: Top Room": LoonylandLocationData(66, LocationCategory.PICKUP, "Castle Vampy"), - "Castle Vampy: Maze": LoonylandLocationData(67, LocationCategory.PICKUP, "Castle Vampy"), - "Castle Vampy: Gauntlet": LoonylandLocationData(68, LocationCategory.PICKUP, "Castle Vampy"), - "Castle Vampy: Bat Closet": LoonylandLocationData(69, LocationCategory.PICKUP, "Castle Vampy"), - "Castle Vampy II: Candle Room": LoonylandLocationData(70, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Castle Vampy II: Bloodsucker Room": LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Castle Vampy II: Vampire Lord": LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Castle Vampy II: Bat Room": LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Cabin in the Woods: Gold Skull": LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin In The Woods"), - "Castle Vampy III: Center": LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: Behind the Pews": LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: AMBUSH!": LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: Halloween": LoonylandLocationData(78, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: Bat room": LoonylandLocationData(79, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Castle Vampy IV: Right Path": LoonylandLocationData(80, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Left Path": LoonylandLocationData(81, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Ballroom Right": LoonylandLocationData(82, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Right Secret Wall": LoonylandLocationData(83, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Ballroom Left": LoonylandLocationData(84, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Roof NW: Gutsy the Elder": LoonylandLocationData(85, LocationCategory.PICKUP, "Castle Vampy Roof NW"), - "Roof NE: Stoney the Elder": LoonylandLocationData(86, LocationCategory.PICKUP, "Castle Vampy Roof NE"), - "Roof SW: Drippy the Elder": LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof SW"), - "Roof SE: Toasty the Elder": LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof SE"), - "Bonkula": LoonylandLocationData(89, LocationCategory.PICKUP, "The Heart Of Terror"), - "Hidey-Hole: Bat Door": LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey-Hole"), - "Hidey-Hole: Pebbles": LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey-Hole"), - "Swampdog Lair: Entrance": LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair"), - "Swampdog Lair: End": LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair"), - "Q: Save Halloween Hill": LoonylandLocationData(94, LocationCategory.QUEST, "The Evilizer"), - "Q: Ghostbusting": LoonylandLocationData(95, LocationCategory.QUEST, "The Witch's Cabin Front"), - "Q: Hairy Larry": LoonylandLocationData(96, LocationCategory.QUEST, "A Cabin Larry"), - "Q: Scaredy Cat": LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill"), - "Q: Silver Bullet": LoonylandLocationData(98, LocationCategory.QUEST, "Halloween Hill"), - "Q: Smashing Pumpkins": LoonylandLocationData(99, LocationCategory.QUEST, "Halloween Hill"), - "Q: Sticky Shoes": LoonylandLocationData(100, LocationCategory.QUEST, "Halloween Hill"), - "Q: The Collection": LoonylandLocationData(101, LocationCategory.QUEST, "A Cabin Collector"), - "Q: The Rescue": LoonylandLocationData(102, LocationCategory.QUEST, "A Gloomy Cavern"), - "Q: Tree Trimming": LoonylandLocationData(103, LocationCategory.QUEST, "A Cabin Trees"), - "Q: Witch Mushrooms": LoonylandLocationData(104, LocationCategory.QUEST, "The Witch's Cabin Front"), - "Q: Zombie Stomp": LoonylandLocationData(105, LocationCategory.QUEST, "Zombiton") - #todo the 40 badge locations - } \ No newline at end of file + "Rocky Cliffs: Upper Ledge": LoonylandLocationData(2, LocationCategory.PICKUP, "Rocky Cliffs"), + "Swamp: Sapling Shrine": LoonylandLocationData(3, LocationCategory.PICKUP, "Slurpy Swamp Mud"), + "Terror Glade: South Trees": LoonylandLocationData(4, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Vine": LoonylandLocationData(5, LocationCategory.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Grand Pharoh": LoonylandLocationData(6, LocationCategory.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Rock Corner": LoonylandLocationData(7, LocationCategory.PICKUP, "Rocky Cliffs"), + "Swamp: Outside Luniton": LoonylandLocationData(8, LocationCategory.PICKUP, "Halloween Hill"), + "Swamp: East 1": LoonylandLocationData(9, LocationCategory.PICKUP, "Halloween Hill"), + "Swamp: Top Left dry": LoonylandLocationData(10, LocationCategory.PICKUP, "Halloween Hill"), + "Swamp: East 2": LoonylandLocationData(11, LocationCategory.PICKUP, "Halloween Hill"), + "Woods: Above Castle": LoonylandLocationData(12, LocationCategory.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Entrance Ledge": LoonylandLocationData(13, LocationCategory.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Peak": LoonylandLocationData(14, LocationCategory.PICKUP, "Rocky Cliffs"), + "Woods: SW of Cabin": LoonylandLocationData(15, LocationCategory.PICKUP, "Halloween Hill"), + "Witch's Cabin: Bedroom": LoonylandLocationData(16, LocationCategory.PICKUP, "The Witch's Cabin Front"), + "Witch's Cabin: Backroom": LoonylandLocationData(17, LocationCategory.PICKUP, "The Witch's Cabin Back"), + "Bonita's Cabin: Barrel Maze": LoonylandLocationData(18, LocationCategory.PICKUP, "Bonita's Cabin"), + "Bog Pit: Top Door": LoonylandLocationData(19, LocationCategory.PICKUP, "The Bog Pit"), + "Bog Pit: Posts Room": LoonylandLocationData(20, LocationCategory.PICKUP, "The Bog Pit"), + "Bog Pit: Drippy Window": LoonylandLocationData(21, LocationCategory.PICKUP, "The Bog Pit"), + "Bog Pit: Green room": LoonylandLocationData(22, LocationCategory.PICKUP, "The Bog Pit"), + "Bog Pit: Arena": LoonylandLocationData(23, LocationCategory.PICKUP, "The Bog Pit"), + "Bog Pit: Sw Switch": LoonylandLocationData(24, LocationCategory.PICKUP, "The Bog Pit"), + "Tunnel: Swampdog Pumpkin Door": LoonylandLocationData(25, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Tunnel: Scratch Wall": LoonylandLocationData(26, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Tunnel: Narrow Passage": LoonylandLocationData(27, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Tunnel: Top Frogs": LoonylandLocationData(28, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Tunnel: Torch Island": LoonylandLocationData(29, LocationCategory.PICKUP, "Underground Tunnel Mud"), + "Tunnel: Small Room": LoonylandLocationData(30, LocationCategory.PICKUP, "Underground Tunnel Top"), + "Swamp Gas: Scratch Wall": LoonylandLocationData(31, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), + "Swamp Gas: Bat Door": LoonylandLocationData(32, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), + "Swamp Gas: Stair room": LoonylandLocationData(33, LocationCategory.PICKUP, "Swamp Gas Cavern Back"), + "Swamp Gas: Rock Prison": LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), + "A Tiny Cabin": LoonylandLocationData(35, LocationCategory.PICKUP, "A Tiny Cabin"), + "Seer: Bedside": LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin Seer"), + "Dusty Crypt: Pumpkin Door": LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt"), + "Dusty Crypt: Maze": LoonylandLocationData(38, LocationCategory.PICKUP, "Dusty Crypt"), + "Musty Crypt: Maze Room": LoonylandLocationData(39, LocationCategory.PICKUP, "Musty Crypt"), + "Rusty Crypt: Vine": LoonylandLocationData(40, LocationCategory.PICKUP, "Rusty Crypt"), + "Rusty Crypt: Boulders": LoonylandLocationData(41, LocationCategory.PICKUP, "Rusty Crypt"), + "A Messy Cabin": LoonylandLocationData(42, LocationCategory.PICKUP, "A Messy Cabin"), + "Under The Lake: Behind Lightning Rod": LoonylandLocationData(43, LocationCategory.PICKUP, "Under The Lake"), + "Under The Lake: Bat Door": LoonylandLocationData(44, LocationCategory.PICKUP, "Under The Lake"), + "Deeper Lake: Corner": LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under The Lake"), + "Deeper Lake: Rhombus": LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under The Lake"), + "Frankenjulie's Reward": LoonylandLocationData(47, LocationCategory.PICKUP, "Frankenjulie's Laboratory"), + "Tower: Barracks": LoonylandLocationData(48, LocationCategory.PICKUP, "Haunted Tower"), + "Tower F2: Skull Puzzle": LoonylandLocationData(49, LocationCategory.PICKUP, "Haunted Tower, Floor 2"), + "PolterGuy's Reward": LoonylandLocationData(50, LocationCategory.PICKUP, "Haunted Tower Roof"), + "Tower Basement: DoorDoorDoorDoorDoorDoor": LoonylandLocationData(51, LocationCategory.PICKUP, "Haunted Basement"), + "Abandoned Mine: Shaft": LoonylandLocationData(52, LocationCategory.PICKUP, "Abandoned Mines"), + "Shrine of Bombulus: Prize": LoonylandLocationData(53, LocationCategory.PICKUP, "The Shrine Of Bombulus"), + "Gloomy Cavern: Lockpick": LoonylandLocationData(54, LocationCategory.PICKUP, "A Gloomy Cavern"), + "Happy Stick: Hidden": LoonylandLocationData(55, LocationCategory.PICKUP, "Happy Stick Woods"), + "Happy Stick: Reward": LoonylandLocationData(56, LocationCategory.PICKUP, "Happy Stick Woods"), + "Wolf Den: Top Left": LoonylandLocationData(57, LocationCategory.PICKUP, "The Wolf Den"), + "Wolf Den: Pumpkin Door": LoonylandLocationData(58, LocationCategory.PICKUP, "The Wolf Den"), + "Wolf Den: Vine": LoonylandLocationData(59, LocationCategory.PICKUP, "The Wolf Den"), + "Upper Cavern: Three Gold Skeletons": LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Caverns"), + "Under The Ravine: Left Vine": LoonylandLocationData(61, LocationCategory.PICKUP, "Under The Ravine"), + "Under The Ravine: Right Vine": LoonylandLocationData(62, LocationCategory.PICKUP, "Under The Ravine"), + "Creepy Caverns M: Pharaoh Bat Door": LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns Middle"), + "Creepy Caverns E: Top Pharaohs": LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns Right"), + "Creepy Caverns M: Gargoyles": LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns Middle"), + "Castle Vampy: Top Room": LoonylandLocationData(66, LocationCategory.PICKUP, "Castle Vampy"), + "Castle Vampy: Maze": LoonylandLocationData(67, LocationCategory.PICKUP, "Castle Vampy"), + "Castle Vampy: Gauntlet": LoonylandLocationData(68, LocationCategory.PICKUP, "Castle Vampy"), + "Castle Vampy: Bat Closet": LoonylandLocationData(69, LocationCategory.PICKUP, "Castle Vampy"), + "Castle Vampy II: Candle Room": LoonylandLocationData(70, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Castle Vampy II: Bloodsucker Room": LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Castle Vampy II: Vampire Lord": LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Castle Vampy II: Bat Room": LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II Main"), + "Cabin in the Woods: Gold Skull": LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin In The Woods"), + "Castle Vampy III: Center": LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: Behind the Pews": LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: AMBUSH!": LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: Halloween": LoonylandLocationData(78, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: Bat room": LoonylandLocationData(79, LocationCategory.PICKUP, "Castle Vampy III Main"), + "Castle Vampy IV: Right Path": LoonylandLocationData(80, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Left Path": LoonylandLocationData(81, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Ballroom Right": LoonylandLocationData(82, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Right Secret Wall": LoonylandLocationData(83, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Ballroom Left": LoonylandLocationData(84, LocationCategory.PICKUP, "Castle Vampy IV Main"), + "Roof NW: Gutsy the Elder": LoonylandLocationData(85, LocationCategory.PICKUP, "Castle Vampy Roof NW"), + "Roof NE: Stoney the Elder": LoonylandLocationData(86, LocationCategory.PICKUP, "Castle Vampy Roof NE"), + "Roof SW: Drippy the Elder": LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof SW"), + "Roof SE: Toasty the Elder": LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof SE"), + "Bonkula": LoonylandLocationData(89, LocationCategory.PICKUP, "The Heart Of Terror"), + "Hidey-Hole: Bat Door": LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey-Hole"), + "Hidey-Hole: Pebbles": LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey-Hole"), + "Swampdog Lair: Entrance": LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair"), + "Swampdog Lair: End": LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair"), + "Q: Save Halloween Hill": LoonylandLocationData(94, LocationCategory.QUEST, "The Evilizer"), + "Q: Ghostbusting": LoonylandLocationData(95, LocationCategory.QUEST, "The Witch's Cabin Front"), + "Q: Hairy Larry": LoonylandLocationData(96, LocationCategory.QUEST, "A Cabin Larry"), + "Q: Scaredy Cat": LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill"), + "Q: Silver Bullet": LoonylandLocationData(98, LocationCategory.QUEST, "Halloween Hill"), + "Q: Smashing Pumpkins": LoonylandLocationData(99, LocationCategory.QUEST, "Halloween Hill"), + "Q: Sticky Shoes": LoonylandLocationData(100, LocationCategory.QUEST, "Halloween Hill"), + "Q: The Collection": LoonylandLocationData(101, LocationCategory.QUEST, "A Cabin Collector"), + "Q: The Rescue": LoonylandLocationData(102, LocationCategory.QUEST, "A Gloomy Cavern"), + "Q: Tree Trimming": LoonylandLocationData(103, LocationCategory.QUEST, "A Cabin Trees"), + "Q: Witch Mushrooms": LoonylandLocationData(104, LocationCategory.QUEST, "The Witch's Cabin Front"), + "Q: Zombie Stomp": LoonylandLocationData(105, LocationCategory.QUEST, "Zombiton") + # todo the 40 badge locations +} diff --git a/worlds/loonyland/Options.py b/worlds/loonyland/Options.py index 574a173c4799..37e535f2c5d5 100644 --- a/worlds/loonyland/Options.py +++ b/worlds/loonyland/Options.py @@ -2,13 +2,15 @@ from Options import Choice, PerGameCommonOptions + class WinCondition(Choice): """Sets Win Condition.""" display_name = "Win Condition" option_evilizer = 0 option_40badges = 1 default = 0 - + + @dataclass class LoonylandOptions(PerGameCommonOptions): - win_condition: WinCondition \ No newline at end of file + win_condition: WinCondition diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index 9f6044a6400d..de29c7905516 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -12,38 +12,39 @@ class LoonylandRegionData(NamedTuple): real: bool map: str + loonyland_region_table: Dict[str, LoonylandRegionData] = { "Menu": LoonylandRegionData(0, False, ""), - "Halloween Hill": LoonylandRegionData(0, False, "Halloween Hill"), - "Slurpy Swamp Mud": LoonylandRegionData(0, False, "Halloween Hill"), - "Slurpy Swamp Mud North Warp": LoonylandRegionData(0, False, "Halloween Hill"), - "Slurpy Swamp Mud East Warp": LoonylandRegionData(0, False, "Halloween Hill"), - "Zombiton": LoonylandRegionData(0, False, "Halloween Hill"), - "Rocky Cliffs": LoonylandRegionData(0, False, "Halloween Hill"), - "Vampy Land": LoonylandRegionData(0, False, "Halloween Hill"), + "Halloween Hill": LoonylandRegionData(0, False, "Halloween Hill"), + "Slurpy Swamp Mud": LoonylandRegionData(0, False, "Halloween Hill"), + "Slurpy Swamp Mud North Warp": LoonylandRegionData(0, False, "Halloween Hill"), + "Slurpy Swamp Mud East Warp": LoonylandRegionData(0, False, "Halloween Hill"), + "Zombiton": LoonylandRegionData(0, False, "Halloween Hill"), + "Rocky Cliffs": LoonylandRegionData(0, False, "Halloween Hill"), + "Vampy Land": LoonylandRegionData(0, False, "Halloween Hill"), "A Cabin Trees": LoonylandRegionData(0, True, "A Cabin"), - "The Witch's Cabin Front": LoonylandRegionData(0, False, "The Witch's Cabin"), - "The Witch's Cabin Back": LoonylandRegionData(0, False, "The Witch's Cabin"), + "The Witch's Cabin Front": LoonylandRegionData(0, False, "The Witch's Cabin"), + "The Witch's Cabin Back": LoonylandRegionData(0, False, "The Witch's Cabin"), "Bonita's Cabin": LoonylandRegionData(0, True, ""), "The Bog Pit": LoonylandRegionData(0, True, ""), "Underground Tunnel Top": LoonylandRegionData(0, True, ""), - "Underground Tunnel Mud": LoonylandRegionData(0, False, "Underground Tunnel"), - "Underground Tunnel Zombie": LoonylandRegionData(0, False, "Underground Tunnel"), - "Swamp Gas Cavern Front": LoonylandRegionData(0, False, "Swamp Gas Cavern"), - "Swamp Gas Cavern Back": LoonylandRegionData(0, False, "Swamp Gas Cavern"), + "Underground Tunnel Mud": LoonylandRegionData(0, False, "Underground Tunnel"), + "Underground Tunnel Zombie": LoonylandRegionData(0, False, "Underground Tunnel"), + "Swamp Gas Cavern Front": LoonylandRegionData(0, False, "Swamp Gas Cavern"), + "Swamp Gas Cavern Back": LoonylandRegionData(0, False, "Swamp Gas Cavern"), "A Tiny Cabin": LoonylandRegionData(0, True, ""), "A Cabin Seer": LoonylandRegionData(0, True, ""), "Benny's Cocktails": LoonylandRegionData(0, True, ""), "Dusty Crypt": LoonylandRegionData(0, True, ""), - "Dusty Crypt Entrance": LoonylandRegionData(0, False, ""), + "Dusty Crypt Entrance": LoonylandRegionData(0, False, ""), "Musty Crypt": LoonylandRegionData(0, True, ""), - "Musty Crypt Entrance": LoonylandRegionData(0, False, ""), + "Musty Crypt Entrance": LoonylandRegionData(0, False, ""), "Rusty Crypt": LoonylandRegionData(0, True, ""), - "Rusty Crypt Entrance": LoonylandRegionData(0, False, ""), + "Rusty Crypt Entrance": LoonylandRegionData(0, False, ""), "A Messy Cabin": LoonylandRegionData(0, True, ""), "Under The Lake": LoonylandRegionData(0, True, ""), - "Under The Lake Entrance": LoonylandRegionData(0, False, ""), - "Under The Lake Exit": LoonylandRegionData(0, False, ""), + "Under The Lake Entrance": LoonylandRegionData(0, False, ""), + "Under The Lake Exit": LoonylandRegionData(0, False, ""), "Deeper Under The Lake": LoonylandRegionData(0, True, ""), "Frankenjulie's Laboratory": LoonylandRegionData(0, True, ""), "Haunted Tower": LoonylandRegionData(0, True, ""), @@ -51,51 +52,51 @@ class LoonylandRegionData(NamedTuple): "Haunted Tower, Floor 3": LoonylandRegionData(0, True, ""), "Haunted Tower Roof": LoonylandRegionData(0, True, ""), "Haunted Basement": LoonylandRegionData(0, True, ""), - "Haunted Basement Entrance": LoonylandRegionData(0, False, ""), + "Haunted Basement Entrance": LoonylandRegionData(0, False, ""), "Abandoned Mines": LoonylandRegionData(0, True, ""), - "Abandoned Mines Entrance": LoonylandRegionData(0, False, ""), + "Abandoned Mines Entrance": LoonylandRegionData(0, False, ""), "The Shrine Of Bombulus": LoonylandRegionData(0, True, ""), "A Gloomy Cavern": LoonylandRegionData(0, True, ""), - "A Gloomy Cavern Entrance": LoonylandRegionData(0, False, ""), + "A Gloomy Cavern Entrance": LoonylandRegionData(0, False, ""), "Happy Stick Woods": LoonylandRegionData(0, True, ""), "The Wolf Den": LoonylandRegionData(0, True, ""), - "The Wolf Den Entrance": LoonylandRegionData(0, False, ""), - "The Wolf Den Exit": LoonylandRegionData(0, False, ""), + "The Wolf Den Entrance": LoonylandRegionData(0, False, ""), + "The Wolf Den Exit": LoonylandRegionData(0, False, ""), "A Cabin Larry": LoonylandRegionData(0, True, ""), "Upper Creepy Caverns": LoonylandRegionData(0, True, ""), - "Upper Creepy Caverns Left Warp": LoonylandRegionData(0, False, ""), - "Upper Creepy Caverns Middle Warp": LoonylandRegionData(0, False, ""), - "Upper Creepy Caverns Right Warp": LoonylandRegionData(0, False, ""), + "Upper Creepy Caverns Left Warp": LoonylandRegionData(0, False, ""), + "Upper Creepy Caverns Middle Warp": LoonylandRegionData(0, False, ""), + "Upper Creepy Caverns Right Warp": LoonylandRegionData(0, False, ""), "Under The Ravine": LoonylandRegionData(0, True, ""), - "Creepy Caverns Left": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Left Bottom Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Left Top Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Middle": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Middle Top Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Middle Right Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Right": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Right Left Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Right Bottom Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Left": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Left Bottom Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Left Top Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Middle": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Middle Top Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Middle Right Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Right": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Right Left Warp": LoonylandRegionData(0, False, "Creepy Caverns"), + "Creepy Caverns Right Bottom Warp": LoonylandRegionData(0, False, "Creepy Caverns"), "Castle Vampy": LoonylandRegionData(0, True, ""), - "Castle Vampy Skull Jail": LoonylandRegionData(0, False, "Castle Vampy"), - "Castle Vampy II Main": LoonylandRegionData(0, False, "Castle Vampy II"), - "Castle Vampy II NW": LoonylandRegionData(0, False, "Castle Vampy II"), - "Castle Vampy II NE": LoonylandRegionData(0, False, "Castle Vampy II"), - "Castle Vampy II SW": LoonylandRegionData(0, False, "Castle Vampy II"), - "Castle Vampy II SE": LoonylandRegionData(0, False, "Castle Vampy II"), - "Castle Vampy II Bat Jail": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy Skull Jail": LoonylandRegionData(0, False, "Castle Vampy"), + "Castle Vampy II Main": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy II NW": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy II NE": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy II SW": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy II SE": LoonylandRegionData(0, False, "Castle Vampy II"), + "Castle Vampy II Bat Jail": LoonylandRegionData(0, False, "Castle Vampy II"), "Cabin In The Woods": LoonylandRegionData(0, True, ""), - "Castle Vampy III Main": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy III NW": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy III NE": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy III SW": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy III SE": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy III Pumpkin Jail": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy IV Main": LoonylandRegionData(0, False, "Castle Vampy IV"), - "Castle Vampy IV NW": LoonylandRegionData(0, False, "Castle Vampy IV"), - "Castle Vampy IV NE": LoonylandRegionData(0, False, "Castle Vampy IV"), - "Castle Vampy IV SW": LoonylandRegionData(0, False, "Castle Vampy IV"), - "Castle Vampy IV SE": LoonylandRegionData(0, False, "Castle Vampy IV"), + "Castle Vampy III Main": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy III NW": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy III NE": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy III SW": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy III SE": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy III Pumpkin Jail": LoonylandRegionData(0, False, "Castle Vampy III"), + "Castle Vampy IV Main": LoonylandRegionData(0, False, "Castle Vampy IV"), + "Castle Vampy IV NW": LoonylandRegionData(0, False, "Castle Vampy IV"), + "Castle Vampy IV NE": LoonylandRegionData(0, False, "Castle Vampy IV"), + "Castle Vampy IV SW": LoonylandRegionData(0, False, "Castle Vampy IV"), + "Castle Vampy IV SE": LoonylandRegionData(0, False, "Castle Vampy IV"), "A Cabin Collector": LoonylandRegionData(0, True, ""), "Castle Vampy Roof NE": LoonylandRegionData(0, True, ""), "Castle Vampy Roof SE": LoonylandRegionData(0, True, ""), @@ -103,23 +104,23 @@ class LoonylandRegionData(NamedTuple): "Castle Vampy Roof NW": LoonylandRegionData(0, True, ""), "The Evilizer": LoonylandRegionData(0, True, ""), "The Heart Of Terror": LoonylandRegionData(0, True, ""), - "The Heart Of Terror Entrance": LoonylandRegionData(0, False, ""), - "The Heart Of Terror Exit": LoonylandRegionData(0, False, ""), + "The Heart Of Terror Entrance": LoonylandRegionData(0, False, ""), + "The Heart Of Terror Exit": LoonylandRegionData(0, False, ""), "A Hidey-Hole": LoonylandRegionData(0, True, ""), "Empty Rooftop": LoonylandRegionData(0, True, ""), "Swampdog Lair": LoonylandRegionData(0, True, ""), - "Swampdog Lair Entrance": LoonylandRegionData(0, False, ""), + "Swampdog Lair Entrance": LoonylandRegionData(0, False, ""), "Larry's Lair": LoonylandRegionData(0, True, ""), - #gamemodes - "Bowling": LoonylandRegionData(0, False, ""), - "Survival": LoonylandRegionData(0, False, ""), - "Boss Bash": LoonylandRegionData(0, False, ""), - "Loony Ball": LoonylandRegionData(0, False, ""), - "Remix": LoonylandRegionData(0, False, ""), - #"Bowling", - #"Survival", - #"Boss Bash", - #"Loony Ball", - #"Remix" -} \ No newline at end of file + # gamemodes + "Bowling": LoonylandRegionData(0, False, ""), + "Survival": LoonylandRegionData(0, False, ""), + "Boss Bash": LoonylandRegionData(0, False, ""), + "Loony Ball": LoonylandRegionData(0, False, ""), + "Remix": LoonylandRegionData(0, False, ""), + # "Bowling", + # "Survival", + # "Boss Bash", + # "Loony Ball", + # "Remix" +} diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index d490c63b356d..a536522f5ace 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -80,8 +80,8 @@ def can_enter_vampy_iii(state: CollectionState, player: int) -> bool: def can_enter_vampy_iv(state: CollectionState, player: int) -> bool: return can_enter_vampy_iii(state, player) and state.has("Pumpkin Key", player) -def set_rules(multiworld, world, player): +def set_rules(multiworld, world, player): access_rules = { "Swamp: Mud Path": lambda state: state.has("Boots", player), # "Swamp: Bog Beast": lambda state: True, @@ -99,7 +99,7 @@ def set_rules(multiworld, world, player): # "Rocky Cliffs: Entrance Ledge": lambda state: True, # "Rocky Cliffs: Peak": lambda state: True, # "Woods: SW of Cabin": lambda state: True, - "Witch's Cabin: Bedroom": lambda state: have_light_source(state, player), + "Witch's Cabin: Bedroom": lambda state: have_light_source(state, player), # "Witch's Cabin: Backroom" lambda state: True, # "Bonita's Cabin: Barrel Maze": lambda state: True, "Bog Pit: Top Door": lambda state: state.has("Skull Key", player), @@ -134,8 +134,9 @@ def set_rules(multiworld, world, player): "Tower: Barracks": lambda state: state.has("Ghost Potion", player) and state.has("Bat Key", player), "Tower F2: Skull Puzzle": lambda state: state.has("Ghost Potion", player), # "PolterGuy's Reward": lambda state: True, - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has("Skull Key", - player) and state.has( + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has( + "Skull Key", + player) and state.has( "Pumpkin Key", player), # "Abandoned Mine: Shaft": lambda state: True, # "Shrine of Bombulus: Prize": lambda state: True, @@ -180,7 +181,8 @@ def set_rules(multiworld, world, player): "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), # "Hidey-Hole: Pebbles":: lambda state: True, "Swampdog Lair: Entrance": lambda state: state.has("Boots", player), - "Swampdog Lair: End": lambda state: state.has("Boots", player) and have_light_source(state, player) and state.has( + "Swampdog Lair: End": lambda state: state.has("Boots", player) and have_light_source(state, + player) and state.has( "Fertilizer", player), "Q: Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Doom Daisy", player) and state.has( "Mushroom", player, 10), @@ -199,8 +201,7 @@ def set_rules(multiworld, world, player): "Q: Witch Mushrooms": lambda state: state.has("Mushroom", player, 10), "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), # "The Evilizer - Save Halloween Hill": lambda state: True - } + } for loc in multiworld.get_locations(player): if loc.name in access_rules: add_rule(loc, access_rules[loc.name]) - diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 5db673ad5545..d19d8d63f0b4 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -3,15 +3,15 @@ from BaseClasses import Region, Tutorial, ItemClassification from worlds.AutoWorld import WebWorld, World from .Items import LoonylandItem, item_frequencies, loony_item_table -from .Locations import LoonylandLocation, LoonylandLocationData, loonyland_location_table #, locked_locations +from .Locations import LoonylandLocation, LoonylandLocationData, loonyland_location_table # , locked_locations from .Options import LoonylandOptions from .Regions import loonyland_region_table from .Entrances import set_entrances, LoonylandEntrance from .Rules import set_rules - loonyland_base_id: int = 2876900 + class LoonylandWebWorld(WebWorld): theme = "partyTime" @@ -26,6 +26,7 @@ class LoonylandWebWorld(WebWorld): tutorials = [setup_en] + class LoonylandWorld(World): """The greatest game of all time.""" @@ -42,7 +43,7 @@ def create_item(self, name: str) -> LoonylandItem: def create_items(self) -> None: item_pool: List[LoonylandItem] = [] for name, item in loony_item_table.items(): - if item.id: #and item.can_create(self): + if item.id: # and item.can_create(self): for i in range(item_frequencies.get(name, 1)): item_pool.append(self.create_item(name)) @@ -58,37 +59,37 @@ def create_regions(self) -> None: region = Region(region_name, self.player, self.multiworld) self.multiworld.regions.append(region) - #connect regions + # connect regions # Create locations. for region_name in loonyland_region_table: region = self.get_region(region_name) region.add_locations({ - location_name: location_data.id + loonyland_base_id for location_name, location_data in loonyland_location_table.items() - if location_data.region == region_name # and location_data.can_create(self) + location_name: location_data.id + loonyland_base_id for location_name, location_data in + loonyland_location_table.items() + if location_data.region == region_name # and location_data.can_create(self) }, LoonylandLocation) - #region.add_exits() + # region.add_exits() set_entrances(self.multiworld, self, self.player) - # Place locked locations. - #for location_name, location_data in locked_locations.items(): - # Ignore locations we never created. + # for location_name, location_data in locked_locations.items(): + # Ignore locations we never created. # if not location_data.can_create(self): # continue - # locked_item = self.create_item(location_data_table[location_name].locked_item) - # self.get_location(location_name).place_locked_item(locked_item) + # locked_item = self.create_item(location_data_table[location_name].locked_item) + # self.get_location(location_name).place_locked_item(locked_item) - # Set priority location for the Big Red Button! - #self.options.priority_locations.value.add("The Big Red Button") + # Set priority location for the Big Red Button! + # self.options.priority_locations.value.add("The Big Red Button") def get_filler_item_name(self) -> str: return "A Cool Filler Item (No Satisfaction Guaranteed)" def set_rules(self): # Completion condition. - # self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) + # self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) final_loc = self.get_location("Q: Save Halloween Hill") final_loc.address = None final_loc.place_locked_item(self.create_event("Victory")) @@ -100,4 +101,4 @@ def fill_slot_data(self) -> Dict[str, Any]: return { "sampledata": "plerp" - } \ No newline at end of file + } From 0ad2fb41453615f1caa6bd5ca85b2e0893e16b40 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Wed, 11 Dec 2024 11:12:19 -0500 Subject: [PATCH 26/58] More entrance/region work --- worlds/loonyland/Entrances.py | 65 ++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index 797076b404c4..d6a3d47a9d14 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -59,8 +59,8 @@ def set_entrances(multiworld, world, player): lambda state: state.has("Happy Stick", player)), EntranceData("Zombiton", "A Cabin Larry", True, lambda state: True), EntranceData("Halloween Hill", "The Wolf Den Entrance", True, lambda state: True), - EntranceData("Rocky Cliffs", "Upper Creepy Caverns", True, - lambda state: have_light_source(state, player) and state.has("Bombs", player)), + EntranceData("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, + lambda state: state.has("Bombs", player)), EntranceData("Rocky Cliffs", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), EntranceData("Vampy Land", "Castle Vampy", True, lambda state: True), @@ -85,24 +85,24 @@ def set_entrances(multiworld, world, player): EntranceData("Benny's Cocktails", "Zombiton", True, lambda state: True), EntranceData("Benny's Cocktails", "Underground Tunnel Zombie", True, lambda state: True), - EntranceData("Dusty Crypt", "Dusty Crypt Entrance", True, - lambda state: True), EntranceData("Dusty Crypt Entrance", "Dusty Crypt", True, lambda state: have_light_source(state, player)), EntranceData("Dusty Crypt Entrance", "Halloween Hill", True, lambda state: True), - EntranceData("Musty Crypt", "Musty Crypt Entrance", True, + EntranceData("Dusty Crypt", "Dusty Crypt Entrance", True, lambda state: True), EntranceData("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, player)), EntranceData("Musty Crypt Entrance", "Zombiton", True, lambda state: True), - EntranceData("Rusty Crypt", "Rusty Crypt Entrance", True, + EntranceData("Musty Crypt", "Musty Crypt Entrance", True, lambda state: True), EntranceData("Rusty Crypt Entrance", "Rusty Crypt", True, lambda state: have_light_source(state, player)), EntranceData("Rusty Crypt Entrance", "Halloween Hill", True, lambda state: True), + EntranceData("Rusty Crypt", "Rusty Crypt Entrance", True, + lambda state: True), EntranceData("A Messy Cabin", "Zombiton", True, lambda state: True), EntranceData("Under The Lake Entrance", "Under The Lake", True, lambda state: have_light_source(state, player)), @@ -123,20 +123,14 @@ def set_entrances(multiworld, world, player): lambda state: True), EntranceData("Frankenjulie's Laboratory", "Halloween Hill", True, lambda state: True), - EntranceData("Haunted Tower", "Halloween Hill", True, - lambda state: True), + EntranceData("Haunted Basement", "Haunted Basement", True, + lambda state: have_light_source(state, player)), EntranceData("Haunted Tower", "Haunted Tower, Floor 2", True, lambda state: state.has("Ghost Potion", player)), EntranceData("Haunted Tower", "Haunted Basement Entrance", True, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), - EntranceData("Haunted Basement Entrance", "Haunted Tower", True, - lambda state: state.has("Bat Key", player) and - state.has("Pumpkin Key", player) and - state.has("Skull Key", player)), - EntranceData("Haunted Basement Entrance", "Haunted Basement", True, - lambda state: have_light_source(state, player)), EntranceData("Haunted Tower, Floor 2", "Haunted Tower", True, lambda state: True), EntranceData("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True, @@ -149,25 +143,28 @@ def set_entrances(multiworld, world, player): lambda state: True), EntranceData("Haunted Tower Roof", "Haunted Tower, Floor 3", True, lambda state: True), + EntranceData("Haunted Basement Entrance", "Haunted Tower", True, + lambda state: state.has("Bat Key", player) and + state.has("Pumpkin Key", player) and + state.has("Skull Key", player)), + EntranceData("Haunted Basement Entrance", "Haunted Basement", True, lambda state: True), EntranceData("Haunted Basement", "Haunted Basement Entrance", True, lambda state: True), - EntranceData("Abandoned Mines", "Abandoned Mines Entrance", True, - lambda state: True), EntranceData("Abandoned Mines Entrance", "Abandoned Mines", True, lambda state: have_light_source(state, player)), EntranceData("Abandoned Mines Entrance", "Rocky Cliffs", True, lambda state: True), - EntranceData("The Shrine Of Bombulus", "Rocky Cliffs", True, + EntranceData("Abandoned Mines", "Abandoned Mines Entrance", True, lambda state: True), - EntranceData("A Gloomy Cavern", "A Gloomy Cavern Entrance", True, + EntranceData("The Shrine Of Bombulus", "Rocky Cliffs", True, lambda state: True), EntranceData("A Gloomy Cavern Entrance", "A Gloomy Cavern", True, lambda state: have_light_source(state, player)), EntranceData("A Gloomy Cavern Entrance", "Rocky Cliffs", True, lambda state: True), - EntranceData("Happy Stick Woods", "Halloween Hill", True, + EntranceData("A Gloomy Cavern", "A Gloomy Cavern Entrance", True, lambda state: True), - EntranceData("The Wolf Den", "The Wolf Den Entrance", True, + EntranceData("Happy Stick Woods", "Halloween Hill", True, lambda state: True), EntranceData("The Wolf Den Entrance", "The Wolf Den", True, lambda state: state.has("Silver Sling", @@ -175,22 +172,42 @@ def set_entrances(multiworld, world, player): player)), EntranceData("The Wolf Den Entrance", "Halloween Hill", True, lambda state: True), + EntranceData("The Wolf Den", "The Wolf Den Entrance", True, + lambda state: True), EntranceData("The Wolf Den", "Larry's Lair", True, lambda state: state.has("Silver Sling", player)), EntranceData("A Cabin Larry", "Zombiton", True, lambda state: True), - EntranceData("Upper Creepy Caverns", "Rocky Cliffs", True, + + + EntranceData("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), - EntranceData("Upper Creepy Caverns", "Creepy Caverns Left", True, + EntranceData("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", True, + lambda state: have_light_source(state, player)), + EntranceData("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", True, + lambda state: True), + + EntranceData("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), - EntranceData("Upper Creepy Caverns", "Creepy Caverns Middle", True, + EntranceData("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), + EntranceData("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", True, + lambda state: True), + + EntranceData("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle", True, + lambda state: have_light_source(state, player)), + EntranceData("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", True, + lambda state: have_light_source(state, player)), + EntranceData("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", True, + lambda state: True), + EntranceData("Under The Ravine", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), EntranceData("Under The Ravine", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), + EntranceData("Creepy Caverns Left", "Rocky Cliffs", True, lambda state: True), - EntranceData("Creepy Caverns Left", "Upper Creepy Caverns", True, + EntranceData("Creepy Caverns Left", "Upper Creepy Caverns Middle Warp", True, lambda state: have_light_source(state, player)), EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), From 1f975e13c728496f218bd86fb6b2d03e7616689a Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Wed, 11 Dec 2024 21:27:28 -0500 Subject: [PATCH 27/58] 1.0 working --- worlds/loonyland/Defines.py | 63 +++++++++++++++++++++++++++++++++ worlds/loonyland/Items.py | 65 ++++++++++++++++++----------------- worlds/loonyland/Locations.py | 25 ++++++++------ 3 files changed, 110 insertions(+), 43 deletions(-) create mode 100644 worlds/loonyland/Defines.py diff --git a/worlds/loonyland/Defines.py b/worlds/loonyland/Defines.py new file mode 100644 index 000000000000..974498ea143f --- /dev/null +++ b/worlds/loonyland/Defines.py @@ -0,0 +1,63 @@ +VAR_HEART = 0 # 0-19 = super hearts +VAR_LIGHTNING = 20 # 20-29 = lightning bolts +VAR_ARROW = 30 # 30-39 = arrows +VAR_PANTS = 40 # 40-49 = pants +VAR_QUESTASSIGN = 50 # 50-69 = quest (N-50) has been assigned +VAR_QUESTDONE = 70 # 70-89 = quest (N-70) is complete +VAR_MUSHROOM = 90 # 90-99 = mushrooms +VAR_MYSORB = 100 # 100-103 = have mystery orb +VAR_WEAPON = 104 # 104-110 = have access to weapon +VAR_KEY = 111 # 111-113 = have the three special keys +VAR_SKULLKEY = 111 # 111 = have the skull key +VAR_BATKEY = 112 # 112 = have the bat key +VAR_PUMPKINKEY = 113 # 113 = have the pumpkin key +VAR_BOOTS = 114 # 114 = have the rubber booties +VAR_STICK = 115 # 115 = have the stick +VAR_TORCH = 116 # 116 = the stick is lit +VAR_FERTILIZER = 117 # 117 = have fertilizer +VAR_SILVER = 118 # 118 = have the silver +VAR_DAISY = 119 # 119 = have doom daisy +VAR_POTION = 120 # 120 = have ghost potion +VAR_VAMPBUST = 121 # 121-128 = have vamp bust +VAR_CAT = 129 # 129 = have cat +VAR_GEM = 130 # 130-135 = super gems +VAR_ORBSTAND = 150 # 150-153 = have installed orb +VAR_BOOTSALES = 154 # 154 = have talked to boot salesman once +VAR_WITCHTALK = 155 # 155 = number of times you've annoyed the witch +VAR_BRIDGEOPEN = 156 # 156 = the Underground Tunnel bridge has been opened +VAR_ZOMBIE = 157 # 157-159 = each crypt has been cleaned out +VAR_ZOMBIEREWARD= 160 # 160 = have received the zombie reward money +VAR_TRIPLEFIRE = 161 # 161 = have triple-fire crystal +VAR_TALISMAN = 162 # 162 = have happy stick talisman +VAR_VAMPYWALL = 163 # 163 = wall to vampy land opened +VAR_BATSTATUE = 164 # 164-167 = have each bat statue +VAR_BATSTAND = 168 # 168-171 = bat statue is on stand +VAR_VAMPSTAND = 172 # 172-179 = vamp bust is on stand +VAR_KNOWWOLVES = 180 # 180 = have already talked to self about werewolves +VAR_DOLL = 181 # 181-188 = have doll +VAR_REFLECT = 189 # 189 = have reflect gem +VAR_DOLLGIVEN = 190 # 190-197 = have given doll to girl +VAR_TOWNOPEN = 198 # 198 = have opened zombiton +VAR_LEFTBOMB = 199 # 199 = have left bomb room with bombs (so remove the powerups) +VAR_HELPERBAT = 200 # 200 = have the helper bat +VAR_TALKBAT = 201 # 201 = have talked to the bat once +VAR_TALKBRIDGE = 202 # 202 = have talked to the bridge guy +VAR_PAIDBRIDGE = 203 # 203 = have paid the bridge guy +VAR_PORTALOPEN = 204 # 204 = the portal is officially open +VAR_GAVEDAISY = 205 # 205 = gave daisy to witch +VAR_DEADELDER = 206 # 206-209 = elder has been beaten +VAR_GATEOUT = 210 # 210 = mystery lake electrogate is shorted out +VAR_DEADBONK = 211 # 211 = bonkula is dead +VAR_SEERTALK = 212 # 212 = has talked to seer +VAR_MINERTALK = 213 # 213 = have talked to miner +VAR_HPSALES = 214 # 214 = have talked to hot pants salesman +VAR_DEALERTALK = 215 # 215 = have talked to arms dealer +VAR_HIPUZZLE = 216 # 216 = the HI puzzle is solved in Remix mode + +VAR_WITCHREWARD = 217 # 217 = Witch has given you mushroom prize +VAR_LANTERN = 218 # 218 = Have the lantern +VAR_TREEREWARD = 219 # 219 = Rewarded for tree trimming +VAR_SILVERSLING = 220 # 220 = Have Silver Bullets +VAR_LARRYREWARD = 221 # 221 = Rewarded for bringing Larry Home +VAR_CROPSREWARD = 222 # 222 = Rewarded for crop smash +VAR_ZOMBIEGEM = 223 # 223 = red 100 gem \ No newline at end of file diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/Items.py index 59267020c833..314936c98e04 100644 --- a/worlds/loonyland/Items.py +++ b/worlds/loonyland/Items.py @@ -3,6 +3,7 @@ from BaseClasses import Item, ItemClassification from worlds.AutoWorld import World from enum import Enum +from .Defines import * loonyland_base_id: int = 2876900 @@ -41,38 +42,38 @@ class LoonylandItemData(NamedTuple): } loony_item_table: Dict[str, LoonylandItemData] = { - "Heart": LoonylandItemData(loonyland_base_id + 0, ItemCategory.ITEM, ItemClassification.useful), - "Lightning": LoonylandItemData(loonyland_base_id + 1, ItemCategory.ITEM, ItemClassification.useful), - "Arrow": LoonylandItemData(loonyland_base_id + 2, ItemCategory.ITEM, ItemClassification.useful), - "Pants": LoonylandItemData(loonyland_base_id + 3, ItemCategory.ITEM, ItemClassification.useful), - "Mushroom": LoonylandItemData(loonyland_base_id + 4, ItemCategory.ITEM, ItemClassification.progression), - "Orb": LoonylandItemData(loonyland_base_id + 5, ItemCategory.ITEM, ItemClassification.progression), - "Bombs": LoonylandItemData(loonyland_base_id + 6, ItemCategory.ITEM, ItemClassification.progression), - "Shock Wand": LoonylandItemData(loonyland_base_id + 7, ItemCategory.ITEM, ItemClassification.progression), - "Ice Spear": LoonylandItemData(loonyland_base_id + 8, ItemCategory.ITEM, ItemClassification.progression), - "Cactus": LoonylandItemData(loonyland_base_id + 9, ItemCategory.ITEM, ItemClassification.progression), - "Boomerang": LoonylandItemData(loonyland_base_id + 10, ItemCategory.ITEM, ItemClassification.progression), - "Whoopee": LoonylandItemData(loonyland_base_id + 11, ItemCategory.ITEM, ItemClassification.progression), - "Hot Pants": LoonylandItemData(loonyland_base_id + 12, ItemCategory.ITEM, ItemClassification.progression), - "Skull Key": LoonylandItemData(loonyland_base_id + 13, ItemCategory.ITEM, ItemClassification.progression), - "Bat Key": LoonylandItemData(loonyland_base_id + 14, ItemCategory.ITEM, ItemClassification.progression), - "Pumpkin Key": LoonylandItemData(loonyland_base_id + 15, ItemCategory.ITEM, ItemClassification.progression), - "Boots": LoonylandItemData(loonyland_base_id + 16, ItemCategory.ITEM, ItemClassification.progression), - "Stick": LoonylandItemData(loonyland_base_id + 17, ItemCategory.ITEM, ItemClassification.progression), - "Fertilizer": LoonylandItemData(loonyland_base_id + 18, ItemCategory.ITEM, ItemClassification.progression), - "Silver": LoonylandItemData(loonyland_base_id + 19, ItemCategory.ITEM, ItemClassification.progression), - "Doom Daisy": LoonylandItemData(loonyland_base_id + 20, ItemCategory.ITEM, ItemClassification.progression), - "Ghost Potion": LoonylandItemData(loonyland_base_id + 21, ItemCategory.ITEM, ItemClassification.progression), - "Vamp Statue": LoonylandItemData(loonyland_base_id + 22, ItemCategory.ITEM, ItemClassification.progression), - "Cat": LoonylandItemData(loonyland_base_id + 23, ItemCategory.ITEM, ItemClassification.progression), - "Big Gem": LoonylandItemData(loonyland_base_id + 24, ItemCategory.ITEM, ItemClassification.progression), - "Zombie Reward": LoonylandItemData(loonyland_base_id + 25, ItemCategory.ITEM, ItemClassification.filler), - "3 way": LoonylandItemData(loonyland_base_id + 26, ItemCategory.ITEM, ItemClassification.useful), - "Happy Stick": LoonylandItemData(loonyland_base_id + 27, ItemCategory.ITEM, ItemClassification.progression), - "Bat Statue": LoonylandItemData(loonyland_base_id + 28, ItemCategory.ITEM, ItemClassification.progression), - "Lantern": LoonylandItemData(loonyland_base_id + 29, ItemCategory.ITEM, ItemClassification.progression), - "Reflect": LoonylandItemData(loonyland_base_id + 30, ItemCategory.ITEM, ItemClassification.useful), - "Silver Sling": LoonylandItemData(loonyland_base_id + 31, ItemCategory.ITEM, ItemClassification.progression) + "Heart": LoonylandItemData(loonyland_base_id + VAR_HEART, ItemCategory.ITEM, ItemClassification.useful), + "Lightning": LoonylandItemData(loonyland_base_id + VAR_LIGHTNING, ItemCategory.ITEM, ItemClassification.useful), + "Arrow": LoonylandItemData(loonyland_base_id + VAR_ARROW, ItemCategory.ITEM, ItemClassification.useful), + "Pants": LoonylandItemData(loonyland_base_id + VAR_PANTS, ItemCategory.ITEM, ItemClassification.useful), + "Mushroom": LoonylandItemData(loonyland_base_id + VAR_MUSHROOM, ItemCategory.ITEM, ItemClassification.progression), + "Orb": LoonylandItemData(loonyland_base_id + VAR_MYSORB, ItemCategory.ITEM, ItemClassification.progression), + "Bombs": LoonylandItemData(loonyland_base_id + VAR_WEAPON, ItemCategory.ITEM, ItemClassification.progression), + "Shock Wand": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 1, ItemCategory.ITEM, ItemClassification.progression), + "Ice Spear": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 2, ItemCategory.ITEM, ItemClassification.progression), + "Cactus": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 3, ItemCategory.ITEM, ItemClassification.progression), + "Boomerang": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 4, ItemCategory.ITEM, ItemClassification.progression), + "Whoopee": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 5, ItemCategory.ITEM, ItemClassification.progression), + "Hot Pants": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 6, ItemCategory.ITEM, ItemClassification.progression), + "Skull Key": LoonylandItemData(loonyland_base_id + VAR_SKULLKEY, ItemCategory.ITEM, ItemClassification.progression), + "Bat Key": LoonylandItemData(loonyland_base_id + VAR_BATKEY, ItemCategory.ITEM, ItemClassification.progression), + "Pumpkin Key": LoonylandItemData(loonyland_base_id + VAR_PUMPKINKEY, ItemCategory.ITEM, ItemClassification.progression), + "Boots": LoonylandItemData(loonyland_base_id + VAR_BOOTS, ItemCategory.ITEM, ItemClassification.progression), + "Stick": LoonylandItemData(loonyland_base_id + VAR_STICK, ItemCategory.ITEM, ItemClassification.progression), + "Fertilizer": LoonylandItemData(loonyland_base_id + VAR_FERTILIZER, ItemCategory.ITEM, ItemClassification.progression), + "Silver": LoonylandItemData(loonyland_base_id + VAR_SILVER, ItemCategory.ITEM, ItemClassification.progression), + "Doom Daisy": LoonylandItemData(loonyland_base_id + VAR_DAISY, ItemCategory.ITEM, ItemClassification.progression), + "Ghost Potion": LoonylandItemData(loonyland_base_id + VAR_POTION, ItemCategory.ITEM, ItemClassification.progression), + "Vamp Statue": LoonylandItemData(loonyland_base_id + VAR_VAMPBUST, ItemCategory.ITEM, ItemClassification.progression), + "Cat": LoonylandItemData(loonyland_base_id + VAR_CAT, ItemCategory.ITEM, ItemClassification.progression), + "Big Gem": LoonylandItemData(loonyland_base_id + VAR_GEM, ItemCategory.ITEM, ItemClassification.progression), + "Zombie Reward": LoonylandItemData(loonyland_base_id + VAR_ZOMBIEGEM, ItemCategory.ITEM, ItemClassification.filler), + "3 way": LoonylandItemData(loonyland_base_id + VAR_TRIPLEFIRE, ItemCategory.ITEM, ItemClassification.useful), + "Happy Stick": LoonylandItemData(loonyland_base_id + VAR_TALISMAN, ItemCategory.ITEM, ItemClassification.progression), + "Bat Statue": LoonylandItemData(loonyland_base_id + VAR_BATSTATUE, ItemCategory.ITEM, ItemClassification.progression), + "Lantern": LoonylandItemData(loonyland_base_id + VAR_LANTERN, ItemCategory.ITEM, ItemClassification.progression), + "Reflect": LoonylandItemData(loonyland_base_id + VAR_REFLECT, ItemCategory.ITEM, ItemClassification.useful), + "Silver Sling": LoonylandItemData(loonyland_base_id + VAR_SILVERSLING, ItemCategory.ITEM, ItemClassification.progression) # TODO add cheats # TODO filler # TODO traps diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index cb317301bddc..d8d119b2fe3f 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -119,16 +119,19 @@ class LoonylandLocationData(NamedTuple): "Swampdog Lair: Entrance": LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair"), "Swampdog Lair: End": LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair"), "Q: Save Halloween Hill": LoonylandLocationData(94, LocationCategory.QUEST, "The Evilizer"), - "Q: Ghostbusting": LoonylandLocationData(95, LocationCategory.QUEST, "The Witch's Cabin Front"), - "Q: Hairy Larry": LoonylandLocationData(96, LocationCategory.QUEST, "A Cabin Larry"), - "Q: Scaredy Cat": LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill"), - "Q: Silver Bullet": LoonylandLocationData(98, LocationCategory.QUEST, "Halloween Hill"), - "Q: Smashing Pumpkins": LoonylandLocationData(99, LocationCategory.QUEST, "Halloween Hill"), - "Q: Sticky Shoes": LoonylandLocationData(100, LocationCategory.QUEST, "Halloween Hill"), - "Q: The Collection": LoonylandLocationData(101, LocationCategory.QUEST, "A Cabin Collector"), - "Q: The Rescue": LoonylandLocationData(102, LocationCategory.QUEST, "A Gloomy Cavern"), - "Q: Tree Trimming": LoonylandLocationData(103, LocationCategory.QUEST, "A Cabin Trees"), - "Q: Witch Mushrooms": LoonylandLocationData(104, LocationCategory.QUEST, "The Witch's Cabin Front"), - "Q: Zombie Stomp": LoonylandLocationData(105, LocationCategory.QUEST, "Zombiton") + "Q: Tree Trimming": LoonylandLocationData(95, LocationCategory.QUEST, "A Cabin Trees"), + "Q: Scaredy Cat": LoonylandLocationData(96, LocationCategory.QUEST, "Halloween Hill"), + "Q: Sticky Shoes": LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill"), + "Q: Mushroom Hunt": LoonylandLocationData(98, LocationCategory.QUEST, "The Witch's Cabin Front"), + "Q: Zombie Stomp": LoonylandLocationData(99, LocationCategory.QUEST, "Zombiton"), + "Q: Smashing Pumpkins": LoonylandLocationData(100, LocationCategory.QUEST, "Halloween Hill"), + "Q: Silver Bullet": LoonylandLocationData(101, LocationCategory.QUEST, "Halloween Hill"), + "Q: Hairy Larry": LoonylandLocationData(102, LocationCategory.QUEST, "A Cabin Larry"), + "Q: Ghostbusting": LoonylandLocationData(103, LocationCategory.QUEST, "The Witch's Cabin Front"), + "Q: The Rescue": LoonylandLocationData(104, LocationCategory.QUEST, "A Gloomy Cavern"), + "Q: The Collection": LoonylandLocationData(105, LocationCategory.QUEST, "A Cabin Collector") + + + # todo the 40 badge locations } From 2bef9e7189fbe92bf7daf8e123d439b252ea7e55 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 14 Dec 2024 17:28:49 -0500 Subject: [PATCH 28/58] switch to auto generated data objects --- worlds/loonyland/Data/defines.py | 207 +++++++++++++ worlds/loonyland/Data/entrance_data.py | 188 ++++++++++++ worlds/loonyland/Data/item_data.py | 41 +++ worlds/loonyland/Data/location_data.py | 111 +++++++ worlds/loonyland/Data/region_data.py | 107 +++++++ worlds/loonyland/Data/rules_data.py | 46 +++ worlds/loonyland/Defines.py | 63 ---- worlds/loonyland/Entrances.py | 387 +------------------------ worlds/loonyland/Items.py | 67 +---- worlds/loonyland/Locations.py | 118 +------- worlds/loonyland/Regions.py | 122 +------- worlds/loonyland/Rules.py | 132 +-------- worlds/loonyland/__init__.py | 19 +- 13 files changed, 728 insertions(+), 880 deletions(-) create mode 100644 worlds/loonyland/Data/defines.py create mode 100644 worlds/loonyland/Data/entrance_data.py create mode 100644 worlds/loonyland/Data/item_data.py create mode 100644 worlds/loonyland/Data/location_data.py create mode 100644 worlds/loonyland/Data/region_data.py create mode 100644 worlds/loonyland/Data/rules_data.py delete mode 100644 worlds/loonyland/Defines.py diff --git a/worlds/loonyland/Data/defines.py b/worlds/loonyland/Data/defines.py new file mode 100644 index 000000000000..4de22044f367 --- /dev/null +++ b/worlds/loonyland/Data/defines.py @@ -0,0 +1,207 @@ +VAR_HEART = 0 +VAR_LIGHTNING = 20 +VAR_ARROW = 30 +VAR_PANTS = 40 +VAR_QUESTASSIGN = 50 +VAR_QUESTDONE = 70 +VAR_MUSHROOM = 90 +VAR_MYSORB = 100 +VAR_WEAPON = 104 +VAR_WBOMBS = 104 +VAR_WLIGHTNING = 105 +VAR_WICE = 106 +VAR_WCACTUS = 107 +VAR_WBOOMERANG = 108 +VAR_WWHOOPEE = 109 +VAR_WHOTPANTS = 110 +VAR_KEY = 111 +VAR_SKULLKEY = 111 +VAR_BATKEY = 112 +VAR_PUMPKINKEY = 113 +VAR_BOOTS = 114 +VAR_STICK = 115 +VAR_TORCH = 116 +VAR_FERTILIZER = 117 +VAR_SILVER = 118 +VAR_DAISY = 119 +VAR_POTION = 120 +VAR_VAMPBUST = 121 +VAR_CAT = 129 +VAR_GEM = 130 +VAR_ORBSTAND = 150 +VAR_BOOTSALES = 154 +VAR_WITCHTALK = 155 +VAR_BRIDGEOPEN = 156 +VAR_ZOMBIE = 157 +VAR_ZOMBIEREWARD = 160 +VAR_TRIPLEFIRE = 161 +VAR_TALISMAN = 162 +VAR_VAMPYWALL = 163 +VAR_BATSTATUE = 164 +VAR_BATSTAND = 168 +VAR_VAMPSTAND = 172 +VAR_KNOWWOLVES = 180 +VAR_DOLL = 181 +VAR_REFLECT = 189 +VAR_DOLLGIVEN = 190 +VAR_TOWNOPEN = 198 +VAR_LEFTBOMB = 199 +VAR_HELPERBAT = 200 +VAR_TALKBAT = 201 +VAR_TALKBRIDGE = 202 +VAR_PAIDBRIDGE = 203 +VAR_PORTALOPEN = 204 +VAR_GAVEDAISY = 205 +VAR_DEADELDER = 206 +VAR_GATEOUT = 210 +VAR_DEADBONK = 211 +VAR_SEERTALK = 212 +VAR_MINERTALK = 213 +VAR_HPSALES = 214 +VAR_DEALERTALK = 215 +VAR_HIPUZZLE = 216 +VAR_WITCHREWARD = 217 +VAR_LANTERN = 218 +VAR_TREEREWARD = 219 +VAR_SILVERSLING = 220 +VAR_LARRYREWARD = 221 +VAR_CROPSREWARD = 222 +VAR_ZOMBIEGEM = 223 +ITM_NONE = 0 +ITM_TINYHEART = 1 +ITM_BIGHEART = 2 +ITM_SUPERHEART = 3 +ITM_LITTLEGEM = 4 +ITM_BIGGEM = 5 +ITM_SUPERGEM = 6 +ITM_FIREPOWERUP = 7 +ITM_RANGEUP = 8 +ITM_FIRERATEUP = 9 +ITM_KEY = 10 +ITM_KEY2 = 11 +ITM_KEY3 = 12 +ITM_KEY4 = 13 +ITM_WBOMB = 14 +ITM_WLIGHTNING = 15 +ITM_WICE = 16 +ITM_WCACTUS = 17 +ITM_WBOOMERANG = 18 +ITM_WWHOOPEE = 19 +ITM_WHOTPANTS = 20 +ITM_POTION = 21 +ITM_DOOR = 22 +ITM_SKULLDOOR = 23 +ITM_BATDOOR = 24 +ITM_PUMPKINDOOR = 25 +ITM_DOOR2 = 26 +ITM_SKULLDOOR2 = 27 +ITM_BATDOOR2 = 28 +ITM_PUMPKINDOOR2 = 29 +ITM_TREE1 = 30 +ITM_TREE2 = 31 +ITM_LAKECAVE = 32 +ITM_TABLE = 33 +ITM_STOOL = 34 +ITM_CHAIR = 35 +ITM_CHAIR2 = 36 +ITM_CHAIR3 = 37 +ITM_CHAIR4 = 38 +ITM_CHAIR5 = 39 +ITM_BIGCHAIR = 40 +ITM_BIGCHAIR2 = 41 +ITM_BIGCHAIR3 = 42 +ITM_BIGCHAIR4 = 43 +ITM_MYSORB = 44 +ITM_ORBSTAND = 45 +ITM_ORBSTAND2 = 46 +ITM_SAVEGEM = 47 +ITM_BOTTLE = 48 +ITM_BOTTLE2 = 49 +ITM_BOTTLE3 = 50 +ITM_BOTTLE4 = 51 +ITM_BOTTLE5 = 52 +ITM_BOTTLE6 = 53 +ITM_BOTTLE7 = 54 +ITM_BOTTLE8 = 55 +ITM_BOTTLE9 = 56 +ITM_BOTTLE10 = 57 +ITM_BOTTLE11 = 58 +ITM_SIGN = 59 +ITM_SIGN2 = 60 +ITM_SIGN3 = 61 +ITM_KNIGHT = 62 +ITM_KNIGHT2 = 63 +ITM_CLOCK = 64 +ITM_CANDLE = 65 +ITM_BOOKCASE = 66 +ITM_BED = 67 +ITM_LOG = 68 +ITM_LOG2 = 69 +ITM_LOG3 = 70 +ITM_TWIG = 71 +ITM_ROCK = 72 +ITM_ROCKPILE = 73 +ITM_BARREL = 74 +ITM_BARREL2 = 75 +ITM_TREE3 = 76 +ITM_TREE4 = 77 +ITM_TREE5 = 78 +ITM_TREE6 = 79 +ITM_TREE7 = 80 +ITM_SHROOM = 81 +ITM_DAISY = 82 +ITM_SILVER = 83 +ITM_MAGICPLANT = 84 +ITM_WALKPLANT = 85 +ITM_SWITCH1ON = 86 +ITM_SWITCH1OFF = 87 +ITM_SWITCH2 = 88 +ITM_GRASS = 89 +ITM_GRASS2 = 90 +ITM_GRASS3 = 91 +ITM_CATTAIL = 92 +ITM_LILROCK = 93 +ITM_BIGROCK = 94 +ITM_BOOMROCK = 95 +ITM_TORCH = 96 +ITM_GASHOLE = 97 +ITM_GASPIPELR = 98 +ITM_GASPIPEUD = 99 +ITM_GASPIPEDR = 100 +ITM_GASPIPEDL = 101 +ITM_GASPIPEUR = 102 +ITM_GASPIPEUL = 103 +ITM_GASSPARK = 104 +ITM_GRAVE = 105 +ITM_GRAVE2 = 106 +ITM_TABLE2 = 107 +ITM_AUTODOOR = 108 +ITM_AUTODOOR2 = 109 +ITM_TALISMAN = 110 +ITM_TRIPLEFIRE = 111 +ITM_BUSTSTAND = 112 +ITM_BUST = 113 +ITM_BUSTONSTAND = 114 +ITM_BATSTAND = 115 +ITM_BAT = 116 +ITM_BATONSTAND = 117 +ITM_BATDOLL = 118 +ITM_SKELDOLL = 119 +ITM_FROGDOLL = 120 +ITM_GHOSTDOLL = 121 +ITM_MUMMYDOLL = 122 +ITM_SWAMPDOLL = 123 +ITM_VAMPDOLL = 124 +ITM_WOLFDOLL = 125 +ITM_PORTAL = 126 +ITM_BADGE = 127 +ITM_CAT = 128 +ITM_ZOMBGEM = 129 +ITM_BOOTS = 130 +ITM_FERTILIZER = 131 +ITM_GHOSTPOTION = 132 +ITM_LANTERN = 133 +ITM_REFLECTGEM = 134 +ITM_SILVERSLING = 135 +ITM_STICK = 136 +ITM_ARCHIPELAGO = 137 diff --git a/worlds/loonyland/Data/entrance_data.py b/worlds/loonyland/Data/entrance_data.py new file mode 100644 index 000000000000..60b692ebb34d --- /dev/null +++ b/worlds/loonyland/Data/entrance_data.py @@ -0,0 +1,188 @@ +from typing import List +from worlds.loonyland.Entrances import LL_Entrance +from worlds.loonyland.Rules import have_light_source +def set_entrances(multiworld, world, player): + loonyland_entrance_table: List[LL_Entrance] = [ + LL_Entrance("Menu", "Halloween Hill", False, lambda state: True), + LL_Entrance("Menu", "Bowling", False, lambda state: True), + LL_Entrance("Menu", "Survival", False, lambda state: True), + LL_Entrance("Menu", "Boss Bash", False, lambda state: True), + LL_Entrance("Menu", "Loony Ball", False, lambda state: True), + LL_Entrance("Menu", "Remix", False, lambda state: True), + LL_Entrance("Halloween Hill", "A Cabin Trees", True, lambda state: True), + LL_Entrance("Halloween Hill", "The Witch's Cabin Front", True, lambda state: True), + LL_Entrance("Halloween Hill", "Bonita's Cabin", True, lambda state: True), + LL_Entrance("Halloween Hill", "Underground Tunnel Top", True, lambda state: True), + LL_Entrance("Halloween Hill", "The Bog Pit", True, lambda state: True), + LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False, lambda state: True), + LL_Entrance("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern Front", True, lambda state: True), + LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False, lambda state: True), + LL_Entrance("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True, lambda state: True), + LL_Entrance("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), + LL_Entrance("Halloween Hill", "The Witch's Cabin Back", True, lambda state: True), + LL_Entrance("Zombiton", "A Cabin Seer", True, lambda state: True), + LL_Entrance("Zombiton", "Benny's Cocktails", True, lambda state: True), + LL_Entrance("Halloween Hill", "Dusty Crypt Entrance", True, lambda state: True), + LL_Entrance("Zombiton", "Musty Crypt Entrance", True, lambda state: True), + LL_Entrance("Zombiton", "A Messy Cabin", True, lambda state: True), + LL_Entrance("Halloween Hill", "Rusty Crypt Entrance", True, lambda state: True), + LL_Entrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), + LL_Entrance("Halloween Hill", "Haunted Tower", True, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Rocky Cliffs", "Abandoned Mines Entrance", True, lambda state: True), + LL_Entrance("Rocky Cliffs", "The Shrine Of Bombulus", True, lambda state: True), + LL_Entrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, player)), + LL_Entrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", player)), + LL_Entrance("Zombiton", "A Cabin Larry", True, lambda state: True), + LL_Entrance("Halloween Hill", "The Wolf Den Entrance", True, lambda state: True), + LL_Entrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", player)), + LL_Entrance("Rocky Cliffs", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), + LL_Entrance("Vampy Land", "Castle Vampy", True, lambda state: True), + LL_Entrance("Halloween Hill", "Cabin In The Woods", True, lambda state: True), + LL_Entrance("Halloween Hill", "A Cabin Collector", True, lambda state: True), + LL_Entrance("Halloween Hill", "A Hidey-Hole", True, lambda state: True), + LL_Entrance("Vampy Land", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), + LL_Entrance("Halloween Hill", "Swampdog Lair", True, lambda state: True), + LL_Entrance("A Cabin Trees", "Halloween Hill", True, lambda state: True), + LL_Entrance("The Witch's Cabin Front", "Halloween Hill", True, lambda state: True), + LL_Entrance("The Witch's Cabin Back", "Halloween Hill", True, lambda state: True), + LL_Entrance("Bonita's Cabin", "Halloween Hill", True, lambda state: True), + LL_Entrance("The Bog Pit", "Halloween Hill", True, lambda state: have_light_source(state, player)), + LL_Entrance("Underground Tunnel Top", "Halloween Hill", True, lambda state: True), + LL_Entrance("Underground Tunnel Zombie", "Benny's Cocktails", True, lambda state: True), + LL_Entrance("Swamp Gas Cavern Front", "Slurpy Swamp Mud North Warp", True, lambda state: True), + LL_Entrance("Swamp Gas Cavern Back", "Slurpy Swamp Mud East Warp", True, lambda state: True), + LL_Entrance("A Tiny Cabin", "Halloween Hill", True, lambda state: True), + LL_Entrance("A Cabin Seer", "Zombiton", True, lambda state: True), + LL_Entrance("Benny's Cocktails", "Zombiton", True, lambda state: True), + LL_Entrance("Benny's Cocktails", "Underground Tunnel Zombie", True, lambda state: True), + LL_Entrance("Dusty Crypt Entrance", "Dusty Crypt", True, lambda state: have_light_source(state, player)), + LL_Entrance("Dusty Crypt Entrance", "Halloween Hill", True, lambda state: True), + LL_Entrance("Dusty Crypt", "Dusty Crypt Entrance", True, lambda state: True), + LL_Entrance("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, player)), + LL_Entrance("Musty Crypt Entrance", "Zombiton", True, lambda state: True), + LL_Entrance("Musty Crypt", "Musty Crypt Entrance", True, lambda state: True), + LL_Entrance("Rusty Crypt Entrance", "Rusty Crypt", True, lambda state: have_light_source(state, player)), + LL_Entrance("Rusty Crypt Entrance", "Halloween Hill", True, lambda state: True), + LL_Entrance("Rusty Crypt", "Rusty Crypt Entrance", True, lambda state: True), + LL_Entrance("A Messy Cabin", "Zombiton", True, lambda state: True), + LL_Entrance("Under The Lake Entrance", "Under The Lake", True, lambda state: have_light_source(state, player)), + LL_Entrance("Under The Lake Entrance", "Halloween Hill", True, lambda state: True), + LL_Entrance("Under The Lake", "Under The Lake Entrance", True, lambda state: True), + LL_Entrance("Under The Lake", "Under The Lake Exit", True, lambda state: True), + LL_Entrance("Under The Lake Exit", "Deeper Under The Lake", True, lambda state: True), + LL_Entrance("Under The Lake Exit", "Under The Lake", True, lambda state: True), + LL_Entrance("Deeper Under The Lake", "Under The Lake Exit", True, lambda state: True), + LL_Entrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True, lambda state: True), + LL_Entrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True, lambda state: True), + LL_Entrance("Frankenjulie's Laboratory", "Halloween Hill", True, lambda state: True), + LL_Entrance("Haunted Basement", "Haunted Basement", True, lambda state: have_light_source(state, player)), + LL_Entrance("Haunted Tower", "Haunted Tower, Floor 2", True, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower", "Haunted Basement Entrance", True, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), + LL_Entrance("Haunted Tower, Floor 2", "Haunted Tower", True, lambda state: True), + LL_Entrance("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower, Floor 3", "Haunted Tower, Floor 2", True, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower, Floor 3", "Haunted Tower Roof", True, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower Roof", "Halloween Hill", True, lambda state: True), + LL_Entrance("Haunted Tower Roof", "Haunted Tower, Floor 3", True, lambda state: True), + LL_Entrance("Haunted Basement Entrance", "Haunted Tower", True, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), + LL_Entrance("Haunted Basement Entrance", "Haunted Basement", True, lambda state: True), + LL_Entrance("Haunted Basement", "Haunted Basement Entrance", True, lambda state: True), + LL_Entrance("Abandoned Mines Entrance", "Abandoned Mines", True, lambda state: have_light_source(state, player)), + LL_Entrance("Abandoned Mines Entrance", "Rocky Cliffs", True, lambda state: True), + LL_Entrance("Abandoned Mines", "Abandoned Mines Entrance", True, lambda state: True), + LL_Entrance("The Shrine Of Bombulus", "Rocky Cliffs", True, lambda state: True), + LL_Entrance("A Gloomy Cavern Entrance", "A Gloomy Cavern", True, lambda state: have_light_source(state, player)), + LL_Entrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True, lambda state: True), + LL_Entrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", True, lambda state: True), + LL_Entrance("Happy Stick Woods", "Halloween Hill", True, lambda state: True), + LL_Entrance("The Wolf Den Entrance", "The Wolf Den", True, lambda state: state.has("Silver Sling", player) and have_light_source(state, player)), + LL_Entrance("The Wolf Den Entrance", "Halloween Hill", True, lambda state: True), + LL_Entrance("The Wolf Den", "The Wolf Den Entrance", True, lambda state: True), + LL_Entrance("The Wolf Den", "Larry's Lair", True, lambda state: state.has("Silver Sling", player)), + LL_Entrance("A Cabin Larry", "Zombiton", True, lambda state: True), + LL_Entrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), + LL_Entrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), + LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", True, lambda state: True), + LL_Entrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), + LL_Entrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), + LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", True, lambda state: True), + LL_Entrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), + LL_Entrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), + LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", True, lambda state: True), + LL_Entrance("Under The Ravine", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), + LL_Entrance("Under The Ravine", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), + LL_Entrance("Creepy Caverns Left", "Rocky Cliffs", True, lambda state: True), + LL_Entrance("Creepy Caverns Left", "Upper Creepy Caverns Middle Warp", True, lambda state: have_light_source(state, player)), + LL_Entrance("Creepy Caverns Middle", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), + LL_Entrance("Creepy Caverns Middle", "Under The Ravine", True, lambda state: True), + LL_Entrance("Creepy Caverns Right", "Under The Ravine", True, lambda state: True), + LL_Entrance("Creepy Caverns Right", "Vampy Land", True, lambda state: True), + LL_Entrance("Castle Vampy", "Halloween Hill", True, lambda state: True), + LL_Entrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), + LL_Entrance("Castle Vampy Skull Jail", "Castle Vampy II Main", True, lambda state: state.has("Skull Key", player)), + LL_Entrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", player, 4)), + LL_Entrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", player, 4)), + LL_Entrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", player, 4)), + LL_Entrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", player, 4)), + LL_Entrance("Castle Vampy II Main", "Castle Vampy Skull Jail", True, lambda state: True), + LL_Entrance("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, lambda state: state.has("Bat Key", player)), + LL_Entrance("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, lambda state: state.has("Bat Key", player)), + LL_Entrance("Castle Vampy II NE", "Castle Vampy", True, lambda state: True), + LL_Entrance("Castle Vampy II NE", "Castle Vampy III NE", True, lambda state: True), + LL_Entrance("Castle Vampy II SE", "Castle Vampy", True, lambda state: True), + LL_Entrance("Castle Vampy II SE", "Castle Vampy III SE", True, lambda state: True), + LL_Entrance("Castle Vampy II SW", "Castle Vampy", True, lambda state: True), + LL_Entrance("Castle Vampy II SW", "Castle Vampy III SW", True, lambda state: True), + LL_Entrance("Castle Vampy II NW", "Castle Vampy", True, lambda state: True), + LL_Entrance("Castle Vampy II NW", "Castle Vampy III NW", True, lambda state: True), + LL_Entrance("Cabin In The Woods", "Halloween Hill", True, lambda state: True), + LL_Entrance("Castle Vampy III Main", "Castle Vampy II Bat Jail", True, lambda state: True), + LL_Entrance("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", True, lambda state: state.has("Pumpkin Key", player)), + LL_Entrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV Main", True, lambda state: state.has("Pumpkin Key", player)), + LL_Entrance("Castle Vampy III NE", "Castle Vampy II NE", True, lambda state: True), + LL_Entrance("Castle Vampy III NE", "Castle Vampy IV NE", True, lambda state: True), + LL_Entrance("Castle Vampy III SE", "Castle Vampy II SE", True, lambda state: True), + LL_Entrance("Castle Vampy III SE", "Castle Vampy IV SE", True, lambda state: True), + LL_Entrance("Castle Vampy III SW", "Castle Vampy II SW", True, lambda state: True), + LL_Entrance("Castle Vampy III SW", "Castle Vampy IV SW", True, lambda state: True), + LL_Entrance("Castle Vampy III NW", "Castle Vampy II NW", True, lambda state: True), + LL_Entrance("Castle Vampy III NW", "Castle Vampy IV NW", True, lambda state: True), + LL_Entrance("Castle Vampy IV Main", "Castle Vampy III Pumpkin Jail", True, lambda state: True), + LL_Entrance("Castle Vampy IV Main", "The Heart Of Terror", True, lambda state: state.has("Vampire Bust", player, 8)), + LL_Entrance("Castle Vampy IV NE", "Castle Vampy III NE", True, lambda state: True), + LL_Entrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True, lambda state: True), + LL_Entrance("Castle Vampy IV SE", "Castle Vampy III SE", True, lambda state: True), + LL_Entrance("Castle Vampy IV SE", "Castle Vampy Roof SE", True, lambda state: True), + LL_Entrance("Castle Vampy IV SW", "Castle Vampy III SW", True, lambda state: True), + LL_Entrance("Castle Vampy IV SW", "Castle Vampy Roof SW", True, lambda state: True), + LL_Entrance("Castle Vampy IV NW", "Castle Vampy III NW", True, lambda state: True), + LL_Entrance("Castle Vampy IV NW", "Castle Vampy Roof NW", True, lambda state: True), + LL_Entrance("A Cabin Collector", "Halloween Hill", True, lambda state: True), + LL_Entrance("Castle Vampy Roof NE", "Castle Vampy IV NE", True, lambda state: True), + LL_Entrance("Castle Vampy Roof SE", "Castle Vampy IV SE", True, lambda state: True), + LL_Entrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True, lambda state: True), + LL_Entrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True, lambda state: True), + LL_Entrance("The Evilizer", "Halloween Hill", True, lambda state: True), + LL_Entrance("The Heart Of Terror", "The Evilizer", True, lambda state: True), + LL_Entrance("The Heart Of Terror", "Empty Rooftop", True, lambda state: True), + LL_Entrance("A Hidey-Hole", "Halloween Hill", True, lambda state: True), + LL_Entrance("Empty Rooftop", "Halloween Hill", True, lambda state: True), + LL_Entrance("Swampdog Lair", "Halloween Hill", True, lambda state: True), + LL_Entrance("Larry's Lair", "Halloween Hill", True, lambda state: True), + LL_Entrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LL_Entrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", player)), + LL_Entrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LL_Entrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LL_Entrance("Zombiton", "Halloween Hill", False, lambda state: True), + LL_Entrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player)), + LL_Entrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player)), + LL_Entrance("Vampy Land", "Halloween Hill", False, lambda state: True), + LL_Entrance("Underground Tunnel Top", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), + LL_Entrance("Underground Tunnel Mud", "Underground Tunnel Top", False, lambda state: state.has("Boots", player)), + LL_Entrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player)), + LL_Entrance("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), +] + for region in multiworld.get_regions(player): + for entry in loonyland_entrance_table: + if entry.source_region == region.name: + region.connect(connecting_region=world.get_region(entry.target_region), rule=entry.rule) \ No newline at end of file diff --git a/worlds/loonyland/Data/item_data.py b/worlds/loonyland/Data/item_data.py new file mode 100644 index 000000000000..4fb44cc5cb81 --- /dev/null +++ b/worlds/loonyland/Data/item_data.py @@ -0,0 +1,41 @@ +from typing import Dict + +from BaseClasses import ItemClassification as IC +from worlds.loonyland import loonyland_base_id as ll_base_id +from worlds.loonyland.Data.defines import * +from worlds.loonyland.Items import LL_Item, LL_ItemCat + +loony_item_table: Dict[str, LL_Item] = { + "Heart" : LL_Item(ll_base_id + VAR_HEART, LL_ItemCat.ITEM, IC.useful, 20), + "Lightning" : LL_Item(ll_base_id + VAR_LIGHTNING, LL_ItemCat.ITEM, IC.useful, 10), + "Arrow" : LL_Item(ll_base_id + VAR_ARROW, LL_ItemCat.ITEM, IC.useful, 10), + "Pants" : LL_Item(ll_base_id + VAR_PANTS, LL_ItemCat.ITEM, IC.useful, 10), + "Mushroom" : LL_Item(ll_base_id + VAR_MUSHROOM, LL_ItemCat.ITEM, IC.progression, 10), + "Orb" : LL_Item(ll_base_id + VAR_MYSORB, LL_ItemCat.ITEM, IC.progression, 4), + "Bombs" : LL_Item(ll_base_id + VAR_WBOMBS, LL_ItemCat.ITEM, IC.progression), + "Shock Wand" : LL_Item(ll_base_id + VAR_WLIGHTNING, LL_ItemCat.ITEM, IC.progression), + "Ice Spear" : LL_Item(ll_base_id + VAR_WICE, LL_ItemCat.ITEM, IC.progression), + "Cactus" : LL_Item(ll_base_id + VAR_WCACTUS, LL_ItemCat.ITEM, IC.progression), + "Boomerang" : LL_Item(ll_base_id + VAR_WBOOMERANG, LL_ItemCat.ITEM, IC.progression), + "Whoopee" : LL_Item(ll_base_id + VAR_WWHOOPEE, LL_ItemCat.ITEM, IC.progression), + "Hot Pants" : LL_Item(ll_base_id + VAR_WHOTPANTS, LL_ItemCat.ITEM, IC.progression), + "Skull Key" : LL_Item(ll_base_id + VAR_SKULLKEY, LL_ItemCat.ITEM, IC.progression), + "Bat Key" : LL_Item(ll_base_id + VAR_BATKEY, LL_ItemCat.ITEM, IC.progression), + "Pumpkin Key" : LL_Item(ll_base_id + VAR_PUMPKINKEY, LL_ItemCat.ITEM, IC.progression), + "Boots" : LL_Item(ll_base_id + VAR_BOOTS, LL_ItemCat.ITEM, IC.progression), + "Stick" : LL_Item(ll_base_id + VAR_STICK, LL_ItemCat.ITEM, IC.progression), + "Fertilizer" : LL_Item(ll_base_id + VAR_FERTILIZER, LL_ItemCat.ITEM, IC.progression), + "Silver" : LL_Item(ll_base_id + VAR_SILVER, LL_ItemCat.ITEM, IC.progression), + "Doom Daisy" : LL_Item(ll_base_id + VAR_DAISY, LL_ItemCat.ITEM, IC.progression), + "Ghost Potion" : LL_Item(ll_base_id + VAR_POTION, LL_ItemCat.ITEM, IC.progression), + "Vampire Bust" : LL_Item(ll_base_id + VAR_VAMPBUST, LL_ItemCat.ITEM, IC.progression, 8), + "Cat" : LL_Item(ll_base_id + VAR_CAT, LL_ItemCat.ITEM, IC.progression), + "Big Gem" : LL_Item(ll_base_id + VAR_GEM, LL_ItemCat.ITEM, IC.progression, 6), + "100 Gems" : LL_Item(ll_base_id + VAR_ZOMBIEGEM, LL_ItemCat.ITEM, IC.filler), + "Triple Fire Gem" : LL_Item(ll_base_id + VAR_TRIPLEFIRE, LL_ItemCat.ITEM, IC.useful), + "Happy Stick" : LL_Item(ll_base_id + VAR_TALISMAN, LL_ItemCat.ITEM, IC.progression), + "Bat Statue" : LL_Item(ll_base_id + VAR_BATSTATUE, LL_ItemCat.ITEM, IC.progression, 4), + "Lantern" : LL_Item(ll_base_id + VAR_LANTERN, LL_ItemCat.ITEM, IC.progression), + "Reflect Gem" : LL_Item(ll_base_id + VAR_REFLECT, LL_ItemCat.ITEM, IC.useful), + "Silver Sling" : LL_Item(ll_base_id + VAR_SILVERSLING, LL_ItemCat.ITEM, IC.progression), +} \ No newline at end of file diff --git a/worlds/loonyland/Data/location_data.py b/worlds/loonyland/Data/location_data.py new file mode 100644 index 000000000000..a19997452902 --- /dev/null +++ b/worlds/loonyland/Data/location_data.py @@ -0,0 +1,111 @@ +from typing import Dict +from worlds.loonyland.Locations import LL_Location, LL_LocCat + +loonyland_location_table: Dict[str, LL_Location] = { + "Swamp: Mud Path": LL_Location(0, LL_LocCat.PICKUP, "Slurpy Swamp Mud"), + "Swamp: Bog Beast": LL_Location(1, LL_LocCat.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Upper Ledge": LL_Location(2, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Swamp: Sapling Shrine": LL_Location(3, LL_LocCat.PICKUP, "Slurpy Swamp Mud"), + "Terror Glade: South Trees": LL_Location(4, LL_LocCat.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Vine": LL_Location(5, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Grand Pharoh": LL_Location(6, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Rock Corner": LL_Location(7, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Swamp: Outside Luniton": LL_Location(8, LL_LocCat.PICKUP, "Halloween Hill"), + "Swamp: East 1": LL_Location(9, LL_LocCat.PICKUP, "Halloween Hill"), + "Swamp: Top Left dry": LL_Location(10, LL_LocCat.PICKUP, "Halloween Hill"), + "Swamp: East 2": LL_Location(11, LL_LocCat.PICKUP, "Halloween Hill"), + "Woods: Above Castle": LL_Location(12, LL_LocCat.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Entrance Ledge": LL_Location(13, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Peak": LL_Location(14, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Woods: SW of Cabin": LL_Location(15, LL_LocCat.PICKUP, "Halloween Hill"), + "Witch's Cabin: Bedroom": LL_Location(16, LL_LocCat.PICKUP, "The Witch's Cabin Front"), + "Witch's Cabin: Backroom": LL_Location(17, LL_LocCat.PICKUP, "The Witch's Cabin Back"), + "Bonita's Cabin: Barrel Maze": LL_Location(18, LL_LocCat.PICKUP, "Bonita's Cabin"), + "Bog Pit: Top Door": LL_Location(19, LL_LocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Posts Room": LL_Location(20, LL_LocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Drippy Window": LL_Location(21, LL_LocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Green room": LL_Location(22, LL_LocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Arena": LL_Location(23, LL_LocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Sw Switch": LL_Location(24, LL_LocCat.PICKUP, "The Bog Pit"), + "Tunnel: Swampdog Pumpkin Door": LL_Location(25, LL_LocCat.PICKUP, "Underground Tunnel Top"), + "Tunnel: Scratch Wall": LL_Location(26, LL_LocCat.PICKUP, "Underground Tunnel Top"), + "Tunnel: Narrow Passage": LL_Location(27, LL_LocCat.PICKUP, "Underground Tunnel Top"), + "Tunnel: Top Frogs": LL_Location(28, LL_LocCat.PICKUP, "Underground Tunnel Top"), + "Tunnel: Torch Island": LL_Location(29, LL_LocCat.PICKUP, "Underground Tunnel Mud"), + "Tunnel: Small Room": LL_Location(30, LL_LocCat.PICKUP, "Underground Tunnel Top"), + "Swamp Gas: Scratch Wall": LL_Location(31, LL_LocCat.PICKUP, "Swamp Gas Cavern Front"), + "Swamp Gas: Bat Door": LL_Location(32, LL_LocCat.PICKUP, "Swamp Gas Cavern Front"), + "Swamp Gas: Stair room": LL_Location(33, LL_LocCat.PICKUP, "Swamp Gas Cavern Back"), + "Swamp Gas: Rock Prison": LL_Location(34, LL_LocCat.PICKUP, "Swamp Gas Cavern Front"), + "A Tiny Cabin": LL_Location(35, LL_LocCat.PICKUP, "A Tiny Cabin"), + "Seer: Bedside": LL_Location(36, LL_LocCat.PICKUP, "A Cabin Seer"), + "Dusty Crypt: Pumpkin Door": LL_Location(37, LL_LocCat.PICKUP, "Dusty Crypt"), + "Dusty Crypt: Maze": LL_Location(38, LL_LocCat.PICKUP, "Dusty Crypt"), + "Musty Crypt: Maze Room": LL_Location(39, LL_LocCat.PICKUP, "Musty Crypt"), + "Rusty Crypt: Vine": LL_Location(40, LL_LocCat.PICKUP, "Rusty Crypt"), + "Rusty Crypt: Boulders": LL_Location(41, LL_LocCat.PICKUP, "Rusty Crypt"), + "A Messy Cabin": LL_Location(42, LL_LocCat.PICKUP, "A Messy Cabin"), + "Under The Lake: Behind Lightning Rod": LL_Location(43, LL_LocCat.PICKUP, "Under The Lake"), + "Under The Lake: Bat Door": LL_Location(44, LL_LocCat.PICKUP, "Under The Lake"), + "Deeper Lake: Corner": LL_Location(45, LL_LocCat.PICKUP, "Deeper Under The Lake"), + "Deeper Lake: Rhombus": LL_Location(46, LL_LocCat.PICKUP, "Deeper Under The Lake"), + "Frankenjulie's Reward": LL_Location(47, LL_LocCat.PICKUP, "Frankenjulie's Laboratory"), + "Tower: Barracks": LL_Location(48, LL_LocCat.PICKUP, "Haunted Tower"), + "Tower F2: Skull Puzzle": LL_Location(49, LL_LocCat.PICKUP, "Haunted Tower, Floor 2"), + "PolterGuy's Reward": LL_Location(50, LL_LocCat.PICKUP, "Haunted Tower Roof"), + "Tower Basement: DoorDoorDoorDoorDoorDoor": LL_Location(51, LL_LocCat.PICKUP, "Haunted Basement"), + "Abandoned Mine: Shaft": LL_Location(52, LL_LocCat.PICKUP, "Abandoned Mines"), + "Shrine of Bombulus: Prize": LL_Location(53, LL_LocCat.PICKUP, "The Shrine Of Bombulus"), + "Gloomy Cavern: Lockpick": LL_Location(54, LL_LocCat.PICKUP, "A Gloomy Cavern"), + "Happy Stick: Hidden": LL_Location(55, LL_LocCat.PICKUP, "Happy Stick Woods"), + "Happy Stick: Reward": LL_Location(56, LL_LocCat.PICKUP, "Happy Stick Woods"), + "Wolf Den: Top Left": LL_Location(57, LL_LocCat.PICKUP, "The Wolf Den"), + "Wolf Den: Pumpkin Door": LL_Location(58, LL_LocCat.PICKUP, "The Wolf Den"), + "Wolf Den: Vine": LL_Location(59, LL_LocCat.PICKUP, "The Wolf Den"), + "Upper Cavern: Three Gold Skeletons": LL_Location(60, LL_LocCat.PICKUP, "Upper Creepy Caverns"), + "Under The Ravine: Left Vine": LL_Location(61, LL_LocCat.PICKUP, "Under The Ravine"), + "Under The Ravine: Right Vine": LL_Location(62, LL_LocCat.PICKUP, "Under The Ravine"), + "Creepy Caverns M: Pharaoh Bat Door": LL_Location(63, LL_LocCat.PICKUP, "Creepy Caverns Middle"), + "Creepy Caverns E: Top Pharaohs": LL_Location(64, LL_LocCat.PICKUP, "Creepy Caverns Right"), + "Creepy Caverns M: Gargoyles": LL_Location(65, LL_LocCat.PICKUP, "Creepy Caverns Middle"), + "Castle Vampy: Top Room": LL_Location(66, LL_LocCat.PICKUP, "Castle Vampy"), + "Castle Vampy: Maze": LL_Location(67, LL_LocCat.PICKUP, "Castle Vampy"), + "Castle Vampy: Gauntlet": LL_Location(68, LL_LocCat.PICKUP, "Castle Vampy"), + "Castle Vampy: Bat Closet": LL_Location(69, LL_LocCat.PICKUP, "Castle Vampy"), + "Castle Vampy II: Candle Room": LL_Location(70, LL_LocCat.PICKUP, "Castle Vampy II Main"), + "Castle Vampy II: Bloodsucker Room": LL_Location(71, LL_LocCat.PICKUP, "Castle Vampy II Main"), + "Castle Vampy II: Vampire Lord": LL_Location(72, LL_LocCat.PICKUP, "Castle Vampy II Main"), + "Castle Vampy II: Bat Room": LL_Location(73, LL_LocCat.PICKUP, "Castle Vampy II Main"), + "Cabin in the Woods: Gold Skull": LL_Location(74, LL_LocCat.PICKUP, "Cabin In The Woods"), + "Castle Vampy III: Center": LL_Location(75, LL_LocCat.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: Behind the Pews": LL_Location(76, LL_LocCat.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: AMBUSH!": LL_Location(77, LL_LocCat.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: Halloween": LL_Location(78, LL_LocCat.PICKUP, "Castle Vampy III Main"), + "Castle Vampy III: Bat room": LL_Location(79, LL_LocCat.PICKUP, "Castle Vampy III Main"), + "Castle Vampy IV: Right Path": LL_Location(80, LL_LocCat.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Left Path": LL_Location(81, LL_LocCat.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Ballroom Right": LL_Location(82, LL_LocCat.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Right Secret Wall": LL_Location(83, LL_LocCat.PICKUP, "Castle Vampy IV Main"), + "Castle Vampy IV: Ballroom Left": LL_Location(84, LL_LocCat.PICKUP, "Castle Vampy IV Main"), + "Roof NW: Gutsy the Elder": LL_Location(85, LL_LocCat.PICKUP, "Castle Vampy Roof NW"), + "Roof NE: Stoney the Elder": LL_Location(86, LL_LocCat.PICKUP, "Castle Vampy Roof NE"), + "Roof SW: Drippy the Elder": LL_Location(87, LL_LocCat.PICKUP, "Castle Vampy Roof SW"), + "Roof SE: Toasty the Elder": LL_Location(88, LL_LocCat.PICKUP, "Castle Vampy Roof SE"), + "Bonkula": LL_Location(89, LL_LocCat.PICKUP, "The Heart Of Terror"), + "Hidey-Hole: Bat Door": LL_Location(90, LL_LocCat.PICKUP, "A Hidey-Hole"), + "Hidey-Hole: Pebbles": LL_Location(91, LL_LocCat.PICKUP, "A Hidey-Hole"), + "Swampdog Lair: Entrance": LL_Location(92, LL_LocCat.PICKUP, "Swampdog Lair"), + "Swampdog Lair: End": LL_Location(93, LL_LocCat.PICKUP, "Swampdog Lair"), + "Q: Save Halloween Hill": LL_Location(94, LL_LocCat.QUEST, "The Evilizer"), + "Q: Tree Trimming": LL_Location(95, LL_LocCat.QUEST, "A Cabin Trees"), + "Q: Scaredy Cat": LL_Location(96, LL_LocCat.QUEST, "Halloween Hill"), + "Q: Sticky Shoes": LL_Location(97, LL_LocCat.QUEST, "Halloween Hill"), + "Q: Mushroom Hunt": LL_Location(98, LL_LocCat.QUEST, "The Witch's Cabin Front"), + "Q: Zombie Stomp": LL_Location(99, LL_LocCat.QUEST, "Zombiton"), + "Q: Smashing Pumpkins": LL_Location(100, LL_LocCat.QUEST, "Halloween Hill"), + "Q: Silver Bullet": LL_Location(101, LL_LocCat.QUEST, "Halloween Hill"), + "Q: Hairy Larry": LL_Location(102, LL_LocCat.QUEST, "A Cabin Larry"), + "Q: Ghostbusting": LL_Location(103, LL_LocCat.QUEST, "The Witch's Cabin Front"), + "Q: The Rescue": LL_Location(104, LL_LocCat.QUEST, "A Gloomy Cavern"), + "Q: The Collection": LL_Location(105, LL_LocCat.QUEST, "A Cabin Collector"), +} \ No newline at end of file diff --git a/worlds/loonyland/Data/region_data.py b/worlds/loonyland/Data/region_data.py new file mode 100644 index 000000000000..1248018a9d3e --- /dev/null +++ b/worlds/loonyland/Data/region_data.py @@ -0,0 +1,107 @@ +from typing import Dict +from worlds.loonyland.Regions import LLRegion + +loonyland_region_table: Dict[str, LLRegion] = { + "Menu": LLRegion(False), + "Halloween Hill": LLRegion(False, "Halloween Hill"), + "Slurpy Swamp Mud": LLRegion(False, "Halloween Hill"), + "Slurpy Swamp Mud North Warp": LLRegion(False, "Halloween Hill"), + "Slurpy Swamp Mud East Warp": LLRegion(False, "Halloween Hill"), + "Zombiton": LLRegion(False, "Halloween Hill"), + "Rocky Cliffs": LLRegion(False, "Halloween Hill"), + "Vampy Land": LLRegion(False, "Halloween Hill"), + "A Cabin Trees": LLRegion(True, "A Cabin"), + "The Witch's Cabin Front": LLRegion(False, "The Witch's Cabin"), + "The Witch's Cabin Back": LLRegion(False, "The Witch's Cabin"), + "Bonita's Cabin": LLRegion(True), + "The Bog Pit": LLRegion(True), + "Underground Tunnel Top": LLRegion(False, "Underground Tunnel"), + "Underground Tunnel Mud": LLRegion(False, "Underground Tunnel"), + "Underground Tunnel Zombie": LLRegion(False, "Underground Tunnel"), + "Swamp Gas Cavern Front": LLRegion(False, "Swamp Gas Cavern"), + "Swamp Gas Cavern Back": LLRegion(False, "Swamp Gas Cavern"), + "A Tiny Cabin": LLRegion(True), + "A Cabin Seer": LLRegion(True), + "Benny's Cocktails": LLRegion(True), + "Dusty Crypt": LLRegion(True), + "Dusty Crypt Entrance": LLRegion(False), + "Musty Crypt": LLRegion(True), + "Musty Crypt Entrance": LLRegion(False), + "Rusty Crypt": LLRegion(True), + "Rusty Crypt Entrance": LLRegion(False), + "A Messy Cabin": LLRegion(True), + "Under The Lake": LLRegion(True), + "Under The Lake Entrance": LLRegion(False), + "Under The Lake Exit": LLRegion(False), + "Deeper Under The Lake": LLRegion(True), + "Frankenjulie's Laboratory": LLRegion(True), + "Haunted Tower": LLRegion(True), + "Haunted Tower, Floor 2": LLRegion(True), + "Haunted Tower, Floor 3": LLRegion(True), + "Haunted Tower Roof": LLRegion(True), + "Haunted Basement": LLRegion(True), + "Haunted Basement Entrance": LLRegion(False), + "Abandoned Mines": LLRegion(True), + "Abandoned Mines Entrance": LLRegion(False), + "The Shrine Of Bombulus": LLRegion(True), + "A Gloomy Cavern": LLRegion(True), + "A Gloomy Cavern Entrance": LLRegion(False), + "Happy Stick Woods": LLRegion(True), + "The Wolf Den": LLRegion(True), + "The Wolf Den Entrance": LLRegion(False), + "The Wolf Den Exit": LLRegion(False), + "A Cabin Larry": LLRegion(True), + "Upper Creepy Caverns": LLRegion(True), + "Upper Creepy Caverns Left Warp": LLRegion(False), + "Upper Creepy Caverns Middle Warp": LLRegion(False), + "Upper Creepy Caverns Right Warp": LLRegion(False), + "Under The Ravine": LLRegion(True), + "Creepy Caverns Left": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Left Bottom Warp": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Left Top Warp": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Middle": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Middle Top Warp": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Middle Right Warp": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Right": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Right Left Warp": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Right Bottom Warp": LLRegion(False, "Creepy Caverns"), + "Castle Vampy": LLRegion(True), + "Castle Vampy Skull Jail": LLRegion(False, "Castle Vampy"), + "Castle Vampy II Main": LLRegion(False, "Castle Vampy II"), + "Castle Vampy II NW": LLRegion(False, "Castle Vampy II"), + "Castle Vampy II NE": LLRegion(False, "Castle Vampy II"), + "Castle Vampy II SW": LLRegion(False, "Castle Vampy II"), + "Castle Vampy II SE": LLRegion(False, "Castle Vampy II"), + "Castle Vampy II Bat Jail": LLRegion(False, "Castle Vampy II"), + "Cabin In The Woods": LLRegion(True), + "Castle Vampy III Main": LLRegion(False, "Castle Vampy III"), + "Castle Vampy III NW": LLRegion(False, "Castle Vampy III"), + "Castle Vampy III NE": LLRegion(False, "Castle Vampy III"), + "Castle Vampy III SW": LLRegion(False, "Castle Vampy III"), + "Castle Vampy III SE": LLRegion(False, "Castle Vampy III"), + "Castle Vampy III Pumpkin Jail": LLRegion(False, "Castle Vampy III"), + "Castle Vampy IV Main": LLRegion(False, "Castle Vampy IV"), + "Castle Vampy IV NW": LLRegion(False, "Castle Vampy IV"), + "Castle Vampy IV NE": LLRegion(False, "Castle Vampy IV"), + "Castle Vampy IV SW": LLRegion(False, "Castle Vampy IV"), + "Castle Vampy IV SE": LLRegion(False, "Castle Vampy IV"), + "A Cabin Collector": LLRegion(True), + "Castle Vampy Roof NE": LLRegion(True, "Castle Vampy Roof"), + "Castle Vampy Roof SE": LLRegion(True, "Castle Vampy Roof"), + "Castle Vampy Roof SW": LLRegion(True, "Castle Vampy Roof"), + "Castle Vampy Roof NW": LLRegion(True, "Castle Vampy Roof"), + "The Evilizer": LLRegion(True), + "The Heart Of Terror": LLRegion(True), + "The Heart Of Terror Entrance": LLRegion(False, "The Heart Of Terror"), + "The Heart Of Terror Exit": LLRegion(False, "The Heart Of Terror"), + "A Hidey-Hole": LLRegion(True), + "Empty Rooftop": LLRegion(True), + "Swampdog Lair": LLRegion(True), + "Swampdog Lair Entrance": LLRegion(False, "Swampdog Lair"), + "Larry's Lair": LLRegion(True), + "Bowling": LLRegion(False), + "Survival": LLRegion(False), + "Boss Bash": LLRegion(False), + "Loony Ball": LLRegion(False), + "Remix": LLRegion(False), +} \ No newline at end of file diff --git a/worlds/loonyland/Data/rules_data.py b/worlds/loonyland/Data/rules_data.py new file mode 100644 index 000000000000..c299e4e01eea --- /dev/null +++ b/worlds/loonyland/Data/rules_data.py @@ -0,0 +1,46 @@ +from typing import Dict +from worlds.generic.Rules import CollectionRule +from worlds.loonyland.Rules import * +def set_rules(multiworld, world, player): + access_rules: Dict[str, CollectionRule] = { + "Swamp: Mud Path": lambda state: state.has("Boots", player), + "Swamp: Sapling Shrine": lambda state: state.has("Boots", player), + "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", player), + "Rocky Cliffs: Rock Corner": lambda state: have_bombs(state, player), + "Witch's Cabin: Bedroom": lambda state: have_light_source(state, player), + "Bog Pit: Top Door": lambda state: state.has("Skull Key", player), + "Tunnel: Swampdog Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Tunnel: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), + "Tunnel: Torch Island": lambda state: state.has("Boots", player), + "Swamp Gas: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), + "Swamp Gas: Bat Door": lambda state: state.has("Bat Key", player), + "Swamp Gas: Rock Prison": lambda state: have_bombs(state, player), + "Dusty Crypt: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, player), + "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", player), + "Under The Lake: Bat Door": lambda state: state.has("Bat Key", player), + "Tower: Barracks": lambda state: state.has("Ghost Potion", player), + "Tower F2: Skull Puzzle": lambda state: state.has("Ghost Potion", player), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), + "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Wolf Den: Vine": lambda state: state.has("Fertilizer", player), + "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", player), + "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", player), + "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", player), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), + "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), + "Swampdog Lair: Entrance": lambda state: state.has("Boots", player), + "Swampdog Lair: End": lambda state: state.has("Boots", player) and have_light_source(state, player) and state.has("Fertilizer", player), + "Q: Scaredy Cat": lambda state: state.has("Cat", player), + "Q: Mushroom Hunt": lambda state: state.has("Mushroom", player, 10), + "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), + "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), + "Q: Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Boots", player), + "Q: Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), + "Q: The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and can_enter_vampy(state, player), + } + for loc in multiworld.get_locations(player): + if loc.name in access_rules: + add_rule(loc, access_rules[loc.name]) \ No newline at end of file diff --git a/worlds/loonyland/Defines.py b/worlds/loonyland/Defines.py deleted file mode 100644 index 974498ea143f..000000000000 --- a/worlds/loonyland/Defines.py +++ /dev/null @@ -1,63 +0,0 @@ -VAR_HEART = 0 # 0-19 = super hearts -VAR_LIGHTNING = 20 # 20-29 = lightning bolts -VAR_ARROW = 30 # 30-39 = arrows -VAR_PANTS = 40 # 40-49 = pants -VAR_QUESTASSIGN = 50 # 50-69 = quest (N-50) has been assigned -VAR_QUESTDONE = 70 # 70-89 = quest (N-70) is complete -VAR_MUSHROOM = 90 # 90-99 = mushrooms -VAR_MYSORB = 100 # 100-103 = have mystery orb -VAR_WEAPON = 104 # 104-110 = have access to weapon -VAR_KEY = 111 # 111-113 = have the three special keys -VAR_SKULLKEY = 111 # 111 = have the skull key -VAR_BATKEY = 112 # 112 = have the bat key -VAR_PUMPKINKEY = 113 # 113 = have the pumpkin key -VAR_BOOTS = 114 # 114 = have the rubber booties -VAR_STICK = 115 # 115 = have the stick -VAR_TORCH = 116 # 116 = the stick is lit -VAR_FERTILIZER = 117 # 117 = have fertilizer -VAR_SILVER = 118 # 118 = have the silver -VAR_DAISY = 119 # 119 = have doom daisy -VAR_POTION = 120 # 120 = have ghost potion -VAR_VAMPBUST = 121 # 121-128 = have vamp bust -VAR_CAT = 129 # 129 = have cat -VAR_GEM = 130 # 130-135 = super gems -VAR_ORBSTAND = 150 # 150-153 = have installed orb -VAR_BOOTSALES = 154 # 154 = have talked to boot salesman once -VAR_WITCHTALK = 155 # 155 = number of times you've annoyed the witch -VAR_BRIDGEOPEN = 156 # 156 = the Underground Tunnel bridge has been opened -VAR_ZOMBIE = 157 # 157-159 = each crypt has been cleaned out -VAR_ZOMBIEREWARD= 160 # 160 = have received the zombie reward money -VAR_TRIPLEFIRE = 161 # 161 = have triple-fire crystal -VAR_TALISMAN = 162 # 162 = have happy stick talisman -VAR_VAMPYWALL = 163 # 163 = wall to vampy land opened -VAR_BATSTATUE = 164 # 164-167 = have each bat statue -VAR_BATSTAND = 168 # 168-171 = bat statue is on stand -VAR_VAMPSTAND = 172 # 172-179 = vamp bust is on stand -VAR_KNOWWOLVES = 180 # 180 = have already talked to self about werewolves -VAR_DOLL = 181 # 181-188 = have doll -VAR_REFLECT = 189 # 189 = have reflect gem -VAR_DOLLGIVEN = 190 # 190-197 = have given doll to girl -VAR_TOWNOPEN = 198 # 198 = have opened zombiton -VAR_LEFTBOMB = 199 # 199 = have left bomb room with bombs (so remove the powerups) -VAR_HELPERBAT = 200 # 200 = have the helper bat -VAR_TALKBAT = 201 # 201 = have talked to the bat once -VAR_TALKBRIDGE = 202 # 202 = have talked to the bridge guy -VAR_PAIDBRIDGE = 203 # 203 = have paid the bridge guy -VAR_PORTALOPEN = 204 # 204 = the portal is officially open -VAR_GAVEDAISY = 205 # 205 = gave daisy to witch -VAR_DEADELDER = 206 # 206-209 = elder has been beaten -VAR_GATEOUT = 210 # 210 = mystery lake electrogate is shorted out -VAR_DEADBONK = 211 # 211 = bonkula is dead -VAR_SEERTALK = 212 # 212 = has talked to seer -VAR_MINERTALK = 213 # 213 = have talked to miner -VAR_HPSALES = 214 # 214 = have talked to hot pants salesman -VAR_DEALERTALK = 215 # 215 = have talked to arms dealer -VAR_HIPUZZLE = 216 # 216 = the HI puzzle is solved in Remix mode - -VAR_WITCHREWARD = 217 # 217 = Witch has given you mushroom prize -VAR_LANTERN = 218 # 218 = Have the lantern -VAR_TREEREWARD = 219 # 219 = Rewarded for tree trimming -VAR_SILVERSLING = 220 # 220 = Have Silver Bullets -VAR_LARRYREWARD = 221 # 221 = Rewarded for bringing Larry Home -VAR_CROPSREWARD = 222 # 222 = Rewarded for crop smash -VAR_ZOMBIEGEM = 223 # 223 = red 100 gem \ No newline at end of file diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index d6a3d47a9d14..ed21098dd0b5 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -9,392 +9,9 @@ class LoonylandEntrance(Entrance): game = "Loonyland" -class EntranceData(NamedTuple): +class LL_Entrance(NamedTuple): source_region: str target_region: str is_real_loading_zone: bool # rule: typing.Callable[[player, state], bool] - rule: CollectionRule - - -def have_light_source(state: CollectionState, player: int) -> bool: - return state.has("Lantern", player) or (state.has("Stick", player) and state.has("Boots", player)) - - -def set_entrances(multiworld, world, player): - loonyland_entrance_table: List[EntranceData] = [ - # base - EntranceData("Menu", "Halloween Hill", False, lambda state: True), - EntranceData("Menu", "Bowling", False, lambda state: True), - EntranceData("Menu", "Survival", False, lambda state: True), - EntranceData("Menu", "Boss Bash", False, lambda state: True), - EntranceData("Menu", "Loony Ball", False, lambda state: True), - EntranceData("Menu", "Remix", False, lambda state: True), - - # loading zones, can be randomized - EntranceData("Halloween Hill", "A Cabin Trees", True, lambda state: True), - EntranceData("Halloween Hill", "The Witch's Cabin Front", True, lambda state: True), - EntranceData("Halloween Hill", "Bonita's Cabin", True, lambda state: True), - EntranceData("Halloween Hill", "Underground Tunnel Top", True, lambda state: True), - EntranceData("Halloween Hill", "The Bog Pit", True, lambda state: True), - EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False, lambda state: True), - EntranceData("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern Front", True, lambda state: True), - EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False, lambda state: True), - EntranceData("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True, lambda state: True), - EntranceData("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), - EntranceData("Halloween Hill", "The Witch's Cabin Back", True, lambda state: True), - EntranceData("Zombiton", "A Cabin Seer", True, lambda state: True), - EntranceData("Zombiton", "Benny's Cocktails", True, lambda state: True), - EntranceData("Halloween Hill", "Dusty Crypt Entrance", True, lambda state: True), - EntranceData("Zombiton", "Musty Crypt Entrance", True, lambda state: True), - EntranceData("Zombiton", "A Messy Cabin", True, lambda state: True), - EntranceData("Halloween Hill", "Rusty Crypt Entrance", True, lambda state: True), - EntranceData("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), - EntranceData("Halloween Hill", "Haunted Tower", True, lambda state: state.has("Ghost Potion", player)), - EntranceData("Rocky Cliffs", "Abandoned Mines Entrance", True, lambda state: True), - EntranceData("Rocky Cliffs", "The Shrine Of Bombulus", True, lambda state: True), - EntranceData("Rocky Cliffs", "A Gloomy Cavern Entrance", True, - lambda state: have_light_source(state, player)), - EntranceData("Halloween Hill", "Happy Stick Woods", True, - lambda state: state.has("Happy Stick", player)), - EntranceData("Zombiton", "A Cabin Larry", True, lambda state: True), - EntranceData("Halloween Hill", "The Wolf Den Entrance", True, lambda state: True), - EntranceData("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, - lambda state: state.has("Bombs", player)), - EntranceData("Rocky Cliffs", "Creepy Caverns Left", True, - lambda state: have_light_source(state, player)), - EntranceData("Vampy Land", "Castle Vampy", True, lambda state: True), - EntranceData("Halloween Hill", "Cabin In The Woods", True, lambda state: True), - EntranceData("Halloween Hill", "A Cabin Collector", True, lambda state: True), - EntranceData("Halloween Hill", "A Hidey-Hole", True, lambda state: True), - EntranceData("Vampy Land", "Creepy Caverns Right", True, - lambda state: have_light_source(state, player)), - EntranceData("Halloween Hill", "Swampdog Lair", True, lambda state: True), - EntranceData("A Cabin Trees", "Halloween Hill", True, lambda state: True), - EntranceData("The Witch's Cabin Front", "Halloween Hill", True, lambda state: True), - EntranceData("The Witch's Cabin Back", "Halloween Hill", True, lambda state: True), - EntranceData("Bonita's Cabin", "Halloween Hill", True, lambda state: True), - EntranceData("The Bog Pit", "Halloween Hill", True, - lambda state: have_light_source(state, player)), - EntranceData("Underground Tunnel Top", "Halloween Hill", True, lambda state: True), - EntranceData("Underground Tunnel Zombie", "Benny's Cocktails", True, lambda state: True), - EntranceData("Swamp Gas Cavern Front", "Slurpy Swamp Mud North Warp", True, lambda state: True), - EntranceData("Swamp Gas Cavern Back", "Slurpy Swamp Mud East Warp", True, lambda state: True), - EntranceData("A Tiny Cabin", "Halloween Hill", True, lambda state: True), - EntranceData("A Cabin Seer", "Zombiton", True, lambda state: True), - EntranceData("Benny's Cocktails", "Zombiton", True, lambda state: True), - EntranceData("Benny's Cocktails", "Underground Tunnel Zombie", True, - lambda state: True), - EntranceData("Dusty Crypt Entrance", "Dusty Crypt", True, - lambda state: have_light_source(state, player)), - EntranceData("Dusty Crypt Entrance", "Halloween Hill", True, - lambda state: True), - EntranceData("Dusty Crypt", "Dusty Crypt Entrance", True, - lambda state: True), - EntranceData("Musty Crypt Entrance", "Musty Crypt", True, - lambda state: have_light_source(state, player)), - EntranceData("Musty Crypt Entrance", "Zombiton", True, - lambda state: True), - EntranceData("Musty Crypt", "Musty Crypt Entrance", True, - lambda state: True), - EntranceData("Rusty Crypt Entrance", "Rusty Crypt", True, - lambda state: have_light_source(state, player)), - EntranceData("Rusty Crypt Entrance", "Halloween Hill", True, - lambda state: True), - EntranceData("Rusty Crypt", "Rusty Crypt Entrance", True, - lambda state: True), - EntranceData("A Messy Cabin", "Zombiton", True, lambda state: True), - EntranceData("Under The Lake Entrance", "Under The Lake", True, - lambda state: have_light_source(state, player)), - EntranceData("Under The Lake Entrance", "Halloween Hill", True, - lambda state: True), - EntranceData("Under The Lake", "Under The Lake Entrance", True, - lambda state: True), - EntranceData("Under The Lake", "Under The Lake Exit", True, - lambda state: True), - EntranceData("Under The Lake Exit", "Deeper Under The Lake", True, - lambda state: True), - # EntranceData("Under The Lake Exit", "Under The Lake", True, lambda state: Hmmm), One way, possible with badges/items - EntranceData("Deeper Under The Lake", "Under The Lake Exit", True, - lambda state: True), - EntranceData("Deeper Under The Lake", "Frankenjulie's Laboratory", True, - lambda state: True), - EntranceData("Frankenjulie's Laboratory", "Deeper Under The Lake", True, - lambda state: True), - EntranceData("Frankenjulie's Laboratory", "Halloween Hill", True, - lambda state: True), - EntranceData("Haunted Basement", "Haunted Basement", True, - lambda state: have_light_source(state, player)), - EntranceData("Haunted Tower", "Haunted Tower, Floor 2", True, - lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower", "Haunted Basement Entrance", True, - lambda state: state.has("Bat Key", player) and - state.has("Pumpkin Key", player) and - state.has("Skull Key", player)), - EntranceData("Haunted Tower, Floor 2", "Haunted Tower", True, - lambda state: True), - EntranceData("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True, - lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower, Floor 3", "Haunted Tower, Floor 2", True, - lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower, Floor 3", "Haunted Tower Roof", True, - lambda state: state.has("Ghost Potion", player)), - EntranceData("Haunted Tower Roof", "Halloween Hill", True, - lambda state: True), - EntranceData("Haunted Tower Roof", "Haunted Tower, Floor 3", True, - lambda state: True), - EntranceData("Haunted Basement Entrance", "Haunted Tower", True, - lambda state: state.has("Bat Key", player) and - state.has("Pumpkin Key", player) and - state.has("Skull Key", player)), - EntranceData("Haunted Basement Entrance", "Haunted Basement", True, lambda state: True), - EntranceData("Haunted Basement", "Haunted Basement Entrance", True, - lambda state: True), - EntranceData("Abandoned Mines Entrance", "Abandoned Mines", True, - lambda state: have_light_source(state, player)), - EntranceData("Abandoned Mines Entrance", "Rocky Cliffs", True, - lambda state: True), - EntranceData("Abandoned Mines", "Abandoned Mines Entrance", True, - lambda state: True), - EntranceData("The Shrine Of Bombulus", "Rocky Cliffs", True, - lambda state: True), - EntranceData("A Gloomy Cavern Entrance", "A Gloomy Cavern", True, - lambda state: have_light_source(state, player)), - EntranceData("A Gloomy Cavern Entrance", "Rocky Cliffs", True, - lambda state: True), - EntranceData("A Gloomy Cavern", "A Gloomy Cavern Entrance", True, - lambda state: True), - EntranceData("Happy Stick Woods", "Halloween Hill", True, - lambda state: True), - EntranceData("The Wolf Den Entrance", "The Wolf Den", True, - lambda state: state.has("Silver Sling", - player) and have_light_source(state, - player)), - EntranceData("The Wolf Den Entrance", "Halloween Hill", True, - lambda state: True), - EntranceData("The Wolf Den", "The Wolf Den Entrance", True, - lambda state: True), - EntranceData("The Wolf Den", "Larry's Lair", True, - lambda state: state.has("Silver Sling", player)), - EntranceData("A Cabin Larry", "Zombiton", True, lambda state: True), - - - EntranceData("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, - lambda state: state.has("Bombs", player)), - EntranceData("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", True, - lambda state: have_light_source(state, player)), - EntranceData("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", True, - lambda state: True), - - EntranceData("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left", True, - lambda state: have_light_source(state, player)), - EntranceData("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", True, - lambda state: have_light_source(state, player)), - EntranceData("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", True, - lambda state: True), - - EntranceData("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle", True, - lambda state: have_light_source(state, player)), - EntranceData("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", True, - lambda state: have_light_source(state, player)), - EntranceData("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", True, - lambda state: True), - - EntranceData("Under The Ravine", "Creepy Caverns Middle", True, - lambda state: have_light_source(state, player)), - EntranceData("Under The Ravine", "Creepy Caverns Right", True, - lambda state: have_light_source(state, player)), - - EntranceData("Creepy Caverns Left", "Rocky Cliffs", True, - lambda state: True), - EntranceData("Creepy Caverns Left", "Upper Creepy Caverns Middle Warp", True, - lambda state: have_light_source(state, player)), - EntranceData("Creepy Caverns Middle", "Upper Creepy Caverns", True, - lambda state: have_light_source(state, player)), - EntranceData("Creepy Caverns Middle", "Under The Ravine", True, - lambda state: True), - EntranceData("Creepy Caverns Right", "Under The Ravine", True, - lambda state: True), - EntranceData("Creepy Caverns Right", "Vampy Land", True, - lambda state: True), - EntranceData("Castle Vampy", "Halloween Hill", True, lambda state: True), - EntranceData("Castle Vampy", "Castle Vampy Skull Jail", False, - lambda state: state.has("Skull Key", player)), - EntranceData("Castle Vampy Skull Jail", "Castle Vampy II Main", True, - lambda state: state.has("Skull Key", player)), - EntranceData("Castle Vampy", "Castle Vampy II NE", True, - lambda state: state.has("Bat Statue", player, 4)), - EntranceData("Castle Vampy", "Castle Vampy II SE", True, - lambda state: state.has("Bat Statue", player, 4)), - EntranceData("Castle Vampy", "Castle Vampy II SW", True, - lambda state: state.has("Bat Statue", player, 4)), - EntranceData("Castle Vampy", "Castle Vampy II NW", True, - lambda state: state.has("Bat Statue", player, 4)), - EntranceData("Castle Vampy II Main", "Castle Vampy Skull Jail", True, - lambda state: True), - EntranceData("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, - lambda state: state.has("Bat Key", player)), - EntranceData("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, - lambda state: state.has("Bat Key", player)), - EntranceData("Castle Vampy II NE", "Castle Vampy", True, - lambda state: True), - EntranceData("Castle Vampy II NE", "Castle Vampy III NE", True, - lambda state: True), - EntranceData("Castle Vampy II SE", "Castle Vampy", True, - lambda state: True), - EntranceData("Castle Vampy II SE", "Castle Vampy III SE", True, - lambda state: True), - EntranceData("Castle Vampy II SW", "Castle Vampy", True, - lambda state: True), - EntranceData("Castle Vampy II SW", "Castle Vampy III SW", True, - lambda state: True), - EntranceData("Castle Vampy II NW", "Castle Vampy", True, - lambda state: True), - EntranceData("Castle Vampy II NW", "Castle Vampy III NW", True, - lambda state: True), - EntranceData("Cabin In The Woods", "Halloween Hill", True, - lambda state: True), - EntranceData("Castle Vampy III Main", "Castle Vampy II Bat Jail", True, - lambda state: True), - EntranceData("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", - True, lambda state: state.has("Pumpkin Key", player)), - EntranceData("Castle Vampy III Pumpkin Jail", "Castle Vampy IV Main", - True, lambda state: state.has("Pumpkin Key", player)), - EntranceData("Castle Vampy III NE", "Castle Vampy II NE", True, - lambda state: True), - EntranceData("Castle Vampy III NE", "Castle Vampy IV NE", True, - lambda state: True), - EntranceData("Castle Vampy III SE", "Castle Vampy II SE", True, - lambda state: True), - EntranceData("Castle Vampy III SE", "Castle Vampy IV SE", True, - lambda state: True), - EntranceData("Castle Vampy III SW", "Castle Vampy II SW", True, - lambda state: True), - EntranceData("Castle Vampy III SW", "Castle Vampy IV SW", True, - lambda state: True), - EntranceData("Castle Vampy III NW", "Castle Vampy II NW", True, - lambda state: True), - EntranceData("Castle Vampy III NW", "Castle Vampy IV NW", True, - lambda state: True), - EntranceData("Castle Vampy IV Main", "Castle Vampy III Pumpkin Jail", - True, lambda state: True), - EntranceData("Castle Vampy IV Main", "The Heart Of Terror", True, - lambda state: state.has("Vamp Statue", player, 8)), - EntranceData("Castle Vampy IV NE", "Castle Vampy III NE", True, - lambda state: True), - EntranceData("Castle Vampy IV NE", "Castle Vampy Roof NE", True, - lambda state: True), - EntranceData("Castle Vampy IV SE", "Castle Vampy III SE", True, - lambda state: True), - EntranceData("Castle Vampy IV SE", "Castle Vampy Roof SE", True, - lambda state: True), - EntranceData("Castle Vampy IV SW", "Castle Vampy III SW", True, - lambda state: True), - EntranceData("Castle Vampy IV SW", "Castle Vampy Roof SW", True, - lambda state: True), - EntranceData("Castle Vampy IV NW", "Castle Vampy III NW", True, - lambda state: True), - EntranceData("Castle Vampy IV NW", "Castle Vampy Roof NW", True, - lambda state: True), - EntranceData("A Cabin Collector", "Halloween Hill", True, - lambda state: True), - EntranceData("Castle Vampy Roof NE", "Castle Vampy IV NE", True, - lambda state: True), - EntranceData("Castle Vampy Roof SE", "Castle Vampy IV SE", True, - lambda state: True), - EntranceData("Castle Vampy Roof SW", "Castle Vampy IV SW", True, - lambda state: True), - EntranceData("Castle Vampy Roof NW", "Castle Vampy IV NW", True, - lambda state: True), - EntranceData("The Evilizer", "Halloween Hill", True, lambda state: True), - EntranceData("The Heart Of Terror", "The Evilizer", True, - lambda state: True), - EntranceData("The Heart Of Terror", "Empty Rooftop", True, - lambda state: state.can_reach_location( - "Q: Save Halloween Hill", player)), - EntranceData("A Hidey-Hole", "Halloween Hill", True, lambda state: True), - EntranceData("Empty Rooftop", "Halloween Hill", True, - lambda state: True), - EntranceData("Swampdog Lair", "Halloween Hill", True, - lambda state: True), - EntranceData("Larry's Lair", "Halloween Hill", True, lambda state: True), - - # logical zone connections, cant be randomized - - EntranceData("Halloween Hill", "Slurpy Swamp Mud", False, - lambda state: state.has("Boots", player)), - EntranceData("Slurpy Swamp Mud", "Halloween Hill", False, - lambda state: state.has("Boots", player)), - - # EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False, lambda state: True), - EntranceData("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, - lambda state: state.has("Boots", player)), - - # EntranceData("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False, lambda state: True), - EntranceData("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, - lambda state: state.has("Boots", player)), - - EntranceData("Zombiton", "Halloween Hill", False, lambda state: True), - # one way - # EntranceData("Halloween Hill", "Zombiton ", False), todo possible with badges - - EntranceData("Halloween Hill", "Rocky Cliffs", False, - lambda state: state.has("Big Gem", player)), - EntranceData("Rocky Cliffs", "Halloween Hill", False, - lambda state: state.has("Big Gem", player)), - - EntranceData("Vampy Land", "Halloween Hill", False, lambda state: True), - # one way - # EntranceData("Halloween Hill", "Vampy Land", False), TODO possible with badges/rando - - EntranceData("Underground Tunnel Top", "Underground Tunnel Mud", False, - lambda state: state.has("Boots", player)), - EntranceData("Underground Tunnel Mud", "Underground Tunnel Top", False, - lambda state: state.has("Boots", player)), - EntranceData("Underground Tunnel Mud", "Underground Tunnel Zombie", - False, lambda state: state.has("Boots", player)), # one way - # EntranceData("Underground Tunnel Zombie", "Underground Tunnel Mud", False), # TODO possible with badges/bridge rando - - EntranceData("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False, - lambda state: state.has("Boots", player)), # one way - # EntranceData("Swamp Gas Cavern Back", "Swamp Gas Cavern Front", False), # TODO possible with badges - - # probably need these with molecular dispersion - # "The Witch's Cabin Front -> The Witch's Cabin Back": EntranceData("The Witch's Cabin Front", "The Witch's Cabin Back", False), - # "The Witch's Cabin Back -> The Witch's Cabin Front": EntranceData("The Witch's Cabin Back", "The Witch's Cabin Front", False), - # "Creepy Caverns Left -> Creepy Caverns Middle": EntranceData("Creepy Caverns Left", "Creepy Caverns Middle", False), - # "Creepy Caverns Middle -> Creepy Caverns Left": EntranceData("Creepy Caverns Middle", "Creepy Caverns Left", False), - # "Creepy Caverns Middle -> Creepy Caverns Right": EntranceData("Creepy Caverns Middle", "Creepy Caverns Right", False), - # "Creepy Caverns Right -> Creepy Caverns Middle": EntranceData("Creepy Caverns Right", "Creepy Caverns Middle", False), - - # "Castle Vampy II Main -> Castle Vampy II NE": EntranceData("Castle Vampy II Main", "Castle Vampy II NE", False), - # "Castle Vampy II NE -> Castle Vampy II Main": EntranceData("Castle Vampy II NE", "Castle Vampy II Main", False), - # "Castle Vampy II Main -> Castle Vampy II SE": EntranceData("Castle Vampy II Main", "Castle Vampy II SE", False), - # "Castle Vampy II SE -> Castle Vampy II Main": EntranceData("Castle Vampy II SE", "Castle Vampy II Main", False), - # "Castle Vampy II Main -> Castle Vampy II SW": EntranceData("Castle Vampy II Main", "Castle Vampy II SW", False), - # "Castle Vampy II SW -> Castle Vampy II Main": EntranceData("Castle Vampy II SW", "Castle Vampy II Main", False), - # "Castle Vampy II Main -> Castle Vampy II NW": EntranceData("Castle Vampy II Main", "Castle Vampy II NW", False), - # "Castle Vampy II NW -> Castle Vampy II Main": EntranceData("Castle Vampy II NW", "Castle Vampy II Main", False), - - # "Castle Vampy III Main -> Castle Vampy III NE": EntranceData("Castle Vampy III Main", "Castle Vampy III NE", False), - # "Castle Vampy III NE -> Castle Vampy III Main": EntranceData("Castle Vampy III NE", "Castle Vampy III Main", False), - # "Castle Vampy III Main -> Castle Vampy III SE": EntranceData("Castle Vampy III Main", "Castle Vampy III SE", False), - # "Castle Vampy III SE -> Castle Vampy III Main": EntranceData("Castle Vampy III SE", "Castle Vampy III Main", False), - # "Castle Vampy III Main -> Castle Vampy III SW": EntranceData("Castle Vampy III Main", "Castle Vampy III SW", False), - # "Castle Vampy III SW -> Castle Vampy III Main": EntranceData("Castle Vampy III SW", "Castle Vampy III Main", False), - # "Castle Vampy III Main -> Castle Vampy III NW": EntranceData("Castle Vampy III Main", "Castle Vampy III NW", False), - # "Castle Vampy III NW -> Castle Vampy III Main": EntranceData("Castle Vampy III NW", "Castle Vampy III Main", False), - - # "Castle Vampy IV Main -> Castle Vampy IV NE": EntranceData("Castle Vampy IV Main", "Castle Vampy IV NE", False), - # "Castle Vampy IV NE -> Castle Vampy IV Main": EntranceData("Castle Vampy IV NE", "Castle Vampy IV Main", False), - # "Castle Vampy IV Main -> Castle Vampy IV SE": EntranceData("Castle Vampy IV Main", "Castle Vampy IV SE", False), - # "Castle Vampy IV SE -> Castle Vampy IV Main": EntranceData("Castle Vampy IV SE", "Castle Vampy IV Main", False), - # "Castle Vampy IV Main -> Castle Vampy IV SW": EntranceData("Castle Vampy IV Main", "Castle Vampy IV SW", False), - # "Castle Vampy IV SW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV SW", "Castle Vampy IV Main", False), - # "Castle Vampy IV Main -> Castle Vampy IV NW": EntranceData("Castle Vampy IV Main", "Castle Vampy IV NW", False), - # "Castle Vampy IV NW -> Castle Vampy IV Main": EntranceData("Castle Vampy IV NW", "Castle Vampy IV Main", False), - ] - for region in multiworld.get_regions(player): - for entry in loonyland_entrance_table: - if entry.source_region == region.name: - region.connect(connecting_region=world.get_region(entry.target_region), rule=entry.rule) + rule: CollectionRule \ No newline at end of file diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/Items.py index 314936c98e04..8e3e24f40e43 100644 --- a/worlds/loonyland/Items.py +++ b/worlds/loonyland/Items.py @@ -1,12 +1,7 @@ -from typing import NamedTuple, Dict +from typing import NamedTuple from BaseClasses import Item, ItemClassification -from worlds.AutoWorld import World from enum import Enum -from .Defines import * - -loonyland_base_id: int = 2876900 - class LoonylandItem(Item): """ @@ -14,8 +9,7 @@ class LoonylandItem(Item): """ game: str = "Loonyland" - -class ItemCategory(Enum): +class LL_ItemCat(Enum): ITEM = 0 CHEAT = 1 FILLER = 2 @@ -23,59 +17,8 @@ class ItemCategory(Enum): EVENT = 4 -class LoonylandItemData(NamedTuple): +class LL_Item(NamedTuple): id: int - category: ItemCategory + category: LL_ItemCat classification: ItemClassification - - -item_frequencies = { - "Heart": 20, - "Lightning": 10, - "Arrow": 10, - "Pants": 10, - "Mushroom": 10, - "Orb": 4, - "Vamp Statue": 8, - "Big Gem": 6, - "Bat Statue": 4 -} - -loony_item_table: Dict[str, LoonylandItemData] = { - "Heart": LoonylandItemData(loonyland_base_id + VAR_HEART, ItemCategory.ITEM, ItemClassification.useful), - "Lightning": LoonylandItemData(loonyland_base_id + VAR_LIGHTNING, ItemCategory.ITEM, ItemClassification.useful), - "Arrow": LoonylandItemData(loonyland_base_id + VAR_ARROW, ItemCategory.ITEM, ItemClassification.useful), - "Pants": LoonylandItemData(loonyland_base_id + VAR_PANTS, ItemCategory.ITEM, ItemClassification.useful), - "Mushroom": LoonylandItemData(loonyland_base_id + VAR_MUSHROOM, ItemCategory.ITEM, ItemClassification.progression), - "Orb": LoonylandItemData(loonyland_base_id + VAR_MYSORB, ItemCategory.ITEM, ItemClassification.progression), - "Bombs": LoonylandItemData(loonyland_base_id + VAR_WEAPON, ItemCategory.ITEM, ItemClassification.progression), - "Shock Wand": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 1, ItemCategory.ITEM, ItemClassification.progression), - "Ice Spear": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 2, ItemCategory.ITEM, ItemClassification.progression), - "Cactus": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 3, ItemCategory.ITEM, ItemClassification.progression), - "Boomerang": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 4, ItemCategory.ITEM, ItemClassification.progression), - "Whoopee": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 5, ItemCategory.ITEM, ItemClassification.progression), - "Hot Pants": LoonylandItemData(loonyland_base_id + VAR_WEAPON + 6, ItemCategory.ITEM, ItemClassification.progression), - "Skull Key": LoonylandItemData(loonyland_base_id + VAR_SKULLKEY, ItemCategory.ITEM, ItemClassification.progression), - "Bat Key": LoonylandItemData(loonyland_base_id + VAR_BATKEY, ItemCategory.ITEM, ItemClassification.progression), - "Pumpkin Key": LoonylandItemData(loonyland_base_id + VAR_PUMPKINKEY, ItemCategory.ITEM, ItemClassification.progression), - "Boots": LoonylandItemData(loonyland_base_id + VAR_BOOTS, ItemCategory.ITEM, ItemClassification.progression), - "Stick": LoonylandItemData(loonyland_base_id + VAR_STICK, ItemCategory.ITEM, ItemClassification.progression), - "Fertilizer": LoonylandItemData(loonyland_base_id + VAR_FERTILIZER, ItemCategory.ITEM, ItemClassification.progression), - "Silver": LoonylandItemData(loonyland_base_id + VAR_SILVER, ItemCategory.ITEM, ItemClassification.progression), - "Doom Daisy": LoonylandItemData(loonyland_base_id + VAR_DAISY, ItemCategory.ITEM, ItemClassification.progression), - "Ghost Potion": LoonylandItemData(loonyland_base_id + VAR_POTION, ItemCategory.ITEM, ItemClassification.progression), - "Vamp Statue": LoonylandItemData(loonyland_base_id + VAR_VAMPBUST, ItemCategory.ITEM, ItemClassification.progression), - "Cat": LoonylandItemData(loonyland_base_id + VAR_CAT, ItemCategory.ITEM, ItemClassification.progression), - "Big Gem": LoonylandItemData(loonyland_base_id + VAR_GEM, ItemCategory.ITEM, ItemClassification.progression), - "Zombie Reward": LoonylandItemData(loonyland_base_id + VAR_ZOMBIEGEM, ItemCategory.ITEM, ItemClassification.filler), - "3 way": LoonylandItemData(loonyland_base_id + VAR_TRIPLEFIRE, ItemCategory.ITEM, ItemClassification.useful), - "Happy Stick": LoonylandItemData(loonyland_base_id + VAR_TALISMAN, ItemCategory.ITEM, ItemClassification.progression), - "Bat Statue": LoonylandItemData(loonyland_base_id + VAR_BATSTATUE, ItemCategory.ITEM, ItemClassification.progression), - "Lantern": LoonylandItemData(loonyland_base_id + VAR_LANTERN, ItemCategory.ITEM, ItemClassification.progression), - "Reflect": LoonylandItemData(loonyland_base_id + VAR_REFLECT, ItemCategory.ITEM, ItemClassification.useful), - "Silver Sling": LoonylandItemData(loonyland_base_id + VAR_SILVERSLING, ItemCategory.ITEM, ItemClassification.progression) - # TODO add cheats - # TODO filler - # TODO traps - # TODO event -} + frequency: int = 1 diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index d8d119b2fe3f..5fcfeaa2b8f7 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -10,128 +10,16 @@ class LoonylandLocation(Location): game = "Loonyland" -class LocationCategory(Enum): +class LL_LocCat(Enum): PICKUP = 0 QUEST = 1 BADGE = 2 EVENT = 4 -class LoonylandLocationData(NamedTuple): +class LL_Location(NamedTuple): id: int - category: LocationCategory + category: LL_LocCat region: str -loonyland_location_table: Dict[str, LoonylandLocationData] = { - "Swamp: Mud Path": LoonylandLocationData(0, LocationCategory.PICKUP, "Slurpy Swamp Mud"), - "Swamp: Bog Beast": LoonylandLocationData(1, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Upper Ledge": LoonylandLocationData(2, LocationCategory.PICKUP, "Rocky Cliffs"), - "Swamp: Sapling Shrine": LoonylandLocationData(3, LocationCategory.PICKUP, "Slurpy Swamp Mud"), - "Terror Glade: South Trees": LoonylandLocationData(4, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Vine": LoonylandLocationData(5, LocationCategory.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Grand Pharoh": LoonylandLocationData(6, LocationCategory.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Rock Corner": LoonylandLocationData(7, LocationCategory.PICKUP, "Rocky Cliffs"), - "Swamp: Outside Luniton": LoonylandLocationData(8, LocationCategory.PICKUP, "Halloween Hill"), - "Swamp: East 1": LoonylandLocationData(9, LocationCategory.PICKUP, "Halloween Hill"), - "Swamp: Top Left dry": LoonylandLocationData(10, LocationCategory.PICKUP, "Halloween Hill"), - "Swamp: East 2": LoonylandLocationData(11, LocationCategory.PICKUP, "Halloween Hill"), - "Woods: Above Castle": LoonylandLocationData(12, LocationCategory.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Entrance Ledge": LoonylandLocationData(13, LocationCategory.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Peak": LoonylandLocationData(14, LocationCategory.PICKUP, "Rocky Cliffs"), - "Woods: SW of Cabin": LoonylandLocationData(15, LocationCategory.PICKUP, "Halloween Hill"), - "Witch's Cabin: Bedroom": LoonylandLocationData(16, LocationCategory.PICKUP, "The Witch's Cabin Front"), - "Witch's Cabin: Backroom": LoonylandLocationData(17, LocationCategory.PICKUP, "The Witch's Cabin Back"), - "Bonita's Cabin: Barrel Maze": LoonylandLocationData(18, LocationCategory.PICKUP, "Bonita's Cabin"), - "Bog Pit: Top Door": LoonylandLocationData(19, LocationCategory.PICKUP, "The Bog Pit"), - "Bog Pit: Posts Room": LoonylandLocationData(20, LocationCategory.PICKUP, "The Bog Pit"), - "Bog Pit: Drippy Window": LoonylandLocationData(21, LocationCategory.PICKUP, "The Bog Pit"), - "Bog Pit: Green room": LoonylandLocationData(22, LocationCategory.PICKUP, "The Bog Pit"), - "Bog Pit: Arena": LoonylandLocationData(23, LocationCategory.PICKUP, "The Bog Pit"), - "Bog Pit: Sw Switch": LoonylandLocationData(24, LocationCategory.PICKUP, "The Bog Pit"), - "Tunnel: Swampdog Pumpkin Door": LoonylandLocationData(25, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Tunnel: Scratch Wall": LoonylandLocationData(26, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Tunnel: Narrow Passage": LoonylandLocationData(27, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Tunnel: Top Frogs": LoonylandLocationData(28, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Tunnel: Torch Island": LoonylandLocationData(29, LocationCategory.PICKUP, "Underground Tunnel Mud"), - "Tunnel: Small Room": LoonylandLocationData(30, LocationCategory.PICKUP, "Underground Tunnel Top"), - "Swamp Gas: Scratch Wall": LoonylandLocationData(31, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), - "Swamp Gas: Bat Door": LoonylandLocationData(32, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), - "Swamp Gas: Stair room": LoonylandLocationData(33, LocationCategory.PICKUP, "Swamp Gas Cavern Back"), - "Swamp Gas: Rock Prison": LoonylandLocationData(34, LocationCategory.PICKUP, "Swamp Gas Cavern Front"), - "A Tiny Cabin": LoonylandLocationData(35, LocationCategory.PICKUP, "A Tiny Cabin"), - "Seer: Bedside": LoonylandLocationData(36, LocationCategory.PICKUP, "A Cabin Seer"), - "Dusty Crypt: Pumpkin Door": LoonylandLocationData(37, LocationCategory.PICKUP, "Dusty Crypt"), - "Dusty Crypt: Maze": LoonylandLocationData(38, LocationCategory.PICKUP, "Dusty Crypt"), - "Musty Crypt: Maze Room": LoonylandLocationData(39, LocationCategory.PICKUP, "Musty Crypt"), - "Rusty Crypt: Vine": LoonylandLocationData(40, LocationCategory.PICKUP, "Rusty Crypt"), - "Rusty Crypt: Boulders": LoonylandLocationData(41, LocationCategory.PICKUP, "Rusty Crypt"), - "A Messy Cabin": LoonylandLocationData(42, LocationCategory.PICKUP, "A Messy Cabin"), - "Under The Lake: Behind Lightning Rod": LoonylandLocationData(43, LocationCategory.PICKUP, "Under The Lake"), - "Under The Lake: Bat Door": LoonylandLocationData(44, LocationCategory.PICKUP, "Under The Lake"), - "Deeper Lake: Corner": LoonylandLocationData(45, LocationCategory.PICKUP, "Deeper Under The Lake"), - "Deeper Lake: Rhombus": LoonylandLocationData(46, LocationCategory.PICKUP, "Deeper Under The Lake"), - "Frankenjulie's Reward": LoonylandLocationData(47, LocationCategory.PICKUP, "Frankenjulie's Laboratory"), - "Tower: Barracks": LoonylandLocationData(48, LocationCategory.PICKUP, "Haunted Tower"), - "Tower F2: Skull Puzzle": LoonylandLocationData(49, LocationCategory.PICKUP, "Haunted Tower, Floor 2"), - "PolterGuy's Reward": LoonylandLocationData(50, LocationCategory.PICKUP, "Haunted Tower Roof"), - "Tower Basement: DoorDoorDoorDoorDoorDoor": LoonylandLocationData(51, LocationCategory.PICKUP, "Haunted Basement"), - "Abandoned Mine: Shaft": LoonylandLocationData(52, LocationCategory.PICKUP, "Abandoned Mines"), - "Shrine of Bombulus: Prize": LoonylandLocationData(53, LocationCategory.PICKUP, "The Shrine Of Bombulus"), - "Gloomy Cavern: Lockpick": LoonylandLocationData(54, LocationCategory.PICKUP, "A Gloomy Cavern"), - "Happy Stick: Hidden": LoonylandLocationData(55, LocationCategory.PICKUP, "Happy Stick Woods"), - "Happy Stick: Reward": LoonylandLocationData(56, LocationCategory.PICKUP, "Happy Stick Woods"), - "Wolf Den: Top Left": LoonylandLocationData(57, LocationCategory.PICKUP, "The Wolf Den"), - "Wolf Den: Pumpkin Door": LoonylandLocationData(58, LocationCategory.PICKUP, "The Wolf Den"), - "Wolf Den: Vine": LoonylandLocationData(59, LocationCategory.PICKUP, "The Wolf Den"), - "Upper Cavern: Three Gold Skeletons": LoonylandLocationData(60, LocationCategory.PICKUP, "Upper Creepy Caverns"), - "Under The Ravine: Left Vine": LoonylandLocationData(61, LocationCategory.PICKUP, "Under The Ravine"), - "Under The Ravine: Right Vine": LoonylandLocationData(62, LocationCategory.PICKUP, "Under The Ravine"), - "Creepy Caverns M: Pharaoh Bat Door": LoonylandLocationData(63, LocationCategory.PICKUP, "Creepy Caverns Middle"), - "Creepy Caverns E: Top Pharaohs": LoonylandLocationData(64, LocationCategory.PICKUP, "Creepy Caverns Right"), - "Creepy Caverns M: Gargoyles": LoonylandLocationData(65, LocationCategory.PICKUP, "Creepy Caverns Middle"), - "Castle Vampy: Top Room": LoonylandLocationData(66, LocationCategory.PICKUP, "Castle Vampy"), - "Castle Vampy: Maze": LoonylandLocationData(67, LocationCategory.PICKUP, "Castle Vampy"), - "Castle Vampy: Gauntlet": LoonylandLocationData(68, LocationCategory.PICKUP, "Castle Vampy"), - "Castle Vampy: Bat Closet": LoonylandLocationData(69, LocationCategory.PICKUP, "Castle Vampy"), - "Castle Vampy II: Candle Room": LoonylandLocationData(70, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Castle Vampy II: Bloodsucker Room": LoonylandLocationData(71, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Castle Vampy II: Vampire Lord": LoonylandLocationData(72, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Castle Vampy II: Bat Room": LoonylandLocationData(73, LocationCategory.PICKUP, "Castle Vampy II Main"), - "Cabin in the Woods: Gold Skull": LoonylandLocationData(74, LocationCategory.PICKUP, "Cabin In The Woods"), - "Castle Vampy III: Center": LoonylandLocationData(75, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: Behind the Pews": LoonylandLocationData(76, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: AMBUSH!": LoonylandLocationData(77, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: Halloween": LoonylandLocationData(78, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: Bat room": LoonylandLocationData(79, LocationCategory.PICKUP, "Castle Vampy III Main"), - "Castle Vampy IV: Right Path": LoonylandLocationData(80, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Left Path": LoonylandLocationData(81, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Ballroom Right": LoonylandLocationData(82, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Right Secret Wall": LoonylandLocationData(83, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Ballroom Left": LoonylandLocationData(84, LocationCategory.PICKUP, "Castle Vampy IV Main"), - "Roof NW: Gutsy the Elder": LoonylandLocationData(85, LocationCategory.PICKUP, "Castle Vampy Roof NW"), - "Roof NE: Stoney the Elder": LoonylandLocationData(86, LocationCategory.PICKUP, "Castle Vampy Roof NE"), - "Roof SW: Drippy the Elder": LoonylandLocationData(87, LocationCategory.PICKUP, "Castle Vampy Roof SW"), - "Roof SE: Toasty the Elder": LoonylandLocationData(88, LocationCategory.PICKUP, "Castle Vampy Roof SE"), - "Bonkula": LoonylandLocationData(89, LocationCategory.PICKUP, "The Heart Of Terror"), - "Hidey-Hole: Bat Door": LoonylandLocationData(90, LocationCategory.PICKUP, "A Hidey-Hole"), - "Hidey-Hole: Pebbles": LoonylandLocationData(91, LocationCategory.PICKUP, "A Hidey-Hole"), - "Swampdog Lair: Entrance": LoonylandLocationData(92, LocationCategory.PICKUP, "Swampdog Lair"), - "Swampdog Lair: End": LoonylandLocationData(93, LocationCategory.PICKUP, "Swampdog Lair"), - "Q: Save Halloween Hill": LoonylandLocationData(94, LocationCategory.QUEST, "The Evilizer"), - "Q: Tree Trimming": LoonylandLocationData(95, LocationCategory.QUEST, "A Cabin Trees"), - "Q: Scaredy Cat": LoonylandLocationData(96, LocationCategory.QUEST, "Halloween Hill"), - "Q: Sticky Shoes": LoonylandLocationData(97, LocationCategory.QUEST, "Halloween Hill"), - "Q: Mushroom Hunt": LoonylandLocationData(98, LocationCategory.QUEST, "The Witch's Cabin Front"), - "Q: Zombie Stomp": LoonylandLocationData(99, LocationCategory.QUEST, "Zombiton"), - "Q: Smashing Pumpkins": LoonylandLocationData(100, LocationCategory.QUEST, "Halloween Hill"), - "Q: Silver Bullet": LoonylandLocationData(101, LocationCategory.QUEST, "Halloween Hill"), - "Q: Hairy Larry": LoonylandLocationData(102, LocationCategory.QUEST, "A Cabin Larry"), - "Q: Ghostbusting": LoonylandLocationData(103, LocationCategory.QUEST, "The Witch's Cabin Front"), - "Q: The Rescue": LoonylandLocationData(104, LocationCategory.QUEST, "A Gloomy Cavern"), - "Q: The Collection": LoonylandLocationData(105, LocationCategory.QUEST, "A Cabin Collector") - - - - # todo the 40 badge locations -} diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index de29c7905516..16b098a0995c 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -1,126 +1,8 @@ from typing import NamedTuple, Dict, List - from BaseClasses import Region - - class LoonylandRegion(Region): game = "Loonyland" - -class LoonylandRegionData(NamedTuple): - id: int +class LLRegion(NamedTuple): real: bool - map: str - - -loonyland_region_table: Dict[str, LoonylandRegionData] = { - "Menu": LoonylandRegionData(0, False, ""), - "Halloween Hill": LoonylandRegionData(0, False, "Halloween Hill"), - "Slurpy Swamp Mud": LoonylandRegionData(0, False, "Halloween Hill"), - "Slurpy Swamp Mud North Warp": LoonylandRegionData(0, False, "Halloween Hill"), - "Slurpy Swamp Mud East Warp": LoonylandRegionData(0, False, "Halloween Hill"), - "Zombiton": LoonylandRegionData(0, False, "Halloween Hill"), - "Rocky Cliffs": LoonylandRegionData(0, False, "Halloween Hill"), - "Vampy Land": LoonylandRegionData(0, False, "Halloween Hill"), - "A Cabin Trees": LoonylandRegionData(0, True, "A Cabin"), - "The Witch's Cabin Front": LoonylandRegionData(0, False, "The Witch's Cabin"), - "The Witch's Cabin Back": LoonylandRegionData(0, False, "The Witch's Cabin"), - "Bonita's Cabin": LoonylandRegionData(0, True, ""), - "The Bog Pit": LoonylandRegionData(0, True, ""), - "Underground Tunnel Top": LoonylandRegionData(0, True, ""), - "Underground Tunnel Mud": LoonylandRegionData(0, False, "Underground Tunnel"), - "Underground Tunnel Zombie": LoonylandRegionData(0, False, "Underground Tunnel"), - "Swamp Gas Cavern Front": LoonylandRegionData(0, False, "Swamp Gas Cavern"), - "Swamp Gas Cavern Back": LoonylandRegionData(0, False, "Swamp Gas Cavern"), - "A Tiny Cabin": LoonylandRegionData(0, True, ""), - "A Cabin Seer": LoonylandRegionData(0, True, ""), - "Benny's Cocktails": LoonylandRegionData(0, True, ""), - "Dusty Crypt": LoonylandRegionData(0, True, ""), - "Dusty Crypt Entrance": LoonylandRegionData(0, False, ""), - "Musty Crypt": LoonylandRegionData(0, True, ""), - "Musty Crypt Entrance": LoonylandRegionData(0, False, ""), - "Rusty Crypt": LoonylandRegionData(0, True, ""), - "Rusty Crypt Entrance": LoonylandRegionData(0, False, ""), - "A Messy Cabin": LoonylandRegionData(0, True, ""), - "Under The Lake": LoonylandRegionData(0, True, ""), - "Under The Lake Entrance": LoonylandRegionData(0, False, ""), - "Under The Lake Exit": LoonylandRegionData(0, False, ""), - "Deeper Under The Lake": LoonylandRegionData(0, True, ""), - "Frankenjulie's Laboratory": LoonylandRegionData(0, True, ""), - "Haunted Tower": LoonylandRegionData(0, True, ""), - "Haunted Tower, Floor 2": LoonylandRegionData(0, True, ""), - "Haunted Tower, Floor 3": LoonylandRegionData(0, True, ""), - "Haunted Tower Roof": LoonylandRegionData(0, True, ""), - "Haunted Basement": LoonylandRegionData(0, True, ""), - "Haunted Basement Entrance": LoonylandRegionData(0, False, ""), - "Abandoned Mines": LoonylandRegionData(0, True, ""), - "Abandoned Mines Entrance": LoonylandRegionData(0, False, ""), - "The Shrine Of Bombulus": LoonylandRegionData(0, True, ""), - "A Gloomy Cavern": LoonylandRegionData(0, True, ""), - "A Gloomy Cavern Entrance": LoonylandRegionData(0, False, ""), - "Happy Stick Woods": LoonylandRegionData(0, True, ""), - "The Wolf Den": LoonylandRegionData(0, True, ""), - "The Wolf Den Entrance": LoonylandRegionData(0, False, ""), - "The Wolf Den Exit": LoonylandRegionData(0, False, ""), - "A Cabin Larry": LoonylandRegionData(0, True, ""), - "Upper Creepy Caverns": LoonylandRegionData(0, True, ""), - "Upper Creepy Caverns Left Warp": LoonylandRegionData(0, False, ""), - "Upper Creepy Caverns Middle Warp": LoonylandRegionData(0, False, ""), - "Upper Creepy Caverns Right Warp": LoonylandRegionData(0, False, ""), - "Under The Ravine": LoonylandRegionData(0, True, ""), - "Creepy Caverns Left": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Left Bottom Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Left Top Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Middle": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Middle Top Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Middle Right Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Right": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Right Left Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Creepy Caverns Right Bottom Warp": LoonylandRegionData(0, False, "Creepy Caverns"), - "Castle Vampy": LoonylandRegionData(0, True, ""), - "Castle Vampy Skull Jail": LoonylandRegionData(0, False, "Castle Vampy"), - "Castle Vampy II Main": LoonylandRegionData(0, False, "Castle Vampy II"), - "Castle Vampy II NW": LoonylandRegionData(0, False, "Castle Vampy II"), - "Castle Vampy II NE": LoonylandRegionData(0, False, "Castle Vampy II"), - "Castle Vampy II SW": LoonylandRegionData(0, False, "Castle Vampy II"), - "Castle Vampy II SE": LoonylandRegionData(0, False, "Castle Vampy II"), - "Castle Vampy II Bat Jail": LoonylandRegionData(0, False, "Castle Vampy II"), - "Cabin In The Woods": LoonylandRegionData(0, True, ""), - "Castle Vampy III Main": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy III NW": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy III NE": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy III SW": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy III SE": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy III Pumpkin Jail": LoonylandRegionData(0, False, "Castle Vampy III"), - "Castle Vampy IV Main": LoonylandRegionData(0, False, "Castle Vampy IV"), - "Castle Vampy IV NW": LoonylandRegionData(0, False, "Castle Vampy IV"), - "Castle Vampy IV NE": LoonylandRegionData(0, False, "Castle Vampy IV"), - "Castle Vampy IV SW": LoonylandRegionData(0, False, "Castle Vampy IV"), - "Castle Vampy IV SE": LoonylandRegionData(0, False, "Castle Vampy IV"), - "A Cabin Collector": LoonylandRegionData(0, True, ""), - "Castle Vampy Roof NE": LoonylandRegionData(0, True, ""), - "Castle Vampy Roof SE": LoonylandRegionData(0, True, ""), - "Castle Vampy Roof SW": LoonylandRegionData(0, True, ""), - "Castle Vampy Roof NW": LoonylandRegionData(0, True, ""), - "The Evilizer": LoonylandRegionData(0, True, ""), - "The Heart Of Terror": LoonylandRegionData(0, True, ""), - "The Heart Of Terror Entrance": LoonylandRegionData(0, False, ""), - "The Heart Of Terror Exit": LoonylandRegionData(0, False, ""), - "A Hidey-Hole": LoonylandRegionData(0, True, ""), - "Empty Rooftop": LoonylandRegionData(0, True, ""), - "Swampdog Lair": LoonylandRegionData(0, True, ""), - "Swampdog Lair Entrance": LoonylandRegionData(0, False, ""), - "Larry's Lair": LoonylandRegionData(0, True, ""), - - # gamemodes - "Bowling": LoonylandRegionData(0, False, ""), - "Survival": LoonylandRegionData(0, False, ""), - "Boss Bash": LoonylandRegionData(0, False, ""), - "Loony Ball": LoonylandRegionData(0, False, ""), - "Remix": LoonylandRegionData(0, False, ""), - # "Bowling", - # "Survival", - # "Boss Bash", - # "Loony Ball", - # "Remix" -} + map: str = "" diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index a536522f5ace..18d96da81198 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -1,5 +1,7 @@ +from typing import Dict + from BaseClasses import CollectionState -from worlds.generic.Rules import add_item_rule, add_rule +from worlds.generic.Rules import add_item_rule, add_rule, CollectionRule def have_light_source(state: CollectionState, player: int) -> bool: @@ -78,130 +80,4 @@ def can_enter_vampy_iii(state: CollectionState, player: int) -> bool: def can_enter_vampy_iv(state: CollectionState, player: int) -> bool: - return can_enter_vampy_iii(state, player) and state.has("Pumpkin Key", player) - - -def set_rules(multiworld, world, player): - access_rules = { - "Swamp: Mud Path": lambda state: state.has("Boots", player), - # "Swamp: Bog Beast": lambda state: True, - # "Rocky Cliffs: Upper Ledge": lambda state: True, - "Swamp: Sapling Shrine": lambda state: state.has("Boots", player), - # "Terror Glade: South Trees": lambda state: True, - "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", player), - # "Rocky Cliffs: Grand Pharoh": lambda state: True, - "Rocky Cliffs: Rock Corner": lambda state: have_bombs(state, player), - # "Swamp: Outside Luniton": lambda state: True, - # "Swamp: East 1": lambda state: True, - # "Swamp: Top Left dry": lambda state: True, - # "Swamp: East 2": lambda state: True, - # "Woods: Above Castle": lambda state: True, - # "Rocky Cliffs: Entrance Ledge": lambda state: True, - # "Rocky Cliffs: Peak": lambda state: True, - # "Woods: SW of Cabin": lambda state: True, - "Witch's Cabin: Bedroom": lambda state: have_light_source(state, player), - # "Witch's Cabin: Backroom" lambda state: True, - # "Bonita's Cabin: Barrel Maze": lambda state: True, - "Bog Pit: Top Door": lambda state: state.has("Skull Key", player), - # "Bog Pit: Posts Room": lambda state: True, - # "Bog Pit: Drippy Window": lambda state: True, - # "Bog Pit: Green room": lambda state: True, - # "Bog Pit: Arena": lambda state: True, - # "Bog Pit: SW Switch": lambda state: True, - "Tunnel: Swampdog Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - "Tunnel: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), - # "Tunnel: Narrow Passage": lambda state: True, - # "Tunnel: Top Frogs": lambda state: True, - "Tunnel: Torch Island": lambda state: state.has("Boots", player), - # "Tunnel: Small Room": lambda state: True, - "Swamp Gas: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), - "Swamp Gas: Bat Door": lambda state: state.has("Bat Key", player), - # "Swamp Gas: Stair room": lambda state: True, - "Swamp Gas: Rock Prison": lambda state: have_bombs(state, player), - # "A Tiny Cabin": lambda state: True, - # "Seer: Bedside": lambda state: True - "Dusty Crypt: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - # "Dusty Crypt: Maze": lambda state: True, - "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, player), - "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", player), - # "Rusty Crypt: Boulders": lambda state: True, - # "A Messy Cabin": lambda state: True, - # "Under The Lake: Behind Lightning Rod": True, - "Under The Lake: Bat Door": lambda state: state.has("Bat Key", player), - # "Deeper Lake: Corner": lambda state: True, - # "Deeper Lake: Rhombus": lambda state: True, - # "Frankenjulie's Reward": lambda state: True, - "Tower: Barracks": lambda state: state.has("Ghost Potion", player) and state.has("Bat Key", player), - "Tower F2: Skull Puzzle": lambda state: state.has("Ghost Potion", player), - # "PolterGuy's Reward": lambda state: True, - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has( - "Skull Key", - player) and state.has( - "Pumpkin Key", player), - # "Abandoned Mine: Shaft": lambda state: True, - # "Shrine of Bombulus: Prize": lambda state: True, - # "Gloomy Cavern: Lockpick": lambda state: True, - # "Happy Stick: Hidden": lambda state: True, - # "Happy Stick: Reward": lambda state: True, - # "Wolf Den: Top Left": lambda state: True, - "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - "Wolf Den: Vine": lambda state: state.has("Fertilizer", player), - "Upper Cavern: Three Gold Skeletons": lambda state: True, - "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", player), - "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", player), - "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", player), - # "Creepy Caverns E: Top Pharaohs": lambda state: True, - # "Creepy Caverns M: Gargoyles": lambda state: True, - # "Castle Vampy: Top Room": lambda state: True, - # "Castle Vampy: Maze": lambda state: True, - # "Castle Vampy: Gauntlet": lambda state: True, - # "Castle Vampy: Bat Closet": lambda state: True, - # "Castle Vampy II: Candle Room": lambda state: True, - # "Castle Vampy II: Bloodsucker Room": lambda state: True, - # "Castle Vampy II: Vampire Lord": lambda state: True, - # "Castle Vampy II: Bat Room": lambda state: True, - # "Cabin in the Woods: Gold Skull": lambda state: True, - # "Castle Vampy III: Center": lambda state: True, - # "Castle Vampy III: Behind the Pews": lambda state: True, - # "Castle Vampy III: AMBUSH!": lambda state: True, - # "Castle Vampy III: Halloween": lambda state: True, - # "Castle Vampy III: Too Many Bats": lambda state: True, - # "Castle Vampy IV: Right Path": lambda state: True, - # "Castle Vampy IV: Left Path": lambda state: True, - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", - player), - # "Castle Vampy IV: Right Secret Wall": lambda state: True, - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", - player), - "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), - # "Roof NE: Stoney the Elder": lambda state: True, - # "Roof SW: Drippy the Elder": lambda state: True, - # "Roof SE: Toasty the Elder": lambda state: True, - # "Bonkula": lambda state: True, - "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), - # "Hidey-Hole: Pebbles":: lambda state: True, - "Swampdog Lair: Entrance": lambda state: state.has("Boots", player), - "Swampdog Lair: End": lambda state: state.has("Boots", player) and have_light_source(state, - player) and state.has( - "Fertilizer", player), - "Q: Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Doom Daisy", player) and state.has( - "Mushroom", player, 10), - "Q: Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", - player) and state.has("Boots", - player), - "Q: Scaredy Cat": lambda state: state.has("Cat", player), - "Q: Silver Bullet": lambda state: state.has("Silver", player) and can_cleanse_crypts(state, player), - "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), - # "Q: Sticky Shoes": lambda state: True, - "Q: The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", - player) and can_enter_vampy( - state, player), - # "Q: The Rescue": lambda state: True, - # "Q: Tree Trimming": lambda state: True, - "Q: Witch Mushrooms": lambda state: state.has("Mushroom", player, 10), - "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), - # "The Evilizer - Save Halloween Hill": lambda state: True - } - for loc in multiworld.get_locations(player): - if loc.name in access_rules: - add_rule(loc, access_rules[loc.name]) + return can_enter_vampy_iii(state, player) and state.has("Pumpkin Key", player) \ No newline at end of file diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index d19d8d63f0b4..e509dd8d6625 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -1,15 +1,20 @@ +from .Data.entrance_data import set_entrances +from .Data.location_data import loonyland_location_table +from .Data.region_data import loonyland_region_table + +loonyland_base_id: int = 2876900 + from typing import List, Dict, Any from BaseClasses import Region, Tutorial, ItemClassification from worlds.AutoWorld import WebWorld, World -from .Items import LoonylandItem, item_frequencies, loony_item_table -from .Locations import LoonylandLocation, LoonylandLocationData, loonyland_location_table # , locked_locations +from .Data.item_data import loony_item_table +from .Items import LoonylandItem +from .Locations import LoonylandLocation, LL_Location # , locked_locations from .Options import LoonylandOptions -from .Regions import loonyland_region_table -from .Entrances import set_entrances, LoonylandEntrance -from .Rules import set_rules +from .Entrances import LoonylandEntrance +from .Data.rules_data import set_rules -loonyland_base_id: int = 2876900 class LoonylandWebWorld(WebWorld): @@ -44,7 +49,7 @@ def create_items(self) -> None: item_pool: List[LoonylandItem] = [] for name, item in loony_item_table.items(): if item.id: # and item.can_create(self): - for i in range(item_frequencies.get(name, 1)): + for i in range(item.frequency): item_pool.append(self.create_item(name)) self.multiworld.itempool += item_pool From 4bad19b452c223e525abd8b81c09c989f584a7e5 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sun, 15 Dec 2024 14:36:11 -0500 Subject: [PATCH 29/58] add difficulty as an option --- worlds/loonyland/Options.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/worlds/loonyland/Options.py b/worlds/loonyland/Options.py index 37e535f2c5d5..e6123ef29d3e 100644 --- a/worlds/loonyland/Options.py +++ b/worlds/loonyland/Options.py @@ -4,13 +4,30 @@ class WinCondition(Choice): - """Sets Win Condition.""" + """Evilizer: Beat the final boss + NOT IMPLEMENTED: 40 badges: get all 40 badge locs + NOT IMPLEMENTED: normal_remix: Beat the final boss in normal and remix""" + display_name = "Win Condition" option_evilizer = 0 option_40badges = 1 + option_normal_remix = 2 default = 0 +class Difficulty(Choice): + """Difficulty Setting""" + display_name = "Difficulty" + option_beginner = 0 + option_normal = 1 + option_hard = 2 + option_challenge = 3 + option_mad = 4 + option_loony = 5 + default = 2 + @dataclass class LoonylandOptions(PerGameCommonOptions): win_condition: WinCondition + difficulty: Difficulty + From e43337104102be4b11d1af648de30c8b08a37697 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Tue, 17 Dec 2024 07:59:07 -0500 Subject: [PATCH 30/58] autogenerated data --- .../loonyland/Data/{defines.py => Defines.py} | 0 worlds/loonyland/Data/entrance_data.py | 12 +++--- worlds/loonyland/Data/item_data.py | 2 +- worlds/loonyland/Data/location_data.py | 8 ++-- worlds/loonyland/Data/region_data.py | 38 +++++++++++-------- worlds/loonyland/Data/rules_data.py | 1 + 6 files changed, 34 insertions(+), 27 deletions(-) rename worlds/loonyland/Data/{defines.py => Defines.py} (100%) diff --git a/worlds/loonyland/Data/defines.py b/worlds/loonyland/Data/Defines.py similarity index 100% rename from worlds/loonyland/Data/defines.py rename to worlds/loonyland/Data/Defines.py diff --git a/worlds/loonyland/Data/entrance_data.py b/worlds/loonyland/Data/entrance_data.py index 60b692ebb34d..b8d66b87ede7 100644 --- a/worlds/loonyland/Data/entrance_data.py +++ b/worlds/loonyland/Data/entrance_data.py @@ -76,14 +76,14 @@ def set_entrances(multiworld, world, player): LL_Entrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True, lambda state: True), LL_Entrance("Frankenjulie's Laboratory", "Halloween Hill", True, lambda state: True), LL_Entrance("Haunted Basement", "Haunted Basement", True, lambda state: have_light_source(state, player)), - LL_Entrance("Haunted Tower", "Haunted Tower, Floor 2", True, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower", "Haunted Tower Floor 2", True, lambda state: state.has("Ghost Potion", player)), LL_Entrance("Haunted Tower", "Haunted Basement Entrance", True, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), - LL_Entrance("Haunted Tower, Floor 2", "Haunted Tower", True, lambda state: True), - LL_Entrance("Haunted Tower, Floor 2", "Haunted Tower, Floor 3", True, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower, Floor 3", "Haunted Tower, Floor 2", True, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower, Floor 3", "Haunted Tower Roof", True, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower Floor 2", "Haunted Tower", True, lambda state: True), + LL_Entrance("Haunted Tower Floor 2", "Haunted Tower Floor 3", True, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower Floor 3", "Haunted Tower Floor 2", True, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower Floor 3", "Haunted Tower Roof", True, lambda state: state.has("Ghost Potion", player)), LL_Entrance("Haunted Tower Roof", "Halloween Hill", True, lambda state: True), - LL_Entrance("Haunted Tower Roof", "Haunted Tower, Floor 3", True, lambda state: True), + LL_Entrance("Haunted Tower Roof", "Haunted Tower Floor 3", True, lambda state: True), LL_Entrance("Haunted Basement Entrance", "Haunted Tower", True, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), LL_Entrance("Haunted Basement Entrance", "Haunted Basement", True, lambda state: True), LL_Entrance("Haunted Basement", "Haunted Basement Entrance", True, lambda state: True), diff --git a/worlds/loonyland/Data/item_data.py b/worlds/loonyland/Data/item_data.py index 4fb44cc5cb81..b8c871cfa0d0 100644 --- a/worlds/loonyland/Data/item_data.py +++ b/worlds/loonyland/Data/item_data.py @@ -2,7 +2,7 @@ from BaseClasses import ItemClassification as IC from worlds.loonyland import loonyland_base_id as ll_base_id -from worlds.loonyland.Data.defines import * +from worlds.loonyland.Data.Defines import * from worlds.loonyland.Items import LL_Item, LL_ItemCat loony_item_table: Dict[str, LL_Item] = { diff --git a/worlds/loonyland/Data/location_data.py b/worlds/loonyland/Data/location_data.py index a19997452902..ee5969eed15b 100644 --- a/worlds/loonyland/Data/location_data.py +++ b/worlds/loonyland/Data/location_data.py @@ -51,7 +51,7 @@ "Deeper Lake: Rhombus": LL_Location(46, LL_LocCat.PICKUP, "Deeper Under The Lake"), "Frankenjulie's Reward": LL_Location(47, LL_LocCat.PICKUP, "Frankenjulie's Laboratory"), "Tower: Barracks": LL_Location(48, LL_LocCat.PICKUP, "Haunted Tower"), - "Tower F2: Skull Puzzle": LL_Location(49, LL_LocCat.PICKUP, "Haunted Tower, Floor 2"), + "Tower F2: Skull Puzzle": LL_Location(49, LL_LocCat.PICKUP, "Haunted Tower Floor 2"), "PolterGuy's Reward": LL_Location(50, LL_LocCat.PICKUP, "Haunted Tower Roof"), "Tower Basement: DoorDoorDoorDoorDoorDoor": LL_Location(51, LL_LocCat.PICKUP, "Haunted Basement"), "Abandoned Mine: Shaft": LL_Location(52, LL_LocCat.PICKUP, "Abandoned Mines"), @@ -66,7 +66,7 @@ "Under The Ravine: Left Vine": LL_Location(61, LL_LocCat.PICKUP, "Under The Ravine"), "Under The Ravine: Right Vine": LL_Location(62, LL_LocCat.PICKUP, "Under The Ravine"), "Creepy Caverns M: Pharaoh Bat Door": LL_Location(63, LL_LocCat.PICKUP, "Creepy Caverns Middle"), - "Creepy Caverns E: Top Pharaohs": LL_Location(64, LL_LocCat.PICKUP, "Creepy Caverns Right"), + "Creepy Caverns R: Top Pharaohs": LL_Location(64, LL_LocCat.PICKUP, "Creepy Caverns Right"), "Creepy Caverns M: Gargoyles": LL_Location(65, LL_LocCat.PICKUP, "Creepy Caverns Middle"), "Castle Vampy: Top Room": LL_Location(66, LL_LocCat.PICKUP, "Castle Vampy"), "Castle Vampy: Maze": LL_Location(67, LL_LocCat.PICKUP, "Castle Vampy"), @@ -91,7 +91,7 @@ "Roof NE: Stoney the Elder": LL_Location(86, LL_LocCat.PICKUP, "Castle Vampy Roof NE"), "Roof SW: Drippy the Elder": LL_Location(87, LL_LocCat.PICKUP, "Castle Vampy Roof SW"), "Roof SE: Toasty the Elder": LL_Location(88, LL_LocCat.PICKUP, "Castle Vampy Roof SE"), - "Bonkula": LL_Location(89, LL_LocCat.PICKUP, "The Heart Of Terror"), + "Bonkula Item": LL_Location(89, LL_LocCat.PICKUP, "The Heart Of Terror"), "Hidey-Hole: Bat Door": LL_Location(90, LL_LocCat.PICKUP, "A Hidey-Hole"), "Hidey-Hole: Pebbles": LL_Location(91, LL_LocCat.PICKUP, "A Hidey-Hole"), "Swampdog Lair: Entrance": LL_Location(92, LL_LocCat.PICKUP, "Swampdog Lair"), @@ -103,7 +103,7 @@ "Q: Mushroom Hunt": LL_Location(98, LL_LocCat.QUEST, "The Witch's Cabin Front"), "Q: Zombie Stomp": LL_Location(99, LL_LocCat.QUEST, "Zombiton"), "Q: Smashing Pumpkins": LL_Location(100, LL_LocCat.QUEST, "Halloween Hill"), - "Q: Silver Bullet": LL_Location(101, LL_LocCat.QUEST, "Halloween Hill"), + "Q: Silver Bullet": LL_Location(101, LL_LocCat.QUEST, "Zombiton"), "Q: Hairy Larry": LL_Location(102, LL_LocCat.QUEST, "A Cabin Larry"), "Q: Ghostbusting": LL_Location(103, LL_LocCat.QUEST, "The Witch's Cabin Front"), "Q: The Rescue": LL_Location(104, LL_LocCat.QUEST, "A Gloomy Cavern"), diff --git a/worlds/loonyland/Data/region_data.py b/worlds/loonyland/Data/region_data.py index 1248018a9d3e..948edce03b51 100644 --- a/worlds/loonyland/Data/region_data.py +++ b/worlds/loonyland/Data/region_data.py @@ -3,7 +3,7 @@ loonyland_region_table: Dict[str, LLRegion] = { "Menu": LLRegion(False), - "Halloween Hill": LLRegion(False, "Halloween Hill"), + "Halloween Hill": LLRegion(True), "Slurpy Swamp Mud": LLRegion(False, "Halloween Hill"), "Slurpy Swamp Mud North Warp": LLRegion(False, "Halloween Hill"), "Slurpy Swamp Mud East Warp": LLRegion(False, "Halloween Hill"), @@ -11,50 +11,53 @@ "Rocky Cliffs": LLRegion(False, "Halloween Hill"), "Vampy Land": LLRegion(False, "Halloween Hill"), "A Cabin Trees": LLRegion(True, "A Cabin"), + "The Witch's Cabin": LLRegion(True), "The Witch's Cabin Front": LLRegion(False, "The Witch's Cabin"), "The Witch's Cabin Back": LLRegion(False, "The Witch's Cabin"), "Bonita's Cabin": LLRegion(True), "The Bog Pit": LLRegion(True), + "Underground Tunnel": LLRegion(True), "Underground Tunnel Top": LLRegion(False, "Underground Tunnel"), "Underground Tunnel Mud": LLRegion(False, "Underground Tunnel"), "Underground Tunnel Zombie": LLRegion(False, "Underground Tunnel"), + "Swamp Gas Cavern": LLRegion(True), "Swamp Gas Cavern Front": LLRegion(False, "Swamp Gas Cavern"), "Swamp Gas Cavern Back": LLRegion(False, "Swamp Gas Cavern"), "A Tiny Cabin": LLRegion(True), "A Cabin Seer": LLRegion(True), "Benny's Cocktails": LLRegion(True), "Dusty Crypt": LLRegion(True), - "Dusty Crypt Entrance": LLRegion(False), + "Dusty Crypt Entrance": LLRegion(False, "Dusty Crypt"), "Musty Crypt": LLRegion(True), - "Musty Crypt Entrance": LLRegion(False), + "Musty Crypt Entrance": LLRegion(False, "Musty Crypt"), "Rusty Crypt": LLRegion(True), - "Rusty Crypt Entrance": LLRegion(False), + "Rusty Crypt Entrance": LLRegion(False, "Rusty Crypt"), "A Messy Cabin": LLRegion(True), "Under The Lake": LLRegion(True), - "Under The Lake Entrance": LLRegion(False), - "Under The Lake Exit": LLRegion(False), + "Under The Lake Entrance": LLRegion(False, "Under The Lake"), + "Under The Lake Exit": LLRegion(False, "Under The Lake"), "Deeper Under The Lake": LLRegion(True), "Frankenjulie's Laboratory": LLRegion(True), "Haunted Tower": LLRegion(True), - "Haunted Tower, Floor 2": LLRegion(True), - "Haunted Tower, Floor 3": LLRegion(True), + "Haunted Tower Floor 2": LLRegion(True), + "Haunted Tower Floor 3": LLRegion(True), "Haunted Tower Roof": LLRegion(True), "Haunted Basement": LLRegion(True), - "Haunted Basement Entrance": LLRegion(False), + "Haunted Basement Entrance": LLRegion(False, "Haunted Basement"), "Abandoned Mines": LLRegion(True), - "Abandoned Mines Entrance": LLRegion(False), + "Abandoned Mines Entrance": LLRegion(False, "Abandoned Mines"), "The Shrine Of Bombulus": LLRegion(True), "A Gloomy Cavern": LLRegion(True), - "A Gloomy Cavern Entrance": LLRegion(False), + "A Gloomy Cavern Entrance": LLRegion(False, "A Gloomy Cavern"), "Happy Stick Woods": LLRegion(True), "The Wolf Den": LLRegion(True), - "The Wolf Den Entrance": LLRegion(False), - "The Wolf Den Exit": LLRegion(False), + "The Wolf Den Entrance": LLRegion(False, "The Wolf Den"), + "The Wolf Den Exit": LLRegion(False, "The Wolf Den"), "A Cabin Larry": LLRegion(True), "Upper Creepy Caverns": LLRegion(True), - "Upper Creepy Caverns Left Warp": LLRegion(False), - "Upper Creepy Caverns Middle Warp": LLRegion(False), - "Upper Creepy Caverns Right Warp": LLRegion(False), + "Upper Creepy Caverns Left Warp": LLRegion(False, "Upper Creepy Caverns"), + "Upper Creepy Caverns Middle Warp": LLRegion(False, "Upper Creepy Caverns"), + "Upper Creepy Caverns Right Warp": LLRegion(False, "Upper Creepy Caverns"), "Under The Ravine": LLRegion(True), "Creepy Caverns Left": LLRegion(False, "Creepy Caverns"), "Creepy Caverns Left Bottom Warp": LLRegion(False, "Creepy Caverns"), @@ -67,6 +70,7 @@ "Creepy Caverns Right Bottom Warp": LLRegion(False, "Creepy Caverns"), "Castle Vampy": LLRegion(True), "Castle Vampy Skull Jail": LLRegion(False, "Castle Vampy"), + "Castle Vampy II": LLRegion(True), "Castle Vampy II Main": LLRegion(False, "Castle Vampy II"), "Castle Vampy II NW": LLRegion(False, "Castle Vampy II"), "Castle Vampy II NE": LLRegion(False, "Castle Vampy II"), @@ -74,12 +78,14 @@ "Castle Vampy II SE": LLRegion(False, "Castle Vampy II"), "Castle Vampy II Bat Jail": LLRegion(False, "Castle Vampy II"), "Cabin In The Woods": LLRegion(True), + "Castle Vampy III": LLRegion(True), "Castle Vampy III Main": LLRegion(False, "Castle Vampy III"), "Castle Vampy III NW": LLRegion(False, "Castle Vampy III"), "Castle Vampy III NE": LLRegion(False, "Castle Vampy III"), "Castle Vampy III SW": LLRegion(False, "Castle Vampy III"), "Castle Vampy III SE": LLRegion(False, "Castle Vampy III"), "Castle Vampy III Pumpkin Jail": LLRegion(False, "Castle Vampy III"), + "Castle Vampy IV": LLRegion(True), "Castle Vampy IV Main": LLRegion(False, "Castle Vampy IV"), "Castle Vampy IV NW": LLRegion(False, "Castle Vampy IV"), "Castle Vampy IV NE": LLRegion(False, "Castle Vampy IV"), diff --git a/worlds/loonyland/Data/rules_data.py b/worlds/loonyland/Data/rules_data.py index c299e4e01eea..f01f6d02ba78 100644 --- a/worlds/loonyland/Data/rules_data.py +++ b/worlds/loonyland/Data/rules_data.py @@ -37,6 +37,7 @@ def set_rules(multiworld, world, player): "Q: Mushroom Hunt": lambda state: state.has("Mushroom", player, 10), "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), + "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, player) and state.has("Silver", player), "Q: Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Boots", player), "Q: Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), "Q: The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and can_enter_vampy(state, player), From adbcbb8dfbcc1cd2bc18a66a9722464a994f3d81 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Thu, 19 Dec 2024 17:24:10 -0500 Subject: [PATCH 31/58] Send deathlink info --- worlds/loonyland/Options.py | 3 ++- worlds/loonyland/__init__.py | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/worlds/loonyland/Options.py b/worlds/loonyland/Options.py index e6123ef29d3e..e375d23e8066 100644 --- a/worlds/loonyland/Options.py +++ b/worlds/loonyland/Options.py @@ -1,6 +1,6 @@ from dataclasses import dataclass -from Options import Choice, PerGameCommonOptions +from Options import Choice, PerGameCommonOptions, DeathLink class WinCondition(Choice): @@ -30,4 +30,5 @@ class Difficulty(Choice): class LoonylandOptions(PerGameCommonOptions): win_condition: WinCondition difficulty: Difficulty + death_link: DeathLink diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index e509dd8d6625..339dbca64bde 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -102,8 +102,7 @@ def set_rules(self): set_rules(self.multiworld, self, self.player) - def fill_slot_data(self) -> Dict[str, Any]: + def fill_slot_data(self): return { - - "sampledata": "plerp" - } + "DeathLink": self.options.death_link.value + } \ No newline at end of file From 39d265e703d9d95c0aaf307acd39d9e1a134623f Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Thu, 19 Dec 2024 23:09:25 -0500 Subject: [PATCH 32/58] Simplify entrance data --- worlds/loonyland/Data/entrance_data.py | 248 ++++++++++++------------- worlds/loonyland/Data/rules_data.py | 2 +- worlds/loonyland/Entrances.py | 2 +- 3 files changed, 126 insertions(+), 126 deletions(-) diff --git a/worlds/loonyland/Data/entrance_data.py b/worlds/loonyland/Data/entrance_data.py index b8d66b87ede7..b4222734656d 100644 --- a/worlds/loonyland/Data/entrance_data.py +++ b/worlds/loonyland/Data/entrance_data.py @@ -3,180 +3,180 @@ from worlds.loonyland.Rules import have_light_source def set_entrances(multiworld, world, player): loonyland_entrance_table: List[LL_Entrance] = [ - LL_Entrance("Menu", "Halloween Hill", False, lambda state: True), - LL_Entrance("Menu", "Bowling", False, lambda state: True), - LL_Entrance("Menu", "Survival", False, lambda state: True), - LL_Entrance("Menu", "Boss Bash", False, lambda state: True), - LL_Entrance("Menu", "Loony Ball", False, lambda state: True), - LL_Entrance("Menu", "Remix", False, lambda state: True), - LL_Entrance("Halloween Hill", "A Cabin Trees", True, lambda state: True), - LL_Entrance("Halloween Hill", "The Witch's Cabin Front", True, lambda state: True), - LL_Entrance("Halloween Hill", "Bonita's Cabin", True, lambda state: True), - LL_Entrance("Halloween Hill", "Underground Tunnel Top", True, lambda state: True), - LL_Entrance("Halloween Hill", "The Bog Pit", True, lambda state: True), - LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False, lambda state: True), - LL_Entrance("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern Front", True, lambda state: True), - LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False, lambda state: True), - LL_Entrance("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True, lambda state: True), + LL_Entrance("Menu", "Halloween Hill", False), + LL_Entrance("Menu", "Bowling", False), + LL_Entrance("Menu", "Survival", False), + LL_Entrance("Menu", "Boss Bash", False), + LL_Entrance("Menu", "Loony Ball", False), + LL_Entrance("Menu", "Remix", False), + LL_Entrance("Halloween Hill", "A Cabin Trees", True), + LL_Entrance("Halloween Hill", "The Witch's Cabin Front", True), + LL_Entrance("Halloween Hill", "Bonita's Cabin", True), + LL_Entrance("Halloween Hill", "Underground Tunnel Top", True), + LL_Entrance("Halloween Hill", "The Bog Pit", True), + LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False), + LL_Entrance("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern Front", True), + LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False), + LL_Entrance("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True), LL_Entrance("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), - LL_Entrance("Halloween Hill", "The Witch's Cabin Back", True, lambda state: True), - LL_Entrance("Zombiton", "A Cabin Seer", True, lambda state: True), - LL_Entrance("Zombiton", "Benny's Cocktails", True, lambda state: True), - LL_Entrance("Halloween Hill", "Dusty Crypt Entrance", True, lambda state: True), - LL_Entrance("Zombiton", "Musty Crypt Entrance", True, lambda state: True), - LL_Entrance("Zombiton", "A Messy Cabin", True, lambda state: True), - LL_Entrance("Halloween Hill", "Rusty Crypt Entrance", True, lambda state: True), + LL_Entrance("Halloween Hill", "The Witch's Cabin Back", True), + LL_Entrance("Zombiton", "A Cabin Seer", True), + LL_Entrance("Zombiton", "Benny's Cocktails", True), + LL_Entrance("Halloween Hill", "Dusty Crypt Entrance", True), + LL_Entrance("Zombiton", "Musty Crypt Entrance", True), + LL_Entrance("Zombiton", "A Messy Cabin", True), + LL_Entrance("Halloween Hill", "Rusty Crypt Entrance", True), LL_Entrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), LL_Entrance("Halloween Hill", "Haunted Tower", True, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Rocky Cliffs", "Abandoned Mines Entrance", True, lambda state: True), - LL_Entrance("Rocky Cliffs", "The Shrine Of Bombulus", True, lambda state: True), + LL_Entrance("Rocky Cliffs", "Abandoned Mines Entrance", True), + LL_Entrance("Rocky Cliffs", "The Shrine Of Bombulus", True), LL_Entrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, player)), LL_Entrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", player)), - LL_Entrance("Zombiton", "A Cabin Larry", True, lambda state: True), - LL_Entrance("Halloween Hill", "The Wolf Den Entrance", True, lambda state: True), + LL_Entrance("Zombiton", "A Cabin Larry", True), + LL_Entrance("Halloween Hill", "The Wolf Den Entrance", True), LL_Entrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", player)), LL_Entrance("Rocky Cliffs", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), - LL_Entrance("Vampy Land", "Castle Vampy", True, lambda state: True), - LL_Entrance("Halloween Hill", "Cabin In The Woods", True, lambda state: True), - LL_Entrance("Halloween Hill", "A Cabin Collector", True, lambda state: True), - LL_Entrance("Halloween Hill", "A Hidey-Hole", True, lambda state: True), + LL_Entrance("Vampy Land", "Castle Vampy", True), + LL_Entrance("Halloween Hill", "Cabin In The Woods", True), + LL_Entrance("Halloween Hill", "A Cabin Collector", True), + LL_Entrance("Halloween Hill", "A Hidey-Hole", True), LL_Entrance("Vampy Land", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), - LL_Entrance("Halloween Hill", "Swampdog Lair", True, lambda state: True), - LL_Entrance("A Cabin Trees", "Halloween Hill", True, lambda state: True), - LL_Entrance("The Witch's Cabin Front", "Halloween Hill", True, lambda state: True), - LL_Entrance("The Witch's Cabin Back", "Halloween Hill", True, lambda state: True), - LL_Entrance("Bonita's Cabin", "Halloween Hill", True, lambda state: True), - LL_Entrance("The Bog Pit", "Halloween Hill", True, lambda state: have_light_source(state, player)), - LL_Entrance("Underground Tunnel Top", "Halloween Hill", True, lambda state: True), - LL_Entrance("Underground Tunnel Zombie", "Benny's Cocktails", True, lambda state: True), - LL_Entrance("Swamp Gas Cavern Front", "Slurpy Swamp Mud North Warp", True, lambda state: True), - LL_Entrance("Swamp Gas Cavern Back", "Slurpy Swamp Mud East Warp", True, lambda state: True), - LL_Entrance("A Tiny Cabin", "Halloween Hill", True, lambda state: True), - LL_Entrance("A Cabin Seer", "Zombiton", True, lambda state: True), - LL_Entrance("Benny's Cocktails", "Zombiton", True, lambda state: True), - LL_Entrance("Benny's Cocktails", "Underground Tunnel Zombie", True, lambda state: True), + LL_Entrance("Halloween Hill", "Swampdog Lair", True), + LL_Entrance("A Cabin Trees", "Halloween Hill", True), + LL_Entrance("The Witch's Cabin Front", "Halloween Hill", True), + LL_Entrance("The Witch's Cabin Back", "Halloween Hill", True), + LL_Entrance("Bonita's Cabin", "Halloween Hill", True), + LL_Entrance("The Bog Pit", "Halloween Hill", True), + LL_Entrance("Underground Tunnel Top", "Halloween Hill", True), + LL_Entrance("Underground Tunnel Zombie", "Benny's Cocktails", True), + LL_Entrance("Swamp Gas Cavern Front", "Slurpy Swamp Mud North Warp", True), + LL_Entrance("Swamp Gas Cavern Back", "Slurpy Swamp Mud East Warp", True), + LL_Entrance("A Tiny Cabin", "Halloween Hill", True), + LL_Entrance("A Cabin Seer", "Zombiton", True), + LL_Entrance("Benny's Cocktails", "Zombiton", True), + LL_Entrance("Benny's Cocktails", "Underground Tunnel Zombie", True), LL_Entrance("Dusty Crypt Entrance", "Dusty Crypt", True, lambda state: have_light_source(state, player)), - LL_Entrance("Dusty Crypt Entrance", "Halloween Hill", True, lambda state: True), - LL_Entrance("Dusty Crypt", "Dusty Crypt Entrance", True, lambda state: True), + LL_Entrance("Dusty Crypt Entrance", "Halloween Hill", True), + LL_Entrance("Dusty Crypt", "Dusty Crypt Entrance", True), LL_Entrance("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, player)), - LL_Entrance("Musty Crypt Entrance", "Zombiton", True, lambda state: True), - LL_Entrance("Musty Crypt", "Musty Crypt Entrance", True, lambda state: True), + LL_Entrance("Musty Crypt Entrance", "Zombiton", True), + LL_Entrance("Musty Crypt", "Musty Crypt Entrance", True), LL_Entrance("Rusty Crypt Entrance", "Rusty Crypt", True, lambda state: have_light_source(state, player)), - LL_Entrance("Rusty Crypt Entrance", "Halloween Hill", True, lambda state: True), - LL_Entrance("Rusty Crypt", "Rusty Crypt Entrance", True, lambda state: True), - LL_Entrance("A Messy Cabin", "Zombiton", True, lambda state: True), + LL_Entrance("Rusty Crypt Entrance", "Halloween Hill", True), + LL_Entrance("Rusty Crypt", "Rusty Crypt Entrance", True), + LL_Entrance("A Messy Cabin", "Zombiton", True), LL_Entrance("Under The Lake Entrance", "Under The Lake", True, lambda state: have_light_source(state, player)), - LL_Entrance("Under The Lake Entrance", "Halloween Hill", True, lambda state: True), - LL_Entrance("Under The Lake", "Under The Lake Entrance", True, lambda state: True), - LL_Entrance("Under The Lake", "Under The Lake Exit", True, lambda state: True), - LL_Entrance("Under The Lake Exit", "Deeper Under The Lake", True, lambda state: True), - LL_Entrance("Under The Lake Exit", "Under The Lake", True, lambda state: True), - LL_Entrance("Deeper Under The Lake", "Under The Lake Exit", True, lambda state: True), - LL_Entrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True, lambda state: True), - LL_Entrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True, lambda state: True), - LL_Entrance("Frankenjulie's Laboratory", "Halloween Hill", True, lambda state: True), + LL_Entrance("Under The Lake Entrance", "Halloween Hill", True), + LL_Entrance("Under The Lake", "Under The Lake Entrance", True), + LL_Entrance("Under The Lake", "Under The Lake Exit", True), + LL_Entrance("Under The Lake Exit", "Deeper Under The Lake", True), + LL_Entrance("Under The Lake Exit", "Under The Lake", True), + LL_Entrance("Deeper Under The Lake", "Under The Lake Exit", True), + LL_Entrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True), + LL_Entrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True), + LL_Entrance("Frankenjulie's Laboratory", "Halloween Hill", True), LL_Entrance("Haunted Basement", "Haunted Basement", True, lambda state: have_light_source(state, player)), LL_Entrance("Haunted Tower", "Haunted Tower Floor 2", True, lambda state: state.has("Ghost Potion", player)), LL_Entrance("Haunted Tower", "Haunted Basement Entrance", True, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), - LL_Entrance("Haunted Tower Floor 2", "Haunted Tower", True, lambda state: True), + LL_Entrance("Haunted Tower Floor 2", "Haunted Tower", True), LL_Entrance("Haunted Tower Floor 2", "Haunted Tower Floor 3", True, lambda state: state.has("Ghost Potion", player)), LL_Entrance("Haunted Tower Floor 3", "Haunted Tower Floor 2", True, lambda state: state.has("Ghost Potion", player)), LL_Entrance("Haunted Tower Floor 3", "Haunted Tower Roof", True, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower Roof", "Halloween Hill", True, lambda state: True), - LL_Entrance("Haunted Tower Roof", "Haunted Tower Floor 3", True, lambda state: True), + LL_Entrance("Haunted Tower Roof", "Halloween Hill", True), + LL_Entrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), LL_Entrance("Haunted Basement Entrance", "Haunted Tower", True, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), - LL_Entrance("Haunted Basement Entrance", "Haunted Basement", True, lambda state: True), - LL_Entrance("Haunted Basement", "Haunted Basement Entrance", True, lambda state: True), + LL_Entrance("Haunted Basement Entrance", "Haunted Basement", True), + LL_Entrance("Haunted Basement", "Haunted Basement Entrance", True), LL_Entrance("Abandoned Mines Entrance", "Abandoned Mines", True, lambda state: have_light_source(state, player)), - LL_Entrance("Abandoned Mines Entrance", "Rocky Cliffs", True, lambda state: True), - LL_Entrance("Abandoned Mines", "Abandoned Mines Entrance", True, lambda state: True), - LL_Entrance("The Shrine Of Bombulus", "Rocky Cliffs", True, lambda state: True), + LL_Entrance("Abandoned Mines Entrance", "Rocky Cliffs", True), + LL_Entrance("Abandoned Mines", "Abandoned Mines Entrance", True), + LL_Entrance("The Shrine Of Bombulus", "Rocky Cliffs", True), LL_Entrance("A Gloomy Cavern Entrance", "A Gloomy Cavern", True, lambda state: have_light_source(state, player)), - LL_Entrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True, lambda state: True), - LL_Entrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", True, lambda state: True), - LL_Entrance("Happy Stick Woods", "Halloween Hill", True, lambda state: True), + LL_Entrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), + LL_Entrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", True), + LL_Entrance("Happy Stick Woods", "Halloween Hill", True), LL_Entrance("The Wolf Den Entrance", "The Wolf Den", True, lambda state: state.has("Silver Sling", player) and have_light_source(state, player)), - LL_Entrance("The Wolf Den Entrance", "Halloween Hill", True, lambda state: True), - LL_Entrance("The Wolf Den", "The Wolf Den Entrance", True, lambda state: True), + LL_Entrance("The Wolf Den Entrance", "Halloween Hill", True), + LL_Entrance("The Wolf Den", "The Wolf Den Entrance", True), LL_Entrance("The Wolf Den", "Larry's Lair", True, lambda state: state.has("Silver Sling", player)), - LL_Entrance("A Cabin Larry", "Zombiton", True, lambda state: True), + LL_Entrance("A Cabin Larry", "Zombiton", True), LL_Entrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), LL_Entrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", True, lambda state: True), + LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", True), LL_Entrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), LL_Entrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", True, lambda state: True), + LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", True), LL_Entrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), LL_Entrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", True, lambda state: True), + LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", True), LL_Entrance("Under The Ravine", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), LL_Entrance("Under The Ravine", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Left", "Rocky Cliffs", True, lambda state: True), + LL_Entrance("Creepy Caverns Left", "Rocky Cliffs", True), LL_Entrance("Creepy Caverns Left", "Upper Creepy Caverns Middle Warp", True, lambda state: have_light_source(state, player)), LL_Entrance("Creepy Caverns Middle", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Middle", "Under The Ravine", True, lambda state: True), - LL_Entrance("Creepy Caverns Right", "Under The Ravine", True, lambda state: True), - LL_Entrance("Creepy Caverns Right", "Vampy Land", True, lambda state: True), - LL_Entrance("Castle Vampy", "Halloween Hill", True, lambda state: True), + LL_Entrance("Creepy Caverns Middle", "Under The Ravine", True), + LL_Entrance("Creepy Caverns Right", "Under The Ravine", True), + LL_Entrance("Creepy Caverns Right", "Vampy Land", True), + LL_Entrance("Castle Vampy", "Halloween Hill", True), LL_Entrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), LL_Entrance("Castle Vampy Skull Jail", "Castle Vampy II Main", True, lambda state: state.has("Skull Key", player)), LL_Entrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", player, 4)), LL_Entrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", player, 4)), LL_Entrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", player, 4)), LL_Entrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", player, 4)), - LL_Entrance("Castle Vampy II Main", "Castle Vampy Skull Jail", True, lambda state: True), + LL_Entrance("Castle Vampy II Main", "Castle Vampy Skull Jail", True), LL_Entrance("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, lambda state: state.has("Bat Key", player)), LL_Entrance("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, lambda state: state.has("Bat Key", player)), - LL_Entrance("Castle Vampy II NE", "Castle Vampy", True, lambda state: True), - LL_Entrance("Castle Vampy II NE", "Castle Vampy III NE", True, lambda state: True), - LL_Entrance("Castle Vampy II SE", "Castle Vampy", True, lambda state: True), - LL_Entrance("Castle Vampy II SE", "Castle Vampy III SE", True, lambda state: True), - LL_Entrance("Castle Vampy II SW", "Castle Vampy", True, lambda state: True), - LL_Entrance("Castle Vampy II SW", "Castle Vampy III SW", True, lambda state: True), - LL_Entrance("Castle Vampy II NW", "Castle Vampy", True, lambda state: True), - LL_Entrance("Castle Vampy II NW", "Castle Vampy III NW", True, lambda state: True), - LL_Entrance("Cabin In The Woods", "Halloween Hill", True, lambda state: True), - LL_Entrance("Castle Vampy III Main", "Castle Vampy II Bat Jail", True, lambda state: True), + LL_Entrance("Castle Vampy II NE", "Castle Vampy", True), + LL_Entrance("Castle Vampy II NE", "Castle Vampy III NE", True), + LL_Entrance("Castle Vampy II SE", "Castle Vampy", True), + LL_Entrance("Castle Vampy II SE", "Castle Vampy III SE", True), + LL_Entrance("Castle Vampy II SW", "Castle Vampy", True), + LL_Entrance("Castle Vampy II SW", "Castle Vampy III SW", True), + LL_Entrance("Castle Vampy II NW", "Castle Vampy", True), + LL_Entrance("Castle Vampy II NW", "Castle Vampy III NW", True), + LL_Entrance("Cabin In The Woods", "Halloween Hill", True), + LL_Entrance("Castle Vampy III Main", "Castle Vampy II Bat Jail", True), LL_Entrance("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", True, lambda state: state.has("Pumpkin Key", player)), LL_Entrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV Main", True, lambda state: state.has("Pumpkin Key", player)), - LL_Entrance("Castle Vampy III NE", "Castle Vampy II NE", True, lambda state: True), - LL_Entrance("Castle Vampy III NE", "Castle Vampy IV NE", True, lambda state: True), - LL_Entrance("Castle Vampy III SE", "Castle Vampy II SE", True, lambda state: True), - LL_Entrance("Castle Vampy III SE", "Castle Vampy IV SE", True, lambda state: True), - LL_Entrance("Castle Vampy III SW", "Castle Vampy II SW", True, lambda state: True), - LL_Entrance("Castle Vampy III SW", "Castle Vampy IV SW", True, lambda state: True), - LL_Entrance("Castle Vampy III NW", "Castle Vampy II NW", True, lambda state: True), - LL_Entrance("Castle Vampy III NW", "Castle Vampy IV NW", True, lambda state: True), - LL_Entrance("Castle Vampy IV Main", "Castle Vampy III Pumpkin Jail", True, lambda state: True), + LL_Entrance("Castle Vampy III NE", "Castle Vampy II NE", True), + LL_Entrance("Castle Vampy III NE", "Castle Vampy IV NE", True), + LL_Entrance("Castle Vampy III SE", "Castle Vampy II SE", True), + LL_Entrance("Castle Vampy III SE", "Castle Vampy IV SE", True), + LL_Entrance("Castle Vampy III SW", "Castle Vampy II SW", True), + LL_Entrance("Castle Vampy III SW", "Castle Vampy IV SW", True), + LL_Entrance("Castle Vampy III NW", "Castle Vampy II NW", True), + LL_Entrance("Castle Vampy III NW", "Castle Vampy IV NW", True), + LL_Entrance("Castle Vampy IV Main", "Castle Vampy III Pumpkin Jail", True), LL_Entrance("Castle Vampy IV Main", "The Heart Of Terror", True, lambda state: state.has("Vampire Bust", player, 8)), - LL_Entrance("Castle Vampy IV NE", "Castle Vampy III NE", True, lambda state: True), - LL_Entrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True, lambda state: True), - LL_Entrance("Castle Vampy IV SE", "Castle Vampy III SE", True, lambda state: True), - LL_Entrance("Castle Vampy IV SE", "Castle Vampy Roof SE", True, lambda state: True), - LL_Entrance("Castle Vampy IV SW", "Castle Vampy III SW", True, lambda state: True), - LL_Entrance("Castle Vampy IV SW", "Castle Vampy Roof SW", True, lambda state: True), - LL_Entrance("Castle Vampy IV NW", "Castle Vampy III NW", True, lambda state: True), - LL_Entrance("Castle Vampy IV NW", "Castle Vampy Roof NW", True, lambda state: True), - LL_Entrance("A Cabin Collector", "Halloween Hill", True, lambda state: True), - LL_Entrance("Castle Vampy Roof NE", "Castle Vampy IV NE", True, lambda state: True), - LL_Entrance("Castle Vampy Roof SE", "Castle Vampy IV SE", True, lambda state: True), - LL_Entrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True, lambda state: True), - LL_Entrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True, lambda state: True), - LL_Entrance("The Evilizer", "Halloween Hill", True, lambda state: True), - LL_Entrance("The Heart Of Terror", "The Evilizer", True, lambda state: True), - LL_Entrance("The Heart Of Terror", "Empty Rooftop", True, lambda state: True), - LL_Entrance("A Hidey-Hole", "Halloween Hill", True, lambda state: True), - LL_Entrance("Empty Rooftop", "Halloween Hill", True, lambda state: True), - LL_Entrance("Swampdog Lair", "Halloween Hill", True, lambda state: True), - LL_Entrance("Larry's Lair", "Halloween Hill", True, lambda state: True), + LL_Entrance("Castle Vampy IV NE", "Castle Vampy III NE", True), + LL_Entrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), + LL_Entrance("Castle Vampy IV SE", "Castle Vampy III SE", True), + LL_Entrance("Castle Vampy IV SE", "Castle Vampy Roof SE", True), + LL_Entrance("Castle Vampy IV SW", "Castle Vampy III SW", True), + LL_Entrance("Castle Vampy IV SW", "Castle Vampy Roof SW", True), + LL_Entrance("Castle Vampy IV NW", "Castle Vampy III NW", True), + LL_Entrance("Castle Vampy IV NW", "Castle Vampy Roof NW", True), + LL_Entrance("A Cabin Collector", "Halloween Hill", True), + LL_Entrance("Castle Vampy Roof NE", "Castle Vampy IV NE", True), + LL_Entrance("Castle Vampy Roof SE", "Castle Vampy IV SE", True), + LL_Entrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), + LL_Entrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), + LL_Entrance("The Evilizer", "Halloween Hill", True), + LL_Entrance("The Heart Of Terror", "The Evilizer", True), + LL_Entrance("The Heart Of Terror", "Empty Rooftop", True), + LL_Entrance("A Hidey-Hole", "Halloween Hill", True), + LL_Entrance("Empty Rooftop", "Halloween Hill", True), + LL_Entrance("Swampdog Lair", "Halloween Hill", True), + LL_Entrance("Larry's Lair", "Halloween Hill", True), LL_Entrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), LL_Entrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", player)), LL_Entrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), LL_Entrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), - LL_Entrance("Zombiton", "Halloween Hill", False, lambda state: True), + LL_Entrance("Zombiton", "Halloween Hill", False), LL_Entrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player)), LL_Entrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player)), - LL_Entrance("Vampy Land", "Halloween Hill", False, lambda state: True), + LL_Entrance("Vampy Land", "Halloween Hill", False), LL_Entrance("Underground Tunnel Top", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), LL_Entrance("Underground Tunnel Mud", "Underground Tunnel Top", False, lambda state: state.has("Boots", player)), LL_Entrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player)), diff --git a/worlds/loonyland/Data/rules_data.py b/worlds/loonyland/Data/rules_data.py index f01f6d02ba78..862c7fcd630a 100644 --- a/worlds/loonyland/Data/rules_data.py +++ b/worlds/loonyland/Data/rules_data.py @@ -39,7 +39,7 @@ def set_rules(multiworld, world, player): "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, player) and state.has("Silver", player), "Q: Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Boots", player), - "Q: Ghostbusting": lambda state: state.has("Big Gem", player) and state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), + "Q: Ghostbusting": lambda state: state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), "Q: The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and can_enter_vampy(state, player), } for loc in multiworld.get_locations(player): diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index ed21098dd0b5..13e04ce98ad7 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -14,4 +14,4 @@ class LL_Entrance(NamedTuple): target_region: str is_real_loading_zone: bool # rule: typing.Callable[[player, state], bool] - rule: CollectionRule \ No newline at end of file + rule: CollectionRule = lambda state: True \ No newline at end of file From 615c4b4a82e2e87ff055b6a7cf54dfc6902be585 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 20 Dec 2024 15:28:07 -0500 Subject: [PATCH 33/58] Cleanup data in one .py update setup and main game docs set entrance rules in set_rules --- worlds/loonyland/Data/Defines.py | 207 ------- worlds/loonyland/Data/entrance_data.py | 188 ------- worlds/loonyland/Data/game_data.py | 724 +++++++++++++++++++++++++ worlds/loonyland/Data/item_data.py | 41 -- worlds/loonyland/Data/location_data.py | 111 ---- worlds/loonyland/Data/region_data.py | 113 ---- worlds/loonyland/Data/rules_data.py | 47 -- worlds/loonyland/Entrances.py | 4 +- worlds/loonyland/Items.py | 5 +- worlds/loonyland/Locations.py | 5 +- worlds/loonyland/Options.py | 4 +- worlds/loonyland/Regions.py | 2 +- worlds/loonyland/Rules.py | 75 +-- worlds/loonyland/__init__.py | 52 +- worlds/loonyland/docs/en_Loonyland.md | 22 +- worlds/loonyland/docs/setup_en.md | 21 +- 16 files changed, 802 insertions(+), 819 deletions(-) delete mode 100644 worlds/loonyland/Data/Defines.py delete mode 100644 worlds/loonyland/Data/entrance_data.py create mode 100644 worlds/loonyland/Data/game_data.py delete mode 100644 worlds/loonyland/Data/item_data.py delete mode 100644 worlds/loonyland/Data/location_data.py delete mode 100644 worlds/loonyland/Data/region_data.py delete mode 100644 worlds/loonyland/Data/rules_data.py diff --git a/worlds/loonyland/Data/Defines.py b/worlds/loonyland/Data/Defines.py deleted file mode 100644 index 4de22044f367..000000000000 --- a/worlds/loonyland/Data/Defines.py +++ /dev/null @@ -1,207 +0,0 @@ -VAR_HEART = 0 -VAR_LIGHTNING = 20 -VAR_ARROW = 30 -VAR_PANTS = 40 -VAR_QUESTASSIGN = 50 -VAR_QUESTDONE = 70 -VAR_MUSHROOM = 90 -VAR_MYSORB = 100 -VAR_WEAPON = 104 -VAR_WBOMBS = 104 -VAR_WLIGHTNING = 105 -VAR_WICE = 106 -VAR_WCACTUS = 107 -VAR_WBOOMERANG = 108 -VAR_WWHOOPEE = 109 -VAR_WHOTPANTS = 110 -VAR_KEY = 111 -VAR_SKULLKEY = 111 -VAR_BATKEY = 112 -VAR_PUMPKINKEY = 113 -VAR_BOOTS = 114 -VAR_STICK = 115 -VAR_TORCH = 116 -VAR_FERTILIZER = 117 -VAR_SILVER = 118 -VAR_DAISY = 119 -VAR_POTION = 120 -VAR_VAMPBUST = 121 -VAR_CAT = 129 -VAR_GEM = 130 -VAR_ORBSTAND = 150 -VAR_BOOTSALES = 154 -VAR_WITCHTALK = 155 -VAR_BRIDGEOPEN = 156 -VAR_ZOMBIE = 157 -VAR_ZOMBIEREWARD = 160 -VAR_TRIPLEFIRE = 161 -VAR_TALISMAN = 162 -VAR_VAMPYWALL = 163 -VAR_BATSTATUE = 164 -VAR_BATSTAND = 168 -VAR_VAMPSTAND = 172 -VAR_KNOWWOLVES = 180 -VAR_DOLL = 181 -VAR_REFLECT = 189 -VAR_DOLLGIVEN = 190 -VAR_TOWNOPEN = 198 -VAR_LEFTBOMB = 199 -VAR_HELPERBAT = 200 -VAR_TALKBAT = 201 -VAR_TALKBRIDGE = 202 -VAR_PAIDBRIDGE = 203 -VAR_PORTALOPEN = 204 -VAR_GAVEDAISY = 205 -VAR_DEADELDER = 206 -VAR_GATEOUT = 210 -VAR_DEADBONK = 211 -VAR_SEERTALK = 212 -VAR_MINERTALK = 213 -VAR_HPSALES = 214 -VAR_DEALERTALK = 215 -VAR_HIPUZZLE = 216 -VAR_WITCHREWARD = 217 -VAR_LANTERN = 218 -VAR_TREEREWARD = 219 -VAR_SILVERSLING = 220 -VAR_LARRYREWARD = 221 -VAR_CROPSREWARD = 222 -VAR_ZOMBIEGEM = 223 -ITM_NONE = 0 -ITM_TINYHEART = 1 -ITM_BIGHEART = 2 -ITM_SUPERHEART = 3 -ITM_LITTLEGEM = 4 -ITM_BIGGEM = 5 -ITM_SUPERGEM = 6 -ITM_FIREPOWERUP = 7 -ITM_RANGEUP = 8 -ITM_FIRERATEUP = 9 -ITM_KEY = 10 -ITM_KEY2 = 11 -ITM_KEY3 = 12 -ITM_KEY4 = 13 -ITM_WBOMB = 14 -ITM_WLIGHTNING = 15 -ITM_WICE = 16 -ITM_WCACTUS = 17 -ITM_WBOOMERANG = 18 -ITM_WWHOOPEE = 19 -ITM_WHOTPANTS = 20 -ITM_POTION = 21 -ITM_DOOR = 22 -ITM_SKULLDOOR = 23 -ITM_BATDOOR = 24 -ITM_PUMPKINDOOR = 25 -ITM_DOOR2 = 26 -ITM_SKULLDOOR2 = 27 -ITM_BATDOOR2 = 28 -ITM_PUMPKINDOOR2 = 29 -ITM_TREE1 = 30 -ITM_TREE2 = 31 -ITM_LAKECAVE = 32 -ITM_TABLE = 33 -ITM_STOOL = 34 -ITM_CHAIR = 35 -ITM_CHAIR2 = 36 -ITM_CHAIR3 = 37 -ITM_CHAIR4 = 38 -ITM_CHAIR5 = 39 -ITM_BIGCHAIR = 40 -ITM_BIGCHAIR2 = 41 -ITM_BIGCHAIR3 = 42 -ITM_BIGCHAIR4 = 43 -ITM_MYSORB = 44 -ITM_ORBSTAND = 45 -ITM_ORBSTAND2 = 46 -ITM_SAVEGEM = 47 -ITM_BOTTLE = 48 -ITM_BOTTLE2 = 49 -ITM_BOTTLE3 = 50 -ITM_BOTTLE4 = 51 -ITM_BOTTLE5 = 52 -ITM_BOTTLE6 = 53 -ITM_BOTTLE7 = 54 -ITM_BOTTLE8 = 55 -ITM_BOTTLE9 = 56 -ITM_BOTTLE10 = 57 -ITM_BOTTLE11 = 58 -ITM_SIGN = 59 -ITM_SIGN2 = 60 -ITM_SIGN3 = 61 -ITM_KNIGHT = 62 -ITM_KNIGHT2 = 63 -ITM_CLOCK = 64 -ITM_CANDLE = 65 -ITM_BOOKCASE = 66 -ITM_BED = 67 -ITM_LOG = 68 -ITM_LOG2 = 69 -ITM_LOG3 = 70 -ITM_TWIG = 71 -ITM_ROCK = 72 -ITM_ROCKPILE = 73 -ITM_BARREL = 74 -ITM_BARREL2 = 75 -ITM_TREE3 = 76 -ITM_TREE4 = 77 -ITM_TREE5 = 78 -ITM_TREE6 = 79 -ITM_TREE7 = 80 -ITM_SHROOM = 81 -ITM_DAISY = 82 -ITM_SILVER = 83 -ITM_MAGICPLANT = 84 -ITM_WALKPLANT = 85 -ITM_SWITCH1ON = 86 -ITM_SWITCH1OFF = 87 -ITM_SWITCH2 = 88 -ITM_GRASS = 89 -ITM_GRASS2 = 90 -ITM_GRASS3 = 91 -ITM_CATTAIL = 92 -ITM_LILROCK = 93 -ITM_BIGROCK = 94 -ITM_BOOMROCK = 95 -ITM_TORCH = 96 -ITM_GASHOLE = 97 -ITM_GASPIPELR = 98 -ITM_GASPIPEUD = 99 -ITM_GASPIPEDR = 100 -ITM_GASPIPEDL = 101 -ITM_GASPIPEUR = 102 -ITM_GASPIPEUL = 103 -ITM_GASSPARK = 104 -ITM_GRAVE = 105 -ITM_GRAVE2 = 106 -ITM_TABLE2 = 107 -ITM_AUTODOOR = 108 -ITM_AUTODOOR2 = 109 -ITM_TALISMAN = 110 -ITM_TRIPLEFIRE = 111 -ITM_BUSTSTAND = 112 -ITM_BUST = 113 -ITM_BUSTONSTAND = 114 -ITM_BATSTAND = 115 -ITM_BAT = 116 -ITM_BATONSTAND = 117 -ITM_BATDOLL = 118 -ITM_SKELDOLL = 119 -ITM_FROGDOLL = 120 -ITM_GHOSTDOLL = 121 -ITM_MUMMYDOLL = 122 -ITM_SWAMPDOLL = 123 -ITM_VAMPDOLL = 124 -ITM_WOLFDOLL = 125 -ITM_PORTAL = 126 -ITM_BADGE = 127 -ITM_CAT = 128 -ITM_ZOMBGEM = 129 -ITM_BOOTS = 130 -ITM_FERTILIZER = 131 -ITM_GHOSTPOTION = 132 -ITM_LANTERN = 133 -ITM_REFLECTGEM = 134 -ITM_SILVERSLING = 135 -ITM_STICK = 136 -ITM_ARCHIPELAGO = 137 diff --git a/worlds/loonyland/Data/entrance_data.py b/worlds/loonyland/Data/entrance_data.py deleted file mode 100644 index b4222734656d..000000000000 --- a/worlds/loonyland/Data/entrance_data.py +++ /dev/null @@ -1,188 +0,0 @@ -from typing import List -from worlds.loonyland.Entrances import LL_Entrance -from worlds.loonyland.Rules import have_light_source -def set_entrances(multiworld, world, player): - loonyland_entrance_table: List[LL_Entrance] = [ - LL_Entrance("Menu", "Halloween Hill", False), - LL_Entrance("Menu", "Bowling", False), - LL_Entrance("Menu", "Survival", False), - LL_Entrance("Menu", "Boss Bash", False), - LL_Entrance("Menu", "Loony Ball", False), - LL_Entrance("Menu", "Remix", False), - LL_Entrance("Halloween Hill", "A Cabin Trees", True), - LL_Entrance("Halloween Hill", "The Witch's Cabin Front", True), - LL_Entrance("Halloween Hill", "Bonita's Cabin", True), - LL_Entrance("Halloween Hill", "Underground Tunnel Top", True), - LL_Entrance("Halloween Hill", "The Bog Pit", True), - LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False), - LL_Entrance("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern Front", True), - LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False), - LL_Entrance("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True), - LL_Entrance("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), - LL_Entrance("Halloween Hill", "The Witch's Cabin Back", True), - LL_Entrance("Zombiton", "A Cabin Seer", True), - LL_Entrance("Zombiton", "Benny's Cocktails", True), - LL_Entrance("Halloween Hill", "Dusty Crypt Entrance", True), - LL_Entrance("Zombiton", "Musty Crypt Entrance", True), - LL_Entrance("Zombiton", "A Messy Cabin", True), - LL_Entrance("Halloween Hill", "Rusty Crypt Entrance", True), - LL_Entrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), - LL_Entrance("Halloween Hill", "Haunted Tower", True, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Rocky Cliffs", "Abandoned Mines Entrance", True), - LL_Entrance("Rocky Cliffs", "The Shrine Of Bombulus", True), - LL_Entrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, player)), - LL_Entrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", player)), - LL_Entrance("Zombiton", "A Cabin Larry", True), - LL_Entrance("Halloween Hill", "The Wolf Den Entrance", True), - LL_Entrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", player)), - LL_Entrance("Rocky Cliffs", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), - LL_Entrance("Vampy Land", "Castle Vampy", True), - LL_Entrance("Halloween Hill", "Cabin In The Woods", True), - LL_Entrance("Halloween Hill", "A Cabin Collector", True), - LL_Entrance("Halloween Hill", "A Hidey-Hole", True), - LL_Entrance("Vampy Land", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), - LL_Entrance("Halloween Hill", "Swampdog Lair", True), - LL_Entrance("A Cabin Trees", "Halloween Hill", True), - LL_Entrance("The Witch's Cabin Front", "Halloween Hill", True), - LL_Entrance("The Witch's Cabin Back", "Halloween Hill", True), - LL_Entrance("Bonita's Cabin", "Halloween Hill", True), - LL_Entrance("The Bog Pit", "Halloween Hill", True), - LL_Entrance("Underground Tunnel Top", "Halloween Hill", True), - LL_Entrance("Underground Tunnel Zombie", "Benny's Cocktails", True), - LL_Entrance("Swamp Gas Cavern Front", "Slurpy Swamp Mud North Warp", True), - LL_Entrance("Swamp Gas Cavern Back", "Slurpy Swamp Mud East Warp", True), - LL_Entrance("A Tiny Cabin", "Halloween Hill", True), - LL_Entrance("A Cabin Seer", "Zombiton", True), - LL_Entrance("Benny's Cocktails", "Zombiton", True), - LL_Entrance("Benny's Cocktails", "Underground Tunnel Zombie", True), - LL_Entrance("Dusty Crypt Entrance", "Dusty Crypt", True, lambda state: have_light_source(state, player)), - LL_Entrance("Dusty Crypt Entrance", "Halloween Hill", True), - LL_Entrance("Dusty Crypt", "Dusty Crypt Entrance", True), - LL_Entrance("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, player)), - LL_Entrance("Musty Crypt Entrance", "Zombiton", True), - LL_Entrance("Musty Crypt", "Musty Crypt Entrance", True), - LL_Entrance("Rusty Crypt Entrance", "Rusty Crypt", True, lambda state: have_light_source(state, player)), - LL_Entrance("Rusty Crypt Entrance", "Halloween Hill", True), - LL_Entrance("Rusty Crypt", "Rusty Crypt Entrance", True), - LL_Entrance("A Messy Cabin", "Zombiton", True), - LL_Entrance("Under The Lake Entrance", "Under The Lake", True, lambda state: have_light_source(state, player)), - LL_Entrance("Under The Lake Entrance", "Halloween Hill", True), - LL_Entrance("Under The Lake", "Under The Lake Entrance", True), - LL_Entrance("Under The Lake", "Under The Lake Exit", True), - LL_Entrance("Under The Lake Exit", "Deeper Under The Lake", True), - LL_Entrance("Under The Lake Exit", "Under The Lake", True), - LL_Entrance("Deeper Under The Lake", "Under The Lake Exit", True), - LL_Entrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True), - LL_Entrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True), - LL_Entrance("Frankenjulie's Laboratory", "Halloween Hill", True), - LL_Entrance("Haunted Basement", "Haunted Basement", True, lambda state: have_light_source(state, player)), - LL_Entrance("Haunted Tower", "Haunted Tower Floor 2", True, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower", "Haunted Basement Entrance", True, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), - LL_Entrance("Haunted Tower Floor 2", "Haunted Tower", True), - LL_Entrance("Haunted Tower Floor 2", "Haunted Tower Floor 3", True, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower Floor 3", "Haunted Tower Floor 2", True, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower Floor 3", "Haunted Tower Roof", True, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower Roof", "Halloween Hill", True), - LL_Entrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), - LL_Entrance("Haunted Basement Entrance", "Haunted Tower", True, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), - LL_Entrance("Haunted Basement Entrance", "Haunted Basement", True), - LL_Entrance("Haunted Basement", "Haunted Basement Entrance", True), - LL_Entrance("Abandoned Mines Entrance", "Abandoned Mines", True, lambda state: have_light_source(state, player)), - LL_Entrance("Abandoned Mines Entrance", "Rocky Cliffs", True), - LL_Entrance("Abandoned Mines", "Abandoned Mines Entrance", True), - LL_Entrance("The Shrine Of Bombulus", "Rocky Cliffs", True), - LL_Entrance("A Gloomy Cavern Entrance", "A Gloomy Cavern", True, lambda state: have_light_source(state, player)), - LL_Entrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), - LL_Entrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", True), - LL_Entrance("Happy Stick Woods", "Halloween Hill", True), - LL_Entrance("The Wolf Den Entrance", "The Wolf Den", True, lambda state: state.has("Silver Sling", player) and have_light_source(state, player)), - LL_Entrance("The Wolf Den Entrance", "Halloween Hill", True), - LL_Entrance("The Wolf Den", "The Wolf Den Entrance", True), - LL_Entrance("The Wolf Den", "Larry's Lair", True, lambda state: state.has("Silver Sling", player)), - LL_Entrance("A Cabin Larry", "Zombiton", True), - LL_Entrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), - LL_Entrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", True), - LL_Entrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left", True, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", True), - LL_Entrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", True), - LL_Entrance("Under The Ravine", "Creepy Caverns Middle", True, lambda state: have_light_source(state, player)), - LL_Entrance("Under The Ravine", "Creepy Caverns Right", True, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Left", "Rocky Cliffs", True), - LL_Entrance("Creepy Caverns Left", "Upper Creepy Caverns Middle Warp", True, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Middle", "Upper Creepy Caverns", True, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Middle", "Under The Ravine", True), - LL_Entrance("Creepy Caverns Right", "Under The Ravine", True), - LL_Entrance("Creepy Caverns Right", "Vampy Land", True), - LL_Entrance("Castle Vampy", "Halloween Hill", True), - LL_Entrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), - LL_Entrance("Castle Vampy Skull Jail", "Castle Vampy II Main", True, lambda state: state.has("Skull Key", player)), - LL_Entrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", player, 4)), - LL_Entrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", player, 4)), - LL_Entrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", player, 4)), - LL_Entrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", player, 4)), - LL_Entrance("Castle Vampy II Main", "Castle Vampy Skull Jail", True), - LL_Entrance("Castle Vampy II Main", "Castle Vampy II Bat Jail", True, lambda state: state.has("Bat Key", player)), - LL_Entrance("Castle Vampy II Bat Jail", "Castle Vampy III Main", True, lambda state: state.has("Bat Key", player)), - LL_Entrance("Castle Vampy II NE", "Castle Vampy", True), - LL_Entrance("Castle Vampy II NE", "Castle Vampy III NE", True), - LL_Entrance("Castle Vampy II SE", "Castle Vampy", True), - LL_Entrance("Castle Vampy II SE", "Castle Vampy III SE", True), - LL_Entrance("Castle Vampy II SW", "Castle Vampy", True), - LL_Entrance("Castle Vampy II SW", "Castle Vampy III SW", True), - LL_Entrance("Castle Vampy II NW", "Castle Vampy", True), - LL_Entrance("Castle Vampy II NW", "Castle Vampy III NW", True), - LL_Entrance("Cabin In The Woods", "Halloween Hill", True), - LL_Entrance("Castle Vampy III Main", "Castle Vampy II Bat Jail", True), - LL_Entrance("Castle Vampy III Main", "Castle Vampy III Pumpkin Jail", True, lambda state: state.has("Pumpkin Key", player)), - LL_Entrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV Main", True, lambda state: state.has("Pumpkin Key", player)), - LL_Entrance("Castle Vampy III NE", "Castle Vampy II NE", True), - LL_Entrance("Castle Vampy III NE", "Castle Vampy IV NE", True), - LL_Entrance("Castle Vampy III SE", "Castle Vampy II SE", True), - LL_Entrance("Castle Vampy III SE", "Castle Vampy IV SE", True), - LL_Entrance("Castle Vampy III SW", "Castle Vampy II SW", True), - LL_Entrance("Castle Vampy III SW", "Castle Vampy IV SW", True), - LL_Entrance("Castle Vampy III NW", "Castle Vampy II NW", True), - LL_Entrance("Castle Vampy III NW", "Castle Vampy IV NW", True), - LL_Entrance("Castle Vampy IV Main", "Castle Vampy III Pumpkin Jail", True), - LL_Entrance("Castle Vampy IV Main", "The Heart Of Terror", True, lambda state: state.has("Vampire Bust", player, 8)), - LL_Entrance("Castle Vampy IV NE", "Castle Vampy III NE", True), - LL_Entrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), - LL_Entrance("Castle Vampy IV SE", "Castle Vampy III SE", True), - LL_Entrance("Castle Vampy IV SE", "Castle Vampy Roof SE", True), - LL_Entrance("Castle Vampy IV SW", "Castle Vampy III SW", True), - LL_Entrance("Castle Vampy IV SW", "Castle Vampy Roof SW", True), - LL_Entrance("Castle Vampy IV NW", "Castle Vampy III NW", True), - LL_Entrance("Castle Vampy IV NW", "Castle Vampy Roof NW", True), - LL_Entrance("A Cabin Collector", "Halloween Hill", True), - LL_Entrance("Castle Vampy Roof NE", "Castle Vampy IV NE", True), - LL_Entrance("Castle Vampy Roof SE", "Castle Vampy IV SE", True), - LL_Entrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), - LL_Entrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), - LL_Entrance("The Evilizer", "Halloween Hill", True), - LL_Entrance("The Heart Of Terror", "The Evilizer", True), - LL_Entrance("The Heart Of Terror", "Empty Rooftop", True), - LL_Entrance("A Hidey-Hole", "Halloween Hill", True), - LL_Entrance("Empty Rooftop", "Halloween Hill", True), - LL_Entrance("Swampdog Lair", "Halloween Hill", True), - LL_Entrance("Larry's Lair", "Halloween Hill", True), - LL_Entrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), - LL_Entrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", player)), - LL_Entrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), - LL_Entrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), - LL_Entrance("Zombiton", "Halloween Hill", False), - LL_Entrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player)), - LL_Entrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player)), - LL_Entrance("Vampy Land", "Halloween Hill", False), - LL_Entrance("Underground Tunnel Top", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), - LL_Entrance("Underground Tunnel Mud", "Underground Tunnel Top", False, lambda state: state.has("Boots", player)), - LL_Entrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player)), - LL_Entrance("Swamp Gas Cavern Front", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), -] - for region in multiworld.get_regions(player): - for entry in loonyland_entrance_table: - if entry.source_region == region.name: - region.connect(connecting_region=world.get_region(entry.target_region), rule=entry.rule) \ No newline at end of file diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py new file mode 100644 index 000000000000..8f1a8ed81c02 --- /dev/null +++ b/worlds/loonyland/Data/game_data.py @@ -0,0 +1,724 @@ +#autogenerated from Hamsandwich/tools/archipelago_data_scripts +from typing import Dict, List +from BaseClasses import ItemClassification as IC +from worlds.generic.Rules import CollectionRule, add_rule +from worlds.loonyland import loonyland_base_id as ll_base_id, LL_Location +from worlds.loonyland.Entrances import LL_Entrance +from worlds.loonyland.Items import LL_Item, LL_ItemCat +from worlds.loonyland.Locations import LL_LocCat +from worlds.loonyland.Regions import LLRegion +from worlds.loonyland.Rules import * + +VAR_HEART = 0 +VAR_LIGHTNING = 20 +VAR_ARROW = 30 +VAR_PANTS = 40 +VAR_QUESTASSIGN = 50 +VAR_QUESTDONE = 70 +VAR_MUSHROOM = 90 +VAR_MYSORB = 100 +VAR_WEAPON = 104 +VAR_WBOMBS = 104 +VAR_WLIGHTNING = 105 +VAR_WICE = 106 +VAR_WCACTUS = 107 +VAR_WBOOMERANG = 108 +VAR_WWHOOPEE = 109 +VAR_WHOTPANTS = 110 +VAR_KEY = 111 +VAR_SKULLKEY = 111 +VAR_BATKEY = 112 +VAR_PUMPKINKEY = 113 +VAR_BOOTS = 114 +VAR_STICK = 115 +VAR_TORCH = 116 +VAR_FERTILIZER = 117 +VAR_SILVER = 118 +VAR_DAISY = 119 +VAR_POTION = 120 +VAR_VAMPBUST = 121 +VAR_CAT = 129 +VAR_GEM = 130 +VAR_ORBSTAND = 150 +VAR_BOOTSALES = 154 +VAR_WITCHTALK = 155 +VAR_BRIDGEOPEN = 156 +VAR_ZOMBIE = 157 +VAR_ZOMBIEREWARD = 160 +VAR_TRIPLEFIRE = 161 +VAR_TALISMAN = 162 +VAR_VAMPYWALL = 163 +VAR_BATSTATUE = 164 +VAR_BATSTAND = 168 +VAR_VAMPSTAND = 172 +VAR_KNOWWOLVES = 180 +VAR_DOLL = 181 +VAR_REFLECT = 189 +VAR_DOLLGIVEN = 190 +VAR_TOWNOPEN = 198 +VAR_LEFTBOMB = 199 +VAR_HELPERBAT = 200 +VAR_TALKBAT = 201 +VAR_TALKBRIDGE = 202 +VAR_PAIDBRIDGE = 203 +VAR_PORTALOPEN = 204 +VAR_GAVEDAISY = 205 +VAR_DEADELDER = 206 +VAR_GATEOUT = 210 +VAR_DEADBONK = 211 +VAR_SEERTALK = 212 +VAR_MINERTALK = 213 +VAR_HPSALES = 214 +VAR_DEALERTALK = 215 +VAR_HIPUZZLE = 216 +VAR_WITCHREWARD = 217 +VAR_LANTERN = 218 +VAR_TREEREWARD = 219 +VAR_SILVERSLING = 220 +VAR_LARRYREWARD = 221 +VAR_CROPSREWARD = 222 +VAR_ZOMBIEGEM = 223 +ITM_NONE = 0 +ITM_TINYHEART = 1 +ITM_BIGHEART = 2 +ITM_SUPERHEART = 3 +ITM_LITTLEGEM = 4 +ITM_BIGGEM = 5 +ITM_SUPERGEM = 6 +ITM_FIREPOWERUP = 7 +ITM_RANGEUP = 8 +ITM_FIRERATEUP = 9 +ITM_KEY = 10 +ITM_KEY2 = 11 +ITM_KEY3 = 12 +ITM_KEY4 = 13 +ITM_WBOMB = 14 +ITM_WLIGHTNING = 15 +ITM_WICE = 16 +ITM_WCACTUS = 17 +ITM_WBOOMERANG = 18 +ITM_WWHOOPEE = 19 +ITM_WHOTPANTS = 20 +ITM_POTION = 21 +ITM_DOOR = 22 +ITM_SKULLDOOR = 23 +ITM_BATDOOR = 24 +ITM_PUMPKINDOOR = 25 +ITM_DOOR2 = 26 +ITM_SKULLDOOR2 = 27 +ITM_BATDOOR2 = 28 +ITM_PUMPKINDOOR2 = 29 +ITM_TREE1 = 30 +ITM_TREE2 = 31 +ITM_LAKECAVE = 32 +ITM_TABLE = 33 +ITM_STOOL = 34 +ITM_CHAIR = 35 +ITM_CHAIR2 = 36 +ITM_CHAIR3 = 37 +ITM_CHAIR4 = 38 +ITM_CHAIR5 = 39 +ITM_BIGCHAIR = 40 +ITM_BIGCHAIR2 = 41 +ITM_BIGCHAIR3 = 42 +ITM_BIGCHAIR4 = 43 +ITM_MYSORB = 44 +ITM_ORBSTAND = 45 +ITM_ORBSTAND2 = 46 +ITM_SAVEGEM = 47 +ITM_BOTTLE = 48 +ITM_BOTTLE2 = 49 +ITM_BOTTLE3 = 50 +ITM_BOTTLE4 = 51 +ITM_BOTTLE5 = 52 +ITM_BOTTLE6 = 53 +ITM_BOTTLE7 = 54 +ITM_BOTTLE8 = 55 +ITM_BOTTLE9 = 56 +ITM_BOTTLE10 = 57 +ITM_BOTTLE11 = 58 +ITM_SIGN = 59 +ITM_SIGN2 = 60 +ITM_SIGN3 = 61 +ITM_KNIGHT = 62 +ITM_KNIGHT2 = 63 +ITM_CLOCK = 64 +ITM_CANDLE = 65 +ITM_BOOKCASE = 66 +ITM_BED = 67 +ITM_LOG = 68 +ITM_LOG2 = 69 +ITM_LOG3 = 70 +ITM_TWIG = 71 +ITM_ROCK = 72 +ITM_ROCKPILE = 73 +ITM_BARREL = 74 +ITM_BARREL2 = 75 +ITM_TREE3 = 76 +ITM_TREE4 = 77 +ITM_TREE5 = 78 +ITM_TREE6 = 79 +ITM_TREE7 = 80 +ITM_SHROOM = 81 +ITM_DAISY = 82 +ITM_SILVER = 83 +ITM_MAGICPLANT = 84 +ITM_WALKPLANT = 85 +ITM_SWITCH1ON = 86 +ITM_SWITCH1OFF = 87 +ITM_SWITCH2 = 88 +ITM_GRASS = 89 +ITM_GRASS2 = 90 +ITM_GRASS3 = 91 +ITM_CATTAIL = 92 +ITM_LILROCK = 93 +ITM_BIGROCK = 94 +ITM_BOOMROCK = 95 +ITM_TORCH = 96 +ITM_GASHOLE = 97 +ITM_GASPIPELR = 98 +ITM_GASPIPEUD = 99 +ITM_GASPIPEDR = 100 +ITM_GASPIPEDL = 101 +ITM_GASPIPEUR = 102 +ITM_GASPIPEUL = 103 +ITM_GASSPARK = 104 +ITM_GRAVE = 105 +ITM_GRAVE2 = 106 +ITM_TABLE2 = 107 +ITM_AUTODOOR = 108 +ITM_AUTODOOR2 = 109 +ITM_TALISMAN = 110 +ITM_TRIPLEFIRE = 111 +ITM_BUSTSTAND = 112 +ITM_BUST = 113 +ITM_BUSTONSTAND = 114 +ITM_BATSTAND = 115 +ITM_BAT = 116 +ITM_BATONSTAND = 117 +ITM_BATDOLL = 118 +ITM_SKELDOLL = 119 +ITM_FROGDOLL = 120 +ITM_GHOSTDOLL = 121 +ITM_MUMMYDOLL = 122 +ITM_SWAMPDOLL = 123 +ITM_VAMPDOLL = 124 +ITM_WOLFDOLL = 125 +ITM_PORTAL = 126 +ITM_BADGE = 127 +ITM_CAT = 128 +ITM_ZOMBGEM = 129 +ITM_BOOTS = 130 +ITM_FERTILIZER = 131 +ITM_GHOSTPOTION = 132 +ITM_LANTERN = 133 +ITM_REFLECTGEM = 134 +ITM_SILVERSLING = 135 +ITM_STICK = 136 +ITM_ARCHIPELAGO = 137 +loony_item_table: Dict[str, LL_Item] = { + "Heart" : LL_Item(ll_base_id + VAR_HEART, LL_ItemCat.ITEM, IC.useful, 20), + "Lightning" : LL_Item(ll_base_id + VAR_LIGHTNING, LL_ItemCat.ITEM, IC.useful, 10), + "Arrow" : LL_Item(ll_base_id + VAR_ARROW, LL_ItemCat.ITEM, IC.useful, 10), + "Pants" : LL_Item(ll_base_id + VAR_PANTS, LL_ItemCat.ITEM, IC.useful, 10), + "Mushroom" : LL_Item(ll_base_id + VAR_MUSHROOM, LL_ItemCat.ITEM, IC.progression, 10), + "Orb" : LL_Item(ll_base_id + VAR_MYSORB, LL_ItemCat.ITEM, IC.progression, 4), + "Bombs" : LL_Item(ll_base_id + VAR_WBOMBS, LL_ItemCat.ITEM, IC.progression), + "Shock Wand" : LL_Item(ll_base_id + VAR_WLIGHTNING, LL_ItemCat.ITEM, IC.progression), + "Ice Spear" : LL_Item(ll_base_id + VAR_WICE, LL_ItemCat.ITEM, IC.progression), + "Cactus" : LL_Item(ll_base_id + VAR_WCACTUS, LL_ItemCat.ITEM, IC.progression), + "Boomerang" : LL_Item(ll_base_id + VAR_WBOOMERANG, LL_ItemCat.ITEM, IC.progression), + "Whoopee" : LL_Item(ll_base_id + VAR_WWHOOPEE, LL_ItemCat.ITEM, IC.progression), + "Hot Pants" : LL_Item(ll_base_id + VAR_WHOTPANTS, LL_ItemCat.ITEM, IC.progression), + "Skull Key" : LL_Item(ll_base_id + VAR_SKULLKEY, LL_ItemCat.ITEM, IC.progression), + "Bat Key" : LL_Item(ll_base_id + VAR_BATKEY, LL_ItemCat.ITEM, IC.progression), + "Pumpkin Key" : LL_Item(ll_base_id + VAR_PUMPKINKEY, LL_ItemCat.ITEM, IC.progression), + "Boots" : LL_Item(ll_base_id + VAR_BOOTS, LL_ItemCat.ITEM, IC.progression), + "Stick" : LL_Item(ll_base_id + VAR_STICK, LL_ItemCat.ITEM, IC.progression), + "Fertilizer" : LL_Item(ll_base_id + VAR_FERTILIZER, LL_ItemCat.ITEM, IC.progression), + "Silver" : LL_Item(ll_base_id + VAR_SILVER, LL_ItemCat.ITEM, IC.progression), + "Doom Daisy" : LL_Item(ll_base_id + VAR_DAISY, LL_ItemCat.ITEM, IC.progression), + "Ghost Potion" : LL_Item(ll_base_id + VAR_POTION, LL_ItemCat.ITEM, IC.progression), + "Vampire Bust" : LL_Item(ll_base_id + VAR_VAMPBUST, LL_ItemCat.ITEM, IC.progression, 8), + "Cat" : LL_Item(ll_base_id + VAR_CAT, LL_ItemCat.ITEM, IC.progression), + "Big Gem" : LL_Item(ll_base_id + VAR_GEM, LL_ItemCat.ITEM, IC.progression, 6), + "100 Gems" : LL_Item(ll_base_id + VAR_ZOMBIEGEM, LL_ItemCat.ITEM, IC.filler), + "Triple Fire Gem" : LL_Item(ll_base_id + VAR_TRIPLEFIRE, LL_ItemCat.ITEM, IC.useful), + "Happy Stick" : LL_Item(ll_base_id + VAR_TALISMAN, LL_ItemCat.ITEM, IC.progression), + "Bat Statue" : LL_Item(ll_base_id + VAR_BATSTATUE, LL_ItemCat.ITEM, IC.progression, 4), + "Lantern" : LL_Item(ll_base_id + VAR_LANTERN, LL_ItemCat.ITEM, IC.progression), + "Reflect Gem" : LL_Item(ll_base_id + VAR_REFLECT, LL_ItemCat.ITEM, IC.useful), + "Silver Sling" : LL_Item(ll_base_id + VAR_SILVERSLING, LL_ItemCat.ITEM, IC.progression), +} +loonyland_region_table: Dict[str, LLRegion] = { + "Menu": LLRegion(False), + "Halloween Hill": LLRegion(True), + "Slurpy Swamp Mud": LLRegion(False, "Halloween Hill"), + "Slurpy Swamp Mud North Warp": LLRegion(False, "Halloween Hill"), + "Slurpy Swamp Mud East Warp": LLRegion(False, "Halloween Hill"), + "Zombiton": LLRegion(False, "Halloween Hill"), + "Rocky Cliffs": LLRegion(False, "Halloween Hill"), + "Vampy Land": LLRegion(False, "Halloween Hill"), + "A Cabin Trees": LLRegion(True, "A Cabin"), + "The Witch's Cabin": LLRegion(True), + "The Witch's Cabin Back": LLRegion(False, "The Witch's Cabin"), + "Bonita's Cabin": LLRegion(True), + "The Bog Pit": LLRegion(True), + "Underground Tunnel": LLRegion(True), + "Underground Tunnel Mud": LLRegion(False, "Underground Tunnel"), + "Underground Tunnel Zombie": LLRegion(False, "Underground Tunnel"), + "Swamp Gas Cavern": LLRegion(True), + "Swamp Gas Cavern Back": LLRegion(False, "Swamp Gas Cavern"), + "A Tiny Cabin": LLRegion(True), + "A Cabin Seer": LLRegion(True), + "Benny's Cocktails": LLRegion(True), + "Dusty Crypt": LLRegion(True), + "Dusty Crypt Entrance": LLRegion(False, "Dusty Crypt"), + "Musty Crypt": LLRegion(True), + "Musty Crypt Entrance": LLRegion(False, "Musty Crypt"), + "Rusty Crypt": LLRegion(True), + "Rusty Crypt Entrance": LLRegion(False, "Rusty Crypt"), + "A Messy Cabin": LLRegion(True), + "Under The Lake": LLRegion(True), + "Under The Lake Entrance": LLRegion(False, "Under The Lake"), + "Under The Lake Exit": LLRegion(False, "Under The Lake"), + "Deeper Under The Lake": LLRegion(True), + "Frankenjulie's Laboratory": LLRegion(True), + "Haunted Tower": LLRegion(True), + "Haunted Tower Entrance": LLRegion(False), + "Haunted Tower Stairs Up": LLRegion(False), + "Haunted Tower Stairs Down": LLRegion(False), + "Haunted Tower Floor 2": LLRegion(True), + "Haunted Tower Floor 2 Entrance": LLRegion(False), + "Haunted Tower Floor 2 Exit": LLRegion(False), + "Haunted Tower Floor 3 Entrance": LLRegion(False), + "Haunted Tower Floor 3 Exit": LLRegion(False), + "Haunted Tower Floor 3": LLRegion(True), + "Haunted Tower Roof": LLRegion(True), + "Haunted Basement": LLRegion(True), + "Haunted Basement Entrance": LLRegion(False, "Haunted Basement"), + "Abandoned Mines": LLRegion(True), + "Abandoned Mines Entrance": LLRegion(False, "Abandoned Mines"), + "The Shrine Of Bombulus": LLRegion(True), + "A Gloomy Cavern": LLRegion(True), + "A Gloomy Cavern Entrance": LLRegion(False, "A Gloomy Cavern"), + "Happy Stick Woods": LLRegion(True), + "The Wolf Den": LLRegion(True), + "The Wolf Den Entrance": LLRegion(False, "The Wolf Den"), + "The Wolf Den Exit": LLRegion(False, "The Wolf Den"), + "A Cabin Larry": LLRegion(True), + "Upper Creepy Caverns": LLRegion(True), + "Upper Creepy Caverns Left Warp": LLRegion(False, "Upper Creepy Caverns"), + "Upper Creepy Caverns Middle Warp": LLRegion(False, "Upper Creepy Caverns"), + "Upper Creepy Caverns Right Warp": LLRegion(False, "Upper Creepy Caverns"), + "Under The Ravine": LLRegion(True), + "Creepy Caverns Left": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Left Bottom Warp": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Left Top Warp": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Middle": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Middle Top Warp": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Middle Right Warp": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Right": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Right Left Warp": LLRegion(False, "Creepy Caverns"), + "Creepy Caverns Right Bottom Warp": LLRegion(False, "Creepy Caverns"), + "Castle Vampy": LLRegion(True), + "Castle Vampy Skull Jail": LLRegion(False, "Castle Vampy"), + "Castle Vampy II": LLRegion(True), + "Castle Vampy II NW": LLRegion(False, "Castle Vampy II"), + "Castle Vampy II NE": LLRegion(False, "Castle Vampy II"), + "Castle Vampy II SW": LLRegion(False, "Castle Vampy II"), + "Castle Vampy II SE": LLRegion(False, "Castle Vampy II"), + "Castle Vampy II Bat Jail": LLRegion(False, "Castle Vampy II"), + "Cabin In The Woods": LLRegion(True), + "Castle Vampy III": LLRegion(True), + "Castle Vampy III NW": LLRegion(False, "Castle Vampy III"), + "Castle Vampy III NE": LLRegion(False, "Castle Vampy III"), + "Castle Vampy III SW": LLRegion(False, "Castle Vampy III"), + "Castle Vampy III SE": LLRegion(False, "Castle Vampy III"), + "Castle Vampy III Pumpkin Jail": LLRegion(False, "Castle Vampy III"), + "Castle Vampy IV": LLRegion(True), + "Castle Vampy IV NW": LLRegion(False, "Castle Vampy IV"), + "Castle Vampy IV NE": LLRegion(False, "Castle Vampy IV"), + "Castle Vampy IV SW": LLRegion(False, "Castle Vampy IV"), + "Castle Vampy IV SE": LLRegion(False, "Castle Vampy IV"), + "A Cabin Collector": LLRegion(True), + "Castle Vampy Roof NE": LLRegion(True, "Castle Vampy Roof"), + "Castle Vampy Roof SE": LLRegion(True, "Castle Vampy Roof"), + "Castle Vampy Roof SW": LLRegion(True, "Castle Vampy Roof"), + "Castle Vampy Roof NW": LLRegion(True, "Castle Vampy Roof"), + "The Evilizer": LLRegion(True), + "The Heart Of Terror": LLRegion(True), + "The Heart Of Terror Entrance": LLRegion(False, "The Heart Of Terror"), + "A Hidey-Hole": LLRegion(True), + "Empty Rooftop": LLRegion(True), + "Swampdog Lair": LLRegion(True), + "Swampdog Lair Entrance": LLRegion(False, "Swampdog Lair"), + "Larry's Lair": LLRegion(True), + "Bowling": LLRegion(False), + "Survival": LLRegion(False), + "Boss Bash": LLRegion(False), + "Loony Ball": LLRegion(False), + "Remix": LLRegion(False), +} +loonyland_location_table: Dict[str, LL_Location] = { + "Swamp: Mud Path": LL_Location(0, LL_LocCat.PICKUP, "Slurpy Swamp Mud"), + "Swamp: Bog Beast": LL_Location(1, LL_LocCat.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Upper Ledge": LL_Location(2, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Swamp: Sapling Shrine": LL_Location(3, LL_LocCat.PICKUP, "Slurpy Swamp Mud"), + "Terror Glade: South Trees": LL_Location(4, LL_LocCat.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Vine": LL_Location(5, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Grand Pharoh": LL_Location(6, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Rock Corner": LL_Location(7, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Swamp: Outside Luniton": LL_Location(8, LL_LocCat.PICKUP, "Halloween Hill"), + "Swamp: East 1": LL_Location(9, LL_LocCat.PICKUP, "Halloween Hill"), + "Swamp: Top Left dry": LL_Location(10, LL_LocCat.PICKUP, "Halloween Hill"), + "Swamp: East 2": LL_Location(11, LL_LocCat.PICKUP, "Halloween Hill"), + "Woods: Above Castle": LL_Location(12, LL_LocCat.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Entrance Ledge": LL_Location(13, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Peak": LL_Location(14, LL_LocCat.PICKUP, "Rocky Cliffs"), + "Woods: SW of Cabin": LL_Location(15, LL_LocCat.PICKUP, "Halloween Hill"), + "Witch's Cabin: Bedroom": LL_Location(16, LL_LocCat.PICKUP, "The Witch's Cabin"), + "Witch's Cabin: Backroom": LL_Location(17, LL_LocCat.PICKUP, "The Witch's Cabin Back"), + "Bonita's Cabin: Barrel Maze": LL_Location(18, LL_LocCat.PICKUP, "Bonita's Cabin"), + "Bog Pit: Top Door": LL_Location(19, LL_LocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Posts Room": LL_Location(20, LL_LocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Drippy Window": LL_Location(21, LL_LocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Green room": LL_Location(22, LL_LocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Arena": LL_Location(23, LL_LocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Sw Switch": LL_Location(24, LL_LocCat.PICKUP, "The Bog Pit"), + "Tunnel: Swampdog Pumpkin Door": LL_Location(25, LL_LocCat.PICKUP, "Underground Tunnel"), + "Tunnel: Scratch Wall": LL_Location(26, LL_LocCat.PICKUP, "Underground Tunnel"), + "Tunnel: Narrow Passage": LL_Location(27, LL_LocCat.PICKUP, "Underground Tunnel"), + "Tunnel: Top Frogs": LL_Location(28, LL_LocCat.PICKUP, "Underground Tunnel"), + "Tunnel: Torch Island": LL_Location(29, LL_LocCat.PICKUP, "Underground Tunnel Mud"), + "Tunnel: Small Room": LL_Location(30, LL_LocCat.PICKUP, "Underground Tunnel"), + "Swamp Gas: Scratch Wall": LL_Location(31, LL_LocCat.PICKUP, "Swamp Gas Cavern"), + "Swamp Gas: Bat Door": LL_Location(32, LL_LocCat.PICKUP, "Swamp Gas Cavern"), + "Swamp Gas: Stair room": LL_Location(33, LL_LocCat.PICKUP, "Swamp Gas Cavern Back"), + "Swamp Gas: Rock Prison": LL_Location(34, LL_LocCat.PICKUP, "Swamp Gas Cavern"), + "A Tiny Cabin": LL_Location(35, LL_LocCat.PICKUP, "A Tiny Cabin"), + "Seer: Bedside": LL_Location(36, LL_LocCat.PICKUP, "A Cabin Seer"), + "Dusty Crypt: Pumpkin Door": LL_Location(37, LL_LocCat.PICKUP, "Dusty Crypt"), + "Dusty Crypt: Maze": LL_Location(38, LL_LocCat.PICKUP, "Dusty Crypt"), + "Musty Crypt: Maze Room": LL_Location(39, LL_LocCat.PICKUP, "Musty Crypt"), + "Rusty Crypt: Vine": LL_Location(40, LL_LocCat.PICKUP, "Rusty Crypt"), + "Rusty Crypt: Boulders": LL_Location(41, LL_LocCat.PICKUP, "Rusty Crypt"), + "A Messy Cabin": LL_Location(42, LL_LocCat.PICKUP, "A Messy Cabin"), + "Under The Lake: Behind Lightning Rod": LL_Location(43, LL_LocCat.PICKUP, "Under The Lake"), + "Under The Lake: Bat Door": LL_Location(44, LL_LocCat.PICKUP, "Under The Lake"), + "Deeper Lake: Corner": LL_Location(45, LL_LocCat.PICKUP, "Deeper Under The Lake"), + "Deeper Lake: Rhombus": LL_Location(46, LL_LocCat.PICKUP, "Deeper Under The Lake"), + "Frankenjulie's Reward": LL_Location(47, LL_LocCat.PICKUP, "Frankenjulie's Laboratory"), + "Tower: Barracks": LL_Location(48, LL_LocCat.PICKUP, "Haunted Tower"), + "Tower F2: Skull Puzzle": LL_Location(49, LL_LocCat.PICKUP, "Haunted Tower Floor 2"), + "PolterGuy's Reward": LL_Location(50, LL_LocCat.PICKUP, "Haunted Tower Roof"), + "Tower Basement: DoorDoorDoorDoorDoorDoor": LL_Location(51, LL_LocCat.PICKUP, "Haunted Basement"), + "Abandoned Mine: Shaft": LL_Location(52, LL_LocCat.PICKUP, "Abandoned Mines"), + "Shrine of Bombulus: Prize": LL_Location(53, LL_LocCat.PICKUP, "The Shrine Of Bombulus"), + "Gloomy Cavern: Lockpick": LL_Location(54, LL_LocCat.PICKUP, "A Gloomy Cavern"), + "Happy Stick: Hidden": LL_Location(55, LL_LocCat.PICKUP, "Happy Stick Woods"), + "Happy Stick: Reward": LL_Location(56, LL_LocCat.PICKUP, "Happy Stick Woods"), + "Wolf Den: Top Left": LL_Location(57, LL_LocCat.PICKUP, "The Wolf Den"), + "Wolf Den: Pumpkin Door": LL_Location(58, LL_LocCat.PICKUP, "The Wolf Den"), + "Wolf Den: Vine": LL_Location(59, LL_LocCat.PICKUP, "The Wolf Den"), + "Upper Cavern: Three Gold Skeletons": LL_Location(60, LL_LocCat.PICKUP, "Upper Creepy Caverns"), + "Under The Ravine: Left Vine": LL_Location(61, LL_LocCat.PICKUP, "Under The Ravine"), + "Under The Ravine: Right Vine": LL_Location(62, LL_LocCat.PICKUP, "Under The Ravine"), + "Creepy Caverns M: Pharaoh Bat Door": LL_Location(63, LL_LocCat.PICKUP, "Creepy Caverns Middle"), + "Creepy Caverns R: Top Pharaohs": LL_Location(64, LL_LocCat.PICKUP, "Creepy Caverns Right"), + "Creepy Caverns M: Gargoyles": LL_Location(65, LL_LocCat.PICKUP, "Creepy Caverns Middle"), + "Castle Vampy: Top Room": LL_Location(66, LL_LocCat.PICKUP, "Castle Vampy"), + "Castle Vampy: Maze": LL_Location(67, LL_LocCat.PICKUP, "Castle Vampy"), + "Castle Vampy: Gauntlet": LL_Location(68, LL_LocCat.PICKUP, "Castle Vampy"), + "Castle Vampy: Bat Closet": LL_Location(69, LL_LocCat.PICKUP, "Castle Vampy"), + "Castle Vampy II: Candle Room": LL_Location(70, LL_LocCat.PICKUP, "Castle Vampy II"), + "Castle Vampy II: Bloodsucker Room": LL_Location(71, LL_LocCat.PICKUP, "Castle Vampy II"), + "Castle Vampy II: Vampire Lord": LL_Location(72, LL_LocCat.PICKUP, "Castle Vampy II"), + "Castle Vampy II: Bat Room": LL_Location(73, LL_LocCat.PICKUP, "Castle Vampy II"), + "Cabin in the Woods: Gold Skull": LL_Location(74, LL_LocCat.PICKUP, "Cabin In The Woods"), + "Castle Vampy III: Center": LL_Location(75, LL_LocCat.PICKUP, "Castle Vampy III"), + "Castle Vampy III: Behind the Pews": LL_Location(76, LL_LocCat.PICKUP, "Castle Vampy III"), + "Castle Vampy III: AMBUSH!": LL_Location(77, LL_LocCat.PICKUP, "Castle Vampy III"), + "Castle Vampy III: Halloween": LL_Location(78, LL_LocCat.PICKUP, "Castle Vampy III"), + "Castle Vampy III: Bat room": LL_Location(79, LL_LocCat.PICKUP, "Castle Vampy III"), + "Castle Vampy IV: Right Path": LL_Location(80, LL_LocCat.PICKUP, "Castle Vampy IV"), + "Castle Vampy IV: Left Path": LL_Location(81, LL_LocCat.PICKUP, "Castle Vampy IV"), + "Castle Vampy IV: Ballroom Right": LL_Location(82, LL_LocCat.PICKUP, "Castle Vampy IV"), + "Castle Vampy IV: Right Secret Wall": LL_Location(83, LL_LocCat.PICKUP, "Castle Vampy IV"), + "Castle Vampy IV: Ballroom Left": LL_Location(84, LL_LocCat.PICKUP, "Castle Vampy IV"), + "Roof NW: Gutsy the Elder": LL_Location(85, LL_LocCat.PICKUP, "Castle Vampy Roof NW"), + "Roof NE: Stoney the Elder": LL_Location(86, LL_LocCat.PICKUP, "Castle Vampy Roof NE"), + "Roof SW: Drippy the Elder": LL_Location(87, LL_LocCat.PICKUP, "Castle Vampy Roof SW"), + "Roof SE: Toasty the Elder": LL_Location(88, LL_LocCat.PICKUP, "Castle Vampy Roof SE"), + "Bonkula Item": LL_Location(89, LL_LocCat.PICKUP, "The Heart Of Terror"), + "Hidey-Hole: Bat Door": LL_Location(90, LL_LocCat.PICKUP, "A Hidey-Hole"), + "Hidey-Hole: Pebbles": LL_Location(91, LL_LocCat.PICKUP, "A Hidey-Hole"), + "Swampdog Lair: Entrance": LL_Location(92, LL_LocCat.PICKUP, "Swampdog Lair"), + "Swampdog Lair: End": LL_Location(93, LL_LocCat.PICKUP, "Swampdog Lair"), + "Q: Save Halloween Hill": LL_Location(94, LL_LocCat.QUEST, "The Evilizer"), + "Q: Tree Trimming": LL_Location(95, LL_LocCat.QUEST, "A Cabin Trees"), + "Q: Scaredy Cat": LL_Location(96, LL_LocCat.QUEST, "Halloween Hill"), + "Q: Sticky Shoes": LL_Location(97, LL_LocCat.QUEST, "Halloween Hill"), + "Q: Mushroom Hunt": LL_Location(98, LL_LocCat.QUEST, "The Witch's Cabin"), + "Q: Zombie Stomp": LL_Location(99, LL_LocCat.QUEST, "Zombiton"), + "Q: Smashing Pumpkins": LL_Location(100, LL_LocCat.QUEST, "Halloween Hill"), + "Q: Silver Bullet": LL_Location(101, LL_LocCat.QUEST, "Zombiton"), + "Q: Hairy Larry": LL_Location(102, LL_LocCat.QUEST, "The Wolf Den"), + "Q: Ghostbusting": LL_Location(103, LL_LocCat.QUEST, "The Witch's Cabin"), + "Q: The Rescue": LL_Location(104, LL_LocCat.QUEST, "A Gloomy Cavern"), + "Q: The Collection": LL_Location(105, LL_LocCat.QUEST, "A Cabin Collector"), +} +def set_rules(multiworld, world, player): + access_rules: Dict[str, CollectionRule] = { + "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", player), + "Rocky Cliffs: Rock Corner": lambda state: have_bombs(state, player), + "Witch's Cabin: Bedroom": lambda state: have_light_source(state, player), + "Bog Pit: Top Door": lambda state: state.has("Skull Key", player), + "Tunnel: Swampdog Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Tunnel: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), + "Swamp Gas: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), + "Swamp Gas: Bat Door": lambda state: state.has("Bat Key", player), + "Swamp Gas: Rock Prison": lambda state: have_bombs(state, player), + "Dusty Crypt: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, player), + "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", player), + "Under The Lake: Bat Door": lambda state: state.has("Bat Key", player), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), + "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Wolf Den: Vine": lambda state: state.has("Fertilizer", player), + "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", player), + "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", player), + "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", player), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), + "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), + "Swampdog Lair: End": lambda state: have_light_source(state, player) and state.has("Fertilizer", player), + "Q: Scaredy Cat": lambda state: state.has("Cat", player), + "Q: Mushroom Hunt": lambda state: state.has("Mushroom", player, 10), + "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), + "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), + "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, player) and state.has("Silver", player), + "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", player), + "Q: Ghostbusting": lambda state: state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), + "Q: The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and state.can_reach_region("Castle Vampy", player), + } + for loc in multiworld.get_locations(player): + if loc.name in access_rules: + add_rule(loc, access_rules[loc.name]) +def set_entrance_rules(multiworld, world, player): + loonyland_entrance_table: List[LL_Entrance] = [ + LL_Entrance("Menu", "Halloween Hill", False), + LL_Entrance("Menu", "Bowling", False), + LL_Entrance("Menu", "Survival", False), + LL_Entrance("Menu", "Boss Bash", False), + LL_Entrance("Menu", "Loony Ball", False), + LL_Entrance("Menu", "Remix", False), + LL_Entrance("Halloween Hill", "A Cabin Trees", True), + LL_Entrance("Halloween Hill", "The Witch's Cabin", True), + LL_Entrance("Halloween Hill", "Bonita's Cabin", True), + LL_Entrance("Halloween Hill", "Underground Tunnel", True), + LL_Entrance("Halloween Hill", "The Bog Pit", True), + LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False), + LL_Entrance("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern", True), + LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False), + LL_Entrance("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True), + LL_Entrance("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), + LL_Entrance("Halloween Hill", "The Witch's Cabin Back", True), + LL_Entrance("Zombiton", "A Cabin Seer", True), + LL_Entrance("Zombiton", "Benny's Cocktails", True), + LL_Entrance("Halloween Hill", "Dusty Crypt Entrance", True), + LL_Entrance("Zombiton", "Musty Crypt Entrance", True), + LL_Entrance("Zombiton", "A Messy Cabin", True), + LL_Entrance("Halloween Hill", "Rusty Crypt Entrance", True), + LL_Entrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), + LL_Entrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Rocky Cliffs", "Abandoned Mines Entrance", True), + LL_Entrance("Rocky Cliffs", "The Shrine Of Bombulus", True), + LL_Entrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, player)), + LL_Entrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", player)), + LL_Entrance("Zombiton", "A Cabin Larry", True), + LL_Entrance("Halloween Hill", "The Wolf Den Entrance", True), + LL_Entrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", player)), + LL_Entrance("Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, player)), + LL_Entrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), + LL_Entrance("Vampy Land", "Castle Vampy", True), + LL_Entrance("Halloween Hill", "Cabin In The Woods", True), + LL_Entrance("Halloween Hill", "A Cabin Collector", True), + LL_Entrance("Halloween Hill", "A Hidey-Hole", True), + LL_Entrance("Halloween Hill", "Swampdog Lair Entrance", True), + LL_Entrance("A Cabin Trees", "Halloween Hill", True), + LL_Entrance("The Witch's Cabin", "Halloween Hill", True), + LL_Entrance("The Witch's Cabin Back", "Halloween Hill", True), + LL_Entrance("Bonita's Cabin", "Halloween Hill", True), + LL_Entrance("The Bog Pit", "Halloween Hill", True), + LL_Entrance("Underground Tunnel", "Halloween Hill", True), + LL_Entrance("Underground Tunnel Zombie", "Benny's Cocktails", True), + LL_Entrance("Swamp Gas Cavern", "Slurpy Swamp Mud North Warp", True), + LL_Entrance("Swamp Gas Cavern Back", "Slurpy Swamp Mud East Warp", True), + LL_Entrance("A Tiny Cabin", "Halloween Hill", True), + LL_Entrance("A Cabin Seer", "Zombiton", True), + LL_Entrance("Benny's Cocktails", "Zombiton", True), + LL_Entrance("Benny's Cocktails", "Underground Tunnel Zombie", True), + LL_Entrance("Dusty Crypt Entrance", "Dusty Crypt", False, lambda state: have_light_source(state, player)), + LL_Entrance("Dusty Crypt Entrance", "Halloween Hill", True), + LL_Entrance("Dusty Crypt", "Dusty Crypt Entrance", False), + LL_Entrance("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, player)), + LL_Entrance("Musty Crypt Entrance", "Zombiton", True), + LL_Entrance("Musty Crypt", "Musty Crypt Entrance", False), + LL_Entrance("Rusty Crypt Entrance", "Rusty Crypt", False, lambda state: have_light_source(state, player)), + LL_Entrance("Rusty Crypt Entrance", "Halloween Hill", True), + LL_Entrance("Rusty Crypt", "Rusty Crypt Entrance", False), + LL_Entrance("A Messy Cabin", "Zombiton", True), + LL_Entrance("Under The Lake Entrance", "Under The Lake", False, lambda state: have_light_source(state, player)), + LL_Entrance("Under The Lake Entrance", "Halloween Hill", True), + LL_Entrance("Under The Lake", "Under The Lake Entrance", False), + LL_Entrance("Under The Lake", "Under The Lake Exit", False), + LL_Entrance("Under The Lake Exit", "Deeper Under The Lake", True), + LL_Entrance("Under The Lake Exit", "Under The Lake", False), + LL_Entrance("Deeper Under The Lake", "Under The Lake Exit", True), + LL_Entrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True), + LL_Entrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True), + LL_Entrance("Frankenjulie's Laboratory", "Halloween Hill", True), + LL_Entrance("Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower", "Haunted Basement Entrance", False), + LL_Entrance("Haunted Tower", "Haunted Tower Stairs Up", False), + LL_Entrance("Haunted Tower", "Haunted Tower Stairs Down", False, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), + LL_Entrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), + LL_Entrance("Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player) and state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower Stairs Down", "Haunted Basement Entrance", True, lambda state: have_light_source(state, player)), + LL_Entrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), + LL_Entrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), + LL_Entrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), + LL_Entrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), + LL_Entrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), + LL_Entrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), + LL_Entrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), + LL_Entrance("Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", player)), + LL_Entrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), + LL_Entrance("Haunted Tower Roof", "Halloween Hill", True), + LL_Entrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), + LL_Entrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), + LL_Entrance("Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, player)), + LL_Entrance("Haunted Basement", "Haunted Basement Entrance", False), + LL_Entrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, player)), + LL_Entrance("Abandoned Mines Entrance", "Rocky Cliffs", True), + LL_Entrance("Abandoned Mines", "Abandoned Mines Entrance", False), + LL_Entrance("The Shrine Of Bombulus", "Rocky Cliffs", True), + LL_Entrance("A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, player)), + LL_Entrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), + LL_Entrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), + LL_Entrance("Happy Stick Woods", "Halloween Hill", True), + LL_Entrance("The Wolf Den Entrance", "The Wolf Den", False, lambda state: state.has("Silver Sling", player) and have_light_source(state, player)), + LL_Entrance("The Wolf Den Entrance", "Halloween Hill", True), + LL_Entrance("The Wolf Den", "The Wolf Den Entrance", False), + LL_Entrance("The Wolf Den", "The Wolf Den Exit", False), + LL_Entrance("The Wolf Den Exit", "Larry's Lair", True), + LL_Entrance("The Wolf Den Exit", "The Wolf Den", False, lambda state: state.has("Silver Sling", player) and have_light_source(state, player)), + LL_Entrance("A Cabin Larry", "Zombiton", True), + LL_Entrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), + LL_Entrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), + LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), + LL_Entrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, lambda state: have_light_source(state, player)), + LL_Entrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), + LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), + LL_Entrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, lambda state: have_light_source(state, player)), + LL_Entrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), + LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), + LL_Entrance("Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, player)), + LL_Entrance("Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, player)), + LL_Entrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), + LL_Entrance("Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player)), + LL_Entrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), + LL_Entrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), + LL_Entrance("Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player)), + LL_Entrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), + LL_Entrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), + LL_Entrance("Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, player)), + LL_Entrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), + LL_Entrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), + LL_Entrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True), + LL_Entrance("Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, player)), + LL_Entrance("Creepy Caverns Right Left Warp", "Under The Ravine", True), + LL_Entrance("Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, player)), + LL_Entrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), + LL_Entrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), + LL_Entrance("Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, player)), + LL_Entrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), + LL_Entrance("Castle Vampy", "Halloween Hill", True), + LL_Entrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), + LL_Entrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", player)), + LL_Entrance("Castle Vampy Skull Jail", "Castle Vampy II", True), + LL_Entrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", player, 4)), + LL_Entrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", player, 4)), + LL_Entrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", player, 4)), + LL_Entrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", player, 4)), + LL_Entrance("Castle Vampy II", "Castle Vampy Skull Jail", True), + LL_Entrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", player)), + LL_Entrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", player)), + LL_Entrance("Castle Vampy II Bat Jail", "Castle Vampy III", True), + LL_Entrance("Castle Vampy II NE", "Castle Vampy", True), + LL_Entrance("Castle Vampy II NE", "Castle Vampy III NE", True), + LL_Entrance("Castle Vampy II SE", "Castle Vampy", True), + LL_Entrance("Castle Vampy II SE", "Castle Vampy III SE", True), + LL_Entrance("Castle Vampy II SW", "Castle Vampy", True), + LL_Entrance("Castle Vampy II SW", "Castle Vampy III SW", True), + LL_Entrance("Castle Vampy II NW", "Castle Vampy", True), + LL_Entrance("Castle Vampy II NW", "Castle Vampy III NW", True), + LL_Entrance("Cabin In The Woods", "Halloween Hill", True), + LL_Entrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), + LL_Entrance("Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", player)), + LL_Entrance("Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", player)), + LL_Entrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), + LL_Entrance("Castle Vampy III NE", "Castle Vampy II NE", True), + LL_Entrance("Castle Vampy III NE", "Castle Vampy IV NE", True), + LL_Entrance("Castle Vampy III SE", "Castle Vampy II SE", True), + LL_Entrance("Castle Vampy III SE", "Castle Vampy IV SE", True), + LL_Entrance("Castle Vampy III SW", "Castle Vampy II SW", True), + LL_Entrance("Castle Vampy III SW", "Castle Vampy IV SW", True), + LL_Entrance("Castle Vampy III NW", "Castle Vampy II NW", True), + LL_Entrance("Castle Vampy III NW", "Castle Vampy IV NW", True), + LL_Entrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), + LL_Entrance("Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", player, 8)), + LL_Entrance("Castle Vampy IV NE", "Castle Vampy III NE", True), + LL_Entrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), + LL_Entrance("Castle Vampy IV SE", "Castle Vampy III SE", True), + LL_Entrance("Castle Vampy IV SE", "Castle Vampy Roof SE", True), + LL_Entrance("Castle Vampy IV SW", "Castle Vampy III SW", True), + LL_Entrance("Castle Vampy IV SW", "Castle Vampy Roof SW", True), + LL_Entrance("Castle Vampy IV NW", "Castle Vampy III NW", True), + LL_Entrance("Castle Vampy IV NW", "Castle Vampy Roof NW", True), + LL_Entrance("A Cabin Collector", "Halloween Hill", True), + LL_Entrance("Castle Vampy Roof NE", "Castle Vampy IV NE", True), + LL_Entrance("Castle Vampy Roof SE", "Castle Vampy IV SE", True), + LL_Entrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), + LL_Entrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), + LL_Entrance("The Evilizer", "Halloween Hill", True), + LL_Entrance("The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, player)), + LL_Entrance("The Heart Of Terror", "The Evilizer", True), + LL_Entrance("The Heart Of Terror", "Empty Rooftop", True), + LL_Entrance("A Hidey-Hole", "Halloween Hill", True), + LL_Entrance("Empty Rooftop", "Halloween Hill", True), + LL_Entrance("Swampdog Lair Entrance", "Swampdog Lair", False, lambda state: state.has("Boots", player)), + LL_Entrance("Swampdog Lair", "Swampdog Lair Entrance", True), + LL_Entrance("Larry's Lair", "Halloween Hill", True), + LL_Entrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LL_Entrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", player)), + LL_Entrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LL_Entrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LL_Entrance("Zombiton", "Halloween Hill", False), + LL_Entrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player)), + LL_Entrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player)), + LL_Entrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), + LL_Entrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", player)), + LL_Entrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player)), + LL_Entrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), +] + for region in multiworld.get_regions(player): + for entry in loonyland_entrance_table: + if entry.source_region == region.name: + region.connect(connecting_region=world.get_region(entry.target_region), rule=entry.rule) diff --git a/worlds/loonyland/Data/item_data.py b/worlds/loonyland/Data/item_data.py deleted file mode 100644 index b8c871cfa0d0..000000000000 --- a/worlds/loonyland/Data/item_data.py +++ /dev/null @@ -1,41 +0,0 @@ -from typing import Dict - -from BaseClasses import ItemClassification as IC -from worlds.loonyland import loonyland_base_id as ll_base_id -from worlds.loonyland.Data.Defines import * -from worlds.loonyland.Items import LL_Item, LL_ItemCat - -loony_item_table: Dict[str, LL_Item] = { - "Heart" : LL_Item(ll_base_id + VAR_HEART, LL_ItemCat.ITEM, IC.useful, 20), - "Lightning" : LL_Item(ll_base_id + VAR_LIGHTNING, LL_ItemCat.ITEM, IC.useful, 10), - "Arrow" : LL_Item(ll_base_id + VAR_ARROW, LL_ItemCat.ITEM, IC.useful, 10), - "Pants" : LL_Item(ll_base_id + VAR_PANTS, LL_ItemCat.ITEM, IC.useful, 10), - "Mushroom" : LL_Item(ll_base_id + VAR_MUSHROOM, LL_ItemCat.ITEM, IC.progression, 10), - "Orb" : LL_Item(ll_base_id + VAR_MYSORB, LL_ItemCat.ITEM, IC.progression, 4), - "Bombs" : LL_Item(ll_base_id + VAR_WBOMBS, LL_ItemCat.ITEM, IC.progression), - "Shock Wand" : LL_Item(ll_base_id + VAR_WLIGHTNING, LL_ItemCat.ITEM, IC.progression), - "Ice Spear" : LL_Item(ll_base_id + VAR_WICE, LL_ItemCat.ITEM, IC.progression), - "Cactus" : LL_Item(ll_base_id + VAR_WCACTUS, LL_ItemCat.ITEM, IC.progression), - "Boomerang" : LL_Item(ll_base_id + VAR_WBOOMERANG, LL_ItemCat.ITEM, IC.progression), - "Whoopee" : LL_Item(ll_base_id + VAR_WWHOOPEE, LL_ItemCat.ITEM, IC.progression), - "Hot Pants" : LL_Item(ll_base_id + VAR_WHOTPANTS, LL_ItemCat.ITEM, IC.progression), - "Skull Key" : LL_Item(ll_base_id + VAR_SKULLKEY, LL_ItemCat.ITEM, IC.progression), - "Bat Key" : LL_Item(ll_base_id + VAR_BATKEY, LL_ItemCat.ITEM, IC.progression), - "Pumpkin Key" : LL_Item(ll_base_id + VAR_PUMPKINKEY, LL_ItemCat.ITEM, IC.progression), - "Boots" : LL_Item(ll_base_id + VAR_BOOTS, LL_ItemCat.ITEM, IC.progression), - "Stick" : LL_Item(ll_base_id + VAR_STICK, LL_ItemCat.ITEM, IC.progression), - "Fertilizer" : LL_Item(ll_base_id + VAR_FERTILIZER, LL_ItemCat.ITEM, IC.progression), - "Silver" : LL_Item(ll_base_id + VAR_SILVER, LL_ItemCat.ITEM, IC.progression), - "Doom Daisy" : LL_Item(ll_base_id + VAR_DAISY, LL_ItemCat.ITEM, IC.progression), - "Ghost Potion" : LL_Item(ll_base_id + VAR_POTION, LL_ItemCat.ITEM, IC.progression), - "Vampire Bust" : LL_Item(ll_base_id + VAR_VAMPBUST, LL_ItemCat.ITEM, IC.progression, 8), - "Cat" : LL_Item(ll_base_id + VAR_CAT, LL_ItemCat.ITEM, IC.progression), - "Big Gem" : LL_Item(ll_base_id + VAR_GEM, LL_ItemCat.ITEM, IC.progression, 6), - "100 Gems" : LL_Item(ll_base_id + VAR_ZOMBIEGEM, LL_ItemCat.ITEM, IC.filler), - "Triple Fire Gem" : LL_Item(ll_base_id + VAR_TRIPLEFIRE, LL_ItemCat.ITEM, IC.useful), - "Happy Stick" : LL_Item(ll_base_id + VAR_TALISMAN, LL_ItemCat.ITEM, IC.progression), - "Bat Statue" : LL_Item(ll_base_id + VAR_BATSTATUE, LL_ItemCat.ITEM, IC.progression, 4), - "Lantern" : LL_Item(ll_base_id + VAR_LANTERN, LL_ItemCat.ITEM, IC.progression), - "Reflect Gem" : LL_Item(ll_base_id + VAR_REFLECT, LL_ItemCat.ITEM, IC.useful), - "Silver Sling" : LL_Item(ll_base_id + VAR_SILVERSLING, LL_ItemCat.ITEM, IC.progression), -} \ No newline at end of file diff --git a/worlds/loonyland/Data/location_data.py b/worlds/loonyland/Data/location_data.py deleted file mode 100644 index ee5969eed15b..000000000000 --- a/worlds/loonyland/Data/location_data.py +++ /dev/null @@ -1,111 +0,0 @@ -from typing import Dict -from worlds.loonyland.Locations import LL_Location, LL_LocCat - -loonyland_location_table: Dict[str, LL_Location] = { - "Swamp: Mud Path": LL_Location(0, LL_LocCat.PICKUP, "Slurpy Swamp Mud"), - "Swamp: Bog Beast": LL_Location(1, LL_LocCat.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Upper Ledge": LL_Location(2, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Swamp: Sapling Shrine": LL_Location(3, LL_LocCat.PICKUP, "Slurpy Swamp Mud"), - "Terror Glade: South Trees": LL_Location(4, LL_LocCat.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Vine": LL_Location(5, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Grand Pharoh": LL_Location(6, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Rock Corner": LL_Location(7, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Swamp: Outside Luniton": LL_Location(8, LL_LocCat.PICKUP, "Halloween Hill"), - "Swamp: East 1": LL_Location(9, LL_LocCat.PICKUP, "Halloween Hill"), - "Swamp: Top Left dry": LL_Location(10, LL_LocCat.PICKUP, "Halloween Hill"), - "Swamp: East 2": LL_Location(11, LL_LocCat.PICKUP, "Halloween Hill"), - "Woods: Above Castle": LL_Location(12, LL_LocCat.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Entrance Ledge": LL_Location(13, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Peak": LL_Location(14, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Woods: SW of Cabin": LL_Location(15, LL_LocCat.PICKUP, "Halloween Hill"), - "Witch's Cabin: Bedroom": LL_Location(16, LL_LocCat.PICKUP, "The Witch's Cabin Front"), - "Witch's Cabin: Backroom": LL_Location(17, LL_LocCat.PICKUP, "The Witch's Cabin Back"), - "Bonita's Cabin: Barrel Maze": LL_Location(18, LL_LocCat.PICKUP, "Bonita's Cabin"), - "Bog Pit: Top Door": LL_Location(19, LL_LocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Posts Room": LL_Location(20, LL_LocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Drippy Window": LL_Location(21, LL_LocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Green room": LL_Location(22, LL_LocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Arena": LL_Location(23, LL_LocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Sw Switch": LL_Location(24, LL_LocCat.PICKUP, "The Bog Pit"), - "Tunnel: Swampdog Pumpkin Door": LL_Location(25, LL_LocCat.PICKUP, "Underground Tunnel Top"), - "Tunnel: Scratch Wall": LL_Location(26, LL_LocCat.PICKUP, "Underground Tunnel Top"), - "Tunnel: Narrow Passage": LL_Location(27, LL_LocCat.PICKUP, "Underground Tunnel Top"), - "Tunnel: Top Frogs": LL_Location(28, LL_LocCat.PICKUP, "Underground Tunnel Top"), - "Tunnel: Torch Island": LL_Location(29, LL_LocCat.PICKUP, "Underground Tunnel Mud"), - "Tunnel: Small Room": LL_Location(30, LL_LocCat.PICKUP, "Underground Tunnel Top"), - "Swamp Gas: Scratch Wall": LL_Location(31, LL_LocCat.PICKUP, "Swamp Gas Cavern Front"), - "Swamp Gas: Bat Door": LL_Location(32, LL_LocCat.PICKUP, "Swamp Gas Cavern Front"), - "Swamp Gas: Stair room": LL_Location(33, LL_LocCat.PICKUP, "Swamp Gas Cavern Back"), - "Swamp Gas: Rock Prison": LL_Location(34, LL_LocCat.PICKUP, "Swamp Gas Cavern Front"), - "A Tiny Cabin": LL_Location(35, LL_LocCat.PICKUP, "A Tiny Cabin"), - "Seer: Bedside": LL_Location(36, LL_LocCat.PICKUP, "A Cabin Seer"), - "Dusty Crypt: Pumpkin Door": LL_Location(37, LL_LocCat.PICKUP, "Dusty Crypt"), - "Dusty Crypt: Maze": LL_Location(38, LL_LocCat.PICKUP, "Dusty Crypt"), - "Musty Crypt: Maze Room": LL_Location(39, LL_LocCat.PICKUP, "Musty Crypt"), - "Rusty Crypt: Vine": LL_Location(40, LL_LocCat.PICKUP, "Rusty Crypt"), - "Rusty Crypt: Boulders": LL_Location(41, LL_LocCat.PICKUP, "Rusty Crypt"), - "A Messy Cabin": LL_Location(42, LL_LocCat.PICKUP, "A Messy Cabin"), - "Under The Lake: Behind Lightning Rod": LL_Location(43, LL_LocCat.PICKUP, "Under The Lake"), - "Under The Lake: Bat Door": LL_Location(44, LL_LocCat.PICKUP, "Under The Lake"), - "Deeper Lake: Corner": LL_Location(45, LL_LocCat.PICKUP, "Deeper Under The Lake"), - "Deeper Lake: Rhombus": LL_Location(46, LL_LocCat.PICKUP, "Deeper Under The Lake"), - "Frankenjulie's Reward": LL_Location(47, LL_LocCat.PICKUP, "Frankenjulie's Laboratory"), - "Tower: Barracks": LL_Location(48, LL_LocCat.PICKUP, "Haunted Tower"), - "Tower F2: Skull Puzzle": LL_Location(49, LL_LocCat.PICKUP, "Haunted Tower Floor 2"), - "PolterGuy's Reward": LL_Location(50, LL_LocCat.PICKUP, "Haunted Tower Roof"), - "Tower Basement: DoorDoorDoorDoorDoorDoor": LL_Location(51, LL_LocCat.PICKUP, "Haunted Basement"), - "Abandoned Mine: Shaft": LL_Location(52, LL_LocCat.PICKUP, "Abandoned Mines"), - "Shrine of Bombulus: Prize": LL_Location(53, LL_LocCat.PICKUP, "The Shrine Of Bombulus"), - "Gloomy Cavern: Lockpick": LL_Location(54, LL_LocCat.PICKUP, "A Gloomy Cavern"), - "Happy Stick: Hidden": LL_Location(55, LL_LocCat.PICKUP, "Happy Stick Woods"), - "Happy Stick: Reward": LL_Location(56, LL_LocCat.PICKUP, "Happy Stick Woods"), - "Wolf Den: Top Left": LL_Location(57, LL_LocCat.PICKUP, "The Wolf Den"), - "Wolf Den: Pumpkin Door": LL_Location(58, LL_LocCat.PICKUP, "The Wolf Den"), - "Wolf Den: Vine": LL_Location(59, LL_LocCat.PICKUP, "The Wolf Den"), - "Upper Cavern: Three Gold Skeletons": LL_Location(60, LL_LocCat.PICKUP, "Upper Creepy Caverns"), - "Under The Ravine: Left Vine": LL_Location(61, LL_LocCat.PICKUP, "Under The Ravine"), - "Under The Ravine: Right Vine": LL_Location(62, LL_LocCat.PICKUP, "Under The Ravine"), - "Creepy Caverns M: Pharaoh Bat Door": LL_Location(63, LL_LocCat.PICKUP, "Creepy Caverns Middle"), - "Creepy Caverns R: Top Pharaohs": LL_Location(64, LL_LocCat.PICKUP, "Creepy Caverns Right"), - "Creepy Caverns M: Gargoyles": LL_Location(65, LL_LocCat.PICKUP, "Creepy Caverns Middle"), - "Castle Vampy: Top Room": LL_Location(66, LL_LocCat.PICKUP, "Castle Vampy"), - "Castle Vampy: Maze": LL_Location(67, LL_LocCat.PICKUP, "Castle Vampy"), - "Castle Vampy: Gauntlet": LL_Location(68, LL_LocCat.PICKUP, "Castle Vampy"), - "Castle Vampy: Bat Closet": LL_Location(69, LL_LocCat.PICKUP, "Castle Vampy"), - "Castle Vampy II: Candle Room": LL_Location(70, LL_LocCat.PICKUP, "Castle Vampy II Main"), - "Castle Vampy II: Bloodsucker Room": LL_Location(71, LL_LocCat.PICKUP, "Castle Vampy II Main"), - "Castle Vampy II: Vampire Lord": LL_Location(72, LL_LocCat.PICKUP, "Castle Vampy II Main"), - "Castle Vampy II: Bat Room": LL_Location(73, LL_LocCat.PICKUP, "Castle Vampy II Main"), - "Cabin in the Woods: Gold Skull": LL_Location(74, LL_LocCat.PICKUP, "Cabin In The Woods"), - "Castle Vampy III: Center": LL_Location(75, LL_LocCat.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: Behind the Pews": LL_Location(76, LL_LocCat.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: AMBUSH!": LL_Location(77, LL_LocCat.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: Halloween": LL_Location(78, LL_LocCat.PICKUP, "Castle Vampy III Main"), - "Castle Vampy III: Bat room": LL_Location(79, LL_LocCat.PICKUP, "Castle Vampy III Main"), - "Castle Vampy IV: Right Path": LL_Location(80, LL_LocCat.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Left Path": LL_Location(81, LL_LocCat.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Ballroom Right": LL_Location(82, LL_LocCat.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Right Secret Wall": LL_Location(83, LL_LocCat.PICKUP, "Castle Vampy IV Main"), - "Castle Vampy IV: Ballroom Left": LL_Location(84, LL_LocCat.PICKUP, "Castle Vampy IV Main"), - "Roof NW: Gutsy the Elder": LL_Location(85, LL_LocCat.PICKUP, "Castle Vampy Roof NW"), - "Roof NE: Stoney the Elder": LL_Location(86, LL_LocCat.PICKUP, "Castle Vampy Roof NE"), - "Roof SW: Drippy the Elder": LL_Location(87, LL_LocCat.PICKUP, "Castle Vampy Roof SW"), - "Roof SE: Toasty the Elder": LL_Location(88, LL_LocCat.PICKUP, "Castle Vampy Roof SE"), - "Bonkula Item": LL_Location(89, LL_LocCat.PICKUP, "The Heart Of Terror"), - "Hidey-Hole: Bat Door": LL_Location(90, LL_LocCat.PICKUP, "A Hidey-Hole"), - "Hidey-Hole: Pebbles": LL_Location(91, LL_LocCat.PICKUP, "A Hidey-Hole"), - "Swampdog Lair: Entrance": LL_Location(92, LL_LocCat.PICKUP, "Swampdog Lair"), - "Swampdog Lair: End": LL_Location(93, LL_LocCat.PICKUP, "Swampdog Lair"), - "Q: Save Halloween Hill": LL_Location(94, LL_LocCat.QUEST, "The Evilizer"), - "Q: Tree Trimming": LL_Location(95, LL_LocCat.QUEST, "A Cabin Trees"), - "Q: Scaredy Cat": LL_Location(96, LL_LocCat.QUEST, "Halloween Hill"), - "Q: Sticky Shoes": LL_Location(97, LL_LocCat.QUEST, "Halloween Hill"), - "Q: Mushroom Hunt": LL_Location(98, LL_LocCat.QUEST, "The Witch's Cabin Front"), - "Q: Zombie Stomp": LL_Location(99, LL_LocCat.QUEST, "Zombiton"), - "Q: Smashing Pumpkins": LL_Location(100, LL_LocCat.QUEST, "Halloween Hill"), - "Q: Silver Bullet": LL_Location(101, LL_LocCat.QUEST, "Zombiton"), - "Q: Hairy Larry": LL_Location(102, LL_LocCat.QUEST, "A Cabin Larry"), - "Q: Ghostbusting": LL_Location(103, LL_LocCat.QUEST, "The Witch's Cabin Front"), - "Q: The Rescue": LL_Location(104, LL_LocCat.QUEST, "A Gloomy Cavern"), - "Q: The Collection": LL_Location(105, LL_LocCat.QUEST, "A Cabin Collector"), -} \ No newline at end of file diff --git a/worlds/loonyland/Data/region_data.py b/worlds/loonyland/Data/region_data.py deleted file mode 100644 index 948edce03b51..000000000000 --- a/worlds/loonyland/Data/region_data.py +++ /dev/null @@ -1,113 +0,0 @@ -from typing import Dict -from worlds.loonyland.Regions import LLRegion - -loonyland_region_table: Dict[str, LLRegion] = { - "Menu": LLRegion(False), - "Halloween Hill": LLRegion(True), - "Slurpy Swamp Mud": LLRegion(False, "Halloween Hill"), - "Slurpy Swamp Mud North Warp": LLRegion(False, "Halloween Hill"), - "Slurpy Swamp Mud East Warp": LLRegion(False, "Halloween Hill"), - "Zombiton": LLRegion(False, "Halloween Hill"), - "Rocky Cliffs": LLRegion(False, "Halloween Hill"), - "Vampy Land": LLRegion(False, "Halloween Hill"), - "A Cabin Trees": LLRegion(True, "A Cabin"), - "The Witch's Cabin": LLRegion(True), - "The Witch's Cabin Front": LLRegion(False, "The Witch's Cabin"), - "The Witch's Cabin Back": LLRegion(False, "The Witch's Cabin"), - "Bonita's Cabin": LLRegion(True), - "The Bog Pit": LLRegion(True), - "Underground Tunnel": LLRegion(True), - "Underground Tunnel Top": LLRegion(False, "Underground Tunnel"), - "Underground Tunnel Mud": LLRegion(False, "Underground Tunnel"), - "Underground Tunnel Zombie": LLRegion(False, "Underground Tunnel"), - "Swamp Gas Cavern": LLRegion(True), - "Swamp Gas Cavern Front": LLRegion(False, "Swamp Gas Cavern"), - "Swamp Gas Cavern Back": LLRegion(False, "Swamp Gas Cavern"), - "A Tiny Cabin": LLRegion(True), - "A Cabin Seer": LLRegion(True), - "Benny's Cocktails": LLRegion(True), - "Dusty Crypt": LLRegion(True), - "Dusty Crypt Entrance": LLRegion(False, "Dusty Crypt"), - "Musty Crypt": LLRegion(True), - "Musty Crypt Entrance": LLRegion(False, "Musty Crypt"), - "Rusty Crypt": LLRegion(True), - "Rusty Crypt Entrance": LLRegion(False, "Rusty Crypt"), - "A Messy Cabin": LLRegion(True), - "Under The Lake": LLRegion(True), - "Under The Lake Entrance": LLRegion(False, "Under The Lake"), - "Under The Lake Exit": LLRegion(False, "Under The Lake"), - "Deeper Under The Lake": LLRegion(True), - "Frankenjulie's Laboratory": LLRegion(True), - "Haunted Tower": LLRegion(True), - "Haunted Tower Floor 2": LLRegion(True), - "Haunted Tower Floor 3": LLRegion(True), - "Haunted Tower Roof": LLRegion(True), - "Haunted Basement": LLRegion(True), - "Haunted Basement Entrance": LLRegion(False, "Haunted Basement"), - "Abandoned Mines": LLRegion(True), - "Abandoned Mines Entrance": LLRegion(False, "Abandoned Mines"), - "The Shrine Of Bombulus": LLRegion(True), - "A Gloomy Cavern": LLRegion(True), - "A Gloomy Cavern Entrance": LLRegion(False, "A Gloomy Cavern"), - "Happy Stick Woods": LLRegion(True), - "The Wolf Den": LLRegion(True), - "The Wolf Den Entrance": LLRegion(False, "The Wolf Den"), - "The Wolf Den Exit": LLRegion(False, "The Wolf Den"), - "A Cabin Larry": LLRegion(True), - "Upper Creepy Caverns": LLRegion(True), - "Upper Creepy Caverns Left Warp": LLRegion(False, "Upper Creepy Caverns"), - "Upper Creepy Caverns Middle Warp": LLRegion(False, "Upper Creepy Caverns"), - "Upper Creepy Caverns Right Warp": LLRegion(False, "Upper Creepy Caverns"), - "Under The Ravine": LLRegion(True), - "Creepy Caverns Left": LLRegion(False, "Creepy Caverns"), - "Creepy Caverns Left Bottom Warp": LLRegion(False, "Creepy Caverns"), - "Creepy Caverns Left Top Warp": LLRegion(False, "Creepy Caverns"), - "Creepy Caverns Middle": LLRegion(False, "Creepy Caverns"), - "Creepy Caverns Middle Top Warp": LLRegion(False, "Creepy Caverns"), - "Creepy Caverns Middle Right Warp": LLRegion(False, "Creepy Caverns"), - "Creepy Caverns Right": LLRegion(False, "Creepy Caverns"), - "Creepy Caverns Right Left Warp": LLRegion(False, "Creepy Caverns"), - "Creepy Caverns Right Bottom Warp": LLRegion(False, "Creepy Caverns"), - "Castle Vampy": LLRegion(True), - "Castle Vampy Skull Jail": LLRegion(False, "Castle Vampy"), - "Castle Vampy II": LLRegion(True), - "Castle Vampy II Main": LLRegion(False, "Castle Vampy II"), - "Castle Vampy II NW": LLRegion(False, "Castle Vampy II"), - "Castle Vampy II NE": LLRegion(False, "Castle Vampy II"), - "Castle Vampy II SW": LLRegion(False, "Castle Vampy II"), - "Castle Vampy II SE": LLRegion(False, "Castle Vampy II"), - "Castle Vampy II Bat Jail": LLRegion(False, "Castle Vampy II"), - "Cabin In The Woods": LLRegion(True), - "Castle Vampy III": LLRegion(True), - "Castle Vampy III Main": LLRegion(False, "Castle Vampy III"), - "Castle Vampy III NW": LLRegion(False, "Castle Vampy III"), - "Castle Vampy III NE": LLRegion(False, "Castle Vampy III"), - "Castle Vampy III SW": LLRegion(False, "Castle Vampy III"), - "Castle Vampy III SE": LLRegion(False, "Castle Vampy III"), - "Castle Vampy III Pumpkin Jail": LLRegion(False, "Castle Vampy III"), - "Castle Vampy IV": LLRegion(True), - "Castle Vampy IV Main": LLRegion(False, "Castle Vampy IV"), - "Castle Vampy IV NW": LLRegion(False, "Castle Vampy IV"), - "Castle Vampy IV NE": LLRegion(False, "Castle Vampy IV"), - "Castle Vampy IV SW": LLRegion(False, "Castle Vampy IV"), - "Castle Vampy IV SE": LLRegion(False, "Castle Vampy IV"), - "A Cabin Collector": LLRegion(True), - "Castle Vampy Roof NE": LLRegion(True, "Castle Vampy Roof"), - "Castle Vampy Roof SE": LLRegion(True, "Castle Vampy Roof"), - "Castle Vampy Roof SW": LLRegion(True, "Castle Vampy Roof"), - "Castle Vampy Roof NW": LLRegion(True, "Castle Vampy Roof"), - "The Evilizer": LLRegion(True), - "The Heart Of Terror": LLRegion(True), - "The Heart Of Terror Entrance": LLRegion(False, "The Heart Of Terror"), - "The Heart Of Terror Exit": LLRegion(False, "The Heart Of Terror"), - "A Hidey-Hole": LLRegion(True), - "Empty Rooftop": LLRegion(True), - "Swampdog Lair": LLRegion(True), - "Swampdog Lair Entrance": LLRegion(False, "Swampdog Lair"), - "Larry's Lair": LLRegion(True), - "Bowling": LLRegion(False), - "Survival": LLRegion(False), - "Boss Bash": LLRegion(False), - "Loony Ball": LLRegion(False), - "Remix": LLRegion(False), -} \ No newline at end of file diff --git a/worlds/loonyland/Data/rules_data.py b/worlds/loonyland/Data/rules_data.py deleted file mode 100644 index 862c7fcd630a..000000000000 --- a/worlds/loonyland/Data/rules_data.py +++ /dev/null @@ -1,47 +0,0 @@ -from typing import Dict -from worlds.generic.Rules import CollectionRule -from worlds.loonyland.Rules import * -def set_rules(multiworld, world, player): - access_rules: Dict[str, CollectionRule] = { - "Swamp: Mud Path": lambda state: state.has("Boots", player), - "Swamp: Sapling Shrine": lambda state: state.has("Boots", player), - "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", player), - "Rocky Cliffs: Rock Corner": lambda state: have_bombs(state, player), - "Witch's Cabin: Bedroom": lambda state: have_light_source(state, player), - "Bog Pit: Top Door": lambda state: state.has("Skull Key", player), - "Tunnel: Swampdog Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - "Tunnel: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), - "Tunnel: Torch Island": lambda state: state.has("Boots", player), - "Swamp Gas: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), - "Swamp Gas: Bat Door": lambda state: state.has("Bat Key", player), - "Swamp Gas: Rock Prison": lambda state: have_bombs(state, player), - "Dusty Crypt: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, player), - "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", player), - "Under The Lake: Bat Door": lambda state: state.has("Bat Key", player), - "Tower: Barracks": lambda state: state.has("Ghost Potion", player), - "Tower F2: Skull Puzzle": lambda state: state.has("Ghost Potion", player), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), - "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - "Wolf Den: Vine": lambda state: state.has("Fertilizer", player), - "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", player), - "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", player), - "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), - "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), - "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), - "Swampdog Lair: Entrance": lambda state: state.has("Boots", player), - "Swampdog Lair: End": lambda state: state.has("Boots", player) and have_light_source(state, player) and state.has("Fertilizer", player), - "Q: Scaredy Cat": lambda state: state.has("Cat", player), - "Q: Mushroom Hunt": lambda state: state.has("Mushroom", player, 10), - "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), - "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), - "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, player) and state.has("Silver", player), - "Q: Hairy Larry": lambda state: have_light_source(state, player) and state.has("Silver Sling", player) and state.has("Boots", player), - "Q: Ghostbusting": lambda state: state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), - "Q: The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and can_enter_vampy(state, player), - } - for loc in multiworld.get_locations(player): - if loc.name in access_rules: - add_rule(loc, access_rules[loc.name]) \ No newline at end of file diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/Entrances.py index 13e04ce98ad7..909b28746d6c 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/Entrances.py @@ -1,7 +1,7 @@ import typing -from typing import NamedTuple, Dict, List +from typing import NamedTuple -from BaseClasses import Entrance, CollectionState, Region +from BaseClasses import Entrance from worlds.generic.Rules import CollectionRule diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/Items.py index 8e3e24f40e43..22a1dda9d108 100644 --- a/worlds/loonyland/Items.py +++ b/worlds/loonyland/Items.py @@ -1,6 +1,6 @@ -from typing import NamedTuple +from typing import NamedTuple, Callable -from BaseClasses import Item, ItemClassification +from BaseClasses import Item, ItemClassification, MultiWorld from enum import Enum class LoonylandItem(Item): @@ -22,3 +22,4 @@ class LL_Item(NamedTuple): category: LL_ItemCat classification: ItemClassification frequency: int = 1 + can_create: Callable[[MultiWorld, int], bool] = lambda multiworld, player: True diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/Locations.py index 5fcfeaa2b8f7..d52e484f61c7 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/Locations.py @@ -1,7 +1,7 @@ from enum import Enum -from typing import NamedTuple, Dict +from typing import NamedTuple, Callable -from BaseClasses import Location +from BaseClasses import Location, MultiWorld loonyland_base_id: int = 2876900 @@ -21,5 +21,6 @@ class LL_Location(NamedTuple): id: int category: LL_LocCat region: str + can_create: Callable[[MultiWorld, int], bool] = lambda multiworld, player: True diff --git a/worlds/loonyland/Options.py b/worlds/loonyland/Options.py index e375d23e8066..e04a70bac279 100644 --- a/worlds/loonyland/Options.py +++ b/worlds/loonyland/Options.py @@ -23,12 +23,12 @@ class Difficulty(Choice): option_challenge = 3 option_mad = 4 option_loony = 5 - default = 2 + default = 1 @dataclass class LoonylandOptions(PerGameCommonOptions): - win_condition: WinCondition + #win_condition: WinCondition difficulty: Difficulty death_link: DeathLink diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/Regions.py index 16b098a0995c..4c021ba7a3cd 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/Regions.py @@ -1,4 +1,4 @@ -from typing import NamedTuple, Dict, List +from typing import NamedTuple from BaseClasses import Region class LoonylandRegion(Region): game = "Loonyland" diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/Rules.py index 18d96da81198..faa27ce38f88 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/Rules.py @@ -1,83 +1,44 @@ -from typing import Dict from BaseClasses import CollectionState -from worlds.generic.Rules import add_item_rule, add_rule, CollectionRule - def have_light_source(state: CollectionState, player: int) -> bool: - return state.has("Lantern", player) or (state.has("Stick", player) and state.has("Boots", player)) + return state.has("Lantern", player) or (state.has("Stick", player) and state.has("Boots", player) and state.can_reach_region("Swamp Gas Cavern", player)) + # 20/20 when badges added def have_bombs(state: CollectionState, player: int) -> bool: return state.has("Bombs", player) # or werewolf badge when badges are added - -def have_all_orbs(state: CollectionState, player: int) -> bool: - return state.has("Orb", player, 4) - - -def have_all_bats(state: CollectionState, player: int) -> bool: - return state.has("Bat Statue", player, 4) - - -def have_all_vamps(state: CollectionState, player: int) -> bool: - return state.has("Vamp Statue", player, 8) - - def have_special_weapon_damage(state: CollectionState, player: int) -> bool: return ( state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) ) +#needed for gutsy def have_special_weapon_bullet(state: CollectionState, player: int) -> bool: - return ( - state.has_any(("Bombs", "Ice Spear", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) - ) - - -# return lambda state: True slingshot counts + return True + #always true as the default character, eventually will be fancier when other starting characters are an option + #return ( + # state.has_any(("Bombs", "Ice Spear", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) + #) def have_special_weapon_range_damage(state: CollectionState, player: int) -> bool: - return ( - state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang"), player) - ) - # return lambda state: True slingshot counts - + return True + # always true as the default character + #return ( + # state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang"), player) + #) def have_special_weapon_through_walls(state: CollectionState, player: int) -> bool: return ( state.has_any(("Bombs", "Shock Wand", "Whoopee"), player) - # state.has("Hot Pants") + # state.has("Hot Pants") technically possible, but only on diagonals ) - def can_cleanse_crypts(state: CollectionState, player: int) -> bool: - return (have_light_source(state, player) and can_enter_zombiton(state, player) and have_special_weapon_range_damage( - state, player)) - - -# these will get removed in favor of region access reqs eventually -def can_enter_zombiton(state: CollectionState, player: int) -> bool: - return state.has("Boots", player) - - -def can_enter_rocky_cliffs(state: CollectionState, player: int) -> bool: - return state.has("Big Gem", player) - - -def can_enter_vampy(state: CollectionState, player: int) -> bool: - return can_enter_rocky_cliffs(state, player) and have_light_source(state, player) - - -def can_enter_vampy_ii(state: CollectionState, player: int) -> bool: - return can_enter_vampy(state, player) and state.has("Skull Key", player) - - -def can_enter_vampy_iii(state: CollectionState, player: int) -> bool: - return can_enter_vampy_ii(state, player) and state.has("Bat Key", player) - - -def can_enter_vampy_iv(state: CollectionState, player: int) -> bool: - return can_enter_vampy_iii(state, player) and state.has("Pumpkin Key", player) \ No newline at end of file + return (have_light_source(state, player) and have_special_weapon_range_damage(state, player) and + state.can_reach_region("Musty Crypt", player) and + state.can_reach_region("Dusty Crypt", player) and + state.can_reach_region("Rusty Crypt", player) ) \ No newline at end of file diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 339dbca64bde..4160ab3546aa 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -1,24 +1,17 @@ -from .Data.entrance_data import set_entrances -from .Data.location_data import loonyland_location_table -from .Data.region_data import loonyland_region_table - loonyland_base_id: int = 2876900 -from typing import List, Dict, Any - -from BaseClasses import Region, Tutorial, ItemClassification +from BaseClasses import Region, Tutorial, ItemClassification, Location from worlds.AutoWorld import WebWorld, World -from .Data.item_data import loony_item_table from .Items import LoonylandItem -from .Locations import LoonylandLocation, LL_Location # , locked_locations +from .Locations import LoonylandLocation, LL_Location from .Options import LoonylandOptions from .Entrances import LoonylandEntrance -from .Data.rules_data import set_rules +from .Data.game_data import * class LoonylandWebWorld(WebWorld): - theme = "partyTime" + theme = "dirt" setup_en = Tutorial( tutorial_name="Start Guide", @@ -48,46 +41,26 @@ def create_item(self, name: str) -> LoonylandItem: def create_items(self) -> None: item_pool: List[LoonylandItem] = [] for name, item in loony_item_table.items(): - if item.id: # and item.can_create(self): + if item.id and item.can_create(self.multiworld, self.player): for i in range(item.frequency): item_pool.append(self.create_item(name)) self.multiworld.itempool += item_pool def create_event(self, event: str) -> LoonylandItem: - # while we are at it, we can also add a helper to create events return LoonylandItem(event, ItemClassification.progression, None, self.player) def create_regions(self) -> None: - # Create regions. for region_name in loonyland_region_table: region = Region(region_name, self.player, self.multiworld) self.multiworld.regions.append(region) - # connect regions - - # Create locations. - for region_name in loonyland_region_table: - region = self.get_region(region_name) - region.add_locations({ - location_name: location_data.id + loonyland_base_id for location_name, location_data in - loonyland_location_table.items() - if location_data.region == region_name # and location_data.can_create(self) - }, LoonylandLocation) - # region.add_exits() - set_entrances(self.multiworld, self, self.player) - - # Place locked locations. - # for location_name, location_data in locked_locations.items(): - # Ignore locations we never created. - # if not location_data.can_create(self): - # continue - - # locked_item = self.create_item(location_data_table[location_name].locked_item) - # self.get_location(location_name).place_locked_item(locked_item) - - # Set priority location for the Big Red Button! - # self.options.priority_locations.value.add("The Big Red Button") + for loc_name, loc_data in loonyland_location_table.items(): + if not loc_data.can_create(self.multiworld, self.player): + continue + region = self.multiworld.get_region(loc_data.region, self.player) + new_loc = LoonylandLocation(self.player, loc_name, loc_data.id, region) + region.locations.append(new_loc) def get_filler_item_name(self) -> str: return "A Cool Filler Item (No Satisfaction Guaranteed)" @@ -100,7 +73,10 @@ def set_rules(self): final_loc.place_locked_item(self.create_event("Victory")) self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) + #location rules set_rules(self.multiworld, self, self.player) + #entrance rules + set_entrance_rules(self.multiworld, self, self.player) def fill_slot_data(self): return { diff --git a/worlds/loonyland/docs/en_Loonyland.md b/worlds/loonyland/docs/en_Loonyland.md index be62ffe586f6..145caf5eb90a 100644 --- a/worlds/loonyland/docs/en_Loonyland.md +++ b/worlds/loonyland/docs/en_Loonyland.md @@ -1,27 +1,43 @@ -# Loonyland +# Loonyland: Halloween Hill ## Where is the options page? +[Here](../player-options) ## What does randomization do to this game? +Currently it randomizes all of the physical items placed in the world and some of the quest rewards. -## What is the goal of lOONYLAND when randomized? +Adding in badges, monster dolls, other quests, other game modes, etc is planned +## What is the goal of LOONYLAND when randomized? + +Beating the evilizer!! +That means getting to the top of castle vampy with the 8 vampire statues, so you can open the portal to the roof. + ## Which items can be in another player's world? +All inventory items, plus the 100 gem reward for saving zombiton ## What is considered a location check in Loonyland? +Picking up an item found in a game map, as well as completing the following quests: +Tree Trimming, Scaredy Cat, Sticky Shoes, Mushroom Hunt, Zombie Stomp, Smashing Pumpkins, Silver Bullet, Hairy Larry, Ghostbusting, The Rescue, The Collection ## Why isn't my item where the spoiler says it should be? +Uh oh ## What does another world's item look like in Loonyland? -It looks like the Archipelago logo. + +Its the archipelago logo, rendered as a cluster of colored gems ## When the player receives an item, what happens? +A message pops up in the bottom left informing them of the item and who sent it. ## What are recommended options to tweak for beginners to the rando? + +When badges are added, start with them off +Start on Normal difficulty, and move up to Hard when you want a challenge \ No newline at end of file diff --git a/worlds/loonyland/docs/setup_en.md b/worlds/loonyland/docs/setup_en.md index 05c6c7ab8d4c..49d38f7ad673 100644 --- a/worlds/loonyland/docs/setup_en.md +++ b/worlds/loonyland/docs/setup_en.md @@ -1,12 +1,23 @@ # Setup Guide for Loonyland: Halloween Hill -## Important - ## Required Software -https://github.com/AutomaticFrenzy/HamSandwich +- [Loonyland AP World](https://github.com/AutomaticFrenzy/Archipelago/releases) +- [Loonyland Client](https://github.com/AutomaticFrenzy/HamSandwich/releases) + +## Optional Software + +- [Loonyland AP pack for Poptracker](https://github.com/AutomaticFrenzy/loonyland_archipelago_tracker/releases/tag/v1.01) + +## Joining a Multiworld Game + +1. Launch Loonyland +2. Enter the address, slot name, and password +3. Press "Connect" + +## Archipelago Text Client + +Having the text client open is recommend to see a log of what has been sent. -## Configuring your YAML file -### What is a YAML file and why do I need one? \ No newline at end of file From d97ef28b39fb2283ed86fcc8a96f340f62866461 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Fri, 20 Dec 2024 15:38:22 -0500 Subject: [PATCH 34/58] add base id to location --- worlds/loonyland/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 4160ab3546aa..a955e6d67195 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -59,7 +59,7 @@ def create_regions(self) -> None: if not loc_data.can_create(self.multiworld, self.player): continue region = self.multiworld.get_region(loc_data.region, self.player) - new_loc = LoonylandLocation(self.player, loc_name, loc_data.id, region) + new_loc = LoonylandLocation(self.player, loc_name, loc_data.id + loonyland_base_id, region) region.locations.append(new_loc) def get_filler_item_name(self) -> str: From 03a470ff09134d99a8e1c2f72597f655bf3b1f91 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 21 Dec 2024 13:38:47 -0500 Subject: [PATCH 35/58] Renaming, prettifying, etc Handle 39 badges and all special weapons rules --- worlds/loonyland/Data/game_data.py | 1052 +++++++++++------ worlds/loonyland/__init__.py | 40 +- .../loonyland/{Entrances.py => entrances.py} | 6 +- worlds/loonyland/{Items.py => items.py} | 12 +- .../loonyland/{Locations.py => locations.py} | 10 +- worlds/loonyland/{Options.py => options.py} | 2 +- worlds/loonyland/{Regions.py => regions.py} | 3 + worlds/loonyland/ruff.toml | 9 + worlds/loonyland/{Rules.py => rules.py} | 16 +- 9 files changed, 755 insertions(+), 395 deletions(-) rename worlds/loonyland/{Entrances.py => entrances.py} (77%) rename worlds/loonyland/{Items.py => items.py} (75%) rename worlds/loonyland/{Locations.py => locations.py} (66%) rename worlds/loonyland/{Options.py => options.py} (92%) rename worlds/loonyland/{Regions.py => regions.py} (98%) create mode 100644 worlds/loonyland/ruff.toml rename worlds/loonyland/{Rules.py => rules.py} (75%) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index 8f1a8ed81c02..86b095729a43 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -1,19 +1,27 @@ -#autogenerated from Hamsandwich/tools/archipelago_data_scripts -from typing import Dict, List -from BaseClasses import ItemClassification as IC +# autogenerated from Hamsandwich/tools/archipelago_data_scripts +from BaseClasses import ItemClassification from worlds.generic.Rules import CollectionRule, add_rule -from worlds.loonyland import loonyland_base_id as ll_base_id, LL_Location -from worlds.loonyland.Entrances import LL_Entrance -from worlds.loonyland.Items import LL_Item, LL_ItemCat -from worlds.loonyland.Locations import LL_LocCat -from worlds.loonyland.Regions import LLRegion -from worlds.loonyland.Rules import * +from worlds.loonyland.entrances import LLEntrance +from worlds.loonyland.items import LLItem, LLItemCat +from worlds.loonyland.locations import LLLocation, LLLocCat +from worlds.loonyland.regions import LLRegion +from worlds.loonyland.rules import ( + can_cleanse_crypts, + have_39_badges, + have_all_weapons, + have_bombs, + have_light_source, + have_special_weapon_bullet, + have_special_weapon_damage, + hundred_percent, +) +ll_base_id: int = 2876900 VAR_HEART = 0 VAR_LIGHTNING = 20 VAR_ARROW = 30 VAR_PANTS = 40 -VAR_QUESTASSIGN = 50 +VAR_QUESTASSIGN = 50 VAR_QUESTDONE = 70 VAR_MUSHROOM = 90 VAR_MYSORB = 100 @@ -216,41 +224,162 @@ ITM_SILVERSLING = 135 ITM_STICK = 136 ITM_ARCHIPELAGO = 137 -loony_item_table: Dict[str, LL_Item] = { - "Heart" : LL_Item(ll_base_id + VAR_HEART, LL_ItemCat.ITEM, IC.useful, 20), - "Lightning" : LL_Item(ll_base_id + VAR_LIGHTNING, LL_ItemCat.ITEM, IC.useful, 10), - "Arrow" : LL_Item(ll_base_id + VAR_ARROW, LL_ItemCat.ITEM, IC.useful, 10), - "Pants" : LL_Item(ll_base_id + VAR_PANTS, LL_ItemCat.ITEM, IC.useful, 10), - "Mushroom" : LL_Item(ll_base_id + VAR_MUSHROOM, LL_ItemCat.ITEM, IC.progression, 10), - "Orb" : LL_Item(ll_base_id + VAR_MYSORB, LL_ItemCat.ITEM, IC.progression, 4), - "Bombs" : LL_Item(ll_base_id + VAR_WBOMBS, LL_ItemCat.ITEM, IC.progression), - "Shock Wand" : LL_Item(ll_base_id + VAR_WLIGHTNING, LL_ItemCat.ITEM, IC.progression), - "Ice Spear" : LL_Item(ll_base_id + VAR_WICE, LL_ItemCat.ITEM, IC.progression), - "Cactus" : LL_Item(ll_base_id + VAR_WCACTUS, LL_ItemCat.ITEM, IC.progression), - "Boomerang" : LL_Item(ll_base_id + VAR_WBOOMERANG, LL_ItemCat.ITEM, IC.progression), - "Whoopee" : LL_Item(ll_base_id + VAR_WWHOOPEE, LL_ItemCat.ITEM, IC.progression), - "Hot Pants" : LL_Item(ll_base_id + VAR_WHOTPANTS, LL_ItemCat.ITEM, IC.progression), - "Skull Key" : LL_Item(ll_base_id + VAR_SKULLKEY, LL_ItemCat.ITEM, IC.progression), - "Bat Key" : LL_Item(ll_base_id + VAR_BATKEY, LL_ItemCat.ITEM, IC.progression), - "Pumpkin Key" : LL_Item(ll_base_id + VAR_PUMPKINKEY, LL_ItemCat.ITEM, IC.progression), - "Boots" : LL_Item(ll_base_id + VAR_BOOTS, LL_ItemCat.ITEM, IC.progression), - "Stick" : LL_Item(ll_base_id + VAR_STICK, LL_ItemCat.ITEM, IC.progression), - "Fertilizer" : LL_Item(ll_base_id + VAR_FERTILIZER, LL_ItemCat.ITEM, IC.progression), - "Silver" : LL_Item(ll_base_id + VAR_SILVER, LL_ItemCat.ITEM, IC.progression), - "Doom Daisy" : LL_Item(ll_base_id + VAR_DAISY, LL_ItemCat.ITEM, IC.progression), - "Ghost Potion" : LL_Item(ll_base_id + VAR_POTION, LL_ItemCat.ITEM, IC.progression), - "Vampire Bust" : LL_Item(ll_base_id + VAR_VAMPBUST, LL_ItemCat.ITEM, IC.progression, 8), - "Cat" : LL_Item(ll_base_id + VAR_CAT, LL_ItemCat.ITEM, IC.progression), - "Big Gem" : LL_Item(ll_base_id + VAR_GEM, LL_ItemCat.ITEM, IC.progression, 6), - "100 Gems" : LL_Item(ll_base_id + VAR_ZOMBIEGEM, LL_ItemCat.ITEM, IC.filler), - "Triple Fire Gem" : LL_Item(ll_base_id + VAR_TRIPLEFIRE, LL_ItemCat.ITEM, IC.useful), - "Happy Stick" : LL_Item(ll_base_id + VAR_TALISMAN, LL_ItemCat.ITEM, IC.progression), - "Bat Statue" : LL_Item(ll_base_id + VAR_BATSTATUE, LL_ItemCat.ITEM, IC.progression, 4), - "Lantern" : LL_Item(ll_base_id + VAR_LANTERN, LL_ItemCat.ITEM, IC.progression), - "Reflect Gem" : LL_Item(ll_base_id + VAR_REFLECT, LL_ItemCat.ITEM, IC.useful), - "Silver Sling" : LL_Item(ll_base_id + VAR_SILVERSLING, LL_ItemCat.ITEM, IC.progression), +BADGE_EVILIZER = 0 +BADGE_BOWLING = 1 +BADGE_GRAVES = 2 +BADGE_GEMS = 3 +BADGE_MONSTERPTS = 4 +BADGE_MONSTERPTS2 = 5 +BADGE_POLTERGUY = 6 +BADGE_DARKNESS = 7 +BADGE_BESTRANK = 8 +BADGE_LOONYBALL = 9 +BADGE_BOSSBASH = 10 +BADGE_BONKULA = 11 +BADGE_SNEAK = 12 +BADGE_WITCH = 13 +BADGE_WOLFDEN = 14 +BADGE_ANNOY = 15 +BADGE_RESCUE = 16 +BADGE_WINGAME = 17 +BADGE_COMBO = 18 +BADGE_ROCKS = 19 +BADGE_HIDDEN = 20 +BADGE_TERRORSRV = 21 +BADGE_KILLALL = 22 +BADGE_HUNDREDPCT = 23 +BADGE_SURVIVAL = 24 +BADGE_LARRY = 25 +BADGE_TERROR = 26 +BADGE_FRANKENJ = 27 +BADGE_SURVCOMBO = 28 +BADGE_CATTAILS = 29 +BADGE_REMIX = 30 +BADGE_WITCHCRAFT = 31 +BADGE_THIEF = 32 +BADGE_SURV100 = 33 +BADGE_RIOT = 34 +BADGE_SWAMPDOG = 35 +BADGE_SCORE = 36 +BADGE_BRAWL = 37 +BADGE_HIDDEN2 = 38 +BADGE_MASTER = 39 +CH_LIGHT = 0 +CH_DISCO = 1 +CH_TERROR = 2 +CH_SURPRISE = 3 +CH_QUICK = 4 +CH_GEMS = 5 +CH_SIDEKICK = 6 +CH_HOMING = 7 +CH_MAXPOWER = 8 +CH_VINTAGE = 9 +CH_BONKULA = 10 +CH_TOAD = 11 +CH_CRYSTAL = 12 +CH_RADAR = 13 +CH_HEAVYHIT = 14 +CH_RAPIDFIRE = 15 +CH_DEATH = 16 +CH_ALLACCESS = 17 +CH_SWAMPDOG = 18 +CH_HARDCORE = 19 +CH_SAVEANY = 20 +CH_GUIDED = 21 +CH_SLOMO = 22 +CH_CORPSE = 23 +CH_FROGWPN = 24 +CH_WITCH = 25 +CH_WEREWOLF = 26 +CH_RESPAWN = 27 +CH_KICKCAT = 28 +CH_RNDSURVIVAL = 29 +CH_SUMMON = 30 +CH_THIEF = 31 +CH_WALLWALK = 32 +CH_SUPERSURV = 33 +CH_BEND = 34 +CH_STINKY = 35 +CH_ULTRAWEAPON = 36 +CH_THORNS = 37 +CH_REGEN = 38 +CH_NOFARLEY = 39 +AP_BADGEMOD = 1000 +loony_item_table: dict[str, LLItem] = { + "Heart": LLItem(ll_base_id + VAR_HEART, LLItemCat.ITEM, ItemClassification.useful, 20), + "Lightning": LLItem(ll_base_id + VAR_LIGHTNING, LLItemCat.ITEM, ItemClassification.useful, 10), + "Arrow": LLItem(ll_base_id + VAR_ARROW, LLItemCat.ITEM, ItemClassification.useful, 10), + "Pants": LLItem(ll_base_id + VAR_PANTS, LLItemCat.ITEM, ItemClassification.useful, 10), + "Mushroom": LLItem(ll_base_id + VAR_MUSHROOM, LLItemCat.ITEM, ItemClassification.progression, 10), + "Orb": LLItem(ll_base_id + VAR_MYSORB, LLItemCat.ITEM, ItemClassification.progression, 4), + "Bombs": LLItem(ll_base_id + VAR_WBOMBS, LLItemCat.ITEM, ItemClassification.progression), + "Shock Wand": LLItem(ll_base_id + VAR_WLIGHTNING, LLItemCat.ITEM, ItemClassification.progression), + "Ice Spear": LLItem(ll_base_id + VAR_WICE, LLItemCat.ITEM, ItemClassification.progression), + "Cactus": LLItem(ll_base_id + VAR_WCACTUS, LLItemCat.ITEM, ItemClassification.progression), + "Boomerang": LLItem(ll_base_id + VAR_WBOOMERANG, LLItemCat.ITEM, ItemClassification.progression), + "Whoopee": LLItem(ll_base_id + VAR_WWHOOPEE, LLItemCat.ITEM, ItemClassification.progression), + "Hot Pants": LLItem(ll_base_id + VAR_WHOTPANTS, LLItemCat.ITEM, ItemClassification.progression), + "Skull Key": LLItem(ll_base_id + VAR_SKULLKEY, LLItemCat.ITEM, ItemClassification.progression), + "Bat Key": LLItem(ll_base_id + VAR_BATKEY, LLItemCat.ITEM, ItemClassification.progression), + "Pumpkin Key": LLItem(ll_base_id + VAR_PUMPKINKEY, LLItemCat.ITEM, ItemClassification.progression), + "Boots": LLItem(ll_base_id + VAR_BOOTS, LLItemCat.ITEM, ItemClassification.progression), + "Stick": LLItem(ll_base_id + VAR_STICK, LLItemCat.ITEM, ItemClassification.progression), + "Fertilizer": LLItem(ll_base_id + VAR_FERTILIZER, LLItemCat.ITEM, ItemClassification.progression), + "Silver": LLItem(ll_base_id + VAR_SILVER, LLItemCat.ITEM, ItemClassification.progression), + "Doom Daisy": LLItem(ll_base_id + VAR_DAISY, LLItemCat.ITEM, ItemClassification.progression), + "Ghost Potion": LLItem(ll_base_id + VAR_POTION, LLItemCat.ITEM, ItemClassification.progression), + "Vampire Bust": LLItem(ll_base_id + VAR_VAMPBUST, LLItemCat.ITEM, ItemClassification.progression, 8), + "Cat": LLItem(ll_base_id + VAR_CAT, LLItemCat.ITEM, ItemClassification.progression), + "Big Gem": LLItem(ll_base_id + VAR_GEM, LLItemCat.ITEM, ItemClassification.progression, 6), + "100 Gems": LLItem(ll_base_id + VAR_ZOMBIEGEM, LLItemCat.ITEM, ItemClassification.filler), + "Triple Fire Gem": LLItem(ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful), + "Happy Stick": LLItem(ll_base_id + VAR_TALISMAN, LLItemCat.ITEM, ItemClassification.progression), + "Bat Statue": LLItem(ll_base_id + VAR_BATSTATUE, LLItemCat.ITEM, ItemClassification.progression, 4), + "Lantern": LLItem(ll_base_id + VAR_LANTERN, LLItemCat.ITEM, ItemClassification.progression), + "Reflect Gem": LLItem(ll_base_id + VAR_REFLECT, LLItemCat.ITEM, ItemClassification.useful), + "Silver Sling": LLItem(ll_base_id + VAR_SILVERSLING, LLItemCat.ITEM, ItemClassification.progression), + "20/20 Vision": LLItem(ll_base_id + CH_LIGHT, LLItemCat.CHEAT, ItemClassification.progression), + "Disco Mode": LLItem(ll_base_id + CH_DISCO, LLItemCat.CHEAT, ItemClassification.filler), + "Terror Mode": LLItem(ll_base_id + CH_TERROR, LLItemCat.CHEAT, ItemClassification.progression), + "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE, LLItemCat.CHEAT, ItemClassification.progression), + "Quick Mode": LLItem(ll_base_id + CH_QUICK, LLItemCat.CHEAT, ItemClassification.useful), + "Infinite Gems": LLItem(ll_base_id + CH_GEMS, LLItemCat.CHEAT, ItemClassification.useful), + "Sidekick": LLItem(ll_base_id + CH_SIDEKICK, LLItemCat.CHEAT, ItemClassification.filler), + "Homing Shots": LLItem(ll_base_id + CH_HOMING, LLItemCat.CHEAT, ItemClassification.useful), + "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER, LLItemCat.CHEAT, ItemClassification.filler), + "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE, LLItemCat.CHEAT, ItemClassification.useful), + "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA, LLItemCat.CHEAT, ItemClassification.useful), + "Play As Toad": LLItem(ll_base_id + CH_TOAD, LLItemCat.CHEAT, ItemClassification.useful), + "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL, LLItemCat.CHEAT, ItemClassification.useful), + "Radar": LLItem(ll_base_id + CH_RADAR, LLItemCat.CHEAT, ItemClassification.useful), + "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT, LLItemCat.CHEAT, ItemClassification.useful), + "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE, LLItemCat.CHEAT, ItemClassification.filler), + "Touch Of Death": LLItem(ll_base_id + CH_DEATH, LLItemCat.CHEAT, ItemClassification.progression), + "All Access Pass": LLItem(ll_base_id + CH_ALLACCESS, LLItemCat.CHEAT, ItemClassification.filler), + "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG, LLItemCat.CHEAT, ItemClassification.progression), + "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE, LLItemCat.CHEAT, ItemClassification.filler), + "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY, LLItemCat.CHEAT, ItemClassification.useful), + "Guided Shots": LLItem(ll_base_id + CH_GUIDED, LLItemCat.CHEAT, ItemClassification.useful), + "Slo-Mo": LLItem(ll_base_id + CH_SLOMO, LLItemCat.CHEAT, ItemClassification.useful), + "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE, LLItemCat.CHEAT, ItemClassification.useful), + "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN, LLItemCat.CHEAT, ItemClassification.filler), + "Play As Witch": LLItem(ll_base_id + CH_WITCH, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF, LLItemCat.CHEAT, ItemClassification.useful), + "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN, LLItemCat.CHEAT, ItemClassification.filler), + "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT, LLItemCat.CHEAT, ItemClassification.filler), + "Infinite Survival": LLItem(ll_base_id + CH_RNDSURVIVAL, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Summony": LLItem(ll_base_id + CH_SUMMON, LLItemCat.CHEAT, ItemClassification.useful), + "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF, LLItemCat.CHEAT, ItemClassification.progression), + "Molecular Dispersion": LLItem(ll_base_id + CH_WALLWALK, LLItemCat.CHEAT, ItemClassification.progression), + "Guaranteed Survival": LLItem(ll_base_id + CH_SUPERSURV, LLItemCat.CHEAT, ItemClassification.useful), + "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND, LLItemCat.CHEAT, ItemClassification.useful), + "Stinky Farley": LLItem(ll_base_id + CH_STINKY, LLItemCat.CHEAT, ItemClassification.useful), + "Ultra Weapons Are Go!": LLItem(ll_base_id + CH_ULTRAWEAPON, LLItemCat.CHEAT, ItemClassification.useful), + "Thorns Aura": LLItem(ll_base_id + CH_THORNS, LLItemCat.CHEAT, ItemClassification.useful), + "Monster Regeneration": LLItem(ll_base_id + CH_REGEN, LLItemCat.CHEAT, ItemClassification.filler), + "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY, LLItemCat.CHEAT, ItemClassification.filler), } -loonyland_region_table: Dict[str, LLRegion] = { +loonyland_region_table: dict[str, LLRegion] = { "Menu": LLRegion(False), "Halloween Hill": LLRegion(True), "Slurpy Swamp Mud": LLRegion(False, "Halloween Hill"), @@ -360,116 +489,158 @@ "Loony Ball": LLRegion(False), "Remix": LLRegion(False), } -loonyland_location_table: Dict[str, LL_Location] = { - "Swamp: Mud Path": LL_Location(0, LL_LocCat.PICKUP, "Slurpy Swamp Mud"), - "Swamp: Bog Beast": LL_Location(1, LL_LocCat.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Upper Ledge": LL_Location(2, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Swamp: Sapling Shrine": LL_Location(3, LL_LocCat.PICKUP, "Slurpy Swamp Mud"), - "Terror Glade: South Trees": LL_Location(4, LL_LocCat.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Vine": LL_Location(5, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Grand Pharoh": LL_Location(6, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Rock Corner": LL_Location(7, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Swamp: Outside Luniton": LL_Location(8, LL_LocCat.PICKUP, "Halloween Hill"), - "Swamp: East 1": LL_Location(9, LL_LocCat.PICKUP, "Halloween Hill"), - "Swamp: Top Left dry": LL_Location(10, LL_LocCat.PICKUP, "Halloween Hill"), - "Swamp: East 2": LL_Location(11, LL_LocCat.PICKUP, "Halloween Hill"), - "Woods: Above Castle": LL_Location(12, LL_LocCat.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Entrance Ledge": LL_Location(13, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Peak": LL_Location(14, LL_LocCat.PICKUP, "Rocky Cliffs"), - "Woods: SW of Cabin": LL_Location(15, LL_LocCat.PICKUP, "Halloween Hill"), - "Witch's Cabin: Bedroom": LL_Location(16, LL_LocCat.PICKUP, "The Witch's Cabin"), - "Witch's Cabin: Backroom": LL_Location(17, LL_LocCat.PICKUP, "The Witch's Cabin Back"), - "Bonita's Cabin: Barrel Maze": LL_Location(18, LL_LocCat.PICKUP, "Bonita's Cabin"), - "Bog Pit: Top Door": LL_Location(19, LL_LocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Posts Room": LL_Location(20, LL_LocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Drippy Window": LL_Location(21, LL_LocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Green room": LL_Location(22, LL_LocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Arena": LL_Location(23, LL_LocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Sw Switch": LL_Location(24, LL_LocCat.PICKUP, "The Bog Pit"), - "Tunnel: Swampdog Pumpkin Door": LL_Location(25, LL_LocCat.PICKUP, "Underground Tunnel"), - "Tunnel: Scratch Wall": LL_Location(26, LL_LocCat.PICKUP, "Underground Tunnel"), - "Tunnel: Narrow Passage": LL_Location(27, LL_LocCat.PICKUP, "Underground Tunnel"), - "Tunnel: Top Frogs": LL_Location(28, LL_LocCat.PICKUP, "Underground Tunnel"), - "Tunnel: Torch Island": LL_Location(29, LL_LocCat.PICKUP, "Underground Tunnel Mud"), - "Tunnel: Small Room": LL_Location(30, LL_LocCat.PICKUP, "Underground Tunnel"), - "Swamp Gas: Scratch Wall": LL_Location(31, LL_LocCat.PICKUP, "Swamp Gas Cavern"), - "Swamp Gas: Bat Door": LL_Location(32, LL_LocCat.PICKUP, "Swamp Gas Cavern"), - "Swamp Gas: Stair room": LL_Location(33, LL_LocCat.PICKUP, "Swamp Gas Cavern Back"), - "Swamp Gas: Rock Prison": LL_Location(34, LL_LocCat.PICKUP, "Swamp Gas Cavern"), - "A Tiny Cabin": LL_Location(35, LL_LocCat.PICKUP, "A Tiny Cabin"), - "Seer: Bedside": LL_Location(36, LL_LocCat.PICKUP, "A Cabin Seer"), - "Dusty Crypt: Pumpkin Door": LL_Location(37, LL_LocCat.PICKUP, "Dusty Crypt"), - "Dusty Crypt: Maze": LL_Location(38, LL_LocCat.PICKUP, "Dusty Crypt"), - "Musty Crypt: Maze Room": LL_Location(39, LL_LocCat.PICKUP, "Musty Crypt"), - "Rusty Crypt: Vine": LL_Location(40, LL_LocCat.PICKUP, "Rusty Crypt"), - "Rusty Crypt: Boulders": LL_Location(41, LL_LocCat.PICKUP, "Rusty Crypt"), - "A Messy Cabin": LL_Location(42, LL_LocCat.PICKUP, "A Messy Cabin"), - "Under The Lake: Behind Lightning Rod": LL_Location(43, LL_LocCat.PICKUP, "Under The Lake"), - "Under The Lake: Bat Door": LL_Location(44, LL_LocCat.PICKUP, "Under The Lake"), - "Deeper Lake: Corner": LL_Location(45, LL_LocCat.PICKUP, "Deeper Under The Lake"), - "Deeper Lake: Rhombus": LL_Location(46, LL_LocCat.PICKUP, "Deeper Under The Lake"), - "Frankenjulie's Reward": LL_Location(47, LL_LocCat.PICKUP, "Frankenjulie's Laboratory"), - "Tower: Barracks": LL_Location(48, LL_LocCat.PICKUP, "Haunted Tower"), - "Tower F2: Skull Puzzle": LL_Location(49, LL_LocCat.PICKUP, "Haunted Tower Floor 2"), - "PolterGuy's Reward": LL_Location(50, LL_LocCat.PICKUP, "Haunted Tower Roof"), - "Tower Basement: DoorDoorDoorDoorDoorDoor": LL_Location(51, LL_LocCat.PICKUP, "Haunted Basement"), - "Abandoned Mine: Shaft": LL_Location(52, LL_LocCat.PICKUP, "Abandoned Mines"), - "Shrine of Bombulus: Prize": LL_Location(53, LL_LocCat.PICKUP, "The Shrine Of Bombulus"), - "Gloomy Cavern: Lockpick": LL_Location(54, LL_LocCat.PICKUP, "A Gloomy Cavern"), - "Happy Stick: Hidden": LL_Location(55, LL_LocCat.PICKUP, "Happy Stick Woods"), - "Happy Stick: Reward": LL_Location(56, LL_LocCat.PICKUP, "Happy Stick Woods"), - "Wolf Den: Top Left": LL_Location(57, LL_LocCat.PICKUP, "The Wolf Den"), - "Wolf Den: Pumpkin Door": LL_Location(58, LL_LocCat.PICKUP, "The Wolf Den"), - "Wolf Den: Vine": LL_Location(59, LL_LocCat.PICKUP, "The Wolf Den"), - "Upper Cavern: Three Gold Skeletons": LL_Location(60, LL_LocCat.PICKUP, "Upper Creepy Caverns"), - "Under The Ravine: Left Vine": LL_Location(61, LL_LocCat.PICKUP, "Under The Ravine"), - "Under The Ravine: Right Vine": LL_Location(62, LL_LocCat.PICKUP, "Under The Ravine"), - "Creepy Caverns M: Pharaoh Bat Door": LL_Location(63, LL_LocCat.PICKUP, "Creepy Caverns Middle"), - "Creepy Caverns R: Top Pharaohs": LL_Location(64, LL_LocCat.PICKUP, "Creepy Caverns Right"), - "Creepy Caverns M: Gargoyles": LL_Location(65, LL_LocCat.PICKUP, "Creepy Caverns Middle"), - "Castle Vampy: Top Room": LL_Location(66, LL_LocCat.PICKUP, "Castle Vampy"), - "Castle Vampy: Maze": LL_Location(67, LL_LocCat.PICKUP, "Castle Vampy"), - "Castle Vampy: Gauntlet": LL_Location(68, LL_LocCat.PICKUP, "Castle Vampy"), - "Castle Vampy: Bat Closet": LL_Location(69, LL_LocCat.PICKUP, "Castle Vampy"), - "Castle Vampy II: Candle Room": LL_Location(70, LL_LocCat.PICKUP, "Castle Vampy II"), - "Castle Vampy II: Bloodsucker Room": LL_Location(71, LL_LocCat.PICKUP, "Castle Vampy II"), - "Castle Vampy II: Vampire Lord": LL_Location(72, LL_LocCat.PICKUP, "Castle Vampy II"), - "Castle Vampy II: Bat Room": LL_Location(73, LL_LocCat.PICKUP, "Castle Vampy II"), - "Cabin in the Woods: Gold Skull": LL_Location(74, LL_LocCat.PICKUP, "Cabin In The Woods"), - "Castle Vampy III: Center": LL_Location(75, LL_LocCat.PICKUP, "Castle Vampy III"), - "Castle Vampy III: Behind the Pews": LL_Location(76, LL_LocCat.PICKUP, "Castle Vampy III"), - "Castle Vampy III: AMBUSH!": LL_Location(77, LL_LocCat.PICKUP, "Castle Vampy III"), - "Castle Vampy III: Halloween": LL_Location(78, LL_LocCat.PICKUP, "Castle Vampy III"), - "Castle Vampy III: Bat room": LL_Location(79, LL_LocCat.PICKUP, "Castle Vampy III"), - "Castle Vampy IV: Right Path": LL_Location(80, LL_LocCat.PICKUP, "Castle Vampy IV"), - "Castle Vampy IV: Left Path": LL_Location(81, LL_LocCat.PICKUP, "Castle Vampy IV"), - "Castle Vampy IV: Ballroom Right": LL_Location(82, LL_LocCat.PICKUP, "Castle Vampy IV"), - "Castle Vampy IV: Right Secret Wall": LL_Location(83, LL_LocCat.PICKUP, "Castle Vampy IV"), - "Castle Vampy IV: Ballroom Left": LL_Location(84, LL_LocCat.PICKUP, "Castle Vampy IV"), - "Roof NW: Gutsy the Elder": LL_Location(85, LL_LocCat.PICKUP, "Castle Vampy Roof NW"), - "Roof NE: Stoney the Elder": LL_Location(86, LL_LocCat.PICKUP, "Castle Vampy Roof NE"), - "Roof SW: Drippy the Elder": LL_Location(87, LL_LocCat.PICKUP, "Castle Vampy Roof SW"), - "Roof SE: Toasty the Elder": LL_Location(88, LL_LocCat.PICKUP, "Castle Vampy Roof SE"), - "Bonkula Item": LL_Location(89, LL_LocCat.PICKUP, "The Heart Of Terror"), - "Hidey-Hole: Bat Door": LL_Location(90, LL_LocCat.PICKUP, "A Hidey-Hole"), - "Hidey-Hole: Pebbles": LL_Location(91, LL_LocCat.PICKUP, "A Hidey-Hole"), - "Swampdog Lair: Entrance": LL_Location(92, LL_LocCat.PICKUP, "Swampdog Lair"), - "Swampdog Lair: End": LL_Location(93, LL_LocCat.PICKUP, "Swampdog Lair"), - "Q: Save Halloween Hill": LL_Location(94, LL_LocCat.QUEST, "The Evilizer"), - "Q: Tree Trimming": LL_Location(95, LL_LocCat.QUEST, "A Cabin Trees"), - "Q: Scaredy Cat": LL_Location(96, LL_LocCat.QUEST, "Halloween Hill"), - "Q: Sticky Shoes": LL_Location(97, LL_LocCat.QUEST, "Halloween Hill"), - "Q: Mushroom Hunt": LL_Location(98, LL_LocCat.QUEST, "The Witch's Cabin"), - "Q: Zombie Stomp": LL_Location(99, LL_LocCat.QUEST, "Zombiton"), - "Q: Smashing Pumpkins": LL_Location(100, LL_LocCat.QUEST, "Halloween Hill"), - "Q: Silver Bullet": LL_Location(101, LL_LocCat.QUEST, "Zombiton"), - "Q: Hairy Larry": LL_Location(102, LL_LocCat.QUEST, "The Wolf Den"), - "Q: Ghostbusting": LL_Location(103, LL_LocCat.QUEST, "The Witch's Cabin"), - "Q: The Rescue": LL_Location(104, LL_LocCat.QUEST, "A Gloomy Cavern"), - "Q: The Collection": LL_Location(105, LL_LocCat.QUEST, "A Cabin Collector"), +loonyland_location_table: dict[str, LLLocation] = { + "Swamp: Mud Path": LLLocation(0, LLLocCat.PICKUP, "Slurpy Swamp Mud"), + "Swamp: Bog Beast": LLLocation(1, LLLocCat.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Upper Ledge": LLLocation(2, LLLocCat.PICKUP, "Rocky Cliffs"), + "Swamp: Sapling Shrine": LLLocation(3, LLLocCat.PICKUP, "Slurpy Swamp Mud"), + "Terror Glade: South Trees": LLLocation(4, LLLocCat.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Vine": LLLocation(5, LLLocCat.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Grand Pharoh": LLLocation(6, LLLocCat.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Rock Corner": LLLocation(7, LLLocCat.PICKUP, "Rocky Cliffs"), + "Swamp: Outside Luniton": LLLocation(8, LLLocCat.PICKUP, "Halloween Hill"), + "Swamp: East 1": LLLocation(9, LLLocCat.PICKUP, "Halloween Hill"), + "Swamp: Top Left dry": LLLocation(10, LLLocCat.PICKUP, "Halloween Hill"), + "Swamp: East 2": LLLocation(11, LLLocCat.PICKUP, "Halloween Hill"), + "Woods: Above Castle": LLLocation(12, LLLocCat.PICKUP, "Halloween Hill"), + "Rocky Cliffs: Entrance Ledge": LLLocation(13, LLLocCat.PICKUP, "Rocky Cliffs"), + "Rocky Cliffs: Peak": LLLocation(14, LLLocCat.PICKUP, "Rocky Cliffs"), + "Woods: SW of Cabin": LLLocation(15, LLLocCat.PICKUP, "Halloween Hill"), + "Witch's Cabin: Bedroom": LLLocation(16, LLLocCat.PICKUP, "The Witch's Cabin"), + "Witch's Cabin: Backroom": LLLocation(17, LLLocCat.PICKUP, "The Witch's Cabin Back"), + "Bonita's Cabin: Barrel Maze": LLLocation(18, LLLocCat.PICKUP, "Bonita's Cabin"), + "Bog Pit: Top Door": LLLocation(19, LLLocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Posts Room": LLLocation(20, LLLocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Drippy Window": LLLocation(21, LLLocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Green room": LLLocation(22, LLLocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Arena": LLLocation(23, LLLocCat.PICKUP, "The Bog Pit"), + "Bog Pit: Sw Switch": LLLocation(24, LLLocCat.PICKUP, "The Bog Pit"), + "Tunnel: Swampdog Pumpkin Door": LLLocation(25, LLLocCat.PICKUP, "Underground Tunnel"), + "Tunnel: Scratch Wall": LLLocation(26, LLLocCat.PICKUP, "Underground Tunnel"), + "Tunnel: Narrow Passage": LLLocation(27, LLLocCat.PICKUP, "Underground Tunnel"), + "Tunnel: Top Frogs": LLLocation(28, LLLocCat.PICKUP, "Underground Tunnel"), + "Tunnel: Torch Island": LLLocation(29, LLLocCat.PICKUP, "Underground Tunnel Mud"), + "Tunnel: Small Room": LLLocation(30, LLLocCat.PICKUP, "Underground Tunnel"), + "Swamp Gas: Scratch Wall": LLLocation(31, LLLocCat.PICKUP, "Swamp Gas Cavern"), + "Swamp Gas: Bat Door": LLLocation(32, LLLocCat.PICKUP, "Swamp Gas Cavern"), + "Swamp Gas: Stair room": LLLocation(33, LLLocCat.PICKUP, "Swamp Gas Cavern Back"), + "Swamp Gas: Rock Prison": LLLocation(34, LLLocCat.PICKUP, "Swamp Gas Cavern"), + "A Tiny Cabin": LLLocation(35, LLLocCat.PICKUP, "A Tiny Cabin"), + "Seer: Bedside": LLLocation(36, LLLocCat.PICKUP, "A Cabin Seer"), + "Dusty Crypt: Pumpkin Door": LLLocation(37, LLLocCat.PICKUP, "Dusty Crypt"), + "Dusty Crypt: Maze": LLLocation(38, LLLocCat.PICKUP, "Dusty Crypt"), + "Musty Crypt: Maze Room": LLLocation(39, LLLocCat.PICKUP, "Musty Crypt"), + "Rusty Crypt: Vine": LLLocation(40, LLLocCat.PICKUP, "Rusty Crypt"), + "Rusty Crypt: Boulders": LLLocation(41, LLLocCat.PICKUP, "Rusty Crypt"), + "A Messy Cabin": LLLocation(42, LLLocCat.PICKUP, "A Messy Cabin"), + "Under The Lake: Behind Lightning Rod": LLLocation(43, LLLocCat.PICKUP, "Under The Lake"), + "Under The Lake: Bat Door": LLLocation(44, LLLocCat.PICKUP, "Under The Lake"), + "Deeper Lake: Corner": LLLocation(45, LLLocCat.PICKUP, "Deeper Under The Lake"), + "Deeper Lake: Rhombus": LLLocation(46, LLLocCat.PICKUP, "Deeper Under The Lake"), + "Frankenjulie's Reward": LLLocation(47, LLLocCat.PICKUP, "Frankenjulie's Laboratory"), + "Tower: Barracks": LLLocation(48, LLLocCat.PICKUP, "Haunted Tower"), + "Tower F2: Skull Puzzle": LLLocation(49, LLLocCat.PICKUP, "Haunted Tower Floor 2"), + "PolterGuy's Reward": LLLocation(50, LLLocCat.PICKUP, "Haunted Tower Roof"), + "Tower Basement: DoorDoorDoorDoorDoorDoor": LLLocation(51, LLLocCat.PICKUP, "Haunted Basement"), + "Abandoned Mine: Shaft": LLLocation(52, LLLocCat.PICKUP, "Abandoned Mines"), + "Shrine of Bombulus: Prize": LLLocation(53, LLLocCat.PICKUP, "The Shrine Of Bombulus"), + "Gloomy Cavern: Lockpick": LLLocation(54, LLLocCat.PICKUP, "A Gloomy Cavern"), + "Happy Stick: Hidden": LLLocation(55, LLLocCat.PICKUP, "Happy Stick Woods"), + "Happy Stick: Reward": LLLocation(56, LLLocCat.PICKUP, "Happy Stick Woods"), + "Wolf Den: Top Left": LLLocation(57, LLLocCat.PICKUP, "The Wolf Den"), + "Wolf Den: Pumpkin Door": LLLocation(58, LLLocCat.PICKUP, "The Wolf Den"), + "Wolf Den: Vine": LLLocation(59, LLLocCat.PICKUP, "The Wolf Den"), + "Upper Cavern: Three Gold Skeletons": LLLocation(60, LLLocCat.PICKUP, "Upper Creepy Caverns"), + "Under The Ravine: Left Vine": LLLocation(61, LLLocCat.PICKUP, "Under The Ravine"), + "Under The Ravine: Right Vine": LLLocation(62, LLLocCat.PICKUP, "Under The Ravine"), + "Creepy Caverns M: Pharaoh Bat Door": LLLocation(63, LLLocCat.PICKUP, "Creepy Caverns Middle"), + "Creepy Caverns R: Top Pharaohs": LLLocation(64, LLLocCat.PICKUP, "Creepy Caverns Right"), + "Creepy Caverns M: Gargoyles": LLLocation(65, LLLocCat.PICKUP, "Creepy Caverns Middle"), + "Castle Vampy: Top Room": LLLocation(66, LLLocCat.PICKUP, "Castle Vampy"), + "Castle Vampy: Maze": LLLocation(67, LLLocCat.PICKUP, "Castle Vampy"), + "Castle Vampy: Gauntlet": LLLocation(68, LLLocCat.PICKUP, "Castle Vampy"), + "Castle Vampy: Bat Closet": LLLocation(69, LLLocCat.PICKUP, "Castle Vampy"), + "Castle Vampy II: Candle Room": LLLocation(70, LLLocCat.PICKUP, "Castle Vampy II"), + "Castle Vampy II: Bloodsucker Room": LLLocation(71, LLLocCat.PICKUP, "Castle Vampy II"), + "Castle Vampy II: Vampire Lord": LLLocation(72, LLLocCat.PICKUP, "Castle Vampy II"), + "Castle Vampy II: Bat Room": LLLocation(73, LLLocCat.PICKUP, "Castle Vampy II"), + "Cabin in the Woods: Gold Skull": LLLocation(74, LLLocCat.PICKUP, "Cabin In The Woods"), + "Castle Vampy III: Center": LLLocation(75, LLLocCat.PICKUP, "Castle Vampy III"), + "Castle Vampy III: Behind the Pews": LLLocation(76, LLLocCat.PICKUP, "Castle Vampy III"), + "Castle Vampy III: AMBUSH!": LLLocation(77, LLLocCat.PICKUP, "Castle Vampy III"), + "Castle Vampy III: Halloween": LLLocation(78, LLLocCat.PICKUP, "Castle Vampy III"), + "Castle Vampy III: Bat room": LLLocation(79, LLLocCat.PICKUP, "Castle Vampy III"), + "Castle Vampy IV: Right Path": LLLocation(80, LLLocCat.PICKUP, "Castle Vampy IV"), + "Castle Vampy IV: Left Path": LLLocation(81, LLLocCat.PICKUP, "Castle Vampy IV"), + "Castle Vampy IV: Ballroom Right": LLLocation(82, LLLocCat.PICKUP, "Castle Vampy IV"), + "Castle Vampy IV: Right Secret Wall": LLLocation(83, LLLocCat.PICKUP, "Castle Vampy IV"), + "Castle Vampy IV: Ballroom Left": LLLocation(84, LLLocCat.PICKUP, "Castle Vampy IV"), + "Roof NW: Gutsy the Elder": LLLocation(85, LLLocCat.PICKUP, "Castle Vampy Roof NW"), + "Roof NE: Stoney the Elder": LLLocation(86, LLLocCat.PICKUP, "Castle Vampy Roof NE"), + "Roof SW: Drippy the Elder": LLLocation(87, LLLocCat.PICKUP, "Castle Vampy Roof SW"), + "Roof SE: Toasty the Elder": LLLocation(88, LLLocCat.PICKUP, "Castle Vampy Roof SE"), + "Bonkula Item": LLLocation(89, LLLocCat.PICKUP, "The Heart Of Terror"), + "Hidey-Hole: Bat Door": LLLocation(90, LLLocCat.PICKUP, "A Hidey-Hole"), + "Hidey-Hole: Pebbles": LLLocation(91, LLLocCat.PICKUP, "A Hidey-Hole"), + "Swampdog Lair: Entrance": LLLocation(92, LLLocCat.PICKUP, "Swampdog Lair"), + "Swampdog Lair: End": LLLocation(93, LLLocCat.PICKUP, "Swampdog Lair"), + "Q: Save Halloween Hill": LLLocation(94, LLLocCat.QUEST, "The Evilizer"), + "Q: Tree Trimming": LLLocation(95, LLLocCat.QUEST, "A Cabin Trees"), + "Q: Scaredy Cat": LLLocation(96, LLLocCat.QUEST, "Halloween Hill"), + "Q: Sticky Shoes": LLLocation(97, LLLocCat.QUEST, "Halloween Hill"), + "Q: Mushroom Hunt": LLLocation(98, LLLocCat.QUEST, "The Witch's Cabin"), + "Q: Zombie Stomp": LLLocation(101, LLLocCat.QUEST, "Zombiton"), + "Q: Smashing Pumpkins": LLLocation(102, LLLocCat.QUEST, "Halloween Hill"), + "Q: Silver Bullet": LLLocation(107, LLLocCat.QUEST, "Zombiton"), + "Q: Hairy Larry": LLLocation(108, LLLocCat.QUEST, "The Wolf Den"), + "Q: Ghostbusting": LLLocation(109, LLLocCat.QUEST, "The Witch's Cabin"), + "Q: The Rescue": LLLocation(112, LLLocCat.QUEST, "A Gloomy Cavern"), + "Q: The Collection": LLLocation(113, LLLocCat.QUEST, "A Cabin Collector"), + "Evil Smashin'": LLLocation(114, LLLocCat.BADGE, "The Evilizer"), + "Bowlin'": LLLocation(115, LLLocCat.BADGE, "Bowling"), + "Vandalizin'": LLLocation(116, LLLocCat.BADGE, "Zombiton"), + "Greed": LLLocation(117, LLLocCat.BADGE, "Menu"), + "Monster Slayin'": LLLocation(118, LLLocCat.BADGE, "Menu"), + "Monster Poundin'": LLLocation(119, LLLocCat.BADGE, "Menu"), + "Ghostbustin'": LLLocation(120, LLLocCat.BADGE, "Haunted Tower Roof"), + "Lookin'": LLLocation(121, LLLocCat.BADGE, "The Witch's Cabin"), + "Ultimate Victory": LLLocation(122, LLLocCat.BADGE, "The Evilizer"), + "Kickin'": LLLocation(123, LLLocCat.BADGE, "Loony Ball"), + "Boss Bashin'": LLLocation(124, LLLocCat.BADGE, "Boss Bash"), + "Vampire Slayin'": LLLocation(125, LLLocCat.BADGE, "The Heart Of Terror"), + "Sneakin'": LLLocation(126, LLLocCat.BADGE, "Haunted Tower"), + "Witch Hunt": LLLocation(127, LLLocCat.BADGE, "Happy Stick Woods"), + "Animal Control": LLLocation(128, LLLocCat.BADGE, "The Wolf Den"), + "Annoyance": LLLocation(129, LLLocCat.BADGE, "The Witch's Cabin"), + "Civic Duty": LLLocation(130, LLLocCat.BADGE, "A Gloomy Cavern"), + "Winnin'": LLLocation(131, LLLocCat.BADGE, "The Evilizer"), + "Combo Plate": LLLocation(132, LLLocCat.BADGE, "Menu"), + "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, "Rocky Cliffs"), + "Findin'": LLLocation(134, LLLocCat.BADGE, "The Wolf Den"), + "Extreme Survivin'": LLLocation(135, LLLocCat.BADGE, "Survival"), + "Huntin'": LLLocation(136, LLLocCat.BADGE, "Halloween Hill"), + "Advanced Winnin'": LLLocation(137, LLLocCat.BADGE, "Menu"), + "Survivin'": LLLocation(138, LLLocCat.BADGE, "Survival"), + "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, "Larry's Lair"), + "Mad Skeelz": LLLocation(140, LLLocCat.BADGE, "The Evilizer"), + "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, "Frankenjulie's Laboratory"), + "Combo Magic": LLLocation(142, LLLocCat.BADGE, "Survival"), + "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, "Slurpy Swamp Mud"), + "R-R-R-Remix!": LLLocation(144, LLLocCat.BADGE, "Remix"), + "Witchcraft": LLLocation(145, LLLocCat.BADGE, "Menu"), + "Ninjitsu": LLLocation(146, LLLocCat.BADGE, "Menu"), + "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, "Survival"), + "Hooliganin'": LLLocation(148, LLLocCat.BADGE, "Loony Ball"), + "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, "Menu"), + "Scorin'": LLLocation(150, LLLocCat.BADGE, "Menu"), + "Brawlin'": LLLocation(151, LLLocCat.BADGE, "Benny's Cocktails"), + "Minin' For Treasure": LLLocation(152, LLLocCat.BADGE, "Remix"), + "Digitally Masterin'": LLLocation(153, LLLocCat.BADGE, "Menu"), } + + def set_rules(multiworld, world, player): - access_rules: Dict[str, CollectionRule] = { + access_rules: dict[str, CollectionRule] = { "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", player), "Rocky Cliffs: Rock Corner": lambda state: have_bombs(state, player), "Witch's Cabin: Bedroom": lambda state: have_light_source(state, player), @@ -483,14 +654,18 @@ def set_rules(multiworld, world, player): "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, player), "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", player), "Under The Lake: Bat Door": lambda state: state.has("Bat Key", player), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) + and state.has("Skull Key", player) + and state.has("Pumpkin Key", player), "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), "Wolf Den: Vine": lambda state: state.has("Fertilizer", player), "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", player), "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", player), "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) and state.has("Silver Sling", player), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) + and state.has("Silver Sling", player), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) + and state.has("Silver Sling", player), "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), "Swampdog Lair: End": lambda state: have_light_source(state, player) and state.has("Fertilizer", player), @@ -501,223 +676,366 @@ def set_rules(multiworld, world, player): "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, player) and state.has("Silver", player), "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", player), "Q: Ghostbusting": lambda state: state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), - "Q: The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and state.can_reach_region("Castle Vampy", player), + "Q: The Collection": lambda state: state.has("Silver Sling", player) + and state.has("Ghost Potion", player) + and state.can_reach_region("Castle Vampy", player), + "Cleanin' Up": lambda state: have_bombs(state, player), + "Extreme Survivin'": lambda state: state.has("Terror Mode", player), + "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", player) + and state.can_reach_region("Zombiton", player) + and state.can_reach_region("Slurpy Swamp Mud", player) + and state.has("Silver Sling", player), + "Advanced Winnin'": lambda state: hundred_percent(state, player), + "Mad Skeelz": lambda state: state.has("Terror Mode", player), + "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", player), + "Witchcraft": lambda state: state.has("Play As Witch", player) and have_all_weapons(state, player), + "Ninjitsu": lambda state: state.has("Play As Ninja Girl", player) and have_all_weapons(state, player), + "Stayin' Alive": lambda state: state.has("Infinite Survival", player), + "Swampdoggin'": lambda state: state.has("Play As Swampdog", player), + "Brawlin'": lambda state: state.has("Touch Of Death", player), + "Digitally Masterin'": lambda state: have_39_badges(state, player), } for loc in multiworld.get_locations(player): if loc.name in access_rules: add_rule(loc, access_rules[loc.name]) + + def set_entrance_rules(multiworld, world, player): - loonyland_entrance_table: List[LL_Entrance] = [ - LL_Entrance("Menu", "Halloween Hill", False), - LL_Entrance("Menu", "Bowling", False), - LL_Entrance("Menu", "Survival", False), - LL_Entrance("Menu", "Boss Bash", False), - LL_Entrance("Menu", "Loony Ball", False), - LL_Entrance("Menu", "Remix", False), - LL_Entrance("Halloween Hill", "A Cabin Trees", True), - LL_Entrance("Halloween Hill", "The Witch's Cabin", True), - LL_Entrance("Halloween Hill", "Bonita's Cabin", True), - LL_Entrance("Halloween Hill", "Underground Tunnel", True), - LL_Entrance("Halloween Hill", "The Bog Pit", True), - LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False), - LL_Entrance("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern", True), - LL_Entrance("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False), - LL_Entrance("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True), - LL_Entrance("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), - LL_Entrance("Halloween Hill", "The Witch's Cabin Back", True), - LL_Entrance("Zombiton", "A Cabin Seer", True), - LL_Entrance("Zombiton", "Benny's Cocktails", True), - LL_Entrance("Halloween Hill", "Dusty Crypt Entrance", True), - LL_Entrance("Zombiton", "Musty Crypt Entrance", True), - LL_Entrance("Zombiton", "A Messy Cabin", True), - LL_Entrance("Halloween Hill", "Rusty Crypt Entrance", True), - LL_Entrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), - LL_Entrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Rocky Cliffs", "Abandoned Mines Entrance", True), - LL_Entrance("Rocky Cliffs", "The Shrine Of Bombulus", True), - LL_Entrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, player)), - LL_Entrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", player)), - LL_Entrance("Zombiton", "A Cabin Larry", True), - LL_Entrance("Halloween Hill", "The Wolf Den Entrance", True), - LL_Entrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", player)), - LL_Entrance("Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, player)), - LL_Entrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), - LL_Entrance("Vampy Land", "Castle Vampy", True), - LL_Entrance("Halloween Hill", "Cabin In The Woods", True), - LL_Entrance("Halloween Hill", "A Cabin Collector", True), - LL_Entrance("Halloween Hill", "A Hidey-Hole", True), - LL_Entrance("Halloween Hill", "Swampdog Lair Entrance", True), - LL_Entrance("A Cabin Trees", "Halloween Hill", True), - LL_Entrance("The Witch's Cabin", "Halloween Hill", True), - LL_Entrance("The Witch's Cabin Back", "Halloween Hill", True), - LL_Entrance("Bonita's Cabin", "Halloween Hill", True), - LL_Entrance("The Bog Pit", "Halloween Hill", True), - LL_Entrance("Underground Tunnel", "Halloween Hill", True), - LL_Entrance("Underground Tunnel Zombie", "Benny's Cocktails", True), - LL_Entrance("Swamp Gas Cavern", "Slurpy Swamp Mud North Warp", True), - LL_Entrance("Swamp Gas Cavern Back", "Slurpy Swamp Mud East Warp", True), - LL_Entrance("A Tiny Cabin", "Halloween Hill", True), - LL_Entrance("A Cabin Seer", "Zombiton", True), - LL_Entrance("Benny's Cocktails", "Zombiton", True), - LL_Entrance("Benny's Cocktails", "Underground Tunnel Zombie", True), - LL_Entrance("Dusty Crypt Entrance", "Dusty Crypt", False, lambda state: have_light_source(state, player)), - LL_Entrance("Dusty Crypt Entrance", "Halloween Hill", True), - LL_Entrance("Dusty Crypt", "Dusty Crypt Entrance", False), - LL_Entrance("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, player)), - LL_Entrance("Musty Crypt Entrance", "Zombiton", True), - LL_Entrance("Musty Crypt", "Musty Crypt Entrance", False), - LL_Entrance("Rusty Crypt Entrance", "Rusty Crypt", False, lambda state: have_light_source(state, player)), - LL_Entrance("Rusty Crypt Entrance", "Halloween Hill", True), - LL_Entrance("Rusty Crypt", "Rusty Crypt Entrance", False), - LL_Entrance("A Messy Cabin", "Zombiton", True), - LL_Entrance("Under The Lake Entrance", "Under The Lake", False, lambda state: have_light_source(state, player)), - LL_Entrance("Under The Lake Entrance", "Halloween Hill", True), - LL_Entrance("Under The Lake", "Under The Lake Entrance", False), - LL_Entrance("Under The Lake", "Under The Lake Exit", False), - LL_Entrance("Under The Lake Exit", "Deeper Under The Lake", True), - LL_Entrance("Under The Lake Exit", "Under The Lake", False), - LL_Entrance("Deeper Under The Lake", "Under The Lake Exit", True), - LL_Entrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True), - LL_Entrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True), - LL_Entrance("Frankenjulie's Laboratory", "Halloween Hill", True), - LL_Entrance("Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower", "Haunted Basement Entrance", False), - LL_Entrance("Haunted Tower", "Haunted Tower Stairs Up", False), - LL_Entrance("Haunted Tower", "Haunted Tower Stairs Down", False, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), - LL_Entrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), - LL_Entrance("Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player) and state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower Stairs Down", "Haunted Basement Entrance", True, lambda state: have_light_source(state, player)), - LL_Entrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), - LL_Entrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), - LL_Entrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), - LL_Entrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), - LL_Entrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), - LL_Entrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), - LL_Entrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), - LL_Entrance("Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", player)), - LL_Entrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), - LL_Entrance("Haunted Tower Roof", "Halloween Hill", True), - LL_Entrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), - LL_Entrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), - LL_Entrance("Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, player)), - LL_Entrance("Haunted Basement", "Haunted Basement Entrance", False), - LL_Entrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, player)), - LL_Entrance("Abandoned Mines Entrance", "Rocky Cliffs", True), - LL_Entrance("Abandoned Mines", "Abandoned Mines Entrance", False), - LL_Entrance("The Shrine Of Bombulus", "Rocky Cliffs", True), - LL_Entrance("A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, player)), - LL_Entrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), - LL_Entrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), - LL_Entrance("Happy Stick Woods", "Halloween Hill", True), - LL_Entrance("The Wolf Den Entrance", "The Wolf Den", False, lambda state: state.has("Silver Sling", player) and have_light_source(state, player)), - LL_Entrance("The Wolf Den Entrance", "Halloween Hill", True), - LL_Entrance("The Wolf Den", "The Wolf Den Entrance", False), - LL_Entrance("The Wolf Den", "The Wolf Den Exit", False), - LL_Entrance("The Wolf Den Exit", "Larry's Lair", True), - LL_Entrance("The Wolf Den Exit", "The Wolf Den", False, lambda state: state.has("Silver Sling", player) and have_light_source(state, player)), - LL_Entrance("A Cabin Larry", "Zombiton", True), - LL_Entrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), - LL_Entrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), - LL_Entrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), - LL_Entrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), - LL_Entrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), - LL_Entrance("Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, player)), - LL_Entrance("Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), - LL_Entrance("Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), - LL_Entrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), - LL_Entrance("Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), - LL_Entrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), - LL_Entrance("Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), - LL_Entrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), - LL_Entrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True), - LL_Entrance("Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Right Left Warp", "Under The Ravine", True), - LL_Entrance("Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), - LL_Entrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), - LL_Entrance("Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, player)), - LL_Entrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), - LL_Entrance("Castle Vampy", "Halloween Hill", True), - LL_Entrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), - LL_Entrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", player)), - LL_Entrance("Castle Vampy Skull Jail", "Castle Vampy II", True), - LL_Entrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", player, 4)), - LL_Entrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", player, 4)), - LL_Entrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", player, 4)), - LL_Entrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", player, 4)), - LL_Entrance("Castle Vampy II", "Castle Vampy Skull Jail", True), - LL_Entrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", player)), - LL_Entrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", player)), - LL_Entrance("Castle Vampy II Bat Jail", "Castle Vampy III", True), - LL_Entrance("Castle Vampy II NE", "Castle Vampy", True), - LL_Entrance("Castle Vampy II NE", "Castle Vampy III NE", True), - LL_Entrance("Castle Vampy II SE", "Castle Vampy", True), - LL_Entrance("Castle Vampy II SE", "Castle Vampy III SE", True), - LL_Entrance("Castle Vampy II SW", "Castle Vampy", True), - LL_Entrance("Castle Vampy II SW", "Castle Vampy III SW", True), - LL_Entrance("Castle Vampy II NW", "Castle Vampy", True), - LL_Entrance("Castle Vampy II NW", "Castle Vampy III NW", True), - LL_Entrance("Cabin In The Woods", "Halloween Hill", True), - LL_Entrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), - LL_Entrance("Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", player)), - LL_Entrance("Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", player)), - LL_Entrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), - LL_Entrance("Castle Vampy III NE", "Castle Vampy II NE", True), - LL_Entrance("Castle Vampy III NE", "Castle Vampy IV NE", True), - LL_Entrance("Castle Vampy III SE", "Castle Vampy II SE", True), - LL_Entrance("Castle Vampy III SE", "Castle Vampy IV SE", True), - LL_Entrance("Castle Vampy III SW", "Castle Vampy II SW", True), - LL_Entrance("Castle Vampy III SW", "Castle Vampy IV SW", True), - LL_Entrance("Castle Vampy III NW", "Castle Vampy II NW", True), - LL_Entrance("Castle Vampy III NW", "Castle Vampy IV NW", True), - LL_Entrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), - LL_Entrance("Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", player, 8)), - LL_Entrance("Castle Vampy IV NE", "Castle Vampy III NE", True), - LL_Entrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), - LL_Entrance("Castle Vampy IV SE", "Castle Vampy III SE", True), - LL_Entrance("Castle Vampy IV SE", "Castle Vampy Roof SE", True), - LL_Entrance("Castle Vampy IV SW", "Castle Vampy III SW", True), - LL_Entrance("Castle Vampy IV SW", "Castle Vampy Roof SW", True), - LL_Entrance("Castle Vampy IV NW", "Castle Vampy III NW", True), - LL_Entrance("Castle Vampy IV NW", "Castle Vampy Roof NW", True), - LL_Entrance("A Cabin Collector", "Halloween Hill", True), - LL_Entrance("Castle Vampy Roof NE", "Castle Vampy IV NE", True), - LL_Entrance("Castle Vampy Roof SE", "Castle Vampy IV SE", True), - LL_Entrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), - LL_Entrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), - LL_Entrance("The Evilizer", "Halloween Hill", True), - LL_Entrance("The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, player)), - LL_Entrance("The Heart Of Terror", "The Evilizer", True), - LL_Entrance("The Heart Of Terror", "Empty Rooftop", True), - LL_Entrance("A Hidey-Hole", "Halloween Hill", True), - LL_Entrance("Empty Rooftop", "Halloween Hill", True), - LL_Entrance("Swampdog Lair Entrance", "Swampdog Lair", False, lambda state: state.has("Boots", player)), - LL_Entrance("Swampdog Lair", "Swampdog Lair Entrance", True), - LL_Entrance("Larry's Lair", "Halloween Hill", True), - LL_Entrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), - LL_Entrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", player)), - LL_Entrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), - LL_Entrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), - LL_Entrance("Zombiton", "Halloween Hill", False), - LL_Entrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player)), - LL_Entrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player)), - LL_Entrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), - LL_Entrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", player)), - LL_Entrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player)), - LL_Entrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), -] + loonyland_entrance_table: list[LLEntrance] = [ + LLEntrance("Menu", "Halloween Hill", False), + LLEntrance("Menu", "Bowling", False), + LLEntrance("Menu", "Survival", False), + LLEntrance("Menu", "Boss Bash", False), + LLEntrance("Menu", "Loony Ball", False), + LLEntrance("Menu", "Remix", False), + LLEntrance("Halloween Hill", "A Cabin Trees", True), + LLEntrance("Halloween Hill", "The Witch's Cabin", True), + LLEntrance("Halloween Hill", "Bonita's Cabin", True), + LLEntrance("Halloween Hill", "Underground Tunnel", True), + LLEntrance("Halloween Hill", "The Bog Pit", True), + LLEntrance("Slurpy Swamp Mud", "Slurpy Swamp Mud East Warp", False), + LLEntrance("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern", True), + LLEntrance("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False), + LLEntrance("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True), + LLEntrance("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), + LLEntrance("Halloween Hill", "The Witch's Cabin Back", True), + LLEntrance("Zombiton", "A Cabin Seer", True), + LLEntrance("Zombiton", "Benny's Cocktails", True), + LLEntrance("Halloween Hill", "Dusty Crypt Entrance", True), + LLEntrance("Zombiton", "Musty Crypt Entrance", True), + LLEntrance("Zombiton", "A Messy Cabin", True), + LLEntrance("Halloween Hill", "Rusty Crypt Entrance", True), + LLEntrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), + LLEntrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", player)), + LLEntrance("Rocky Cliffs", "Abandoned Mines Entrance", True), + LLEntrance("Rocky Cliffs", "The Shrine Of Bombulus", True), + LLEntrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, player)), + LLEntrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", player)), + LLEntrance("Zombiton", "A Cabin Larry", True), + LLEntrance("Halloween Hill", "The Wolf Den Entrance", True), + LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", player)), + LLEntrance( + "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, player) + ), + LLEntrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), + LLEntrance("Vampy Land", "Castle Vampy", True), + LLEntrance("Halloween Hill", "Cabin In The Woods", True), + LLEntrance("Halloween Hill", "A Cabin Collector", True), + LLEntrance("Halloween Hill", "A Hidey-Hole", True), + LLEntrance("Halloween Hill", "Swampdog Lair Entrance", True), + LLEntrance("A Cabin Trees", "Halloween Hill", True), + LLEntrance("The Witch's Cabin", "Halloween Hill", True), + LLEntrance("The Witch's Cabin Back", "Halloween Hill", True), + LLEntrance("Bonita's Cabin", "Halloween Hill", True), + LLEntrance("The Bog Pit", "Halloween Hill", True), + LLEntrance("Underground Tunnel", "Halloween Hill", True), + LLEntrance("Underground Tunnel Zombie", "Benny's Cocktails", True), + LLEntrance("Swamp Gas Cavern", "Slurpy Swamp Mud North Warp", True), + LLEntrance("Swamp Gas Cavern Back", "Slurpy Swamp Mud East Warp", True), + LLEntrance("A Tiny Cabin", "Halloween Hill", True), + LLEntrance("A Cabin Seer", "Zombiton", True), + LLEntrance("Benny's Cocktails", "Zombiton", True), + LLEntrance("Benny's Cocktails", "Underground Tunnel Zombie", True), + LLEntrance("Dusty Crypt Entrance", "Dusty Crypt", False, lambda state: have_light_source(state, player)), + LLEntrance("Dusty Crypt Entrance", "Halloween Hill", True), + LLEntrance("Dusty Crypt", "Dusty Crypt Entrance", False), + LLEntrance("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, player)), + LLEntrance("Musty Crypt Entrance", "Zombiton", True), + LLEntrance("Musty Crypt", "Musty Crypt Entrance", False), + LLEntrance("Rusty Crypt Entrance", "Rusty Crypt", False, lambda state: have_light_source(state, player)), + LLEntrance("Rusty Crypt Entrance", "Halloween Hill", True), + LLEntrance("Rusty Crypt", "Rusty Crypt Entrance", False), + LLEntrance("A Messy Cabin", "Zombiton", True), + LLEntrance("Under The Lake Entrance", "Under The Lake", False, lambda state: have_light_source(state, player)), + LLEntrance("Under The Lake Entrance", "Halloween Hill", True), + LLEntrance("Under The Lake", "Under The Lake Entrance", False), + LLEntrance("Under The Lake", "Under The Lake Exit", False), + LLEntrance("Under The Lake Exit", "Deeper Under The Lake", True), + LLEntrance("Under The Lake Exit", "Under The Lake", False), + LLEntrance("Deeper Under The Lake", "Under The Lake Exit", True), + LLEntrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True), + LLEntrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True), + LLEntrance("Frankenjulie's Laboratory", "Halloween Hill", True), + LLEntrance("Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), + LLEntrance("Haunted Tower", "Haunted Basement Entrance", False), + LLEntrance("Haunted Tower", "Haunted Tower Stairs Up", False), + LLEntrance( + "Haunted Tower", + "Haunted Tower Stairs Down", + False, + lambda state: state.has("Bat Key", player) + and state.has("Pumpkin Key", player) + and state.has("Skull Key", player), + ), + LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), + LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), + LLEntrance( + "Haunted Tower Stairs Down", + "Haunted Tower", + False, + lambda state: state.has("Bat Key", player) + and state.has("Pumpkin Key", player) + and state.has("Skull Key", player) + and state.has("Ghost Potion", player), + ), + LLEntrance( + "Haunted Tower Stairs Down", + "Haunted Basement Entrance", + True, + lambda state: have_light_source(state, player), + ), + LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), + LLEntrance( + "Haunted Tower Floor 2 Entrance", + "Haunted Tower Floor 2", + False, + lambda state: state.has("Ghost Potion", player), + ), + LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), + LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), + LLEntrance( + "Haunted Tower Floor 2 Exit", + "Haunted Tower Floor 2", + False, + lambda state: state.has("Ghost Potion", player), + ), + LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), + LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), + LLEntrance( + "Haunted Tower Floor 3 Entrance", + "Haunted Tower Floor 3", + False, + lambda state: state.has("Ghost Potion", player), + ), + LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), + LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), + LLEntrance( + "Haunted Tower Floor 3 Exit", + "Haunted Tower Floor 3", + False, + lambda state: state.has("Ghost Potion", player), + ), + LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), + LLEntrance("Haunted Tower Roof", "Halloween Hill", True), + LLEntrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), + LLEntrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), + LLEntrance( + "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, player) + ), + LLEntrance("Haunted Basement", "Haunted Basement Entrance", False), + LLEntrance( + "Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, player) + ), + LLEntrance("Abandoned Mines Entrance", "Rocky Cliffs", True), + LLEntrance("Abandoned Mines", "Abandoned Mines Entrance", False), + LLEntrance("The Shrine Of Bombulus", "Rocky Cliffs", True), + LLEntrance( + "A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, player) + ), + LLEntrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), + LLEntrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), + LLEntrance("Happy Stick Woods", "Halloween Hill", True), + LLEntrance( + "The Wolf Den Entrance", + "The Wolf Den", + False, + lambda state: state.has("Silver Sling", player) and have_light_source(state, player), + ), + LLEntrance("The Wolf Den Entrance", "Halloween Hill", True), + LLEntrance("The Wolf Den", "The Wolf Den Entrance", False), + LLEntrance("The Wolf Den", "The Wolf Den Exit", False), + LLEntrance("The Wolf Den Exit", "Larry's Lair", True), + LLEntrance( + "The Wolf Den Exit", + "The Wolf Den", + False, + lambda state: state.has("Silver Sling", player) and have_light_source(state, player), + ), + LLEntrance("A Cabin Larry", "Zombiton", True), + LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), + LLEntrance( + "Upper Creepy Caverns Left Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, player), + ), + LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), + LLEntrance( + "Upper Creepy Caverns Middle Warp", + "Creepy Caverns Left Top Warp", + True, + lambda state: have_light_source(state, player), + ), + LLEntrance( + "Upper Creepy Caverns Middle Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, player), + ), + LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), + LLEntrance( + "Upper Creepy Caverns Right Warp", + "Creepy Caverns Middle Top Warp", + True, + lambda state: have_light_source(state, player), + ), + LLEntrance( + "Upper Creepy Caverns Right Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, player), + ), + LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), + LLEntrance( + "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, player) + ), + LLEntrance( + "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, player) + ), + LLEntrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), + LLEntrance( + "Creepy Caverns Left Bottom Warp", + "Creepy Caverns Left", + False, + lambda state: have_light_source(state, player), + ), + LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), + LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), + LLEntrance( + "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player) + ), + LLEntrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), + LLEntrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), + LLEntrance( + "Creepy Caverns Middle Top Warp", + "Creepy Caverns Middle", + False, + lambda state: have_light_source(state, player), + ), + LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), + LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), + LLEntrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True), + LLEntrance( + "Creepy Caverns Middle Right Warp", + "Creepy Caverns Middle", + False, + lambda state: have_light_source(state, player), + ), + LLEntrance("Creepy Caverns Right Left Warp", "Under The Ravine", True), + LLEntrance( + "Creepy Caverns Right Left Warp", + "Creepy Caverns Right", + False, + lambda state: have_light_source(state, player), + ), + LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), + LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), + LLEntrance( + "Creepy Caverns Right Bottom Warp", + "Creepy Caverns Right", + False, + lambda state: have_light_source(state, player), + ), + LLEntrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), + LLEntrance("Castle Vampy", "Halloween Hill", True), + LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), + LLEntrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", player)), + LLEntrance("Castle Vampy Skull Jail", "Castle Vampy II", True), + LLEntrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", player, 4)), + LLEntrance("Castle Vampy II", "Castle Vampy Skull Jail", True), + LLEntrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", player)), + LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", player)), + LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy III", True), + LLEntrance("Castle Vampy II NE", "Castle Vampy", True), + LLEntrance("Castle Vampy II NE", "Castle Vampy III NE", True), + LLEntrance("Castle Vampy II SE", "Castle Vampy", True), + LLEntrance("Castle Vampy II SE", "Castle Vampy III SE", True), + LLEntrance("Castle Vampy II SW", "Castle Vampy", True), + LLEntrance("Castle Vampy II SW", "Castle Vampy III SW", True), + LLEntrance("Castle Vampy II NW", "Castle Vampy", True), + LLEntrance("Castle Vampy II NW", "Castle Vampy III NW", True), + LLEntrance("Cabin In The Woods", "Halloween Hill", True), + LLEntrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), + LLEntrance( + "Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", player) + ), + LLEntrance( + "Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", player) + ), + LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), + LLEntrance("Castle Vampy III NE", "Castle Vampy II NE", True), + LLEntrance("Castle Vampy III NE", "Castle Vampy IV NE", True), + LLEntrance("Castle Vampy III SE", "Castle Vampy II SE", True), + LLEntrance("Castle Vampy III SE", "Castle Vampy IV SE", True), + LLEntrance("Castle Vampy III SW", "Castle Vampy II SW", True), + LLEntrance("Castle Vampy III SW", "Castle Vampy IV SW", True), + LLEntrance("Castle Vampy III NW", "Castle Vampy II NW", True), + LLEntrance("Castle Vampy III NW", "Castle Vampy IV NW", True), + LLEntrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), + LLEntrance( + "Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", player, 8) + ), + LLEntrance("Castle Vampy IV NE", "Castle Vampy III NE", True), + LLEntrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), + LLEntrance("Castle Vampy IV SE", "Castle Vampy III SE", True), + LLEntrance("Castle Vampy IV SE", "Castle Vampy Roof SE", True), + LLEntrance("Castle Vampy IV SW", "Castle Vampy III SW", True), + LLEntrance("Castle Vampy IV SW", "Castle Vampy Roof SW", True), + LLEntrance("Castle Vampy IV NW", "Castle Vampy III NW", True), + LLEntrance("Castle Vampy IV NW", "Castle Vampy Roof NW", True), + LLEntrance("A Cabin Collector", "Halloween Hill", True), + LLEntrance("Castle Vampy Roof NE", "Castle Vampy IV NE", True), + LLEntrance("Castle Vampy Roof SE", "Castle Vampy IV SE", True), + LLEntrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), + LLEntrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), + LLEntrance("The Evilizer", "Halloween Hill", True), + LLEntrance( + "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, player) + ), + LLEntrance("The Heart Of Terror", "The Evilizer", True), + LLEntrance("The Heart Of Terror", "Empty Rooftop", True), + LLEntrance("A Hidey-Hole", "Halloween Hill", True), + LLEntrance("Empty Rooftop", "Halloween Hill", True), + LLEntrance("Swampdog Lair Entrance", "Swampdog Lair", False, lambda state: state.has("Boots", player)), + LLEntrance("Swampdog Lair", "Swampdog Lair Entrance", True), + LLEntrance("Larry's Lair", "Halloween Hill", True), + LLEntrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LLEntrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", player)), + LLEntrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LLEntrance("Zombiton", "Halloween Hill", False), + LLEntrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player)), + LLEntrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player)), + LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), + LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", player)), + LLEntrance( + "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player) + ), + LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), + ] for region in multiworld.get_regions(player): for entry in loonyland_entrance_table: if entry.source_region == region.name: diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index a955e6d67195..6b563ff01e5c 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -1,13 +1,22 @@ -loonyland_base_id: int = 2876900 +from BaseClasses import ItemClassification, Region, Tutorial -from BaseClasses import Region, Tutorial, ItemClassification, Location from worlds.AutoWorld import WebWorld, World -from .Items import LoonylandItem -from .Locations import LoonylandLocation, LL_Location -from .Options import LoonylandOptions -from .Entrances import LoonylandEntrance -from .Data.game_data import * +from .Data.game_data import ( + VAR_WBOMBS, + VAR_WHOTPANTS, + loony_item_table, + loonyland_location_table, + loonyland_region_table, + set_entrance_rules, + set_rules, +) +from .Data.game_data import ( + ll_base_id as loonyland_base_id, +) +from .items import LLItemCat, LoonylandItem +from .locations import LoonylandLocation +from .options import LoonylandOptions class LoonylandWebWorld(WebWorld): @@ -35,15 +44,23 @@ class LoonylandWorld(World): location_name_to_id = {name: data.id + loonyland_base_id for name, data in loonyland_location_table.items()} item_name_to_id = {name: data.id for name, data in loony_item_table.items()} + item_name_groups = { + "cheats": {name for name, data in loony_item_table.items() if data.category == LLItemCat.CHEAT}, + "special_weapons": {name for name, data in loony_item_table.items() if VAR_WBOMBS <= data.id <= VAR_WHOTPANTS} + } + def create_item(self, name: str) -> LoonylandItem: return LoonylandItem(name, loony_item_table[name].classification, loony_item_table[name].id, self.player) def create_items(self) -> None: - item_pool: List[LoonylandItem] = [] + item_pool: list[LoonylandItem] = [] for name, item in loony_item_table.items(): if item.id and item.can_create(self.multiworld, self.player): for i in range(item.frequency): - item_pool.append(self.create_item(name)) + new_item = self.create_item(name) + new_item.cheat = item.category==LLItemCat.CHEAT + item_pool.append(new_item) + self.multiworld.itempool += item_pool @@ -80,5 +97,6 @@ def set_rules(self): def fill_slot_data(self): return { - "DeathLink": self.options.death_link.value - } \ No newline at end of file + "DeathLink": self.options.death_link.value, + "Difficulty": self.options.difficulty.value + } diff --git a/worlds/loonyland/Entrances.py b/worlds/loonyland/entrances.py similarity index 77% rename from worlds/loonyland/Entrances.py rename to worlds/loonyland/entrances.py index 909b28746d6c..eef47e901962 100644 --- a/worlds/loonyland/Entrances.py +++ b/worlds/loonyland/entrances.py @@ -1,7 +1,7 @@ -import typing from typing import NamedTuple from BaseClasses import Entrance + from worlds.generic.Rules import CollectionRule @@ -9,9 +9,9 @@ class LoonylandEntrance(Entrance): game = "Loonyland" -class LL_Entrance(NamedTuple): +class LLEntrance(NamedTuple): source_region: str target_region: str is_real_loading_zone: bool # rule: typing.Callable[[player, state], bool] - rule: CollectionRule = lambda state: True \ No newline at end of file + rule: CollectionRule = lambda state: True diff --git a/worlds/loonyland/Items.py b/worlds/loonyland/items.py similarity index 75% rename from worlds/loonyland/Items.py rename to worlds/loonyland/items.py index 22a1dda9d108..210f06eb29fb 100644 --- a/worlds/loonyland/Items.py +++ b/worlds/loonyland/items.py @@ -1,15 +1,17 @@ -from typing import NamedTuple, Callable +from enum import Enum +from typing import Callable, NamedTuple from BaseClasses import Item, ItemClassification, MultiWorld -from enum import Enum + class LoonylandItem(Item): """ Item from the game Loonyland """ game: str = "Loonyland" + cheat: bool = False -class LL_ItemCat(Enum): +class LLItemCat(Enum): ITEM = 0 CHEAT = 1 FILLER = 2 @@ -17,9 +19,9 @@ class LL_ItemCat(Enum): EVENT = 4 -class LL_Item(NamedTuple): +class LLItem(NamedTuple): id: int - category: LL_ItemCat + category: LLItemCat classification: ItemClassification frequency: int = 1 can_create: Callable[[MultiWorld, int], bool] = lambda multiworld, player: True diff --git a/worlds/loonyland/Locations.py b/worlds/loonyland/locations.py similarity index 66% rename from worlds/loonyland/Locations.py rename to worlds/loonyland/locations.py index d52e484f61c7..364a46a8a22a 100644 --- a/worlds/loonyland/Locations.py +++ b/worlds/loonyland/locations.py @@ -1,25 +1,23 @@ from enum import Enum -from typing import NamedTuple, Callable +from typing import Callable, NamedTuple from BaseClasses import Location, MultiWorld -loonyland_base_id: int = 2876900 - class LoonylandLocation(Location): game = "Loonyland" -class LL_LocCat(Enum): +class LLLocCat(Enum): PICKUP = 0 QUEST = 1 BADGE = 2 EVENT = 4 -class LL_Location(NamedTuple): +class LLLocation(NamedTuple): id: int - category: LL_LocCat + category: LLLocCat region: str can_create: Callable[[MultiWorld, int], bool] = lambda multiworld, player: True diff --git a/worlds/loonyland/Options.py b/worlds/loonyland/options.py similarity index 92% rename from worlds/loonyland/Options.py rename to worlds/loonyland/options.py index e04a70bac279..dc3383f932e9 100644 --- a/worlds/loonyland/Options.py +++ b/worlds/loonyland/options.py @@ -1,6 +1,6 @@ from dataclasses import dataclass -from Options import Choice, PerGameCommonOptions, DeathLink +from Options import Choice, DeathLink, PerGameCommonOptions class WinCondition(Choice): diff --git a/worlds/loonyland/Regions.py b/worlds/loonyland/regions.py similarity index 98% rename from worlds/loonyland/Regions.py rename to worlds/loonyland/regions.py index 4c021ba7a3cd..93b1eb9c5853 100644 --- a/worlds/loonyland/Regions.py +++ b/worlds/loonyland/regions.py @@ -1,5 +1,8 @@ from typing import NamedTuple + from BaseClasses import Region + + class LoonylandRegion(Region): game = "Loonyland" diff --git a/worlds/loonyland/ruff.toml b/worlds/loonyland/ruff.toml new file mode 100644 index 000000000000..d0f613db3dc4 --- /dev/null +++ b/worlds/loonyland/ruff.toml @@ -0,0 +1,9 @@ +line-length = 120 + +[lint] +select = ["C", "E", "F", "R", "W", "I", "N", "Q", "UP", "RUF", "ISC", "T20"] +ignore = ["C9", "RUF012", "RUF100"] + +[lint.per-file-ignores] +# The way options definitions work right now, world devs are forced to break line length requirements. +"options.py" = ["E501"] diff --git a/worlds/loonyland/Rules.py b/worlds/loonyland/rules.py similarity index 75% rename from worlds/loonyland/Rules.py rename to worlds/loonyland/rules.py index faa27ce38f88..b9bd1bcd9a0b 100644 --- a/worlds/loonyland/Rules.py +++ b/worlds/loonyland/rules.py @@ -1,8 +1,10 @@ from BaseClasses import CollectionState + def have_light_source(state: CollectionState, player: int) -> bool: - return state.has("Lantern", player) or (state.has("Stick", player) and state.has("Boots", player) and state.can_reach_region("Swamp Gas Cavern", player)) + return state.has("Lantern", player) or (state.has("Stick", player) and + state.has("Boots", player) and state.can_reach_region("Swamp Gas Cavern", player)) # 20/20 when badges added @@ -41,4 +43,14 @@ def can_cleanse_crypts(state: CollectionState, player: int) -> bool: return (have_light_source(state, player) and have_special_weapon_range_damage(state, player) and state.can_reach_region("Musty Crypt", player) and state.can_reach_region("Dusty Crypt", player) and - state.can_reach_region("Rusty Crypt", player) ) \ No newline at end of file + state.can_reach_region("Rusty Crypt", player) ) + +def hundred_percent(state: CollectionState, player: int) -> bool: + return False + +def have_39_badges(state: CollectionState, player: int) -> bool: + return state.has_from_list_unique(state.multiworld.worlds[player].item_name_groups["cheats"], player, 39) + +def have_all_weapons(state: CollectionState, player: int) -> bool: + return state.has_all(state.multiworld.worlds[player].item_name_groups["special_weapons"], player) + From 4f42ef3e02ac8e20f011d839567991e75012e33b Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 21 Dec 2024 13:41:10 -0500 Subject: [PATCH 36/58] ruff format --- worlds/loonyland/__init__.py | 16 +++++--------- worlds/loonyland/items.py | 2 ++ worlds/loonyland/locations.py | 2 -- worlds/loonyland/options.py | 5 +++-- worlds/loonyland/regions.py | 1 + worlds/loonyland/rules.py | 41 ++++++++++++++++++++--------------- 6 files changed, 36 insertions(+), 31 deletions(-) diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 6b563ff01e5c..afc71517515d 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -28,7 +28,7 @@ class LoonylandWebWorld(WebWorld): language="English", file_name="guide_en.md", link="guide/en", - authors=["AutomaticFrenzy"] + authors=["AutomaticFrenzy"], ) tutorials = [setup_en] @@ -46,7 +46,7 @@ class LoonylandWorld(World): item_name_groups = { "cheats": {name for name, data in loony_item_table.items() if data.category == LLItemCat.CHEAT}, - "special_weapons": {name for name, data in loony_item_table.items() if VAR_WBOMBS <= data.id <= VAR_WHOTPANTS} + "special_weapons": {name for name, data in loony_item_table.items() if VAR_WBOMBS <= data.id <= VAR_WHOTPANTS}, } def create_item(self, name: str) -> LoonylandItem: @@ -58,10 +58,9 @@ def create_items(self) -> None: if item.id and item.can_create(self.multiworld, self.player): for i in range(item.frequency): new_item = self.create_item(name) - new_item.cheat = item.category==LLItemCat.CHEAT + new_item.cheat = item.category == LLItemCat.CHEAT item_pool.append(new_item) - self.multiworld.itempool += item_pool def create_event(self, event: str) -> LoonylandItem: @@ -90,13 +89,10 @@ def set_rules(self): final_loc.place_locked_item(self.create_event("Victory")) self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) - #location rules + # location rules set_rules(self.multiworld, self, self.player) - #entrance rules + # entrance rules set_entrance_rules(self.multiworld, self, self.player) def fill_slot_data(self): - return { - "DeathLink": self.options.death_link.value, - "Difficulty": self.options.difficulty.value - } + return {"DeathLink": self.options.death_link.value, "Difficulty": self.options.difficulty.value} diff --git a/worlds/loonyland/items.py b/worlds/loonyland/items.py index 210f06eb29fb..9e1671ba2ff7 100644 --- a/worlds/loonyland/items.py +++ b/worlds/loonyland/items.py @@ -8,9 +8,11 @@ class LoonylandItem(Item): """ Item from the game Loonyland """ + game: str = "Loonyland" cheat: bool = False + class LLItemCat(Enum): ITEM = 0 CHEAT = 1 diff --git a/worlds/loonyland/locations.py b/worlds/loonyland/locations.py index 364a46a8a22a..e449d2140016 100644 --- a/worlds/loonyland/locations.py +++ b/worlds/loonyland/locations.py @@ -20,5 +20,3 @@ class LLLocation(NamedTuple): category: LLLocCat region: str can_create: Callable[[MultiWorld, int], bool] = lambda multiworld, player: True - - diff --git a/worlds/loonyland/options.py b/worlds/loonyland/options.py index dc3383f932e9..9e2602b4cb83 100644 --- a/worlds/loonyland/options.py +++ b/worlds/loonyland/options.py @@ -14,8 +14,10 @@ class WinCondition(Choice): option_normal_remix = 2 default = 0 + class Difficulty(Choice): """Difficulty Setting""" + display_name = "Difficulty" option_beginner = 0 option_normal = 1 @@ -28,7 +30,6 @@ class Difficulty(Choice): @dataclass class LoonylandOptions(PerGameCommonOptions): - #win_condition: WinCondition + # win_condition: WinCondition difficulty: Difficulty death_link: DeathLink - diff --git a/worlds/loonyland/regions.py b/worlds/loonyland/regions.py index 93b1eb9c5853..3bd9652b3024 100644 --- a/worlds/loonyland/regions.py +++ b/worlds/loonyland/regions.py @@ -6,6 +6,7 @@ class LoonylandRegion(Region): game = "Loonyland" + class LLRegion(NamedTuple): real: bool map: str = "" diff --git a/worlds/loonyland/rules.py b/worlds/loonyland/rules.py index b9bd1bcd9a0b..64b2cfdcaa2c 100644 --- a/worlds/loonyland/rules.py +++ b/worlds/loonyland/rules.py @@ -1,10 +1,10 @@ - from BaseClasses import CollectionState def have_light_source(state: CollectionState, player: int) -> bool: - return state.has("Lantern", player) or (state.has("Stick", player) and - state.has("Boots", player) and state.can_reach_region("Swamp Gas Cavern", player)) + return state.has("Lantern", player) or ( + state.has("Stick", player) and state.has("Boots", player) and state.can_reach_region("Swamp Gas Cavern", player) + ) # 20/20 when badges added @@ -12,26 +12,27 @@ def have_bombs(state: CollectionState, player: int) -> bool: return state.has("Bombs", player) # or werewolf badge when badges are added + def have_special_weapon_damage(state: CollectionState, player: int) -> bool: - return ( - state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) - ) -#needed for gutsy + return state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) + # needed for gutsy def have_special_weapon_bullet(state: CollectionState, player: int) -> bool: return True - #always true as the default character, eventually will be fancier when other starting characters are an option - #return ( + # always true as the default character, eventually will be fancier when other starting characters are an option + # return ( # state.has_any(("Bombs", "Ice Spear", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) - #) + # ) + def have_special_weapon_range_damage(state: CollectionState, player: int) -> bool: return True # always true as the default character - #return ( + # return ( # state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang"), player) - #) + # ) + def have_special_weapon_through_walls(state: CollectionState, player: int) -> bool: return ( @@ -39,18 +40,24 @@ def have_special_weapon_through_walls(state: CollectionState, player: int) -> bo # state.has("Hot Pants") technically possible, but only on diagonals ) + def can_cleanse_crypts(state: CollectionState, player: int) -> bool: - return (have_light_source(state, player) and have_special_weapon_range_damage(state, player) and - state.can_reach_region("Musty Crypt", player) and - state.can_reach_region("Dusty Crypt", player) and - state.can_reach_region("Rusty Crypt", player) ) + return ( + have_light_source(state, player) + and have_special_weapon_range_damage(state, player) + and state.can_reach_region("Musty Crypt", player) + and state.can_reach_region("Dusty Crypt", player) + and state.can_reach_region("Rusty Crypt", player) + ) + def hundred_percent(state: CollectionState, player: int) -> bool: return False + def have_39_badges(state: CollectionState, player: int) -> bool: return state.has_from_list_unique(state.multiworld.worlds[player].item_name_groups["cheats"], player, 39) + def have_all_weapons(state: CollectionState, player: int) -> bool: return state.has_all(state.multiworld.worlds[player].item_name_groups["special_weapons"], player) - From a1799b81c9b0a34a0a0542815820e0b91d0c2b1b Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 21 Dec 2024 19:42:56 -0500 Subject: [PATCH 37/58] junk filler access items more data --- worlds/loonyland/Data/game_data.py | 131 +++++++++++++++++++---------- worlds/loonyland/__init__.py | 19 ++++- worlds/loonyland/items.py | 1 + worlds/loonyland/rules.py | 4 +- 4 files changed, 106 insertions(+), 49 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index 86b095729a43..5b4e55c953dd 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -305,6 +305,13 @@ CH_REGEN = 38 CH_NOFARLEY = 39 AP_BADGEMOD = 1000 +AP_MODEMOD = 2000 +MODE_SURVIVAL = 0 +MODE_BOSSBASH = 1 +MODE_LOONYBALL = 2 +MODE_BOWLING = 3 +MODE_BADGES = 4 +MODE_REMIX = 5 loony_item_table: dict[str, LLItem] = { "Heart": LLItem(ll_base_id + VAR_HEART, LLItemCat.ITEM, ItemClassification.useful, 20), "Lightning": LLItem(ll_base_id + VAR_LIGHTNING, LLItemCat.ITEM, ItemClassification.useful, 10), @@ -338,46 +345,69 @@ "Lantern": LLItem(ll_base_id + VAR_LANTERN, LLItemCat.ITEM, ItemClassification.progression), "Reflect Gem": LLItem(ll_base_id + VAR_REFLECT, LLItemCat.ITEM, ItemClassification.useful), "Silver Sling": LLItem(ll_base_id + VAR_SILVERSLING, LLItemCat.ITEM, ItemClassification.progression), - "20/20 Vision": LLItem(ll_base_id + CH_LIGHT, LLItemCat.CHEAT, ItemClassification.progression), - "Disco Mode": LLItem(ll_base_id + CH_DISCO, LLItemCat.CHEAT, ItemClassification.filler), - "Terror Mode": LLItem(ll_base_id + CH_TERROR, LLItemCat.CHEAT, ItemClassification.progression), - "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE, LLItemCat.CHEAT, ItemClassification.progression), - "Quick Mode": LLItem(ll_base_id + CH_QUICK, LLItemCat.CHEAT, ItemClassification.useful), - "Infinite Gems": LLItem(ll_base_id + CH_GEMS, LLItemCat.CHEAT, ItemClassification.useful), - "Sidekick": LLItem(ll_base_id + CH_SIDEKICK, LLItemCat.CHEAT, ItemClassification.filler), - "Homing Shots": LLItem(ll_base_id + CH_HOMING, LLItemCat.CHEAT, ItemClassification.useful), - "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER, LLItemCat.CHEAT, ItemClassification.filler), - "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE, LLItemCat.CHEAT, ItemClassification.useful), - "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA, LLItemCat.CHEAT, ItemClassification.useful), - "Play As Toad": LLItem(ll_base_id + CH_TOAD, LLItemCat.CHEAT, ItemClassification.useful), - "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL, LLItemCat.CHEAT, ItemClassification.useful), - "Radar": LLItem(ll_base_id + CH_RADAR, LLItemCat.CHEAT, ItemClassification.useful), - "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT, LLItemCat.CHEAT, ItemClassification.useful), - "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE, LLItemCat.CHEAT, ItemClassification.filler), - "Touch Of Death": LLItem(ll_base_id + CH_DEATH, LLItemCat.CHEAT, ItemClassification.progression), - "All Access Pass": LLItem(ll_base_id + CH_ALLACCESS, LLItemCat.CHEAT, ItemClassification.filler), - "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG, LLItemCat.CHEAT, ItemClassification.progression), - "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE, LLItemCat.CHEAT, ItemClassification.filler), - "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY, LLItemCat.CHEAT, ItemClassification.useful), - "Guided Shots": LLItem(ll_base_id + CH_GUIDED, LLItemCat.CHEAT, ItemClassification.useful), - "Slo-Mo": LLItem(ll_base_id + CH_SLOMO, LLItemCat.CHEAT, ItemClassification.useful), - "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE, LLItemCat.CHEAT, ItemClassification.useful), - "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN, LLItemCat.CHEAT, ItemClassification.filler), - "Play As Witch": LLItem(ll_base_id + CH_WITCH, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF, LLItemCat.CHEAT, ItemClassification.useful), - "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN, LLItemCat.CHEAT, ItemClassification.filler), - "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT, LLItemCat.CHEAT, ItemClassification.filler), - "Infinite Survival": LLItem(ll_base_id + CH_RNDSURVIVAL, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Summony": LLItem(ll_base_id + CH_SUMMON, LLItemCat.CHEAT, ItemClassification.useful), - "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF, LLItemCat.CHEAT, ItemClassification.progression), - "Molecular Dispersion": LLItem(ll_base_id + CH_WALLWALK, LLItemCat.CHEAT, ItemClassification.progression), - "Guaranteed Survival": LLItem(ll_base_id + CH_SUPERSURV, LLItemCat.CHEAT, ItemClassification.useful), - "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND, LLItemCat.CHEAT, ItemClassification.useful), - "Stinky Farley": LLItem(ll_base_id + CH_STINKY, LLItemCat.CHEAT, ItemClassification.useful), - "Ultra Weapons Are Go!": LLItem(ll_base_id + CH_ULTRAWEAPON, LLItemCat.CHEAT, ItemClassification.useful), - "Thorns Aura": LLItem(ll_base_id + CH_THORNS, LLItemCat.CHEAT, ItemClassification.useful), - "Monster Regeneration": LLItem(ll_base_id + CH_REGEN, LLItemCat.CHEAT, ItemClassification.filler), - "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY, LLItemCat.CHEAT, ItemClassification.filler), + "20/20 Vision": LLItem(ll_base_id + CH_LIGHT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Disco Mode": LLItem(ll_base_id + CH_DISCO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Terror Mode": LLItem(ll_base_id + CH_TERROR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Quick Mode": LLItem(ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Infinite Gems": LLItem(ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Ultimate Firepower": LLItem( + ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), + "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Toad": LLItem(ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Radar": LLItem(ll_base_id + CH_RADAR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Touch Of Death": LLItem(ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "All Access Pass": LLItem(ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Guided Shots": LLItem(ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Slo-Mo": LLItem(ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Witch": LLItem(ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Infinite Survival": LLItem( + ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), + "Play As Summony": LLItem(ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Molecular Dispersion": LLItem( + ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), + "Guaranteed Survival": LLItem( + ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), + "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Stinky Farley": LLItem(ll_base_id + CH_STINKY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Ultra Weapons Are Go!": LLItem( + ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), + "Thorns Aura": LLItem(ll_base_id + CH_THORNS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Monster Regeneration": LLItem( + ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), + "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Bowling Access": LLItem(ll_base_id + MODE_BOWLING + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Survival Access": LLItem( + ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Boss Bash Access": LLItem( + ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Loony Ball Access": LLItem( + ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Remix Access": LLItem(ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), } loonyland_region_table: dict[str, LLRegion] = { "Menu": LLRegion(False), @@ -589,11 +619,19 @@ "Q: Scaredy Cat": LLLocation(96, LLLocCat.QUEST, "Halloween Hill"), "Q: Sticky Shoes": LLLocation(97, LLLocCat.QUEST, "Halloween Hill"), "Q: Mushroom Hunt": LLLocation(98, LLLocCat.QUEST, "The Witch's Cabin"), + "Q: Picking Daisies": LLLocation(99, LLLocCat.QUEST, "Menu"), + "Q: Curse The Darkness": LLLocation(100, LLLocCat.QUEST, "Swamp Gas Cavern"), "Q: Zombie Stomp": LLLocation(101, LLLocCat.QUEST, "Zombiton"), "Q: Smashing Pumpkins": LLLocation(102, LLLocCat.QUEST, "Halloween Hill"), + "Q: Mystery Lake": LLLocation(103, LLLocCat.QUEST, "Halloween Hill"), + "Q: Beneath The Lake": LLLocation(104, LLLocCat.QUEST, "Frankenjulie's Laboratory"), + "Q: Happy Stick?!?": LLLocation(105, LLLocCat.QUEST, "Happy Stick Woods"), + "Q: A True Hero": LLLocation(106, LLLocCat.QUEST, "Under The Ravine"), "Q: Silver Bullet": LLLocation(107, LLLocCat.QUEST, "Zombiton"), "Q: Hairy Larry": LLLocation(108, LLLocCat.QUEST, "The Wolf Den"), "Q: Ghostbusting": LLLocation(109, LLLocCat.QUEST, "The Witch's Cabin"), + "Q: The Haunted Tower": LLLocation(110, LLLocCat.QUEST, "Haunted Tower Roof"), + "Q: The Last Gate": LLLocation(111, LLLocCat.QUEST, "Castle Vampy IV"), "Q: The Rescue": LLLocation(112, LLLocCat.QUEST, "A Gloomy Cavern"), "Q: The Collection": LLLocation(113, LLLocCat.QUEST, "A Cabin Collector"), "Evil Smashin'": LLLocation(114, LLLocCat.BADGE, "The Evilizer"), @@ -673,9 +711,12 @@ def set_rules(multiworld, world, player): "Q: Mushroom Hunt": lambda state: state.has("Mushroom", player, 10), "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), + "Q: Mystery Lake": lambda state: state.has("Orb", player, 4), + "Q: A True Hero": lambda state: state.has("Fertilizer", player), "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, player) and state.has("Silver", player), "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", player), "Q: Ghostbusting": lambda state: state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), + "Q: The Last Gate": lambda state: state.has("Vampire Bust", player, 8), "Q: The Collection": lambda state: state.has("Silver Sling", player) and state.has("Ghost Potion", player) and state.can_reach_region("Castle Vampy", player), @@ -703,11 +744,11 @@ def set_rules(multiworld, world, player): def set_entrance_rules(multiworld, world, player): loonyland_entrance_table: list[LLEntrance] = [ LLEntrance("Menu", "Halloween Hill", False), - LLEntrance("Menu", "Bowling", False), - LLEntrance("Menu", "Survival", False), - LLEntrance("Menu", "Boss Bash", False), - LLEntrance("Menu", "Loony Ball", False), - LLEntrance("Menu", "Remix", False), + LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", player)), + LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", player)), + LLEntrance("Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", player)), + LLEntrance("Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", player)), + LLEntrance("Menu", "Remix", False, lambda state: state.has("Remix Access", player)), LLEntrance("Halloween Hill", "A Cabin Trees", True), LLEntrance("Halloween Hill", "The Witch's Cabin", True), LLEntrance("Halloween Hill", "Bonita's Cabin", True), diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index afc71517515d..d63c89b3a320 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -15,7 +15,7 @@ ll_base_id as loonyland_base_id, ) from .items import LLItemCat, LoonylandItem -from .locations import LoonylandLocation +from .locations import LLLocCat, LoonylandLocation from .options import LoonylandOptions @@ -46,12 +46,24 @@ class LoonylandWorld(World): item_name_groups = { "cheats": {name for name, data in loony_item_table.items() if data.category == LLItemCat.CHEAT}, - "special_weapons": {name for name, data in loony_item_table.items() if VAR_WBOMBS <= data.id <= VAR_WHOTPANTS}, + "special_weapons": { + name + for name, data in loony_item_table.items() + if VAR_WBOMBS <= data.id - loonyland_base_id <= VAR_WHOTPANTS + }, + } + + location_name_groups = { + "quests": {name for name, data in loonyland_location_table.items() if data.category == LLLocCat.QUEST}, + "badges": {name for name, data in loonyland_location_table.items() if data.category == LLLocCat.BADGE}, } def create_item(self, name: str) -> LoonylandItem: return LoonylandItem(name, loony_item_table[name].classification, loony_item_table[name].id, self.player) + def create_junk(self, name: str) -> LoonylandItem: + return LoonylandItem(name, ItemClassification.filler, loonyland_base_id + 3000, self.player) + def create_items(self) -> None: item_pool: list[LoonylandItem] = [] for name, item in loony_item_table.items(): @@ -61,6 +73,9 @@ def create_items(self) -> None: new_item.cheat = item.category == LLItemCat.CHEAT item_pool.append(new_item) + junk = len(self.multiworld.get_unfilled_locations(self.player)) - len(item_pool) - 1 # - 1 for win con location + item_pool += [self.create_junk(self.get_filler_item_name()) for _ in range(junk)] + self.multiworld.itempool += item_pool def create_event(self, event: str) -> LoonylandItem: diff --git a/worlds/loonyland/items.py b/worlds/loonyland/items.py index 9e1671ba2ff7..041ce0611e1b 100644 --- a/worlds/loonyland/items.py +++ b/worlds/loonyland/items.py @@ -19,6 +19,7 @@ class LLItemCat(Enum): FILLER = 2 TRAP = 3 EVENT = 4 + ACCESS = 5 class LLItem(NamedTuple): diff --git a/worlds/loonyland/rules.py b/worlds/loonyland/rules.py index 64b2cfdcaa2c..b442e533b038 100644 --- a/worlds/loonyland/rules.py +++ b/worlds/loonyland/rules.py @@ -56,8 +56,8 @@ def hundred_percent(state: CollectionState, player: int) -> bool: def have_39_badges(state: CollectionState, player: int) -> bool: - return state.has_from_list_unique(state.multiworld.worlds[player].item_name_groups["cheats"], player, 39) + return state.has_group("cheats", player, 10) def have_all_weapons(state: CollectionState, player: int) -> bool: - return state.has_all(state.multiworld.worlds[player].item_name_groups["special_weapons"], player) + return state.has_group("special_weapons", player, 7) From ae74b5debf8c6ab90f6c86a8c399839f4f9bec3b Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Mon, 23 Dec 2024 10:37:48 -0500 Subject: [PATCH 38/58] Doll support --- worlds/loonyland/Data/game_data.py | 284 ++++++++--------------------- worlds/loonyland/items.py | 1 + worlds/loonyland/locations.py | 2 + worlds/loonyland/rules.py | 23 ++- 4 files changed, 105 insertions(+), 205 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index 5b4e55c953dd..9314881b3df4 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -14,6 +14,15 @@ have_special_weapon_bullet, have_special_weapon_damage, hundred_percent, + can_kill_werewolves, + can_reach_bats, + can_reach_skeleton, + can_reach_frog, + can_reach_ghost, + can_reach_mummy, + can_reach_swampdog, + can_reach_vampire, + can_reach_wolves, ) ll_base_id: int = 2876900 @@ -61,6 +70,14 @@ VAR_VAMPSTAND = 172 VAR_KNOWWOLVES = 180 VAR_DOLL = 181 +VAR_BATDOLL = 181 +VAR_SKELDOLL = 182 +VAR_FROGDOLL = 183 +VAR_GHOSTDOLL = 184 +VAR_MUMMYDOLL = 185 +VAR_SWAMPDOLL = 186 +VAR_VAMPDOLL = 187 +VAR_WOLFDOLL = 188 VAR_REFLECT = 189 VAR_DOLLGIVEN = 190 VAR_TOWNOPEN = 198 @@ -306,6 +323,7 @@ CH_NOFARLEY = 39 AP_BADGEMOD = 1000 AP_MODEMOD = 2000 +AP_FILLERMOD = 3000 MODE_SURVIVAL = 0 MODE_BOSSBASH = 1 MODE_LOONYBALL = 2 @@ -353,9 +371,7 @@ "Infinite Gems": LLItem(ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Ultimate Firepower": LLItem( - ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Play As Toad": LLItem(ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), @@ -376,37 +392,19 @@ "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Infinite Survival": LLItem( - ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Infinite Survival": LLItem(ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Play As Summony": LLItem(ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Molecular Dispersion": LLItem( - ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), - "Guaranteed Survival": LLItem( - ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Stinky Farley": LLItem(ll_base_id + CH_STINKY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Ultra Weapons Are Go!": LLItem( - ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Ultra Weapons Are Go!": LLItem(ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Thorns Aura": LLItem(ll_base_id + CH_THORNS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Monster Regeneration": LLItem( - ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Monster Regeneration": LLItem(ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Bowling Access": LLItem(ll_base_id + MODE_BOWLING + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Survival Access": LLItem( - ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Boss Bash Access": LLItem( - ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Loony Ball Access": LLItem( - ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), + "Survival Access": LLItem(ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Boss Bash Access": LLItem(ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Loony Ball Access": LLItem(ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), "Remix Access": LLItem(ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), } loonyland_region_table: dict[str, LLRegion] = { @@ -615,7 +613,7 @@ "Swampdog Lair: Entrance": LLLocation(92, LLLocCat.PICKUP, "Swampdog Lair"), "Swampdog Lair: End": LLLocation(93, LLLocCat.PICKUP, "Swampdog Lair"), "Q: Save Halloween Hill": LLLocation(94, LLLocCat.QUEST, "The Evilizer"), - "Q: Tree Trimming": LLLocation(95, LLLocCat.QUEST, "A Cabin Trees"), + "Q: Tree Trimming": LLLocation(95, LLLocCat.QUEST, "Halloween Hill"), "Q: Scaredy Cat": LLLocation(96, LLLocCat.QUEST, "Halloween Hill"), "Q: Sticky Shoes": LLLocation(97, LLLocCat.QUEST, "Halloween Hill"), "Q: Mushroom Hunt": LLLocation(98, LLLocCat.QUEST, "The Witch's Cabin"), @@ -670,13 +668,15 @@ "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, "Survival"), "Hooliganin'": LLLocation(148, LLLocCat.BADGE, "Loony Ball"), "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, "Menu"), - "Scorin'": LLLocation(150, LLLocCat.BADGE, "Menu"), + "Scorin'": LLLocation(150, LLLocCat.BADGE, "The Evilizer"), "Brawlin'": LLLocation(151, LLLocCat.BADGE, "Benny's Cocktails"), "Minin' For Treasure": LLLocation(152, LLLocCat.BADGE, "Remix"), "Digitally Masterin'": LLLocation(153, LLLocCat.BADGE, "Menu"), + "Tree Trimming Reward": LLLocation(154, LLLocCat.REWARD, "A Cabin Trees"), + "Larry's Wife Reward": LLLocation(155, LLLocCat.REWARD, "A Cabin Larry"), + "Farmer Reward": LLLocation(156, LLLocCat.REWARD, "Halloween Hill"), + "Mayor Reward": LLLocation(157, LLLocCat.REWARD, "Zombiton"), } - - def set_rules(multiworld, world, player): access_rules: dict[str, CollectionRule] = { "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", player), @@ -692,23 +692,21 @@ def set_rules(multiworld, world, player): "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, player), "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", player), "Under The Lake: Bat Door": lambda state: state.has("Bat Key", player), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) - and state.has("Skull Key", player) - and state.has("Pumpkin Key", player), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), "Wolf Den: Vine": lambda state: state.has("Fertilizer", player), "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", player), "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", player), "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) - and state.has("Silver Sling", player), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) - and state.has("Silver Sling", player), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) and can_kill_werewolves(state, player), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) and can_kill_werewolves(state, player), "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), "Swampdog Lair: End": lambda state: have_light_source(state, player) and state.has("Fertilizer", player), "Q: Scaredy Cat": lambda state: state.has("Cat", player), "Q: Mushroom Hunt": lambda state: state.has("Mushroom", player, 10), + "Q: Picking Daisies": lambda state: state.has("Doom Daisy", player), + "Q: Curse The Darkness": lambda state: state.has("Stick", player), "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), "Q: Mystery Lake": lambda state: state.has("Orb", player, 4), @@ -717,15 +715,11 @@ def set_rules(multiworld, world, player): "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", player), "Q: Ghostbusting": lambda state: state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), "Q: The Last Gate": lambda state: state.has("Vampire Bust", player, 8), - "Q: The Collection": lambda state: state.has("Silver Sling", player) - and state.has("Ghost Potion", player) - and state.can_reach_region("Castle Vampy", player), + "Q: The Collection": lambda state: can_kill_werewolves(state, player) and state.has("Ghost Potion", player) and state.can_reach_region("Castle Vampy", player), + "Animal Control": lambda state: can_kill_werewolves(state, player), "Cleanin' Up": lambda state: have_bombs(state, player), "Extreme Survivin'": lambda state: state.has("Terror Mode", player), - "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", player) - and state.can_reach_region("Zombiton", player) - and state.can_reach_region("Slurpy Swamp Mud", player) - and state.has("Silver Sling", player), + "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", player) and state.can_reach_region("Zombiton", player) and state.can_reach_region("Slurpy Swamp Mud", player) and can_kill_werewolves(state, player), "Advanced Winnin'": lambda state: hundred_percent(state, player), "Mad Skeelz": lambda state: state.has("Terror Mode", player), "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", player), @@ -735,12 +729,13 @@ def set_rules(multiworld, world, player): "Swampdoggin'": lambda state: state.has("Play As Swampdog", player), "Brawlin'": lambda state: state.has("Touch Of Death", player), "Digitally Masterin'": lambda state: have_39_badges(state, player), + "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", player) and can_cleanse_crypts(state, player), + "Farmer Reward": lambda state: can_cleanse_crypts(state, player), + "Mayor Reward": lambda state: can_cleanse_crypts(state, player), } for loc in multiworld.get_locations(player): if loc.name in access_rules: add_rule(loc, access_rules[loc.name]) - - def set_entrance_rules(multiworld, world, player): loonyland_entrance_table: list[LLEntrance] = [ LLEntrance("Menu", "Halloween Hill", False), @@ -775,9 +770,7 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Zombiton", "A Cabin Larry", True), LLEntrance("Halloween Hill", "The Wolf Den Entrance", True), LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", player)), - LLEntrance( - "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, player) - ), + LLEntrance("Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, player)), LLEntrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), LLEntrance("Vampy Land", "Castle Vampy", True), LLEntrance("Halloween Hill", "Cabin In The Woods", True), @@ -820,183 +813,71 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), LLEntrance("Haunted Tower", "Haunted Basement Entrance", False), LLEntrance("Haunted Tower", "Haunted Tower Stairs Up", False), - LLEntrance( - "Haunted Tower", - "Haunted Tower Stairs Down", - False, - lambda state: state.has("Bat Key", player) - and state.has("Pumpkin Key", player) - and state.has("Skull Key", player), - ), + LLEntrance("Haunted Tower", "Haunted Tower Stairs Down", False, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), - LLEntrance( - "Haunted Tower Stairs Down", - "Haunted Tower", - False, - lambda state: state.has("Bat Key", player) - and state.has("Pumpkin Key", player) - and state.has("Skull Key", player) - and state.has("Ghost Potion", player), - ), - LLEntrance( - "Haunted Tower Stairs Down", - "Haunted Basement Entrance", - True, - lambda state: have_light_source(state, player), - ), + LLEntrance("Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player) and state.has("Ghost Potion", player)), + LLEntrance("Haunted Tower Stairs Down", "Haunted Basement Entrance", True, lambda state: have_light_source(state, player)), LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), - LLEntrance( - "Haunted Tower Floor 2 Entrance", - "Haunted Tower Floor 2", - False, - lambda state: state.has("Ghost Potion", player), - ), + LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", player)), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), - LLEntrance( - "Haunted Tower Floor 2 Exit", - "Haunted Tower Floor 2", - False, - lambda state: state.has("Ghost Potion", player), - ), + LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", player)), LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), - LLEntrance( - "Haunted Tower Floor 3 Entrance", - "Haunted Tower Floor 3", - False, - lambda state: state.has("Ghost Potion", player), - ), + LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", player)), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), - LLEntrance( - "Haunted Tower Floor 3 Exit", - "Haunted Tower Floor 3", - False, - lambda state: state.has("Ghost Potion", player), - ), + LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", player)), LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), LLEntrance("Haunted Tower Roof", "Halloween Hill", True), LLEntrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), LLEntrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), - LLEntrance( - "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, player) - ), + LLEntrance("Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, player)), LLEntrance("Haunted Basement", "Haunted Basement Entrance", False), - LLEntrance( - "Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, player) - ), + LLEntrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, player)), LLEntrance("Abandoned Mines Entrance", "Rocky Cliffs", True), LLEntrance("Abandoned Mines", "Abandoned Mines Entrance", False), LLEntrance("The Shrine Of Bombulus", "Rocky Cliffs", True), - LLEntrance( - "A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, player) - ), + LLEntrance("A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, player)), LLEntrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), LLEntrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), LLEntrance("Happy Stick Woods", "Halloween Hill", True), - LLEntrance( - "The Wolf Den Entrance", - "The Wolf Den", - False, - lambda state: state.has("Silver Sling", player) and have_light_source(state, player), - ), + LLEntrance("The Wolf Den Entrance", "The Wolf Den", False, lambda state: can_kill_werewolves(state, player) and have_light_source(state, player)), LLEntrance("The Wolf Den Entrance", "Halloween Hill", True), LLEntrance("The Wolf Den", "The Wolf Den Entrance", False), LLEntrance("The Wolf Den", "The Wolf Den Exit", False), LLEntrance("The Wolf Den Exit", "Larry's Lair", True), - LLEntrance( - "The Wolf Den Exit", - "The Wolf Den", - False, - lambda state: state.has("Silver Sling", player) and have_light_source(state, player), - ), + LLEntrance("The Wolf Den Exit", "The Wolf Den", False, lambda state: can_kill_werewolves(state, player) and have_light_source(state, player)), LLEntrance("A Cabin Larry", "Zombiton", True), LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), - LLEntrance( - "Upper Creepy Caverns Left Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), - LLEntrance( - "Upper Creepy Caverns Middle Warp", - "Creepy Caverns Left Top Warp", - True, - lambda state: have_light_source(state, player), - ), - LLEntrance( - "Upper Creepy Caverns Middle Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, lambda state: have_light_source(state, player)), + LLEntrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), - LLEntrance( - "Upper Creepy Caverns Right Warp", - "Creepy Caverns Middle Top Warp", - True, - lambda state: have_light_source(state, player), - ), - LLEntrance( - "Upper Creepy Caverns Right Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, lambda state: have_light_source(state, player)), + LLEntrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), - LLEntrance( - "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, player) - ), - LLEntrance( - "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, player) - ), + LLEntrance("Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, player)), + LLEntrance("Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, player)), LLEntrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), - LLEntrance( - "Creepy Caverns Left Bottom Warp", - "Creepy Caverns Left", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player)), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), - LLEntrance( - "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player) - ), + LLEntrance("Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player)), LLEntrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), LLEntrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), - LLEntrance( - "Creepy Caverns Middle Top Warp", - "Creepy Caverns Middle", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, player)), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), LLEntrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True), - LLEntrance( - "Creepy Caverns Middle Right Warp", - "Creepy Caverns Middle", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, player)), LLEntrance("Creepy Caverns Right Left Warp", "Under The Ravine", True), - LLEntrance( - "Creepy Caverns Right Left Warp", - "Creepy Caverns Right", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, player)), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), - LLEntrance( - "Creepy Caverns Right Bottom Warp", - "Creepy Caverns Right", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, player)), LLEntrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), LLEntrance("Castle Vampy", "Halloween Hill", True), LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), @@ -1020,12 +901,8 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Castle Vampy II NW", "Castle Vampy III NW", True), LLEntrance("Cabin In The Woods", "Halloween Hill", True), LLEntrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), - LLEntrance( - "Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", player) - ), - LLEntrance( - "Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", player) - ), + LLEntrance("Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", player)), + LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", player)), LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), LLEntrance("Castle Vampy III NE", "Castle Vampy II NE", True), LLEntrance("Castle Vampy III NE", "Castle Vampy IV NE", True), @@ -1036,9 +913,7 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Castle Vampy III NW", "Castle Vampy II NW", True), LLEntrance("Castle Vampy III NW", "Castle Vampy IV NW", True), LLEntrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), - LLEntrance( - "Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", player, 8) - ), + LLEntrance("Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", player, 8)), LLEntrance("Castle Vampy IV NE", "Castle Vampy III NE", True), LLEntrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), LLEntrance("Castle Vampy IV SE", "Castle Vampy III SE", True), @@ -1053,9 +928,7 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), LLEntrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), LLEntrance("The Evilizer", "Halloween Hill", True), - LLEntrance( - "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, player) - ), + LLEntrance("The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, player)), LLEntrance("The Heart Of Terror", "The Evilizer", True), LLEntrance("The Heart Of Terror", "Empty Rooftop", True), LLEntrance("A Hidey-Hole", "Halloween Hill", True), @@ -1068,14 +941,17 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), LLEntrance("Zombiton", "Halloween Hill", False), - LLEntrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player)), - LLEntrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player)), + LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", player)), + LLEntrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player) or state.has("All Access Pass", player)), + LLEntrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player) or state.has("All Access Pass", player)), + LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", player)), + LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", player)), LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", player)), - LLEntrance( - "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player) - ), + LLEntrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player)), + LLEntrance("Underground Tunnel Zombie", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player) and state.has("All Access Pass", player)), LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), + LLEntrance("Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", player)), ] for region in multiworld.get_regions(player): for entry in loonyland_entrance_table: diff --git a/worlds/loonyland/items.py b/worlds/loonyland/items.py index 041ce0611e1b..306d1a7b0825 100644 --- a/worlds/loonyland/items.py +++ b/worlds/loonyland/items.py @@ -20,6 +20,7 @@ class LLItemCat(Enum): TRAP = 3 EVENT = 4 ACCESS = 5 + DOLL = 6 class LLItem(NamedTuple): diff --git a/worlds/loonyland/locations.py b/worlds/loonyland/locations.py index e449d2140016..32776c20daca 100644 --- a/worlds/loonyland/locations.py +++ b/worlds/loonyland/locations.py @@ -13,6 +13,8 @@ class LLLocCat(Enum): QUEST = 1 BADGE = 2 EVENT = 4 + REWARD = 5 + DOLL = 6 class LLLocation(NamedTuple): diff --git a/worlds/loonyland/rules.py b/worlds/loonyland/rules.py index b442e533b038..0108a5af6cd3 100644 --- a/worlds/loonyland/rules.py +++ b/worlds/loonyland/rules.py @@ -4,12 +4,16 @@ def have_light_source(state: CollectionState, player: int) -> bool: return state.has("Lantern", player) or ( state.has("Stick", player) and state.has("Boots", player) and state.can_reach_region("Swamp Gas Cavern", player) + ) or ( + state.has("20/20 Vision", player) ) # 20/20 when badges added +def can_kill_werewolves(state: CollectionState, player: int) -> bool: + return state.has("Silver Sling", player) or state.has("Touch Of Death", player) def have_bombs(state: CollectionState, player: int) -> bool: - return state.has("Bombs", player) + return state.has("Bombs", player) or state.has("Combo-Bombo", player) or state.has("Play As Werewolf", player) # or werewolf badge when badges are added @@ -61,3 +65,20 @@ def have_39_badges(state: CollectionState, player: int) -> bool: def have_all_weapons(state: CollectionState, player: int) -> bool: return state.has_group("special_weapons", player, 7) + +def can_reach_bats(state: CollectionState, player: int) -> bool: + return state.can_reach_region("The Shrine Of Bombulus", player) +def can_reach_skeleton(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Halloween Hill", player) +def can_reach_frog(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Halloween Hill", player) +def can_reach_ghost(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Haunted Tower", player) +def can_reach_mummy(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Rocky Cliffs", player) +def can_reach_swampdog(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Halloween Hill", player) +def can_reach_vampire(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Castle Vampy", player) +def can_reach_wolves(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Halloween Hill", player) \ No newline at end of file From 15f6a9c97c210d557503a7f670c157872ba3e6e5 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Tue, 24 Dec 2024 11:43:29 -0500 Subject: [PATCH 39/58] Handling more options --- worlds/loonyland/Data/game_data.py | 695 +++++++++++++++++++---------- worlds/loonyland/__init__.py | 25 +- worlds/loonyland/items.py | 24 +- worlds/loonyland/locations.py | 30 +- worlds/loonyland/options.py | 49 ++ worlds/loonyland/rules.py | 39 +- 6 files changed, 598 insertions(+), 264 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index 9314881b3df4..7a17529ac89a 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -7,22 +7,23 @@ from worlds.loonyland.regions import LLRegion from worlds.loonyland.rules import ( can_cleanse_crypts, - have_39_badges, - have_all_weapons, - have_bombs, - have_light_source, - have_special_weapon_bullet, - have_special_weapon_damage, - hundred_percent, can_kill_werewolves, can_reach_bats, - can_reach_skeleton, can_reach_frog, can_reach_ghost, can_reach_mummy, + can_reach_skeleton, can_reach_swampdog, can_reach_vampire, can_reach_wolves, + have_39_badges, + have_all_weapons, + have_bombs, + have_light_source, + have_many_bombs, + have_special_weapon_bullet, + have_special_weapon_damage, + hundred_percent, ) ll_base_id: int = 2876900 @@ -364,48 +365,76 @@ "Reflect Gem": LLItem(ll_base_id + VAR_REFLECT, LLItemCat.ITEM, ItemClassification.useful), "Silver Sling": LLItem(ll_base_id + VAR_SILVERSLING, LLItemCat.ITEM, ItemClassification.progression), "20/20 Vision": LLItem(ll_base_id + CH_LIGHT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Disco Mode": LLItem(ll_base_id + CH_DISCO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Disco Mode": LLItem(ll_base_id + CH_DISCO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Terror Mode": LLItem(ll_base_id + CH_TERROR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Quick Mode": LLItem(ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Infinite Gems": LLItem(ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Toad": LLItem(ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), + "Quick Mode": LLItem(ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Infinite Gems": LLItem(ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), + "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), + "Play As Toad": LLItem(ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), + "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Radar": LLItem(ll_base_id + CH_RADAR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Touch Of Death": LLItem(ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "All Access Pass": LLItem(ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Guided Shots": LLItem(ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Slo-Mo": LLItem(ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Witch": LLItem(ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), + "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Guided Shots": LLItem(ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Slo-Mo": LLItem(ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), + "Play As Witch": LLItem(ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Infinite Survival": LLItem(ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Infinite Survival": LLItem( + ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), "Play As Summony": LLItem(ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Molecular Dispersion": LLItem( + ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"] + ), + "Guaranteed Survival": LLItem( + ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Stinky Farley": LLItem(ll_base_id + CH_STINKY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Ultra Weapons Are Go!": LLItem(ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Ultra Weapons Are Go!": LLItem( + ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), "Thorns Aura": LLItem(ll_base_id + CH_THORNS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Monster Regeneration": LLItem(ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Monster Regeneration": LLItem( + ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Bowling Access": LLItem(ll_base_id + MODE_BOWLING + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Survival Access": LLItem(ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Boss Bash Access": LLItem(ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Loony Ball Access": LLItem(ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Remix Access": LLItem(ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Survival Access": LLItem( + ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Boss Bash Access": LLItem( + ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Loony Ball Access": LLItem( + ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Remix Access": LLItem( + ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"] + ), + "Bat Doll": LLItem(ll_base_id + VAR_BATDOLL, LLItemCat.DOLL, ItemClassification.progression), + "Skeleton Doll": LLItem(ll_base_id + VAR_SKELDOLL, LLItemCat.DOLL, ItemClassification.progression), + "Frog Doll": LLItem(ll_base_id + VAR_FROGDOLL, LLItemCat.DOLL, ItemClassification.progression), + "Ghost Doll": LLItem(ll_base_id + VAR_GHOSTDOLL, LLItemCat.DOLL, ItemClassification.progression), + "Mummy Doll": LLItem(ll_base_id + VAR_MUMMYDOLL, LLItemCat.DOLL, ItemClassification.progression), + "Swampdog Doll": LLItem(ll_base_id + VAR_SWAMPDOLL, LLItemCat.DOLL, ItemClassification.progression), + "Vampire Doll": LLItem(ll_base_id + VAR_VAMPDOLL, LLItemCat.DOLL, ItemClassification.progression), + "Wolfman Doll": LLItem(ll_base_id + VAR_WOLFDOLL, LLItemCat.DOLL, ItemClassification.progression), } loonyland_region_table: dict[str, LLRegion] = { "Menu": LLRegion(False), @@ -518,165 +547,183 @@ "Remix": LLRegion(False), } loonyland_location_table: dict[str, LLLocation] = { - "Swamp: Mud Path": LLLocation(0, LLLocCat.PICKUP, "Slurpy Swamp Mud"), - "Swamp: Bog Beast": LLLocation(1, LLLocCat.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Upper Ledge": LLLocation(2, LLLocCat.PICKUP, "Rocky Cliffs"), - "Swamp: Sapling Shrine": LLLocation(3, LLLocCat.PICKUP, "Slurpy Swamp Mud"), - "Terror Glade: South Trees": LLLocation(4, LLLocCat.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Vine": LLLocation(5, LLLocCat.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Grand Pharoh": LLLocation(6, LLLocCat.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Rock Corner": LLLocation(7, LLLocCat.PICKUP, "Rocky Cliffs"), - "Swamp: Outside Luniton": LLLocation(8, LLLocCat.PICKUP, "Halloween Hill"), - "Swamp: East 1": LLLocation(9, LLLocCat.PICKUP, "Halloween Hill"), - "Swamp: Top Left dry": LLLocation(10, LLLocCat.PICKUP, "Halloween Hill"), - "Swamp: East 2": LLLocation(11, LLLocCat.PICKUP, "Halloween Hill"), - "Woods: Above Castle": LLLocation(12, LLLocCat.PICKUP, "Halloween Hill"), - "Rocky Cliffs: Entrance Ledge": LLLocation(13, LLLocCat.PICKUP, "Rocky Cliffs"), - "Rocky Cliffs: Peak": LLLocation(14, LLLocCat.PICKUP, "Rocky Cliffs"), - "Woods: SW of Cabin": LLLocation(15, LLLocCat.PICKUP, "Halloween Hill"), - "Witch's Cabin: Bedroom": LLLocation(16, LLLocCat.PICKUP, "The Witch's Cabin"), - "Witch's Cabin: Backroom": LLLocation(17, LLLocCat.PICKUP, "The Witch's Cabin Back"), - "Bonita's Cabin: Barrel Maze": LLLocation(18, LLLocCat.PICKUP, "Bonita's Cabin"), - "Bog Pit: Top Door": LLLocation(19, LLLocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Posts Room": LLLocation(20, LLLocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Drippy Window": LLLocation(21, LLLocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Green room": LLLocation(22, LLLocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Arena": LLLocation(23, LLLocCat.PICKUP, "The Bog Pit"), - "Bog Pit: Sw Switch": LLLocation(24, LLLocCat.PICKUP, "The Bog Pit"), - "Tunnel: Swampdog Pumpkin Door": LLLocation(25, LLLocCat.PICKUP, "Underground Tunnel"), - "Tunnel: Scratch Wall": LLLocation(26, LLLocCat.PICKUP, "Underground Tunnel"), - "Tunnel: Narrow Passage": LLLocation(27, LLLocCat.PICKUP, "Underground Tunnel"), - "Tunnel: Top Frogs": LLLocation(28, LLLocCat.PICKUP, "Underground Tunnel"), - "Tunnel: Torch Island": LLLocation(29, LLLocCat.PICKUP, "Underground Tunnel Mud"), - "Tunnel: Small Room": LLLocation(30, LLLocCat.PICKUP, "Underground Tunnel"), - "Swamp Gas: Scratch Wall": LLLocation(31, LLLocCat.PICKUP, "Swamp Gas Cavern"), - "Swamp Gas: Bat Door": LLLocation(32, LLLocCat.PICKUP, "Swamp Gas Cavern"), - "Swamp Gas: Stair room": LLLocation(33, LLLocCat.PICKUP, "Swamp Gas Cavern Back"), - "Swamp Gas: Rock Prison": LLLocation(34, LLLocCat.PICKUP, "Swamp Gas Cavern"), - "A Tiny Cabin": LLLocation(35, LLLocCat.PICKUP, "A Tiny Cabin"), - "Seer: Bedside": LLLocation(36, LLLocCat.PICKUP, "A Cabin Seer"), - "Dusty Crypt: Pumpkin Door": LLLocation(37, LLLocCat.PICKUP, "Dusty Crypt"), - "Dusty Crypt: Maze": LLLocation(38, LLLocCat.PICKUP, "Dusty Crypt"), - "Musty Crypt: Maze Room": LLLocation(39, LLLocCat.PICKUP, "Musty Crypt"), - "Rusty Crypt: Vine": LLLocation(40, LLLocCat.PICKUP, "Rusty Crypt"), - "Rusty Crypt: Boulders": LLLocation(41, LLLocCat.PICKUP, "Rusty Crypt"), - "A Messy Cabin": LLLocation(42, LLLocCat.PICKUP, "A Messy Cabin"), - "Under The Lake: Behind Lightning Rod": LLLocation(43, LLLocCat.PICKUP, "Under The Lake"), - "Under The Lake: Bat Door": LLLocation(44, LLLocCat.PICKUP, "Under The Lake"), - "Deeper Lake: Corner": LLLocation(45, LLLocCat.PICKUP, "Deeper Under The Lake"), - "Deeper Lake: Rhombus": LLLocation(46, LLLocCat.PICKUP, "Deeper Under The Lake"), - "Frankenjulie's Reward": LLLocation(47, LLLocCat.PICKUP, "Frankenjulie's Laboratory"), - "Tower: Barracks": LLLocation(48, LLLocCat.PICKUP, "Haunted Tower"), - "Tower F2: Skull Puzzle": LLLocation(49, LLLocCat.PICKUP, "Haunted Tower Floor 2"), - "PolterGuy's Reward": LLLocation(50, LLLocCat.PICKUP, "Haunted Tower Roof"), - "Tower Basement: DoorDoorDoorDoorDoorDoor": LLLocation(51, LLLocCat.PICKUP, "Haunted Basement"), - "Abandoned Mine: Shaft": LLLocation(52, LLLocCat.PICKUP, "Abandoned Mines"), - "Shrine of Bombulus: Prize": LLLocation(53, LLLocCat.PICKUP, "The Shrine Of Bombulus"), - "Gloomy Cavern: Lockpick": LLLocation(54, LLLocCat.PICKUP, "A Gloomy Cavern"), - "Happy Stick: Hidden": LLLocation(55, LLLocCat.PICKUP, "Happy Stick Woods"), - "Happy Stick: Reward": LLLocation(56, LLLocCat.PICKUP, "Happy Stick Woods"), - "Wolf Den: Top Left": LLLocation(57, LLLocCat.PICKUP, "The Wolf Den"), - "Wolf Den: Pumpkin Door": LLLocation(58, LLLocCat.PICKUP, "The Wolf Den"), - "Wolf Den: Vine": LLLocation(59, LLLocCat.PICKUP, "The Wolf Den"), - "Upper Cavern: Three Gold Skeletons": LLLocation(60, LLLocCat.PICKUP, "Upper Creepy Caverns"), - "Under The Ravine: Left Vine": LLLocation(61, LLLocCat.PICKUP, "Under The Ravine"), - "Under The Ravine: Right Vine": LLLocation(62, LLLocCat.PICKUP, "Under The Ravine"), - "Creepy Caverns M: Pharaoh Bat Door": LLLocation(63, LLLocCat.PICKUP, "Creepy Caverns Middle"), - "Creepy Caverns R: Top Pharaohs": LLLocation(64, LLLocCat.PICKUP, "Creepy Caverns Right"), - "Creepy Caverns M: Gargoyles": LLLocation(65, LLLocCat.PICKUP, "Creepy Caverns Middle"), - "Castle Vampy: Top Room": LLLocation(66, LLLocCat.PICKUP, "Castle Vampy"), - "Castle Vampy: Maze": LLLocation(67, LLLocCat.PICKUP, "Castle Vampy"), - "Castle Vampy: Gauntlet": LLLocation(68, LLLocCat.PICKUP, "Castle Vampy"), - "Castle Vampy: Bat Closet": LLLocation(69, LLLocCat.PICKUP, "Castle Vampy"), - "Castle Vampy II: Candle Room": LLLocation(70, LLLocCat.PICKUP, "Castle Vampy II"), - "Castle Vampy II: Bloodsucker Room": LLLocation(71, LLLocCat.PICKUP, "Castle Vampy II"), - "Castle Vampy II: Vampire Lord": LLLocation(72, LLLocCat.PICKUP, "Castle Vampy II"), - "Castle Vampy II: Bat Room": LLLocation(73, LLLocCat.PICKUP, "Castle Vampy II"), - "Cabin in the Woods: Gold Skull": LLLocation(74, LLLocCat.PICKUP, "Cabin In The Woods"), - "Castle Vampy III: Center": LLLocation(75, LLLocCat.PICKUP, "Castle Vampy III"), - "Castle Vampy III: Behind the Pews": LLLocation(76, LLLocCat.PICKUP, "Castle Vampy III"), - "Castle Vampy III: AMBUSH!": LLLocation(77, LLLocCat.PICKUP, "Castle Vampy III"), - "Castle Vampy III: Halloween": LLLocation(78, LLLocCat.PICKUP, "Castle Vampy III"), - "Castle Vampy III: Bat room": LLLocation(79, LLLocCat.PICKUP, "Castle Vampy III"), - "Castle Vampy IV: Right Path": LLLocation(80, LLLocCat.PICKUP, "Castle Vampy IV"), - "Castle Vampy IV: Left Path": LLLocation(81, LLLocCat.PICKUP, "Castle Vampy IV"), - "Castle Vampy IV: Ballroom Right": LLLocation(82, LLLocCat.PICKUP, "Castle Vampy IV"), - "Castle Vampy IV: Right Secret Wall": LLLocation(83, LLLocCat.PICKUP, "Castle Vampy IV"), - "Castle Vampy IV: Ballroom Left": LLLocation(84, LLLocCat.PICKUP, "Castle Vampy IV"), - "Roof NW: Gutsy the Elder": LLLocation(85, LLLocCat.PICKUP, "Castle Vampy Roof NW"), - "Roof NE: Stoney the Elder": LLLocation(86, LLLocCat.PICKUP, "Castle Vampy Roof NE"), - "Roof SW: Drippy the Elder": LLLocation(87, LLLocCat.PICKUP, "Castle Vampy Roof SW"), - "Roof SE: Toasty the Elder": LLLocation(88, LLLocCat.PICKUP, "Castle Vampy Roof SE"), - "Bonkula Item": LLLocation(89, LLLocCat.PICKUP, "The Heart Of Terror"), - "Hidey-Hole: Bat Door": LLLocation(90, LLLocCat.PICKUP, "A Hidey-Hole"), - "Hidey-Hole: Pebbles": LLLocation(91, LLLocCat.PICKUP, "A Hidey-Hole"), - "Swampdog Lair: Entrance": LLLocation(92, LLLocCat.PICKUP, "Swampdog Lair"), - "Swampdog Lair: End": LLLocation(93, LLLocCat.PICKUP, "Swampdog Lair"), - "Q: Save Halloween Hill": LLLocation(94, LLLocCat.QUEST, "The Evilizer"), - "Q: Tree Trimming": LLLocation(95, LLLocCat.QUEST, "Halloween Hill"), - "Q: Scaredy Cat": LLLocation(96, LLLocCat.QUEST, "Halloween Hill"), - "Q: Sticky Shoes": LLLocation(97, LLLocCat.QUEST, "Halloween Hill"), - "Q: Mushroom Hunt": LLLocation(98, LLLocCat.QUEST, "The Witch's Cabin"), - "Q: Picking Daisies": LLLocation(99, LLLocCat.QUEST, "Menu"), - "Q: Curse The Darkness": LLLocation(100, LLLocCat.QUEST, "Swamp Gas Cavern"), - "Q: Zombie Stomp": LLLocation(101, LLLocCat.QUEST, "Zombiton"), - "Q: Smashing Pumpkins": LLLocation(102, LLLocCat.QUEST, "Halloween Hill"), - "Q: Mystery Lake": LLLocation(103, LLLocCat.QUEST, "Halloween Hill"), - "Q: Beneath The Lake": LLLocation(104, LLLocCat.QUEST, "Frankenjulie's Laboratory"), - "Q: Happy Stick?!?": LLLocation(105, LLLocCat.QUEST, "Happy Stick Woods"), - "Q: A True Hero": LLLocation(106, LLLocCat.QUEST, "Under The Ravine"), - "Q: Silver Bullet": LLLocation(107, LLLocCat.QUEST, "Zombiton"), - "Q: Hairy Larry": LLLocation(108, LLLocCat.QUEST, "The Wolf Den"), - "Q: Ghostbusting": LLLocation(109, LLLocCat.QUEST, "The Witch's Cabin"), - "Q: The Haunted Tower": LLLocation(110, LLLocCat.QUEST, "Haunted Tower Roof"), - "Q: The Last Gate": LLLocation(111, LLLocCat.QUEST, "Castle Vampy IV"), - "Q: The Rescue": LLLocation(112, LLLocCat.QUEST, "A Gloomy Cavern"), - "Q: The Collection": LLLocation(113, LLLocCat.QUEST, "A Cabin Collector"), - "Evil Smashin'": LLLocation(114, LLLocCat.BADGE, "The Evilizer"), - "Bowlin'": LLLocation(115, LLLocCat.BADGE, "Bowling"), - "Vandalizin'": LLLocation(116, LLLocCat.BADGE, "Zombiton"), - "Greed": LLLocation(117, LLLocCat.BADGE, "Menu"), - "Monster Slayin'": LLLocation(118, LLLocCat.BADGE, "Menu"), - "Monster Poundin'": LLLocation(119, LLLocCat.BADGE, "Menu"), - "Ghostbustin'": LLLocation(120, LLLocCat.BADGE, "Haunted Tower Roof"), - "Lookin'": LLLocation(121, LLLocCat.BADGE, "The Witch's Cabin"), - "Ultimate Victory": LLLocation(122, LLLocCat.BADGE, "The Evilizer"), - "Kickin'": LLLocation(123, LLLocCat.BADGE, "Loony Ball"), - "Boss Bashin'": LLLocation(124, LLLocCat.BADGE, "Boss Bash"), - "Vampire Slayin'": LLLocation(125, LLLocCat.BADGE, "The Heart Of Terror"), - "Sneakin'": LLLocation(126, LLLocCat.BADGE, "Haunted Tower"), - "Witch Hunt": LLLocation(127, LLLocCat.BADGE, "Happy Stick Woods"), - "Animal Control": LLLocation(128, LLLocCat.BADGE, "The Wolf Den"), - "Annoyance": LLLocation(129, LLLocCat.BADGE, "The Witch's Cabin"), - "Civic Duty": LLLocation(130, LLLocCat.BADGE, "A Gloomy Cavern"), - "Winnin'": LLLocation(131, LLLocCat.BADGE, "The Evilizer"), - "Combo Plate": LLLocation(132, LLLocCat.BADGE, "Menu"), - "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, "Rocky Cliffs"), - "Findin'": LLLocation(134, LLLocCat.BADGE, "The Wolf Den"), - "Extreme Survivin'": LLLocation(135, LLLocCat.BADGE, "Survival"), - "Huntin'": LLLocation(136, LLLocCat.BADGE, "Halloween Hill"), - "Advanced Winnin'": LLLocation(137, LLLocCat.BADGE, "Menu"), - "Survivin'": LLLocation(138, LLLocCat.BADGE, "Survival"), - "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, "Larry's Lair"), - "Mad Skeelz": LLLocation(140, LLLocCat.BADGE, "The Evilizer"), - "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, "Frankenjulie's Laboratory"), - "Combo Magic": LLLocation(142, LLLocCat.BADGE, "Survival"), - "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, "Slurpy Swamp Mud"), - "R-R-R-Remix!": LLLocation(144, LLLocCat.BADGE, "Remix"), - "Witchcraft": LLLocation(145, LLLocCat.BADGE, "Menu"), - "Ninjitsu": LLLocation(146, LLLocCat.BADGE, "Menu"), - "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, "Survival"), - "Hooliganin'": LLLocation(148, LLLocCat.BADGE, "Loony Ball"), - "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, "Menu"), - "Scorin'": LLLocation(150, LLLocCat.BADGE, "The Evilizer"), - "Brawlin'": LLLocation(151, LLLocCat.BADGE, "Benny's Cocktails"), - "Minin' For Treasure": LLLocation(152, LLLocCat.BADGE, "Remix"), - "Digitally Masterin'": LLLocation(153, LLLocCat.BADGE, "Menu"), - "Tree Trimming Reward": LLLocation(154, LLLocCat.REWARD, "A Cabin Trees"), - "Larry's Wife Reward": LLLocation(155, LLLocCat.REWARD, "A Cabin Larry"), - "Farmer Reward": LLLocation(156, LLLocCat.REWARD, "Halloween Hill"), - "Mayor Reward": LLLocation(157, LLLocCat.REWARD, "Zombiton"), + "Swamp: Mud Path": LLLocation(0, LLLocCat.PICKUP, 0, "Slurpy Swamp Mud"), + "Swamp: Bog Beast": LLLocation(1, LLLocCat.PICKUP, 0, "Halloween Hill"), + "Rocky Cliffs: Upper Ledge": LLLocation(2, LLLocCat.PICKUP, 0, "Rocky Cliffs"), + "Swamp: Sapling Shrine": LLLocation(3, LLLocCat.PICKUP, 0, "Slurpy Swamp Mud"), + "Terror Glade: South Trees": LLLocation(4, LLLocCat.PICKUP, 0, "Halloween Hill"), + "Rocky Cliffs: Vine": LLLocation(5, LLLocCat.PICKUP, 0, "Rocky Cliffs"), + "Rocky Cliffs: Grand Pharoh": LLLocation(6, LLLocCat.PICKUP, 0, "Rocky Cliffs"), + "Rocky Cliffs: Rock Corner": LLLocation(7, LLLocCat.PICKUP, 0, "Rocky Cliffs"), + "Swamp: Outside Luniton": LLLocation(8, LLLocCat.PICKUP, 0, "Halloween Hill"), + "Swamp: East 1": LLLocation(9, LLLocCat.PICKUP, 0, "Halloween Hill"), + "Swamp: Top Left dry": LLLocation(10, LLLocCat.PICKUP, 0, "Halloween Hill"), + "Swamp: East 2": LLLocation(11, LLLocCat.PICKUP, 0, "Halloween Hill"), + "Woods: Above Castle": LLLocation(12, LLLocCat.PICKUP, 0, "Halloween Hill"), + "Rocky Cliffs: Entrance Ledge": LLLocation(13, LLLocCat.PICKUP, 0, "Rocky Cliffs"), + "Rocky Cliffs: Peak": LLLocation(14, LLLocCat.PICKUP, 0, "Rocky Cliffs"), + "Woods: SW of Cabin": LLLocation(15, LLLocCat.PICKUP, 0, "Halloween Hill"), + "Witch's Cabin: Bedroom": LLLocation(16, LLLocCat.PICKUP, 2, "The Witch's Cabin"), + "Witch's Cabin: Backroom": LLLocation(17, LLLocCat.PICKUP, 2, "The Witch's Cabin Back"), + "Bonita's Cabin: Barrel Maze": LLLocation(18, LLLocCat.PICKUP, 3, "Bonita's Cabin"), + "Bog Pit: Top Door": LLLocation(19, LLLocCat.PICKUP, 4, "The Bog Pit"), + "Bog Pit: Posts Room": LLLocation(20, LLLocCat.PICKUP, 4, "The Bog Pit"), + "Bog Pit: Drippy Window": LLLocation(21, LLLocCat.PICKUP, 4, "The Bog Pit"), + "Bog Pit: Green room": LLLocation(22, LLLocCat.PICKUP, 4, "The Bog Pit"), + "Bog Pit: Arena": LLLocation(23, LLLocCat.PICKUP, 4, "The Bog Pit"), + "Bog Pit: Sw Switch": LLLocation(24, LLLocCat.PICKUP, 4, "The Bog Pit"), + "Tunnel: Swampdog Pumpkin Door": LLLocation(25, LLLocCat.PICKUP, 5, "Underground Tunnel"), + "Tunnel: Scratch Wall": LLLocation(26, LLLocCat.PICKUP, 5, "Underground Tunnel"), + "Tunnel: Narrow Passage": LLLocation(27, LLLocCat.PICKUP, 5, "Underground Tunnel"), + "Tunnel: Top Frogs": LLLocation(28, LLLocCat.PICKUP, 5, "Underground Tunnel"), + "Tunnel: Torch Island": LLLocation(29, LLLocCat.PICKUP, 5, "Underground Tunnel Mud"), + "Tunnel: Small Room": LLLocation(30, LLLocCat.PICKUP, 5, "Underground Tunnel"), + "Swamp Gas: Scratch Wall": LLLocation(31, LLLocCat.PICKUP, 6, "Swamp Gas Cavern"), + "Swamp Gas: Bat Door": LLLocation(32, LLLocCat.PICKUP, 6, "Swamp Gas Cavern"), + "Swamp Gas: Stair room": LLLocation(33, LLLocCat.PICKUP, 6, "Swamp Gas Cavern Back"), + "Swamp Gas: Rock Prison": LLLocation(34, LLLocCat.PICKUP, 6, "Swamp Gas Cavern"), + "A Tiny Cabin": LLLocation(35, LLLocCat.PICKUP, 7, "A Tiny Cabin"), + "Seer: Bedside": LLLocation(36, LLLocCat.PICKUP, 8, "A Cabin Seer"), + "Dusty Crypt: Pumpkin Door": LLLocation(37, LLLocCat.PICKUP, 10, "Dusty Crypt"), + "Dusty Crypt: Maze": LLLocation(38, LLLocCat.PICKUP, 10, "Dusty Crypt"), + "Musty Crypt: Maze Room": LLLocation(39, LLLocCat.PICKUP, 11, "Musty Crypt"), + "Rusty Crypt: Vine": LLLocation(40, LLLocCat.PICKUP, 12, "Rusty Crypt"), + "Rusty Crypt: Boulders": LLLocation(41, LLLocCat.PICKUP, 12, "Rusty Crypt"), + "A Messy Cabin": LLLocation(42, LLLocCat.PICKUP, 13, "A Messy Cabin"), + "Under The Lake: Behind Lightning Rod": LLLocation(43, LLLocCat.PICKUP, 14, "Under The Lake"), + "Under The Lake: Bat Door": LLLocation(44, LLLocCat.PICKUP, 14, "Under The Lake"), + "Deeper Lake: Corner": LLLocation(45, LLLocCat.PICKUP, 15, "Deeper Under The Lake"), + "Deeper Lake: Rhombus": LLLocation(46, LLLocCat.PICKUP, 15, "Deeper Under The Lake"), + "Frankenjulie's Reward": LLLocation(47, LLLocCat.PICKUP, 16, "Frankenjulie's Laboratory"), + "Tower: Barracks": LLLocation(48, LLLocCat.PICKUP, 17, "Haunted Tower"), + "Tower F2: Skull Puzzle": LLLocation(49, LLLocCat.PICKUP, 18, "Haunted Tower Floor 2"), + "PolterGuy's Reward": LLLocation(50, LLLocCat.PICKUP, 20, "Haunted Tower Roof"), + "Tower Basement: DoorDoorDoorDoorDoorDoor": LLLocation(51, LLLocCat.PICKUP, 21, "Haunted Basement"), + "Abandoned Mine: Shaft": LLLocation(52, LLLocCat.PICKUP, 22, "Abandoned Mines"), + "Shrine Of Bombulus: Prize": LLLocation(53, LLLocCat.PICKUP, 23, "The Shrine Of Bombulus"), + "Gloomy Cavern: Lockpick": LLLocation(54, LLLocCat.PICKUP, 24, "A Gloomy Cavern"), + "Happy Stick: Hidden": LLLocation(55, LLLocCat.PICKUP, 25, "Happy Stick Woods"), + "Happy Stick: Reward": LLLocation(56, LLLocCat.PICKUP, 25, "Happy Stick Woods"), + "Wolf Den: Top Left": LLLocation(57, LLLocCat.PICKUP, 26, "The Wolf Den"), + "Wolf Den: Pumpkin Door": LLLocation(58, LLLocCat.PICKUP, 26, "The Wolf Den"), + "Wolf Den: Vine": LLLocation(59, LLLocCat.PICKUP, 26, "The Wolf Den"), + "Upper Cavern: Three Gold Skeletons": LLLocation(60, LLLocCat.PICKUP, 28, "Upper Creepy Caverns"), + "Under The Ravine: Left Vine": LLLocation(61, LLLocCat.PICKUP, 29, "Under The Ravine"), + "Under The Ravine: Right Vine": LLLocation(62, LLLocCat.PICKUP, 29, "Under The Ravine"), + "Creepy Caverns M: Pharaoh Bat Door": LLLocation(63, LLLocCat.PICKUP, 30, "Creepy Caverns Middle"), + "Creepy Caverns R: Top Pharaohs": LLLocation(64, LLLocCat.PICKUP, 30, "Creepy Caverns Right"), + "Creepy Caverns M: Gargoyles": LLLocation(65, LLLocCat.PICKUP, 30, "Creepy Caverns Middle"), + "Castle Vampy: Top Room": LLLocation(66, LLLocCat.PICKUP, 31, "Castle Vampy"), + "Castle Vampy: Maze": LLLocation(67, LLLocCat.PICKUP, 31, "Castle Vampy"), + "Castle Vampy: Gauntlet": LLLocation(68, LLLocCat.PICKUP, 31, "Castle Vampy"), + "Castle Vampy: Bat Closet": LLLocation(69, LLLocCat.PICKUP, 31, "Castle Vampy"), + "Castle Vampy II: Candle Room": LLLocation(70, LLLocCat.PICKUP, 32, "Castle Vampy II"), + "Castle Vampy II: Bloodsucker Room": LLLocation(71, LLLocCat.PICKUP, 32, "Castle Vampy II"), + "Castle Vampy II: Vampire Lord": LLLocation(72, LLLocCat.PICKUP, 32, "Castle Vampy II"), + "Castle Vampy II: Bat Room": LLLocation(73, LLLocCat.PICKUP, 32, "Castle Vampy II"), + "Cabin in the Woods: Gold Skull": LLLocation(74, LLLocCat.PICKUP, 33, "Cabin In The Woods"), + "Castle Vampy III: Center": LLLocation(75, LLLocCat.PICKUP, 34, "Castle Vampy III"), + "Castle Vampy III: Behind the Pews": LLLocation(76, LLLocCat.PICKUP, 34, "Castle Vampy III"), + "Castle Vampy III: AMBUSH!": LLLocation(77, LLLocCat.PICKUP, 34, "Castle Vampy III"), + "Castle Vampy III: Halloween": LLLocation(78, LLLocCat.PICKUP, 34, "Castle Vampy III"), + "Castle Vampy III: Bat room": LLLocation(79, LLLocCat.PICKUP, 34, "Castle Vampy III"), + "Castle Vampy IV: Right Path": LLLocation(80, LLLocCat.PICKUP, 35, "Castle Vampy IV"), + "Castle Vampy IV: Left Path": LLLocation(81, LLLocCat.PICKUP, 35, "Castle Vampy IV"), + "Castle Vampy IV: Ballroom Right": LLLocation(82, LLLocCat.PICKUP, 35, "Castle Vampy IV"), + "Castle Vampy IV: Right Secret Wall": LLLocation(83, LLLocCat.PICKUP, 35, "Castle Vampy IV"), + "Castle Vampy IV: Ballroom Left": LLLocation(84, LLLocCat.PICKUP, 35, "Castle Vampy IV"), + "Roof NW: Gutsy the Elder": LLLocation(85, LLLocCat.PICKUP, 37, "Castle Vampy Roof NW"), + "Roof NE: Stoney the Elder": LLLocation(86, LLLocCat.PICKUP, 38, "Castle Vampy Roof NE"), + "Roof SW: Drippy the Elder": LLLocation(87, LLLocCat.PICKUP, 39, "Castle Vampy Roof SW"), + "Roof SE: Toasty the Elder": LLLocation(88, LLLocCat.PICKUP, 40, "Castle Vampy Roof SE"), + "Bonkula Item": LLLocation(89, LLLocCat.PICKUP, 42, "The Heart Of Terror"), + "Hidey-Hole: Bat Door": LLLocation(90, LLLocCat.PICKUP, 43, "A Hidey-Hole"), + "Hidey-Hole: Pebbles": LLLocation(91, LLLocCat.PICKUP, 43, "A Hidey-Hole"), + "Swampdog Lair: Entrance": LLLocation(92, LLLocCat.PICKUP, 45, "Swampdog Lair"), + "Swampdog Lair: End": LLLocation(93, LLLocCat.PICKUP, 45, "Swampdog Lair"), + "Q: Save Halloween Hill": LLLocation(94, LLLocCat.QUEST, 0, "The Evilizer"), + "Q: Tree Trimming": LLLocation(95, LLLocCat.QUEST, 1, "Halloween Hill"), + "Q: Scaredy Cat": LLLocation(96, LLLocCat.QUEST, 2, "Halloween Hill"), + "Q: Sticky Shoes": LLLocation(97, LLLocCat.QUEST, 3, "Halloween Hill"), + "Q: Mushroom Hunt": LLLocation(98, LLLocCat.QUEST, 4, "The Witch's Cabin"), + "Q: Picking Daisies": LLLocation(99, LLLocCat.QUEST, 5, "Menu"), + "Q: Curse The Darkness": LLLocation(100, LLLocCat.QUEST, 6, "Swamp Gas Cavern"), + "Q: Zombie Stomp": LLLocation(101, LLLocCat.QUEST, 7, "Zombiton"), + "Q: Smashing Pumpkins": LLLocation(102, LLLocCat.QUEST, 8, "Halloween Hill"), + "Q: Mystery Lake": LLLocation(103, LLLocCat.QUEST, 9, "Halloween Hill"), + "Q: Beneath The Lake": LLLocation(104, LLLocCat.QUEST, 10, "Frankenjulie's Laboratory"), + "Q: Happy Stick?!?": LLLocation(105, LLLocCat.QUEST, 11, "Happy Stick Woods"), + "Q: A True Hero": LLLocation(106, LLLocCat.QUEST, 12, "Under The Ravine"), + "Q: Silver Bullet": LLLocation(107, LLLocCat.QUEST, 13, "Zombiton"), + "Q: Hairy Larry": LLLocation(108, LLLocCat.QUEST, 14, "The Wolf Den"), + "Q: Ghostbusting": LLLocation(109, LLLocCat.QUEST, 15, "The Witch's Cabin"), + "Q: The Haunted Tower": LLLocation(110, LLLocCat.QUEST, 16, "Haunted Tower Roof"), + "Q: The Last Gate": LLLocation(111, LLLocCat.QUEST, 17, "Castle Vampy IV"), + "Q: The Rescue": LLLocation(112, LLLocCat.QUEST, 18, "A Gloomy Cavern"), + "Q: The Collection": LLLocation(113, LLLocCat.QUEST, 19, "A Cabin Collector"), + "Evil Smashin'": LLLocation(114, LLLocCat.BADGE, 0, "The Evilizer", base_item="Quick Mode"), + "Bowlin'": LLLocation(115, LLLocCat.BADGE, 1, "Bowling", base_item="Disco Mode"), + "Vandalizin'": LLLocation(116, LLLocCat.BADGE, 2, "Zombiton", base_item="Vintage Mode"), + "Greed": LLLocation(117, LLLocCat.BADGE, 3, "Menu", flags=["LONG"], base_item="Infinite Gems"), + "Monster Slayin'": LLLocation(118, LLLocCat.BADGE, 4, "Menu", flags=["LONG"], base_item="Sidekick"), + "Monster Poundin'": LLLocation(119, LLLocCat.BADGE, 5, "Menu", flags=["LONG"], base_item="Hardcore Mode"), + "Ghostbustin'": LLLocation(120, LLLocCat.BADGE, 6, "Haunted Tower Roof", base_item="Homing Shots"), + "Lookin'": LLLocation(121, LLLocCat.BADGE, 7, "The Witch's Cabin", base_item="20/20 Vision"), + "Ultimate Victory": LLLocation(122, LLLocCat.BADGE, 8, "The Evilizer", base_item="Ultimate Firepower"), + "Kickin'": LLLocation(123, LLLocCat.BADGE, 9, "Loony Ball", base_item="Surprise Mode"), + "Boss Bashin'": LLLocation(124, LLLocCat.BADGE, 10, "Boss Bash", base_item="Combo-Bombo"), + "Vampire Slayin'": LLLocation(125, LLLocCat.BADGE, 11, "The Heart Of Terror", base_item="Play As Bonkula"), + "Sneakin'": LLLocation(126, LLLocCat.BADGE, 12, "Haunted Tower", base_item="Play As Swampdog"), + "Witch Hunt": LLLocation(127, LLLocCat.BADGE, 13, "Happy Stick Woods", base_item="Play As Witch"), + "Animal Control": LLLocation(128, LLLocCat.BADGE, 14, "The Wolf Den", base_item="Play As Werewolf"), + "Annoyance": LLLocation(129, LLLocCat.BADGE, 15, "The Witch's Cabin", base_item="Play As Toad"), + "Civic Duty": LLLocation(130, LLLocCat.BADGE, 16, "A Gloomy Cavern", base_item="Enemy Overload"), + "Winnin'": LLLocation(131, LLLocCat.BADGE, 17, "The Evilizer", base_item="Crystal Ball"), + "Combo Plate": LLLocation(132, LLLocCat.BADGE, 18, "Menu", base_item="Radar"), + "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, 19, "Rocky Cliffs", base_item="Heavy Hitter"), + "Findin'": LLLocation(134, LLLocCat.BADGE, 20, "The Wolf Den", base_item="Rapid Fire"), + "Extreme Survivin'": LLLocation( + 135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA"], base_item="Touch Of Death" + ), + "Huntin'": LLLocation(136, LLLocCat.BADGE, 22, "Halloween Hill", base_item="All Access Pass"), + "Advanced Winnin'": LLLocation(137, LLLocCat.BADGE, 23, "Menu", flags=["LONG"], base_item="Terror Mode"), + "Survivin'": LLLocation(138, LLLocCat.BADGE, 24, "Survival", base_item="Save Anywhere"), + "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, 25, "Larry's Lair", base_item="Guided Shots"), + "Mad Skeelz": LLLocation( + 140, LLLocCat.BADGE, 26, "The Evilizer", flags=["LONG_VANILLA"], base_item="Kick The Cat!" + ), + "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, 27, "Frankenjulie's Laboratory", base_item="Slo-Mo"), + "Combo Magic": LLLocation(142, LLLocCat.BADGE, 28, "Survival", base_item="Infinite Survival"), + "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, 29, "Slurpy Swamp Mud", base_item="Frog-o-rama"), + "R-R-R-Remix!": LLLocation(144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG"], base_item="Play As Summony"), + "Witchcraft": LLLocation(145, LLLocCat.BADGE, 31, "Menu", flags=["LONG"], base_item="Play As Ninja Girl"), + "Ninjitsu": LLLocation(146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA"], base_item="Molecular Dispersion"), + "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, 33, "Survival", base_item="Guaranteed Survival"), + "Hooliganin'": LLLocation(148, LLLocCat.BADGE, 34, "Loony Ball", base_item="Bend It Like Bouapha"), + "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, 35, "Menu", flags=["LONG"], base_item="Stinky Farley"), + "Scorin'": LLLocation(150, LLLocCat.BADGE, 36, "The Evilizer", base_item="Ultra Weapons Are Go!"), + "Brawlin'": LLLocation( + 151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA"], base_item="Thorns Aura" + ), + "Minin' For Treasure": LLLocation( + 152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration" + ), + "Digitally Masterin'": LLLocation(153, LLLocCat.BADGE, 39, "Menu", flags=["LONG"], base_item="Farley Free Zone"), + "Tree Trimming Reward": LLLocation(154, LLLocCat.REWARD, VAR_TREEREWARD, "A Cabin Trees"), + "Larry's Wife Reward": LLLocation(155, LLLocCat.REWARD, VAR_LARRYREWARD, "A Cabin Larry"), + "Farmer Reward": LLLocation(156, LLLocCat.REWARD, VAR_CROPSREWARD, "Halloween Hill"), + "Mayor Reward": LLLocation(157, LLLocCat.REWARD, VAR_ZOMBIEREWARD, "Zombiton"), + "Bat Drop": LLLocation(158, LLLocCat.DOLL, 0, "Menu", base_item="Bat Doll"), + "Skeleton Drop": LLLocation(159, LLLocCat.DOLL, 1, "Menu", base_item="Skeleton Doll"), + "Frog Drop": LLLocation(160, LLLocCat.DOLL, 2, "Menu", base_item="Frog Doll"), + "Ghost Drop": LLLocation(161, LLLocCat.DOLL, 3, "Menu", base_item="Ghost Doll"), + "Mummy Drop": LLLocation(162, LLLocCat.DOLL, 4, "Menu", base_item="Mummy Doll"), + "Swampdog Drop": LLLocation(163, LLLocCat.DOLL, 5, "Menu", base_item="Swampdog Doll"), + "Vampire Drop": LLLocation(164, LLLocCat.DOLL, 6, "Menu", base_item="Vampire Doll"), + "Wolf Drop": LLLocation(165, LLLocCat.DOLL, 7, "Menu", base_item="Wolfman Doll"), } + + def set_rules(multiworld, world, player): access_rules: dict[str, CollectionRule] = { "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", player), @@ -692,14 +739,18 @@ def set_rules(multiworld, world, player): "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, player), "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", player), "Under The Lake: Bat Door": lambda state: state.has("Bat Key", player), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) and state.has("Skull Key", player) and state.has("Pumpkin Key", player), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) + and state.has("Skull Key", player) + and state.has("Pumpkin Key", player), "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), "Wolf Den: Vine": lambda state: state.has("Fertilizer", player), "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", player), "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", player), "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) and can_kill_werewolves(state, player), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) and can_kill_werewolves(state, player), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) + and can_kill_werewolves(state, player), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) + and can_kill_werewolves(state, player), "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), "Swampdog Lair: End": lambda state: have_light_source(state, player) and state.has("Fertilizer", player), @@ -710,32 +761,57 @@ def set_rules(multiworld, world, player): "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), "Q: Mystery Lake": lambda state: state.has("Orb", player, 4), - "Q: A True Hero": lambda state: state.has("Fertilizer", player), + "Q: A True Hero": lambda state: state.has("Fertilizer", player) and have_bombs(state, player), "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, player) and state.has("Silver", player), "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", player), "Q: Ghostbusting": lambda state: state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), "Q: The Last Gate": lambda state: state.has("Vampire Bust", player, 8), - "Q: The Collection": lambda state: can_kill_werewolves(state, player) and state.has("Ghost Potion", player) and state.can_reach_region("Castle Vampy", player), + "Q: The Collection": lambda state: can_kill_werewolves(state, player) + and state.has("Ghost Potion", player) + and state.can_reach_region("Castle Vampy", player), + "Greed": lambda state: state.can_reach_region("Castle Vampy IV", player), + "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", player), + "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", player), "Animal Control": lambda state: can_kill_werewolves(state, player), - "Cleanin' Up": lambda state: have_bombs(state, player), + "Cleanin' Up": lambda state: have_many_bombs(state, player), "Extreme Survivin'": lambda state: state.has("Terror Mode", player), - "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", player) and state.can_reach_region("Zombiton", player) and state.can_reach_region("Slurpy Swamp Mud", player) and can_kill_werewolves(state, player), + "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", player) + and state.can_reach_region("Zombiton", player) + and state.can_reach_region("Slurpy Swamp Mud", player) + and can_kill_werewolves(state, player), "Advanced Winnin'": lambda state: hundred_percent(state, player), "Mad Skeelz": lambda state: state.has("Terror Mode", player), "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", player), - "Witchcraft": lambda state: state.has("Play As Witch", player) and have_all_weapons(state, player), + "R-R-R-Remix!": lambda state: hundred_percent(state, player) and state.has("Remix Access", player), + "Witchcraft": lambda state: state.has("Play As Witch", player) + and have_all_weapons(state, player) + and state.can_reach_region("Castle Vampy IV", player), "Ninjitsu": lambda state: state.has("Play As Ninja Girl", player) and have_all_weapons(state, player), "Stayin' Alive": lambda state: state.has("Infinite Survival", player), - "Swampdoggin'": lambda state: state.has("Play As Swampdog", player), + "Swampdoggin'": lambda state: state.has("Play As Swampdog", player) + and state.can_reach_region("Castle Vampy IV", player), "Brawlin'": lambda state: state.has("Touch Of Death", player), + "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", player) + and state.has("Remix Access", player), "Digitally Masterin'": lambda state: have_39_badges(state, player), - "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", player) and can_cleanse_crypts(state, player), + "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", player) + and can_cleanse_crypts(state, player), "Farmer Reward": lambda state: can_cleanse_crypts(state, player), "Mayor Reward": lambda state: can_cleanse_crypts(state, player), + "Bat Drop": lambda state: can_reach_bats(state, player), + "Skeleton Drop": lambda state: can_reach_skeleton(state, player), + "Frog Drop": lambda state: can_reach_frog(state, player), + "Ghost Drop": lambda state: can_reach_ghost(state, player) and state.has("Ghost Potion", player), + "Mummy Drop": lambda state: can_reach_mummy(state, player), + "Swampdog Drop": lambda state: can_reach_swampdog(state, player), + "Vampire Drop": lambda state: can_reach_vampire(state, player), + "Wolf Drop": lambda state: can_reach_wolves(state, player) and can_kill_werewolves(state, player), } for loc in multiworld.get_locations(player): if loc.name in access_rules: add_rule(loc, access_rules[loc.name]) + + def set_entrance_rules(multiworld, world, player): loonyland_entrance_table: list[LLEntrance] = [ LLEntrance("Menu", "Halloween Hill", False), @@ -770,7 +846,9 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Zombiton", "A Cabin Larry", True), LLEntrance("Halloween Hill", "The Wolf Den Entrance", True), LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", player)), - LLEntrance("Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, player)), + LLEntrance( + "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, player) + ), LLEntrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), LLEntrance("Vampy Land", "Castle Vampy", True), LLEntrance("Halloween Hill", "Cabin In The Woods", True), @@ -813,71 +891,183 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), LLEntrance("Haunted Tower", "Haunted Basement Entrance", False), LLEntrance("Haunted Tower", "Haunted Tower Stairs Up", False), - LLEntrance("Haunted Tower", "Haunted Tower Stairs Down", False, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player)), + LLEntrance( + "Haunted Tower", + "Haunted Tower Stairs Down", + False, + lambda state: state.has("Bat Key", player) + and state.has("Pumpkin Key", player) + and state.has("Skull Key", player), + ), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), - LLEntrance("Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", player) and state.has("Pumpkin Key", player) and state.has("Skull Key", player) and state.has("Ghost Potion", player)), - LLEntrance("Haunted Tower Stairs Down", "Haunted Basement Entrance", True, lambda state: have_light_source(state, player)), + LLEntrance( + "Haunted Tower Stairs Down", + "Haunted Tower", + False, + lambda state: state.has("Bat Key", player) + and state.has("Pumpkin Key", player) + and state.has("Skull Key", player) + and state.has("Ghost Potion", player), + ), + LLEntrance( + "Haunted Tower Stairs Down", + "Haunted Basement Entrance", + True, + lambda state: have_light_source(state, player), + ), LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), - LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", player)), + LLEntrance( + "Haunted Tower Floor 2 Entrance", + "Haunted Tower Floor 2", + False, + lambda state: state.has("Ghost Potion", player), + ), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), - LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", player)), + LLEntrance( + "Haunted Tower Floor 2 Exit", + "Haunted Tower Floor 2", + False, + lambda state: state.has("Ghost Potion", player), + ), LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), - LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", player)), + LLEntrance( + "Haunted Tower Floor 3 Entrance", + "Haunted Tower Floor 3", + False, + lambda state: state.has("Ghost Potion", player), + ), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), - LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", player)), + LLEntrance( + "Haunted Tower Floor 3 Exit", + "Haunted Tower Floor 3", + False, + lambda state: state.has("Ghost Potion", player), + ), LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), LLEntrance("Haunted Tower Roof", "Halloween Hill", True), LLEntrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), LLEntrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), - LLEntrance("Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, player) + ), LLEntrance("Haunted Basement", "Haunted Basement Entrance", False), - LLEntrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, player) + ), LLEntrance("Abandoned Mines Entrance", "Rocky Cliffs", True), LLEntrance("Abandoned Mines", "Abandoned Mines Entrance", False), LLEntrance("The Shrine Of Bombulus", "Rocky Cliffs", True), - LLEntrance("A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, player)), + LLEntrance( + "A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, player) + ), LLEntrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), LLEntrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), LLEntrance("Happy Stick Woods", "Halloween Hill", True), - LLEntrance("The Wolf Den Entrance", "The Wolf Den", False, lambda state: can_kill_werewolves(state, player) and have_light_source(state, player)), + LLEntrance( + "The Wolf Den Entrance", + "The Wolf Den", + False, + lambda state: can_kill_werewolves(state, player) and have_light_source(state, player), + ), LLEntrance("The Wolf Den Entrance", "Halloween Hill", True), LLEntrance("The Wolf Den", "The Wolf Den Entrance", False), LLEntrance("The Wolf Den", "The Wolf Den Exit", False), LLEntrance("The Wolf Den Exit", "Larry's Lair", True), - LLEntrance("The Wolf Den Exit", "The Wolf Den", False, lambda state: can_kill_werewolves(state, player) and have_light_source(state, player)), + LLEntrance( + "The Wolf Den Exit", + "The Wolf Den", + False, + lambda state: can_kill_werewolves(state, player) and have_light_source(state, player), + ), LLEntrance("A Cabin Larry", "Zombiton", True), LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), - LLEntrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Upper Creepy Caverns Left Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, player), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), - LLEntrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, lambda state: have_light_source(state, player)), - LLEntrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Upper Creepy Caverns Middle Warp", + "Creepy Caverns Left Top Warp", + True, + lambda state: have_light_source(state, player), + ), + LLEntrance( + "Upper Creepy Caverns Middle Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, player), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), - LLEntrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, lambda state: have_light_source(state, player)), - LLEntrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Upper Creepy Caverns Right Warp", + "Creepy Caverns Middle Top Warp", + True, + lambda state: have_light_source(state, player), + ), + LLEntrance( + "Upper Creepy Caverns Right Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, player), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), - LLEntrance("Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, player)), - LLEntrance("Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, player)), + LLEntrance( + "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, player) + ), + LLEntrance( + "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, player) + ), LLEntrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), - LLEntrance("Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Creepy Caverns Left Bottom Warp", + "Creepy Caverns Left", + False, + lambda state: have_light_source(state, player), + ), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), - LLEntrance("Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player) + ), LLEntrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), LLEntrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), - LLEntrance("Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Creepy Caverns Middle Top Warp", + "Creepy Caverns Middle", + False, + lambda state: have_light_source(state, player), + ), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), LLEntrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True), - LLEntrance("Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Creepy Caverns Middle Right Warp", + "Creepy Caverns Middle", + False, + lambda state: have_light_source(state, player), + ), LLEntrance("Creepy Caverns Right Left Warp", "Under The Ravine", True), - LLEntrance("Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Creepy Caverns Right Left Warp", + "Creepy Caverns Right", + False, + lambda state: have_light_source(state, player), + ), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), - LLEntrance("Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, player)), + LLEntrance( + "Creepy Caverns Right Bottom Warp", + "Creepy Caverns Right", + False, + lambda state: have_light_source(state, player), + ), LLEntrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), LLEntrance("Castle Vampy", "Halloween Hill", True), LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), @@ -901,8 +1091,12 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Castle Vampy II NW", "Castle Vampy III NW", True), LLEntrance("Cabin In The Woods", "Halloween Hill", True), LLEntrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), - LLEntrance("Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", player)), - LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", player)), + LLEntrance( + "Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", player) + ), + LLEntrance( + "Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", player) + ), LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), LLEntrance("Castle Vampy III NE", "Castle Vampy II NE", True), LLEntrance("Castle Vampy III NE", "Castle Vampy IV NE", True), @@ -913,7 +1107,9 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Castle Vampy III NW", "Castle Vampy II NW", True), LLEntrance("Castle Vampy III NW", "Castle Vampy IV NW", True), LLEntrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), - LLEntrance("Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", player, 8)), + LLEntrance( + "Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", player, 8) + ), LLEntrance("Castle Vampy IV NE", "Castle Vampy III NE", True), LLEntrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), LLEntrance("Castle Vampy IV SE", "Castle Vampy III SE", True), @@ -928,7 +1124,9 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), LLEntrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), LLEntrance("The Evilizer", "Halloween Hill", True), - LLEntrance("The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, player)), + LLEntrance( + "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, player) + ), LLEntrance("The Heart Of Terror", "The Evilizer", True), LLEntrance("The Heart Of Terror", "Empty Rooftop", True), LLEntrance("A Hidey-Hole", "Halloween Hill", True), @@ -942,16 +1140,35 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), LLEntrance("Zombiton", "Halloween Hill", False), LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", player)), - LLEntrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", player) or state.has("All Access Pass", player)), - LLEntrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", player) or state.has("All Access Pass", player)), + LLEntrance( + "Halloween Hill", + "Rocky Cliffs", + False, + lambda state: state.has("Big Gem", player) or state.has("All Access Pass", player), + ), + LLEntrance( + "Rocky Cliffs", + "Halloween Hill", + False, + lambda state: state.has("Big Gem", player) or state.has("All Access Pass", player), + ), LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", player)), LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", player)), LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", player)), - LLEntrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player)), - LLEntrance("Underground Tunnel Zombie", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player) and state.has("All Access Pass", player)), + LLEntrance( + "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player) + ), + LLEntrance( + "Underground Tunnel Zombie", + "Underground Tunnel Mud", + False, + lambda state: state.has("Boots", player) and state.has("All Access Pass", player), + ), LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), - LLEntrance("Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", player)), + LLEntrance( + "Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", player) + ), ] for region in multiworld.get_regions(player): for entry in loonyland_entrance_table: diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index d63c89b3a320..aafc1dccbaa3 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -16,7 +16,7 @@ ) from .items import LLItemCat, LoonylandItem from .locations import LLLocCat, LoonylandLocation -from .options import LoonylandOptions +from .options import Badges, LoonylandOptions class LoonylandWebWorld(WebWorld): @@ -45,6 +45,8 @@ class LoonylandWorld(World): item_name_to_id = {name: data.id for name, data in loony_item_table.items()} item_name_groups = { + "physical_items": {name for name, data in loony_item_table.items() if data.category == LLItemCat.ITEM}, + "monster_dolls": {name for name, data in loony_item_table.items() if data.category == LLItemCat.DOLL}, "cheats": {name for name, data in loony_item_table.items() if data.category == LLItemCat.CHEAT}, "special_weapons": { name @@ -61,20 +63,21 @@ class LoonylandWorld(World): def create_item(self, name: str) -> LoonylandItem: return LoonylandItem(name, loony_item_table[name].classification, loony_item_table[name].id, self.player) - def create_junk(self, name: str) -> LoonylandItem: - return LoonylandItem(name, ItemClassification.filler, loonyland_base_id + 3000, self.player) + def create_junk(self) -> LoonylandItem: + return LoonylandItem("A Cool Filler Item", ItemClassification.filler, loonyland_base_id + 3000, self.player) def create_items(self) -> None: item_pool: list[LoonylandItem] = [] for name, item in loony_item_table.items(): - if item.id and item.can_create(self.multiworld, self.player): + if item.id and item.can_create(self.options): for i in range(item.frequency): new_item = self.create_item(name) - new_item.cheat = item.category == LLItemCat.CHEAT item_pool.append(new_item) - junk = len(self.multiworld.get_unfilled_locations(self.player)) - len(item_pool) - 1 # - 1 for win con location - item_pool += [self.create_junk(self.get_filler_item_name()) for _ in range(junk)] + junk_len = ( + len(self.multiworld.get_unfilled_locations(self.player)) - len(item_pool) - 1 + ) # - 1 for win con location + item_pool += [self.create_junk() for _ in range(junk_len)] self.multiworld.itempool += item_pool @@ -87,15 +90,15 @@ def create_regions(self) -> None: self.multiworld.regions.append(region) for loc_name, loc_data in loonyland_location_table.items(): - if not loc_data.can_create(self.multiworld, self.player): + if not loc_data.can_create(self.options): continue region = self.multiworld.get_region(loc_data.region, self.player) new_loc = LoonylandLocation(self.player, loc_name, loc_data.id + loonyland_base_id, region) + if not loc_data.in_logic(self.options): + new_loc.place_locked_item(self.create_event(loc_data.base_item)) + new_loc.address = None region.locations.append(new_loc) - def get_filler_item_name(self) -> str: - return "A Cool Filler Item (No Satisfaction Guaranteed)" - def set_rules(self): # Completion condition. # self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) diff --git a/worlds/loonyland/items.py b/worlds/loonyland/items.py index 306d1a7b0825..4d653660f9f1 100644 --- a/worlds/loonyland/items.py +++ b/worlds/loonyland/items.py @@ -1,7 +1,9 @@ from enum import Enum -from typing import Callable, NamedTuple +from typing import NamedTuple -from BaseClasses import Item, ItemClassification, MultiWorld +from BaseClasses import Item, ItemClassification + +from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, Remix class LoonylandItem(Item): @@ -10,7 +12,6 @@ class LoonylandItem(Item): """ game: str = "Loonyland" - cheat: bool = False class LLItemCat(Enum): @@ -28,4 +29,19 @@ class LLItem(NamedTuple): category: LLItemCat classification: ItemClassification frequency: int = 1 - can_create: Callable[[MultiWorld, int], bool] = lambda multiworld, player: True + flags: list[str] = [] + + def can_create(self, options: LoonylandOptions) -> bool: + if ( + self.category == LLItemCat.CHEAT + and (options.badges == Badges.option_none or options.badges == Badges.option_vanilla) + ) or ( + self.category == LLItemCat.DOLL + and (options.dolls == MonsterDolls.option_none or options.dolls == MonsterDolls.option_vanilla) + ): + return False + if options.long_checks == LongChecks.option_excluded and ("OP" in self.flags): + return False + if options.remix == Remix.option_excluded and ("REMIX" in self.flags): + return False + return True diff --git a/worlds/loonyland/locations.py b/worlds/loonyland/locations.py index 32776c20daca..6cf6268a249b 100644 --- a/worlds/loonyland/locations.py +++ b/worlds/loonyland/locations.py @@ -1,7 +1,9 @@ from enum import Enum -from typing import Callable, NamedTuple +from typing import NamedTuple -from BaseClasses import Location, MultiWorld +from BaseClasses import Location + +from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, Remix class LoonylandLocation(Location): @@ -20,5 +22,27 @@ class LLLocCat(Enum): class LLLocation(NamedTuple): id: int category: LLLocCat + map_id: int region: str - can_create: Callable[[MultiWorld, int], bool] = lambda multiworld, player: True + flags: list[str] = [] + base_item: str = "" + + def can_create(self, options: LoonylandOptions) -> bool: + if (self.category == LLLocCat.BADGE and (options.badges == Badges.option_none)) or ( + self.category == LLLocCat.DOLL and (options.dolls == MonsterDolls.option_none) + ): + return False + if options.long_checks == LongChecks.option_excluded and ( + "LONG" in self.flags or ("LONG_VANILLA" in self.flags and options.badges == Badges.option_vanilla) + ): + return False + if options.remix == Remix.option_excluded and ("REMIX" in self.flags): + return False + return True + + def in_logic(self, options: LoonylandOptions) -> bool: + if (self.category == LLLocCat.BADGE and (options.badges == Badges.option_vanilla)) or ( + self.category == LLLocCat.DOLL and (options.dolls == MonsterDolls.option_vanilla) + ): + return False + return True diff --git a/worlds/loonyland/options.py b/worlds/loonyland/options.py index 9e2602b4cb83..a757c84cf6d2 100644 --- a/worlds/loonyland/options.py +++ b/worlds/loonyland/options.py @@ -28,8 +28,57 @@ class Difficulty(Choice): default = 1 +class LongChecks(Choice): + """Excluded: Remove 100%, 39 badges, swampdog to 50, witch to lvl 9 spells, 5000 gems, and the monster point badges + Does nothing if badges are already set to none + """ + + display_name = "Long Checks" + option_excluded = 0 + option_included = 1 + default = 0 + + +class Remix(Choice): + """Excluded: Remix mode not included""" + + display_name = "Remix" + option_excluded = 0 + option_included = 1 + default = 0 + + +class Badges(Choice): + """Full: All badges and their cheats are in logic + Reasonable: Remove hard to get badges and overpowered cheats + Vanilla: Badges aren't randomized, but are in logic + None: Badges aren't in logic""" + + display_name = "Badges" + option_full = 0 + option_vanilla = 1 + option_none = 2 + default = 2 + + +class MonsterDolls(Choice): + """Full: Monsters can drop randomized items, monster dolls can be found at locations + Vanilla: Monsters drop their normal monster doll + None: Dolls aren't in logic""" + + display_name = "Monster Dolls" + option_full = 0 + option_vanilla = 1 + option_none = 2 + default = 0 + + @dataclass class LoonylandOptions(PerGameCommonOptions): # win_condition: WinCondition difficulty: Difficulty + long_checks: LongChecks + remix: Remix + badges: Badges + dolls: MonsterDolls death_link: DeathLink diff --git a/worlds/loonyland/rules.py b/worlds/loonyland/rules.py index 0108a5af6cd3..bd03a32a42df 100644 --- a/worlds/loonyland/rules.py +++ b/worlds/loonyland/rules.py @@ -2,21 +2,31 @@ def have_light_source(state: CollectionState, player: int) -> bool: - return state.has("Lantern", player) or ( - state.has("Stick", player) and state.has("Boots", player) and state.can_reach_region("Swamp Gas Cavern", player) - ) or ( - state.has("20/20 Vision", player) + return ( + state.has("Lantern", player) + or ( + state.has("Stick", player) + and state.has("Boots", player) + and state.can_reach_region("Swamp Gas Cavern", player) + ) + or (state.has("20/20 Vision", player)) ) # 20/20 when badges added + def can_kill_werewolves(state: CollectionState, player: int) -> bool: return state.has("Silver Sling", player) or state.has("Touch Of Death", player) + def have_bombs(state: CollectionState, player: int) -> bool: return state.has("Bombs", player) or state.has("Combo-Bombo", player) or state.has("Play As Werewolf", player) # or werewolf badge when badges are added +def have_many_bombs(state: CollectionState, player: int) -> bool: + return state.has("Bombs", player) or (state.has("Play As Werewolf", player) and state.has("Infinite Gems", player)) + + def have_special_weapon_damage(state: CollectionState, player: int) -> bool: return state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) # needed for gutsy @@ -56,29 +66,44 @@ def can_cleanse_crypts(state: CollectionState, player: int) -> bool: def hundred_percent(state: CollectionState, player: int) -> bool: - return False + return state.has_group("physical_items", player, 105) def have_39_badges(state: CollectionState, player: int) -> bool: - return state.has_group("cheats", player, 10) + return state.has_group("cheats", player, 39) def have_all_weapons(state: CollectionState, player: int) -> bool: return state.has_group("special_weapons", player, 7) + def can_reach_bats(state: CollectionState, player: int) -> bool: return state.can_reach_region("The Shrine Of Bombulus", player) + + def can_reach_skeleton(state: CollectionState, player: int) -> bool: return state.can_reach_region("Halloween Hill", player) + + def can_reach_frog(state: CollectionState, player: int) -> bool: return state.can_reach_region("Halloween Hill", player) + + def can_reach_ghost(state: CollectionState, player: int) -> bool: return state.can_reach_region("Haunted Tower", player) + + def can_reach_mummy(state: CollectionState, player: int) -> bool: return state.can_reach_region("Rocky Cliffs", player) + + def can_reach_swampdog(state: CollectionState, player: int) -> bool: return state.can_reach_region("Halloween Hill", player) + + def can_reach_vampire(state: CollectionState, player: int) -> bool: return state.can_reach_region("Castle Vampy", player) + + def can_reach_wolves(state: CollectionState, player: int) -> bool: - return state.can_reach_region("Halloween Hill", player) \ No newline at end of file + return state.can_reach_region("Halloween Hill", player) From 33676db74e2f611c0cad21bc9bfb58ad1d4f61c9 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Wed, 25 Dec 2024 10:30:23 -0500 Subject: [PATCH 40/58] power level, monster doll stuff, options handling --- worlds/loonyland/Data/game_data.py | 538 ++++++++++------------------- worlds/loonyland/__init__.py | 18 +- worlds/loonyland/items.py | 33 +- worlds/loonyland/locations.py | 8 +- worlds/loonyland/options.py | 4 +- worlds/loonyland/rules.py | 110 +++--- 6 files changed, 293 insertions(+), 418 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index 7a17529ac89a..a47f35a16cec 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -7,6 +7,7 @@ from worlds.loonyland.regions import LLRegion from worlds.loonyland.rules import ( can_cleanse_crypts, + can_do_collection, can_kill_werewolves, can_reach_bats, can_reach_frog, @@ -24,6 +25,7 @@ have_special_weapon_bullet, have_special_weapon_damage, hundred_percent, + power_level ) ll_base_id: int = 2876900 @@ -332,10 +334,10 @@ MODE_BADGES = 4 MODE_REMIX = 5 loony_item_table: dict[str, LLItem] = { - "Heart": LLItem(ll_base_id + VAR_HEART, LLItemCat.ITEM, ItemClassification.useful, 20), - "Lightning": LLItem(ll_base_id + VAR_LIGHTNING, LLItemCat.ITEM, ItemClassification.useful, 10), - "Arrow": LLItem(ll_base_id + VAR_ARROW, LLItemCat.ITEM, ItemClassification.useful, 10), - "Pants": LLItem(ll_base_id + VAR_PANTS, LLItemCat.ITEM, ItemClassification.useful, 10), + "Heart": LLItem(ll_base_id + VAR_HEART, LLItemCat.ITEM, ItemClassification.useful, 20, flags=["PWR"]), + "Lightning": LLItem(ll_base_id + VAR_LIGHTNING, LLItemCat.ITEM, ItemClassification.useful, 10, flags=["PWR"]), + "Arrow": LLItem(ll_base_id + VAR_ARROW, LLItemCat.ITEM, ItemClassification.useful, 10, flags=["PWR"]), + "Pants": LLItem(ll_base_id + VAR_PANTS, LLItemCat.ITEM, ItemClassification.useful, 10, flags=["PWR"]), "Mushroom": LLItem(ll_base_id + VAR_MUSHROOM, LLItemCat.ITEM, ItemClassification.progression, 10), "Orb": LLItem(ll_base_id + VAR_MYSORB, LLItemCat.ITEM, ItemClassification.progression, 4), "Bombs": LLItem(ll_base_id + VAR_WBOMBS, LLItemCat.ITEM, ItemClassification.progression), @@ -358,75 +360,57 @@ "Cat": LLItem(ll_base_id + VAR_CAT, LLItemCat.ITEM, ItemClassification.progression), "Big Gem": LLItem(ll_base_id + VAR_GEM, LLItemCat.ITEM, ItemClassification.progression, 6), "100 Gems": LLItem(ll_base_id + VAR_ZOMBIEGEM, LLItemCat.ITEM, ItemClassification.filler), - "Triple Fire Gem": LLItem(ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful), + "Triple Fire Gem": LLItem(ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"]), "Happy Stick": LLItem(ll_base_id + VAR_TALISMAN, LLItemCat.ITEM, ItemClassification.progression), "Bat Statue": LLItem(ll_base_id + VAR_BATSTATUE, LLItemCat.ITEM, ItemClassification.progression, 4), "Lantern": LLItem(ll_base_id + VAR_LANTERN, LLItemCat.ITEM, ItemClassification.progression), - "Reflect Gem": LLItem(ll_base_id + VAR_REFLECT, LLItemCat.ITEM, ItemClassification.useful), + "Reflect Gem": LLItem(ll_base_id + VAR_REFLECT, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"]), "Silver Sling": LLItem(ll_base_id + VAR_SILVERSLING, LLItemCat.ITEM, ItemClassification.progression), "20/20 Vision": LLItem(ll_base_id + CH_LIGHT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Disco Mode": LLItem(ll_base_id + CH_DISCO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Terror Mode": LLItem(ll_base_id + CH_TERROR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Quick Mode": LLItem(ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Quick Mode": LLItem(ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), "Infinite Gems": LLItem(ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Play As Toad": LLItem(ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Radar": LLItem(ll_base_id + CH_RADAR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Touch Of Death": LLItem(ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), + "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"]), + "Touch Of Death": LLItem(ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX"]), "All Access Pass": LLItem(ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Guided Shots": LLItem(ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Slo-Mo": LLItem(ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Guided Shots": LLItem(ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), + "Slo-Mo": LLItem(ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), + "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Play As Witch": LLItem(ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Infinite Survival": LLItem( - ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Infinite Survival": LLItem(ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Play As Summony": LLItem(ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Molecular Dispersion": LLItem( - ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"] - ), - "Guaranteed Survival": LLItem( - ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Molecular Dispersion": LLItem(ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"]), + "Guaranteed Survival": LLItem(ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX"]), "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Stinky Farley": LLItem(ll_base_id + CH_STINKY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Ultra Weapons Are Go!": LLItem( - ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Ultra Weapons Are Go!": LLItem(ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Thorns Aura": LLItem(ll_base_id + CH_THORNS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Monster Regeneration": LLItem( - ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Monster Regeneration": LLItem(ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Bowling Access": LLItem(ll_base_id + MODE_BOWLING + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Survival Access": LLItem( - ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Boss Bash Access": LLItem( - ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Loony Ball Access": LLItem( - ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Remix Access": LLItem( - ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"] - ), + "Survival Access": LLItem(ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Boss Bash Access": LLItem(ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Loony Ball Access": LLItem(ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Remix Access": LLItem(ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"]), "Bat Doll": LLItem(ll_base_id + VAR_BATDOLL, LLItemCat.DOLL, ItemClassification.progression), "Skeleton Doll": LLItem(ll_base_id + VAR_SKELDOLL, LLItemCat.DOLL, ItemClassification.progression), "Frog Doll": LLItem(ll_base_id + VAR_FROGDOLL, LLItemCat.DOLL, ItemClassification.progression), @@ -660,7 +644,7 @@ "Q: The Haunted Tower": LLLocation(110, LLLocCat.QUEST, 16, "Haunted Tower Roof"), "Q: The Last Gate": LLLocation(111, LLLocCat.QUEST, 17, "Castle Vampy IV"), "Q: The Rescue": LLLocation(112, LLLocCat.QUEST, 18, "A Gloomy Cavern"), - "Q: The Collection": LLLocation(113, LLLocCat.QUEST, 19, "A Cabin Collector"), + "Q: The Collection": LLLocation(113, LLLocCat.QUEST, 19, "A Cabin Collector", flags=["DOLL"]), "Evil Smashin'": LLLocation(114, LLLocCat.BADGE, 0, "The Evilizer", base_item="Quick Mode"), "Bowlin'": LLLocation(115, LLLocCat.BADGE, 1, "Bowling", base_item="Disco Mode"), "Vandalizin'": LLLocation(116, LLLocCat.BADGE, 2, "Zombiton", base_item="Vintage Mode"), @@ -682,32 +666,24 @@ "Combo Plate": LLLocation(132, LLLocCat.BADGE, 18, "Menu", base_item="Radar"), "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, 19, "Rocky Cliffs", base_item="Heavy Hitter"), "Findin'": LLLocation(134, LLLocCat.BADGE, 20, "The Wolf Den", base_item="Rapid Fire"), - "Extreme Survivin'": LLLocation( - 135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA"], base_item="Touch Of Death" - ), + "Extreme Survivin'": LLLocation(135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death"), "Huntin'": LLLocation(136, LLLocCat.BADGE, 22, "Halloween Hill", base_item="All Access Pass"), "Advanced Winnin'": LLLocation(137, LLLocCat.BADGE, 23, "Menu", flags=["LONG"], base_item="Terror Mode"), "Survivin'": LLLocation(138, LLLocCat.BADGE, 24, "Survival", base_item="Save Anywhere"), "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, 25, "Larry's Lair", base_item="Guided Shots"), - "Mad Skeelz": LLLocation( - 140, LLLocCat.BADGE, 26, "The Evilizer", flags=["LONG_VANILLA"], base_item="Kick The Cat!" - ), + "Mad Skeelz": LLLocation(140, LLLocCat.BADGE, 26, "The Evilizer", flags=["LONG_VANILLA_BADGES"], base_item="Kick The Cat!"), "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, 27, "Frankenjulie's Laboratory", base_item="Slo-Mo"), "Combo Magic": LLLocation(142, LLLocCat.BADGE, 28, "Survival", base_item="Infinite Survival"), "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, 29, "Slurpy Swamp Mud", base_item="Frog-o-rama"), "R-R-R-Remix!": LLLocation(144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG"], base_item="Play As Summony"), "Witchcraft": LLLocation(145, LLLocCat.BADGE, 31, "Menu", flags=["LONG"], base_item="Play As Ninja Girl"), - "Ninjitsu": LLLocation(146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA"], base_item="Molecular Dispersion"), + "Ninjitsu": LLLocation(146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES"], base_item="Molecular Dispersion"), "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, 33, "Survival", base_item="Guaranteed Survival"), "Hooliganin'": LLLocation(148, LLLocCat.BADGE, 34, "Loony Ball", base_item="Bend It Like Bouapha"), "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, 35, "Menu", flags=["LONG"], base_item="Stinky Farley"), "Scorin'": LLLocation(150, LLLocCat.BADGE, 36, "The Evilizer", base_item="Ultra Weapons Are Go!"), - "Brawlin'": LLLocation( - 151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA"], base_item="Thorns Aura" - ), - "Minin' For Treasure": LLLocation( - 152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration" - ), + "Brawlin'": LLLocation(151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES"], base_item="Thorns Aura"), + "Minin' For Treasure": LLLocation(152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration"), "Digitally Masterin'": LLLocation(153, LLLocCat.BADGE, 39, "Menu", flags=["LONG"], base_item="Farley Free Zone"), "Tree Trimming Reward": LLLocation(154, LLLocCat.REWARD, VAR_TREEREWARD, "A Cabin Trees"), "Larry's Wife Reward": LLLocation(155, LLLocCat.REWARD, VAR_LARRYREWARD, "A Cabin Larry"), @@ -722,104 +698,95 @@ "Vampire Drop": LLLocation(164, LLLocCat.DOLL, 6, "Menu", base_item="Vampire Doll"), "Wolf Drop": LLLocation(165, LLLocCat.DOLL, 7, "Menu", base_item="Wolfman Doll"), } - - -def set_rules(multiworld, world, player): +def set_rules(multiworld, world): access_rules: dict[str, CollectionRule] = { - "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", player), - "Rocky Cliffs: Rock Corner": lambda state: have_bombs(state, player), - "Witch's Cabin: Bedroom": lambda state: have_light_source(state, player), - "Bog Pit: Top Door": lambda state: state.has("Skull Key", player), - "Tunnel: Swampdog Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - "Tunnel: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), - "Swamp Gas: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), - "Swamp Gas: Bat Door": lambda state: state.has("Bat Key", player), - "Swamp Gas: Rock Prison": lambda state: have_bombs(state, player), - "Dusty Crypt: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, player), - "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", player), - "Under The Lake: Bat Door": lambda state: state.has("Bat Key", player), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) - and state.has("Skull Key", player) - and state.has("Pumpkin Key", player), - "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), - "Wolf Den: Vine": lambda state: state.has("Fertilizer", player), - "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", player), - "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", player), - "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) - and can_kill_werewolves(state, player), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) - and can_kill_werewolves(state, player), - "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, player), - "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), - "Swampdog Lair: End": lambda state: have_light_source(state, player) and state.has("Fertilizer", player), - "Q: Scaredy Cat": lambda state: state.has("Cat", player), - "Q: Mushroom Hunt": lambda state: state.has("Mushroom", player, 10), - "Q: Picking Daisies": lambda state: state.has("Doom Daisy", player), - "Q: Curse The Darkness": lambda state: state.has("Stick", player), - "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), - "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), - "Q: Mystery Lake": lambda state: state.has("Orb", player, 4), - "Q: A True Hero": lambda state: state.has("Fertilizer", player) and have_bombs(state, player), - "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, player) and state.has("Silver", player), - "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", player), - "Q: Ghostbusting": lambda state: state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), - "Q: The Last Gate": lambda state: state.has("Vampire Bust", player, 8), - "Q: The Collection": lambda state: can_kill_werewolves(state, player) - and state.has("Ghost Potion", player) - and state.can_reach_region("Castle Vampy", player), - "Greed": lambda state: state.can_reach_region("Castle Vampy IV", player), - "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", player), - "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", player), - "Animal Control": lambda state: can_kill_werewolves(state, player), - "Cleanin' Up": lambda state: have_many_bombs(state, player), - "Extreme Survivin'": lambda state: state.has("Terror Mode", player), - "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", player) - and state.can_reach_region("Zombiton", player) - and state.can_reach_region("Slurpy Swamp Mud", player) - and can_kill_werewolves(state, player), - "Advanced Winnin'": lambda state: hundred_percent(state, player), - "Mad Skeelz": lambda state: state.has("Terror Mode", player), - "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", player), - "R-R-R-Remix!": lambda state: hundred_percent(state, player) and state.has("Remix Access", player), - "Witchcraft": lambda state: state.has("Play As Witch", player) - and have_all_weapons(state, player) - and state.can_reach_region("Castle Vampy IV", player), - "Ninjitsu": lambda state: state.has("Play As Ninja Girl", player) and have_all_weapons(state, player), - "Stayin' Alive": lambda state: state.has("Infinite Survival", player), - "Swampdoggin'": lambda state: state.has("Play As Swampdog", player) - and state.can_reach_region("Castle Vampy IV", player), - "Brawlin'": lambda state: state.has("Touch Of Death", player), - "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", player) - and state.has("Remix Access", player), - "Digitally Masterin'": lambda state: have_39_badges(state, player), - "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", player) - and can_cleanse_crypts(state, player), - "Farmer Reward": lambda state: can_cleanse_crypts(state, player), - "Mayor Reward": lambda state: can_cleanse_crypts(state, player), - "Bat Drop": lambda state: can_reach_bats(state, player), - "Skeleton Drop": lambda state: can_reach_skeleton(state, player), - "Frog Drop": lambda state: can_reach_frog(state, player), - "Ghost Drop": lambda state: can_reach_ghost(state, player) and state.has("Ghost Potion", player), - "Mummy Drop": lambda state: can_reach_mummy(state, player), - "Swampdog Drop": lambda state: can_reach_swampdog(state, player), - "Vampire Drop": lambda state: can_reach_vampire(state, player), - "Wolf Drop": lambda state: can_reach_wolves(state, player) and can_kill_werewolves(state, player), + "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", world.player), + "Rocky Cliffs: Rock Corner": lambda state: have_bombs(state, world), + "Witch's Cabin: Bedroom": lambda state: have_light_source(state, world), + "Bog Pit: Top Door": lambda state: state.has("Skull Key", world.player), + "Tunnel: Swampdog Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), + "Tunnel: Scratch Wall": lambda state: have_special_weapon_bullet(state, world), + "Swamp Gas: Scratch Wall": lambda state: have_special_weapon_bullet(state, world), + "Swamp Gas: Bat Door": lambda state: state.has("Bat Key", world.player), + "Swamp Gas: Rock Prison": lambda state: have_bombs(state, world), + "Dusty Crypt: Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), + "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, world), + "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", world.player), + "Under The Lake: Bat Door": lambda state: state.has("Bat Key", world.player), + "Frankenjulie's Reward": lambda state: power_level(state, world, 10), + "PolterGuy's Reward": lambda state: power_level(state, world, 10), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) and state.has("Skull Key", world.player) and state.has("Pumpkin Key", world.player), + "Happy Stick: Reward": lambda state: power_level(state, world, 40), + "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), + "Wolf Den: Vine": lambda state: state.has("Fertilizer", world.player), + "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", world.player), + "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", world.player), + "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", world.player), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), + "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) and power_level(state, world, 20), + "Roof NE: Stoney the Elder": lambda state: power_level(state, world, 20), + "Roof SW: Drippy the Elder": lambda state: power_level(state, world, 20), + "Roof SE: Toasty the Elder": lambda state: power_level(state, world, 20), + "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", world.player), + "Swampdog Lair: End": lambda state: have_light_source(state, world) and state.has("Fertilizer", world.player), + "Q: Save Halloween Hill": lambda state: power_level(state, world, 30), + "Q: Scaredy Cat": lambda state: state.has("Cat", world.player), + "Q: Mushroom Hunt": lambda state: state.has("Mushroom", world.player, 10), + "Q: Picking Daisies": lambda state: state.has("Doom Daisy", world.player), + "Q: Curse The Darkness": lambda state: state.has("Stick", world.player), + "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, world), + "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, world), + "Q: Mystery Lake": lambda state: state.has("Orb", world.player, 4), + "Q: Beneath The Lake": lambda state: power_level(state, world, 10), + "Q: A True Hero": lambda state: state.has("Fertilizer", world.player) and have_bombs(state, world), + "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, world) and state.has("Silver", world.player), + "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) and power_level(state, world, 10), + "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) and state.has("Mushroom", world.player, 10), + "Q: The Haunted Tower": lambda state: power_level(state, world, 10), + "Q: The Last Gate": lambda state: state.has("Vampire Bust", world.player, 8), + "Q: The Collection": lambda state: can_do_collection(state, world), + "Greed": lambda state: state.can_reach_region("Castle Vampy IV", world.player), + "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player), + "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player), + "Animal Control": lambda state: can_kill_werewolves(state, world), + "Cleanin' Up": lambda state: have_many_bombs(state, world), + "Extreme Survivin'": lambda state: state.has("Terror Mode", world.player), + "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) and state.can_reach_region("Zombiton", world.player) and state.can_reach_region("Slurpy Swamp Mud", world.player) and can_kill_werewolves(state, world), + "Advanced Winnin'": lambda state: hundred_percent(state, world), + "Mad Skeelz": lambda state: state.has("Terror Mode", world.player), + "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", world.player), + "R-R-R-Remix!": lambda state: hundred_percent(state, world) and state.has("Remix Access", world.player), + "Witchcraft": lambda state: state.has("Play As Witch", world.player) and have_all_weapons(state, world) and state.can_reach_region("Castle Vampy IV", world.player), + "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) and have_all_weapons(state, world), + "Stayin' Alive": lambda state: state.has("Infinite Survival", world.player), + "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) and state.can_reach_region("Castle Vampy IV", world.player), + "Brawlin'": lambda state: state.has("Touch Of Death", world.player), + "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) and state.has("Remix Access", world.player), + "Digitally Masterin'": lambda state: have_39_badges(state, world), + "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) and can_cleanse_crypts(state, world), + "Farmer Reward": lambda state: can_cleanse_crypts(state, world), + "Mayor Reward": lambda state: can_cleanse_crypts(state, world), + "Bat Drop": lambda state: can_reach_bats(state, world), + "Skeleton Drop": lambda state: can_reach_skeleton(state, world), + "Frog Drop": lambda state: can_reach_frog(state, world), + "Ghost Drop": lambda state: can_reach_ghost(state, world) and state.has("Ghost Potion", world.player), + "Mummy Drop": lambda state: can_reach_mummy(state, world), + "Swampdog Drop": lambda state: can_reach_swampdog(state, world), + "Vampire Drop": lambda state: can_reach_vampire(state, world), + "Wolf Drop": lambda state: can_reach_wolves(state, world) and can_kill_werewolves(state, world), } - for loc in multiworld.get_locations(player): + for loc in multiworld.get_locations(world.player): if loc.name in access_rules: add_rule(loc, access_rules[loc.name]) - - -def set_entrance_rules(multiworld, world, player): +def set_entrance_rules(multiworld, world): loonyland_entrance_table: list[LLEntrance] = [ LLEntrance("Menu", "Halloween Hill", False), - LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", player)), - LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", player)), - LLEntrance("Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", player)), - LLEntrance("Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", player)), - LLEntrance("Menu", "Remix", False, lambda state: state.has("Remix Access", player)), + LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", world.player)), + LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", world.player)), + LLEntrance("Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player)), + LLEntrance("Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player)), + LLEntrance("Menu", "Remix", False, lambda state: state.has("Remix Access", world.player)), LLEntrance("Halloween Hill", "A Cabin Trees", True), LLEntrance("Halloween Hill", "The Witch's Cabin", True), LLEntrance("Halloween Hill", "Bonita's Cabin", True), @@ -829,7 +796,7 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern", True), LLEntrance("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False), LLEntrance("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True), - LLEntrance("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), + LLEntrance("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", world.player)), LLEntrance("Halloween Hill", "The Witch's Cabin Back", True), LLEntrance("Zombiton", "A Cabin Seer", True), LLEntrance("Zombiton", "Benny's Cocktails", True), @@ -837,18 +804,16 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Zombiton", "Musty Crypt Entrance", True), LLEntrance("Zombiton", "A Messy Cabin", True), LLEntrance("Halloween Hill", "Rusty Crypt Entrance", True), - LLEntrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), - LLEntrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", player)), + LLEntrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", world.player, 4)), + LLEntrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Rocky Cliffs", "Abandoned Mines Entrance", True), LLEntrance("Rocky Cliffs", "The Shrine Of Bombulus", True), - LLEntrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, player)), - LLEntrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", player)), + LLEntrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, world)), + LLEntrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", world.player)), LLEntrance("Zombiton", "A Cabin Larry", True), LLEntrance("Halloween Hill", "The Wolf Den Entrance", True), - LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", player)), - LLEntrance( - "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, player) - ), + LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player)), + LLEntrance("Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world)), LLEntrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), LLEntrance("Vampy Land", "Castle Vampy", True), LLEntrance("Halloween Hill", "Cabin In The Woods", True), @@ -868,17 +833,17 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("A Cabin Seer", "Zombiton", True), LLEntrance("Benny's Cocktails", "Zombiton", True), LLEntrance("Benny's Cocktails", "Underground Tunnel Zombie", True), - LLEntrance("Dusty Crypt Entrance", "Dusty Crypt", False, lambda state: have_light_source(state, player)), + LLEntrance("Dusty Crypt Entrance", "Dusty Crypt", False, lambda state: have_light_source(state, world)), LLEntrance("Dusty Crypt Entrance", "Halloween Hill", True), LLEntrance("Dusty Crypt", "Dusty Crypt Entrance", False), - LLEntrance("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, player)), + LLEntrance("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, world)), LLEntrance("Musty Crypt Entrance", "Zombiton", True), LLEntrance("Musty Crypt", "Musty Crypt Entrance", False), - LLEntrance("Rusty Crypt Entrance", "Rusty Crypt", False, lambda state: have_light_source(state, player)), + LLEntrance("Rusty Crypt Entrance", "Rusty Crypt", False, lambda state: have_light_source(state, world)), LLEntrance("Rusty Crypt Entrance", "Halloween Hill", True), LLEntrance("Rusty Crypt", "Rusty Crypt Entrance", False), LLEntrance("A Messy Cabin", "Zombiton", True), - LLEntrance("Under The Lake Entrance", "Under The Lake", False, lambda state: have_light_source(state, player)), + LLEntrance("Under The Lake Entrance", "Under The Lake", False, lambda state: have_light_source(state, world)), LLEntrance("Under The Lake Entrance", "Halloween Hill", True), LLEntrance("Under The Lake", "Under The Lake Entrance", False), LLEntrance("Under The Lake", "Under The Lake Exit", False), @@ -888,198 +853,86 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True), LLEntrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True), LLEntrance("Frankenjulie's Laboratory", "Halloween Hill", True), - LLEntrance("Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), + LLEntrance("Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower", "Haunted Basement Entrance", False), LLEntrance("Haunted Tower", "Haunted Tower Stairs Up", False), - LLEntrance( - "Haunted Tower", - "Haunted Tower Stairs Down", - False, - lambda state: state.has("Bat Key", player) - and state.has("Pumpkin Key", player) - and state.has("Skull Key", player), - ), + LLEntrance("Haunted Tower", "Haunted Tower Stairs Down", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player)), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), - LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", player)), - LLEntrance( - "Haunted Tower Stairs Down", - "Haunted Tower", - False, - lambda state: state.has("Bat Key", player) - and state.has("Pumpkin Key", player) - and state.has("Skull Key", player) - and state.has("Ghost Potion", player), - ), - LLEntrance( - "Haunted Tower Stairs Down", - "Haunted Basement Entrance", - True, - lambda state: have_light_source(state, player), - ), + LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance("Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player) and state.has("Ghost Potion", world.player)), + LLEntrance("Haunted Tower Stairs Down", "Haunted Basement Entrance", True, lambda state: have_light_source(state, world)), LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), - LLEntrance( - "Haunted Tower Floor 2 Entrance", - "Haunted Tower Floor 2", - False, - lambda state: state.has("Ghost Potion", player), - ), + LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), - LLEntrance( - "Haunted Tower Floor 2 Exit", - "Haunted Tower Floor 2", - False, - lambda state: state.has("Ghost Potion", player), - ), + LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), - LLEntrance( - "Haunted Tower Floor 3 Entrance", - "Haunted Tower Floor 3", - False, - lambda state: state.has("Ghost Potion", player), - ), + LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), - LLEntrance( - "Haunted Tower Floor 3 Exit", - "Haunted Tower Floor 3", - False, - lambda state: state.has("Ghost Potion", player), - ), + LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), LLEntrance("Haunted Tower Roof", "Halloween Hill", True), LLEntrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), LLEntrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), - LLEntrance( - "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, player) - ), + LLEntrance("Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world)), LLEntrance("Haunted Basement", "Haunted Basement Entrance", False), - LLEntrance( - "Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, player) - ), + LLEntrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, world)), LLEntrance("Abandoned Mines Entrance", "Rocky Cliffs", True), LLEntrance("Abandoned Mines", "Abandoned Mines Entrance", False), LLEntrance("The Shrine Of Bombulus", "Rocky Cliffs", True), - LLEntrance( - "A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, player) - ), + LLEntrance("A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, world)), LLEntrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), LLEntrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), LLEntrance("Happy Stick Woods", "Halloween Hill", True), - LLEntrance( - "The Wolf Den Entrance", - "The Wolf Den", - False, - lambda state: can_kill_werewolves(state, player) and have_light_source(state, player), - ), + LLEntrance("The Wolf Den Entrance", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), LLEntrance("The Wolf Den Entrance", "Halloween Hill", True), LLEntrance("The Wolf Den", "The Wolf Den Entrance", False), LLEntrance("The Wolf Den", "The Wolf Den Exit", False), LLEntrance("The Wolf Den Exit", "Larry's Lair", True), - LLEntrance( - "The Wolf Den Exit", - "The Wolf Den", - False, - lambda state: can_kill_werewolves(state, player) and have_light_source(state, player), - ), + LLEntrance("The Wolf Den Exit", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), LLEntrance("A Cabin Larry", "Zombiton", True), - LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), - LLEntrance( - "Upper Creepy Caverns Left Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player)), + LLEntrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), - LLEntrance( - "Upper Creepy Caverns Middle Warp", - "Creepy Caverns Left Top Warp", - True, - lambda state: have_light_source(state, player), - ), - LLEntrance( - "Upper Creepy Caverns Middle Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, lambda state: have_light_source(state, world)), + LLEntrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), - LLEntrance( - "Upper Creepy Caverns Right Warp", - "Creepy Caverns Middle Top Warp", - True, - lambda state: have_light_source(state, player), - ), - LLEntrance( - "Upper Creepy Caverns Right Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, lambda state: have_light_source(state, world)), + LLEntrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), - LLEntrance( - "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, player) - ), - LLEntrance( - "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, player) - ), + LLEntrance("Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world)), + LLEntrance("Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), - LLEntrance( - "Creepy Caverns Left Bottom Warp", - "Creepy Caverns Left", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), - LLEntrance( - "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player) - ), + LLEntrance("Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), LLEntrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), - LLEntrance( - "Creepy Caverns Middle Top Warp", - "Creepy Caverns Middle", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), LLEntrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True), - LLEntrance( - "Creepy Caverns Middle Right Warp", - "Creepy Caverns Middle", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Right Left Warp", "Under The Ravine", True), - LLEntrance( - "Creepy Caverns Right Left Warp", - "Creepy Caverns Right", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), - LLEntrance( - "Creepy Caverns Right Bottom Warp", - "Creepy Caverns Right", - False, - lambda state: have_light_source(state, player), - ), + LLEntrance("Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), LLEntrance("Castle Vampy", "Halloween Hill", True), - LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), - LLEntrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", player)), + LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player)), + LLEntrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player)), LLEntrance("Castle Vampy Skull Jail", "Castle Vampy II", True), - LLEntrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", player, 4)), - LLEntrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", player, 4)), - LLEntrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", player, 4)), - LLEntrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", world.player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", world.player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", world.player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy II", "Castle Vampy Skull Jail", True), - LLEntrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", player)), - LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", player)), + LLEntrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player)), + LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player)), LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy III", True), LLEntrance("Castle Vampy II NE", "Castle Vampy", True), LLEntrance("Castle Vampy II NE", "Castle Vampy III NE", True), @@ -1091,12 +944,8 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Castle Vampy II NW", "Castle Vampy III NW", True), LLEntrance("Cabin In The Woods", "Halloween Hill", True), LLEntrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), - LLEntrance( - "Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", player) - ), - LLEntrance( - "Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", player) - ), + LLEntrance("Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", world.player)), + LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", world.player)), LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), LLEntrance("Castle Vampy III NE", "Castle Vampy II NE", True), LLEntrance("Castle Vampy III NE", "Castle Vampy IV NE", True), @@ -1107,9 +956,7 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Castle Vampy III NW", "Castle Vampy II NW", True), LLEntrance("Castle Vampy III NW", "Castle Vampy IV NW", True), LLEntrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), - LLEntrance( - "Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", player, 8) - ), + LLEntrance("Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", world.player, 8)), LLEntrance("Castle Vampy IV NE", "Castle Vampy III NE", True), LLEntrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), LLEntrance("Castle Vampy IV SE", "Castle Vampy III SE", True), @@ -1124,53 +971,32 @@ def set_entrance_rules(multiworld, world, player): LLEntrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), LLEntrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), LLEntrance("The Evilizer", "Halloween Hill", True), - LLEntrance( - "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, player) - ), + LLEntrance("The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world)), LLEntrance("The Heart Of Terror", "The Evilizer", True), LLEntrance("The Heart Of Terror", "Empty Rooftop", True), LLEntrance("A Hidey-Hole", "Halloween Hill", True), LLEntrance("Empty Rooftop", "Halloween Hill", True), - LLEntrance("Swampdog Lair Entrance", "Swampdog Lair", False, lambda state: state.has("Boots", player)), + LLEntrance("Swampdog Lair Entrance", "Swampdog Lair", False, lambda state: state.has("Boots", world.player)), LLEntrance("Swampdog Lair", "Swampdog Lair Entrance", True), LLEntrance("Larry's Lair", "Halloween Hill", True), - LLEntrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), - LLEntrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", player)), - LLEntrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), - LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LLEntrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), LLEntrance("Zombiton", "Halloween Hill", False), - LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", player)), - LLEntrance( - "Halloween Hill", - "Rocky Cliffs", - False, - lambda state: state.has("Big Gem", player) or state.has("All Access Pass", player), - ), - LLEntrance( - "Rocky Cliffs", - "Halloween Hill", - False, - lambda state: state.has("Big Gem", player) or state.has("All Access Pass", player), - ), - LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", player)), - LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", player)), - LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), - LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", player)), - LLEntrance( - "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player) - ), - LLEntrance( - "Underground Tunnel Zombie", - "Underground Tunnel Mud", - False, - lambda state: state.has("Boots", player) and state.has("All Access Pass", player), - ), - LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), - LLEntrance( - "Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", player) - ), + LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", world.player)), + LLEntrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), + LLEntrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), + LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", world.player)), + LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", world.player)), + LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Underground Tunnel Zombie", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player)), + LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player)), ] - for region in multiworld.get_regions(player): + for region in multiworld.get_regions(world.player): for entry in loonyland_entrance_table: if entry.source_region == region.name: region.connect(connecting_region=world.get_region(entry.target_region), rule=entry.rule) diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index aafc1dccbaa3..380f738a61c6 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -53,6 +53,9 @@ class LoonylandWorld(World): for name, data in loony_item_table.items() if VAR_WBOMBS <= data.id - loonyland_base_id <= VAR_WHOTPANTS }, + "power": {name for name, data in loony_item_table.items() if "PWR" in data.flags}, + "power_big": {name for name, data in loony_item_table.items() if "PWR_BIG" in data.flags}, + "power_max": {name for name, data in loony_item_table.items() if "PWR_MAX" in data.flags}, } location_name_groups = { @@ -61,7 +64,7 @@ class LoonylandWorld(World): } def create_item(self, name: str) -> LoonylandItem: - return LoonylandItem(name, loony_item_table[name].classification, loony_item_table[name].id, self.player) + return LoonylandItem(name, loony_item_table[name].modified_classification(self.options), loony_item_table[name].id, self.player) def create_junk(self) -> LoonylandItem: return LoonylandItem("A Cool Filler Item", ItemClassification.filler, loonyland_base_id + 3000, self.player) @@ -69,7 +72,7 @@ def create_junk(self) -> LoonylandItem: def create_items(self) -> None: item_pool: list[LoonylandItem] = [] for name, item in loony_item_table.items(): - if item.id and item.can_create(self.options): + if item.id and item.can_create(self.options) and item.in_logic(self.options): for i in range(item.frequency): new_item = self.create_item(name) item_pool.append(new_item) @@ -108,9 +111,14 @@ def set_rules(self): self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) # location rules - set_rules(self.multiworld, self, self.player) + set_rules(self.multiworld, self) # entrance rules - set_entrance_rules(self.multiworld, self, self.player) + set_entrance_rules(self.multiworld, self) def fill_slot_data(self): - return {"DeathLink": self.options.death_link.value, "Difficulty": self.options.difficulty.value} + return {"Difficulty": self.options.difficulty.value, + "LongChecks": self.options.long_checks.value, + "Remix": self.options.remix.value, + "Badges": self.options.badges.value, + "Dolls": self.options.dolls.value, + "DeathLink": self.options.death_link.value} \ No newline at end of file diff --git a/worlds/loonyland/items.py b/worlds/loonyland/items.py index 4d653660f9f1..2daafefb8b39 100644 --- a/worlds/loonyland/items.py +++ b/worlds/loonyland/items.py @@ -4,6 +4,7 @@ from BaseClasses import Item, ItemClassification from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, Remix +from worlds.stardew_valley import true_ class LoonylandItem(Item): @@ -34,14 +35,40 @@ class LLItem(NamedTuple): def can_create(self, options: LoonylandOptions) -> bool: if ( self.category == LLItemCat.CHEAT - and (options.badges == Badges.option_none or options.badges == Badges.option_vanilla) + and options.badges == Badges.option_vanilla ) or ( self.category == LLItemCat.DOLL - and (options.dolls == MonsterDolls.option_none or options.dolls == MonsterDolls.option_vanilla) + and options.dolls == MonsterDolls.option_vanilla ): return False - if options.long_checks == LongChecks.option_excluded and ("OP" in self.flags): + if "OP" in self.flags: return False if options.remix == Remix.option_excluded and ("REMIX" in self.flags): return False return True + + def in_logic(self, options: LoonylandOptions) -> bool: + if self.category == LLItemCat.CHEAT and options.badges == Badges.option_none: + return False + if self.category == LLItemCat.DOLL and options.dolls == MonsterDolls.option_none: + return False + return True + + def modified_classification(self, options: LoonylandOptions): + if options.long_checks==LongChecks.option_included: + if self.category == LLItemCat.CHEAT: #39 badges + return ItemClassification.progression + if self.category == LLItemCat.ITEM: # 100% + return ItemClassification.progression + if self.category == LLItemCat.DOLL: # 100% + return ItemClassification.progression + if options.badges==Badges.option_none: + if self.category == LLItemCat.ACCESS: + return ItemClassification.filler + if options.badges==Badges.option_none: + if self.category==LLItemCat.ACCESS: + return ItemClassification.filler + if "PWR" in self.flags or "PWR_BIG" in self.flags or "PWR_MAX" in self.flags: #need to be able to kill bosses, eventually an option for this + return ItemClassification.progression + + return self.classification \ No newline at end of file diff --git a/worlds/loonyland/locations.py b/worlds/loonyland/locations.py index 6cf6268a249b..0ed42415b75c 100644 --- a/worlds/loonyland/locations.py +++ b/worlds/loonyland/locations.py @@ -28,12 +28,12 @@ class LLLocation(NamedTuple): base_item: str = "" def can_create(self, options: LoonylandOptions) -> bool: - if (self.category == LLLocCat.BADGE and (options.badges == Badges.option_none)) or ( - self.category == LLLocCat.DOLL and (options.dolls == MonsterDolls.option_none) - ): + if self.category == LLLocCat.BADGE and options.badges == Badges.option_none: + return False + if options.dolls == MonsterDolls.option_none and (self.category == LLLocCat.DOLL or "DOLL" in self.flags): return False if options.long_checks == LongChecks.option_excluded and ( - "LONG" in self.flags or ("LONG_VANILLA" in self.flags and options.badges == Badges.option_vanilla) + "LONG" in self.flags or ("LONG_VANILLA_BADGES" in self.flags and options.badges == Badges.option_vanilla) ): return False if options.remix == Remix.option_excluded and ("REMIX" in self.flags): diff --git a/worlds/loonyland/options.py b/worlds/loonyland/options.py index a757c84cf6d2..d4914ad200a6 100644 --- a/worlds/loonyland/options.py +++ b/worlds/loonyland/options.py @@ -29,7 +29,7 @@ class Difficulty(Choice): class LongChecks(Choice): - """Excluded: Remove 100%, 39 badges, swampdog to 50, witch to lvl 9 spells, 5000 gems, and the monster point badges + """Excluded: Remove 100%, 39 badges, swampdog to 50, witch to lvl 9 spells, 5000 gems, the monster point badges, a true hero Does nothing if badges are already set to none """ @@ -64,7 +64,7 @@ class Badges(Choice): class MonsterDolls(Choice): """Full: Monsters can drop randomized items, monster dolls can be found at locations Vanilla: Monsters drop their normal monster doll - None: Dolls aren't in logic""" + None: Dolls aren't in logic, the collection quest gives nothing""" display_name = "Monster Dolls" option_full = 0 diff --git a/worlds/loonyland/rules.py b/worlds/loonyland/rules.py index bd03a32a42df..5fb328282bdc 100644 --- a/worlds/loonyland/rules.py +++ b/worlds/loonyland/rules.py @@ -1,109 +1,123 @@ +from typing import TYPE_CHECKING + from BaseClasses import CollectionState +if TYPE_CHECKING: + from worlds.loonyland import LoonylandWorld -def have_light_source(state: CollectionState, player: int) -> bool: +def have_light_source(state: CollectionState, world: "LoonylandWorld") -> bool: return ( - state.has("Lantern", player) + state.has("Lantern", world.player) or ( - state.has("Stick", player) - and state.has("Boots", player) - and state.can_reach_region("Swamp Gas Cavern", player) + state.has("Stick", world.player) + and state.has("Boots", world.player) + and state.can_reach_region("Swamp Gas Cavern", world.player) ) - or (state.has("20/20 Vision", player)) + or (state.has("20/20 Vision", world.player)) ) # 20/20 when badges added -def can_kill_werewolves(state: CollectionState, player: int) -> bool: - return state.has("Silver Sling", player) or state.has("Touch Of Death", player) +def can_kill_werewolves(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.has("Silver Sling", world.player) or state.has("Touch Of Death", world.player) -def have_bombs(state: CollectionState, player: int) -> bool: - return state.has("Bombs", player) or state.has("Combo-Bombo", player) or state.has("Play As Werewolf", player) +def have_bombs(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.has("Bombs", world.player) or state.has("Combo-Bombo", world.player) or state.has("Play As Werewolf", world.player) # or werewolf badge when badges are added -def have_many_bombs(state: CollectionState, player: int) -> bool: - return state.has("Bombs", player) or (state.has("Play As Werewolf", player) and state.has("Infinite Gems", player)) +def have_many_bombs(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.has("Bombs", world.player) or (state.has("Play As Werewolf", world.player) and state.has("Infinite Gems", world.player)) -def have_special_weapon_damage(state: CollectionState, player: int) -> bool: - return state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) +def have_special_weapon_damage(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), world.player) # needed for gutsy -def have_special_weapon_bullet(state: CollectionState, player: int) -> bool: +def have_special_weapon_bullet(state: CollectionState, world: "LoonylandWorld") -> bool: return True # always true as the default character, eventually will be fancier when other starting characters are an option # return ( - # state.has_any(("Bombs", "Ice Spear", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) + # state.has_any(("Bombs", "Ice Spear", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), world.player) # ) -def have_special_weapon_range_damage(state: CollectionState, player: int) -> bool: +def have_special_weapon_range_damage(state: CollectionState, world: "LoonylandWorld") -> bool: return True # always true as the default character # return ( - # state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang"), player) + # state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang"), world.player) # ) -def have_special_weapon_through_walls(state: CollectionState, player: int) -> bool: +def have_special_weapon_through_walls(state: CollectionState, world: "LoonylandWorld") -> bool: return ( - state.has_any(("Bombs", "Shock Wand", "Whoopee"), player) + state.has_any(("Bombs", "Shock Wand", "Whoopee"), world.player) # state.has("Hot Pants") technically possible, but only on diagonals ) -def can_cleanse_crypts(state: CollectionState, player: int) -> bool: +def can_cleanse_crypts(state: CollectionState, world: "LoonylandWorld") -> bool: return ( - have_light_source(state, player) - and have_special_weapon_range_damage(state, player) - and state.can_reach_region("Musty Crypt", player) - and state.can_reach_region("Dusty Crypt", player) - and state.can_reach_region("Rusty Crypt", player) + have_light_source(state, world) + and have_special_weapon_range_damage(state, world) + and state.can_reach_region("Musty Crypt", world.player) + and state.can_reach_region("Dusty Crypt", world.player) + and state.can_reach_region("Rusty Crypt", world.player) ) -def hundred_percent(state: CollectionState, player: int) -> bool: - return state.has_group("physical_items", player, 105) +def hundred_percent(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.has_group("physical_items", world.player, 105) + + +def have_39_badges(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.has_group("cheats", world.player, 39) -def have_39_badges(state: CollectionState, player: int) -> bool: - return state.has_group("cheats", player, 39) +def have_all_weapons(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.has_group("special_weapons", world.player, 7) -def have_all_weapons(state: CollectionState, player: int) -> bool: - return state.has_group("special_weapons", player, 7) +def can_reach_bats(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.can_reach_region("The Shrine Of Bombulus", world.player) -def can_reach_bats(state: CollectionState, player: int) -> bool: - return state.can_reach_region("The Shrine Of Bombulus", player) +def can_reach_skeleton(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.can_reach_region("Halloween Hill", world.player) -def can_reach_skeleton(state: CollectionState, player: int) -> bool: - return state.can_reach_region("Halloween Hill", player) +def can_reach_frog(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.can_reach_region("Halloween Hill", world.player) -def can_reach_frog(state: CollectionState, player: int) -> bool: - return state.can_reach_region("Halloween Hill", player) +def can_reach_ghost(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.can_reach_region("Haunted Tower", world.player) -def can_reach_ghost(state: CollectionState, player: int) -> bool: - return state.can_reach_region("Haunted Tower", player) +def can_reach_mummy(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.can_reach_region("Rocky Cliffs", world.player) -def can_reach_mummy(state: CollectionState, player: int) -> bool: - return state.can_reach_region("Rocky Cliffs", player) +def can_reach_swampdog(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.can_reach_region("Halloween Hill", world.player) -def can_reach_swampdog(state: CollectionState, player: int) -> bool: - return state.can_reach_region("Halloween Hill", player) +def can_reach_vampire(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.can_reach_region("Castle Vampy", world.player) -def can_reach_vampire(state: CollectionState, player: int) -> bool: - return state.can_reach_region("Castle Vampy", player) +def can_reach_wolves(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.can_reach_region("Halloween Hill", world.player) +def can_do_collection(state: CollectionState, world: "LoonylandWorld") -> bool: + return state.has_group_unique("monster_dolls", world.player, 8) -def can_reach_wolves(state: CollectionState, player: int) -> bool: - return state.can_reach_region("Halloween Hill", player) +def power_level(state: CollectionState, world: "LoonylandWorld", level_goal: int) -> bool: + level: int = 0 + level += state.count_group("power", world.player) + level += state.count_group("power_big", world.player) * 5 + level += state.count_group("power_max", world.player) * 50 + return level > level_goal \ No newline at end of file From d62b4eb4db7e93e56ff9d6be0f5f40adc4a13f9f Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Thu, 26 Dec 2024 19:48:07 -0500 Subject: [PATCH 41/58] more logic to items and locations new multiplesaves multisave option entrances and regions have flags now --- worlds/loonyland/Data/game_data.py | 477 ++++++++++++++++++++++------- worlds/loonyland/__init__.py | 35 ++- worlds/loonyland/entrances.py | 7 + worlds/loonyland/items.py | 32 +- worlds/loonyland/locations.py | 4 +- worlds/loonyland/options.py | 18 +- worlds/loonyland/regions.py | 8 + worlds/loonyland/rules.py | 15 +- 8 files changed, 451 insertions(+), 145 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index a47f35a16cec..a591d24f239b 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -25,7 +25,7 @@ have_special_weapon_bullet, have_special_weapon_damage, hundred_percent, - power_level + power_level, ) ll_base_id: int = 2876900 @@ -360,7 +360,9 @@ "Cat": LLItem(ll_base_id + VAR_CAT, LLItemCat.ITEM, ItemClassification.progression), "Big Gem": LLItem(ll_base_id + VAR_GEM, LLItemCat.ITEM, ItemClassification.progression, 6), "100 Gems": LLItem(ll_base_id + VAR_ZOMBIEGEM, LLItemCat.ITEM, ItemClassification.filler), - "Triple Fire Gem": LLItem(ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"]), + "Triple Fire Gem": LLItem( + ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"] + ), "Happy Stick": LLItem(ll_base_id + VAR_TALISMAN, LLItemCat.ITEM, ItemClassification.progression), "Bat Statue": LLItem(ll_base_id + VAR_BATSTATUE, LLItemCat.ITEM, ItemClassification.progression, 4), "Lantern": LLItem(ll_base_id + VAR_LANTERN, LLItemCat.ITEM, ItemClassification.progression), @@ -370,47 +372,101 @@ "Disco Mode": LLItem(ll_base_id + CH_DISCO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Terror Mode": LLItem(ll_base_id + CH_TERROR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Quick Mode": LLItem(ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), + "Quick Mode": LLItem( + ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), "Infinite Gems": LLItem(ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), - "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), + "Homing Shots": LLItem( + ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), + "Ultimate Firepower": LLItem( + ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Play As Toad": LLItem(ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), + "Play As Bonkula": LLItem( + ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), + "Play As Toad": LLItem( + ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Radar": LLItem(ll_base_id + CH_RADAR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), - "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"]), - "Touch Of Death": LLItem(ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX"]), - "All Access Pass": LLItem(ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), + "Heavy Hitter": LLItem( + ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] + ), + "Rapid Fire": LLItem( + ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"] + ), + "Touch Of Death": LLItem( + ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX"] + ), + "All Access Pass": LLItem( + ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), + "Play As Swampdog": LLItem( + ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE"] + ), + "Hardcore Mode": LLItem( + ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Guided Shots": LLItem(ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), - "Slo-Mo": LLItem(ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), - "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), + "Guided Shots": LLItem( + ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), + "Slo-Mo": LLItem( + ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] + ), + "Combo-Bombo": LLItem( + ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Play As Witch": LLItem(ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Witch": LLItem( + ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE"] + ), + "Play As Werewolf": LLItem( + ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Infinite Survival": LLItem(ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Summony": LLItem(ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Molecular Dispersion": LLItem(ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"]), - "Guaranteed Survival": LLItem(ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX"]), + "Infinite Survival": LLItem( + ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), + "Play As Summony": LLItem( + ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), + "Play As Ninja Girl": LLItem( + ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), + "Molecular Dispersion": LLItem( + ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"] + ), + "Guaranteed Survival": LLItem( + ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX"] + ), "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Stinky Farley": LLItem(ll_base_id + CH_STINKY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Ultra Weapons Are Go!": LLItem(ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Ultra Weapons Are Go!": LLItem( + ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), "Thorns Aura": LLItem(ll_base_id + CH_THORNS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Monster Regeneration": LLItem(ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Monster Regeneration": LLItem( + ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Bowling Access": LLItem(ll_base_id + MODE_BOWLING + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Survival Access": LLItem(ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Boss Bash Access": LLItem(ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Loony Ball Access": LLItem(ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Remix Access": LLItem(ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"]), + "Survival Access": LLItem( + ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Boss Bash Access": LLItem( + ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Loony Ball Access": LLItem( + ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Remix Access": LLItem( + ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"] + ), "Bat Doll": LLItem(ll_base_id + VAR_BATDOLL, LLItemCat.DOLL, ItemClassification.progression), "Skeleton Doll": LLItem(ll_base_id + VAR_SKELDOLL, LLItemCat.DOLL, ItemClassification.progression), "Frog Doll": LLItem(ll_base_id + VAR_FROGDOLL, LLItemCat.DOLL, ItemClassification.progression), @@ -524,11 +580,11 @@ "Swampdog Lair": LLRegion(True), "Swampdog Lair Entrance": LLRegion(False, "Swampdog Lair"), "Larry's Lair": LLRegion(True), - "Bowling": LLRegion(False), - "Survival": LLRegion(False), - "Boss Bash": LLRegion(False), - "Loony Ball": LLRegion(False), - "Remix": LLRegion(False), + "Bowling": LLRegion(False, flags=["MODE"]), + "Survival": LLRegion(False, flags=["MODE"]), + "Boss Bash": LLRegion(False, flags=["MODE"]), + "Loony Ball": LLRegion(False, flags=["MODE"]), + "Remix": LLRegion(False, flags=["MODE"]), } loonyland_location_table: dict[str, LLLocation] = { "Swamp: Mud Path": LLLocation(0, LLLocCat.PICKUP, 0, "Slurpy Swamp Mud"), @@ -637,7 +693,7 @@ "Q: Mystery Lake": LLLocation(103, LLLocCat.QUEST, 9, "Halloween Hill"), "Q: Beneath The Lake": LLLocation(104, LLLocCat.QUEST, 10, "Frankenjulie's Laboratory"), "Q: Happy Stick?!?": LLLocation(105, LLLocCat.QUEST, 11, "Happy Stick Woods"), - "Q: A True Hero": LLLocation(106, LLLocCat.QUEST, 12, "Under The Ravine"), + "Q: A True Hero": LLLocation(106, LLLocCat.QUEST, 12, "Under The Ravine", flags=["LONG"]), "Q: Silver Bullet": LLLocation(107, LLLocCat.QUEST, 13, "Zombiton"), "Q: Hairy Larry": LLLocation(108, LLLocCat.QUEST, 14, "The Wolf Den"), "Q: Ghostbusting": LLLocation(109, LLLocCat.QUEST, 15, "The Witch's Cabin"), @@ -666,25 +722,39 @@ "Combo Plate": LLLocation(132, LLLocCat.BADGE, 18, "Menu", base_item="Radar"), "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, 19, "Rocky Cliffs", base_item="Heavy Hitter"), "Findin'": LLLocation(134, LLLocCat.BADGE, 20, "The Wolf Den", base_item="Rapid Fire"), - "Extreme Survivin'": LLLocation(135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death"), + "Extreme Survivin'": LLLocation( + 135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death" + ), "Huntin'": LLLocation(136, LLLocCat.BADGE, 22, "Halloween Hill", base_item="All Access Pass"), "Advanced Winnin'": LLLocation(137, LLLocCat.BADGE, 23, "Menu", flags=["LONG"], base_item="Terror Mode"), "Survivin'": LLLocation(138, LLLocCat.BADGE, 24, "Survival", base_item="Save Anywhere"), "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, 25, "Larry's Lair", base_item="Guided Shots"), - "Mad Skeelz": LLLocation(140, LLLocCat.BADGE, 26, "The Evilizer", flags=["LONG_VANILLA_BADGES"], base_item="Kick The Cat!"), + "Mad Skeelz": LLLocation( + 140, LLLocCat.BADGE, 26, "The Evilizer", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Kick The Cat!" + ), "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, 27, "Frankenjulie's Laboratory", base_item="Slo-Mo"), "Combo Magic": LLLocation(142, LLLocCat.BADGE, 28, "Survival", base_item="Infinite Survival"), "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, 29, "Slurpy Swamp Mud", base_item="Frog-o-rama"), "R-R-R-Remix!": LLLocation(144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG"], base_item="Play As Summony"), - "Witchcraft": LLLocation(145, LLLocCat.BADGE, 31, "Menu", flags=["LONG"], base_item="Play As Ninja Girl"), - "Ninjitsu": LLLocation(146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES"], base_item="Molecular Dispersion"), + "Witchcraft": LLLocation( + 145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl" + ), + "Ninjitsu": LLLocation( + 146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Molecular Dispersion" + ), "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, 33, "Survival", base_item="Guaranteed Survival"), "Hooliganin'": LLLocation(148, LLLocCat.BADGE, 34, "Loony Ball", base_item="Bend It Like Bouapha"), - "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, 35, "Menu", flags=["LONG"], base_item="Stinky Farley"), + "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, 35, "Menu", flags=["LONG", "MULTISAVE"], base_item="Stinky Farley"), "Scorin'": LLLocation(150, LLLocCat.BADGE, 36, "The Evilizer", base_item="Ultra Weapons Are Go!"), - "Brawlin'": LLLocation(151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES"], base_item="Thorns Aura"), - "Minin' For Treasure": LLLocation(152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration"), - "Digitally Masterin'": LLLocation(153, LLLocCat.BADGE, 39, "Menu", flags=["LONG"], base_item="Farley Free Zone"), + "Brawlin'": LLLocation( + 151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES"], base_item="Thorns Aura" + ), + "Minin' For Treasure": LLLocation( + 152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration" + ), + "Digitally Masterin'": LLLocation( + 153, LLLocCat.BADGE, 39, "Menu", flags=["LONG", "REMIX", "MULTISAVE"], base_item="Farley Free Zone" + ), "Tree Trimming Reward": LLLocation(154, LLLocCat.REWARD, VAR_TREEREWARD, "A Cabin Trees"), "Larry's Wife Reward": LLLocation(155, LLLocCat.REWARD, VAR_LARRYREWARD, "A Cabin Larry"), "Farmer Reward": LLLocation(156, LLLocCat.REWARD, VAR_CROPSREWARD, "Halloween Hill"), @@ -698,6 +768,8 @@ "Vampire Drop": LLLocation(164, LLLocCat.DOLL, 6, "Menu", base_item="Vampire Doll"), "Wolf Drop": LLLocation(165, LLLocCat.DOLL, 7, "Menu", base_item="Wolfman Doll"), } + + def set_rules(multiworld, world): access_rules: dict[str, CollectionRule] = { "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", world.player), @@ -715,16 +787,21 @@ def set_rules(multiworld, world): "Under The Lake: Bat Door": lambda state: state.has("Bat Key", world.player), "Frankenjulie's Reward": lambda state: power_level(state, world, 10), "PolterGuy's Reward": lambda state: power_level(state, world, 10), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) and state.has("Skull Key", world.player) and state.has("Pumpkin Key", world.player), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) + and state.has("Skull Key", world.player) + and state.has("Pumpkin Key", world.player), "Happy Stick: Reward": lambda state: power_level(state, world, 40), "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), "Wolf Den: Vine": lambda state: state.has("Fertilizer", world.player), "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", world.player), "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", world.player), "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", world.player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), - "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) and power_level(state, world, 20), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) + and can_kill_werewolves(state, world), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) + and can_kill_werewolves(state, world), + "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) + and power_level(state, world, 20), "Roof NE: Stoney the Elder": lambda state: power_level(state, world, 20), "Roof SW: Drippy the Elder": lambda state: power_level(state, world, 20), "Roof SE: Toasty the Elder": lambda state: power_level(state, world, 20), @@ -741,8 +818,10 @@ def set_rules(multiworld, world): "Q: Beneath The Lake": lambda state: power_level(state, world, 10), "Q: A True Hero": lambda state: state.has("Fertilizer", world.player) and have_bombs(state, world), "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, world) and state.has("Silver", world.player), - "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) and power_level(state, world, 10), - "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) and state.has("Mushroom", world.player, 10), + "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) + and power_level(state, world, 10), + "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) + and state.has("Mushroom", world.player, 10), "Q: The Haunted Tower": lambda state: power_level(state, world, 10), "Q: The Last Gate": lambda state: state.has("Vampire Bust", world.player, 8), "Q: The Collection": lambda state: can_do_collection(state, world), @@ -752,19 +831,27 @@ def set_rules(multiworld, world): "Animal Control": lambda state: can_kill_werewolves(state, world), "Cleanin' Up": lambda state: have_many_bombs(state, world), "Extreme Survivin'": lambda state: state.has("Terror Mode", world.player), - "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) and state.can_reach_region("Zombiton", world.player) and state.can_reach_region("Slurpy Swamp Mud", world.player) and can_kill_werewolves(state, world), + "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) + and state.can_reach_region("Zombiton", world.player) + and state.can_reach_region("Slurpy Swamp Mud", world.player) + and can_kill_werewolves(state, world), "Advanced Winnin'": lambda state: hundred_percent(state, world), "Mad Skeelz": lambda state: state.has("Terror Mode", world.player), "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", world.player), "R-R-R-Remix!": lambda state: hundred_percent(state, world) and state.has("Remix Access", world.player), - "Witchcraft": lambda state: state.has("Play As Witch", world.player) and have_all_weapons(state, world) and state.can_reach_region("Castle Vampy IV", world.player), + "Witchcraft": lambda state: state.has("Play As Witch", world.player) + and have_all_weapons(state, world) + and state.can_reach_region("Castle Vampy IV", world.player), "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) and have_all_weapons(state, world), "Stayin' Alive": lambda state: state.has("Infinite Survival", world.player), - "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) and state.can_reach_region("Castle Vampy IV", world.player), + "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) + and state.can_reach_region("Castle Vampy IV", world.player), "Brawlin'": lambda state: state.has("Touch Of Death", world.player), - "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) and state.has("Remix Access", world.player), + "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) + and state.has("Remix Access", world.player), "Digitally Masterin'": lambda state: have_39_badges(state, world), - "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) and can_cleanse_crypts(state, world), + "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) + and can_cleanse_crypts(state, world), "Farmer Reward": lambda state: can_cleanse_crypts(state, world), "Mayor Reward": lambda state: can_cleanse_crypts(state, world), "Bat Drop": lambda state: can_reach_bats(state, world), @@ -779,14 +866,20 @@ def set_rules(multiworld, world): for loc in multiworld.get_locations(world.player): if loc.name in access_rules: add_rule(loc, access_rules[loc.name]) + + def set_entrance_rules(multiworld, world): loonyland_entrance_table: list[LLEntrance] = [ LLEntrance("Menu", "Halloween Hill", False), - LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", world.player)), - LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", world.player)), - LLEntrance("Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player)), - LLEntrance("Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player)), - LLEntrance("Menu", "Remix", False, lambda state: state.has("Remix Access", world.player)), + LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", world.player), flags=["MODE"]), + LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", world.player), flags=["MODE"]), + LLEntrance( + "Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=["MODE"] + ), + LLEntrance( + "Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=["MODE"] + ), + LLEntrance("Menu", "Remix", False, lambda state: state.has("Remix Access", world.player), flags=["MODE"]), LLEntrance("Halloween Hill", "A Cabin Trees", True), LLEntrance("Halloween Hill", "The Witch's Cabin", True), LLEntrance("Halloween Hill", "Bonita's Cabin", True), @@ -805,15 +898,21 @@ def set_entrance_rules(multiworld, world): LLEntrance("Zombiton", "A Messy Cabin", True), LLEntrance("Halloween Hill", "Rusty Crypt Entrance", True), LLEntrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", world.player, 4)), - LLEntrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player) + ), LLEntrance("Rocky Cliffs", "Abandoned Mines Entrance", True), LLEntrance("Rocky Cliffs", "The Shrine Of Bombulus", True), LLEntrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, world)), LLEntrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", world.player)), LLEntrance("Zombiton", "A Cabin Larry", True), LLEntrance("Halloween Hill", "The Wolf Den Entrance", True), - LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player)), - LLEntrance("Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world)), + LLEntrance( + "Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player) + ), + LLEntrance( + "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world) + ), LLEntrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), LLEntrance("Vampy Land", "Castle Vampy", True), LLEntrance("Halloween Hill", "Cabin In The Woods", True), @@ -853,30 +952,76 @@ def set_entrance_rules(multiworld, world): LLEntrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True), LLEntrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True), LLEntrance("Frankenjulie's Laboratory", "Halloween Hill", True), - LLEntrance("Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player) + ), LLEntrance("Haunted Tower", "Haunted Basement Entrance", False), LLEntrance("Haunted Tower", "Haunted Tower Stairs Up", False), - LLEntrance("Haunted Tower", "Haunted Tower Stairs Down", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player)), + LLEntrance( + "Haunted Tower", + "Haunted Tower Stairs Down", + False, + lambda state: state.has("Bat Key", world.player) + and state.has("Pumpkin Key", world.player) + and state.has("Skull Key", world.player), + ), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), - LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player)), - LLEntrance("Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player) and state.has("Ghost Potion", world.player)), - LLEntrance("Haunted Tower Stairs Down", "Haunted Basement Entrance", True, lambda state: have_light_source(state, world)), + LLEntrance( + "Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player) + ), + LLEntrance( + "Haunted Tower Stairs Down", + "Haunted Tower", + False, + lambda state: state.has("Bat Key", world.player) + and state.has("Pumpkin Key", world.player) + and state.has("Skull Key", world.player) + and state.has("Ghost Potion", world.player), + ), + LLEntrance( + "Haunted Tower Stairs Down", + "Haunted Basement Entrance", + True, + lambda state: have_light_source(state, world), + ), LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), - LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 2 Entrance", + "Haunted Tower Floor 2", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), - LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 2 Exit", + "Haunted Tower Floor 2", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), - LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 3 Entrance", + "Haunted Tower Floor 3", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), - LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 3 Exit", + "Haunted Tower Floor 3", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), LLEntrance("Haunted Tower Roof", "Halloween Hill", True), LLEntrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), LLEntrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), - LLEntrance("Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world) + ), LLEntrance("Haunted Basement", "Haunted Basement Entrance", False), LLEntrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, world)), LLEntrance("Abandoned Mines Entrance", "Rocky Cliffs", True), @@ -886,53 +1031,129 @@ def set_entrance_rules(multiworld, world): LLEntrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), LLEntrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), LLEntrance("Happy Stick Woods", "Halloween Hill", True), - LLEntrance("The Wolf Den Entrance", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), + LLEntrance( + "The Wolf Den Entrance", + "The Wolf Den", + False, + lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), + ), LLEntrance("The Wolf Den Entrance", "Halloween Hill", True), LLEntrance("The Wolf Den", "The Wolf Den Entrance", False), LLEntrance("The Wolf Den", "The Wolf Den Exit", False), LLEntrance("The Wolf Den Exit", "Larry's Lair", True), - LLEntrance("The Wolf Den Exit", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), + LLEntrance( + "The Wolf Den Exit", + "The Wolf Den", + False, + lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), + ), LLEntrance("A Cabin Larry", "Zombiton", True), - LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player)), - LLEntrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player) + ), + LLEntrance( + "Upper Creepy Caverns Left Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), - LLEntrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, lambda state: have_light_source(state, world)), - LLEntrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Upper Creepy Caverns Middle Warp", + "Creepy Caverns Left Top Warp", + True, + lambda state: have_light_source(state, world), + ), + LLEntrance( + "Upper Creepy Caverns Middle Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), - LLEntrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, lambda state: have_light_source(state, world)), - LLEntrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Upper Creepy Caverns Right Warp", + "Creepy Caverns Middle Top Warp", + True, + lambda state: have_light_source(state, world), + ), + LLEntrance( + "Upper Creepy Caverns Right Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), - LLEntrance("Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world)), - LLEntrance("Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world)), + LLEntrance( + "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world) + ), + LLEntrance( + "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world) + ), LLEntrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), - LLEntrance("Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Left Bottom Warp", + "Creepy Caverns Left", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), - LLEntrance("Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world) + ), LLEntrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), LLEntrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), - LLEntrance("Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Middle Top Warp", + "Creepy Caverns Middle", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), LLEntrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True), - LLEntrance("Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Middle Right Warp", + "Creepy Caverns Middle", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Right Left Warp", "Under The Ravine", True), - LLEntrance("Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Right Left Warp", + "Creepy Caverns Right", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), - LLEntrance("Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Right Bottom Warp", + "Creepy Caverns Right", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), LLEntrance("Castle Vampy", "Halloween Hill", True), - LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player)), - LLEntrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player)), + LLEntrance( + "Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player) + ), + LLEntrance( + "Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player) + ), LLEntrance("Castle Vampy Skull Jail", "Castle Vampy II", True), LLEntrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy II", "Castle Vampy Skull Jail", True), - LLEntrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player)), - LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player)), + LLEntrance( + "Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player) + ), + LLEntrance( + "Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player) + ), LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy III", True), LLEntrance("Castle Vampy II NE", "Castle Vampy", True), LLEntrance("Castle Vampy II NE", "Castle Vampy III NE", True), @@ -944,8 +1165,18 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy II NW", "Castle Vampy III NW", True), LLEntrance("Cabin In The Woods", "Halloween Hill", True), LLEntrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), - LLEntrance("Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", world.player)), - LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", world.player)), + LLEntrance( + "Castle Vampy III", + "Castle Vampy III Pumpkin Jail", + False, + lambda state: state.has("Pumpkin Key", world.player), + ), + LLEntrance( + "Castle Vampy III Pumpkin Jail", + "Castle Vampy III", + False, + lambda state: state.has("Pumpkin Key", world.player), + ), LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), LLEntrance("Castle Vampy III NE", "Castle Vampy II NE", True), LLEntrance("Castle Vampy III NE", "Castle Vampy IV NE", True), @@ -956,7 +1187,12 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy III NW", "Castle Vampy II NW", True), LLEntrance("Castle Vampy III NW", "Castle Vampy IV NW", True), LLEntrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), - LLEntrance("Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", world.player, 8)), + LLEntrance( + "Castle Vampy IV", + "The Heart Of Terror Entrance", + True, + lambda state: state.has("Vampire Bust", world.player, 8), + ), LLEntrance("Castle Vampy IV NE", "Castle Vampy III NE", True), LLEntrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), LLEntrance("Castle Vampy IV SE", "Castle Vampy III SE", True), @@ -971,7 +1207,9 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), LLEntrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), LLEntrance("The Evilizer", "Halloween Hill", True), - LLEntrance("The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world)), + LLEntrance( + "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world) + ), LLEntrance("The Heart Of Terror", "The Evilizer", True), LLEntrance("The Heart Of Terror", "Empty Rooftop", True), LLEntrance("A Hidey-Hole", "Halloween Hill", True), @@ -981,22 +1219,49 @@ def set_entrance_rules(multiworld, world): LLEntrance("Larry's Lair", "Halloween Hill", True), LLEntrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), LLEntrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), + LLEntrance( + "Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) + ), LLEntrance("Zombiton", "Halloween Hill", False), LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), - LLEntrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), + LLEntrance( + "Halloween Hill", + "Rocky Cliffs", + False, + lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), + ), + LLEntrance( + "Rocky Cliffs", + "Halloween Hill", + False, + lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), + ), LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", world.player)), LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Underground Tunnel Zombie", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player)), + LLEntrance( + "Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Underground Tunnel Zombie", + "Underground Tunnel Mud", + False, + lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player), + ), LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player)), + LLEntrance( + "Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player) + ), ] for region in multiworld.get_regions(world.player): for entry in loonyland_entrance_table: - if entry.source_region == region.name: + if entry.source_region == region.name and entry.can_create(world.options): region.connect(connecting_region=world.get_region(entry.target_region), rule=entry.rule) diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 380f738a61c6..c5afed20e635 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -16,7 +16,7 @@ ) from .items import LLItemCat, LoonylandItem from .locations import LLLocCat, LoonylandLocation -from .options import Badges, LoonylandOptions +from .options import LoonylandOptions class LoonylandWebWorld(WebWorld): @@ -43,6 +43,7 @@ class LoonylandWorld(World): options_dataclass = LoonylandOptions location_name_to_id = {name: data.id + loonyland_base_id for name, data in loonyland_location_table.items()} item_name_to_id = {name: data.id for name, data in loony_item_table.items()} + item_name_to_id["A Cool Filler Item"] = loonyland_base_id + 3000 item_name_groups = { "physical_items": {name for name, data in loony_item_table.items() if data.category == LLItemCat.ITEM}, @@ -63,12 +64,16 @@ class LoonylandWorld(World): "badges": {name for name, data in loonyland_location_table.items() if data.category == LLLocCat.BADGE}, } - def create_item(self, name: str) -> LoonylandItem: - return LoonylandItem(name, loony_item_table[name].modified_classification(self.options), loony_item_table[name].id, self.player) - def create_junk(self) -> LoonylandItem: return LoonylandItem("A Cool Filler Item", ItemClassification.filler, loonyland_base_id + 3000, self.player) + def create_item(self, name: str) -> LoonylandItem: + if name == "A Cool Filler Item": + return self.create_junk() + return LoonylandItem( + name, loony_item_table[name].modified_classification(self.options), loony_item_table[name].id, self.player + ) + def create_items(self) -> None: item_pool: list[LoonylandItem] = [] for name, item in loony_item_table.items(): @@ -88,9 +93,10 @@ def create_event(self, event: str) -> LoonylandItem: return LoonylandItem(event, ItemClassification.progression, None, self.player) def create_regions(self) -> None: - for region_name in loonyland_region_table: - region = Region(region_name, self.player, self.multiworld) - self.multiworld.regions.append(region) + for region_name, region_data in loonyland_region_table.items(): + if region_data.can_create(self.options): + region = Region(region_name, self.player, self.multiworld) + self.multiworld.regions.append(region) for loc_name, loc_data in loonyland_location_table.items(): if not loc_data.can_create(self.options): @@ -116,9 +122,12 @@ def set_rules(self): set_entrance_rules(self.multiworld, self) def fill_slot_data(self): - return {"Difficulty": self.options.difficulty.value, - "LongChecks": self.options.long_checks.value, - "Remix": self.options.remix.value, - "Badges": self.options.badges.value, - "Dolls": self.options.dolls.value, - "DeathLink": self.options.death_link.value} \ No newline at end of file + return { + "Difficulty": self.options.difficulty.value, + "LongChecks": self.options.long_checks.value, + "MultipleSaves": self.options.multisave.value, + "Remix": self.options.remix.value, + "Badges": self.options.badges.value, + "Dolls": self.options.dolls.value, + "DeathLink": self.options.death_link.value, + } diff --git a/worlds/loonyland/entrances.py b/worlds/loonyland/entrances.py index eef47e901962..ae8282fe8310 100644 --- a/worlds/loonyland/entrances.py +++ b/worlds/loonyland/entrances.py @@ -3,6 +3,7 @@ from BaseClasses import Entrance from worlds.generic.Rules import CollectionRule +from worlds.loonyland.options import Badges, LoonylandOptions class LoonylandEntrance(Entrance): @@ -15,3 +16,9 @@ class LLEntrance(NamedTuple): is_real_loading_zone: bool # rule: typing.Callable[[player, state], bool] rule: CollectionRule = lambda state: True + flags: list[str] = [] + + def can_create(self, options: LoonylandOptions) -> bool: + if options.badges == Badges.option_none and "MODE" in self.flags: + return False + return True diff --git a/worlds/loonyland/items.py b/worlds/loonyland/items.py index 2daafefb8b39..46ae2cfd0f0c 100644 --- a/worlds/loonyland/items.py +++ b/worlds/loonyland/items.py @@ -3,8 +3,7 @@ from BaseClasses import Item, ItemClassification -from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, Remix -from worlds.stardew_valley import true_ +from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, MultipleSaves, Remix class LoonylandItem(Item): @@ -33,18 +32,16 @@ class LLItem(NamedTuple): flags: list[str] = [] def can_create(self, options: LoonylandOptions) -> bool: - if ( - self.category == LLItemCat.CHEAT - and options.badges == Badges.option_vanilla - ) or ( - self.category == LLItemCat.DOLL - and options.dolls == MonsterDolls.option_vanilla + if (self.category == LLItemCat.CHEAT and options.badges == Badges.option_vanilla) or ( + self.category == LLItemCat.DOLL and options.dolls == MonsterDolls.option_vanilla ): return False if "OP" in self.flags: return False if options.remix == Remix.option_excluded and ("REMIX" in self.flags): return False + if options.multisave == MultipleSaves.option_disabled and ("MULTISAVE" in self.flags): + return False return True def in_logic(self, options: LoonylandOptions) -> bool: @@ -55,20 +52,19 @@ def in_logic(self, options: LoonylandOptions) -> bool: return True def modified_classification(self, options: LoonylandOptions): - if options.long_checks==LongChecks.option_included: - if self.category == LLItemCat.CHEAT: #39 badges + if options.long_checks == LongChecks.option_included: + if self.category == LLItemCat.CHEAT: # 39 badges return ItemClassification.progression - if self.category == LLItemCat.ITEM: # 100% + if self.category == LLItemCat.ITEM: # 100% return ItemClassification.progression - if self.category == LLItemCat.DOLL: # 100% + if self.category == LLItemCat.DOLL: # 100% return ItemClassification.progression - if options.badges==Badges.option_none: + if options.badges == Badges.option_none: if self.category == LLItemCat.ACCESS: return ItemClassification.filler - if options.badges==Badges.option_none: - if self.category==LLItemCat.ACCESS: - return ItemClassification.filler - if "PWR" in self.flags or "PWR_BIG" in self.flags or "PWR_MAX" in self.flags: #need to be able to kill bosses, eventually an option for this + if ( + "PWR" in self.flags or "PWR_BIG" in self.flags or "PWR_MAX" in self.flags + ): # need to be able to kill bosses, eventually an option for this return ItemClassification.progression - return self.classification \ No newline at end of file + return self.classification diff --git a/worlds/loonyland/locations.py b/worlds/loonyland/locations.py index 0ed42415b75c..2948233e4949 100644 --- a/worlds/loonyland/locations.py +++ b/worlds/loonyland/locations.py @@ -3,7 +3,7 @@ from BaseClasses import Location -from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, Remix +from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, MultipleSaves, Remix class LoonylandLocation(Location): @@ -38,6 +38,8 @@ def can_create(self, options: LoonylandOptions) -> bool: return False if options.remix == Remix.option_excluded and ("REMIX" in self.flags): return False + if options.multisave == MultipleSaves.option_disabled and ("MULTISAVE" in self.flags): + return False return True def in_logic(self, options: LoonylandOptions) -> bool: diff --git a/worlds/loonyland/options.py b/worlds/loonyland/options.py index d4914ad200a6..ca2ffe1118df 100644 --- a/worlds/loonyland/options.py +++ b/worlds/loonyland/options.py @@ -21,10 +21,10 @@ class Difficulty(Choice): display_name = "Difficulty" option_beginner = 0 option_normal = 1 - option_hard = 2 - option_challenge = 3 - option_mad = 4 - option_loony = 5 + option_hard = 5 + option_challenge = 2 + option_mad = 3 + option_loony = 4 default = 1 @@ -39,6 +39,15 @@ class LongChecks(Choice): default = 0 +class MultipleSaves(Choice): + """Excluded: Remove badges that require using certain characters/terror mode, removes all "takes effect on new game" cheats""" + + display_name = "Multiple Saves" + option_disabled = 0 + option_enabled = 1 + default = 0 + + class Remix(Choice): """Excluded: Remix mode not included""" @@ -78,6 +87,7 @@ class LoonylandOptions(PerGameCommonOptions): # win_condition: WinCondition difficulty: Difficulty long_checks: LongChecks + multisave: MultipleSaves remix: Remix badges: Badges dolls: MonsterDolls diff --git a/worlds/loonyland/regions.py b/worlds/loonyland/regions.py index 3bd9652b3024..f7f751f4221e 100644 --- a/worlds/loonyland/regions.py +++ b/worlds/loonyland/regions.py @@ -2,6 +2,8 @@ from BaseClasses import Region +from worlds.loonyland.options import Badges, LoonylandOptions + class LoonylandRegion(Region): game = "Loonyland" @@ -10,3 +12,9 @@ class LoonylandRegion(Region): class LLRegion(NamedTuple): real: bool map: str = "" + flags: list[str] = [] + + def can_create(self, options: LoonylandOptions) -> bool: + if options.badges == Badges.option_none and "MODE" in self.flags: + return False + return True diff --git a/worlds/loonyland/rules.py b/worlds/loonyland/rules.py index 5fb328282bdc..3c7f532522bd 100644 --- a/worlds/loonyland/rules.py +++ b/worlds/loonyland/rules.py @@ -1,6 +1,7 @@ from typing import TYPE_CHECKING from BaseClasses import CollectionState + if TYPE_CHECKING: from worlds.loonyland import LoonylandWorld @@ -23,12 +24,18 @@ def can_kill_werewolves(state: CollectionState, world: "LoonylandWorld") -> bool def have_bombs(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.has("Bombs", world.player) or state.has("Combo-Bombo", world.player) or state.has("Play As Werewolf", world.player) + return ( + state.has("Bombs", world.player) + or state.has("Combo-Bombo", world.player) + or state.has("Play As Werewolf", world.player) + ) # or werewolf badge when badges are added def have_many_bombs(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.has("Bombs", world.player) or (state.has("Play As Werewolf", world.player) and state.has("Infinite Gems", world.player)) + return state.has("Bombs", world.player) or ( + state.has("Play As Werewolf", world.player) and state.has("Infinite Gems", world.player) + ) def have_special_weapon_damage(state: CollectionState, world: "LoonylandWorld") -> bool: @@ -112,12 +119,14 @@ def can_reach_vampire(state: CollectionState, world: "LoonylandWorld") -> bool: def can_reach_wolves(state: CollectionState, world: "LoonylandWorld") -> bool: return state.can_reach_region("Halloween Hill", world.player) + def can_do_collection(state: CollectionState, world: "LoonylandWorld") -> bool: return state.has_group_unique("monster_dolls", world.player, 8) + def power_level(state: CollectionState, world: "LoonylandWorld", level_goal: int) -> bool: level: int = 0 level += state.count_group("power", world.player) level += state.count_group("power_big", world.player) * 5 level += state.count_group("power_max", world.player) * 50 - return level > level_goal \ No newline at end of file + return level > level_goal From dd0e10aa4f70b3755883d9913e96a01ef5accee6 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 28 Dec 2024 10:52:11 -0500 Subject: [PATCH 42/58] add some locs as postgame --- worlds/loonyland/Data/game_data.py | 472 +++++++---------------------- worlds/loonyland/locations.py | 5 +- worlds/loonyland/options.py | 16 +- 3 files changed, 116 insertions(+), 377 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index a591d24f239b..adbbad480a7a 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -25,7 +25,7 @@ have_special_weapon_bullet, have_special_weapon_damage, hundred_percent, - power_level, + power_level ) ll_base_id: int = 2876900 @@ -360,9 +360,7 @@ "Cat": LLItem(ll_base_id + VAR_CAT, LLItemCat.ITEM, ItemClassification.progression), "Big Gem": LLItem(ll_base_id + VAR_GEM, LLItemCat.ITEM, ItemClassification.progression, 6), "100 Gems": LLItem(ll_base_id + VAR_ZOMBIEGEM, LLItemCat.ITEM, ItemClassification.filler), - "Triple Fire Gem": LLItem( - ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"] - ), + "Triple Fire Gem": LLItem(ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"]), "Happy Stick": LLItem(ll_base_id + VAR_TALISMAN, LLItemCat.ITEM, ItemClassification.progression), "Bat Statue": LLItem(ll_base_id + VAR_BATSTATUE, LLItemCat.ITEM, ItemClassification.progression, 4), "Lantern": LLItem(ll_base_id + VAR_LANTERN, LLItemCat.ITEM, ItemClassification.progression), @@ -372,101 +370,47 @@ "Disco Mode": LLItem(ll_base_id + CH_DISCO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Terror Mode": LLItem(ll_base_id + CH_TERROR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Quick Mode": LLItem( - ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] - ), + "Quick Mode": LLItem(ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), "Infinite Gems": LLItem(ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Homing Shots": LLItem( - ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] - ), - "Ultimate Firepower": LLItem( - ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] - ), + "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), + "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Play As Bonkula": LLItem( - ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] - ), - "Play As Toad": LLItem( - ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] - ), + "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), + "Play As Toad": LLItem(ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Radar": LLItem(ll_base_id + CH_RADAR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Heavy Hitter": LLItem( - ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] - ), - "Rapid Fire": LLItem( - ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"] - ), - "Touch Of Death": LLItem( - ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX"] - ), - "All Access Pass": LLItem( - ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] - ), - "Play As Swampdog": LLItem( - ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE"] - ), - "Hardcore Mode": LLItem( - ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] - ), + "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), + "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"]), + "Touch Of Death": LLItem(ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"]), + "All Access Pass": LLItem(ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), + "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE"]), + "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Guided Shots": LLItem( - ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] - ), - "Slo-Mo": LLItem( - ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] - ), - "Combo-Bombo": LLItem( - ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] - ), + "Guided Shots": LLItem(ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), + "Slo-Mo": LLItem(ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), + "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Play As Witch": LLItem( - ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE"] - ), - "Play As Werewolf": LLItem( - ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] - ), + "Play As Witch": LLItem(ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE"]), + "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Infinite Survival": LLItem( - ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), - "Play As Summony": LLItem( - ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] - ), - "Play As Ninja Girl": LLItem( - ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] - ), - "Molecular Dispersion": LLItem( - ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"] - ), - "Guaranteed Survival": LLItem( - ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX"] - ), + "Infinite Survival": LLItem(ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Summony": LLItem(ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), + "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), + "Molecular Dispersion": LLItem(ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"]), + "Guaranteed Survival": LLItem(ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"]), "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Stinky Farley": LLItem(ll_base_id + CH_STINKY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Ultra Weapons Are Go!": LLItem( - ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Ultra Weapons Are Go!": LLItem(ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Thorns Aura": LLItem(ll_base_id + CH_THORNS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Monster Regeneration": LLItem( - ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Monster Regeneration": LLItem(ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Bowling Access": LLItem(ll_base_id + MODE_BOWLING + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Survival Access": LLItem( - ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Boss Bash Access": LLItem( - ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Loony Ball Access": LLItem( - ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Remix Access": LLItem( - ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"] - ), + "Survival Access": LLItem(ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Boss Bash Access": LLItem(ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Loony Ball Access": LLItem(ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Remix Access": LLItem(ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"]), "Bat Doll": LLItem(ll_base_id + VAR_BATDOLL, LLItemCat.DOLL, ItemClassification.progression), "Skeleton Doll": LLItem(ll_base_id + VAR_SKELDOLL, LLItemCat.DOLL, ItemClassification.progression), "Frog Doll": LLItem(ll_base_id + VAR_FROGDOLL, LLItemCat.DOLL, ItemClassification.progression), @@ -701,7 +645,7 @@ "Q: The Last Gate": LLLocation(111, LLLocCat.QUEST, 17, "Castle Vampy IV"), "Q: The Rescue": LLLocation(112, LLLocCat.QUEST, 18, "A Gloomy Cavern"), "Q: The Collection": LLLocation(113, LLLocCat.QUEST, 19, "A Cabin Collector", flags=["DOLL"]), - "Evil Smashin'": LLLocation(114, LLLocCat.BADGE, 0, "The Evilizer", base_item="Quick Mode"), + "Evil Smashin'": LLLocation(114, LLLocCat.BADGE, 0, "The Evilizer", flags=["POSTGAME"], base_item="Quick Mode"), "Bowlin'": LLLocation(115, LLLocCat.BADGE, 1, "Bowling", base_item="Disco Mode"), "Vandalizin'": LLLocation(116, LLLocCat.BADGE, 2, "Zombiton", base_item="Vintage Mode"), "Greed": LLLocation(117, LLLocCat.BADGE, 3, "Menu", flags=["LONG"], base_item="Infinite Gems"), @@ -709,7 +653,7 @@ "Monster Poundin'": LLLocation(119, LLLocCat.BADGE, 5, "Menu", flags=["LONG"], base_item="Hardcore Mode"), "Ghostbustin'": LLLocation(120, LLLocCat.BADGE, 6, "Haunted Tower Roof", base_item="Homing Shots"), "Lookin'": LLLocation(121, LLLocCat.BADGE, 7, "The Witch's Cabin", base_item="20/20 Vision"), - "Ultimate Victory": LLLocation(122, LLLocCat.BADGE, 8, "The Evilizer", base_item="Ultimate Firepower"), + "Ultimate Victory": LLLocation(122, LLLocCat.BADGE, 8, "The Evilizer", flags=["POSTGAME"], base_item="Ultimate Firepower"), "Kickin'": LLLocation(123, LLLocCat.BADGE, 9, "Loony Ball", base_item="Surprise Mode"), "Boss Bashin'": LLLocation(124, LLLocCat.BADGE, 10, "Boss Bash", base_item="Combo-Bombo"), "Vampire Slayin'": LLLocation(125, LLLocCat.BADGE, 11, "The Heart Of Terror", base_item="Play As Bonkula"), @@ -718,43 +662,29 @@ "Animal Control": LLLocation(128, LLLocCat.BADGE, 14, "The Wolf Den", base_item="Play As Werewolf"), "Annoyance": LLLocation(129, LLLocCat.BADGE, 15, "The Witch's Cabin", base_item="Play As Toad"), "Civic Duty": LLLocation(130, LLLocCat.BADGE, 16, "A Gloomy Cavern", base_item="Enemy Overload"), - "Winnin'": LLLocation(131, LLLocCat.BADGE, 17, "The Evilizer", base_item="Crystal Ball"), + "Winnin'": LLLocation(131, LLLocCat.BADGE, 17, "The Evilizer", flags=["POSTGAME"], base_item="Crystal Ball"), "Combo Plate": LLLocation(132, LLLocCat.BADGE, 18, "Menu", base_item="Radar"), "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, 19, "Rocky Cliffs", base_item="Heavy Hitter"), "Findin'": LLLocation(134, LLLocCat.BADGE, 20, "The Wolf Den", base_item="Rapid Fire"), - "Extreme Survivin'": LLLocation( - 135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death" - ), + "Extreme Survivin'": LLLocation(135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death"), "Huntin'": LLLocation(136, LLLocCat.BADGE, 22, "Halloween Hill", base_item="All Access Pass"), "Advanced Winnin'": LLLocation(137, LLLocCat.BADGE, 23, "Menu", flags=["LONG"], base_item="Terror Mode"), "Survivin'": LLLocation(138, LLLocCat.BADGE, 24, "Survival", base_item="Save Anywhere"), "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, 25, "Larry's Lair", base_item="Guided Shots"), - "Mad Skeelz": LLLocation( - 140, LLLocCat.BADGE, 26, "The Evilizer", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Kick The Cat!" - ), + "Mad Skeelz": LLLocation(140, LLLocCat.BADGE, 26, "The Evilizer", flags=["LONG_VANILLA_BADGES", "MULTISAVE", "POSTGAME"], base_item="Kick The Cat!"), "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, 27, "Frankenjulie's Laboratory", base_item="Slo-Mo"), "Combo Magic": LLLocation(142, LLLocCat.BADGE, 28, "Survival", base_item="Infinite Survival"), "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, 29, "Slurpy Swamp Mud", base_item="Frog-o-rama"), "R-R-R-Remix!": LLLocation(144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG"], base_item="Play As Summony"), - "Witchcraft": LLLocation( - 145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl" - ), - "Ninjitsu": LLLocation( - 146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Molecular Dispersion" - ), - "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, 33, "Survival", base_item="Guaranteed Survival"), + "Witchcraft": LLLocation(145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl"), + "Ninjitsu": LLLocation(146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Molecular Dispersion"), + "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, 33, "Survival", flags=["LONG"], base_item="Guaranteed Survival"), "Hooliganin'": LLLocation(148, LLLocCat.BADGE, 34, "Loony Ball", base_item="Bend It Like Bouapha"), "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, 35, "Menu", flags=["LONG", "MULTISAVE"], base_item="Stinky Farley"), - "Scorin'": LLLocation(150, LLLocCat.BADGE, 36, "The Evilizer", base_item="Ultra Weapons Are Go!"), - "Brawlin'": LLLocation( - 151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES"], base_item="Thorns Aura" - ), - "Minin' For Treasure": LLLocation( - 152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration" - ), - "Digitally Masterin'": LLLocation( - 153, LLLocCat.BADGE, 39, "Menu", flags=["LONG", "REMIX", "MULTISAVE"], base_item="Farley Free Zone" - ), + "Scorin'": LLLocation(150, LLLocCat.BADGE, 36, "The Evilizer", flags=["LONG"], base_item="Ultra Weapons Are Go!"), + "Brawlin'": LLLocation(151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES"], base_item="Thorns Aura"), + "Minin' For Treasure": LLLocation(152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration"), + "Digitally Masterin'": LLLocation(153, LLLocCat.BADGE, 39, "Menu", flags=["LONG", "REMIX", "MULTISAVE"], base_item="Farley Free Zone"), "Tree Trimming Reward": LLLocation(154, LLLocCat.REWARD, VAR_TREEREWARD, "A Cabin Trees"), "Larry's Wife Reward": LLLocation(155, LLLocCat.REWARD, VAR_LARRYREWARD, "A Cabin Larry"), "Farmer Reward": LLLocation(156, LLLocCat.REWARD, VAR_CROPSREWARD, "Halloween Hill"), @@ -768,8 +698,6 @@ "Vampire Drop": LLLocation(164, LLLocCat.DOLL, 6, "Menu", base_item="Vampire Doll"), "Wolf Drop": LLLocation(165, LLLocCat.DOLL, 7, "Menu", base_item="Wolfman Doll"), } - - def set_rules(multiworld, world): access_rules: dict[str, CollectionRule] = { "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", world.player), @@ -786,22 +714,18 @@ def set_rules(multiworld, world): "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", world.player), "Under The Lake: Bat Door": lambda state: state.has("Bat Key", world.player), "Frankenjulie's Reward": lambda state: power_level(state, world, 10), + "Tower: Barracks": lambda state: state.has("Bat Key", world.player), "PolterGuy's Reward": lambda state: power_level(state, world, 10), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) - and state.has("Skull Key", world.player) - and state.has("Pumpkin Key", world.player), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) and state.has("Skull Key", world.player) and state.has("Pumpkin Key", world.player), "Happy Stick: Reward": lambda state: power_level(state, world, 40), "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), "Wolf Den: Vine": lambda state: state.has("Fertilizer", world.player), "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", world.player), "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", world.player), "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", world.player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) - and can_kill_werewolves(state, world), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) - and can_kill_werewolves(state, world), - "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) - and power_level(state, world, 20), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), + "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) and power_level(state, world, 20), "Roof NE: Stoney the Elder": lambda state: power_level(state, world, 20), "Roof SW: Drippy the Elder": lambda state: power_level(state, world, 20), "Roof SE: Toasty the Elder": lambda state: power_level(state, world, 20), @@ -818,10 +742,8 @@ def set_rules(multiworld, world): "Q: Beneath The Lake": lambda state: power_level(state, world, 10), "Q: A True Hero": lambda state: state.has("Fertilizer", world.player) and have_bombs(state, world), "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, world) and state.has("Silver", world.player), - "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) - and power_level(state, world, 10), - "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) - and state.has("Mushroom", world.player, 10), + "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) and power_level(state, world, 10), + "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) and state.has("Mushroom", world.player, 10), "Q: The Haunted Tower": lambda state: power_level(state, world, 10), "Q: The Last Gate": lambda state: state.has("Vampire Bust", world.player, 8), "Q: The Collection": lambda state: can_do_collection(state, world), @@ -831,27 +753,19 @@ def set_rules(multiworld, world): "Animal Control": lambda state: can_kill_werewolves(state, world), "Cleanin' Up": lambda state: have_many_bombs(state, world), "Extreme Survivin'": lambda state: state.has("Terror Mode", world.player), - "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) - and state.can_reach_region("Zombiton", world.player) - and state.can_reach_region("Slurpy Swamp Mud", world.player) - and can_kill_werewolves(state, world), + "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) and state.can_reach_region("Zombiton", world.player) and state.can_reach_region("Slurpy Swamp Mud", world.player) and can_kill_werewolves(state, world), "Advanced Winnin'": lambda state: hundred_percent(state, world), "Mad Skeelz": lambda state: state.has("Terror Mode", world.player), "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", world.player), "R-R-R-Remix!": lambda state: hundred_percent(state, world) and state.has("Remix Access", world.player), - "Witchcraft": lambda state: state.has("Play As Witch", world.player) - and have_all_weapons(state, world) - and state.can_reach_region("Castle Vampy IV", world.player), - "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) and have_all_weapons(state, world), + "Witchcraft": lambda state: state.has("Play As Witch", world.player) and have_all_weapons(state, world) and state.can_reach_region("Castle Vampy IV", world.player), + "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) and have_all_weapons(state, world) and state.has("Infinite Gems", world.player), "Stayin' Alive": lambda state: state.has("Infinite Survival", world.player), - "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) - and state.can_reach_region("Castle Vampy IV", world.player), + "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) and state.can_reach_region("Castle Vampy IV", world.player), "Brawlin'": lambda state: state.has("Touch Of Death", world.player), - "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) - and state.has("Remix Access", world.player), + "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) and state.has("Remix Access", world.player), "Digitally Masterin'": lambda state: have_39_badges(state, world), - "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) - and can_cleanse_crypts(state, world), + "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) and can_cleanse_crypts(state, world), "Farmer Reward": lambda state: can_cleanse_crypts(state, world), "Mayor Reward": lambda state: can_cleanse_crypts(state, world), "Bat Drop": lambda state: can_reach_bats(state, world), @@ -866,19 +780,13 @@ def set_rules(multiworld, world): for loc in multiworld.get_locations(world.player): if loc.name in access_rules: add_rule(loc, access_rules[loc.name]) - - def set_entrance_rules(multiworld, world): loonyland_entrance_table: list[LLEntrance] = [ LLEntrance("Menu", "Halloween Hill", False), LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", world.player), flags=["MODE"]), LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", world.player), flags=["MODE"]), - LLEntrance( - "Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=["MODE"] - ), - LLEntrance( - "Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=["MODE"] - ), + LLEntrance("Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=["MODE"]), + LLEntrance("Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=["MODE"]), LLEntrance("Menu", "Remix", False, lambda state: state.has("Remix Access", world.player), flags=["MODE"]), LLEntrance("Halloween Hill", "A Cabin Trees", True), LLEntrance("Halloween Hill", "The Witch's Cabin", True), @@ -898,21 +806,15 @@ def set_entrance_rules(multiworld, world): LLEntrance("Zombiton", "A Messy Cabin", True), LLEntrance("Halloween Hill", "Rusty Crypt Entrance", True), LLEntrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", world.player, 4)), - LLEntrance( - "Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player) - ), + LLEntrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Rocky Cliffs", "Abandoned Mines Entrance", True), LLEntrance("Rocky Cliffs", "The Shrine Of Bombulus", True), LLEntrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, world)), LLEntrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", world.player)), LLEntrance("Zombiton", "A Cabin Larry", True), LLEntrance("Halloween Hill", "The Wolf Den Entrance", True), - LLEntrance( - "Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player) - ), - LLEntrance( - "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world) - ), + LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player)), + LLEntrance("Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world)), LLEntrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), LLEntrance("Vampy Land", "Castle Vampy", True), LLEntrance("Halloween Hill", "Cabin In The Woods", True), @@ -952,76 +854,30 @@ def set_entrance_rules(multiworld, world): LLEntrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True), LLEntrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True), LLEntrance("Frankenjulie's Laboratory", "Halloween Hill", True), - LLEntrance( - "Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player) - ), + LLEntrance("Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower", "Haunted Basement Entrance", False), LLEntrance("Haunted Tower", "Haunted Tower Stairs Up", False), - LLEntrance( - "Haunted Tower", - "Haunted Tower Stairs Down", - False, - lambda state: state.has("Bat Key", world.player) - and state.has("Pumpkin Key", world.player) - and state.has("Skull Key", world.player), - ), + LLEntrance("Haunted Tower", "Haunted Tower Stairs Down", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player)), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), - LLEntrance( - "Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player) - ), - LLEntrance( - "Haunted Tower Stairs Down", - "Haunted Tower", - False, - lambda state: state.has("Bat Key", world.player) - and state.has("Pumpkin Key", world.player) - and state.has("Skull Key", world.player) - and state.has("Ghost Potion", world.player), - ), - LLEntrance( - "Haunted Tower Stairs Down", - "Haunted Basement Entrance", - True, - lambda state: have_light_source(state, world), - ), + LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance("Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player) and state.has("Ghost Potion", world.player)), + LLEntrance("Haunted Tower Stairs Down", "Haunted Basement Entrance", True, lambda state: have_light_source(state, world)), LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), - LLEntrance( - "Haunted Tower Floor 2 Entrance", - "Haunted Tower Floor 2", - False, - lambda state: state.has("Ghost Potion", world.player), - ), + LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), - LLEntrance( - "Haunted Tower Floor 2 Exit", - "Haunted Tower Floor 2", - False, - lambda state: state.has("Ghost Potion", world.player), - ), + LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), - LLEntrance( - "Haunted Tower Floor 3 Entrance", - "Haunted Tower Floor 3", - False, - lambda state: state.has("Ghost Potion", world.player), - ), + LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), - LLEntrance( - "Haunted Tower Floor 3 Exit", - "Haunted Tower Floor 3", - False, - lambda state: state.has("Ghost Potion", world.player), - ), + LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), LLEntrance("Haunted Tower Roof", "Halloween Hill", True), LLEntrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), LLEntrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), - LLEntrance( - "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world) - ), + LLEntrance("Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world)), LLEntrance("Haunted Basement", "Haunted Basement Entrance", False), LLEntrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, world)), LLEntrance("Abandoned Mines Entrance", "Rocky Cliffs", True), @@ -1031,129 +887,53 @@ def set_entrance_rules(multiworld, world): LLEntrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), LLEntrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), LLEntrance("Happy Stick Woods", "Halloween Hill", True), - LLEntrance( - "The Wolf Den Entrance", - "The Wolf Den", - False, - lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), - ), + LLEntrance("The Wolf Den Entrance", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), LLEntrance("The Wolf Den Entrance", "Halloween Hill", True), LLEntrance("The Wolf Den", "The Wolf Den Entrance", False), LLEntrance("The Wolf Den", "The Wolf Den Exit", False), LLEntrance("The Wolf Den Exit", "Larry's Lair", True), - LLEntrance( - "The Wolf Den Exit", - "The Wolf Den", - False, - lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), - ), + LLEntrance("The Wolf Den Exit", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), LLEntrance("A Cabin Larry", "Zombiton", True), - LLEntrance( - "Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player) - ), - LLEntrance( - "Upper Creepy Caverns Left Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player)), + LLEntrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), - LLEntrance( - "Upper Creepy Caverns Middle Warp", - "Creepy Caverns Left Top Warp", - True, - lambda state: have_light_source(state, world), - ), - LLEntrance( - "Upper Creepy Caverns Middle Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, lambda state: have_light_source(state, world)), + LLEntrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), - LLEntrance( - "Upper Creepy Caverns Right Warp", - "Creepy Caverns Middle Top Warp", - True, - lambda state: have_light_source(state, world), - ), - LLEntrance( - "Upper Creepy Caverns Right Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, lambda state: have_light_source(state, world)), + LLEntrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), - LLEntrance( - "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world) - ), - LLEntrance( - "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world) - ), + LLEntrance("Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world)), + LLEntrance("Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), - LLEntrance( - "Creepy Caverns Left Bottom Warp", - "Creepy Caverns Left", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), - LLEntrance( - "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world) - ), + LLEntrance("Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), LLEntrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), - LLEntrance( - "Creepy Caverns Middle Top Warp", - "Creepy Caverns Middle", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), - LLEntrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True), - LLEntrance( - "Creepy Caverns Middle Right Warp", - "Creepy Caverns Middle", - False, - lambda state: have_light_source(state, world), - ), - LLEntrance("Creepy Caverns Right Left Warp", "Under The Ravine", True), - LLEntrance( - "Creepy Caverns Right Left Warp", - "Creepy Caverns Right", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20)), + LLEntrance("Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), + LLEntrance("Creepy Caverns Right Left Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20)), + LLEntrance("Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), - LLEntrance( - "Creepy Caverns Right Bottom Warp", - "Creepy Caverns Right", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), LLEntrance("Castle Vampy", "Halloween Hill", True), - LLEntrance( - "Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player) - ), - LLEntrance( - "Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player) - ), + LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player)), + LLEntrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player)), LLEntrance("Castle Vampy Skull Jail", "Castle Vampy II", True), LLEntrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy II", "Castle Vampy Skull Jail", True), - LLEntrance( - "Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player) - ), - LLEntrance( - "Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player) - ), + LLEntrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player)), + LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player)), LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy III", True), LLEntrance("Castle Vampy II NE", "Castle Vampy", True), LLEntrance("Castle Vampy II NE", "Castle Vampy III NE", True), @@ -1165,18 +945,8 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy II NW", "Castle Vampy III NW", True), LLEntrance("Cabin In The Woods", "Halloween Hill", True), LLEntrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), - LLEntrance( - "Castle Vampy III", - "Castle Vampy III Pumpkin Jail", - False, - lambda state: state.has("Pumpkin Key", world.player), - ), - LLEntrance( - "Castle Vampy III Pumpkin Jail", - "Castle Vampy III", - False, - lambda state: state.has("Pumpkin Key", world.player), - ), + LLEntrance("Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", world.player)), + LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", world.player)), LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), LLEntrance("Castle Vampy III NE", "Castle Vampy II NE", True), LLEntrance("Castle Vampy III NE", "Castle Vampy IV NE", True), @@ -1187,12 +957,7 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy III NW", "Castle Vampy II NW", True), LLEntrance("Castle Vampy III NW", "Castle Vampy IV NW", True), LLEntrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), - LLEntrance( - "Castle Vampy IV", - "The Heart Of Terror Entrance", - True, - lambda state: state.has("Vampire Bust", world.player, 8), - ), + LLEntrance("Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", world.player, 8)), LLEntrance("Castle Vampy IV NE", "Castle Vampy III NE", True), LLEntrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), LLEntrance("Castle Vampy IV SE", "Castle Vampy III SE", True), @@ -1207,9 +972,7 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), LLEntrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), LLEntrance("The Evilizer", "Halloween Hill", True), - LLEntrance( - "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world) - ), + LLEntrance("The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world)), LLEntrance("The Heart Of Terror", "The Evilizer", True), LLEntrance("The Heart Of Terror", "Empty Rooftop", True), LLEntrance("A Hidey-Hole", "Halloween Hill", True), @@ -1219,47 +982,20 @@ def set_entrance_rules(multiworld, world): LLEntrance("Larry's Lair", "Halloween Hill", True), LLEntrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), LLEntrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", world.player)), - LLEntrance( - "Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) - ), - LLEntrance( - "Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) - ), + LLEntrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), LLEntrance("Zombiton", "Halloween Hill", False), LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance( - "Halloween Hill", - "Rocky Cliffs", - False, - lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), - ), - LLEntrance( - "Rocky Cliffs", - "Halloween Hill", - False, - lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), - ), + LLEntrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), + LLEntrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", world.player)), LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance( - "Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) - ), - LLEntrance( - "Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player) - ), - LLEntrance( - "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player) - ), - LLEntrance( - "Underground Tunnel Zombie", - "Underground Tunnel Mud", - False, - lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player), - ), + LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Underground Tunnel Zombie", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player)), LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", world.player)), - LLEntrance( - "Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player) - ), + LLEntrance("Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player)), ] for region in multiworld.get_regions(world.player): for entry in loonyland_entrance_table: diff --git a/worlds/loonyland/locations.py b/worlds/loonyland/locations.py index 2948233e4949..878c7e10fd8c 100644 --- a/worlds/loonyland/locations.py +++ b/worlds/loonyland/locations.py @@ -3,7 +3,8 @@ from BaseClasses import Location -from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, MultipleSaves, Remix +from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, MultipleSaves, Remix, \ + WinCondition class LoonylandLocation(Location): @@ -40,6 +41,8 @@ def can_create(self, options: LoonylandOptions) -> bool: return False if options.multisave == MultipleSaves.option_disabled and ("MULTISAVE" in self.flags): return False + if options.win_condition == WinCondition.option_evilizer and ("POSTGAME" in self.flags): + return False return True def in_logic(self, options: LoonylandOptions) -> bool: diff --git a/worlds/loonyland/options.py b/worlds/loonyland/options.py index ca2ffe1118df..3972041e7837 100644 --- a/worlds/loonyland/options.py +++ b/worlds/loonyland/options.py @@ -10,8 +10,8 @@ class WinCondition(Choice): display_name = "Win Condition" option_evilizer = 0 - option_40badges = 1 - option_normal_remix = 2 + #option_40badges = 1 + #option_normal_remix = 2 default = 0 @@ -64,9 +64,9 @@ class Badges(Choice): None: Badges aren't in logic""" display_name = "Badges" - option_full = 0 + option_none = 0 option_vanilla = 1 - option_none = 2 + option_full = 2 default = 2 @@ -76,15 +76,15 @@ class MonsterDolls(Choice): None: Dolls aren't in logic, the collection quest gives nothing""" display_name = "Monster Dolls" - option_full = 0 + option_none = 0 option_vanilla = 1 - option_none = 2 - default = 0 + option_full = 2 + default = 2 @dataclass class LoonylandOptions(PerGameCommonOptions): - # win_condition: WinCondition + win_condition: WinCondition difficulty: Difficulty long_checks: LongChecks multisave: MultipleSaves From 70d68812723327affd42d94ba7f88233a1794013 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 28 Dec 2024 13:27:34 -0500 Subject: [PATCH 43/58] add witch reward to item pool badge WinCondition option badges required option op cheats option events for badge earn locs, so I can check how many you have in logic gen --- worlds/loonyland/Data/game_data.py | 525 ++++++++++++++++++++++------- worlds/loonyland/__init__.py | 31 +- worlds/loonyland/items.py | 18 +- worlds/loonyland/locations.py | 14 +- worlds/loonyland/options.py | 29 +- worlds/loonyland/rules.py | 6 +- 6 files changed, 490 insertions(+), 133 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index adbbad480a7a..214dd7b57ff6 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -25,7 +25,7 @@ have_special_weapon_bullet, have_special_weapon_damage, hundred_percent, - power_level + power_level, ) ll_base_id: int = 2876900 @@ -360,7 +360,9 @@ "Cat": LLItem(ll_base_id + VAR_CAT, LLItemCat.ITEM, ItemClassification.progression), "Big Gem": LLItem(ll_base_id + VAR_GEM, LLItemCat.ITEM, ItemClassification.progression, 6), "100 Gems": LLItem(ll_base_id + VAR_ZOMBIEGEM, LLItemCat.ITEM, ItemClassification.filler), - "Triple Fire Gem": LLItem(ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"]), + "Triple Fire Gem": LLItem( + ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"] + ), "Happy Stick": LLItem(ll_base_id + VAR_TALISMAN, LLItemCat.ITEM, ItemClassification.progression), "Bat Statue": LLItem(ll_base_id + VAR_BATSTATUE, LLItemCat.ITEM, ItemClassification.progression, 4), "Lantern": LLItem(ll_base_id + VAR_LANTERN, LLItemCat.ITEM, ItemClassification.progression), @@ -370,47 +372,106 @@ "Disco Mode": LLItem(ll_base_id + CH_DISCO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Terror Mode": LLItem(ll_base_id + CH_TERROR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Quick Mode": LLItem(ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), - "Infinite Gems": LLItem(ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), + "Quick Mode": LLItem( + ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), + "Infinite Gems": LLItem( + ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["LONG"] + ), "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), - "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), + "Homing Shots": LLItem( + ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), + "Ultimate Firepower": LLItem( + ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), - "Play As Toad": LLItem(ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), + "Play As Bonkula": LLItem( + ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), + "Play As Toad": LLItem( + ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Radar": LLItem(ll_base_id + CH_RADAR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), - "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"]), - "Touch Of Death": LLItem(ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"]), - "All Access Pass": LLItem(ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), - "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE"]), - "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), + "Heavy Hitter": LLItem( + ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] + ), + "Rapid Fire": LLItem( + ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"] + ), + "Touch Of Death": LLItem( + ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"] + ), + "All Access Pass": LLItem( + ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), + "Play As Swampdog": LLItem( + ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"] + ), + "Hardcore Mode": LLItem( + ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Guided Shots": LLItem(ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), - "Slo-Mo": LLItem(ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), - "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), + "Guided Shots": LLItem( + ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), + "Slo-Mo": LLItem( + ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] + ), + "Combo-Bombo": LLItem( + ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Play As Witch": LLItem(ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE"]), - "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), + "Play As Witch": LLItem( + ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"] + ), + "Play As Werewolf": LLItem( + ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Infinite Survival": LLItem(ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Summony": LLItem(ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), - "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), - "Molecular Dispersion": LLItem(ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"]), - "Guaranteed Survival": LLItem(ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"]), + "Infinite Survival": LLItem( + ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), + "Play As Summony": LLItem( + ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), + "Play As Ninja Girl": LLItem( + ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), + "Molecular Dispersion": LLItem( + ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"] + ), + "Guaranteed Survival": LLItem( + ll_base_id + CH_SUPERSURV + AP_BADGEMOD, + LLItemCat.CHEAT, + ItemClassification.progression, + flags=["PWR_MAX", "OP"], + ), "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Stinky Farley": LLItem(ll_base_id + CH_STINKY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Ultra Weapons Are Go!": LLItem(ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Ultra Weapons Are Go!": LLItem( + ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), "Thorns Aura": LLItem(ll_base_id + CH_THORNS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Monster Regeneration": LLItem(ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Monster Regeneration": LLItem( + ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Bowling Access": LLItem(ll_base_id + MODE_BOWLING + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Survival Access": LLItem(ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Boss Bash Access": LLItem(ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Loony Ball Access": LLItem(ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Remix Access": LLItem(ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"]), + "Survival Access": LLItem( + ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Boss Bash Access": LLItem( + ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Loony Ball Access": LLItem( + ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Remix Access": LLItem( + ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"] + ), "Bat Doll": LLItem(ll_base_id + VAR_BATDOLL, LLItemCat.DOLL, ItemClassification.progression), "Skeleton Doll": LLItem(ll_base_id + VAR_SKELDOLL, LLItemCat.DOLL, ItemClassification.progression), "Frog Doll": LLItem(ll_base_id + VAR_FROGDOLL, LLItemCat.DOLL, ItemClassification.progression), @@ -637,7 +698,7 @@ "Q: Mystery Lake": LLLocation(103, LLLocCat.QUEST, 9, "Halloween Hill"), "Q: Beneath The Lake": LLLocation(104, LLLocCat.QUEST, 10, "Frankenjulie's Laboratory"), "Q: Happy Stick?!?": LLLocation(105, LLLocCat.QUEST, 11, "Happy Stick Woods"), - "Q: A True Hero": LLLocation(106, LLLocCat.QUEST, 12, "Under The Ravine", flags=["LONG"]), + "Q: A True Hero": LLLocation(106, LLLocCat.QUEST, 12, "Under The Ravine"), "Q: Silver Bullet": LLLocation(107, LLLocCat.QUEST, 13, "Zombiton"), "Q: Hairy Larry": LLLocation(108, LLLocCat.QUEST, 14, "The Wolf Den"), "Q: Ghostbusting": LLLocation(109, LLLocCat.QUEST, 15, "The Witch's Cabin"), @@ -649,11 +710,13 @@ "Bowlin'": LLLocation(115, LLLocCat.BADGE, 1, "Bowling", base_item="Disco Mode"), "Vandalizin'": LLLocation(116, LLLocCat.BADGE, 2, "Zombiton", base_item="Vintage Mode"), "Greed": LLLocation(117, LLLocCat.BADGE, 3, "Menu", flags=["LONG"], base_item="Infinite Gems"), - "Monster Slayin'": LLLocation(118, LLLocCat.BADGE, 4, "Menu", flags=["LONG"], base_item="Sidekick"), + "Monster Slayin'": LLLocation(118, LLLocCat.BADGE, 4, "Menu", base_item="Sidekick"), "Monster Poundin'": LLLocation(119, LLLocCat.BADGE, 5, "Menu", flags=["LONG"], base_item="Hardcore Mode"), "Ghostbustin'": LLLocation(120, LLLocCat.BADGE, 6, "Haunted Tower Roof", base_item="Homing Shots"), "Lookin'": LLLocation(121, LLLocCat.BADGE, 7, "The Witch's Cabin", base_item="20/20 Vision"), - "Ultimate Victory": LLLocation(122, LLLocCat.BADGE, 8, "The Evilizer", flags=["POSTGAME"], base_item="Ultimate Firepower"), + "Ultimate Victory": LLLocation( + 122, LLLocCat.BADGE, 8, "The Evilizer", flags=["POSTGAME"], base_item="Ultimate Firepower" + ), "Kickin'": LLLocation(123, LLLocCat.BADGE, 9, "Loony Ball", base_item="Surprise Mode"), "Boss Bashin'": LLLocation(124, LLLocCat.BADGE, 10, "Boss Bash", base_item="Combo-Bombo"), "Vampire Slayin'": LLLocation(125, LLLocCat.BADGE, 11, "The Heart Of Terror", base_item="Play As Bonkula"), @@ -666,38 +729,65 @@ "Combo Plate": LLLocation(132, LLLocCat.BADGE, 18, "Menu", base_item="Radar"), "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, 19, "Rocky Cliffs", base_item="Heavy Hitter"), "Findin'": LLLocation(134, LLLocCat.BADGE, 20, "The Wolf Den", base_item="Rapid Fire"), - "Extreme Survivin'": LLLocation(135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death"), + "Extreme Survivin'": LLLocation( + 135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death" + ), "Huntin'": LLLocation(136, LLLocCat.BADGE, 22, "Halloween Hill", base_item="All Access Pass"), "Advanced Winnin'": LLLocation(137, LLLocCat.BADGE, 23, "Menu", flags=["LONG"], base_item="Terror Mode"), "Survivin'": LLLocation(138, LLLocCat.BADGE, 24, "Survival", base_item="Save Anywhere"), "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, 25, "Larry's Lair", base_item="Guided Shots"), - "Mad Skeelz": LLLocation(140, LLLocCat.BADGE, 26, "The Evilizer", flags=["LONG_VANILLA_BADGES", "MULTISAVE", "POSTGAME"], base_item="Kick The Cat!"), + "Mad Skeelz": LLLocation( + 140, + LLLocCat.BADGE, + 26, + "The Evilizer", + flags=["LONG_VANILLA_BADGES", "MULTISAVE", "POSTGAME"], + base_item="Kick The Cat!", + ), "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, 27, "Frankenjulie's Laboratory", base_item="Slo-Mo"), "Combo Magic": LLLocation(142, LLLocCat.BADGE, 28, "Survival", base_item="Infinite Survival"), "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, 29, "Slurpy Swamp Mud", base_item="Frog-o-rama"), "R-R-R-Remix!": LLLocation(144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG"], base_item="Play As Summony"), - "Witchcraft": LLLocation(145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl"), - "Ninjitsu": LLLocation(146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Molecular Dispersion"), + "Witchcraft": LLLocation( + 145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl" + ), + "Ninjitsu": LLLocation( + 146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Molecular Dispersion" + ), "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, 33, "Survival", flags=["LONG"], base_item="Guaranteed Survival"), "Hooliganin'": LLLocation(148, LLLocCat.BADGE, 34, "Loony Ball", base_item="Bend It Like Bouapha"), "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, 35, "Menu", flags=["LONG", "MULTISAVE"], base_item="Stinky Farley"), "Scorin'": LLLocation(150, LLLocCat.BADGE, 36, "The Evilizer", flags=["LONG"], base_item="Ultra Weapons Are Go!"), - "Brawlin'": LLLocation(151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES"], base_item="Thorns Aura"), - "Minin' For Treasure": LLLocation(152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration"), - "Digitally Masterin'": LLLocation(153, LLLocCat.BADGE, 39, "Menu", flags=["LONG", "REMIX", "MULTISAVE"], base_item="Farley Free Zone"), + "Brawlin'": LLLocation( + 151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES", "OP"], base_item="Thorns Aura" + ), + "Minin' For Treasure": LLLocation( + 152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration" + ), + "Digitally Masterin'": LLLocation( + 153, + LLLocCat.BADGE, + 39, + "Menu", + flags=["LONG", "REMIX", "MULTISAVE", "POSTGAME", "LONG_VANILLA_BADGES"], + base_item="Farley Free Zone", + ), "Tree Trimming Reward": LLLocation(154, LLLocCat.REWARD, VAR_TREEREWARD, "A Cabin Trees"), "Larry's Wife Reward": LLLocation(155, LLLocCat.REWARD, VAR_LARRYREWARD, "A Cabin Larry"), "Farmer Reward": LLLocation(156, LLLocCat.REWARD, VAR_CROPSREWARD, "Halloween Hill"), - "Mayor Reward": LLLocation(157, LLLocCat.REWARD, VAR_ZOMBIEREWARD, "Zombiton"), - "Bat Drop": LLLocation(158, LLLocCat.DOLL, 0, "Menu", base_item="Bat Doll"), - "Skeleton Drop": LLLocation(159, LLLocCat.DOLL, 1, "Menu", base_item="Skeleton Doll"), - "Frog Drop": LLLocation(160, LLLocCat.DOLL, 2, "Menu", base_item="Frog Doll"), - "Ghost Drop": LLLocation(161, LLLocCat.DOLL, 3, "Menu", base_item="Ghost Doll"), - "Mummy Drop": LLLocation(162, LLLocCat.DOLL, 4, "Menu", base_item="Mummy Doll"), - "Swampdog Drop": LLLocation(163, LLLocCat.DOLL, 5, "Menu", base_item="Swampdog Doll"), - "Vampire Drop": LLLocation(164, LLLocCat.DOLL, 6, "Menu", base_item="Vampire Doll"), - "Wolf Drop": LLLocation(165, LLLocCat.DOLL, 7, "Menu", base_item="Wolfman Doll"), + "Witch Mushroom Reward": LLLocation(157, LLLocCat.REWARD, VAR_WITCHREWARD, "The Witch's Cabin"), + "Mayor Reward": LLLocation(158, LLLocCat.REWARD, VAR_ZOMBIEREWARD, "Zombiton"), + "Bat Drop": LLLocation(159, LLLocCat.DOLL, 0, "Menu", base_item="Bat Doll"), + "Skeleton Drop": LLLocation(160, LLLocCat.DOLL, 1, "Menu", base_item="Skeleton Doll"), + "Frog Drop": LLLocation(161, LLLocCat.DOLL, 2, "Menu", base_item="Frog Doll"), + "Ghost Drop": LLLocation(162, LLLocCat.DOLL, 3, "Menu", base_item="Ghost Doll"), + "Mummy Drop": LLLocation(163, LLLocCat.DOLL, 4, "Menu", base_item="Mummy Doll"), + "Swampdog Drop": LLLocation(164, LLLocCat.DOLL, 5, "Menu", base_item="Swampdog Doll"), + "Vampire Drop": LLLocation(165, LLLocCat.DOLL, 6, "Menu", base_item="Vampire Doll"), + "Wolf Drop": LLLocation(166, LLLocCat.DOLL, 7, "Menu", base_item="Wolfman Doll"), } + + def set_rules(multiworld, world): access_rules: dict[str, CollectionRule] = { "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", world.player), @@ -716,16 +806,21 @@ def set_rules(multiworld, world): "Frankenjulie's Reward": lambda state: power_level(state, world, 10), "Tower: Barracks": lambda state: state.has("Bat Key", world.player), "PolterGuy's Reward": lambda state: power_level(state, world, 10), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) and state.has("Skull Key", world.player) and state.has("Pumpkin Key", world.player), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) + and state.has("Skull Key", world.player) + and state.has("Pumpkin Key", world.player), "Happy Stick: Reward": lambda state: power_level(state, world, 40), "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), "Wolf Den: Vine": lambda state: state.has("Fertilizer", world.player), "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", world.player), "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", world.player), "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", world.player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), - "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) and power_level(state, world, 20), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) + and can_kill_werewolves(state, world), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) + and can_kill_werewolves(state, world), + "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) + and power_level(state, world, 20), "Roof NE: Stoney the Elder": lambda state: power_level(state, world, 20), "Roof SW: Drippy the Elder": lambda state: power_level(state, world, 20), "Roof SE: Toasty the Elder": lambda state: power_level(state, world, 20), @@ -742,31 +837,47 @@ def set_rules(multiworld, world): "Q: Beneath The Lake": lambda state: power_level(state, world, 10), "Q: A True Hero": lambda state: state.has("Fertilizer", world.player) and have_bombs(state, world), "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, world) and state.has("Silver", world.player), - "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) and power_level(state, world, 10), - "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) and state.has("Mushroom", world.player, 10), + "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) + and power_level(state, world, 10), + "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) + and state.has("Mushroom", world.player, 10), "Q: The Haunted Tower": lambda state: power_level(state, world, 10), "Q: The Last Gate": lambda state: state.has("Vampire Bust", world.player, 8), "Q: The Collection": lambda state: can_do_collection(state, world), - "Greed": lambda state: state.can_reach_region("Castle Vampy IV", world.player), - "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player), - "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player), + "Greed": lambda state: state.can_reach_region("Castle Vampy IV", world.player) + and power_level(state, world, 10), + "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) + and power_level(state, world, 10), + "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) + and power_level(state, world, 10), "Animal Control": lambda state: can_kill_werewolves(state, world), "Cleanin' Up": lambda state: have_many_bombs(state, world), - "Extreme Survivin'": lambda state: state.has("Terror Mode", world.player), - "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) and state.can_reach_region("Zombiton", world.player) and state.can_reach_region("Slurpy Swamp Mud", world.player) and can_kill_werewolves(state, world), + "Extreme Survivin'": lambda state: state.has("Terror Mode", world.player) and power_level(state, world, 30), + "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) + and state.can_reach_region("Zombiton", world.player) + and state.can_reach_region("Slurpy Swamp Mud", world.player) + and can_kill_werewolves(state, world), "Advanced Winnin'": lambda state: hundred_percent(state, world), - "Mad Skeelz": lambda state: state.has("Terror Mode", world.player), + "Mad Skeelz": lambda state: state.has("Terror Mode", world.player) and power_level(state, world, 30), "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", world.player), "R-R-R-Remix!": lambda state: hundred_percent(state, world) and state.has("Remix Access", world.player), - "Witchcraft": lambda state: state.has("Play As Witch", world.player) and have_all_weapons(state, world) and state.can_reach_region("Castle Vampy IV", world.player), - "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) and have_all_weapons(state, world) and state.has("Infinite Gems", world.player), + "Witchcraft": lambda state: state.has("Play As Witch", world.player) + and have_all_weapons(state, world) + and state.can_reach_region("Castle Vampy IV", world.player), + "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) + and have_all_weapons(state, world) + and state.has("Infinite Gems", world.player), "Stayin' Alive": lambda state: state.has("Infinite Survival", world.player), - "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) and state.can_reach_region("Castle Vampy IV", world.player), + "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) + and state.can_reach_region("Castle Vampy IV", world.player), "Brawlin'": lambda state: state.has("Touch Of Death", world.player), - "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) and state.has("Remix Access", world.player), + "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) + and state.has("Remix Access", world.player), "Digitally Masterin'": lambda state: have_39_badges(state, world), - "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) and can_cleanse_crypts(state, world), + "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) + and can_cleanse_crypts(state, world), "Farmer Reward": lambda state: can_cleanse_crypts(state, world), + "Witch Mushroom Reward": lambda state: state.has("Mushroom", world.player, 10), "Mayor Reward": lambda state: can_cleanse_crypts(state, world), "Bat Drop": lambda state: can_reach_bats(state, world), "Skeleton Drop": lambda state: can_reach_skeleton(state, world), @@ -780,13 +891,19 @@ def set_rules(multiworld, world): for loc in multiworld.get_locations(world.player): if loc.name in access_rules: add_rule(loc, access_rules[loc.name]) + + def set_entrance_rules(multiworld, world): loonyland_entrance_table: list[LLEntrance] = [ LLEntrance("Menu", "Halloween Hill", False), LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", world.player), flags=["MODE"]), LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", world.player), flags=["MODE"]), - LLEntrance("Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=["MODE"]), - LLEntrance("Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=["MODE"]), + LLEntrance( + "Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=["MODE"] + ), + LLEntrance( + "Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=["MODE"] + ), LLEntrance("Menu", "Remix", False, lambda state: state.has("Remix Access", world.player), flags=["MODE"]), LLEntrance("Halloween Hill", "A Cabin Trees", True), LLEntrance("Halloween Hill", "The Witch's Cabin", True), @@ -806,15 +923,21 @@ def set_entrance_rules(multiworld, world): LLEntrance("Zombiton", "A Messy Cabin", True), LLEntrance("Halloween Hill", "Rusty Crypt Entrance", True), LLEntrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", world.player, 4)), - LLEntrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player) + ), LLEntrance("Rocky Cliffs", "Abandoned Mines Entrance", True), LLEntrance("Rocky Cliffs", "The Shrine Of Bombulus", True), LLEntrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, world)), LLEntrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", world.player)), LLEntrance("Zombiton", "A Cabin Larry", True), LLEntrance("Halloween Hill", "The Wolf Den Entrance", True), - LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player)), - LLEntrance("Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world)), + LLEntrance( + "Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player) + ), + LLEntrance( + "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world) + ), LLEntrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), LLEntrance("Vampy Land", "Castle Vampy", True), LLEntrance("Halloween Hill", "Cabin In The Woods", True), @@ -854,30 +977,76 @@ def set_entrance_rules(multiworld, world): LLEntrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True), LLEntrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True), LLEntrance("Frankenjulie's Laboratory", "Halloween Hill", True), - LLEntrance("Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player) + ), LLEntrance("Haunted Tower", "Haunted Basement Entrance", False), LLEntrance("Haunted Tower", "Haunted Tower Stairs Up", False), - LLEntrance("Haunted Tower", "Haunted Tower Stairs Down", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player)), + LLEntrance( + "Haunted Tower", + "Haunted Tower Stairs Down", + False, + lambda state: state.has("Bat Key", world.player) + and state.has("Pumpkin Key", world.player) + and state.has("Skull Key", world.player), + ), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), - LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player)), - LLEntrance("Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player) and state.has("Ghost Potion", world.player)), - LLEntrance("Haunted Tower Stairs Down", "Haunted Basement Entrance", True, lambda state: have_light_source(state, world)), + LLEntrance( + "Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player) + ), + LLEntrance( + "Haunted Tower Stairs Down", + "Haunted Tower", + False, + lambda state: state.has("Bat Key", world.player) + and state.has("Pumpkin Key", world.player) + and state.has("Skull Key", world.player) + and state.has("Ghost Potion", world.player), + ), + LLEntrance( + "Haunted Tower Stairs Down", + "Haunted Basement Entrance", + True, + lambda state: have_light_source(state, world), + ), LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), - LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 2 Entrance", + "Haunted Tower Floor 2", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), - LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 2 Exit", + "Haunted Tower Floor 2", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), - LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 3 Entrance", + "Haunted Tower Floor 3", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), - LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 3 Exit", + "Haunted Tower Floor 3", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), LLEntrance("Haunted Tower Roof", "Halloween Hill", True), LLEntrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), LLEntrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), - LLEntrance("Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world) + ), LLEntrance("Haunted Basement", "Haunted Basement Entrance", False), LLEntrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, world)), LLEntrance("Abandoned Mines Entrance", "Rocky Cliffs", True), @@ -887,53 +1056,133 @@ def set_entrance_rules(multiworld, world): LLEntrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), LLEntrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), LLEntrance("Happy Stick Woods", "Halloween Hill", True), - LLEntrance("The Wolf Den Entrance", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), + LLEntrance( + "The Wolf Den Entrance", + "The Wolf Den", + False, + lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), + ), LLEntrance("The Wolf Den Entrance", "Halloween Hill", True), LLEntrance("The Wolf Den", "The Wolf Den Entrance", False), LLEntrance("The Wolf Den", "The Wolf Den Exit", False), LLEntrance("The Wolf Den Exit", "Larry's Lair", True), - LLEntrance("The Wolf Den Exit", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), + LLEntrance( + "The Wolf Den Exit", + "The Wolf Den", + False, + lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), + ), LLEntrance("A Cabin Larry", "Zombiton", True), - LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player)), - LLEntrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player) + ), + LLEntrance( + "Upper Creepy Caverns Left Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), - LLEntrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, lambda state: have_light_source(state, world)), - LLEntrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Upper Creepy Caverns Middle Warp", + "Creepy Caverns Left Top Warp", + True, + lambda state: have_light_source(state, world), + ), + LLEntrance( + "Upper Creepy Caverns Middle Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), - LLEntrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, lambda state: have_light_source(state, world)), - LLEntrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Upper Creepy Caverns Right Warp", + "Creepy Caverns Middle Top Warp", + True, + lambda state: have_light_source(state, world), + ), + LLEntrance( + "Upper Creepy Caverns Right Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), - LLEntrance("Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world)), - LLEntrance("Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world)), + LLEntrance( + "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world) + ), + LLEntrance( + "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world) + ), LLEntrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), - LLEntrance("Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Left Bottom Warp", + "Creepy Caverns Left", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), - LLEntrance("Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world) + ), LLEntrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), LLEntrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), - LLEntrance("Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Middle Top Warp", + "Creepy Caverns Middle", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), - LLEntrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20)), - LLEntrance("Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), - LLEntrance("Creepy Caverns Right Left Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20)), - LLEntrance("Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Middle Right Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20) + ), + LLEntrance( + "Creepy Caverns Middle Right Warp", + "Creepy Caverns Middle", + False, + lambda state: have_light_source(state, world), + ), + LLEntrance( + "Creepy Caverns Right Left Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20) + ), + LLEntrance( + "Creepy Caverns Right Left Warp", + "Creepy Caverns Right", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), - LLEntrance("Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Right Bottom Warp", + "Creepy Caverns Right", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), LLEntrance("Castle Vampy", "Halloween Hill", True), - LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player)), - LLEntrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player)), + LLEntrance( + "Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player) + ), + LLEntrance( + "Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player) + ), LLEntrance("Castle Vampy Skull Jail", "Castle Vampy II", True), LLEntrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy II", "Castle Vampy Skull Jail", True), - LLEntrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player)), - LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player)), + LLEntrance( + "Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player) + ), + LLEntrance( + "Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player) + ), LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy III", True), LLEntrance("Castle Vampy II NE", "Castle Vampy", True), LLEntrance("Castle Vampy II NE", "Castle Vampy III NE", True), @@ -945,8 +1194,18 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy II NW", "Castle Vampy III NW", True), LLEntrance("Cabin In The Woods", "Halloween Hill", True), LLEntrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), - LLEntrance("Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", world.player)), - LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", world.player)), + LLEntrance( + "Castle Vampy III", + "Castle Vampy III Pumpkin Jail", + False, + lambda state: state.has("Pumpkin Key", world.player), + ), + LLEntrance( + "Castle Vampy III Pumpkin Jail", + "Castle Vampy III", + False, + lambda state: state.has("Pumpkin Key", world.player), + ), LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), LLEntrance("Castle Vampy III NE", "Castle Vampy II NE", True), LLEntrance("Castle Vampy III NE", "Castle Vampy IV NE", True), @@ -957,7 +1216,12 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy III NW", "Castle Vampy II NW", True), LLEntrance("Castle Vampy III NW", "Castle Vampy IV NW", True), LLEntrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), - LLEntrance("Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", world.player, 8)), + LLEntrance( + "Castle Vampy IV", + "The Heart Of Terror Entrance", + True, + lambda state: state.has("Vampire Bust", world.player, 8), + ), LLEntrance("Castle Vampy IV NE", "Castle Vampy III NE", True), LLEntrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), LLEntrance("Castle Vampy IV SE", "Castle Vampy III SE", True), @@ -972,7 +1236,9 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), LLEntrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), LLEntrance("The Evilizer", "Halloween Hill", True), - LLEntrance("The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world)), + LLEntrance( + "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world) + ), LLEntrance("The Heart Of Terror", "The Evilizer", True), LLEntrance("The Heart Of Terror", "Empty Rooftop", True), LLEntrance("A Hidey-Hole", "Halloween Hill", True), @@ -982,20 +1248,47 @@ def set_entrance_rules(multiworld, world): LLEntrance("Larry's Lair", "Halloween Hill", True), LLEntrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), LLEntrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), + LLEntrance( + "Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) + ), LLEntrance("Zombiton", "Halloween Hill", False), LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), - LLEntrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), + LLEntrance( + "Halloween Hill", + "Rocky Cliffs", + False, + lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), + ), + LLEntrance( + "Rocky Cliffs", + "Halloween Hill", + False, + lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), + ), LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", world.player)), LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Underground Tunnel Zombie", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player)), + LLEntrance( + "Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Underground Tunnel Zombie", + "Underground Tunnel Mud", + False, + lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player), + ), LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player)), + LLEntrance( + "Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player) + ), ] for region in multiworld.get_regions(world.player): for entry in loonyland_entrance_table: diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index c5afed20e635..56bc1401e5d8 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -16,7 +16,8 @@ ) from .items import LLItemCat, LoonylandItem from .locations import LLLocCat, LoonylandLocation -from .options import LoonylandOptions +from .options import LoonylandOptions, WinCondition +from .rules import have_x_badges class LoonylandWebWorld(WebWorld): @@ -82,9 +83,9 @@ def create_items(self) -> None: new_item = self.create_item(name) item_pool.append(new_item) - junk_len = ( - len(self.multiworld.get_unfilled_locations(self.player)) - len(item_pool) - 1 - ) # - 1 for win con location + junk_len = len(self.multiworld.get_unfilled_locations(self.player)) - len(item_pool) + if self.options.win_condition == WinCondition.option_evilizer: + junk_len = junk_len - 1 item_pool += [self.create_junk() for _ in range(junk_len)] self.multiworld.itempool += item_pool @@ -107,12 +108,27 @@ def create_regions(self) -> None: new_loc.place_locked_item(self.create_event(loc_data.base_item)) new_loc.address = None region.locations.append(new_loc) + if loc_data.category == LLLocCat.BADGE: + new_loc_as_event = LoonylandLocation(self.player, loc_name + " Earned", None, region) + new_loc_as_event.place_locked_item(self.create_event("BadgeEarned")) + region.locations.append(new_loc_as_event) def set_rules(self): # Completion condition. # self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) - final_loc = self.get_location("Q: Save Halloween Hill") - final_loc.address = None + final_loc = None + if self.options.win_condition == WinCondition.option_evilizer: + final_loc = self.get_location("Q: Save Halloween Hill") + final_loc.address = None + elif self.options.win_condition == WinCondition.option_badges: + final_loc = LoonylandLocation( + self.player, str(self.options.badges_required.value) + " Badges Earned", None, self.get_region("Menu") + ) + final_loc.access_rule = lambda state: have_x_badges(state, self, self.options.badges_required.value) + self.get_region("Menu").locations.append(final_loc) + else: # no win con + final_loc = self.get_location("Swamp: Outside Luniton") + final_loc.place_locked_item(self.create_event("Victory")) self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) @@ -123,10 +139,13 @@ def set_rules(self): def fill_slot_data(self): return { + "WinCondition": self.options.win_condition.value, + "BadgesRequired": self.options.badges_required.value, "Difficulty": self.options.difficulty.value, "LongChecks": self.options.long_checks.value, "MultipleSaves": self.options.multisave.value, "Remix": self.options.remix.value, + "OverpoweredCheats": self.options.overpowered_cheats.value, "Badges": self.options.badges.value, "Dolls": self.options.dolls.value, "DeathLink": self.options.death_link.value, diff --git a/worlds/loonyland/items.py b/worlds/loonyland/items.py index 46ae2cfd0f0c..ee3f3885d0bd 100644 --- a/worlds/loonyland/items.py +++ b/worlds/loonyland/items.py @@ -3,7 +3,15 @@ from BaseClasses import Item, ItemClassification -from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, MultipleSaves, Remix +from worlds.loonyland.options import ( + Badges, + LongChecks, + LoonylandOptions, + MonsterDolls, + MultipleSaves, + OverpoweredCheats, + Remix, +) class LoonylandItem(Item): @@ -36,7 +44,7 @@ def can_create(self, options: LoonylandOptions) -> bool: self.category == LLItemCat.DOLL and options.dolls == MonsterDolls.option_vanilla ): return False - if "OP" in self.flags: + if options.overpowered_cheats == OverpoweredCheats.option_excluded and "OP" in self.flags: return False if options.remix == Remix.option_excluded and ("REMIX" in self.flags): return False @@ -53,12 +61,14 @@ def in_logic(self, options: LoonylandOptions) -> bool: def modified_classification(self, options: LoonylandOptions): if options.long_checks == LongChecks.option_included: - if self.category == LLItemCat.CHEAT: # 39 badges - return ItemClassification.progression + # if self.category == LLItemCat.CHEAT: # 39 badges + # return ItemClassification.progression if self.category == LLItemCat.ITEM: # 100% return ItemClassification.progression if self.category == LLItemCat.DOLL: # 100% return ItemClassification.progression + if "LONG" in self.flags: # items that are required for long checks + return ItemClassification.progression if options.badges == Badges.option_none: if self.category == LLItemCat.ACCESS: return ItemClassification.filler diff --git a/worlds/loonyland/locations.py b/worlds/loonyland/locations.py index 878c7e10fd8c..85cdca8d07ca 100644 --- a/worlds/loonyland/locations.py +++ b/worlds/loonyland/locations.py @@ -3,8 +3,16 @@ from BaseClasses import Location -from worlds.loonyland.options import Badges, LongChecks, LoonylandOptions, MonsterDolls, MultipleSaves, Remix, \ - WinCondition +from worlds.loonyland.options import ( + Badges, + LongChecks, + LoonylandOptions, + MonsterDolls, + MultipleSaves, + OverpoweredCheats, + Remix, + WinCondition, +) class LoonylandLocation(Location): @@ -43,6 +51,8 @@ def can_create(self, options: LoonylandOptions) -> bool: return False if options.win_condition == WinCondition.option_evilizer and ("POSTGAME" in self.flags): return False + if options.overpowered_cheats == OverpoweredCheats.option_excluded and "OP" in self.flags: + return False return True def in_logic(self, options: LoonylandOptions) -> bool: diff --git a/worlds/loonyland/options.py b/worlds/loonyland/options.py index 3972041e7837..d80d9a85b567 100644 --- a/worlds/loonyland/options.py +++ b/worlds/loonyland/options.py @@ -1,20 +1,29 @@ from dataclasses import dataclass -from Options import Choice, DeathLink, PerGameCommonOptions +from Options import Choice, DeathLink, PerGameCommonOptions, Range class WinCondition(Choice): """Evilizer: Beat the final boss - NOT IMPLEMENTED: 40 badges: get all 40 badge locs + Badges: Get X merit badges earned NOT IMPLEMENTED: normal_remix: Beat the final boss in normal and remix""" display_name = "Win Condition" option_evilizer = 0 - #option_40badges = 1 - #option_normal_remix = 2 + option_badges = 1 + # option_normal_remix = 2 default = 0 +class BadgesRequired(Range): + """For the Badges win con, how many badges are needed""" + + display_name = "Badges Required" + range_start = 1 + range_end = 40 + default = 30 + + class Difficulty(Choice): """Difficulty Setting""" @@ -57,6 +66,16 @@ class Remix(Choice): default = 0 +class OverpoweredCheats(Choice): + """Walk Through Walls, Infinite health, Touch of Death + Also disables Brawlin' as a location, since it requires Touch of Death""" + + display_name = "Overpowered Cheats" + option_excluded = 0 + option_included = 1 + default = 0 + + class Badges(Choice): """Full: All badges and their cheats are in logic Reasonable: Remove hard to get badges and overpowered cheats @@ -85,10 +104,12 @@ class MonsterDolls(Choice): @dataclass class LoonylandOptions(PerGameCommonOptions): win_condition: WinCondition + badges_required: BadgesRequired difficulty: Difficulty long_checks: LongChecks multisave: MultipleSaves remix: Remix + overpowered_cheats: OverpoweredCheats badges: Badges dolls: MonsterDolls death_link: DeathLink diff --git a/worlds/loonyland/rules.py b/worlds/loonyland/rules.py index 3c7f532522bd..1ac4a3651dfc 100644 --- a/worlds/loonyland/rules.py +++ b/worlds/loonyland/rules.py @@ -80,8 +80,12 @@ def hundred_percent(state: CollectionState, world: "LoonylandWorld") -> bool: return state.has_group("physical_items", world.player, 105) +def have_x_badges(state: CollectionState, world: "LoonylandWorld", count: int) -> bool: + return state.has("BadgeEarned", world.player, count) + + def have_39_badges(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.has_group("cheats", world.player, 39) + return state.has("BadgeEarned", world.player, 39) def have_all_weapons(state: CollectionState, world: "LoonylandWorld") -> bool: From 3e055630d4257252963a5fb3efc6ede8a3776a8d Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sat, 28 Dec 2024 16:22:28 -0500 Subject: [PATCH 44/58] data updates --- worlds/loonyland/Data/game_data.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index 214dd7b57ff6..c11bdfbaefc3 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -733,7 +733,9 @@ 135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death" ), "Huntin'": LLLocation(136, LLLocCat.BADGE, 22, "Halloween Hill", base_item="All Access Pass"), - "Advanced Winnin'": LLLocation(137, LLLocCat.BADGE, 23, "Menu", flags=["LONG"], base_item="Terror Mode"), + "Advanced Winnin'": LLLocation( + 137, LLLocCat.BADGE, 23, "Menu", flags=["LONG", "POSTGAME"], base_item="Terror Mode" + ), "Survivin'": LLLocation(138, LLLocCat.BADGE, 24, "Survival", base_item="Save Anywhere"), "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, 25, "Larry's Lair", base_item="Guided Shots"), "Mad Skeelz": LLLocation( @@ -747,7 +749,9 @@ "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, 27, "Frankenjulie's Laboratory", base_item="Slo-Mo"), "Combo Magic": LLLocation(142, LLLocCat.BADGE, 28, "Survival", base_item="Infinite Survival"), "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, 29, "Slurpy Swamp Mud", base_item="Frog-o-rama"), - "R-R-R-Remix!": LLLocation(144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG"], base_item="Play As Summony"), + "R-R-R-Remix!": LLLocation( + 144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG", "POSTGAME"], base_item="Play As Summony" + ), "Witchcraft": LLLocation( 145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl" ), @@ -870,6 +874,7 @@ def set_rules(multiworld, world): "Stayin' Alive": lambda state: state.has("Infinite Survival", world.player), "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) and state.can_reach_region("Castle Vampy IV", world.player), + "Scorin'": lambda state: state.has("Boss Bash Access", world.player) and power_level(state, world, 30), "Brawlin'": lambda state: state.has("Touch Of Death", world.player), "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) and state.has("Remix Access", world.player), From 2a08f5f7fd207c493d7a9502b525bc639d2659f0 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Mon, 30 Dec 2024 20:37:49 -0500 Subject: [PATCH 45/58] logic updates for long tag on two badges and ghost potion in haunted tower --- worlds/loonyland/Data/game_data.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index c11bdfbaefc3..1b054bf596f7 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -710,8 +710,8 @@ "Bowlin'": LLLocation(115, LLLocCat.BADGE, 1, "Bowling", base_item="Disco Mode"), "Vandalizin'": LLLocation(116, LLLocCat.BADGE, 2, "Zombiton", base_item="Vintage Mode"), "Greed": LLLocation(117, LLLocCat.BADGE, 3, "Menu", flags=["LONG"], base_item="Infinite Gems"), - "Monster Slayin'": LLLocation(118, LLLocCat.BADGE, 4, "Menu", base_item="Sidekick"), - "Monster Poundin'": LLLocation(119, LLLocCat.BADGE, 5, "Menu", flags=["LONG"], base_item="Hardcore Mode"), + "Monster Slayin'": LLLocation(118, LLLocCat.BADGE, 4, "Menu", flags=["LONG"], base_item="Sidekick"), + "Monster Poundin'": LLLocation(119, LLLocCat.BADGE, 5, "Menu", base_item="Hardcore Mode"), "Ghostbustin'": LLLocation(120, LLLocCat.BADGE, 6, "Haunted Tower Roof", base_item="Homing Shots"), "Lookin'": LLLocation(121, LLLocCat.BADGE, 7, "The Witch's Cabin", base_item="20/20 Vision"), "Ultimate Victory": LLLocation( @@ -982,9 +982,7 @@ def set_entrance_rules(multiworld, world): LLEntrance("Deeper Under The Lake", "Frankenjulie's Laboratory", True), LLEntrance("Frankenjulie's Laboratory", "Deeper Under The Lake", True), LLEntrance("Frankenjulie's Laboratory", "Halloween Hill", True), - LLEntrance( - "Haunted Tower Entrance", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player) - ), + LLEntrance("Haunted Tower Entrance", "Haunted Tower", False), LLEntrance("Haunted Tower", "Haunted Basement Entrance", False), LLEntrance("Haunted Tower", "Haunted Tower Stairs Up", False), LLEntrance( @@ -996,17 +994,14 @@ def set_entrance_rules(multiworld, world): and state.has("Skull Key", world.player), ), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), - LLEntrance( - "Haunted Tower Stairs Up", "Haunted Tower", False, lambda state: state.has("Ghost Potion", world.player) - ), + LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False), LLEntrance( "Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) - and state.has("Skull Key", world.player) - and state.has("Ghost Potion", world.player), + and state.has("Skull Key", world.player), ), LLEntrance( "Haunted Tower Stairs Down", From c0e05d746cc3dec7f306e94c80cb91ae80bb54e9 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Wed, 1 Jan 2025 10:46:14 -0500 Subject: [PATCH 46/58] logic updates testing --- worlds/loonyland/Data/game_data.py | 494 ++++++-------------------- worlds/loonyland/entrances.py | 4 +- worlds/loonyland/regions.py | 4 +- worlds/loonyland/test/__init__.py | 9 + worlds/loonyland/test/test_options.py | 92 +++++ 5 files changed, 211 insertions(+), 392 deletions(-) create mode 100644 worlds/loonyland/test/__init__.py create mode 100644 worlds/loonyland/test/test_options.py diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index 1b054bf596f7..7d6b9ab23037 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -360,9 +360,7 @@ "Cat": LLItem(ll_base_id + VAR_CAT, LLItemCat.ITEM, ItemClassification.progression), "Big Gem": LLItem(ll_base_id + VAR_GEM, LLItemCat.ITEM, ItemClassification.progression, 6), "100 Gems": LLItem(ll_base_id + VAR_ZOMBIEGEM, LLItemCat.ITEM, ItemClassification.filler), - "Triple Fire Gem": LLItem( - ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"] - ), + "Triple Fire Gem": LLItem(ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"]), "Happy Stick": LLItem(ll_base_id + VAR_TALISMAN, LLItemCat.ITEM, ItemClassification.progression), "Bat Statue": LLItem(ll_base_id + VAR_BATSTATUE, LLItemCat.ITEM, ItemClassification.progression, 4), "Lantern": LLItem(ll_base_id + VAR_LANTERN, LLItemCat.ITEM, ItemClassification.progression), @@ -372,106 +370,47 @@ "Disco Mode": LLItem(ll_base_id + CH_DISCO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Terror Mode": LLItem(ll_base_id + CH_TERROR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Quick Mode": LLItem( - ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] - ), - "Infinite Gems": LLItem( - ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["LONG"] - ), + "Quick Mode": LLItem(ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), + "Infinite Gems": LLItem(ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["LONG"]), "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Homing Shots": LLItem( - ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] - ), - "Ultimate Firepower": LLItem( - ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] - ), + "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), + "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Play As Bonkula": LLItem( - ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] - ), - "Play As Toad": LLItem( - ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] - ), + "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), + "Play As Toad": LLItem(ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Radar": LLItem(ll_base_id + CH_RADAR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Heavy Hitter": LLItem( - ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] - ), - "Rapid Fire": LLItem( - ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"] - ), - "Touch Of Death": LLItem( - ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"] - ), - "All Access Pass": LLItem( - ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] - ), - "Play As Swampdog": LLItem( - ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"] - ), - "Hardcore Mode": LLItem( - ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] - ), + "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), + "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"]), + "Touch Of Death": LLItem(ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"]), + "All Access Pass": LLItem(ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), + "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"]), + "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Guided Shots": LLItem( - ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] - ), - "Slo-Mo": LLItem( - ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] - ), - "Combo-Bombo": LLItem( - ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] - ), + "Guided Shots": LLItem(ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), + "Slo-Mo": LLItem(ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), + "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Play As Witch": LLItem( - ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"] - ), - "Play As Werewolf": LLItem( - ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] - ), + "Play As Witch": LLItem(ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"]), + "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Infinite Survival": LLItem( - ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), - "Play As Summony": LLItem( - ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] - ), - "Play As Ninja Girl": LLItem( - ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] - ), - "Molecular Dispersion": LLItem( - ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"] - ), - "Guaranteed Survival": LLItem( - ll_base_id + CH_SUPERSURV + AP_BADGEMOD, - LLItemCat.CHEAT, - ItemClassification.progression, - flags=["PWR_MAX", "OP"], - ), + "Infinite Survival": LLItem(ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Play As Summony": LLItem(ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), + "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), + "Molecular Dispersion": LLItem(ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"]), + "Guaranteed Survival": LLItem(ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"]), "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Stinky Farley": LLItem(ll_base_id + CH_STINKY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Ultra Weapons Are Go!": LLItem( - ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Ultra Weapons Are Go!": LLItem(ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Thorns Aura": LLItem(ll_base_id + CH_THORNS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Monster Regeneration": LLItem( - ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression - ), + "Monster Regeneration": LLItem(ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Bowling Access": LLItem(ll_base_id + MODE_BOWLING + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Survival Access": LLItem( - ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Boss Bash Access": LLItem( - ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Loony Ball Access": LLItem( - ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression - ), - "Remix Access": LLItem( - ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"] - ), + "Survival Access": LLItem(ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Boss Bash Access": LLItem(ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Loony Ball Access": LLItem(ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), + "Remix Access": LLItem(ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"]), "Bat Doll": LLItem(ll_base_id + VAR_BATDOLL, LLItemCat.DOLL, ItemClassification.progression), "Skeleton Doll": LLItem(ll_base_id + VAR_SKELDOLL, LLItemCat.DOLL, ItemClassification.progression), "Frog Doll": LLItem(ll_base_id + VAR_FROGDOLL, LLItemCat.DOLL, ItemClassification.progression), @@ -589,7 +528,7 @@ "Survival": LLRegion(False, flags=["MODE"]), "Boss Bash": LLRegion(False, flags=["MODE"]), "Loony Ball": LLRegion(False, flags=["MODE"]), - "Remix": LLRegion(False, flags=["MODE"]), + "Remix": LLRegion(False, flags=["MODE", "REMIX"]), } loonyland_location_table: dict[str, LLLocation] = { "Swamp: Mud Path": LLLocation(0, LLLocCat.PICKUP, 0, "Slurpy Swamp Mud"), @@ -714,9 +653,7 @@ "Monster Poundin'": LLLocation(119, LLLocCat.BADGE, 5, "Menu", base_item="Hardcore Mode"), "Ghostbustin'": LLLocation(120, LLLocCat.BADGE, 6, "Haunted Tower Roof", base_item="Homing Shots"), "Lookin'": LLLocation(121, LLLocCat.BADGE, 7, "The Witch's Cabin", base_item="20/20 Vision"), - "Ultimate Victory": LLLocation( - 122, LLLocCat.BADGE, 8, "The Evilizer", flags=["POSTGAME"], base_item="Ultimate Firepower" - ), + "Ultimate Victory": LLLocation(122, LLLocCat.BADGE, 8, "The Evilizer", flags=["POSTGAME"], base_item="Ultimate Firepower"), "Kickin'": LLLocation(123, LLLocCat.BADGE, 9, "Loony Ball", base_item="Surprise Mode"), "Boss Bashin'": LLLocation(124, LLLocCat.BADGE, 10, "Boss Bash", base_item="Combo-Bombo"), "Vampire Slayin'": LLLocation(125, LLLocCat.BADGE, 11, "The Heart Of Terror", base_item="Play As Bonkula"), @@ -729,53 +666,25 @@ "Combo Plate": LLLocation(132, LLLocCat.BADGE, 18, "Menu", base_item="Radar"), "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, 19, "Rocky Cliffs", base_item="Heavy Hitter"), "Findin'": LLLocation(134, LLLocCat.BADGE, 20, "The Wolf Den", base_item="Rapid Fire"), - "Extreme Survivin'": LLLocation( - 135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death" - ), + "Extreme Survivin'": LLLocation(135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death"), "Huntin'": LLLocation(136, LLLocCat.BADGE, 22, "Halloween Hill", base_item="All Access Pass"), - "Advanced Winnin'": LLLocation( - 137, LLLocCat.BADGE, 23, "Menu", flags=["LONG", "POSTGAME"], base_item="Terror Mode" - ), + "Advanced Winnin'": LLLocation(137, LLLocCat.BADGE, 23, "Menu", flags=["LONG", "POSTGAME"], base_item="Terror Mode"), "Survivin'": LLLocation(138, LLLocCat.BADGE, 24, "Survival", base_item="Save Anywhere"), "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, 25, "Larry's Lair", base_item="Guided Shots"), - "Mad Skeelz": LLLocation( - 140, - LLLocCat.BADGE, - 26, - "The Evilizer", - flags=["LONG_VANILLA_BADGES", "MULTISAVE", "POSTGAME"], - base_item="Kick The Cat!", - ), + "Mad Skeelz": LLLocation(140, LLLocCat.BADGE, 26, "The Evilizer", flags=["LONG_VANILLA_BADGES", "MULTISAVE", "POSTGAME"], base_item="Kick The Cat!"), "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, 27, "Frankenjulie's Laboratory", base_item="Slo-Mo"), "Combo Magic": LLLocation(142, LLLocCat.BADGE, 28, "Survival", base_item="Infinite Survival"), "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, 29, "Slurpy Swamp Mud", base_item="Frog-o-rama"), - "R-R-R-Remix!": LLLocation( - 144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG", "POSTGAME"], base_item="Play As Summony" - ), - "Witchcraft": LLLocation( - 145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl" - ), - "Ninjitsu": LLLocation( - 146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Molecular Dispersion" - ), + "R-R-R-Remix!": LLLocation(144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG", "POSTGAME"], base_item="Play As Summony"), + "Witchcraft": LLLocation(145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl"), + "Ninjitsu": LLLocation(146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Molecular Dispersion"), "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, 33, "Survival", flags=["LONG"], base_item="Guaranteed Survival"), "Hooliganin'": LLLocation(148, LLLocCat.BADGE, 34, "Loony Ball", base_item="Bend It Like Bouapha"), "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, 35, "Menu", flags=["LONG", "MULTISAVE"], base_item="Stinky Farley"), "Scorin'": LLLocation(150, LLLocCat.BADGE, 36, "The Evilizer", flags=["LONG"], base_item="Ultra Weapons Are Go!"), - "Brawlin'": LLLocation( - 151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES", "OP"], base_item="Thorns Aura" - ), - "Minin' For Treasure": LLLocation( - 152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration" - ), - "Digitally Masterin'": LLLocation( - 153, - LLLocCat.BADGE, - 39, - "Menu", - flags=["LONG", "REMIX", "MULTISAVE", "POSTGAME", "LONG_VANILLA_BADGES"], - base_item="Farley Free Zone", - ), + "Brawlin'": LLLocation(151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES", "OP"], base_item="Thorns Aura"), + "Minin' For Treasure": LLLocation(152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration"), + "Digitally Masterin'": LLLocation(153, LLLocCat.BADGE, 39, "Menu", flags=["LONG", "REMIX", "MULTISAVE", "POSTGAME", "LONG_VANILLA_BADGES"], base_item="Farley Free Zone"), "Tree Trimming Reward": LLLocation(154, LLLocCat.REWARD, VAR_TREEREWARD, "A Cabin Trees"), "Larry's Wife Reward": LLLocation(155, LLLocCat.REWARD, VAR_LARRYREWARD, "A Cabin Larry"), "Farmer Reward": LLLocation(156, LLLocCat.REWARD, VAR_CROPSREWARD, "Halloween Hill"), @@ -810,21 +719,16 @@ def set_rules(multiworld, world): "Frankenjulie's Reward": lambda state: power_level(state, world, 10), "Tower: Barracks": lambda state: state.has("Bat Key", world.player), "PolterGuy's Reward": lambda state: power_level(state, world, 10), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) - and state.has("Skull Key", world.player) - and state.has("Pumpkin Key", world.player), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) and state.has("Skull Key", world.player) and state.has("Pumpkin Key", world.player), "Happy Stick: Reward": lambda state: power_level(state, world, 40), "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), "Wolf Den: Vine": lambda state: state.has("Fertilizer", world.player), "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", world.player), "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", world.player), "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", world.player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) - and can_kill_werewolves(state, world), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) - and can_kill_werewolves(state, world), - "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) - and power_level(state, world, 20), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), + "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) and power_level(state, world, 20), "Roof NE: Stoney the Elder": lambda state: power_level(state, world, 20), "Roof SW: Drippy the Elder": lambda state: power_level(state, world, 20), "Roof SE: Toasty the Elder": lambda state: power_level(state, world, 20), @@ -841,46 +745,31 @@ def set_rules(multiworld, world): "Q: Beneath The Lake": lambda state: power_level(state, world, 10), "Q: A True Hero": lambda state: state.has("Fertilizer", world.player) and have_bombs(state, world), "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, world) and state.has("Silver", world.player), - "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) - and power_level(state, world, 10), - "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) - and state.has("Mushroom", world.player, 10), + "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) and power_level(state, world, 10), + "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) and state.has("Mushroom", world.player, 10), "Q: The Haunted Tower": lambda state: power_level(state, world, 10), "Q: The Last Gate": lambda state: state.has("Vampire Bust", world.player, 8), "Q: The Collection": lambda state: can_do_collection(state, world), - "Greed": lambda state: state.can_reach_region("Castle Vampy IV", world.player) - and power_level(state, world, 10), - "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) - and power_level(state, world, 10), - "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) - and power_level(state, world, 10), + "Greed": lambda state: state.can_reach_region("Castle Vampy IV", world.player) and power_level(state, world, 10), + "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) and power_level(state, world, 10), + "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) and power_level(state, world, 10), "Animal Control": lambda state: can_kill_werewolves(state, world), "Cleanin' Up": lambda state: have_many_bombs(state, world), "Extreme Survivin'": lambda state: state.has("Terror Mode", world.player) and power_level(state, world, 30), - "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) - and state.can_reach_region("Zombiton", world.player) - and state.can_reach_region("Slurpy Swamp Mud", world.player) - and can_kill_werewolves(state, world), + "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) and state.can_reach_region("Zombiton", world.player) and state.can_reach_region("Slurpy Swamp Mud", world.player) and can_kill_werewolves(state, world), "Advanced Winnin'": lambda state: hundred_percent(state, world), "Mad Skeelz": lambda state: state.has("Terror Mode", world.player) and power_level(state, world, 30), "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", world.player), "R-R-R-Remix!": lambda state: hundred_percent(state, world) and state.has("Remix Access", world.player), - "Witchcraft": lambda state: state.has("Play As Witch", world.player) - and have_all_weapons(state, world) - and state.can_reach_region("Castle Vampy IV", world.player), - "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) - and have_all_weapons(state, world) - and state.has("Infinite Gems", world.player), + "Witchcraft": lambda state: state.has("Play As Witch", world.player) and have_all_weapons(state, world) and state.can_reach_region("Castle Vampy IV", world.player), + "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) and have_all_weapons(state, world) and state.has("Infinite Gems", world.player), "Stayin' Alive": lambda state: state.has("Infinite Survival", world.player), - "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) - and state.can_reach_region("Castle Vampy IV", world.player), + "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) and state.can_reach_region("Castle Vampy IV", world.player), "Scorin'": lambda state: state.has("Boss Bash Access", world.player) and power_level(state, world, 30), "Brawlin'": lambda state: state.has("Touch Of Death", world.player), - "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) - and state.has("Remix Access", world.player), + "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) and state.has("Remix Access", world.player), "Digitally Masterin'": lambda state: have_39_badges(state, world), - "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) - and can_cleanse_crypts(state, world), + "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) and can_cleanse_crypts(state, world), "Farmer Reward": lambda state: can_cleanse_crypts(state, world), "Witch Mushroom Reward": lambda state: state.has("Mushroom", world.player, 10), "Mayor Reward": lambda state: can_cleanse_crypts(state, world), @@ -903,13 +792,9 @@ def set_entrance_rules(multiworld, world): LLEntrance("Menu", "Halloween Hill", False), LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", world.player), flags=["MODE"]), LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", world.player), flags=["MODE"]), - LLEntrance( - "Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=["MODE"] - ), - LLEntrance( - "Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=["MODE"] - ), - LLEntrance("Menu", "Remix", False, lambda state: state.has("Remix Access", world.player), flags=["MODE"]), + LLEntrance("Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=["MODE"]), + LLEntrance("Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=["MODE"]), + LLEntrance("Menu", "Remix", False, lambda state: state.has("Remix Access", world.player), flags=["MODE", "REMIX"]), LLEntrance("Halloween Hill", "A Cabin Trees", True), LLEntrance("Halloween Hill", "The Witch's Cabin", True), LLEntrance("Halloween Hill", "Bonita's Cabin", True), @@ -928,21 +813,15 @@ def set_entrance_rules(multiworld, world): LLEntrance("Zombiton", "A Messy Cabin", True), LLEntrance("Halloween Hill", "Rusty Crypt Entrance", True), LLEntrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", world.player, 4)), - LLEntrance( - "Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player) - ), + LLEntrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Rocky Cliffs", "Abandoned Mines Entrance", True), LLEntrance("Rocky Cliffs", "The Shrine Of Bombulus", True), LLEntrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, world)), LLEntrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", world.player)), LLEntrance("Zombiton", "A Cabin Larry", True), LLEntrance("Halloween Hill", "The Wolf Den Entrance", True), - LLEntrance( - "Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player) - ), - LLEntrance( - "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world) - ), + LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player)), + LLEntrance("Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world)), LLEntrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), LLEntrance("Vampy Land", "Castle Vampy", True), LLEntrance("Halloween Hill", "Cabin In The Woods", True), @@ -985,68 +864,27 @@ def set_entrance_rules(multiworld, world): LLEntrance("Haunted Tower Entrance", "Haunted Tower", False), LLEntrance("Haunted Tower", "Haunted Basement Entrance", False), LLEntrance("Haunted Tower", "Haunted Tower Stairs Up", False), - LLEntrance( - "Haunted Tower", - "Haunted Tower Stairs Down", - False, - lambda state: state.has("Bat Key", world.player) - and state.has("Pumpkin Key", world.player) - and state.has("Skull Key", world.player), - ), + LLEntrance("Haunted Tower", "Haunted Tower Stairs Down", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player)), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False), - LLEntrance( - "Haunted Tower Stairs Down", - "Haunted Tower", - False, - lambda state: state.has("Bat Key", world.player) - and state.has("Pumpkin Key", world.player) - and state.has("Skull Key", world.player), - ), - LLEntrance( - "Haunted Tower Stairs Down", - "Haunted Basement Entrance", - True, - lambda state: have_light_source(state, world), - ), + LLEntrance("Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player)), + LLEntrance("Haunted Tower Stairs Down", "Haunted Basement Entrance", True, lambda state: have_light_source(state, world)), LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), - LLEntrance( - "Haunted Tower Floor 2 Entrance", - "Haunted Tower Floor 2", - False, - lambda state: state.has("Ghost Potion", world.player), - ), + LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), - LLEntrance( - "Haunted Tower Floor 2 Exit", - "Haunted Tower Floor 2", - False, - lambda state: state.has("Ghost Potion", world.player), - ), + LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), - LLEntrance( - "Haunted Tower Floor 3 Entrance", - "Haunted Tower Floor 3", - False, - lambda state: state.has("Ghost Potion", world.player), - ), + LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), - LLEntrance( - "Haunted Tower Floor 3 Exit", - "Haunted Tower Floor 3", - False, - lambda state: state.has("Ghost Potion", world.player), - ), + LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), LLEntrance("Haunted Tower Roof", "Halloween Hill", True), LLEntrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), LLEntrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), - LLEntrance( - "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world) - ), + LLEntrance("Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world)), LLEntrance("Haunted Basement", "Haunted Basement Entrance", False), LLEntrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, world)), LLEntrance("Abandoned Mines Entrance", "Rocky Cliffs", True), @@ -1056,133 +894,53 @@ def set_entrance_rules(multiworld, world): LLEntrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), LLEntrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), LLEntrance("Happy Stick Woods", "Halloween Hill", True), - LLEntrance( - "The Wolf Den Entrance", - "The Wolf Den", - False, - lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), - ), + LLEntrance("The Wolf Den Entrance", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), LLEntrance("The Wolf Den Entrance", "Halloween Hill", True), LLEntrance("The Wolf Den", "The Wolf Den Entrance", False), LLEntrance("The Wolf Den", "The Wolf Den Exit", False), LLEntrance("The Wolf Den Exit", "Larry's Lair", True), - LLEntrance( - "The Wolf Den Exit", - "The Wolf Den", - False, - lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), - ), + LLEntrance("The Wolf Den Exit", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), LLEntrance("A Cabin Larry", "Zombiton", True), - LLEntrance( - "Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player) - ), - LLEntrance( - "Upper Creepy Caverns Left Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player)), + LLEntrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), - LLEntrance( - "Upper Creepy Caverns Middle Warp", - "Creepy Caverns Left Top Warp", - True, - lambda state: have_light_source(state, world), - ), - LLEntrance( - "Upper Creepy Caverns Middle Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, lambda state: have_light_source(state, world)), + LLEntrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), - LLEntrance( - "Upper Creepy Caverns Right Warp", - "Creepy Caverns Middle Top Warp", - True, - lambda state: have_light_source(state, world), - ), - LLEntrance( - "Upper Creepy Caverns Right Warp", - "Upper Creepy Caverns", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, lambda state: have_light_source(state, world)), + LLEntrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), - LLEntrance( - "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world) - ), - LLEntrance( - "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world) - ), + LLEntrance("Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world)), + LLEntrance("Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), - LLEntrance( - "Creepy Caverns Left Bottom Warp", - "Creepy Caverns Left", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), - LLEntrance( - "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world) - ), + LLEntrance("Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), LLEntrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), - LLEntrance( - "Creepy Caverns Middle Top Warp", - "Creepy Caverns Middle", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), - LLEntrance( - "Creepy Caverns Middle Right Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20) - ), - LLEntrance( - "Creepy Caverns Middle Right Warp", - "Creepy Caverns Middle", - False, - lambda state: have_light_source(state, world), - ), - LLEntrance( - "Creepy Caverns Right Left Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20) - ), - LLEntrance( - "Creepy Caverns Right Left Warp", - "Creepy Caverns Right", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20)), + LLEntrance("Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), + LLEntrance("Creepy Caverns Right Left Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20)), + LLEntrance("Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), - LLEntrance( - "Creepy Caverns Right Bottom Warp", - "Creepy Caverns Right", - False, - lambda state: have_light_source(state, world), - ), + LLEntrance("Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), LLEntrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), LLEntrance("Castle Vampy", "Halloween Hill", True), - LLEntrance( - "Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player) - ), - LLEntrance( - "Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player) - ), + LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player)), + LLEntrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player)), LLEntrance("Castle Vampy Skull Jail", "Castle Vampy II", True), LLEntrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy II", "Castle Vampy Skull Jail", True), - LLEntrance( - "Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player) - ), - LLEntrance( - "Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player) - ), + LLEntrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player)), + LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player)), LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy III", True), LLEntrance("Castle Vampy II NE", "Castle Vampy", True), LLEntrance("Castle Vampy II NE", "Castle Vampy III NE", True), @@ -1194,18 +952,8 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy II NW", "Castle Vampy III NW", True), LLEntrance("Cabin In The Woods", "Halloween Hill", True), LLEntrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), - LLEntrance( - "Castle Vampy III", - "Castle Vampy III Pumpkin Jail", - False, - lambda state: state.has("Pumpkin Key", world.player), - ), - LLEntrance( - "Castle Vampy III Pumpkin Jail", - "Castle Vampy III", - False, - lambda state: state.has("Pumpkin Key", world.player), - ), + LLEntrance("Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", world.player)), + LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", world.player)), LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), LLEntrance("Castle Vampy III NE", "Castle Vampy II NE", True), LLEntrance("Castle Vampy III NE", "Castle Vampy IV NE", True), @@ -1216,12 +964,7 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy III NW", "Castle Vampy II NW", True), LLEntrance("Castle Vampy III NW", "Castle Vampy IV NW", True), LLEntrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), - LLEntrance( - "Castle Vampy IV", - "The Heart Of Terror Entrance", - True, - lambda state: state.has("Vampire Bust", world.player, 8), - ), + LLEntrance("Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", world.player, 8)), LLEntrance("Castle Vampy IV NE", "Castle Vampy III NE", True), LLEntrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), LLEntrance("Castle Vampy IV SE", "Castle Vampy III SE", True), @@ -1236,9 +979,7 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), LLEntrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), LLEntrance("The Evilizer", "Halloween Hill", True), - LLEntrance( - "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world) - ), + LLEntrance("The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world)), LLEntrance("The Heart Of Terror", "The Evilizer", True), LLEntrance("The Heart Of Terror", "Empty Rooftop", True), LLEntrance("A Hidey-Hole", "Halloween Hill", True), @@ -1248,47 +989,20 @@ def set_entrance_rules(multiworld, world): LLEntrance("Larry's Lair", "Halloween Hill", True), LLEntrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), LLEntrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", world.player)), - LLEntrance( - "Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) - ), - LLEntrance( - "Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) - ), + LLEntrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), LLEntrance("Zombiton", "Halloween Hill", False), LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance( - "Halloween Hill", - "Rocky Cliffs", - False, - lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), - ), - LLEntrance( - "Rocky Cliffs", - "Halloween Hill", - False, - lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), - ), + LLEntrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), + LLEntrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", world.player)), LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance( - "Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) - ), - LLEntrance( - "Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player) - ), - LLEntrance( - "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player) - ), - LLEntrance( - "Underground Tunnel Zombie", - "Underground Tunnel Mud", - False, - lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player), - ), + LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Underground Tunnel Zombie", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player)), LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", world.player)), - LLEntrance( - "Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player) - ), + LLEntrance("Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player)), ] for region in multiworld.get_regions(world.player): for entry in loonyland_entrance_table: diff --git a/worlds/loonyland/entrances.py b/worlds/loonyland/entrances.py index ae8282fe8310..9983022efa7a 100644 --- a/worlds/loonyland/entrances.py +++ b/worlds/loonyland/entrances.py @@ -3,7 +3,7 @@ from BaseClasses import Entrance from worlds.generic.Rules import CollectionRule -from worlds.loonyland.options import Badges, LoonylandOptions +from worlds.loonyland.options import Badges, LoonylandOptions, Remix class LoonylandEntrance(Entrance): @@ -21,4 +21,6 @@ class LLEntrance(NamedTuple): def can_create(self, options: LoonylandOptions) -> bool: if options.badges == Badges.option_none and "MODE" in self.flags: return False + if options.remix == Remix.option_excluded and "REMIX" in self.flags: + return False return True diff --git a/worlds/loonyland/regions.py b/worlds/loonyland/regions.py index f7f751f4221e..86688beffafc 100644 --- a/worlds/loonyland/regions.py +++ b/worlds/loonyland/regions.py @@ -2,7 +2,7 @@ from BaseClasses import Region -from worlds.loonyland.options import Badges, LoonylandOptions +from worlds.loonyland.options import Badges, LoonylandOptions, Remix class LoonylandRegion(Region): @@ -17,4 +17,6 @@ class LLRegion(NamedTuple): def can_create(self, options: LoonylandOptions) -> bool: if options.badges == Badges.option_none and "MODE" in self.flags: return False + if options.remix == Remix.option_excluded and "REMIX" in self.flags: + return False return True diff --git a/worlds/loonyland/test/__init__.py b/worlds/loonyland/test/__init__.py new file mode 100644 index 000000000000..efc63c6f3d51 --- /dev/null +++ b/worlds/loonyland/test/__init__.py @@ -0,0 +1,9 @@ + +from BaseClasses import Item +from test.bases import WorldTestBase +from worlds.loonyland import LoonylandWorld + + +class LoonylandTestBase(WorldTestBase): + game = "Loonyland" + world: LoonylandWorld \ No newline at end of file diff --git a/worlds/loonyland/test/test_options.py b/worlds/loonyland/test/test_options.py new file mode 100644 index 000000000000..c985188b8cf8 --- /dev/null +++ b/worlds/loonyland/test/test_options.py @@ -0,0 +1,92 @@ +from . import LoonylandTestBase +from ..options import * + + +class TestMinimalOptions(LoonylandTestBase): + options = { + "win_condition": WinCondition.option_evilizer, + "badges_required": 1, + "difficulty": Difficulty.option_beginner, + "long_checks": LongChecks.option_excluded, + "multisave": MultipleSaves.option_disabled, + "remix": Remix.option_excluded, + "overpowered_cheats": OverpoweredCheats.option_excluded, + "badges": Badges.option_none, + "dolls": MonsterDolls.option_none, + "death_link": DeathLink.option_false, + } + + def test_minimal_options(self) -> None: + #self.assertBeatable(True) + self.test_all_state_can_reach_everything() + +class TestMinimalOptionsBadges(LoonylandTestBase): + options = { + "win_condition": WinCondition.option_badges, + "badges_required": 26, + "difficulty": Difficulty.option_beginner, + "long_checks": LongChecks.option_excluded, + "multisave": MultipleSaves.option_disabled, + "remix": Remix.option_excluded, + "overpowered_cheats": OverpoweredCheats.option_excluded, + "badges": Badges.option_vanilla, + "dolls": MonsterDolls.option_none, + "death_link": DeathLink.option_false, + } + + def test_minimal_options(self) -> None: + self.test_all_state_can_reach_everything() + + +class TestVanillaOptions(LoonylandTestBase): + options = { + "win_condition": WinCondition.option_evilizer, + "badges_required": 1, + "difficulty": Difficulty.option_beginner, + "long_checks": LongChecks.option_excluded, + "multisave": MultipleSaves.option_enabled, + "remix": Remix.option_included, + "overpowered_cheats": OverpoweredCheats.option_included, + "badges": Badges.option_vanilla, + "dolls": MonsterDolls.option_vanilla, + "death_link": DeathLink.option_false, + } + + def test_vanilla_options(self) -> None: + self.test_all_state_can_reach_everything() + +class TestFullOptionsEvil(LoonylandTestBase): + options = { + "win_condition": WinCondition.option_evilizer, + "badges_required": 1, + "difficulty": Difficulty.option_beginner, + "long_checks": LongChecks.option_included, + "multisave": MultipleSaves.option_enabled, + "remix": Remix.option_included, + "overpowered_cheats": OverpoweredCheats.option_included, + "badges": Badges.option_full, + "dolls": MonsterDolls.option_full, + "death_link": DeathLink.option_false, + } + + def test_full_options_evil(self) -> None: + self.test_all_state_can_reach_everything() + + +class TestFullOptionsBadges(LoonylandTestBase): + options = { + "win_condition": WinCondition.option_badges, + "badges_required": 40, + "difficulty": Difficulty.option_beginner, + "long_checks": LongChecks.option_included, + "multisave": MultipleSaves.option_enabled, + "remix": Remix.option_included, + "overpowered_cheats": OverpoweredCheats.option_included, + "badges": Badges.option_full, + "dolls": MonsterDolls.option_full, + "death_link": DeathLink.option_false, + } + + def test_full_options_evil(self) -> None: + self.test_all_state_can_reach_everything() + From c2a192e0bf592d09e420e37c812572cc9ec6e3b0 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Wed, 1 Jan 2025 11:00:36 -0500 Subject: [PATCH 47/58] remove rerunning default test, run_default_tests takes care of it --- worlds/loonyland/test/test_options.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/worlds/loonyland/test/test_options.py b/worlds/loonyland/test/test_options.py index c985188b8cf8..be094461690a 100644 --- a/worlds/loonyland/test/test_options.py +++ b/worlds/loonyland/test/test_options.py @@ -16,10 +16,6 @@ class TestMinimalOptions(LoonylandTestBase): "death_link": DeathLink.option_false, } - def test_minimal_options(self) -> None: - #self.assertBeatable(True) - self.test_all_state_can_reach_everything() - class TestMinimalOptionsBadges(LoonylandTestBase): options = { "win_condition": WinCondition.option_badges, @@ -34,9 +30,6 @@ class TestMinimalOptionsBadges(LoonylandTestBase): "death_link": DeathLink.option_false, } - def test_minimal_options(self) -> None: - self.test_all_state_can_reach_everything() - class TestVanillaOptions(LoonylandTestBase): options = { @@ -52,9 +45,6 @@ class TestVanillaOptions(LoonylandTestBase): "death_link": DeathLink.option_false, } - def test_vanilla_options(self) -> None: - self.test_all_state_can_reach_everything() - class TestFullOptionsEvil(LoonylandTestBase): options = { "win_condition": WinCondition.option_evilizer, @@ -69,9 +59,6 @@ class TestFullOptionsEvil(LoonylandTestBase): "death_link": DeathLink.option_false, } - def test_full_options_evil(self) -> None: - self.test_all_state_can_reach_everything() - class TestFullOptionsBadges(LoonylandTestBase): options = { @@ -87,6 +74,3 @@ class TestFullOptionsBadges(LoonylandTestBase): "death_link": DeathLink.option_false, } - def test_full_options_evil(self) -> None: - self.test_all_state_can_reach_everything() - From ead3f5b7090f918d72b278d5d13577c54b174fd4 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Thu, 2 Jan 2025 18:03:33 -0500 Subject: [PATCH 48/58] data updates explicit options imports for ruff --- worlds/loonyland/Data/game_data.py | 494 ++++++++++++++++++++------ worlds/loonyland/test/__init__.py | 4 +- worlds/loonyland/test/test_options.py | 15 +- 3 files changed, 405 insertions(+), 108 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index 7d6b9ab23037..32b2e8c9960f 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -360,7 +360,9 @@ "Cat": LLItem(ll_base_id + VAR_CAT, LLItemCat.ITEM, ItemClassification.progression), "Big Gem": LLItem(ll_base_id + VAR_GEM, LLItemCat.ITEM, ItemClassification.progression, 6), "100 Gems": LLItem(ll_base_id + VAR_ZOMBIEGEM, LLItemCat.ITEM, ItemClassification.filler), - "Triple Fire Gem": LLItem(ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"]), + "Triple Fire Gem": LLItem( + ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"] + ), "Happy Stick": LLItem(ll_base_id + VAR_TALISMAN, LLItemCat.ITEM, ItemClassification.progression), "Bat Statue": LLItem(ll_base_id + VAR_BATSTATUE, LLItemCat.ITEM, ItemClassification.progression, 4), "Lantern": LLItem(ll_base_id + VAR_LANTERN, LLItemCat.ITEM, ItemClassification.progression), @@ -370,47 +372,106 @@ "Disco Mode": LLItem(ll_base_id + CH_DISCO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Terror Mode": LLItem(ll_base_id + CH_TERROR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Quick Mode": LLItem(ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), - "Infinite Gems": LLItem(ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["LONG"]), + "Quick Mode": LLItem( + ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), + "Infinite Gems": LLItem( + ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["LONG"] + ), "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Homing Shots": LLItem(ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), - "Ultimate Firepower": LLItem(ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), + "Homing Shots": LLItem( + ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), + "Ultimate Firepower": LLItem( + ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Play As Bonkula": LLItem(ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), - "Play As Toad": LLItem(ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), + "Play As Bonkula": LLItem( + ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), + "Play As Toad": LLItem( + ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Radar": LLItem(ll_base_id + CH_RADAR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Heavy Hitter": LLItem(ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), - "Rapid Fire": LLItem(ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"]), - "Touch Of Death": LLItem(ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"]), - "All Access Pass": LLItem(ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), - "Play As Swampdog": LLItem(ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"]), - "Hardcore Mode": LLItem(ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"]), + "Heavy Hitter": LLItem( + ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] + ), + "Rapid Fire": LLItem( + ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"] + ), + "Touch Of Death": LLItem( + ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"] + ), + "All Access Pass": LLItem( + ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), + "Play As Swampdog": LLItem( + ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"] + ), + "Hardcore Mode": LLItem( + ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ), "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), - "Guided Shots": LLItem(ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), - "Slo-Mo": LLItem(ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"]), - "Combo-Bombo": LLItem(ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"]), + "Guided Shots": LLItem( + ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), + "Slo-Mo": LLItem( + ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] + ), + "Combo-Bombo": LLItem( + ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ), "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), - "Play As Witch": LLItem(ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"]), - "Play As Werewolf": LLItem(ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), + "Play As Witch": LLItem( + ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"] + ), + "Play As Werewolf": LLItem( + ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Infinite Survival": LLItem(ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Play As Summony": LLItem(ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), - "Play As Ninja Girl": LLItem(ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"]), - "Molecular Dispersion": LLItem(ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"]), - "Guaranteed Survival": LLItem(ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"]), + "Infinite Survival": LLItem( + ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), + "Play As Summony": LLItem( + ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), + "Play As Ninja Girl": LLItem( + ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ), + "Molecular Dispersion": LLItem( + ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"] + ), + "Guaranteed Survival": LLItem( + ll_base_id + CH_SUPERSURV + AP_BADGEMOD, + LLItemCat.CHEAT, + ItemClassification.progression, + flags=["PWR_MAX", "OP"], + ), "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Stinky Farley": LLItem(ll_base_id + CH_STINKY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Ultra Weapons Are Go!": LLItem(ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Ultra Weapons Are Go!": LLItem( + ll_base_id + CH_ULTRAWEAPON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), "Thorns Aura": LLItem(ll_base_id + CH_THORNS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), - "Monster Regeneration": LLItem(ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), + "Monster Regeneration": LLItem( + ll_base_id + CH_REGEN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression + ), "Farley Free Zone": LLItem(ll_base_id + CH_NOFARLEY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Bowling Access": LLItem(ll_base_id + MODE_BOWLING + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Survival Access": LLItem(ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Boss Bash Access": LLItem(ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Loony Ball Access": LLItem(ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression), - "Remix Access": LLItem(ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"]), + "Survival Access": LLItem( + ll_base_id + MODE_SURVIVAL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Boss Bash Access": LLItem( + ll_base_id + MODE_BOSSBASH + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Loony Ball Access": LLItem( + ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression + ), + "Remix Access": LLItem( + ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"] + ), "Bat Doll": LLItem(ll_base_id + VAR_BATDOLL, LLItemCat.DOLL, ItemClassification.progression), "Skeleton Doll": LLItem(ll_base_id + VAR_SKELDOLL, LLItemCat.DOLL, ItemClassification.progression), "Frog Doll": LLItem(ll_base_id + VAR_FROGDOLL, LLItemCat.DOLL, ItemClassification.progression), @@ -653,7 +714,9 @@ "Monster Poundin'": LLLocation(119, LLLocCat.BADGE, 5, "Menu", base_item="Hardcore Mode"), "Ghostbustin'": LLLocation(120, LLLocCat.BADGE, 6, "Haunted Tower Roof", base_item="Homing Shots"), "Lookin'": LLLocation(121, LLLocCat.BADGE, 7, "The Witch's Cabin", base_item="20/20 Vision"), - "Ultimate Victory": LLLocation(122, LLLocCat.BADGE, 8, "The Evilizer", flags=["POSTGAME"], base_item="Ultimate Firepower"), + "Ultimate Victory": LLLocation( + 122, LLLocCat.BADGE, 8, "The Evilizer", flags=["POSTGAME"], base_item="Ultimate Firepower" + ), "Kickin'": LLLocation(123, LLLocCat.BADGE, 9, "Loony Ball", base_item="Surprise Mode"), "Boss Bashin'": LLLocation(124, LLLocCat.BADGE, 10, "Boss Bash", base_item="Combo-Bombo"), "Vampire Slayin'": LLLocation(125, LLLocCat.BADGE, 11, "The Heart Of Terror", base_item="Play As Bonkula"), @@ -666,25 +729,53 @@ "Combo Plate": LLLocation(132, LLLocCat.BADGE, 18, "Menu", base_item="Radar"), "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, 19, "Rocky Cliffs", base_item="Heavy Hitter"), "Findin'": LLLocation(134, LLLocCat.BADGE, 20, "The Wolf Den", base_item="Rapid Fire"), - "Extreme Survivin'": LLLocation(135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death"), + "Extreme Survivin'": LLLocation( + 135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death" + ), "Huntin'": LLLocation(136, LLLocCat.BADGE, 22, "Halloween Hill", base_item="All Access Pass"), - "Advanced Winnin'": LLLocation(137, LLLocCat.BADGE, 23, "Menu", flags=["LONG", "POSTGAME"], base_item="Terror Mode"), + "Advanced Winnin'": LLLocation( + 137, LLLocCat.BADGE, 23, "Menu", flags=["LONG", "POSTGAME"], base_item="Terror Mode" + ), "Survivin'": LLLocation(138, LLLocCat.BADGE, 24, "Survival", base_item="Save Anywhere"), "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, 25, "Larry's Lair", base_item="Guided Shots"), - "Mad Skeelz": LLLocation(140, LLLocCat.BADGE, 26, "The Evilizer", flags=["LONG_VANILLA_BADGES", "MULTISAVE", "POSTGAME"], base_item="Kick The Cat!"), + "Mad Skeelz": LLLocation( + 140, + LLLocCat.BADGE, + 26, + "The Evilizer", + flags=["LONG_VANILLA_BADGES", "MULTISAVE", "POSTGAME"], + base_item="Kick The Cat!", + ), "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, 27, "Frankenjulie's Laboratory", base_item="Slo-Mo"), "Combo Magic": LLLocation(142, LLLocCat.BADGE, 28, "Survival", base_item="Infinite Survival"), "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, 29, "Slurpy Swamp Mud", base_item="Frog-o-rama"), - "R-R-R-Remix!": LLLocation(144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG", "POSTGAME"], base_item="Play As Summony"), - "Witchcraft": LLLocation(145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl"), - "Ninjitsu": LLLocation(146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Molecular Dispersion"), + "R-R-R-Remix!": LLLocation( + 144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG", "POSTGAME"], base_item="Play As Summony" + ), + "Witchcraft": LLLocation( + 145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl" + ), + "Ninjitsu": LLLocation( + 146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Molecular Dispersion" + ), "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, 33, "Survival", flags=["LONG"], base_item="Guaranteed Survival"), "Hooliganin'": LLLocation(148, LLLocCat.BADGE, 34, "Loony Ball", base_item="Bend It Like Bouapha"), "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, 35, "Menu", flags=["LONG", "MULTISAVE"], base_item="Stinky Farley"), "Scorin'": LLLocation(150, LLLocCat.BADGE, 36, "The Evilizer", flags=["LONG"], base_item="Ultra Weapons Are Go!"), - "Brawlin'": LLLocation(151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES", "OP"], base_item="Thorns Aura"), - "Minin' For Treasure": LLLocation(152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration"), - "Digitally Masterin'": LLLocation(153, LLLocCat.BADGE, 39, "Menu", flags=["LONG", "REMIX", "MULTISAVE", "POSTGAME", "LONG_VANILLA_BADGES"], base_item="Farley Free Zone"), + "Brawlin'": LLLocation( + 151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES", "OP"], base_item="Thorns Aura" + ), + "Minin' For Treasure": LLLocation( + 152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration" + ), + "Digitally Masterin'": LLLocation( + 153, + LLLocCat.BADGE, + 39, + "Menu", + flags=["LONG", "REMIX", "MULTISAVE", "POSTGAME", "LONG_VANILLA_BADGES"], + base_item="Farley Free Zone", + ), "Tree Trimming Reward": LLLocation(154, LLLocCat.REWARD, VAR_TREEREWARD, "A Cabin Trees"), "Larry's Wife Reward": LLLocation(155, LLLocCat.REWARD, VAR_LARRYREWARD, "A Cabin Larry"), "Farmer Reward": LLLocation(156, LLLocCat.REWARD, VAR_CROPSREWARD, "Halloween Hill"), @@ -719,16 +810,21 @@ def set_rules(multiworld, world): "Frankenjulie's Reward": lambda state: power_level(state, world, 10), "Tower: Barracks": lambda state: state.has("Bat Key", world.player), "PolterGuy's Reward": lambda state: power_level(state, world, 10), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) and state.has("Skull Key", world.player) and state.has("Pumpkin Key", world.player), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) + and state.has("Skull Key", world.player) + and state.has("Pumpkin Key", world.player), "Happy Stick: Reward": lambda state: power_level(state, world, 40), "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), "Wolf Den: Vine": lambda state: state.has("Fertilizer", world.player), "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", world.player), "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", world.player), "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", world.player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) and can_kill_werewolves(state, world), - "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) and power_level(state, world, 20), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) + and can_kill_werewolves(state, world), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) + and can_kill_werewolves(state, world), + "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) + and power_level(state, world, 20), "Roof NE: Stoney the Elder": lambda state: power_level(state, world, 20), "Roof SW: Drippy the Elder": lambda state: power_level(state, world, 20), "Roof SE: Toasty the Elder": lambda state: power_level(state, world, 20), @@ -745,31 +841,46 @@ def set_rules(multiworld, world): "Q: Beneath The Lake": lambda state: power_level(state, world, 10), "Q: A True Hero": lambda state: state.has("Fertilizer", world.player) and have_bombs(state, world), "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, world) and state.has("Silver", world.player), - "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) and power_level(state, world, 10), - "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) and state.has("Mushroom", world.player, 10), + "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) + and power_level(state, world, 10), + "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) + and state.has("Mushroom", world.player, 10), "Q: The Haunted Tower": lambda state: power_level(state, world, 10), "Q: The Last Gate": lambda state: state.has("Vampire Bust", world.player, 8), "Q: The Collection": lambda state: can_do_collection(state, world), - "Greed": lambda state: state.can_reach_region("Castle Vampy IV", world.player) and power_level(state, world, 10), - "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) and power_level(state, world, 10), - "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) and power_level(state, world, 10), + "Greed": lambda state: state.can_reach_region("Castle Vampy IV", world.player) + and power_level(state, world, 10), + "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) + and power_level(state, world, 10), + "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) + and power_level(state, world, 10), "Animal Control": lambda state: can_kill_werewolves(state, world), "Cleanin' Up": lambda state: have_many_bombs(state, world), "Extreme Survivin'": lambda state: state.has("Terror Mode", world.player) and power_level(state, world, 30), - "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) and state.can_reach_region("Zombiton", world.player) and state.can_reach_region("Slurpy Swamp Mud", world.player) and can_kill_werewolves(state, world), + "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) + and state.can_reach_region("Zombiton", world.player) + and state.can_reach_region("Slurpy Swamp Mud", world.player) + and can_kill_werewolves(state, world), "Advanced Winnin'": lambda state: hundred_percent(state, world), "Mad Skeelz": lambda state: state.has("Terror Mode", world.player) and power_level(state, world, 30), "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", world.player), "R-R-R-Remix!": lambda state: hundred_percent(state, world) and state.has("Remix Access", world.player), - "Witchcraft": lambda state: state.has("Play As Witch", world.player) and have_all_weapons(state, world) and state.can_reach_region("Castle Vampy IV", world.player), - "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) and have_all_weapons(state, world) and state.has("Infinite Gems", world.player), + "Witchcraft": lambda state: state.has("Play As Witch", world.player) + and have_all_weapons(state, world) + and state.can_reach_region("Castle Vampy IV", world.player), + "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) + and have_all_weapons(state, world) + and state.has("Infinite Gems", world.player), "Stayin' Alive": lambda state: state.has("Infinite Survival", world.player), - "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) and state.can_reach_region("Castle Vampy IV", world.player), + "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) + and state.can_reach_region("Castle Vampy IV", world.player), "Scorin'": lambda state: state.has("Boss Bash Access", world.player) and power_level(state, world, 30), "Brawlin'": lambda state: state.has("Touch Of Death", world.player), - "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) and state.has("Remix Access", world.player), + "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) + and state.has("Remix Access", world.player), "Digitally Masterin'": lambda state: have_39_badges(state, world), - "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) and can_cleanse_crypts(state, world), + "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) + and can_cleanse_crypts(state, world), "Farmer Reward": lambda state: can_cleanse_crypts(state, world), "Witch Mushroom Reward": lambda state: state.has("Mushroom", world.player, 10), "Mayor Reward": lambda state: can_cleanse_crypts(state, world), @@ -792,9 +903,15 @@ def set_entrance_rules(multiworld, world): LLEntrance("Menu", "Halloween Hill", False), LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", world.player), flags=["MODE"]), LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", world.player), flags=["MODE"]), - LLEntrance("Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=["MODE"]), - LLEntrance("Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=["MODE"]), - LLEntrance("Menu", "Remix", False, lambda state: state.has("Remix Access", world.player), flags=["MODE", "REMIX"]), + LLEntrance( + "Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=["MODE"] + ), + LLEntrance( + "Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=["MODE"] + ), + LLEntrance( + "Menu", "Remix", False, lambda state: state.has("Remix Access", world.player), flags=["MODE", "REMIX"] + ), LLEntrance("Halloween Hill", "A Cabin Trees", True), LLEntrance("Halloween Hill", "The Witch's Cabin", True), LLEntrance("Halloween Hill", "Bonita's Cabin", True), @@ -813,15 +930,21 @@ def set_entrance_rules(multiworld, world): LLEntrance("Zombiton", "A Messy Cabin", True), LLEntrance("Halloween Hill", "Rusty Crypt Entrance", True), LLEntrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", world.player, 4)), - LLEntrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player) + ), LLEntrance("Rocky Cliffs", "Abandoned Mines Entrance", True), LLEntrance("Rocky Cliffs", "The Shrine Of Bombulus", True), LLEntrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, world)), LLEntrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", world.player)), LLEntrance("Zombiton", "A Cabin Larry", True), LLEntrance("Halloween Hill", "The Wolf Den Entrance", True), - LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player)), - LLEntrance("Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world)), + LLEntrance( + "Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player) + ), + LLEntrance( + "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world) + ), LLEntrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), LLEntrance("Vampy Land", "Castle Vampy", True), LLEntrance("Halloween Hill", "Cabin In The Woods", True), @@ -864,27 +987,68 @@ def set_entrance_rules(multiworld, world): LLEntrance("Haunted Tower Entrance", "Haunted Tower", False), LLEntrance("Haunted Tower", "Haunted Basement Entrance", False), LLEntrance("Haunted Tower", "Haunted Tower Stairs Up", False), - LLEntrance("Haunted Tower", "Haunted Tower Stairs Down", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player)), + LLEntrance( + "Haunted Tower", + "Haunted Tower Stairs Down", + False, + lambda state: state.has("Bat Key", world.player) + and state.has("Pumpkin Key", world.player) + and state.has("Skull Key", world.player), + ), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False), - LLEntrance("Haunted Tower Stairs Down", "Haunted Tower", False, lambda state: state.has("Bat Key", world.player) and state.has("Pumpkin Key", world.player) and state.has("Skull Key", world.player)), - LLEntrance("Haunted Tower Stairs Down", "Haunted Basement Entrance", True, lambda state: have_light_source(state, world)), + LLEntrance( + "Haunted Tower Stairs Down", + "Haunted Tower", + False, + lambda state: state.has("Bat Key", world.player) + and state.has("Pumpkin Key", world.player) + and state.has("Skull Key", world.player), + ), + LLEntrance( + "Haunted Tower Stairs Down", + "Haunted Basement Entrance", + True, + lambda state: have_light_source(state, world), + ), LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), - LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 2 Entrance", + "Haunted Tower Floor 2", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), - LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 2 Exit", + "Haunted Tower Floor 2", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), - LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 3 Entrance", + "Haunted Tower Floor 3", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), - LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, lambda state: state.has("Ghost Potion", world.player)), + LLEntrance( + "Haunted Tower Floor 3 Exit", + "Haunted Tower Floor 3", + False, + lambda state: state.has("Ghost Potion", world.player), + ), LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), LLEntrance("Haunted Tower Roof", "Halloween Hill", True), LLEntrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), LLEntrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), - LLEntrance("Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world) + ), LLEntrance("Haunted Basement", "Haunted Basement Entrance", False), LLEntrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, world)), LLEntrance("Abandoned Mines Entrance", "Rocky Cliffs", True), @@ -894,53 +1058,133 @@ def set_entrance_rules(multiworld, world): LLEntrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), LLEntrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), LLEntrance("Happy Stick Woods", "Halloween Hill", True), - LLEntrance("The Wolf Den Entrance", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), + LLEntrance( + "The Wolf Den Entrance", + "The Wolf Den", + False, + lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), + ), LLEntrance("The Wolf Den Entrance", "Halloween Hill", True), LLEntrance("The Wolf Den", "The Wolf Den Entrance", False), LLEntrance("The Wolf Den", "The Wolf Den Exit", False), LLEntrance("The Wolf Den Exit", "Larry's Lair", True), - LLEntrance("The Wolf Den Exit", "The Wolf Den", False, lambda state: can_kill_werewolves(state, world) and have_light_source(state, world)), + LLEntrance( + "The Wolf Den Exit", + "The Wolf Den", + False, + lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), + ), LLEntrance("A Cabin Larry", "Zombiton", True), - LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player)), - LLEntrance("Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player) + ), + LLEntrance( + "Upper Creepy Caverns Left Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), - LLEntrance("Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, lambda state: have_light_source(state, world)), - LLEntrance("Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Upper Creepy Caverns Middle Warp", + "Creepy Caverns Left Top Warp", + True, + lambda state: have_light_source(state, world), + ), + LLEntrance( + "Upper Creepy Caverns Middle Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), - LLEntrance("Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, lambda state: have_light_source(state, world)), - LLEntrance("Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Upper Creepy Caverns Right Warp", + "Creepy Caverns Middle Top Warp", + True, + lambda state: have_light_source(state, world), + ), + LLEntrance( + "Upper Creepy Caverns Right Warp", + "Upper Creepy Caverns", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), - LLEntrance("Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world)), - LLEntrance("Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world)), + LLEntrance( + "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world) + ), + LLEntrance( + "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world) + ), LLEntrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), - LLEntrance("Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Left Bottom Warp", + "Creepy Caverns Left", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), - LLEntrance("Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world) + ), LLEntrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), LLEntrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), - LLEntrance("Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Middle Top Warp", + "Creepy Caverns Middle", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), - LLEntrance("Creepy Caverns Middle Right Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20)), - LLEntrance("Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, lambda state: have_light_source(state, world)), - LLEntrance("Creepy Caverns Right Left Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20)), - LLEntrance("Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Middle Right Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20) + ), + LLEntrance( + "Creepy Caverns Middle Right Warp", + "Creepy Caverns Middle", + False, + lambda state: have_light_source(state, world), + ), + LLEntrance( + "Creepy Caverns Right Left Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20) + ), + LLEntrance( + "Creepy Caverns Right Left Warp", + "Creepy Caverns Right", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), - LLEntrance("Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Creepy Caverns Right Bottom Warp", + "Creepy Caverns Right", + False, + lambda state: have_light_source(state, world), + ), LLEntrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), LLEntrance("Castle Vampy", "Halloween Hill", True), - LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player)), - LLEntrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player)), + LLEntrance( + "Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player) + ), + LLEntrance( + "Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player) + ), LLEntrance("Castle Vampy Skull Jail", "Castle Vampy II", True), LLEntrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", world.player, 4)), LLEntrance("Castle Vampy II", "Castle Vampy Skull Jail", True), - LLEntrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player)), - LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player)), + LLEntrance( + "Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player) + ), + LLEntrance( + "Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player) + ), LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy III", True), LLEntrance("Castle Vampy II NE", "Castle Vampy", True), LLEntrance("Castle Vampy II NE", "Castle Vampy III NE", True), @@ -952,8 +1196,18 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy II NW", "Castle Vampy III NW", True), LLEntrance("Cabin In The Woods", "Halloween Hill", True), LLEntrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), - LLEntrance("Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", world.player)), - LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", world.player)), + LLEntrance( + "Castle Vampy III", + "Castle Vampy III Pumpkin Jail", + False, + lambda state: state.has("Pumpkin Key", world.player), + ), + LLEntrance( + "Castle Vampy III Pumpkin Jail", + "Castle Vampy III", + False, + lambda state: state.has("Pumpkin Key", world.player), + ), LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), LLEntrance("Castle Vampy III NE", "Castle Vampy II NE", True), LLEntrance("Castle Vampy III NE", "Castle Vampy IV NE", True), @@ -964,7 +1218,12 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy III NW", "Castle Vampy II NW", True), LLEntrance("Castle Vampy III NW", "Castle Vampy IV NW", True), LLEntrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), - LLEntrance("Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", world.player, 8)), + LLEntrance( + "Castle Vampy IV", + "The Heart Of Terror Entrance", + True, + lambda state: state.has("Vampire Bust", world.player, 8), + ), LLEntrance("Castle Vampy IV NE", "Castle Vampy III NE", True), LLEntrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), LLEntrance("Castle Vampy IV SE", "Castle Vampy III SE", True), @@ -979,7 +1238,9 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy Roof SW", "Castle Vampy IV SW", True), LLEntrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), LLEntrance("The Evilizer", "Halloween Hill", True), - LLEntrance("The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world)), + LLEntrance( + "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world) + ), LLEntrance("The Heart Of Terror", "The Evilizer", True), LLEntrance("The Heart Of Terror", "Empty Rooftop", True), LLEntrance("A Hidey-Hole", "Halloween Hill", True), @@ -989,20 +1250,47 @@ def set_entrance_rules(multiworld, world): LLEntrance("Larry's Lair", "Halloween Hill", True), LLEntrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), LLEntrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), + LLEntrance( + "Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) + ), LLEntrance("Zombiton", "Halloween Hill", False), LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance("Halloween Hill", "Rocky Cliffs", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), - LLEntrance("Rocky Cliffs", "Halloween Hill", False, lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player)), + LLEntrance( + "Halloween Hill", + "Rocky Cliffs", + False, + lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), + ), + LLEntrance( + "Rocky Cliffs", + "Halloween Hill", + False, + lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), + ), LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", world.player)), LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Underground Tunnel Zombie", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player)), + LLEntrance( + "Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player) + ), + LLEntrance( + "Underground Tunnel Zombie", + "Underground Tunnel Mud", + False, + lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player), + ), LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player)), + LLEntrance( + "Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player) + ), ] for region in multiworld.get_regions(world.player): for entry in loonyland_entrance_table: diff --git a/worlds/loonyland/test/__init__.py b/worlds/loonyland/test/__init__.py index efc63c6f3d51..455e776421e1 100644 --- a/worlds/loonyland/test/__init__.py +++ b/worlds/loonyland/test/__init__.py @@ -1,9 +1,7 @@ - -from BaseClasses import Item from test.bases import WorldTestBase from worlds.loonyland import LoonylandWorld class LoonylandTestBase(WorldTestBase): game = "Loonyland" - world: LoonylandWorld \ No newline at end of file + world: LoonylandWorld diff --git a/worlds/loonyland/test/test_options.py b/worlds/loonyland/test/test_options.py index be094461690a..8b553c6e9ad0 100644 --- a/worlds/loonyland/test/test_options.py +++ b/worlds/loonyland/test/test_options.py @@ -1,5 +1,15 @@ +from ..options import ( + Badges, + DeathLink, + Difficulty, + LongChecks, + MonsterDolls, + MultipleSaves, + OverpoweredCheats, + Remix, + WinCondition, +) from . import LoonylandTestBase -from ..options import * class TestMinimalOptions(LoonylandTestBase): @@ -16,6 +26,7 @@ class TestMinimalOptions(LoonylandTestBase): "death_link": DeathLink.option_false, } + class TestMinimalOptionsBadges(LoonylandTestBase): options = { "win_condition": WinCondition.option_badges, @@ -45,6 +56,7 @@ class TestVanillaOptions(LoonylandTestBase): "death_link": DeathLink.option_false, } + class TestFullOptionsEvil(LoonylandTestBase): options = { "win_condition": WinCondition.option_evilizer, @@ -73,4 +85,3 @@ class TestFullOptionsBadges(LoonylandTestBase): "dolls": MonsterDolls.option_full, "death_link": DeathLink.option_false, } - From b1c2cd9f4230bfee9f237ec78d2be1cc2412cb94 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Thu, 2 Jan 2025 18:05:56 -0500 Subject: [PATCH 49/58] guide updates --- worlds/loonyland/docs/en_Loonyland.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/loonyland/docs/en_Loonyland.md b/worlds/loonyland/docs/en_Loonyland.md index 145caf5eb90a..3527cbb8f9ac 100644 --- a/worlds/loonyland/docs/en_Loonyland.md +++ b/worlds/loonyland/docs/en_Loonyland.md @@ -31,7 +31,7 @@ Uh oh ## What does another world's item look like in Loonyland? -Its the archipelago logo, rendered as a cluster of colored gems +It will look like the archipelago logo, rendered as a cluster of colored gems ## When the player receives an item, what happens? @@ -39,5 +39,5 @@ A message pops up in the bottom left informing them of the item and who sent it. ## What are recommended options to tweak for beginners to the rando? -When badges are added, start with them off -Start on Normal difficulty, and move up to Hard when you want a challenge \ No newline at end of file +Playing with badges set to none and difficulty set to beginner/normal. +Evilizer win con. \ No newline at end of file From 257dc98fa70028c840963882a6ef40d1df591003 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Thu, 2 Jan 2025 18:29:18 -0500 Subject: [PATCH 50/58] relative imports --- worlds/loonyland/entrances.py | 2 +- worlds/loonyland/items.py | 2 +- worlds/loonyland/locations.py | 2 +- worlds/loonyland/regions.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/worlds/loonyland/entrances.py b/worlds/loonyland/entrances.py index 9983022efa7a..5bc3d9c0e0b0 100644 --- a/worlds/loonyland/entrances.py +++ b/worlds/loonyland/entrances.py @@ -3,7 +3,7 @@ from BaseClasses import Entrance from worlds.generic.Rules import CollectionRule -from worlds.loonyland.options import Badges, LoonylandOptions, Remix +from .options import Badges, LoonylandOptions, Remix class LoonylandEntrance(Entrance): diff --git a/worlds/loonyland/items.py b/worlds/loonyland/items.py index ee3f3885d0bd..3f496b26bc48 100644 --- a/worlds/loonyland/items.py +++ b/worlds/loonyland/items.py @@ -3,7 +3,7 @@ from BaseClasses import Item, ItemClassification -from worlds.loonyland.options import ( +from .options import ( Badges, LongChecks, LoonylandOptions, diff --git a/worlds/loonyland/locations.py b/worlds/loonyland/locations.py index 85cdca8d07ca..858eb20fcf33 100644 --- a/worlds/loonyland/locations.py +++ b/worlds/loonyland/locations.py @@ -3,7 +3,7 @@ from BaseClasses import Location -from worlds.loonyland.options import ( +from .options import ( Badges, LongChecks, LoonylandOptions, diff --git a/worlds/loonyland/regions.py b/worlds/loonyland/regions.py index 86688beffafc..aa4ad63bcafc 100644 --- a/worlds/loonyland/regions.py +++ b/worlds/loonyland/regions.py @@ -2,7 +2,7 @@ from BaseClasses import Region -from worlds.loonyland.options import Badges, LoonylandOptions, Remix +from .options import Badges, LoonylandOptions, Remix class LoonylandRegion(Region): From f3c9edbc7f731c4b9e9203d8b7fa6012baad5780 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Thu, 2 Jan 2025 19:16:37 -0500 Subject: [PATCH 51/58] add VANILLA_POSTGAME for badges that are postgame locs in BADGES_VANILLA --- worlds/loonyland/Data/game_data.py | 14 ++++++++++++-- worlds/loonyland/__init__.py | 4 ++++ worlds/loonyland/entrances.py | 1 + worlds/loonyland/locations.py | 4 +++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index 32b2e8c9960f..b67fee3d8911 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -730,7 +730,12 @@ "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, 19, "Rocky Cliffs", base_item="Heavy Hitter"), "Findin'": LLLocation(134, LLLocCat.BADGE, 20, "The Wolf Den", base_item="Rapid Fire"), "Extreme Survivin'": LLLocation( - 135, LLLocCat.BADGE, 21, "Survival", flags=["LONG_VANILLA_BADGES"], base_item="Touch Of Death" + 135, + LLLocCat.BADGE, + 21, + "Survival", + flags=["LONG_VANILLA_BADGES", "VANILLA_POSTGAME"], + base_item="Touch Of Death", ), "Huntin'": LLLocation(136, LLLocCat.BADGE, 22, "Halloween Hill", base_item="All Access Pass"), "Advanced Winnin'": LLLocation( @@ -763,7 +768,12 @@ "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, 35, "Menu", flags=["LONG", "MULTISAVE"], base_item="Stinky Farley"), "Scorin'": LLLocation(150, LLLocCat.BADGE, 36, "The Evilizer", flags=["LONG"], base_item="Ultra Weapons Are Go!"), "Brawlin'": LLLocation( - 151, LLLocCat.BADGE, 37, "Benny's Cocktails", flags=["LONG_VANILLA_BADGES", "OP"], base_item="Thorns Aura" + 151, + LLLocCat.BADGE, + 37, + "Benny's Cocktails", + flags=["LONG_VANILLA_BADGES", "OP", "VANILLA_POSTGAME"], + base_item="Thorns Aura", ), "Minin' For Treasure": LLLocation( 152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration" diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 56bc1401e5d8..f61582654d23 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -94,6 +94,10 @@ def create_event(self, event: str) -> LoonylandItem: return LoonylandItem(event, ItemClassification.progression, None, self.player) def create_regions(self) -> None: + # print(self.player_name) + # for key in LoonylandOptions.__annotations__: + # print(key, getattr(self.options, key)) + for region_name, region_data in loonyland_region_table.items(): if region_data.can_create(self.options): region = Region(region_name, self.player, self.multiworld) diff --git a/worlds/loonyland/entrances.py b/worlds/loonyland/entrances.py index 5bc3d9c0e0b0..04d5b7ea0ea3 100644 --- a/worlds/loonyland/entrances.py +++ b/worlds/loonyland/entrances.py @@ -3,6 +3,7 @@ from BaseClasses import Entrance from worlds.generic.Rules import CollectionRule + from .options import Badges, LoonylandOptions, Remix diff --git a/worlds/loonyland/locations.py b/worlds/loonyland/locations.py index 858eb20fcf33..87117ca47463 100644 --- a/worlds/loonyland/locations.py +++ b/worlds/loonyland/locations.py @@ -49,7 +49,9 @@ def can_create(self, options: LoonylandOptions) -> bool: return False if options.multisave == MultipleSaves.option_disabled and ("MULTISAVE" in self.flags): return False - if options.win_condition == WinCondition.option_evilizer and ("POSTGAME" in self.flags): + if options.win_condition == WinCondition.option_evilizer and ( + "POSTGAME" in self.flags or ("VANILLA_POSTGAME" in self.flags and options.badges == Badges.option_vanilla) + ): return False if options.overpowered_cheats == OverpoweredCheats.option_excluded and "OP" in self.flags: return False From 820a32d1a9b97a9bc650f3a65fdc9ced340a78d7 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Thu, 2 Jan 2025 19:36:40 -0500 Subject: [PATCH 52/58] better game description, removing comment, simplifying region line --- worlds/loonyland/__init__.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index f61582654d23..55cdb79adddf 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -36,8 +36,12 @@ class LoonylandWebWorld(WebWorld): class LoonylandWorld(World): - """The greatest game of all time.""" - + """ + Loonyland: Halloween Hill is an This is an action-adventure game, + where you must explore to improve Loony's abilities and gain + access to ever more dangerous areas, all in an effort to find out + what lies behind the madness going on in Halloween Hill. + """ game = "Loonyland" web = LoonylandWebWorld() options: LoonylandOptions @@ -106,7 +110,7 @@ def create_regions(self) -> None: for loc_name, loc_data in loonyland_location_table.items(): if not loc_data.can_create(self.options): continue - region = self.multiworld.get_region(loc_data.region, self.player) + region = self.get_region(loc_data.region) new_loc = LoonylandLocation(self.player, loc_name, loc_data.id + loonyland_base_id, region) if not loc_data.in_logic(self.options): new_loc.place_locked_item(self.create_event(loc_data.base_item)) @@ -119,7 +123,6 @@ def create_regions(self) -> None: def set_rules(self): # Completion condition. - # self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) final_loc = None if self.options.win_condition == WinCondition.option_evilizer: final_loc = self.get_location("Q: Save Halloween Hill") From 2cc01ebcbfc490266da0cdc27cdd5929b73831c5 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Thu, 2 Jan 2025 20:15:40 -0500 Subject: [PATCH 53/58] rename a cool filler item to its effect, "Max life and gems" add torch item, place it at the curse the darkness location make torch item requirement for light source instead of reaching swamp gas cavern --- worlds/loonyland/Data/game_data.py | 1 + worlds/loonyland/__init__.py | 13 +++++++++---- worlds/loonyland/items.py | 2 ++ worlds/loonyland/rules.py | 10 ++-------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index b67fee3d8911..1e4c72434971 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -480,6 +480,7 @@ "Swampdog Doll": LLItem(ll_base_id + VAR_SWAMPDOLL, LLItemCat.DOLL, ItemClassification.progression), "Vampire Doll": LLItem(ll_base_id + VAR_VAMPDOLL, LLItemCat.DOLL, ItemClassification.progression), "Wolfman Doll": LLItem(ll_base_id + VAR_WOLFDOLL, LLItemCat.DOLL, ItemClassification.progression), + "Torch": LLItem(ll_base_id + VAR_TORCH, LLItemCat.ITEM, ItemClassification.progression, flags=["TORCH"]), } loonyland_region_table: dict[str, LLRegion] = { "Menu": LLRegion(False), diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 55cdb79adddf..849a80dbea27 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -42,13 +42,14 @@ class LoonylandWorld(World): access to ever more dangerous areas, all in an effort to find out what lies behind the madness going on in Halloween Hill. """ + game = "Loonyland" web = LoonylandWebWorld() options: LoonylandOptions options_dataclass = LoonylandOptions location_name_to_id = {name: data.id + loonyland_base_id for name, data in loonyland_location_table.items()} item_name_to_id = {name: data.id for name, data in loony_item_table.items()} - item_name_to_id["A Cool Filler Item"] = loonyland_base_id + 3000 + item_name_to_id["Max Life and Gems"] = loonyland_base_id + 3000 item_name_groups = { "physical_items": {name for name, data in loony_item_table.items() if data.category == LLItemCat.ITEM}, @@ -70,10 +71,10 @@ class LoonylandWorld(World): } def create_junk(self) -> LoonylandItem: - return LoonylandItem("A Cool Filler Item", ItemClassification.filler, loonyland_base_id + 3000, self.player) + return LoonylandItem("Max Life and Gems", ItemClassification.filler, loonyland_base_id + 3000, self.player) def create_item(self, name: str) -> LoonylandItem: - if name == "A Cool Filler Item": + if name == "Max Life and Gems": return self.create_junk() return LoonylandItem( name, loony_item_table[name].modified_classification(self.options), loony_item_table[name].id, self.player @@ -87,7 +88,7 @@ def create_items(self) -> None: new_item = self.create_item(name) item_pool.append(new_item) - junk_len = len(self.multiworld.get_unfilled_locations(self.player)) - len(item_pool) + junk_len = len(self.multiworld.get_unfilled_locations(self.player)) - len(item_pool) - 1 if self.options.win_condition == WinCondition.option_evilizer: junk_len = junk_len - 1 item_pool += [self.create_junk() for _ in range(junk_len)] @@ -139,6 +140,10 @@ def set_rules(self): final_loc.place_locked_item(self.create_event("Victory")) self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player) + # force torch at curse the darkness + torch_loc = self.get_location("Q: Curse The Darkness") + torch_loc.place_locked_item(self.create_item("Torch")) + # location rules set_rules(self.multiworld, self) # entrance rules diff --git a/worlds/loonyland/items.py b/worlds/loonyland/items.py index 3f496b26bc48..19a79bb82b00 100644 --- a/worlds/loonyland/items.py +++ b/worlds/loonyland/items.py @@ -50,6 +50,8 @@ def can_create(self, options: LoonylandOptions) -> bool: return False if options.multisave == MultipleSaves.option_disabled and ("MULTISAVE" in self.flags): return False + if "TORCH" in self.flags: + return False return True def in_logic(self, options: LoonylandOptions) -> bool: diff --git a/worlds/loonyland/rules.py b/worlds/loonyland/rules.py index 1ac4a3651dfc..412389f28d17 100644 --- a/worlds/loonyland/rules.py +++ b/worlds/loonyland/rules.py @@ -9,14 +9,9 @@ def have_light_source(state: CollectionState, world: "LoonylandWorld") -> bool: return ( state.has("Lantern", world.player) - or ( - state.has("Stick", world.player) - and state.has("Boots", world.player) - and state.can_reach_region("Swamp Gas Cavern", world.player) - ) - or (state.has("20/20 Vision", world.player)) + or state.has("Torch", world.player) + or state.has("20/20 Vision", world.player) ) - # 20/20 when badges added def can_kill_werewolves(state: CollectionState, world: "LoonylandWorld") -> bool: @@ -29,7 +24,6 @@ def have_bombs(state: CollectionState, world: "LoonylandWorld") -> bool: or state.has("Combo-Bombo", world.player) or state.has("Play As Werewolf", world.player) ) - # or werewolf badge when badges are added def have_many_bombs(state: CollectionState, world: "LoonylandWorld") -> bool: From 9c23ffd8dd18d42afa0d1deeb8663747239c0c77 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy <31360629+AutomaticFrenzy@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:46:14 -0500 Subject: [PATCH 54/58] Update worlds/loonyland/__init__.py Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> --- worlds/loonyland/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 849a80dbea27..2b918388c5d0 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -37,7 +37,7 @@ class LoonylandWebWorld(WebWorld): class LoonylandWorld(World): """ - Loonyland: Halloween Hill is an This is an action-adventure game, + Loonyland: Halloween Hill is an action-adventure game, where you must explore to improve Loony's abilities and gain access to ever more dangerous areas, all in an effort to find out what lies behind the madness going on in Halloween Hill. From e5c27e768013bb08268d1f9c4e4ecb6e1b5fdcf0 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sun, 12 Jan 2025 09:25:06 -0500 Subject: [PATCH 55/58] Options page is now using rich text Fix setup guide not being linked correctly Change toml to affect options.py now --- worlds/loonyland/__init__.py | 5 +++-- worlds/loonyland/options.py | 17 ++++++++++++++--- worlds/loonyland/ruff.toml | 3 --- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 2b918388c5d0..224a508b6b6e 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -21,14 +21,15 @@ class LoonylandWebWorld(WebWorld): + rich_text_options_doc = True theme = "dirt" setup_en = Tutorial( tutorial_name="Start Guide", description="A guide to playing Loonyland.", language="English", - file_name="guide_en.md", - link="guide/en", + file_name="setup_en.md", + link="setup/en", authors=["AutomaticFrenzy"], ) diff --git a/worlds/loonyland/options.py b/worlds/loonyland/options.py index d80d9a85b567..137d30adc324 100644 --- a/worlds/loonyland/options.py +++ b/worlds/loonyland/options.py @@ -5,7 +5,9 @@ class WinCondition(Choice): """Evilizer: Beat the final boss - Badges: Get X merit badges earned + + Badges: Get X merit badges earned + NOT IMPLEMENTED: normal_remix: Beat the final boss in normal and remix""" display_name = "Win Condition" @@ -38,7 +40,9 @@ class Difficulty(Choice): class LongChecks(Choice): - """Excluded: Remove 100%, 39 badges, swampdog to 50, witch to lvl 9 spells, 5000 gems, the monster point badges, a true hero + """Excluded: Remove 100%, 39 badges, swampdog to 50, witch to lvl 9 spells, 5000 gems, + the monster point badges, a true hero + Does nothing if badges are already set to none """ @@ -49,7 +53,8 @@ class LongChecks(Choice): class MultipleSaves(Choice): - """Excluded: Remove badges that require using certain characters/terror mode, removes all "takes effect on new game" cheats""" + """Excluded: Remove badges that require using certain characters/terror mode, + removes all "takes effect on new game" cheats""" display_name = "Multiple Saves" option_disabled = 0 @@ -68,6 +73,7 @@ class Remix(Choice): class OverpoweredCheats(Choice): """Walk Through Walls, Infinite health, Touch of Death + Also disables Brawlin' as a location, since it requires Touch of Death""" display_name = "Overpowered Cheats" @@ -78,8 +84,11 @@ class OverpoweredCheats(Choice): class Badges(Choice): """Full: All badges and their cheats are in logic + Reasonable: Remove hard to get badges and overpowered cheats + Vanilla: Badges aren't randomized, but are in logic + None: Badges aren't in logic""" display_name = "Badges" @@ -91,7 +100,9 @@ class Badges(Choice): class MonsterDolls(Choice): """Full: Monsters can drop randomized items, monster dolls can be found at locations + Vanilla: Monsters drop their normal monster doll + None: Dolls aren't in logic, the collection quest gives nothing""" display_name = "Monster Dolls" diff --git a/worlds/loonyland/ruff.toml b/worlds/loonyland/ruff.toml index d0f613db3dc4..2f69bea41e60 100644 --- a/worlds/loonyland/ruff.toml +++ b/worlds/loonyland/ruff.toml @@ -4,6 +4,3 @@ line-length = 120 select = ["C", "E", "F", "R", "W", "I", "N", "Q", "UP", "RUF", "ISC", "T20"] ignore = ["C9", "RUF012", "RUF100"] -[lint.per-file-ignores] -# The way options definitions work right now, world devs are forced to break line length requirements. -"options.py" = ["E501"] From a1d92942376f59977010bcd7ceca0ce6918acdb5 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sun, 12 Jan 2025 10:10:33 -0500 Subject: [PATCH 56/58] Change flags from being a list of strings into a enum.flag --- worlds/loonyland/Data/game_data.py | 151 ++++++++++++++++++----------- worlds/loonyland/__init__.py | 7 +- worlds/loonyland/entrances.py | 8 +- worlds/loonyland/flags.py | 21 ++++ worlds/loonyland/items.py | 15 +-- worlds/loonyland/locations.py | 17 ++-- worlds/loonyland/regions.py | 7 +- 7 files changed, 145 insertions(+), 81 deletions(-) create mode 100644 worlds/loonyland/flags.py diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index 1e4c72434971..f7583d8d0a21 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -2,6 +2,7 @@ from BaseClasses import ItemClassification from worlds.generic.Rules import CollectionRule, add_rule from worlds.loonyland.entrances import LLEntrance +from worlds.loonyland.flags import LLFlags from worlds.loonyland.items import LLItem, LLItemCat from worlds.loonyland.locations import LLLocation, LLLocCat from worlds.loonyland.regions import LLRegion @@ -334,10 +335,10 @@ MODE_BADGES = 4 MODE_REMIX = 5 loony_item_table: dict[str, LLItem] = { - "Heart": LLItem(ll_base_id + VAR_HEART, LLItemCat.ITEM, ItemClassification.useful, 20, flags=["PWR"]), - "Lightning": LLItem(ll_base_id + VAR_LIGHTNING, LLItemCat.ITEM, ItemClassification.useful, 10, flags=["PWR"]), - "Arrow": LLItem(ll_base_id + VAR_ARROW, LLItemCat.ITEM, ItemClassification.useful, 10, flags=["PWR"]), - "Pants": LLItem(ll_base_id + VAR_PANTS, LLItemCat.ITEM, ItemClassification.useful, 10, flags=["PWR"]), + "Heart": LLItem(ll_base_id + VAR_HEART, LLItemCat.ITEM, ItemClassification.useful, 20, flags=LLFlags.PWR), + "Lightning": LLItem(ll_base_id + VAR_LIGHTNING, LLItemCat.ITEM, ItemClassification.useful, 10, flags=LLFlags.PWR), + "Arrow": LLItem(ll_base_id + VAR_ARROW, LLItemCat.ITEM, ItemClassification.useful, 10, flags=LLFlags.PWR), + "Pants": LLItem(ll_base_id + VAR_PANTS, LLItemCat.ITEM, ItemClassification.useful, 10, flags=LLFlags.PWR), "Mushroom": LLItem(ll_base_id + VAR_MUSHROOM, LLItemCat.ITEM, ItemClassification.progression, 10), "Orb": LLItem(ll_base_id + VAR_MYSORB, LLItemCat.ITEM, ItemClassification.progression, 4), "Bombs": LLItem(ll_base_id + VAR_WBOMBS, LLItemCat.ITEM, ItemClassification.progression), @@ -361,73 +362,85 @@ "Big Gem": LLItem(ll_base_id + VAR_GEM, LLItemCat.ITEM, ItemClassification.progression, 6), "100 Gems": LLItem(ll_base_id + VAR_ZOMBIEGEM, LLItemCat.ITEM, ItemClassification.filler), "Triple Fire Gem": LLItem( - ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"] + ll_base_id + VAR_TRIPLEFIRE, LLItemCat.ITEM, ItemClassification.useful, flags=LLFlags.PWR_BIG ), "Happy Stick": LLItem(ll_base_id + VAR_TALISMAN, LLItemCat.ITEM, ItemClassification.progression), "Bat Statue": LLItem(ll_base_id + VAR_BATSTATUE, LLItemCat.ITEM, ItemClassification.progression, 4), "Lantern": LLItem(ll_base_id + VAR_LANTERN, LLItemCat.ITEM, ItemClassification.progression), - "Reflect Gem": LLItem(ll_base_id + VAR_REFLECT, LLItemCat.ITEM, ItemClassification.useful, flags=["PWR_BIG"]), + "Reflect Gem": LLItem(ll_base_id + VAR_REFLECT, LLItemCat.ITEM, ItemClassification.useful, flags=LLFlags.PWR_BIG), "Silver Sling": LLItem(ll_base_id + VAR_SILVERSLING, LLItemCat.ITEM, ItemClassification.progression), "20/20 Vision": LLItem(ll_base_id + CH_LIGHT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Disco Mode": LLItem(ll_base_id + CH_DISCO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Terror Mode": LLItem(ll_base_id + CH_TERROR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Surprise Mode": LLItem(ll_base_id + CH_SURPRISE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Quick Mode": LLItem( - ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ll_base_id + CH_QUICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=LLFlags.PWR ), "Infinite Gems": LLItem( - ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["LONG"] + ll_base_id + CH_GEMS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=LLFlags.LONG ), "Sidekick": LLItem(ll_base_id + CH_SIDEKICK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Homing Shots": LLItem( - ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ll_base_id + CH_HOMING + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=LLFlags.PWR ), "Ultimate Firepower": LLItem( - ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ll_base_id + CH_MAXPOWER + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=LLFlags.MULTISAVE ), "Vintage Mode": LLItem(ll_base_id + CH_VINTAGE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Play As Bonkula": LLItem( - ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ll_base_id + CH_BONKULA + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=LLFlags.MULTISAVE ), "Play As Toad": LLItem( - ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ll_base_id + CH_TOAD + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=LLFlags.MULTISAVE ), "Crystal Ball": LLItem(ll_base_id + CH_CRYSTAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Radar": LLItem(ll_base_id + CH_RADAR + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Heavy Hitter": LLItem( - ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] + ll_base_id + CH_HEAVYHIT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=LLFlags.PWR_BIG ), "Rapid Fire": LLItem( - ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["PWR"] + ll_base_id + CH_RAPIDFIRE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=LLFlags.PWR ), "Touch Of Death": LLItem( - ll_base_id + CH_DEATH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["PWR_MAX", "OP"] + ll_base_id + CH_DEATH + AP_BADGEMOD, + LLItemCat.CHEAT, + ItemClassification.progression, + flags=LLFlags.PWR_MAX | LLFlags.OP, ), "All Access Pass": LLItem( - ll_base_id + CH_ALLACCESS + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ll_base_id + CH_ALLACCESS + AP_BADGEMOD, + LLItemCat.CHEAT, + ItemClassification.progression, + flags=LLFlags.MULTISAVE, ), "Play As Swampdog": LLItem( - ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"] + ll_base_id + CH_SWAMPDOG + AP_BADGEMOD, + LLItemCat.CHEAT, + ItemClassification.useful, + flags=LLFlags.MULTISAVE | LLFlags.LONG, ), "Hardcore Mode": LLItem( - ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=["MULTISAVE"] + ll_base_id + CH_HARDCORE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler, flags=LLFlags.MULTISAVE ), "Save Anywhere": LLItem(ll_base_id + CH_SAVEANY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful), "Guided Shots": LLItem( - ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ll_base_id + CH_GUIDED + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=LLFlags.PWR ), "Slo-Mo": LLItem( - ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR_BIG"] + ll_base_id + CH_SLOMO + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=LLFlags.PWR_BIG ), "Combo-Bombo": LLItem( - ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["PWR"] + ll_base_id + CH_CORPSE + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=LLFlags.PWR ), "Frog-o-rama": LLItem(ll_base_id + CH_FROGWPN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.filler), "Play As Witch": LLItem( - ll_base_id + CH_WITCH + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.useful, flags=["MULTISAVE", "LONG"] + ll_base_id + CH_WITCH + AP_BADGEMOD, + LLItemCat.CHEAT, + ItemClassification.useful, + flags=LLFlags.MULTISAVE | LLFlags.LONG, ), "Play As Werewolf": LLItem( - ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ll_base_id + CH_WEREWOLF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=LLFlags.MULTISAVE ), "Enemy Overload": LLItem(ll_base_id + CH_RESPAWN + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Kick The Cat!": LLItem(ll_base_id + CH_KICKCAT + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), @@ -435,19 +448,19 @@ ll_base_id + CH_RNDSURVIVAL + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression ), "Play As Summony": LLItem( - ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ll_base_id + CH_SUMMON + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=LLFlags.MULTISAVE ), "Play As Ninja Girl": LLItem( - ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["MULTISAVE"] + ll_base_id + CH_THIEF + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=LLFlags.MULTISAVE ), "Molecular Dispersion": LLItem( - ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=["OP"] + ll_base_id + CH_WALLWALK + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, flags=LLFlags.OP ), "Guaranteed Survival": LLItem( ll_base_id + CH_SUPERSURV + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression, - flags=["PWR_MAX", "OP"], + flags=LLFlags.PWR_MAX | LLFlags.OP, ), "Bend It Like Bouapha": LLItem(ll_base_id + CH_BEND + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), "Stinky Farley": LLItem(ll_base_id + CH_STINKY + AP_BADGEMOD, LLItemCat.CHEAT, ItemClassification.progression), @@ -470,7 +483,7 @@ ll_base_id + MODE_LOONYBALL + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression ), "Remix Access": LLItem( - ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=["REMIX"] + ll_base_id + MODE_REMIX + AP_MODEMOD, LLItemCat.ACCESS, ItemClassification.progression, flags=LLFlags.REMIX ), "Bat Doll": LLItem(ll_base_id + VAR_BATDOLL, LLItemCat.DOLL, ItemClassification.progression), "Skeleton Doll": LLItem(ll_base_id + VAR_SKELDOLL, LLItemCat.DOLL, ItemClassification.progression), @@ -480,7 +493,7 @@ "Swampdog Doll": LLItem(ll_base_id + VAR_SWAMPDOLL, LLItemCat.DOLL, ItemClassification.progression), "Vampire Doll": LLItem(ll_base_id + VAR_VAMPDOLL, LLItemCat.DOLL, ItemClassification.progression), "Wolfman Doll": LLItem(ll_base_id + VAR_WOLFDOLL, LLItemCat.DOLL, ItemClassification.progression), - "Torch": LLItem(ll_base_id + VAR_TORCH, LLItemCat.ITEM, ItemClassification.progression, flags=["TORCH"]), + "Torch": LLItem(ll_base_id + VAR_TORCH, LLItemCat.ITEM, ItemClassification.progression, flags=LLFlags.TORCH), } loonyland_region_table: dict[str, LLRegion] = { "Menu": LLRegion(False), @@ -586,11 +599,11 @@ "Swampdog Lair": LLRegion(True), "Swampdog Lair Entrance": LLRegion(False, "Swampdog Lair"), "Larry's Lair": LLRegion(True), - "Bowling": LLRegion(False, flags=["MODE"]), - "Survival": LLRegion(False, flags=["MODE"]), - "Boss Bash": LLRegion(False, flags=["MODE"]), - "Loony Ball": LLRegion(False, flags=["MODE"]), - "Remix": LLRegion(False, flags=["MODE", "REMIX"]), + "Bowling": LLRegion(False, flags=LLFlags.MODE), + "Survival": LLRegion(False, flags=LLFlags.MODE), + "Boss Bash": LLRegion(False, flags=LLFlags.MODE), + "Loony Ball": LLRegion(False, flags=LLFlags.MODE), + "Remix": LLRegion(False, flags=LLFlags.MODE | LLFlags.REMIX), } loonyland_location_table: dict[str, LLLocation] = { "Swamp: Mud Path": LLLocation(0, LLLocCat.PICKUP, 0, "Slurpy Swamp Mud"), @@ -706,17 +719,17 @@ "Q: The Haunted Tower": LLLocation(110, LLLocCat.QUEST, 16, "Haunted Tower Roof"), "Q: The Last Gate": LLLocation(111, LLLocCat.QUEST, 17, "Castle Vampy IV"), "Q: The Rescue": LLLocation(112, LLLocCat.QUEST, 18, "A Gloomy Cavern"), - "Q: The Collection": LLLocation(113, LLLocCat.QUEST, 19, "A Cabin Collector", flags=["DOLL"]), - "Evil Smashin'": LLLocation(114, LLLocCat.BADGE, 0, "The Evilizer", flags=["POSTGAME"], base_item="Quick Mode"), + "Q: The Collection": LLLocation(113, LLLocCat.QUEST, 19, "A Cabin Collector", flags=LLFlags.DOLL), + "Evil Smashin'": LLLocation(114, LLLocCat.BADGE, 0, "The Evilizer", flags=LLFlags.POSTGAME, base_item="Quick Mode"), "Bowlin'": LLLocation(115, LLLocCat.BADGE, 1, "Bowling", base_item="Disco Mode"), "Vandalizin'": LLLocation(116, LLLocCat.BADGE, 2, "Zombiton", base_item="Vintage Mode"), - "Greed": LLLocation(117, LLLocCat.BADGE, 3, "Menu", flags=["LONG"], base_item="Infinite Gems"), - "Monster Slayin'": LLLocation(118, LLLocCat.BADGE, 4, "Menu", flags=["LONG"], base_item="Sidekick"), + "Greed": LLLocation(117, LLLocCat.BADGE, 3, "Menu", flags=LLFlags.LONG, base_item="Infinite Gems"), + "Monster Slayin'": LLLocation(118, LLLocCat.BADGE, 4, "Menu", flags=LLFlags.LONG, base_item="Sidekick"), "Monster Poundin'": LLLocation(119, LLLocCat.BADGE, 5, "Menu", base_item="Hardcore Mode"), "Ghostbustin'": LLLocation(120, LLLocCat.BADGE, 6, "Haunted Tower Roof", base_item="Homing Shots"), "Lookin'": LLLocation(121, LLLocCat.BADGE, 7, "The Witch's Cabin", base_item="20/20 Vision"), "Ultimate Victory": LLLocation( - 122, LLLocCat.BADGE, 8, "The Evilizer", flags=["POSTGAME"], base_item="Ultimate Firepower" + 122, LLLocCat.BADGE, 8, "The Evilizer", flags=LLFlags.POSTGAME, base_item="Ultimate Firepower" ), "Kickin'": LLLocation(123, LLLocCat.BADGE, 9, "Loony Ball", base_item="Surprise Mode"), "Boss Bashin'": LLLocation(124, LLLocCat.BADGE, 10, "Boss Bash", base_item="Combo-Bombo"), @@ -726,7 +739,7 @@ "Animal Control": LLLocation(128, LLLocCat.BADGE, 14, "The Wolf Den", base_item="Play As Werewolf"), "Annoyance": LLLocation(129, LLLocCat.BADGE, 15, "The Witch's Cabin", base_item="Play As Toad"), "Civic Duty": LLLocation(130, LLLocCat.BADGE, 16, "A Gloomy Cavern", base_item="Enemy Overload"), - "Winnin'": LLLocation(131, LLLocCat.BADGE, 17, "The Evilizer", flags=["POSTGAME"], base_item="Crystal Ball"), + "Winnin'": LLLocation(131, LLLocCat.BADGE, 17, "The Evilizer", flags=LLFlags.POSTGAME, base_item="Crystal Ball"), "Combo Plate": LLLocation(132, LLLocCat.BADGE, 18, "Menu", base_item="Radar"), "Cleanin' Up": LLLocation(133, LLLocCat.BADGE, 19, "Rocky Cliffs", base_item="Heavy Hitter"), "Findin'": LLLocation(134, LLLocCat.BADGE, 20, "The Wolf Den", base_item="Rapid Fire"), @@ -735,12 +748,12 @@ LLLocCat.BADGE, 21, "Survival", - flags=["LONG_VANILLA_BADGES", "VANILLA_POSTGAME"], + flags=LLFlags.LONG_VANILLA_BADGES | LLFlags.VANILLA_POSTGAME, base_item="Touch Of Death", ), "Huntin'": LLLocation(136, LLLocCat.BADGE, 22, "Halloween Hill", base_item="All Access Pass"), "Advanced Winnin'": LLLocation( - 137, LLLocCat.BADGE, 23, "Menu", flags=["LONG", "POSTGAME"], base_item="Terror Mode" + 137, LLLocCat.BADGE, 23, "Menu", flags=LLFlags.LONG | LLFlags.POSTGAME, base_item="Terror Mode" ), "Survivin'": LLLocation(138, LLLocCat.BADGE, 24, "Survival", base_item="Save Anywhere"), "Puppy Poundin'": LLLocation(139, LLLocCat.BADGE, 25, "Larry's Lair", base_item="Guided Shots"), @@ -749,42 +762,58 @@ LLLocCat.BADGE, 26, "The Evilizer", - flags=["LONG_VANILLA_BADGES", "MULTISAVE", "POSTGAME"], + flags=LLFlags.LONG_VANILLA_BADGES | LLFlags.MULTISAVE | LLFlags.POSTGAME, base_item="Kick The Cat!", ), "Frankenfryin'": LLLocation(141, LLLocCat.BADGE, 27, "Frankenjulie's Laboratory", base_item="Slo-Mo"), "Combo Magic": LLLocation(142, LLLocCat.BADGE, 28, "Survival", base_item="Infinite Survival"), "Hedge Clippin'": LLLocation(143, LLLocCat.BADGE, 29, "Slurpy Swamp Mud", base_item="Frog-o-rama"), "R-R-R-Remix!": LLLocation( - 144, LLLocCat.BADGE, 30, "Menu", flags=["REMIX", "LONG", "POSTGAME"], base_item="Play As Summony" + 144, + LLLocCat.BADGE, + 30, + "Menu", + flags=LLFlags.REMIX | LLFlags.LONG | LLFlags.POSTGAME, + base_item="Play As Summony", ), "Witchcraft": LLLocation( - 145, LLLocCat.BADGE, 31, "Menu", flags=["LONG", "MULTISAVE"], base_item="Play As Ninja Girl" + 145, LLLocCat.BADGE, 31, "Menu", flags=LLFlags.LONG | LLFlags.MULTISAVE, base_item="Play As Ninja Girl" ), "Ninjitsu": LLLocation( - 146, LLLocCat.BADGE, 32, "Menu", flags=["LONG_VANILLA_BADGES", "MULTISAVE"], base_item="Molecular Dispersion" + 146, + LLLocCat.BADGE, + 32, + "Menu", + flags=LLFlags.LONG_VANILLA_BADGES | LLFlags.MULTISAVE, + base_item="Molecular Dispersion", + ), + "Stayin' Alive": LLLocation( + 147, LLLocCat.BADGE, 33, "Survival", flags=LLFlags.LONG, base_item="Guaranteed Survival" ), - "Stayin' Alive": LLLocation(147, LLLocCat.BADGE, 33, "Survival", flags=["LONG"], base_item="Guaranteed Survival"), "Hooliganin'": LLLocation(148, LLLocCat.BADGE, 34, "Loony Ball", base_item="Bend It Like Bouapha"), - "Swampdoggin'": LLLocation(149, LLLocCat.BADGE, 35, "Menu", flags=["LONG", "MULTISAVE"], base_item="Stinky Farley"), - "Scorin'": LLLocation(150, LLLocCat.BADGE, 36, "The Evilizer", flags=["LONG"], base_item="Ultra Weapons Are Go!"), + "Swampdoggin'": LLLocation( + 149, LLLocCat.BADGE, 35, "Menu", flags=LLFlags.LONG | LLFlags.MULTISAVE, base_item="Stinky Farley" + ), + "Scorin'": LLLocation( + 150, LLLocCat.BADGE, 36, "The Evilizer", flags=LLFlags.LONG, base_item="Ultra Weapons Are Go!" + ), "Brawlin'": LLLocation( 151, LLLocCat.BADGE, 37, "Benny's Cocktails", - flags=["LONG_VANILLA_BADGES", "OP", "VANILLA_POSTGAME"], + flags=LLFlags.LONG_VANILLA_BADGES | LLFlags.OP | LLFlags.VANILLA_POSTGAME, base_item="Thorns Aura", ), "Minin' For Treasure": LLLocation( - 152, LLLocCat.BADGE, 38, "Menu", flags=["REMIX"], base_item="Monster Regeneration" + 152, LLLocCat.BADGE, 38, "Menu", flags=LLFlags.REMIX, base_item="Monster Regeneration" ), "Digitally Masterin'": LLLocation( 153, LLLocCat.BADGE, 39, "Menu", - flags=["LONG", "REMIX", "MULTISAVE", "POSTGAME", "LONG_VANILLA_BADGES"], + flags=LLFlags.LONG | LLFlags.REMIX | LLFlags.MULTISAVE | LLFlags.POSTGAME | LLFlags.LONG_VANILLA_BADGES, base_item="Farley Free Zone", ), "Tree Trimming Reward": LLLocation(154, LLLocCat.REWARD, VAR_TREEREWARD, "A Cabin Trees"), @@ -912,16 +941,24 @@ def set_rules(multiworld, world): def set_entrance_rules(multiworld, world): loonyland_entrance_table: list[LLEntrance] = [ LLEntrance("Menu", "Halloween Hill", False), - LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", world.player), flags=["MODE"]), - LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", world.player), flags=["MODE"]), LLEntrance( - "Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=["MODE"] + "Menu", "Bowling", False, lambda state: state.has("Bowling Access", world.player), flags=LLFlags.MODE ), LLEntrance( - "Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=["MODE"] + "Menu", "Survival", False, lambda state: state.has("Survival Access", world.player), flags=LLFlags.MODE ), LLEntrance( - "Menu", "Remix", False, lambda state: state.has("Remix Access", world.player), flags=["MODE", "REMIX"] + "Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=LLFlags.MODE + ), + LLEntrance( + "Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=LLFlags.MODE + ), + LLEntrance( + "Menu", + "Remix", + False, + lambda state: state.has("Remix Access", world.player), + flags=LLFlags.MODE | LLFlags.REMIX, ), LLEntrance("Halloween Hill", "A Cabin Trees", True), LLEntrance("Halloween Hill", "The Witch's Cabin", True), diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 224a508b6b6e..7e8a972c2719 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -14,6 +14,7 @@ from .Data.game_data import ( ll_base_id as loonyland_base_id, ) +from .flags import LLFlags from .items import LLItemCat, LoonylandItem from .locations import LLLocCat, LoonylandLocation from .options import LoonylandOptions, WinCondition @@ -61,9 +62,9 @@ class LoonylandWorld(World): for name, data in loony_item_table.items() if VAR_WBOMBS <= data.id - loonyland_base_id <= VAR_WHOTPANTS }, - "power": {name for name, data in loony_item_table.items() if "PWR" in data.flags}, - "power_big": {name for name, data in loony_item_table.items() if "PWR_BIG" in data.flags}, - "power_max": {name for name, data in loony_item_table.items() if "PWR_MAX" in data.flags}, + "power": {name for name, data in loony_item_table.items() if LLFlags.PWR in data.flags}, + "power_big": {name for name, data in loony_item_table.items() if LLFlags.PWR_BIG in data.flags}, + "power_max": {name for name, data in loony_item_table.items() if LLFlags.PWR_MAX in data.flags}, } location_name_groups = { diff --git a/worlds/loonyland/entrances.py b/worlds/loonyland/entrances.py index 04d5b7ea0ea3..2bd2624104e1 100644 --- a/worlds/loonyland/entrances.py +++ b/worlds/loonyland/entrances.py @@ -4,6 +4,7 @@ from worlds.generic.Rules import CollectionRule +from .flags import LLFlags from .options import Badges, LoonylandOptions, Remix @@ -15,13 +16,12 @@ class LLEntrance(NamedTuple): source_region: str target_region: str is_real_loading_zone: bool - # rule: typing.Callable[[player, state], bool] rule: CollectionRule = lambda state: True - flags: list[str] = [] + flags: LLFlags = LLFlags.NONE def can_create(self, options: LoonylandOptions) -> bool: - if options.badges == Badges.option_none and "MODE" in self.flags: + if options.badges == Badges.option_none and LLFlags.MODE in self.flags: return False - if options.remix == Remix.option_excluded and "REMIX" in self.flags: + if options.remix == Remix.option_excluded and LLFlags.REMIX in self.flags: return False return True diff --git a/worlds/loonyland/flags.py b/worlds/loonyland/flags.py new file mode 100644 index 000000000000..c2c812d0838a --- /dev/null +++ b/worlds/loonyland/flags.py @@ -0,0 +1,21 @@ +from enum import Flag, auto + + +class LLFlags(Flag): + NONE = 0 + PWR = auto() + PWR_BIG = auto() + PWR_MAX = auto() + OP = auto() + + TORCH = auto() + + DOLL = auto() + LONG = auto() + LONG_VANILLA_BADGES = auto() + MULTISAVE = auto() + POSTGAME = auto() + VANILLA_POSTGAME = auto() + + MODE = auto() + REMIX = auto() diff --git a/worlds/loonyland/items.py b/worlds/loonyland/items.py index 19a79bb82b00..603ebb82e111 100644 --- a/worlds/loonyland/items.py +++ b/worlds/loonyland/items.py @@ -3,6 +3,7 @@ from BaseClasses import Item, ItemClassification +from .flags import LLFlags from .options import ( Badges, LongChecks, @@ -37,20 +38,20 @@ class LLItem(NamedTuple): category: LLItemCat classification: ItemClassification frequency: int = 1 - flags: list[str] = [] + flags: LLFlags = LLFlags.NONE def can_create(self, options: LoonylandOptions) -> bool: if (self.category == LLItemCat.CHEAT and options.badges == Badges.option_vanilla) or ( self.category == LLItemCat.DOLL and options.dolls == MonsterDolls.option_vanilla ): return False - if options.overpowered_cheats == OverpoweredCheats.option_excluded and "OP" in self.flags: + if options.overpowered_cheats == OverpoweredCheats.option_excluded and LLFlags.OP in self.flags: return False - if options.remix == Remix.option_excluded and ("REMIX" in self.flags): + if options.remix == Remix.option_excluded and (LLFlags.REMIX in self.flags): return False - if options.multisave == MultipleSaves.option_disabled and ("MULTISAVE" in self.flags): + if options.multisave == MultipleSaves.option_disabled and (LLFlags.MULTISAVE in self.flags): return False - if "TORCH" in self.flags: + if LLFlags.TORCH in self.flags: return False return True @@ -69,13 +70,13 @@ def modified_classification(self, options: LoonylandOptions): return ItemClassification.progression if self.category == LLItemCat.DOLL: # 100% return ItemClassification.progression - if "LONG" in self.flags: # items that are required for long checks + if LLFlags.LONG in self.flags: # items that are required for long checks return ItemClassification.progression if options.badges == Badges.option_none: if self.category == LLItemCat.ACCESS: return ItemClassification.filler if ( - "PWR" in self.flags or "PWR_BIG" in self.flags or "PWR_MAX" in self.flags + LLFlags.PWR in self.flags or LLFlags.PWR_BIG in self.flags or LLFlags.PWR_MAX in self.flags ): # need to be able to kill bosses, eventually an option for this return ItemClassification.progression diff --git a/worlds/loonyland/locations.py b/worlds/loonyland/locations.py index 87117ca47463..d65b60267f4f 100644 --- a/worlds/loonyland/locations.py +++ b/worlds/loonyland/locations.py @@ -3,6 +3,7 @@ from BaseClasses import Location +from .flags import LLFlags from .options import ( Badges, LongChecks, @@ -33,27 +34,29 @@ class LLLocation(NamedTuple): category: LLLocCat map_id: int region: str - flags: list[str] = [] + flags: LLFlags = LLFlags.NONE base_item: str = "" def can_create(self, options: LoonylandOptions) -> bool: if self.category == LLLocCat.BADGE and options.badges == Badges.option_none: return False - if options.dolls == MonsterDolls.option_none and (self.category == LLLocCat.DOLL or "DOLL" in self.flags): + if options.dolls == MonsterDolls.option_none and (self.category == LLLocCat.DOLL or LLFlags.DOLL in self.flags): return False if options.long_checks == LongChecks.option_excluded and ( - "LONG" in self.flags or ("LONG_VANILLA_BADGES" in self.flags and options.badges == Badges.option_vanilla) + LLFlags.LONG in self.flags + or (LLFlags.LONG_VANILLA_BADGES in self.flags and options.badges == Badges.option_vanilla) ): return False - if options.remix == Remix.option_excluded and ("REMIX" in self.flags): + if options.remix == Remix.option_excluded and (LLFlags.REMIX in self.flags): return False - if options.multisave == MultipleSaves.option_disabled and ("MULTISAVE" in self.flags): + if options.multisave == MultipleSaves.option_disabled and (LLFlags.MULTISAVE in self.flags): return False if options.win_condition == WinCondition.option_evilizer and ( - "POSTGAME" in self.flags or ("VANILLA_POSTGAME" in self.flags and options.badges == Badges.option_vanilla) + LLFlags.POSTGAME in self.flags + or (LLFlags.VANILLA_POSTGAME in self.flags and options.badges == Badges.option_vanilla) ): return False - if options.overpowered_cheats == OverpoweredCheats.option_excluded and "OP" in self.flags: + if options.overpowered_cheats == OverpoweredCheats.option_excluded and LLFlags.OP in self.flags: return False return True diff --git a/worlds/loonyland/regions.py b/worlds/loonyland/regions.py index aa4ad63bcafc..9307e9416b01 100644 --- a/worlds/loonyland/regions.py +++ b/worlds/loonyland/regions.py @@ -2,6 +2,7 @@ from BaseClasses import Region +from .flags import LLFlags from .options import Badges, LoonylandOptions, Remix @@ -12,11 +13,11 @@ class LoonylandRegion(Region): class LLRegion(NamedTuple): real: bool map: str = "" - flags: list[str] = [] + flags: LLFlags = LLFlags.NONE def can_create(self, options: LoonylandOptions) -> bool: - if options.badges == Badges.option_none and "MODE" in self.flags: + if options.badges == Badges.option_none and LLFlags.MODE in self.flags: return False - if options.remix == Remix.option_excluded and "REMIX" in self.flags: + if options.remix == Remix.option_excluded and LLFlags.REMIX in self.flags: return False return True From 938105182c1f8ffa94c8a9b8c8c88fe19e530068 Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sun, 12 Jan 2025 10:35:59 -0500 Subject: [PATCH 57/58] remove "world" references from the rules, just pass in player --- worlds/loonyland/Data/game_data.py | 393 +++++++++++++---------------- worlds/loonyland/__init__.py | 2 +- worlds/loonyland/rules.py | 119 ++++----- 3 files changed, 231 insertions(+), 283 deletions(-) diff --git a/worlds/loonyland/Data/game_data.py b/worlds/loonyland/Data/game_data.py index f7583d8d0a21..1f4005d357e9 100644 --- a/worlds/loonyland/Data/game_data.py +++ b/worlds/loonyland/Data/game_data.py @@ -833,105 +833,104 @@ def set_rules(multiworld, world): + player = world.player access_rules: dict[str, CollectionRule] = { - "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", world.player), - "Rocky Cliffs: Rock Corner": lambda state: have_bombs(state, world), - "Witch's Cabin: Bedroom": lambda state: have_light_source(state, world), - "Bog Pit: Top Door": lambda state: state.has("Skull Key", world.player), - "Tunnel: Swampdog Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), - "Tunnel: Scratch Wall": lambda state: have_special_weapon_bullet(state, world), - "Swamp Gas: Scratch Wall": lambda state: have_special_weapon_bullet(state, world), - "Swamp Gas: Bat Door": lambda state: state.has("Bat Key", world.player), - "Swamp Gas: Rock Prison": lambda state: have_bombs(state, world), - "Dusty Crypt: Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), - "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, world), - "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", world.player), - "Under The Lake: Bat Door": lambda state: state.has("Bat Key", world.player), - "Frankenjulie's Reward": lambda state: power_level(state, world, 10), - "Tower: Barracks": lambda state: state.has("Bat Key", world.player), - "PolterGuy's Reward": lambda state: power_level(state, world, 10), - "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", world.player) - and state.has("Skull Key", world.player) - and state.has("Pumpkin Key", world.player), - "Happy Stick: Reward": lambda state: power_level(state, world, 40), - "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", world.player), - "Wolf Den: Vine": lambda state: state.has("Fertilizer", world.player), - "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", world.player), - "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", world.player), - "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", world.player), - "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", world.player) - and can_kill_werewolves(state, world), - "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", world.player) - and can_kill_werewolves(state, world), - "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, world) - and power_level(state, world, 20), - "Roof NE: Stoney the Elder": lambda state: power_level(state, world, 20), - "Roof SW: Drippy the Elder": lambda state: power_level(state, world, 20), - "Roof SE: Toasty the Elder": lambda state: power_level(state, world, 20), - "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", world.player), - "Swampdog Lair: End": lambda state: have_light_source(state, world) and state.has("Fertilizer", world.player), - "Q: Save Halloween Hill": lambda state: power_level(state, world, 30), - "Q: Scaredy Cat": lambda state: state.has("Cat", world.player), - "Q: Mushroom Hunt": lambda state: state.has("Mushroom", world.player, 10), - "Q: Picking Daisies": lambda state: state.has("Doom Daisy", world.player), - "Q: Curse The Darkness": lambda state: state.has("Stick", world.player), - "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, world), - "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, world), - "Q: Mystery Lake": lambda state: state.has("Orb", world.player, 4), - "Q: Beneath The Lake": lambda state: power_level(state, world, 10), - "Q: A True Hero": lambda state: state.has("Fertilizer", world.player) and have_bombs(state, world), - "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, world) and state.has("Silver", world.player), - "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", world.player) - and power_level(state, world, 10), - "Q: Ghostbusting": lambda state: state.has("Doom Daisy", world.player) - and state.has("Mushroom", world.player, 10), - "Q: The Haunted Tower": lambda state: power_level(state, world, 10), - "Q: The Last Gate": lambda state: state.has("Vampire Bust", world.player, 8), - "Q: The Collection": lambda state: can_do_collection(state, world), - "Greed": lambda state: state.can_reach_region("Castle Vampy IV", world.player) - and power_level(state, world, 10), - "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) - and power_level(state, world, 10), - "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", world.player) - and power_level(state, world, 10), - "Animal Control": lambda state: can_kill_werewolves(state, world), - "Cleanin' Up": lambda state: have_many_bombs(state, world), - "Extreme Survivin'": lambda state: state.has("Terror Mode", world.player) and power_level(state, world, 30), - "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", world.player) - and state.can_reach_region("Zombiton", world.player) - and state.can_reach_region("Slurpy Swamp Mud", world.player) - and can_kill_werewolves(state, world), - "Advanced Winnin'": lambda state: hundred_percent(state, world), - "Mad Skeelz": lambda state: state.has("Terror Mode", world.player) and power_level(state, world, 30), - "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", world.player), - "R-R-R-Remix!": lambda state: hundred_percent(state, world) and state.has("Remix Access", world.player), - "Witchcraft": lambda state: state.has("Play As Witch", world.player) - and have_all_weapons(state, world) - and state.can_reach_region("Castle Vampy IV", world.player), - "Ninjitsu": lambda state: state.has("Play As Ninja Girl", world.player) - and have_all_weapons(state, world) - and state.has("Infinite Gems", world.player), - "Stayin' Alive": lambda state: state.has("Infinite Survival", world.player), - "Swampdoggin'": lambda state: state.has("Play As Swampdog", world.player) - and state.can_reach_region("Castle Vampy IV", world.player), - "Scorin'": lambda state: state.has("Boss Bash Access", world.player) and power_level(state, world, 30), - "Brawlin'": lambda state: state.has("Touch Of Death", world.player), - "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", world.player) - and state.has("Remix Access", world.player), - "Digitally Masterin'": lambda state: have_39_badges(state, world), - "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", world.player) - and can_cleanse_crypts(state, world), - "Farmer Reward": lambda state: can_cleanse_crypts(state, world), - "Witch Mushroom Reward": lambda state: state.has("Mushroom", world.player, 10), - "Mayor Reward": lambda state: can_cleanse_crypts(state, world), - "Bat Drop": lambda state: can_reach_bats(state, world), - "Skeleton Drop": lambda state: can_reach_skeleton(state, world), - "Frog Drop": lambda state: can_reach_frog(state, world), - "Ghost Drop": lambda state: can_reach_ghost(state, world) and state.has("Ghost Potion", world.player), - "Mummy Drop": lambda state: can_reach_mummy(state, world), - "Swampdog Drop": lambda state: can_reach_swampdog(state, world), - "Vampire Drop": lambda state: can_reach_vampire(state, world), - "Wolf Drop": lambda state: can_reach_wolves(state, world) and can_kill_werewolves(state, world), + "Rocky Cliffs: Vine": lambda state: state.has("Fertilizer", player), + "Rocky Cliffs: Rock Corner": lambda state: have_bombs(state, player), + "Witch's Cabin: Bedroom": lambda state: have_light_source(state, player), + "Bog Pit: Top Door": lambda state: state.has("Skull Key", player), + "Tunnel: Swampdog Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Tunnel: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), + "Swamp Gas: Scratch Wall": lambda state: have_special_weapon_bullet(state, player), + "Swamp Gas: Bat Door": lambda state: state.has("Bat Key", player), + "Swamp Gas: Rock Prison": lambda state: have_bombs(state, player), + "Dusty Crypt: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Musty Crypt: Maze Room": lambda state: have_special_weapon_bullet(state, player), + "Rusty Crypt: Vine": lambda state: state.has("Fertilizer", player), + "Under The Lake: Bat Door": lambda state: state.has("Bat Key", player), + "Frankenjulie's Reward": lambda state: power_level(state, player, 10), + "Tower: Barracks": lambda state: state.has("Bat Key", player), + "PolterGuy's Reward": lambda state: power_level(state, player, 10), + "Tower Basement: DoorDoorDoorDoorDoorDoor": lambda state: state.has("Bat Key", player) + and state.has("Skull Key", player) + and state.has("Pumpkin Key", player), + "Happy Stick: Reward": lambda state: power_level(state, player, 40), + "Wolf Den: Pumpkin Door": lambda state: state.has("Pumpkin Key", player), + "Wolf Den: Vine": lambda state: state.has("Fertilizer", player), + "Under The Ravine: Left Vine": lambda state: state.has("Fertilizer", player), + "Under The Ravine: Right Vine": lambda state: state.has("Fertilizer", player), + "Creepy Caverns M: Pharaoh Bat Door": lambda state: state.has("Bat Key", player), + "Castle Vampy IV: Ballroom Right": lambda state: state.has("Ghost Potion", player) + and can_kill_werewolves(state, player), + "Castle Vampy IV: Ballroom Left": lambda state: state.has("Ghost Potion", player) + and can_kill_werewolves(state, player), + "Roof NW: Gutsy the Elder": lambda state: have_special_weapon_damage(state, player) + and power_level(state, player, 20), + "Roof NE: Stoney the Elder": lambda state: power_level(state, player, 20), + "Roof SW: Drippy the Elder": lambda state: power_level(state, player, 20), + "Roof SE: Toasty the Elder": lambda state: power_level(state, player, 20), + "Hidey-Hole: Bat Door": lambda state: state.has("Bat Key", player), + "Swampdog Lair: End": lambda state: have_light_source(state, player) and state.has("Fertilizer", player), + "Q: Save Halloween Hill": lambda state: power_level(state, player, 30), + "Q: Scaredy Cat": lambda state: state.has("Cat", player), + "Q: Mushroom Hunt": lambda state: state.has("Mushroom", player, 10), + "Q: Picking Daisies": lambda state: state.has("Doom Daisy", player), + "Q: Curse The Darkness": lambda state: state.has("Stick", player), + "Q: Zombie Stomp": lambda state: can_cleanse_crypts(state, player), + "Q: Smashing Pumpkins": lambda state: can_cleanse_crypts(state, player), + "Q: Mystery Lake": lambda state: state.has("Orb", player, 4), + "Q: Beneath The Lake": lambda state: power_level(state, player, 10), + "Q: A True Hero": lambda state: state.has("Fertilizer", player) and have_bombs(state, player), + "Q: Silver Bullet": lambda state: can_cleanse_crypts(state, player) and state.has("Silver", player), + "Q: Hairy Larry": lambda state: state.can_reach_region("Larry's Lair", player) + and power_level(state, player, 10), + "Q: Ghostbusting": lambda state: state.has("Doom Daisy", player) and state.has("Mushroom", player, 10), + "Q: The Haunted Tower": lambda state: power_level(state, player, 10), + "Q: The Last Gate": lambda state: state.has("Vampire Bust", player, 8), + "Q: The Collection": lambda state: can_do_collection(state, player), + "Greed": lambda state: state.can_reach_region("Castle Vampy IV", player) and power_level(state, player, 10), + "Monster Slayin'": lambda state: state.can_reach_region("Castle Vampy IV", player) + and power_level(state, player, 10), + "Monster Poundin'": lambda state: state.can_reach_region("Castle Vampy IV", player) + and power_level(state, player, 10), + "Animal Control": lambda state: can_kill_werewolves(state, player), + "Cleanin' Up": lambda state: have_many_bombs(state, player), + "Extreme Survivin'": lambda state: state.has("Terror Mode", player) and power_level(state, player, 30), + "Huntin'": lambda state: state.can_reach_region("Rocky Cliffs", player) + and state.can_reach_region("Zombiton", player) + and state.can_reach_region("Slurpy Swamp Mud", player) + and can_kill_werewolves(state, player), + "Advanced Winnin'": lambda state: hundred_percent(state, player), + "Mad Skeelz": lambda state: state.has("Terror Mode", player) and power_level(state, player, 30), + "Hedge Clippin'": lambda state: state.can_reach_region("Vampy Land", player), + "R-R-R-Remix!": lambda state: hundred_percent(state, player) and state.has("Remix Access", player), + "Witchcraft": lambda state: state.has("Play As Witch", player) + and have_all_weapons(state, player) + and state.can_reach_region("Castle Vampy IV", player), + "Ninjitsu": lambda state: state.has("Play As Ninja Girl", player) + and have_all_weapons(state, player) + and state.has("Infinite Gems", player), + "Stayin' Alive": lambda state: state.has("Infinite Survival", player), + "Swampdoggin'": lambda state: state.has("Play As Swampdog", player) + and state.can_reach_region("Castle Vampy IV", player), + "Scorin'": lambda state: state.has("Boss Bash Access", player) and power_level(state, player, 30), + "Brawlin'": lambda state: state.has("Touch Of Death", player), + "Minin' For Treasure": lambda state: state.can_reach_region("Abandoned Mines", player) + and state.has("Remix Access", player), + "Digitally Masterin'": lambda state: have_39_badges(state, player), + "Larry's Wife Reward": lambda state: state.can_reach_region("Larry's Lair", player) + and can_cleanse_crypts(state, player), + "Farmer Reward": lambda state: can_cleanse_crypts(state, player), + "Witch Mushroom Reward": lambda state: state.has("Mushroom", player, 10), + "Mayor Reward": lambda state: can_cleanse_crypts(state, player), + "Bat Drop": lambda state: can_reach_bats(state, player), + "Skeleton Drop": lambda state: can_reach_skeleton(state, player), + "Frog Drop": lambda state: can_reach_frog(state, player), + "Ghost Drop": lambda state: can_reach_ghost(state, player) and state.has("Ghost Potion", player), + "Mummy Drop": lambda state: can_reach_mummy(state, player), + "Swampdog Drop": lambda state: can_reach_swampdog(state, player), + "Vampire Drop": lambda state: can_reach_vampire(state, player), + "Wolf Drop": lambda state: can_reach_wolves(state, player) and can_kill_werewolves(state, player), } for loc in multiworld.get_locations(world.player): if loc.name in access_rules: @@ -939,26 +938,17 @@ def set_rules(multiworld, world): def set_entrance_rules(multiworld, world): + player = world.player loonyland_entrance_table: list[LLEntrance] = [ LLEntrance("Menu", "Halloween Hill", False), + LLEntrance("Menu", "Bowling", False, lambda state: state.has("Bowling Access", player), flags=LLFlags.MODE), + LLEntrance("Menu", "Survival", False, lambda state: state.has("Survival Access", player), flags=LLFlags.MODE), + LLEntrance("Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", player), flags=LLFlags.MODE), LLEntrance( - "Menu", "Bowling", False, lambda state: state.has("Bowling Access", world.player), flags=LLFlags.MODE + "Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", player), flags=LLFlags.MODE ), LLEntrance( - "Menu", "Survival", False, lambda state: state.has("Survival Access", world.player), flags=LLFlags.MODE - ), - LLEntrance( - "Menu", "Boss Bash", False, lambda state: state.has("Boss Bash Access", world.player), flags=LLFlags.MODE - ), - LLEntrance( - "Menu", "Loony Ball", False, lambda state: state.has("Loony Ball Access", world.player), flags=LLFlags.MODE - ), - LLEntrance( - "Menu", - "Remix", - False, - lambda state: state.has("Remix Access", world.player), - flags=LLFlags.MODE | LLFlags.REMIX, + "Menu", "Remix", False, lambda state: state.has("Remix Access", player), flags=LLFlags.MODE | LLFlags.REMIX ), LLEntrance("Halloween Hill", "A Cabin Trees", True), LLEntrance("Halloween Hill", "The Witch's Cabin", True), @@ -969,7 +959,7 @@ def set_entrance_rules(multiworld, world): LLEntrance("Slurpy Swamp Mud East Warp", "Swamp Gas Cavern", True), LLEntrance("Slurpy Swamp Mud", "Slurpy Swamp Mud North Warp", False), LLEntrance("Slurpy Swamp Mud North Warp", "Swamp Gas Cavern Back", True), - LLEntrance("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", world.player)), + LLEntrance("Halloween Hill", "A Tiny Cabin", True, lambda state: state.has("Skull Key", player)), LLEntrance("Halloween Hill", "The Witch's Cabin Back", True), LLEntrance("Zombiton", "A Cabin Seer", True), LLEntrance("Zombiton", "Benny's Cocktails", True), @@ -977,21 +967,17 @@ def set_entrance_rules(multiworld, world): LLEntrance("Zombiton", "Musty Crypt Entrance", True), LLEntrance("Zombiton", "A Messy Cabin", True), LLEntrance("Halloween Hill", "Rusty Crypt Entrance", True), - LLEntrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", world.player, 4)), - LLEntrance( - "Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", world.player) - ), + LLEntrance("Halloween Hill", "Under The Lake Entrance", True, lambda state: state.has("Orb", player, 4)), + LLEntrance("Halloween Hill", "Haunted Tower Entrance", True, lambda state: state.has("Ghost Potion", player)), LLEntrance("Rocky Cliffs", "Abandoned Mines Entrance", True), LLEntrance("Rocky Cliffs", "The Shrine Of Bombulus", True), - LLEntrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, world)), - LLEntrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", world.player)), + LLEntrance("Rocky Cliffs", "A Gloomy Cavern Entrance", True, lambda state: have_light_source(state, player)), + LLEntrance("Halloween Hill", "Happy Stick Woods", True, lambda state: state.has("Happy Stick", player)), LLEntrance("Zombiton", "A Cabin Larry", True), LLEntrance("Halloween Hill", "The Wolf Den Entrance", True), + LLEntrance("Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", player)), LLEntrance( - "Rocky Cliffs", "Upper Creepy Caverns Left Warp", True, lambda state: state.has("Bombs", world.player) - ), - LLEntrance( - "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, world) + "Rocky Cliffs", "Creepy Caverns Left Bottom Warp", True, lambda state: have_light_source(state, player) ), LLEntrance("Vampy Land", "Creepy Caverns Right Bottom Warp", True), LLEntrance("Vampy Land", "Castle Vampy", True), @@ -1012,17 +998,17 @@ def set_entrance_rules(multiworld, world): LLEntrance("A Cabin Seer", "Zombiton", True), LLEntrance("Benny's Cocktails", "Zombiton", True), LLEntrance("Benny's Cocktails", "Underground Tunnel Zombie", True), - LLEntrance("Dusty Crypt Entrance", "Dusty Crypt", False, lambda state: have_light_source(state, world)), + LLEntrance("Dusty Crypt Entrance", "Dusty Crypt", False, lambda state: have_light_source(state, player)), LLEntrance("Dusty Crypt Entrance", "Halloween Hill", True), LLEntrance("Dusty Crypt", "Dusty Crypt Entrance", False), - LLEntrance("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, world)), + LLEntrance("Musty Crypt Entrance", "Musty Crypt", True, lambda state: have_light_source(state, player)), LLEntrance("Musty Crypt Entrance", "Zombiton", True), LLEntrance("Musty Crypt", "Musty Crypt Entrance", False), - LLEntrance("Rusty Crypt Entrance", "Rusty Crypt", False, lambda state: have_light_source(state, world)), + LLEntrance("Rusty Crypt Entrance", "Rusty Crypt", False, lambda state: have_light_source(state, player)), LLEntrance("Rusty Crypt Entrance", "Halloween Hill", True), LLEntrance("Rusty Crypt", "Rusty Crypt Entrance", False), LLEntrance("A Messy Cabin", "Zombiton", True), - LLEntrance("Under The Lake Entrance", "Under The Lake", False, lambda state: have_light_source(state, world)), + LLEntrance("Under The Lake Entrance", "Under The Lake", False, lambda state: have_light_source(state, player)), LLEntrance("Under The Lake Entrance", "Halloween Hill", True), LLEntrance("Under The Lake", "Under The Lake Entrance", False), LLEntrance("Under The Lake", "Under The Lake Exit", False), @@ -1039,9 +1025,9 @@ def set_entrance_rules(multiworld, world): "Haunted Tower", "Haunted Tower Stairs Down", False, - lambda state: state.has("Bat Key", world.player) - and state.has("Pumpkin Key", world.player) - and state.has("Skull Key", world.player), + lambda state: state.has("Bat Key", player) + and state.has("Pumpkin Key", player) + and state.has("Skull Key", player), ), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower Floor 2 Entrance", True), LLEntrance("Haunted Tower Stairs Up", "Haunted Tower", False), @@ -1049,22 +1035,22 @@ def set_entrance_rules(multiworld, world): "Haunted Tower Stairs Down", "Haunted Tower", False, - lambda state: state.has("Bat Key", world.player) - and state.has("Pumpkin Key", world.player) - and state.has("Skull Key", world.player), + lambda state: state.has("Bat Key", player) + and state.has("Pumpkin Key", player) + and state.has("Skull Key", player), ), LLEntrance( "Haunted Tower Stairs Down", "Haunted Basement Entrance", True, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance("Haunted Tower Floor 2 Entrance", "Haunted Tower Stairs Up", True), LLEntrance( "Haunted Tower Floor 2 Entrance", "Haunted Tower Floor 2", False, - lambda state: state.has("Ghost Potion", world.player), + lambda state: state.has("Ghost Potion", player), ), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Entrance", False), LLEntrance("Haunted Tower Floor 2", "Haunted Tower Floor 2 Exit", False), @@ -1072,7 +1058,7 @@ def set_entrance_rules(multiworld, world): "Haunted Tower Floor 2 Exit", "Haunted Tower Floor 2", False, - lambda state: state.has("Ghost Potion", world.player), + lambda state: state.has("Ghost Potion", player), ), LLEntrance("Haunted Tower Floor 2 Exit", "Haunted Tower Floor 3 Entrance", True), LLEntrance("Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 2 Exit", True), @@ -1080,7 +1066,7 @@ def set_entrance_rules(multiworld, world): "Haunted Tower Floor 3 Entrance", "Haunted Tower Floor 3", False, - lambda state: state.has("Ghost Potion", world.player), + lambda state: state.has("Ghost Potion", player), ), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Entrance", False), LLEntrance("Haunted Tower Floor 3", "Haunted Tower Floor 3 Exit", False), @@ -1088,21 +1074,25 @@ def set_entrance_rules(multiworld, world): "Haunted Tower Floor 3 Exit", "Haunted Tower Floor 3", False, - lambda state: state.has("Ghost Potion", world.player), + lambda state: state.has("Ghost Potion", player), ), LLEntrance("Haunted Tower Floor 3 Exit", "Haunted Tower Roof", True), LLEntrance("Haunted Tower Roof", "Halloween Hill", True), LLEntrance("Haunted Tower Roof", "Haunted Tower Floor 3", True), LLEntrance("Haunted Basement Entrance", "Haunted Tower Stairs Down", True), LLEntrance( - "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, world) + "Haunted Basement Entrance", "Haunted Basement", False, lambda state: have_light_source(state, player) ), LLEntrance("Haunted Basement", "Haunted Basement Entrance", False), - LLEntrance("Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, world)), + LLEntrance( + "Abandoned Mines Entrance", "Abandoned Mines", False, lambda state: have_light_source(state, player) + ), LLEntrance("Abandoned Mines Entrance", "Rocky Cliffs", True), LLEntrance("Abandoned Mines", "Abandoned Mines Entrance", False), LLEntrance("The Shrine Of Bombulus", "Rocky Cliffs", True), - LLEntrance("A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, world)), + LLEntrance( + "A Gloomy Cavern Entrance", "A Gloomy Cavern", False, lambda state: have_light_source(state, player) + ), LLEntrance("A Gloomy Cavern Entrance", "Rocky Cliffs", True), LLEntrance("A Gloomy Cavern", "A Gloomy Cavern Entrance", False), LLEntrance("Happy Stick Woods", "Halloween Hill", True), @@ -1110,7 +1100,7 @@ def set_entrance_rules(multiworld, world): "The Wolf Den Entrance", "The Wolf Den", False, - lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), + lambda state: can_kill_werewolves(state, player) and have_light_source(state, player), ), LLEntrance("The Wolf Den Entrance", "Halloween Hill", True), LLEntrance("The Wolf Den", "The Wolf Den Entrance", False), @@ -1120,62 +1110,60 @@ def set_entrance_rules(multiworld, world): "The Wolf Den Exit", "The Wolf Den", False, - lambda state: can_kill_werewolves(state, world) and have_light_source(state, world), + lambda state: can_kill_werewolves(state, player) and have_light_source(state, player), ), LLEntrance("A Cabin Larry", "Zombiton", True), - LLEntrance( - "Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", world.player) - ), + LLEntrance("Upper Creepy Caverns Left Warp", "Rocky Cliffs", True, lambda state: state.has("Bombs", player)), LLEntrance( "Upper Creepy Caverns Left Warp", "Upper Creepy Caverns", False, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Left Warp", False), LLEntrance( "Upper Creepy Caverns Middle Warp", "Creepy Caverns Left Top Warp", True, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance( "Upper Creepy Caverns Middle Warp", "Upper Creepy Caverns", False, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Middle Warp", False), LLEntrance( "Upper Creepy Caverns Right Warp", "Creepy Caverns Middle Top Warp", True, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance( "Upper Creepy Caverns Right Warp", "Upper Creepy Caverns", False, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance("Upper Creepy Caverns", "Upper Creepy Caverns Right Warp", False), LLEntrance( - "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, world) + "Under The Ravine", "Creepy Caverns Middle Right Warp", True, lambda state: have_light_source(state, player) ), LLEntrance( - "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, world) + "Under The Ravine", "Creepy Caverns Right Left Warp", True, lambda state: have_light_source(state, player) ), LLEntrance("Creepy Caverns Left Bottom Warp", "Rocky Cliffs", True), LLEntrance( "Creepy Caverns Left Bottom Warp", "Creepy Caverns Left", False, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Bottom Warp", False), LLEntrance("Creepy Caverns Left", "Creepy Caverns Left Top Warp", False), LLEntrance( - "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, world) + "Creepy Caverns Left Top Warp", "Creepy Caverns Left", False, lambda state: have_light_source(state, player) ), LLEntrance("Creepy Caverns Left Top Warp", "Upper Creepy Caverns Middle Warp", False), LLEntrance("Creepy Caverns Middle Top Warp", "Upper Creepy Caverns", True), @@ -1183,27 +1171,27 @@ def set_entrance_rules(multiworld, world): "Creepy Caverns Middle Top Warp", "Creepy Caverns Middle", False, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Top Warp", False), LLEntrance("Creepy Caverns Middle", "Creepy Caverns Middle Right Warp", False), LLEntrance( - "Creepy Caverns Middle Right Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20) + "Creepy Caverns Middle Right Warp", "Under The Ravine", True, lambda state: power_level(state, player, 20) ), LLEntrance( "Creepy Caverns Middle Right Warp", "Creepy Caverns Middle", False, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance( - "Creepy Caverns Right Left Warp", "Under The Ravine", True, lambda state: power_level(state, world, 20) + "Creepy Caverns Right Left Warp", "Under The Ravine", True, lambda state: power_level(state, player, 20) ), LLEntrance( "Creepy Caverns Right Left Warp", "Creepy Caverns Right", False, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Left Warp", False), LLEntrance("Creepy Caverns Right", "Creepy Caverns Right Bottom Warp", False), @@ -1211,28 +1199,20 @@ def set_entrance_rules(multiworld, world): "Creepy Caverns Right Bottom Warp", "Creepy Caverns Right", False, - lambda state: have_light_source(state, world), + lambda state: have_light_source(state, player), ), LLEntrance("Creepy Caverns Right Bottom Warp", "Vampy Land", True), LLEntrance("Castle Vampy", "Halloween Hill", True), - LLEntrance( - "Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", world.player) - ), - LLEntrance( - "Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", world.player) - ), + LLEntrance("Castle Vampy", "Castle Vampy Skull Jail", False, lambda state: state.has("Skull Key", player)), + LLEntrance("Castle Vampy Skull Jail", "Castle Vampy", False, lambda state: state.has("Skull Key", player)), LLEntrance("Castle Vampy Skull Jail", "Castle Vampy II", True), - LLEntrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", world.player, 4)), - LLEntrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", world.player, 4)), - LLEntrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", world.player, 4)), - LLEntrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", world.player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II NE", True, lambda state: state.has("Bat Statue", player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II SE", True, lambda state: state.has("Bat Statue", player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II SW", True, lambda state: state.has("Bat Statue", player, 4)), + LLEntrance("Castle Vampy", "Castle Vampy II NW", True, lambda state: state.has("Bat Statue", player, 4)), LLEntrance("Castle Vampy II", "Castle Vampy Skull Jail", True), - LLEntrance( - "Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", world.player) - ), - LLEntrance( - "Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", world.player) - ), + LLEntrance("Castle Vampy II", "Castle Vampy II Bat Jail", False, lambda state: state.has("Bat Key", player)), + LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy II", False, lambda state: state.has("Bat Key", player)), LLEntrance("Castle Vampy II Bat Jail", "Castle Vampy III", True), LLEntrance("Castle Vampy II NE", "Castle Vampy", True), LLEntrance("Castle Vampy II NE", "Castle Vampy III NE", True), @@ -1245,16 +1225,10 @@ def set_entrance_rules(multiworld, world): LLEntrance("Cabin In The Woods", "Halloween Hill", True), LLEntrance("Castle Vampy III", "Castle Vampy II Bat Jail", True), LLEntrance( - "Castle Vampy III", - "Castle Vampy III Pumpkin Jail", - False, - lambda state: state.has("Pumpkin Key", world.player), + "Castle Vampy III", "Castle Vampy III Pumpkin Jail", False, lambda state: state.has("Pumpkin Key", player) ), LLEntrance( - "Castle Vampy III Pumpkin Jail", - "Castle Vampy III", - False, - lambda state: state.has("Pumpkin Key", world.player), + "Castle Vampy III Pumpkin Jail", "Castle Vampy III", False, lambda state: state.has("Pumpkin Key", player) ), LLEntrance("Castle Vampy III Pumpkin Jail", "Castle Vampy IV", True), LLEntrance("Castle Vampy III NE", "Castle Vampy II NE", True), @@ -1267,10 +1241,7 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy III NW", "Castle Vampy IV NW", True), LLEntrance("Castle Vampy IV", "Castle Vampy III Pumpkin Jail", True), LLEntrance( - "Castle Vampy IV", - "The Heart Of Terror Entrance", - True, - lambda state: state.has("Vampire Bust", world.player, 8), + "Castle Vampy IV", "The Heart Of Terror Entrance", True, lambda state: state.has("Vampire Bust", player, 8) ), LLEntrance("Castle Vampy IV NE", "Castle Vampy III NE", True), LLEntrance("Castle Vampy IV NE", "Castle Vampy Roof NE", True), @@ -1287,57 +1258,49 @@ def set_entrance_rules(multiworld, world): LLEntrance("Castle Vampy Roof NW", "Castle Vampy IV NW", True), LLEntrance("The Evilizer", "Halloween Hill", True), LLEntrance( - "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, world) + "The Heart Of Terror Entrance", "The Heart Of Terror", False, lambda state: have_light_source(state, player) ), LLEntrance("The Heart Of Terror", "The Evilizer", True), LLEntrance("The Heart Of Terror", "Empty Rooftop", True), LLEntrance("A Hidey-Hole", "Halloween Hill", True), LLEntrance("Empty Rooftop", "Halloween Hill", True), - LLEntrance("Swampdog Lair Entrance", "Swampdog Lair", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Swampdog Lair Entrance", "Swampdog Lair", False, lambda state: state.has("Boots", player)), LLEntrance("Swampdog Lair", "Swampdog Lair Entrance", True), LLEntrance("Larry's Lair", "Halloween Hill", True), - LLEntrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player)), - LLEntrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", world.player)), - LLEntrance( - "Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) - ), - LLEntrance( - "Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", world.player) - ), + LLEntrance("Halloween Hill", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LLEntrance("Slurpy Swamp Mud", "Halloween Hill", False, lambda state: state.has("Boots", player)), + LLEntrance("Slurpy Swamp Mud North Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), + LLEntrance("Slurpy Swamp Mud East Warp", "Slurpy Swamp Mud", False, lambda state: state.has("Boots", player)), LLEntrance("Zombiton", "Halloween Hill", False), - LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", world.player)), + LLEntrance("Halloween Hill", "Zombiton", False, lambda state: state.has("All Access Pass", player)), LLEntrance( "Halloween Hill", "Rocky Cliffs", False, - lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), + lambda state: state.has("Big Gem", player) or state.has("All Access Pass", player), ), LLEntrance( "Rocky Cliffs", "Halloween Hill", False, - lambda state: state.has("Big Gem", world.player) or state.has("All Access Pass", world.player), - ), - LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", world.player)), - LLEntrance( - "Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", world.player) - ), - LLEntrance( - "Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", world.player) + lambda state: state.has("Big Gem", player) or state.has("All Access Pass", player), ), + LLEntrance("Vampy Land", "Halloween Hill", False, lambda state: state.has("All Access Pass", player)), + LLEntrance("Halloween Hill", "Vampy Land", False, lambda state: state.has("All Access Pass", player)), + LLEntrance("Underground Tunnel", "Underground Tunnel Mud", False, lambda state: state.has("Boots", player)), + LLEntrance("Underground Tunnel Mud", "Underground Tunnel", False, lambda state: state.has("Boots", player)), LLEntrance( - "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", world.player) + "Underground Tunnel Mud", "Underground Tunnel Zombie", False, lambda state: state.has("Boots", player) ), LLEntrance( "Underground Tunnel Zombie", "Underground Tunnel Mud", False, - lambda state: state.has("Boots", world.player) and state.has("All Access Pass", world.player), + lambda state: state.has("Boots", player) and state.has("All Access Pass", player), ), - LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", world.player)), + LLEntrance("Swamp Gas Cavern", "Swamp Gas Cavern Back", False, lambda state: state.has("Boots", player)), LLEntrance( - "Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", world.player) + "Swamp Gas Cavern Back", "Swamp Gas Cavern", False, lambda state: state.has("All Access Pass", player) ), ] for region in multiworld.get_regions(world.player): diff --git a/worlds/loonyland/__init__.py b/worlds/loonyland/__init__.py index 7e8a972c2719..5f1584929dc0 100644 --- a/worlds/loonyland/__init__.py +++ b/worlds/loonyland/__init__.py @@ -134,7 +134,7 @@ def set_rules(self): final_loc = LoonylandLocation( self.player, str(self.options.badges_required.value) + " Badges Earned", None, self.get_region("Menu") ) - final_loc.access_rule = lambda state: have_x_badges(state, self, self.options.badges_required.value) + final_loc.access_rule = lambda state: have_x_badges(state, self.player, self.options.badges_required.value) self.get_region("Menu").locations.append(final_loc) else: # no win con final_loc = self.get_location("Swamp: Outside Luniton") diff --git a/worlds/loonyland/rules.py b/worlds/loonyland/rules.py index 412389f28d17..41700010598a 100644 --- a/worlds/loonyland/rules.py +++ b/worlds/loonyland/rules.py @@ -1,130 +1,115 @@ -from typing import TYPE_CHECKING - from BaseClasses import CollectionState -if TYPE_CHECKING: - from worlds.loonyland import LoonylandWorld +def have_light_source(state: CollectionState, player: int) -> bool: + return state.has("Lantern", player) or state.has("Torch", player) or state.has("20/20 Vision", player) -def have_light_source(state: CollectionState, world: "LoonylandWorld") -> bool: - return ( - state.has("Lantern", world.player) - or state.has("Torch", world.player) - or state.has("20/20 Vision", world.player) - ) +def can_kill_werewolves(state: CollectionState, player: int) -> bool: + return state.has("Silver Sling", player) or state.has("Touch Of Death", player) -def can_kill_werewolves(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.has("Silver Sling", world.player) or state.has("Touch Of Death", world.player) - -def have_bombs(state: CollectionState, world: "LoonylandWorld") -> bool: - return ( - state.has("Bombs", world.player) - or state.has("Combo-Bombo", world.player) - or state.has("Play As Werewolf", world.player) - ) +def have_bombs(state: CollectionState, player: int) -> bool: + return state.has("Bombs", player) or state.has("Combo-Bombo", player) or state.has("Play As Werewolf", player) -def have_many_bombs(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.has("Bombs", world.player) or ( - state.has("Play As Werewolf", world.player) and state.has("Infinite Gems", world.player) - ) +def have_many_bombs(state: CollectionState, player: int) -> bool: + return state.has("Bombs", player) or (state.has("Play As Werewolf", player) and state.has("Infinite Gems", player)) -def have_special_weapon_damage(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), world.player) +def have_special_weapon_damage(state: CollectionState, player: int) -> bool: + return state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) # needed for gutsy -def have_special_weapon_bullet(state: CollectionState, world: "LoonylandWorld") -> bool: +def have_special_weapon_bullet(state: CollectionState, player: int) -> bool: return True # always true as the default character, eventually will be fancier when other starting characters are an option # return ( - # state.has_any(("Bombs", "Ice Spear", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), world.player) + # state.has_any(("Bombs", "Ice Spear", "Cactus", "Boomerang", "Whoopee", "Hot Pants"), player) # ) -def have_special_weapon_range_damage(state: CollectionState, world: "LoonylandWorld") -> bool: +def have_special_weapon_range_damage(state: CollectionState, player: int) -> bool: return True # always true as the default character # return ( - # state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang"), world.player) + # state.has_any(("Bombs", "Shock Wand", "Cactus", "Boomerang"), player) # ) -def have_special_weapon_through_walls(state: CollectionState, world: "LoonylandWorld") -> bool: +def have_special_weapon_through_walls(state: CollectionState, player: int) -> bool: return ( - state.has_any(("Bombs", "Shock Wand", "Whoopee"), world.player) + state.has_any(("Bombs", "Shock Wand", "Whoopee"), player) # state.has("Hot Pants") technically possible, but only on diagonals ) -def can_cleanse_crypts(state: CollectionState, world: "LoonylandWorld") -> bool: +def can_cleanse_crypts(state: CollectionState, player: int) -> bool: return ( - have_light_source(state, world) - and have_special_weapon_range_damage(state, world) - and state.can_reach_region("Musty Crypt", world.player) - and state.can_reach_region("Dusty Crypt", world.player) - and state.can_reach_region("Rusty Crypt", world.player) + have_light_source(state, player) + and have_special_weapon_range_damage(state, player) + and state.can_reach_region("Musty Crypt", player) + and state.can_reach_region("Dusty Crypt", player) + and state.can_reach_region("Rusty Crypt", player) ) -def hundred_percent(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.has_group("physical_items", world.player, 105) +def hundred_percent(state: CollectionState, player: int) -> bool: + return state.has_group("physical_items", player, 105) -def have_x_badges(state: CollectionState, world: "LoonylandWorld", count: int) -> bool: - return state.has("BadgeEarned", world.player, count) +def have_x_badges(state: CollectionState, player: int, count: int) -> bool: + return state.has("BadgeEarned", player, count) -def have_39_badges(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.has("BadgeEarned", world.player, 39) +def have_39_badges(state: CollectionState, player: int) -> bool: + return state.has("BadgeEarned", player, 39) -def have_all_weapons(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.has_group("special_weapons", world.player, 7) +def have_all_weapons(state: CollectionState, player: int) -> bool: + return state.has_group("special_weapons", player, 7) -def can_reach_bats(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.can_reach_region("The Shrine Of Bombulus", world.player) +def can_reach_bats(state: CollectionState, player: int) -> bool: + return state.can_reach_region("The Shrine Of Bombulus", player) -def can_reach_skeleton(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.can_reach_region("Halloween Hill", world.player) +def can_reach_skeleton(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Halloween Hill", player) -def can_reach_frog(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.can_reach_region("Halloween Hill", world.player) +def can_reach_frog(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Halloween Hill", player) -def can_reach_ghost(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.can_reach_region("Haunted Tower", world.player) +def can_reach_ghost(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Haunted Tower", player) -def can_reach_mummy(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.can_reach_region("Rocky Cliffs", world.player) +def can_reach_mummy(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Rocky Cliffs", player) -def can_reach_swampdog(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.can_reach_region("Halloween Hill", world.player) +def can_reach_swampdog(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Halloween Hill", player) -def can_reach_vampire(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.can_reach_region("Castle Vampy", world.player) +def can_reach_vampire(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Castle Vampy", player) -def can_reach_wolves(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.can_reach_region("Halloween Hill", world.player) +def can_reach_wolves(state: CollectionState, player: int) -> bool: + return state.can_reach_region("Halloween Hill", player) -def can_do_collection(state: CollectionState, world: "LoonylandWorld") -> bool: - return state.has_group_unique("monster_dolls", world.player, 8) +def can_do_collection(state: CollectionState, player: int) -> bool: + return state.has_group_unique("monster_dolls", player, 8) -def power_level(state: CollectionState, world: "LoonylandWorld", level_goal: int) -> bool: +def power_level(state: CollectionState, player: int, level_goal: int) -> bool: level: int = 0 - level += state.count_group("power", world.player) - level += state.count_group("power_big", world.player) * 5 - level += state.count_group("power_max", world.player) * 50 + level += state.count_group("power", player) + level += state.count_group("power_big", player) * 5 + level += state.count_group("power_max", player) * 50 return level > level_goal From 8214b9c8b93f9a3d50faf56678fd8f5531678d0a Mon Sep 17 00:00:00 2001 From: AutomaticFrenzy Date: Sun, 12 Jan 2025 10:52:24 -0500 Subject: [PATCH 58/58] formatting updates for options descriptions --- worlds/loonyland/options.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/worlds/loonyland/options.py b/worlds/loonyland/options.py index 137d30adc324..b6c25f4b96e3 100644 --- a/worlds/loonyland/options.py +++ b/worlds/loonyland/options.py @@ -4,11 +4,11 @@ class WinCondition(Choice): - """Evilizer: Beat the final boss + """**Evilizer**: Beat the final boss - Badges: Get X merit badges earned + **Badges**: Get X merit badges earned""" - NOT IMPLEMENTED: normal_remix: Beat the final boss in normal and remix""" + #NOT IMPLEMENTED: normal_remix: Beat the final boss in normal and remix""" display_name = "Win Condition" option_evilizer = 0 @@ -40,7 +40,7 @@ class Difficulty(Choice): class LongChecks(Choice): - """Excluded: Remove 100%, 39 badges, swampdog to 50, witch to lvl 9 spells, 5000 gems, + """**Excluded**: Remove 100%, 39 badges, swampdog to 50, witch to lvl 9 spells, 5000 gems, the monster point badges, a true hero Does nothing if badges are already set to none @@ -53,7 +53,7 @@ class LongChecks(Choice): class MultipleSaves(Choice): - """Excluded: Remove badges that require using certain characters/terror mode, + """**Disabled**: Remove badges that require using certain characters/terror mode in adventure mode, removes all "takes effect on new game" cheats""" display_name = "Multiple Saves" @@ -63,7 +63,7 @@ class MultipleSaves(Choice): class Remix(Choice): - """Excluded: Remix mode not included""" + """**Excluded**: Remix mode not included""" display_name = "Remix" option_excluded = 0 @@ -72,7 +72,7 @@ class Remix(Choice): class OverpoweredCheats(Choice): - """Walk Through Walls, Infinite health, Touch of Death + """**Excluded**: Removes Walk Through Walls, Infinite health, Touch of Death Also disables Brawlin' as a location, since it requires Touch of Death""" @@ -83,13 +83,11 @@ class OverpoweredCheats(Choice): class Badges(Choice): - """Full: All badges and their cheats are in logic + """**Full**: All badges and their cheats are in logic - Reasonable: Remove hard to get badges and overpowered cheats + **Vanilla**: Badges aren't randomized, but are in logic - Vanilla: Badges aren't randomized, but are in logic - - None: Badges aren't in logic""" + **None**: Badges aren't in logic""" display_name = "Badges" option_none = 0 @@ -99,11 +97,11 @@ class Badges(Choice): class MonsterDolls(Choice): - """Full: Monsters can drop randomized items, monster dolls can be found at locations + """**Full**: Monsters can drop randomized items, monster dolls can be found at locations - Vanilla: Monsters drop their normal monster doll + **Vanilla**: Monsters drop their normal monster doll - None: Dolls aren't in logic, the collection quest gives nothing""" + **None**: Dolls aren't in logic, the collection quest gives nothing""" display_name = "Monster Dolls" option_none = 0