Moar code before thunderstorm

This commit is contained in:
MarioSpore
2025-07-25 19:33:51 -04:00
parent a7d5d45d14
commit 694ba4c9bb
6 changed files with 86 additions and 39 deletions

View File

@@ -142,4 +142,13 @@ TRAPS_TABLE: dict[str, GrinchItemData] = {
[GrinchRamData(0x80010000, value=0x05), GrinchRamData(0x8008FB94, value=1)]), [GrinchRamData(0x80010000, value=0x05), GrinchRamData(0x8008FB94, value=1)]),
"Rocket Spring Trap": GrinchItemData("Traps", 607, IC.trap, [GrinchRamData()]), "Rocket Spring Trap": GrinchItemData("Traps", 607, IC.trap, [GrinchRamData()]),
"Who sent me here?": GrinchItemData("Traps", 608, IC.trap, [GrinchRamData(0x8008FB94, value=1)]) "Who sent me here?": GrinchItemData("Traps", 608, IC.trap, [GrinchRamData(0x8008FB94, value=1)])
}
ALL_ITEMS_TABLE: dict[str, GrinchItemData] = {
**GADGETS_TABLE,
**MISSION_ITEMS_TABLE,
**SLEIGH_PARTS_TABLE,
**KEYS_TABLE,
**MISC_ITEMS_TABLE,
**TRAPS_TABLE
} }

View File

