Logic built and literally have an apworld that can generate a yaml and stuff

This commit is contained in:
MarioSpore
2025-07-28 00:53:04 -04:00
parent c3ddce5b1a
commit 7e06efb1d0
6 changed files with 668 additions and 205 deletions

View File

@@ -1,6 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Archipelago Unittests" type="tests" factoryName="Unittests">
<module name="Archipelago" />
<module name="Grinch-AP" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />

View File

@@ -21,6 +21,12 @@ class GrinchItem(Item):
base_id: int = 42069
return base_id + id if id is not None else None
def __init__(self, name: str, player: int, data: GrinchItemData):
super(GrinchItem, self).__init__(name,data.classification, GrinchItem.get_apid(data.id), player)
self.type = data.item_group
self.item_id = data.id
#allows hinting of items via category
def get_item_names_per_category() -> dict[str, set[str]]:
categories: dict[str, set[str]] = {}
@@ -124,24 +130,24 @@ SLEIGH_PARTS_TABLE: dict[str, GrinchItemData] = {
#Access Keys
KEYS_TABLE: dict[str, GrinchItemData] = {
"Whoville Vacuum Access": GrinchItemData("Vacuum Access", 400, IC.progression,
[GrinchRamData()]),
# "Whoville Vacuum Access": GrinchItemData("Vacuum Access", 400, IC.progression,
# [GrinchRamData()]),
"Who Forest Vacuum Access": GrinchItemData("Vacuum Access", 401, IC.progression,
[GrinchRamData(0x800100AA, binary_bit_pos=3)]),
"Who Dump Vacuum Access": GrinchItemData("Vacuum Access", 402, IC.progression,
[GrinchRamData(0x800100AA, binary_bit_pos=4)]),
"Who Lake Vacuum Access": GrinchItemData("Vacuum Access", 403, IC.progression,
[GrinchRamData(0x800100AA, binary_bit_pos=5)]),
"Progressive Vacuum Access": GrinchItemData("Vacuum Access", 404, IC.progression,
[GrinchRamData()]),
"Spin N' Win Door Unlock": GrinchItemData("Supadow Door Unlocks", 405, IC.progression,
[GrinchRamData()]),
"Dankamania Door Unlock": GrinchItemData("Supadow Door Unlocks", 406, IC.progression,
[GrinchRamData()]),
"The Copter Race Contest Door Unlock": GrinchItemData("Supadow Door Unlocks", 407, IC.progression,
[GrinchRamData()]),
"Progressive Supadow Door Unlock": GrinchItemData("Supadow Door Unlocks", 408, IC.progression,
[GrinchRamData()])
# "Progressive Vacuum Access": GrinchItemData("Vacuum Access", 404, IC.progression,
# [GrinchRamData()]),
# "Spin N' Win Door Unlock": GrinchItemData("Supadow Door Unlocks", 405, IC.progression,
# [GrinchRamData()]),
# "Dankamania Door Unlock": GrinchItemData("Supadow Door Unlocks", 406, IC.progression,
# [GrinchRamData()]),
# "The Copter Race Contest Door Unlock": GrinchItemData("Supadow Door Unlocks", 407, IC.progression,
# [GrinchRamData()]),
# "Progressive Supadow Door Unlock": GrinchItemData("Supadow Door Unlocks", 408, IC.progression,
# [GrinchRamData()])
}
#Misc Items
@@ -155,18 +161,18 @@ MISC_ITEMS_TABLE: dict[str, GrinchItemData] = {
#Traps
TRAPS_TABLE: dict[str, GrinchItemData] = {
"Freeze Trap": GrinchItemData("Traps", 600, IC.trap, [GrinchRamData()]), #alias to Ice Trap for traplink
"Bee Trap": GrinchItemData("Traps", 601, IC.trap, [GrinchRamData()]),
"Electrocution Trap": GrinchItemData("Traps", 602, IC.trap, [GrinchRamData()]),
"Tip Toe Trap": GrinchItemData("Traps", 603, IC.trap, [GrinchRamData()]), #alias to Slowness Trap for traplink
# "Freeze Trap": GrinchItemData("Traps", 600, IC.trap, [GrinchRamData()]), #alias to Ice Trap for traplink
# "Bee Trap": GrinchItemData("Traps", 601, IC.trap, [GrinchRamData()]),
# "Electrocution Trap": GrinchItemData("Traps", 602, IC.trap, [GrinchRamData()]),
# "Tip Toe Trap": GrinchItemData("Traps", 603, IC.trap, [GrinchRamData()]), #alias to Slowness Trap for traplink
"Damage Trap": GrinchItemData("Traps", 604, IC.trap, [GrinchRamData(0x800E8FDC, value=20)]),
"Depletion Trap": GrinchItemData("Traps", 605, IC.trap, [GrinchRamData(0x80010058, value=0)]),
"Dump it to Crumpit": GrinchItemData("Traps", 606, IC.trap, #Alias to Home Trap for traplink
[GrinchRamData(0x80010000, value=0x05), GrinchRamData(0x8008FB94, value=1)]),
"Rocket Spring Trap": GrinchItemData("Traps", 607, IC.trap, [GrinchRamData()]), #alias to Spring Trap for traplink
# "Rocket Spring Trap": GrinchItemData("Traps", 607, IC.trap, [GrinchRamData()]), #alias to Spring Trap for traplink
"Who sent me here?": GrinchItemData("Traps", 608, IC.trap, [GrinchRamData(0x8008FB94, value=1)]), #alias to Home Trap for traplink
"Cutscene Trap": GrinchItemData("Traps", 609, IC.trap, [GrinchRamData()]),
"No Vac Trap": GrinchItemData("Traps", 610, IC.trap, [GrinchRamData()])
# "Cutscene Trap": GrinchItemData("Traps", 609, IC.trap, [GrinchRamData()]),
# "No Vac Trap": GrinchItemData("Traps", 610, IC.trap, [GrinchRamData()])
}
#Movesets

View File

@@ -1,7 +1,8 @@
from typing import NamedTuple, Optional
from RamHandler import GrinchRamData
from BaseClasses import Location
from .RamHandler import GrinchRamData
from BaseClasses import Location, Region
class GrinchLocationData(NamedTuple):
region: str
@@ -15,138 +16,147 @@ class GrinchLocation(Location):
@staticmethod
def get_apid(id: int):
base_id: int = 42069
return base_id + id
return base_id + id if id is not None else None
def __init__(self, player: int, name: str, parent: Region, data: GrinchLocationData):
address = None if data.id is None else GrinchLocation.get_apid(data.id)
super(GrinchLocation, self).__init__(player, name, address=address, parent=parent)
self.code = data.id
self.region = data.region
self.type = data.location_group
self.address = self.address
grinch_locations = {
#Going to use current map id as indicator whether or not you visited a location
#Visitsanity
"Enter Whoville": GrinchLocationData("Visitsanity", 100, [GrinchRamData(0x80010000, value=0x07)]),
"Enter the Post Office": GrinchLocationData("Visitsanity", 101, [GrinchRamData(0x80010000, value=0x0A)]),
"Enter the Town Hall": GrinchLocationData("Visitsanity", 102, [GrinchRamData(0x80010000, value=0x08)]),
"Enter the Countdown-To-Xmas Clock Tower": GrinchLocationData("Visitsanity", 103, [GrinchRamData(0x80010000, value=0x09)]),
"Enter Who Forest": GrinchLocationData("Visitsanity", 104, [GrinchRamData(0x80010000, value=0x0B)]),
"Enter the Ski Resort": GrinchLocationData("Visitsanity", 105, [GrinchRamData(0x80010000, value=0x0C)]),
"Enter the Civic Center": GrinchLocationData("Visitsanity", 106, [GrinchRamData(0x80010000, value=0x0D)]),
"Enter Who Dump": GrinchLocationData("Visitsanity", 107, [GrinchRamData(0x80010000, value=0x0E)]),
"Enter the Guardian's House Mine Field": GrinchLocationData("Visitsanity", 108, [GrinchRamData(0x80010000, value=0x11)]),
"Enter the Power Plant": GrinchLocationData("Visitsanity", 109, [GrinchRamData(0x80010000, value=0x10)]),
"Enter the Generator Building": GrinchLocationData("Visitsanity", 110, [GrinchRamData(0x80010000, value=0x0F)]),
"Enter Who Lake": GrinchLocationData("Visitsanity", 111, [GrinchRamData(0x80010000, value=0x12)]),
"Enter the Submarine World": GrinchLocationData("Visitsanity", 112, [GrinchRamData(0x80010000, value=0x17)]),
"Enter the Scout's Hut": GrinchLocationData("Visitsanity", 113, [GrinchRamData(0x80010000, value=0x13)]),
"Enter the North Shore": GrinchLocationData("Visitsanity", 114, [GrinchRamData(0x80010000, value=0x14)]),
"Enter the Mayor's Villa": GrinchLocationData("Visitsanity", 115, [GrinchRamData(0x80010000, value=0x16)]),
"Enter Whoville": GrinchLocationData("Whoville", "Visitsanity", 100, [GrinchRamData(0x80010000, value=0x07)]),
"Enter the Post Office": GrinchLocationData("Post Office", "Visitsanity", 101, [GrinchRamData(0x80010000, value=0x0A)]),
"Enter the Town Hall": GrinchLocationData("City Hall", "Visitsanity", 102, [GrinchRamData(0x80010000, value=0x08)]),
"Enter the Countdown-To-Xmas Clock Tower": GrinchLocationData("Countdown to X-Mas Clock Tower", "Visitsanity", 103, [GrinchRamData(0x80010000, value=0x09)]),
"Enter Who Forest": GrinchLocationData("Who Forest", "Visitsanity", 104, [GrinchRamData(0x80010000, value=0x0B)]),
"Enter the Ski Resort": GrinchLocationData("Ski Resort", "Visitsanity", 105, [GrinchRamData(0x80010000, value=0x0C)]),
"Enter the Civic Center": GrinchLocationData("Civic Center", "Visitsanity", 106, [GrinchRamData(0x80010000, value=0x0D)]),
"Enter Who Dump": GrinchLocationData("Who Dump", "Visitsanity", 107, [GrinchRamData(0x80010000, value=0x0E)]),
"Enter the Minefield": GrinchLocationData("Minefield", "Visitsanity", 108, [GrinchRamData(0x80010000, value=0x11)]),
"Enter the Power Plant": GrinchLocationData("Power Plant", "Visitsanity", 109, [GrinchRamData(0x80010000, value=0x10)]),
"Enter the Generator Building": GrinchLocationData("Generator Building", "Visitsanity", 110, [GrinchRamData(0x80010000, value=0x0F)]),
"Enter Who Lake": GrinchLocationData("Who Lake", "Visitsanity", 111, [GrinchRamData(0x80010000, value=0x12)]),
"Enter the Submarine World": GrinchLocationData("Submarine World", "Visitsanity", 112, [GrinchRamData(0x80010000, value=0x17)]),
"Enter the Scout's Hut": GrinchLocationData("Scout's Hut", "Visitsanity", 113, [GrinchRamData(0x80010000, value=0x13)]),
"Enter the North Shore": GrinchLocationData("North Shore", "Visitsanity", 114, [GrinchRamData(0x80010000, value=0x14)]),
"Enter the Mayor's Villa": GrinchLocationData("Mayor's Villa", "Visitsanity", 115, [GrinchRamData(0x80010000, value=0x16)]),
#Need to find mission completion address for handful of locations that are not documented.
#Missions that have value are those ones we need to find the check for
#Whoville Missions
"Smashing Snowmen": GrinchLocationData("Whoville Missions", 200, [GrinchRamData(0x8001020C, value=10)]),
"Shuffling The Mail": GrinchLocationData("Whoville Missions", 201, [GrinchRamData(0x800100BE, binary_bit_pos=1)]),
"Painting The Mayor's Posters": GrinchLocationData("Whoville Missions", 202, [GrinchRamData(0x800100C6, value=10)]),
"Launching Eggs Into Houses": GrinchLocationData("Whoville Missions", 203, [GrinchRamData(0x800100C7, value=10)]),
"Modifying The Mayor's Statue": GrinchLocationData("Whoville Missions", 204, [GrinchRamData(0x800100BE, binary_bit_pos=2)]),
"Advancing The Countdown-To-Xmas Clock": GrinchLocationData("Whoville Missions", 205, [GrinchRamData(0x800100BE, binary_bit_pos=3)]),
"Squashing All Gifts in Whoville": GrinchLocationData("Whoville Missions", 206, [GrinchRamData(0x8001005C, value=500)]),
"Smashing Snowmen": GrinchLocationData("Whoville", "Whoville Missions", 200, [GrinchRamData(0x8001020C, value=10)]),
"Shuffling The Mail": GrinchLocationData("Post Office", "Whoville Missions", 201, [GrinchRamData(0x800100BE, binary_bit_pos=1)]),
"Painting The Mayor's Posters": GrinchLocationData("Whoville", "Whoville Missions", 202, [GrinchRamData(0x800100C6, value=10)]),
"Launching Eggs Into Houses": GrinchLocationData("Whoville", "Whoville Missions", 203, [GrinchRamData(0x800100C7, value=10)]),
"Modifying The Mayor's Statue": GrinchLocationData("City Hall", "Whoville Missions", 204, [GrinchRamData(0x800100BE, binary_bit_pos=2)]),
"Advancing The Countdown-To-Xmas Clock": GrinchLocationData("Countdown to X-Mas Clock Tower", "Whoville Missions", 205, [GrinchRamData(0x800100BE, binary_bit_pos=3)]),
# "Squashing All Gifts in Whoville": GrinchLocationData("Whoville", "Whoville Missions", 206, [GrinchRamData(0x8001005C, value=500)]),
#Who Forest Missions
"Making Xmas Trees Droop": GrinchLocationData("Who Forest Missions", 300, [GrinchRamData(0x800100C8, value=10)]),
"Sabotaging Snow Cannon With Glue": GrinchLocationData("Who Forest Missions", 301, [GrinchRamData(0x800100BE, binary_bit_pos=4)]),
"Putting Beehives In Cabins": GrinchLocationData("Who Forest Missions", 302, [GrinchRamData(0x800100CA, value=10)]),
"Sliming The Mayor's Skis": GrinchLocationData("Who Forest Missions", 303, [GrinchRamData(0x800100BE, binary_bit_pos=5)]),
"Replacing The Candles On The Cake With Fireworks": GrinchLocationData("Who Forest Missions", 304, [GrinchRamData(0x800100BE, binary_bit_pos=6)]),
"Squashing All Gifts in Who Forest": GrinchLocationData("Who Forest Missions", 305, [GrinchRamData(0x8001005E, value=750)]),
"Making Xmas Trees Droop": GrinchLocationData("Who Forest", "Who Forest Missions", 300, [GrinchRamData(0x800100C8, value=10)]),
"Sabotaging Snow Cannon With Glue": GrinchLocationData("Who Forest", "Who Forest Missions", 301, [GrinchRamData(0x800100BE, binary_bit_pos=4)]),
"Putting Beehives In Cabins": GrinchLocationData("Who Forest", "Who Forest Missions", 302, [GrinchRamData(0x800100CA, value=10)]),
"Sliming The Mayor's Skis": GrinchLocationData("Ski Resort", "Who Forest Missions", 303, [GrinchRamData(0x800100BE, binary_bit_pos=5)]),
"Replacing The Candles On The Cake With Fireworks": GrinchLocationData("Civic Center", "Who Forest Missions", 304, [GrinchRamData(0x800100BE, binary_bit_pos=6)]),
# "Squashing All Gifts in Who Forest": GrinchLocationData("Who Forest", "Who Forest Missions", 305, [GrinchRamData(0x8001005E, value=750)]),
#Who Dump Missions
"Stealing Food From Birds": GrinchLocationData("Who Dump Missions", 400, [GrinchRamData(0x800100CB, value=10)]),
"Feeding The Computer With Robot Parts": GrinchLocationData("Who Dump Missions", 401, [GrinchRamData(0x800100BF, binary_bit_pos=3)]),
"Infesting The Mayor's House With Rats": GrinchLocationData("Who Dump Missions", 402, [GrinchRamData(0x800100BE, binary_bit_pos=7)]),
"Conducting The Stinky Gas To Who-Bris' Shack": GrinchLocationData("Who Dump Missions", 403, [GrinchRamData(0x800100BE, binary_bit_pos=8)]),
"Shaving Who Dump Guardian": GrinchLocationData("Who Dump Missions", 404, [GrinchRamData(0x800100BF, binary_bit_pos=1)]),
"Short-Circuiting Power-Plant": GrinchLocationData("Who Dump Missions", 405, [GrinchRamData(0x800100BF, binary_bit_pos=2)]),
"Squashing All Gifts in Who Dump": GrinchLocationData("Who Dump Missions", 406, [GrinchRamData(0x80010060, value=750)]),
"Stealing Food From Birds": GrinchLocationData("Who Dump", "Who Dump Missions", 400, [GrinchRamData(0x800100CB, value=10)]),
"Feeding The Computer With Robot Parts": GrinchLocationData("Who Dump", "Who Dump Missions", 401, [GrinchRamData(0x800100BF, binary_bit_pos=3)]),
"Infesting The Mayor's House With Rats": GrinchLocationData("Who Dump", "Who Dump Missions", 402, [GrinchRamData(0x800100BE, binary_bit_pos=7)]),
"Conducting The Stinky Gas To Who-Bris' Shack": GrinchLocationData("Who Dump", "Who Dump Missions", 403, [GrinchRamData(0x800100BE, binary_bit_pos=8)]),
"Shaving Who Dump Guardian": GrinchLocationData("Minefield", "Who Dump Missions", 404, [GrinchRamData(0x800100BF, binary_bit_pos=1)]),
"Short-Circuiting Power-Plant": GrinchLocationData("Generator Building", "Who Dump Missions", 405, [GrinchRamData(0x800100BF, binary_bit_pos=2)]),
# "Squashing All Gifts in Who Dump": GrinchLocationData("Who Dump", "Who Dump Missions", 406, [GrinchRamData(0x80010060, value=750)]),
#Who Lake Missions
"Putting Thistles In Shorts": GrinchLocationData("Who Lake Missions", 500, [GrinchRamData(0x800100E6, value=10)]),
"Sabotaging The Tents": GrinchLocationData("Who Lake Missions", 501, [GrinchRamData(0x800100E5, value=10)]),
"Drilling Holes In Canoes": GrinchLocationData("Who Lake Missions", 502, [GrinchRamData(0x800100EE, value=10)]),
"Modifying The Marine Mobile": GrinchLocationData("Who Lake Missions", 503, [GrinchRamData(0x800100BF, binary_bit_pos=5)]),
"Hooking The Mayor's Bed To The Motorboat": GrinchLocationData("Who Lake Missions", 504, [GrinchRamData(0x800100BF, binary_bit_pos=4)]),
"Squashing All Gifts in Who Lake": GrinchLocationData("Who Lake Missions", 505, [GrinchRamData(0x80010062, value=1000)]),
"Putting Thistles In Shorts": GrinchLocationData("Who Lake", "Who Lake Missions", 500, [GrinchRamData(0x800100E6, value=10)]),
"Sabotaging The Tents": GrinchLocationData("Who Lake", "Who Lake Missions", 501, [GrinchRamData(0x800100E5, value=10)]),
"Drilling Holes In Canoes": GrinchLocationData("North Shore", "Who Lake Missions", 502, [GrinchRamData(0x800100EE, value=10)]),
"Modifying The Marine Mobile": GrinchLocationData("Submarine World", "Who Lake Missions", 503, [GrinchRamData(0x800100BF, binary_bit_pos=5)]),
"Hooking The Mayor's Bed To The Motorboat": GrinchLocationData("Mayor's Villa", "Who Lake Missions", 504, [GrinchRamData(0x800100BF, binary_bit_pos=4)]),
# "Squashing All Gifts in Who Lake": GrinchLocationData("Who Lake", "Who Lake Missions", 505, [GrinchRamData(0x80010062, value=1000)]),
#Need to find binary values for individual blueprints, but all ram addresses are found
#Blueprints
#Binoculars Blueprints
"Binoculars Blueprint - Post Office Roof": GrinchLocationData("Binocular Blueprints", 600, [GrinchRamData(0x80100825, binary_bit_pos=3)]),
"Binoculars Blueprint - City Hall Library - Left Side": GrinchLocationData("Binocular Blueprints", 601, [GrinchRamData(0x8001020B, binary_bit_pos=7)]),
"Binoculars Blueprint - City Hall Library - Front Side": GrinchLocationData("Binocular Blueprints", 602, [GrinchRamData(0x8001020B, binary_bit_pos=6)]),
"Binoculars Blueprint - City Hall Library - Right Side": GrinchLocationData("Binocular Blueprints", 603, [GrinchRamData(0x8001020B, binary_bit_pos=5)]),
"Binoculars Blueprint - Post Office Roof": GrinchLocationData("Whoville", "Binocular Blueprints", 600, [GrinchRamData(0x80100825, binary_bit_pos=3)]),
"Binoculars Blueprint - City Hall Library - Left Side": GrinchLocationData("City Hall", "Binocular Blueprints", 601, [GrinchRamData(0x8001020B, binary_bit_pos=7)]),
"Binoculars Blueprint - City Hall Library - Front Side": GrinchLocationData("City Hall", "Binocular Blueprints", 602, [GrinchRamData(0x8001020B, binary_bit_pos=6)]),
"Binoculars Blueprint - City Hall Library - Right Side": GrinchLocationData("City Hall", "Binocular Blueprints", 603, [GrinchRamData(0x8001020B, binary_bit_pos=5)]),
#Rotten Egg Launcher Blueprints
"Rotten Egg Launcher Blueprint - Outside City Hall": GrinchLocationData("Rotten Egg Launcher Blueprints", 700, [GrinchRamData(0x8001020B, binary_bit_pos=1)]),
"Rotten Egg Launcher Blueprint - Outside Clock Tower": GrinchLocationData("Rotten Egg Launcher Blueprints", 701, [GrinchRamData(0x8001020B, binary_bit_pos=2)]),
"Rotten Egg Launcher Blueprint - Post Office - Front of Silver Door": GrinchLocationData("Rotten Egg Launcher Blueprints", 702, [GrinchRamData(0x8001021C, binary_bit_pos=2)]),
"Rotten Egg Launcher Blueprint - Post Office - After Mission Completion": GrinchLocationData("Rotten Egg Launcher Blueprints", 703, [GrinchRamData(0x8001021C, binary_bit_pos=3)]),
"Rotten Egg Launcher Blueprint - Outside City Hall": GrinchLocationData("Whoville", "Rotten Egg Launcher Blueprints", 700, [GrinchRamData(0x8001020B, binary_bit_pos=1)]),
"Rotten Egg Launcher Blueprint - Outside Clock Tower": GrinchLocationData("Whoville", "Rotten Egg Launcher Blueprints", 701, [GrinchRamData(0x8001020B, binary_bit_pos=2)]),
"Rotten Egg Launcher Blueprint - Post Office - Front of Silver Door": GrinchLocationData("Post Office", "Rotten Egg Launcher Blueprints", 702, [GrinchRamData(0x8001021C, binary_bit_pos=2)]),
"Rotten Egg Launcher Blueprint - Post Office - After Mission Completion": GrinchLocationData("Post Office", "Rotten Egg Launcher Blueprints", 703, [GrinchRamData(0x8001021C, binary_bit_pos=3)]),
#Rocket Spring Blueprints
"Rocket Spring Blueprint - Behind Vacuum": GrinchLocationData("Rocket Spring Blueprints", 800, [GrinchRamData(0x80010243, binary_bit_pos=4)]),
"Rocket Spring Blueprint - Front of 2nd House near entrance": GrinchLocationData("Rocket Spring Blueprints", 801, [GrinchRamData(0x80010243, binary_bit_pos=2)]),
"Rocket Spring Blueprint - Near Tree House on Ground": GrinchLocationData("Rocket Spring Blueprints", 802, [GrinchRamData(0x80010243, binary_bit_pos=5)]),
"Rocket Spring Blueprint - Near Cable Car House": GrinchLocationData("Rocket Spring Blueprints", 804, [GrinchRamData(0x80010242, binary_bit_pos=8)]),
"Rocket Spring Blueprint - Near Who Snowball in Cave": GrinchLocationData("Rocket Spring Blueprints", 805, [GrinchRamData(0x80010242, binary_bit_pos=7)]),
"Rocket Spring Blueprint - Branch Platform Closest to Glue Cannon": GrinchLocationData("Rocket Spring Blueprints", 806, [GrinchRamData(0x80010243, binary_bit_pos=3)]),
"Rocket Spring Blueprint - Branch Platform Near Beast": GrinchLocationData("Rocket Spring Blueprints", 807, [GrinchRamData(0x80010243, binary_bit_pos=1)]),
"Rocket Spring Blueprint - Branch Platform Ledge Grab House": GrinchLocationData("Rocket Spring Blueprints", 808, [GrinchRamData(0x80010243, binary_bit_pos=7)]),
"Rocket Spring Blueprint - On Tree House": GrinchLocationData("Rocket Spring Blueprints", 809, [GrinchRamData(0x80010243, binary_bit_pos=6)]),
"Rocket Spring Blueprint - Behind Vacuum": GrinchLocationData("Who Forest", "Rocket Spring Blueprints", 800, [GrinchRamData(0x80010243, binary_bit_pos=4)]),
"Rocket Spring Blueprint - Front of 2nd House near entrance": GrinchLocationData("Who Forest", "Rocket Spring Blueprints", 801, [GrinchRamData(0x80010243, binary_bit_pos=2)]),
"Rocket Spring Blueprint - Near Tree House on Ground": GrinchLocationData("Who Forest", "Rocket Spring Blueprints", 802, [GrinchRamData(0x80010243, binary_bit_pos=5)]),
"Rocket Spring Blueprint - Near Cable Car House": GrinchLocationData("Who Forest", "Rocket Spring Blueprints", 804, [GrinchRamData(0x80010242, binary_bit_pos=8)]),
"Rocket Spring Blueprint - Near Who Snowball in Cave": GrinchLocationData("Who Forest", "Rocket Spring Blueprints", 805, [GrinchRamData(0x80010242, binary_bit_pos=7)]),
"Rocket Spring Blueprint - Branch Platform Closest to Glue Cannon": GrinchLocationData("Who Forest", "Rocket Spring Blueprints", 806, [GrinchRamData(0x80010243, binary_bit_pos=3)]),
"Rocket Spring Blueprint - Branch Platform Near Beast": GrinchLocationData("Who Forest", "Rocket Spring Blueprints", 807, [GrinchRamData(0x80010243, binary_bit_pos=1)]),
"Rocket Spring Blueprint - Branch Platform Ledge Grab House": GrinchLocationData("Who Forest", "Rocket Spring Blueprints", 808, [GrinchRamData(0x80010243, binary_bit_pos=7)]),
"Rocket Spring Blueprint - On Tree House": GrinchLocationData("Who Forest", "Rocket Spring Blueprints", 809, [GrinchRamData(0x80010243, binary_bit_pos=6)]),
#Slime Shooter Blueprints
"Slime Shooter Blueprint - Branch Platform Elevated House": GrinchLocationData("Slime Shooter Blueprints", 900, [GrinchRamData(0x80010244, binary_bit_pos=4)]),
"Slime Shooter Blueprint - Branch Platform House next to Beast": GrinchLocationData("Slime Shooter Blueprint", 901, [GrinchRamData(0x80010243, binary_bit_pos=8)]),
"Slime Shooter Blueprint - House near Civic Center Cave": GrinchLocationData("Slime Shooter Blueprints", 902, [GrinchRamData(0x80010244, binary_bit_pos=3)]),
"Slime Shooter Blueprint - House next to Tree House": GrinchLocationData("Slime Shooter Blueprints", 903, [GrinchRamData(0x80010244, binary_bit_pos=2)]),
"Slime Shooter Blueprint - House across from Tree House": GrinchLocationData("Slime Shooter Blueprints", 904, [GrinchRamData(0x80010244, binary_bit_pos=6)]),
"Slime Shooter Blueprint - 2nd House near entrance right side": GrinchLocationData("Slime Shooter Blueprints", 905, [GrinchRamData(0x80010244, binary_bit_pos=5)]),
"Slime Shooter Blueprint - 2nd House near entrance left side": GrinchLocationData("Slime Shooter Blueprints", 906, [GrinchRamData(0x80010244, binary_bit_pos=8)]),
"Slime Shooter Blueprint - 2nd House near entrance inbetween blueprints": GrinchLocationData("Slime Shooter Blueprints", 907, [GrinchRamData(0x80010244, binary_bit_pos=7)]),
"Slime Shooter Blueprint - House near entrance": GrinchLocationData("Slime Shooter Blueprints", 908, [GrinchRamData(0x80010244, binary_bit_pos=1)]),
"Slime Shooter Blueprint - Branch Platform Elevated House": GrinchLocationData("Who Forest", "Slime Shooter Blueprints", 900, [GrinchRamData(0x80010244, binary_bit_pos=4)]),
"Slime Shooter Blueprint - Branch Platform House next to Beast": GrinchLocationData("Who Forest", "Slime Shooter Blueprint", 901, [GrinchRamData(0x80010243, binary_bit_pos=8)]),
"Slime Shooter Blueprint - House near Civic Center Cave": GrinchLocationData("Who Forest", "Slime Shooter Blueprints", 902, [GrinchRamData(0x80010244, binary_bit_pos=3)]),
"Slime Shooter Blueprint - House next to Tree House": GrinchLocationData("Who Forest", "Slime Shooter Blueprints", 903, [GrinchRamData(0x80010244, binary_bit_pos=2)]),
"Slime Shooter Blueprint - House across from Tree House": GrinchLocationData("Who Forest", "Slime Shooter Blueprints", 904, [GrinchRamData(0x80010244, binary_bit_pos=6)]),
"Slime Shooter Blueprint - 2nd House near entrance right side": GrinchLocationData("Who Forest", "Slime Shooter Blueprints", 905, [GrinchRamData(0x80010244, binary_bit_pos=5)]),
"Slime Shooter Blueprint - 2nd House near entrance left side": GrinchLocationData("Who Forest", "Slime Shooter Blueprints", 906, [GrinchRamData(0x80010244, binary_bit_pos=8)]),
"Slime Shooter Blueprint - 2nd House near entrance inbetween blueprints": GrinchLocationData("Who Forest", "Slime Shooter Blueprints", 907, [GrinchRamData(0x80010244, binary_bit_pos=7)]),
"Slime Shooter Blueprint - House near entrance": GrinchLocationData("Who Forest", "Slime Shooter Blueprints", 908, [GrinchRamData(0x80010244, binary_bit_pos=1)]),
#Octopus Climbing Device
"Octopus Climbing Device Blueprint - Middle Pipe": GrinchLocationData("Octopus Climbing Device Blueprints", 1001, [GrinchRamData(0x80010252, binary_bit_pos=4)]),
"Octopus Climbing Device Blueprint - Right Pipe": GrinchLocationData("Octopus Climbing Device Blueprints", 1002, [GrinchRamData(0x80010252, binary_bit_pos=6)]),
"Octopus Climbing Device Blueprint - Mayor's House Vent Cage": GrinchLocationData("Octopus Climbing Device Blueprints", 1003, [GrinchRamData(0x80010252, binary_bit_pos=2)]),
"Octopus Climbing Device Blueprint - Left Pipe": GrinchLocationData("Octopus Climbing Device Blueprints", 1004, [GrinchRamData(0x80010252, binary_bit_pos=5)]),
"Octopus Climbing Device Blueprint - Near Power Plant Wall on left side": GrinchLocationData("Octopus Climbing Device Blueprints", 1005, [GrinchRamData(0x80010252, binary_bit_pos=1)]),
"Octopus Climbing Device Blueprint - Near Who-Bris' Shack": GrinchLocationData("Octopus Climbing Device Blueprints", 1006, [GrinchRamData(0x80010252, binary_bit_pos=3)]),
"Octopus Climbing Device Blueprint - Guardian's House - Left side of Guardian House": GrinchLocationData("Octopus Climbing Device Blueprints", 1007, [GrinchRamData(0x8001026E, binary_bit_pos=3)]),
"Octopus Climbing Device Blueprint - Guardian's House - Right side of Guardian House": GrinchLocationData("Octopus Climbing Device Blueprints", 1008, [GrinchRamData(0x8001026E, binary_bit_pos=5)]),
"Octopus Climbing Device Blueprint - Inside Guardian's House": GrinchLocationData("Octopus Climbing Device Blueprints", 1009, [GrinchRamData(0x8001026E, binary_bit_pos=3)]),
"Octopus Climbing Device Blueprint - Middle Pipe": GrinchLocationData("Who Dump", "Octopus Climbing Device Blueprints", 1001, [GrinchRamData(0x80010252, binary_bit_pos=4)]),
"Octopus Climbing Device Blueprint - Right Pipe": GrinchLocationData("Who Dump", "Octopus Climbing Device Blueprints", 1002, [GrinchRamData(0x80010252, binary_bit_pos=6)]),
"Octopus Climbing Device Blueprint - Mayor's House Rat Vent": GrinchLocationData("Who Dump", "Octopus Climbing Device Blueprints", 1003, [GrinchRamData(0x80010252, binary_bit_pos=2)]),
"Octopus Climbing Device Blueprint - Left Pipe": GrinchLocationData("Who Dump", "Octopus Climbing Device Blueprints", 1004, [GrinchRamData(0x80010252, binary_bit_pos=5)]),
"Octopus Climbing Device Blueprint - Near Power Plant Wall on right side": GrinchLocationData("Who Dump", "Octopus Climbing Device Blueprints", 1005, [GrinchRamData(0x80010252, binary_bit_pos=1)]),
"Octopus Climbing Device Blueprint - Near Who-Bris' Shack": GrinchLocationData("Who Dump", "Octopus Climbing Device Blueprints", 1006, [GrinchRamData(0x80010252, binary_bit_pos=3)]),
"Octopus Climbing Device Blueprint - Guardian's House - Left Side": GrinchLocationData("Minefield", "Octopus Climbing Device Blueprints", 1007, [GrinchRamData(0x8001026E, binary_bit_pos=3)]),
"Octopus Climbing Device Blueprint - Guardian's House - Right Side": GrinchLocationData("Minefield", "Octopus Climbing Device Blueprints", 1008, [GrinchRamData(0x8001026E, binary_bit_pos=5)]),
"Octopus Climbing Device Blueprint - Inside Guardian's House": GrinchLocationData("Minefield", "Octopus Climbing Device Blueprints", 1009, [GrinchRamData(0x8001026E, binary_bit_pos=3)]),
#Marine Mobile Blueprints
"Marine Mobile Blueprint - South Shore - Bridge to Scout's Hut": GrinchLocationData("Marine Mobile Blueprints", 1100, [GrinchRamData(0x80010281, binary_bit_pos=6)]),
"Marine Mobile Blueprint - South Shore - Tent near Porcupine": GrinchLocationData("Marine Mobile Blueprints", 1101, [GrinchRamData(0x80010281, binary_bit_pos=7)]),
"Marine Mobile Blueprint - South Shore - Near Scout Shack": GrinchLocationData("Marine Mobile Blueprints", 1102, [GrinchRamData(0x80010281, binary_bit_pos=8)]),
"Marine Mobile Blueprint - South Shore - Under a Hill Bridge": GrinchLocationData("Marine Mobile Blueprints", 1103, [GrinchRamData(0x80010282, binary_bit_pos=1)]),
"Marine Mobile Blueprint - South Shore - Scout's Hut Roof": GrinchLocationData("Marine Mobile Blueprints", 1104, [GrinchRamData(0x80010281, binary_bit_pos=5)]),
"Marine Mobile Blueprint - South Shore - Jump from Boulder": GrinchLocationData("Marine Mobile Blueprints", 1105, [GrinchRamData(0x80010281, binary_bit_pos=3)]),
"Marine Mobile Blueprint - South Shore - Rope Swing by Beast": GrinchLocationData("Marine Mobile Blueprints", 1106, [GrinchRamData(0x80010281, binary_bit_pos=4)]),
"Marine Mobile Blueprint - South Shore - Near Summer Beast": GrinchLocationData("Marine Mobile Blueprints", 1107, [GrinchRamData(0x80010282, binary_bit_pos=2)]),
"Marine Mobile Blueprint - North Shore - Below Bridge": GrinchLocationData("Marine Mobile Blueprints", 1108, [GrinchRamData(0x80010293, binary_bit_pos=1)]),
"Marine Mobile Blueprint - North Shore - Behind Skunk Hut": GrinchLocationData("Marine Mobile Blueprints", 1109, [GrinchRamData(0x80010293, binary_bit_pos=3)]),
"Marine Mobile Blueprint - North Shore - Inside Skunk Hut": GrinchLocationData("Marine Mobile Blueprints", 1110, [GrinchRamData(0x80010292, binary_bit_pos=7)]),
"Marine Mobile Blueprint - North Shore - Fenced in Area": GrinchLocationData("Marine Mobile Blueprints", 1111, [GrinchRamData(0x80010292, binary_bit_pos=8)]),
"Marine Mobile Blueprint - North Shore - Boulder Box near Bridge": GrinchLocationData("Marine Mobile Blueprints", 1112, [GrinchRamData(0x80010293, binary_bit_pos=4)]),
"Marine Mobile Blueprint - North Shore - Boulder Box behind Skunk Hut": GrinchLocationData("Marine Mobile Blueprints", 1113, [GrinchRamData(0x80010293, binary_bit_pos=5)]),
"Marine Mobile Blueprint - North Shore - Inside Drill House": GrinchLocationData("Marine Mobile Blueprints", 1114, [GrinchRamData(0x80010292, binary_bit_pos=6)]),
"Marine Mobile Blueprint - North Shore - Crow Platform": GrinchLocationData("Marine Mobile Blueprints", 1115, [GrinchRamData(0x80010293, binary_bit_pos=2)]),
"Marine Mobile Blueprint - South Shore - Bridge to Scout's Hut": GrinchLocationData("Who Lake", "Marine Mobile Blueprints", 1100, [GrinchRamData(0x80010281, binary_bit_pos=6)]),
"Marine Mobile Blueprint - South Shore - Tent near Porcupine": GrinchLocationData("Who Lake", "Marine Mobile Blueprints", 1101, [GrinchRamData(0x80010281, binary_bit_pos=7)]),
"Marine Mobile Blueprint - South Shore - Near Outhouse": GrinchLocationData("Who Lake", "Marine Mobile Blueprints", 1102, [GrinchRamData(0x80010281, binary_bit_pos=8)]),
"Marine Mobile Blueprint - South Shore - Near Hill Bridge": GrinchLocationData("Who Lake", "Marine Mobile Blueprints", 1103, [GrinchRamData(0x80010282, binary_bit_pos=1)]),
"Marine Mobile Blueprint - South Shore - Scout's Hut Roof": GrinchLocationData("Who Lake", "Marine Mobile Blueprints", 1104, [GrinchRamData(0x80010281, binary_bit_pos=5)]),
"Marine Mobile Blueprint - South Shore - Grass Platform": GrinchLocationData("Who Lake", "Marine Mobile Blueprints", 1105, [GrinchRamData(0x80010281, binary_bit_pos=3)]),
"Marine Mobile Blueprint - South Shore - Zipline by Beast": GrinchLocationData("Who Lake", "Marine Mobile Blueprints", 1106, [GrinchRamData(0x80010281, binary_bit_pos=4)]),
"Marine Mobile Blueprint - South Shore - Behind Summer Beast": GrinchLocationData("Who Lake", "Marine Mobile Blueprints", 1107, [GrinchRamData(0x80010282, binary_bit_pos=2)]),
"Marine Mobile Blueprint - North Shore - Below Bridge": GrinchLocationData("North Shore", "Marine Mobile Blueprints", 1108, [GrinchRamData(0x80010293, binary_bit_pos=1)]),
"Marine Mobile Blueprint - North Shore - Behind Skunk Hut": GrinchLocationData("North Shore", "Marine Mobile Blueprints", 1109, [GrinchRamData(0x80010293, binary_bit_pos=3)]),
"Marine Mobile Blueprint - North Shore - Inside Skunk Hut": GrinchLocationData("North Shore", "Marine Mobile Blueprints", 1110, [GrinchRamData(0x80010292, binary_bit_pos=7)]),
"Marine Mobile Blueprint - North Shore - Fenced in Area": GrinchLocationData("North Shore", "Marine Mobile Blueprints", 1111, [GrinchRamData(0x80010292, binary_bit_pos=8)]),
"Marine Mobile Blueprint - North Shore - Boulder Box near Bridge": GrinchLocationData("North Shore", "Marine Mobile Blueprints", 1112, [GrinchRamData(0x80010293, binary_bit_pos=4)]),
"Marine Mobile Blueprint - North Shore - Boulder Box behind Skunk Hut": GrinchLocationData("North Shore", "Marine Mobile Blueprints", 1113, [GrinchRamData(0x80010293, binary_bit_pos=5)]),
"Marine Mobile Blueprint - North Shore - Inside Drill House": GrinchLocationData("North Shore", "Marine Mobile Blueprints", 1114, [GrinchRamData(0x80010292, binary_bit_pos=6)]),
"Marine Mobile Blueprint - North Shore - Crow Platform near Drill House": GrinchLocationData("North Shore", "Marine Mobile Blueprints", 1115, [GrinchRamData(0x80010293, binary_bit_pos=2)]),
#Grinch Copter Blueprints
"Grinch Copter Blueprint - Whoville City Hall - Safe Room": GrinchLocationData("Grinch Copter Blueprints", 1200, [GrinchRamData(0x8001020B, binary_bit_pos=8)]),
"Grinch Copter Blueprint - Whoville City Hall - Statue Room": GrinchLocationData("Grinch Copter Blueprints", 1201, [GrinchRamData(0x80010220, binary_bit_pos=1)]),
"Grinch Copter Blueprint - Whoville Clock Tower - Before Bells": GrinchLocationData("Grinch Copter Blueprints", 1202, [GrinchRamData(0x80010265, binary_bit_pos=4)]),
"Grinch Copter Blueprint - Whoville Clock Tower - After Bells": GrinchLocationData("Grinch Copter Blueprints", 1203, [GrinchRamData(0x80010265, binary_bit_pos=3)]),
"Grinch Copter Blueprint - Who Forest Ski Resort - Inside Dog's Fence": GrinchLocationData("Grinch Copter Blueprints", 1204, [GrinchRamData(0x80010234, binary_bit_pos=8)]),
"Grinch Copter Blueprint - Who Forest Ski Resort - Max Cave": GrinchLocationData("Grinch Copter Blueprints", 1205, [GrinchRamData(0x80010234, binary_bit_pos=7)]),
"Grinch Copter Blueprint - Who Forest Civic Center - Climb across wall": GrinchLocationData("Grinch Copter Blueprints", 1206, [GrinchRamData(0x8001022A, binary_bit_pos=8)]),
"Grinch Copter Blueprint - Who Forest Civic Center - Shoot the Icicle": GrinchLocationData("Grinch Copter Blueprints", 1207, [GrinchRamData(0x8001022B, binary_bit_pos=1)]),
"Grinch Copter Blueprint - Who Dump Power Plant - First": GrinchLocationData("Grinch Copter Blueprints", 1208, [GrinchRamData(0x80010265, binary_bit_pos=2)]),
"Grinch Copter Blueprint - Who Dump Power Plant - Second Gate": GrinchLocationData("Grinch Copter Blueprints", 1209, [GrinchRamData(0x80010265, binary_bit_pos=3)]),
"Grinch Copter Blueprint - Who Dump Generator Building - Before Mission": GrinchLocationData("Grinch Copter Blueprints", 1210, [GrinchRamData(0x8001026B, binary_bit_pos=1)]),
"Grinch Copter Blueprint - Who Dump Generator Building - After Mission": GrinchLocationData("Grinch Copter Blueprints", 1211, [GrinchRamData(0x8001026B, binary_bit_pos=2)]),
"Grinch Copter Blueprint - Who Lake South Shore - Submarine World - Above Surface": GrinchLocationData("Grinch Copter Blueprints", 1212, [GrinchRamData(0x80010289, binary_bit_pos=4)]),
"Grinch Copter Blueprint - Who Lake South Shore - Submarine World - Underwater": GrinchLocationData("Grinch Copter Blueprints", 1213, [GrinchRamData(0x80010289, binary_bit_pos=5)]),
"Grinch Copter Blueprint - Who Lake North Shore - Mayor's Villa - Tree Branch": GrinchLocationData("Grinch Copter Blueprints", 1214, [GrinchRamData(0x80010275, binary_bit_pos=8)]),
"Grinch Copter Blueprint - Who Lake North Shore - Mayor's Villa - Cave": GrinchLocationData("Grinch Copter Blueprints", 1215, [GrinchRamData(0x80010275, binary_bit_pos=7)]),
"Grinch Copter Blueprint - Whoville City Hall - Safe Room": GrinchLocationData("City Hall", "Grinch Copter Blueprints", 1200, [GrinchRamData(0x8001020B, binary_bit_pos=8)]),
"Grinch Copter Blueprint - Whoville City Hall - Statue Room": GrinchLocationData("City Hall", "Grinch Copter Blueprints", 1201, [GrinchRamData(0x80010220, binary_bit_pos=1)]),
"Grinch Copter Blueprint - Whoville Clock Tower - Before Bells": GrinchLocationData("Countdown to X-Mas Clock Tower", "Grinch Copter Blueprints", 1202, [GrinchRamData(0x80010265, binary_bit_pos=4)]),
"Grinch Copter Blueprint - Whoville Clock Tower - After Bells": GrinchLocationData("Countdown to X-Mas Clock Tower", "Grinch Copter Blueprints", 1203, [GrinchRamData(0x80010265, binary_bit_pos=3)]),
"Grinch Copter Blueprint - Who Forest Ski Resort - Inside Dog's Fence": GrinchLocationData("Ski Resort", "Grinch Copter Blueprints", 1204, [GrinchRamData(0x80010234, binary_bit_pos=8)]),
"Grinch Copter Blueprint - Who Forest Ski Resort - Max Cave": GrinchLocationData("Ski Resort", "Grinch Copter Blueprints", 1205, [GrinchRamData(0x80010234, binary_bit_pos=7)]),
"Grinch Copter Blueprint - Who Forest Civic Center - Climb across Bat Cave wall": GrinchLocationData("Civic Center", "Grinch Copter Blueprints", 1206, [GrinchRamData(0x8001022A, binary_bit_pos=8)]),
"Grinch Copter Blueprint - Who Forest Civic Center - Shoot Icicle in Bat Entrance": GrinchLocationData("Civic Center", "Grinch Copter Blueprints", 1207, [GrinchRamData(0x8001022B, binary_bit_pos=1)]),
"Grinch Copter Blueprint - Who Dump Power Plant - Max Cave": GrinchLocationData("Power Plant", "Grinch Copter Blueprints", 1208, [GrinchRamData(0x80010265, binary_bit_pos=2)]),
"Grinch Copter Blueprint - Who Dump Power Plant - After First Gate": GrinchLocationData("Power Plant", "Grinch Copter Blueprints", 1209, [GrinchRamData(0x80010265, binary_bit_pos=3)]),
"Grinch Copter Blueprint - Who Dump Generator Building - Before Mission": GrinchLocationData("Generator Building", "Grinch Copter Blueprints", 1210, [GrinchRamData(0x8001026B, binary_bit_pos=1)]),
"Grinch Copter Blueprint - Who Dump Generator Building - After Mission": GrinchLocationData("Generator Building", "Grinch Copter Blueprints", 1211, [GrinchRamData(0x8001026B, binary_bit_pos=2)]),
"Grinch Copter Blueprint - Who Lake South Shore - Submarine World - Above Surface": GrinchLocationData("Submarine World", "Grinch Copter Blueprints", 1212, [GrinchRamData(0x80010289, binary_bit_pos=4)]),
"Grinch Copter Blueprint - Who Lake South Shore - Submarine World - Underwater": GrinchLocationData("Submarine World", "Grinch Copter Blueprints", 1213, [GrinchRamData(0x80010289, binary_bit_pos=5)]),
"Grinch Copter Blueprint - Who Lake North Shore - Mayor's Villa - Tree Branch": GrinchLocationData("Mayor's Villa", "Grinch Copter Blueprints", 1214, [GrinchRamData(0x80010275, binary_bit_pos=8)]),
"Grinch Copter Blueprint - Who Lake North Shore - Mayor's Villa - Cave": GrinchLocationData("Mayor's Villa", "Grinch Copter Blueprints", 1215, [GrinchRamData(0x80010275, binary_bit_pos=7)]),
#Sleigh Room Locations
"Stealing All Gifts": GrinchLocationData("Sleigh Ride", 1300, [GrinchRamData(0x800100BF, binary_bit_pos=7)]),
"Neutralizing Santa": GrinchLocationData("Sleigh Ride", 1301, [GrinchRamData(0x800100BF, binary_bit_pos=8)])
"Stealing All Gifts": GrinchLocationData("Sleigh Room", "Sleigh Ride", 1300, [GrinchRamData(0x800100BF, binary_bit_pos=7)]),
"Neutralizing Santa": GrinchLocationData("Sleigh Room", "Sleigh Ride", None, [GrinchRamData(0x800100BF, binary_bit_pos=8)])
}
def grinch_locations_to_id() -> dict[str,int]:

View File

@@ -1,8 +1,13 @@
from typing import TYPE_CHECKING
from BaseClasses import Region, MultiWorld
from .Locations import GrinchLocation, grinch_locations
from .Options import GrinchOptions
from . import GrinchWorld
from BaseClasses import Region
from .Rules import access_rules_dict, interpret_rule
if TYPE_CHECKING:
from . import GrinchWorld
mainareas_list = [
"Mount Crumpit",
@@ -46,12 +51,15 @@ def create_regions(world: "GrinchWorld"):
world.multiworld.regions.append(Region(supadow, world.player, world.multiworld))
def grinchconnect(world: "GrinchWorld", current_region_name: str, connected_region_name: str):
rule = []
current_region = world.get_region(current_region_name)
connected_region = world.get_region(connected_region_name)
required_items: set[list[str]] = access_rules_dict[connected_region.name]
rule = interpret_rule(required_items, world.player)
#Goes from current to connected
current_region.connect(connected_region)
current_region.connect(connected_region, rule = rule)
#Goes from connected to current
connected_region.connect(current_region)
connected_region.connect(current_region, rule = rule)
def connect_regions(world: "GrinchWorld"):
grinchconnect(world, "Mount Crumpit", "Whoville")
@@ -59,12 +67,12 @@ def connect_regions(world: "GrinchWorld"):
grinchconnect(world, "Mount Crumpit", "Who Dump")
grinchconnect(world, "Mount Crumpit", "Who Lake")
grinchconnect(world, "Mount Crumpit", "Sleigh Room")
grinchconnect(world, "Mount Crumpit", "Spin N' Win Supadow")
grinchconnect(world, "Mount Crumpit", "Dankamania Supadow")
grinchconnect(world, "Mount Crumpit", "The Copter Race Contest Supadow")
# grinchconnect(world, "Mount Crumpit", "Spin N' Win Supadow")
# grinchconnect(world, "Mount Crumpit", "Dankamania Supadow")
# grinchconnect(world, "Mount Crumpit", "The Copter Race Contest Supadow")
grinchconnect(world, "Whoville", "Post Office")
grinchconnect(world, "Whoville", "City Hall")
grinchconnect(world, "Whoville", "Countdown to X-Mas Tower")
grinchconnect(world, "Whoville", "Countdown to X-Mas Clock Tower")
grinchconnect(world, "Who Forest", "Ski Resort")
grinchconnect(world, "Who Forest", "Civic Center")
grinchconnect(world, "Who Dump", "Minefield")

View File

@@ -1,64 +1,459 @@
def set_rules(world: World, options: GrinchOptions, int):
from worlds.AutoWorld import World
# from .Options import GrinchOptions
from worlds.generic.Rules import add_rule
rules_dict = {
def set_rules(world: World):
all_locations = world.get_locations()
for location in all_locations:
loc_rules = rules_dict[location.name]
rule = interpret_rule(loc_rules, world.player)
add_rule(location, rule)
rules_dict: dict[str,list[list[str]]] = {
"Enter Whoville": [
[]
],
"Enter the Post Office": [
[]
],
"Enter the Town Hall": [
[]
],
"Enter the Countdown-To-Xmas Clock Tower": [
[]
],
"Enter Who Forest": [
[]
],
"Enter the Ski Resort": [
[]
],
"Enter the Civic Center": [
[]
],
"Enter Who Dump": [
[]
],
"Enter the Minefield": [
[]
],
"Enter the Power Plant": [
[]
],
"Enter the Generator Building": [
[]
],
"Enter Who Lake": [
[]
],
"Enter the Submarine World": [
[]
],
"Enter the Scout's Hut": [
[]
],
"Enter the North Shore": [
[]
],
"Enter the Mayor's Villa": [
[]
],
"Smashing Snowmen": [
[]
],
"Shuffling The Mail": [
[]
],
"Painting The Mayor's Posters": [
["Painting Bucket"]
],
"Launching Eggs Into Houses": [
["Rotten Egg Launcher"]
],
"Modifying The Mayor's Statue": [
["Sculpting Tools"]
],
"Advancing The Countdown-To-Xmas Clock": [
["Hammer", "Rocket Spring"]
],
"Making Xmas Trees Droop": [
["Rotten Egg Launcher"]
],
"Sabotaging Snow Cannon With Glue": [
["Glue Bucket", "Rocket Spring"],
["Glue Bucket", "Grinch Copter"]
],
"Putting Beehives In Cabins": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Sliming The Mayor's Skis": [
["Slime Shooter", "Rotten Egg Launcher"]
],
"Replacing The Candles On The Cake With Fireworks": [
["Rotten Egg Launcher", "Grinch Copter"],
["Rotten Egg Launcher", "Octopus Climbing Device", "Rocket Spring"]
],
"Stealing Food From Birds": [
["Rocket Spring", "Rotten Egg Launcher"]
],
"Feeding The Computer With Robot Parts": [
["Rocket Spring", "Rotten Egg Launcher"]
],
"Infesting The Mayor's House With Rats": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Conducting The Stinky Gas To Who-Bris' Shack": [
["Rocket Spring", "Rotten Egg Launcher"]
],
"Shaving Who Dump Guardian": [
["Scissors", "Grinch Copter"],
["Scissors", "Slime Shooter", "Rotten Egg Launcher", "Rocket Spring"]
],
"Short-Circuiting Power-Plant": [
["Rotten Egg Launcher", "Grinch Copter"],
["Rotten Egg Launcher", "Octopus Climbing Device", "Slime Shooter", "Rocket Spring"]
],
"Putting Thistles In Shorts": [
["Rotten Egg Launcher", "Octopus Climbing Device"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Sabotaging The Tents": [
["Octopus Climbing Device", "Rocket Spring"],
["Grinch Copter"]
],
"Drilling Holes In Canoes": [
["Drill"]
],
"Modifying The Marine Mobile": [
[]
],
"Hooking The Mayor's Bed To The Motorboat": [
["Rope", "Hook", "Rotten Egg Launcher", "Scout Clothes"]
],
"Binoculars Blueprint - Post Office Roof": [
[]
],
"Binoculars Blueprint - City Hall Library - Left Side": [
[]
],
"Binoculars Blueprint - City Hall Library - Front Side": [
[]
],
"Binoculars Blueprint - City Hall Library - Right Side": [
[]
],
"Rotten Egg Launcher Blueprint - Outside City Hall": [
[]
],
"Rotten Egg Launcher Blueprint - Outside Clock Tower": [
[]
],
"Rotten Egg Launcher Blueprint - Post Office - Front of Silver Door": [
["Who Cloak"]
],
"Rotten Egg Launcher Blueprint - Post Office - After Mission Completion": [
["Who Cloak"]
],
"Rocket Spring Blueprint - Behind Vacuum": [
[]
],
"Rocket Spring Blueprint - Front of 2nd House near entrance": [
[]
],
"Rocket Spring Blueprint - Near Tree House on Ground": [
[]
],
"Rocket Spring Blueprint - Near Cable Car House": [
[]
],
"Rocket Spring Blueprint - Near Who Snowball in Cave": [
[]
],
"Rocket Spring Blueprint - Branch Platform Closest to Glue Cannon": [
[]
],
"Rocket Spring Blueprint - Branch Platform Near Beast": [
[]
],
"Rocket Spring Blueprint - Branch Platform Ledge Grab House": [
[]
],
"Rocket Spring Blueprint - On Tree House": [
["Rotten Egg Launcher"],
["Grinch Copter"]
],
"Slime Shooter Blueprint - Branch Platform Elevated House": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Slime Shooter Blueprint - Branch Platform House next to Beast": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Slime Shooter Blueprint - House near Civic Center Cave": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Slime Shooter Blueprint - House next to Tree House": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Slime Shooter Blueprint - House across from Tree House": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Slime Shooter Blueprint - 2nd House near entrance right side": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Slime Shooter Blueprint - 2nd House near entrance left side": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Slime Shooter Blueprint - 2nd House near entrance inbetween blueprints": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Slime Shooter Blueprint - House near entrance": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Octopus Climbing Device Blueprint - Middle Pipe": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"],
["Slime Shooter", "Rocket Spring"],
["Slime Shooter", "Grinch Copter"]
],
"Octopus Climbing Device Blueprint - Right Pipe": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Octopus Climbing Device Blueprint - Mayor's House Rat Vent": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Octopus Climbing Device Blueprint - Left Pipe": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"],
["Slime Shooter", "Rocket Spring"],
["Slime Shooter", "Grinch Copter"]
],
"Octopus Climbing Device Blueprint - Near Power Plant Wall on right side": [
["Rotten Egg Launcher", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"],
["Slime Shooter", "Rocket Spring"],
["Slime Shooter", "Grinch Copter"]
],
"Octopus Climbing Device Blueprint - Near Who-Bris' Shack": [
["Rotten Egg Launcher", "Rocket Spring"]
],
"Octopus Climbing Device Blueprint - Guardian's House - Left Side": [
["Rotten Egg Launcher", "Grinch Copter"],
["Rotten Egg Launcher", "Slime Shooter", "Rocket Spring"]
],
"Octopus Climbing Device Blueprint - Guardian's House - Right Side": [
["Rotten Egg Launcher", "Grinch Copter"],
["Rotten Egg Launcher", "Slime Shooter", "Rocket Spring"]
],
"Octopus Climbing Device Blueprint - Inside Guardian's House": [
["Rotten Egg Launcher", "Grinch Copter"],
["Rotten Egg Launcher", "Slime Shooter", "Rocket Spring"]
],
"Marine Mobile Blueprint - South Shore - Bridge to Scout's Hut": [
[]
],
"Marine Mobile Blueprint - South Shore - Tent near Porcupine": [
[]
],
"Marine Mobile Blueprint - South Shore - Near Outhouse": [
[]
],
"Marine Mobile Blueprint - South Shore - Near Hill Bridge": [
[]
],
"Marine Mobile Blueprint - South Shore - Scout's Hut Roof": [
["Rocket Spring"],
["Grinch Copter"]
],
"Marine Mobile Blueprint - South Shore - Grass Platform": [
["Rocket Spring"],
["Grinch Copter"]
],
"Marine Mobile Blueprint - South Shore - Zipline by Beast": [
["Rocket Spring", "Octopus Climbing Device"],
["Grinch Copter"]
],
"Marine Mobile Blueprint - South Shore - Behind Summer Beast": [
["Rotten Egg Launcher", "Octopus Climbing Device"],
["Grinch Copter"]
],
"Marine Mobile Blueprint - South Shore - Below Bridge": [
[]
],
"Marine Mobile Blueprint - North Shore - Below Bridge": [
[]
],
"Marine Mobile Blueprint - North Shore - Behind Skunk Hut": [
[]
],
"Marine Mobile Blueprint - North Shore - Inside Skunk Hut": [
[]
],
"Marine Mobile Blueprint - North Shore - Fenced in Area": [
[]
],
"Marine Mobile Blueprint - North Shore - Boulder Box near Bridge": [
[]
],
"Marine Mobile Blueprint - North Shore - Boulder Box behind Skunk Hut": [
[]
],
"Marine Mobile Blueprint - North Shore - Inside Drill House": [
[]
],
"Marine Mobile Blueprint - North Shore - Crow Platform near Drill House": [
[]
],
"Grinch Copter Blueprint - Whoville City Hall - Safe Room": [
[]
],
"Grinch Copter Blueprint - Whoville City Hall - Statue Room": [
[]
],
"Grinch Copter Blueprint - Whoville Clock Tower - Before Bells": [
["Rocket Spring"]
],
"Grinch Copter Blueprint - Whoville Clock Tower - After Bells": [
["Rocket Spring"]
],
"Grinch Copter Blueprint - Who Forest Ski Resort - Inside Dog's Fence": [
[]
],
"Grinch Copter Blueprint - Who Forest Ski Resort - Max Cave": [
[]
],
"Grinch Copter Blueprint - Who Forest Civic Center - Climb across Bat Cave wall": [
["Grinch Copter"],
["Octopus Climbing Device", "Rocket Spring"]
],
"Grinch Copter Blueprint - Who Forest Civic Center - Shoot Icicle in Bat Entrance": [
["Rotten Egg Launcher", "Grinch Copter"],
["Rotten Egg Launcher", "Octopus Climbing Device", "Rocket Spring"],
["Slime Shooter", "Grinch Copter"],
["Slime Shooter", "Octopus Climbing Device", "Rocket Spring"]
],
"Grinch Copter Blueprint - Who Dump Power Plant - Max Cave": [
[]
],
"Grinch Copter Blueprint - Who Dump Power Plant - After First Gate": [
["Rotten Egg Launcher", "Rocket Spring"],
["Grinch Copter"]
],
"Grinch Copter Blueprint - Who Dump Generator Building - Before Mission": [
["Rotten Egg Launcher", "Grinch Copter"],
["Rotten Egg Launcher", "Octopus Climbing Device", "Slime Shooter", "Rocket Spring"]
],
"Grinch Copter Blueprint - Who Dump Generator Building - After Mission": [
["Rotten Egg Launcher", "Grinch Copter"],
["Rotten Egg Launcher", "Octopus Climbing Device", "Slime Shooter", "Rocket Spring"]
],
"Grinch Copter Blueprint - Who Lake South Shore - Submarine World - Above Surface": [
["Marine Mobile"]
],
"Grinch Copter Blueprint - Who Lake South Shore - Submarine World - Underwater": [
["Marine Mobile"]
],
"Grinch Copter Blueprint - Who Lake North Shore - Mayor's Villa - Tree Branch": [
["Grinch Copter"],
["Rotten Egg Launcher", "Rocket Spring"]
],
"Grinch Copter Blueprint - Who Lake North Shore - Mayor's Villa - Cave": [
["Grinch Copter"],
["Rotten Egg Launcher", "Rocket Spring"]
],
"Stealing All Gifts": [
["Exhaust Pipes", "GPS", "Tires", "Skis", "Twin-End Tuba"]
],
"Neutralizing Santa": [
["Exhaust Pipes", "GPS", "Tires", "Skis", "Twin-End Tuba"]
]
}
access_rules_dict = {
"Whoville": (
"WV Key"
"Post Office": (
"Who Cloak"
),
"City Hall": (
connect_region = "Whoville",
"REL"
),
"Who Forest": (
"WF Key",
"Prog Access Key": 1
),
"Ski Resort": (
connect_region = "Who Forest",
"Cable Car Access Card"
),
"Civic Center": (
connect_region = "Who Forest",
"GC",
"OCD"
),
"Who Dump": (
"WD Key",
"Prog Access Key": 2
),
"Minefield" (
connect_region = "Who Dump",
"REL+SS+RS",
"REL+GC"
),
"Outside Power Plant": (
connect_region = "Who Dump",
"(REL|SS)+GC",
"(REL|SS)+OCD+SS+RS"
),
"Inside Power Plant": (
connect_region = "Outside Power Plant",
"REL+GC",
"REL+OCD+SS+RS"
),
"Who Lake": (
"WL Key",
"Prog Access Key": 3
),
"North Shore": (
connect_region: "Who Lake",
"Scout Clothes"
),
"Mayor's Villa": (
connect_region = "North Shore"
),
"Submarine World": (
connect_region = "Who Lake",
"MM"
)
access_rules_dict: dict[str,list[list[str]]] = {
"Whoville": [
[]
],
"Post Office": [
["Who Cloak"]
],
"City Hall": [
["Rotten Egg Launcher"]
],
"Countdown to X-Mas Clock Tower": [
[]
],
"Who Forest": [
["Who Forest Vacuum Access"],
# ["Progressive Vacuum Access": 1]
],
"Ski Resort": [
["Cable Car Access Card"]
],
"Civic Center": [
["Grinch Copter"],
["Octopus Climbing Device"]
],
"Who Dump": [
["Who Dump Vacuum Access"],
# ["Progressive Vacuum Access": 2]
],
"Minefield": [
["Rotten Egg Launcher", "Slime Shooter", "Rocket Spring"],
["Rotten Egg Launcher", "Grinch Copter"]
],
"Power Plant": [
["Rotten Egg Launcher", "Grinch Copter"],
["Slime Shooter", "Grinch Copter"],
["Rotten Egg Launcher", "Octopus Climbing Device", "Slime Shooter", "Rocket Spring"]
],
"Generator Building": [
["Rotten Egg Launcher", "Grinch Copter"],
["Rotten Egg Launcher", "Octopus Climbing Device", "Slime Shooter", "Rocket Spring"]
],
"Who Lake": [
["Who Lake Vacuum Access"],
# ["Progressive Vacuum Access": 3]
],
"Scout's Hut": [
["Grinch Copter"],
["Rocket Spring"]
],
"North Shore": [
["Scout Clothes"]
],
"Mayor's Villa": [
["Scout Clothes"]
],
"Submarine World": [
["Marine Mobile"]
],
"Sleigh Room": [
["Exhaust Pipes", "GPS", "Tires", "Skis", "Twin-End Tuba"]
]
}
def interpret_rule(rule_set: list[list[str]], player: int):
old_rule = lambda state: True
if len(rule_set) < 1:
return old_rule
else:
old_rule = lambda state: False
for item_set in rule_set:
old_rule = lambda state: state.has_all(item_set, player) or old_rule
return old_rule

View File

@@ -1,11 +1,16 @@
from .Locations import grinch_locations_to_id
from .Items import grinch_items_to_id
from BaseClasses import Region, Item, ItemClassification
from .Locations import grinch_locations_to_id, grinch_locations, GrinchLocation
from .Items import grinch_items_to_id, GrinchItem, ALL_ITEMS_TABLE
from .Regions import connect_regions
from .Rules import set_rules
from typing import ClassVar
from worlds.AutoWorld import World
from . import Options
from .Rules import access_rules_dict
class GrinchWorld(World):
game: ClassVar[str] = "The Grinch"
@@ -13,5 +18,43 @@ class GrinchWorld(World):
options = Options.GrinchOptions
topology_present = True #not an open world game, very linear
item_name_to_id: ClassVar[dict[str,int]] = grinch_items_to_id()
location_name_to_id = ClassVar[dict[str,int]] = grinch_locations_to_id()
location_name_to_id: ClassVar[dict[str,int]] = grinch_locations_to_id()
required_client_version = (0, 6, 2)
def __init__(self, *args, **kwargs): #Pulls __init__ function and takes control from there in BaseClasses.py
self.origin_region_name: str = "Mount Crumpit"
super(GrinchWorld, self).__init__(*args, **kwargs)
def generate_early(self) -> None: #Special conditions changed before generation occurs
pass
def create_regions(self): #Generates all regions for the multiworld
for region_name in access_rules_dict.keys():
self.multiworld.regions.append(Region(region_name, self.player, self.multiworld))
self.multiworld.regions.append(Region("Mount Crumpit", self.player, self.multiworld))
for location, data in grinch_locations.items():
region = self.get_region(data.region)
entry = GrinchLocation(self.player, location, region, data)
if location == "Neutralizing Santa":
entry.place_locked_item(Item("Goal", ItemClassification.progression, None, self.player))
region.locations.append(entry)
connect_regions(self)
def create_item(self, item: str) -> GrinchItem: #Creates specific items on demand
if item in ALL_ITEMS_TABLE.keys():
return GrinchItem(item, self.player, ALL_ITEMS_TABLE[item])
raise Exception(f"Invalid item name: {item}")
def create_items(self): #Generates all items for the multiworld
self_itempool: list[GrinchItem] = []
for item, data in ALL_ITEMS_TABLE.items():
self_itempool.append(self.create_item(item))
if item == "Heart of Stone":
for _ in range(3):
self_itempool.append(self.create_item(item))
self.multiworld.itempool += self_itempool
def set_rules(self):
self.multiworld.completion_condition[self.player] = lambda state: state.has("Goal", self.player)
set_rules(self)