Merging conflicts

This commit is contained in:
2025-11-13 21:24:04 -07:00
parent cf5b3bc916
commit e623555581
2 changed files with 66 additions and 18 deletions

View File

@@ -1,13 +1,27 @@
from dataclasses import dataclass from dataclasses import dataclass
from Options import FreeText, NumericOption, Toggle, DefaultOnToggle, Choice, TextChoice, Range, NamedRange, OptionList, \ from Options import (
PerGameCommonOptions, OptionSet, OptionCounter FreeText,
NumericOption,
Toggle,
DefaultOnToggle,
Choice,
TextChoice,
Range,
NamedRange,
OptionList,
PerGameCommonOptions,
OptionSet,
OptionCounter,
)
class StartingArea(Choice): class StartingArea(Choice):
""" """
Here, you can select which area you'll start the game with. [NOT IMPLEMENTED] Here, you can select which area you'll start the game with. [NOT IMPLEMENTED]
Whichever one you pick is the region you'll have access to at the start of the Multiworld. Whichever one you pick is the region you'll have access to at the start of the Multiworld.
""" """
option_whoville = 0 option_whoville = 0
option_who_forest = 1 option_who_forest = 1
option_who_dump = 2 option_who_dump = 2
@@ -15,14 +29,17 @@ class StartingArea(Choice):
default = 0 default = 0
display_name = "Starting Area" display_name = "Starting Area"
class ProgressiveVacuum(Toggle): # DefaultOnToggle class ProgressiveVacuum(Toggle): # DefaultOnToggle
""" """
Determines whether you get access to main areas progressively [NOT IMPLEMENTED] Determines whether you get access to main areas progressively [NOT IMPLEMENTED]
Enabled: Whoville > Who Forest > Who Dump > Who Lake Enabled: Whoville > Who Forest > Who Dump > Who Lake
""" """
display_name = "Progressive Vacuum Tubes" display_name = "Progressive Vacuum Tubes"
class Missionsanity(Choice): class Missionsanity(Choice):
""" """
How mission checks are randomized in the pool [NOT IMPLEMENTED] How mission checks are randomized in the pool [NOT IMPLEMENTED]
@@ -32,6 +49,7 @@ class Missionsanity(Choice):
Individual: Individual tasks for one mission, such as individual snowmen squashed, are checks. Individual: Individual tasks for one mission, such as individual snowmen squashed, are checks.
Both: Both individual tasks and mission completion are randomized. Both: Both individual tasks and mission completion are randomized.
""" """
display_name = "Mission Locations" display_name = "Mission Locations"
option_none = 0 option_none = 0
option_completion = 1 option_completion = 1
@@ -39,6 +57,7 @@ class Missionsanity(Choice):
option_both = 3 option_both = 3
default = 1 default = 1
class ExcludeEnvironments(OptionSet): class ExcludeEnvironments(OptionSet):
""" """
Allows entire environments to be an excluded location to ensure you are not logically required to enter the environment along Allows entire environments to be an excluded location to ensure you are not logically required to enter the environment along
@@ -51,52 +70,83 @@ class ExcludeEnvironments(OptionSet):
"Ski Resort", "Civic Center", "Minefield", "Power Plant", "Generator Building", "Scout's Hut", "Ski Resort", "Civic Center", "Minefield", "Power Plant", "Generator Building", "Scout's Hut",
"North Shore", "Mayor's Villa", "Sleigh Ride" "North Shore", "Mayor's Villa", "Sleigh Ride"
""" """
display_name = "Exclude Environments" display_name = "Exclude Environments"
valid_keys = {"Whoville", "Who Forest", "Who Dump", "Who Lake", "Post Office", "Clock Tower", "City Hall", valid_keys = {
"Ski Resort", "Civic Center", "Minefield", "Power Plant", "Generator Building", "Scout's Hut", "Whoville",
"North Shore", "Mayor's Villa", "Sleigh Ride"} "Who Forest",
"Who Dump",
"Who Lake",
"Post Office",
"Clock Tower",
"City Hall",
"Ski Resort",
"Civic Center",
"Minefield",
"Power Plant",
"Generator Building",
"Scout's Hut",
"North Shore",
"Mayor's Villa",
"Sleigh Ride",
}
class ProgressiveGadget(Toggle): # DefaultOnToggle class ProgressiveGadget(Toggle): # DefaultOnToggle
""" """
Determines whether you get access to a gadget as individual blueprint count. [NOT IMPLEMENTED] Determines whether you get access to a gadget as individual blueprint count. [NOT IMPLEMENTED]
""" """
display_name = "Progressive Gadgets" display_name = "Progressive Gadgets"
class Supadow(Toggle): class Supadow(Toggle):
"""Enables completing minigames through the Supadows in Mount Crumpit as checks. NOT IMPLEMENTED]""" """Enables completing minigames through the Supadows in Mount Crumpit as checks. NOT IMPLEMENTED]"""
display_name = "Supadow Minigames" display_name = "Supadow Minigames"
class Gifts(Range): class Gifts(Range):
""" """
Considers how many gifts must be squashed per check. Considers how many gifts must be squashed per check.
Enabling this will also enable squashing all gifts in a region mission along side this. [NOT IMPLEMENTED] Enabling this will also enable squashing all gifts in a region mission along side this. [NOT IMPLEMENTED]
""" """
display_name = "Gifts Squashed per Check" display_name = "Gifts Squashed per Check"
range_start = 0 range_start = 0
range_end = 300 range_end = 300
default = 0 default = 0
class Moverando(Toggle): class Moverando(Toggle):
"""Randomizes Grinch's moveset along with randomizing max into the pool. [NOT IMPLEMENTED] """Randomizes Grinch's moveset along with randomizing max into the pool. [NOT IMPLEMENTED]"""
"""
display_name = "Moves Randomized" display_name = "Moves Randomized"
class UnlimitedEggs(Toggle): class UnlimitedEggs(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"
class RingLinkOption(Toggle): class RingLinkOption(Toggle):
"""Whenever this is toggled, your ammo is linked with other ringlink-compatible games that also have this enabled.""" """Whenever this is toggled, your ammo is linked with other ringlink-compatible games that also have this enabled."""
display_name = "Ring Link" display_name = "Ring Link"
class TrapLinkOption(Toggle): class TrapLinkOption(Toggle):
"""If a trap is sent from Grinch, traps that are compatible with other games are triggered as well. [NOT IMPLEMENTED]""" """If a trap is sent from Grinch, traps that are compatible with other games are triggered as well. [NOT IMPLEMENTED]"""
display_name = "Trap Link" display_name = "Trap Link"
class FillerWeight(OptionCounter): class FillerWeight(OptionCounter):
""" """
Determines how often each filler item appears in the itempool Determines how often each filler item appears in the itempool
""" """
default = { default = {
"5 Rotten Eggs": 50, "5 Rotten Eggs": 50,
"10 Rotten Eggs": 25, "10 Rotten Eggs": 25,
@@ -105,19 +155,23 @@ class FillerWeight(OptionCounter):
} }
display_name = "Filler Weights" display_name = "Filler Weights"
class TrapPercentage(Range): class TrapPercentage(Range):
""" """
Set a percentage of how many filler items are replaced with traps here. Set a percentage of how many filler items are replaced with traps here.
""" """
display_name = "Trap Percentage" display_name = "Trap Percentage"
range_start = 0 range_start = 0
range_end = 100 range_end = 100
default = 10 default = 10
class PerTrapWeight(OptionCounter): class PerTrapWeight(OptionCounter):
""" """
Determines how often each filler item appears in the itempool Determines how often each filler item appears in the itempool
""" """
display_name = "Enabled Traps with Weight" display_name = "Enabled Traps with Weight"
default = { default = {
"Depletion Trap": 10, "Depletion Trap": 10,
@@ -125,6 +179,7 @@ class PerTrapWeight(OptionCounter):
"Who sent me back?": 10, "Who sent me back?": 10,
} }
@dataclass @dataclass
class GrinchOptions(PerGameCommonOptions): # DeathLinkMixin class GrinchOptions(PerGameCommonOptions): # DeathLinkMixin
starting_area: StartingArea starting_area: StartingArea

View File

@@ -69,12 +69,6 @@ class GrinchWorld(World):
for _ in range(3): for _ in range(3):
self_itempool.append(self.create_item(item)) self_itempool.append(self.create_item(item))
<<<<<<< HEAD
#Get number of current unfilled locations
unfilled_locations: int = (
len(self.multiworld.get_unfilled_locations(self.player)) - len(self_itempool)
)
=======
# Get number of current unfilled locations # Get number of current unfilled locations
unfilled_locations: int = ( unfilled_locations: int = (
len(self.multiworld.get_unfilled_locations(self.player)) - len(ALL_ITEMS_TABLE.keys()) - 3 len(self.multiworld.get_unfilled_locations(self.player)) - len(ALL_ITEMS_TABLE.keys()) - 3
@@ -86,7 +80,6 @@ class GrinchWorld(World):
# This catches the extra 1 or 2 unfilled_locations that come up from the math.floor() # This catches the extra 1 or 2 unfilled_locations that come up from the math.floor()
extra_locations = unfilled_locations - (filler_locations + trap_locations) extra_locations = unfilled_locations - (filler_locations + trap_locations)
filler_locations != extra_locations filler_locations != extra_locations
>>>>>>> 31333183 (Adding weights for filler and traps)
# Total available weight sum # Total available weight sum
total_fillerweights = sum(self.options.filler_weight[filler] for filler in MISC_ITEMS_TABLE) total_fillerweights = sum(self.options.filler_weight[filler] for filler in MISC_ITEMS_TABLE)