@@ -1,10 +1,21 @@
from typing import NamedTuple, Optional
from BaseClasses import Location from BaseClasses import Location
from BaseClasses import ItemClassification as IC
class GrinchLocationData(NamedTuple):
region: str
type: str
code: Optional[int]
classification: IC
update_ram_addr: Optional[list[GrinchRamData]] = None
value: Optional[int] = None #I can either set or add either hex or unsigned values through Client.py
binary_bit_pos: Optional[int] = None
bit_size: int = 1
class GrinchLocation(Location): class GrinchLocation(Location):
region: str game: str = "The Grinch"
code: Optional[int]
location_group: str location_group: str
update_ram_addr: Optional[list[GrinchRamData]]
grinch_locations = { grinch_locations = {
#Visitsanity #Visitsanity
@@ -127,4 +138,5 @@ grinch_locations = {
"Grinch Copter Blueprint - Who Lake South Shore - Submarine World - Above Surface": GrinchLocationData("Grinch Copter Blueprints", 1212, [GrinchRamData()]), "Grinch Copter Blueprint - Who Lake South Shore - Submarine World - Above Surface": GrinchLocationData("Grinch Copter Blueprints", 1212, [GrinchRamData()]),
"Grinch Copter Blueprint - Who Lake South Shore - Submarine World - Underwater": GrinchLocationData("Grinch Copter Blueprints", 1213, [GrinchRamData()]), "Grinch Copter Blueprint - Who Lake South Shore - Submarine World - Underwater": GrinchLocationData("Grinch Copter Blueprints", 1213, [GrinchRamData()]),
"Grinch Copter Blueprint - Who Lake North Shore - Mayor's Villa - Tree Branch": GrinchLocationData("Grinch Copter Blueprints", 1214, [GrinchRamData()]), "Grinch Copter Blueprint - Who Lake North Shore - Mayor's Villa - Tree Branch": GrinchLocationData("Grinch Copter Blueprints", 1214, [GrinchRamData()]),
"Grinch Copter Blueprint - Who Lake North Shore - Mayor's Villa - Cave": GrinchLocationData("Grinch Copter Blueprints", 1215, [GrinchRamData()]), "Grinch Copter Blueprint - Who Lake North Shore - Mayor's Villa - Cave": GrinchLocationData("Grinch Copter Blueprints", 1215, [GrinchRamData()])
}

View File

@@ -1,11 +1,15 @@
from Options import FreeText, NumericOption, Toggle, DefaultOnToggle, Choice, TextChoice, Range, NamedRange, OptionList from dataclasses import dataclass
class KeyType(Choice): from Options import FreeText, NumericOption, Toggle, DefaultOnToggle, Choice, TextChoice, Range, NamedRange, OptionList, \
"""Selects whether you want your access items to be separated or progressive""" PerGameCommonOptions
display_name = "Key Type"
option_separated = 0
option_progressive = 1 class ProgressiveVacuum(DefaultOnToggle):
default = 0 """
Determines whether you get access to main areas progressively
Default: Whoville > Who Forest > Who Dump > Who Lake
"""
display_name = "Progressive Vacuum Access"
# class StartingArea(Choice): # class StartingArea(Choice):
# """ # """
@@ -19,9 +23,9 @@ class KeyType(Choice):
# class Supadow(Toggle): # class Supadow(Toggle):
# """Enables completing minigames through the Supadows in Mount Crumpit as checks. (9 locations)""" # """Enables completing minigames through the Supadows in Mount Crumpit as checks. (9 locations)"""
# display_name = "Supadow Minigame Locations" # display_name = "Supadow Minigame Locations"#
#
#
# class Gifts(Toggle): # class Gifts(Toggle):
# """Missions that require you to squash every present in a level. (4 locations)""" # """Missions that require you to squash every present in a level. (4 locations)"""
# display_name = "Gift Collection Locations" # display_name = "Gift Collection Locations"
@@ -32,6 +36,11 @@ class KeyType(Choice):
# display_name = "Movesanity" # display_name = "Movesanity"
class RottenEggs(Toggle): class UnlimitedRottenEggs(Toggle):
"""Determine whether or not you run out of rotten eggs when you utilize your gadgets.""" """Determine whether or not you run out of rotten eggs when you utilize your gadgets."""
display_name = "Unlimited Rotten Eggs" display_name = "Unlimited Rotten Eggs"
@dataclass
class GrinchOptions(PerGameCommonOptions):#DeathLinkMixin
progressive_vacuum: ProgressiveVacuum
unlimited_rotten_eggs: UnlimitedRottenEggs

View File

@@ -2,25 +2,33 @@ from BaseClasses import Region, MultiWorld
from .Locations import GrinchLocation, grinch_locations from .Locations import GrinchLocation, grinch_locations
from .Options import GrinchOptions from .Options import GrinchOptions
def create_regions(player: int, world: World, options: GrinchOptions): mainareas_list = [
mainareas_list = [ "Mount Crumpit",
"Whoville", "Whoville",
"Who Forest", "Who Forest",
"Who Dump", "Who Dump",
"Who Lake" "Who Lake"
] ]
subareas_list = [ subareas_list = [
"Post Office", "Post Office",
"City Hall", "City Hall",
"Countdown to X-Mas Tower", "Countdown to X-Mas Tower",
"Ski Resort", "Ski Resort",
"Civic Center", "Civic Center",
"Minefield", "Minefield",
"Outside Power Plant", "Outside Power Plant",
"Inside Power Plant", "Inside Power Plant",
"Submarine World", "Submarine World",
"Scout's Hut", "Scout's Hut",
"North Shore", "North Shore",
"Mayor's Villa" "Mayor's Villa",
] "Sleigh Room"
]
supadow_list = [
"Spin N' Win Supadow",
"Dankamania Supadow",
"The Copter Race Contest Supadow"
]
def create_regions(player: int, world: World, options: GrinchOptions):

View File

@@ -1,4 +1,4 @@
def set_rules(world: World, world: World, options: GrinchOptions, int): def set_rules(world: World, options: GrinchOptions, int):
rules_dict = { rules_dict = {

View File

@@ -1 +1,10 @@
class GrinchWorld(world): from typing import ClassVar
from worlds.AutoWorld import World
from . import Options
class GrinchWorld(World):
game: ClassVar[str] = "The Grinch"
options_dataclass = Options.GrinchOptions
options = Options.GrinchOptions