mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bccc83f864 | ||
![]() |
6409721841 | ||
![]() |
d3a7b014bd | ||
![]() |
3ec8631203 | ||
![]() |
2081912a39 |
@@ -41,6 +41,7 @@ class GrinchClient(BizHawkClient):
|
||||
previous_egg_count: int = 0
|
||||
send_ring_link: bool = False
|
||||
unique_client_id: int = 0
|
||||
ring_link_enabled = False
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
@@ -93,12 +94,10 @@ class GrinchClient(BizHawkClient):
|
||||
logger.info("You are now connected to the client. "+
|
||||
"There may be a slight delay to check you are not in demo mode before locations start to send.")
|
||||
|
||||
ring_link_enabled = bool(ctx.slot_data["ring_link"])
|
||||
self.ring_link_enabled = bool(ctx.slot_data["ring_link"])
|
||||
|
||||
tags = copy.deepcopy(ctx.tags)
|
||||
if ring_link_enabled:
|
||||
self.send_ring_link = True
|
||||
Utils.async_start(self.ring_link_output(ctx), name="EggLink")
|
||||
if self.ring_link_enabled:
|
||||
ctx.tags.add("RingLink")
|
||||
else:
|
||||
ctx.tags -= { "RingLink" }
|
||||
@@ -126,6 +125,11 @@ class GrinchClient(BizHawkClient):
|
||||
if not await self.ingame_checker(ctx):
|
||||
return
|
||||
|
||||
if not any(task.get_name() == "Grinch EggLink" for task in asyncio.all_tasks()):
|
||||
print("EggLink")
|
||||
self.send_ring_link = True
|
||||
Utils.async_start(self.ring_link_output(ctx), name="Grinch EggLink")
|
||||
|
||||
await self.location_checker(ctx)
|
||||
await self.receiving_items_handler(ctx)
|
||||
await self.goal_checker(ctx)
|
||||
|
@@ -42,13 +42,14 @@ class Missionsanity(Choice):
|
||||
class ExcludeEnvironments(OptionSet):
|
||||
"""
|
||||
Allows entire environments to be an excluded location to ensure you are not logically required to enter the environment along
|
||||
with any and all checks that are in that environment too. WARNING: Excluding too many environments may cause generation to fail.
|
||||
with any and all checks that are in that environment too.
|
||||
|
||||
WARNING: Excluding too many environments may cause generation to fail.
|
||||
[NOT IMPLEMENTED]
|
||||
|
||||
Valid keys: "Whoville", "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"
|
||||
|
||||
"""
|
||||
display_name = "Exclude Environments"
|
||||
valid_keys = {"Whoville", "Who Forest", "Who Dump", "Who Lake", "Post Office", "Clock Tower", "City Hall",
|
||||
@@ -68,7 +69,8 @@ class Supadow(Toggle):
|
||||
class Gifts(Range):
|
||||
"""
|
||||
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"
|
||||
range_start = 0
|
||||
range_end = 300
|
||||
@@ -77,13 +79,17 @@ class Gifts(Range):
|
||||
class GadgetRando(OptionSet):
|
||||
"""
|
||||
Randomizes Grinch's gadgets along with randomizing Binoculars into the pool. [NOT IMPLEMENTED]
|
||||
|
||||
Valid keys: "Binoculars", "Rotten Egg Launcher", "Rocket Spring", "Slime Shooter", "Octopus Climbing Device",
|
||||
"Marine Mobile", "Grinch Copter"
|
||||
"""
|
||||
display_name = "Gadgets Randomized"
|
||||
valid_keys = {"Binoculars", "Rotten Egg Launcher", "Rocket Spring", "Slime Shooter", "Octopus Climbing Device",
|
||||
"Marine Mobile", "Grinch Copter"}
|
||||
default = [
|
||||
"Binoculars",
|
||||
"Rotten Egg Launcher",
|
||||
"Rocket Spring",
|
||||
"Slime Shooter",
|
||||
"Octopus Climbing Device",
|
||||
"Marine Mobile",
|
||||
"Grinch Copter"
|
||||
]
|
||||
|
||||
class Moverando(OptionSet):
|
||||
"""Randomizes Grinch's moveset along with randomizing max into the pool. [NOT IMPLEMENTED]
|
||||
@@ -91,7 +97,13 @@ class Moverando(OptionSet):
|
||||
Valid keys: "Pancake", "Seize", "Max", "Bad Breath", "Sneak"
|
||||
"""
|
||||
display_name = "Moves Randomized"
|
||||
valid_keys = {"Pancake", "Seize", "Max", "Bad Breath", "Sneak"}
|
||||
default = [
|
||||
"Pancake",
|
||||
"Seize",
|
||||
"Max",
|
||||
"Bad Breath",
|
||||
"Sneak"
|
||||
]
|
||||
|
||||
class UnlimitedEggs(Toggle):
|
||||
"""Determine whether or not you run out of rotten eggs when you utilize your gadgets."""
|
||||
@@ -114,6 +126,7 @@ class GrinchOptions(PerGameCommonOptions):#DeathLinkMixin
|
||||
progressive_gadget: ProgressiveGadget
|
||||
supadow_minigames: Supadow
|
||||
giftsanity: Gifts
|
||||
gadget_rando: GadgetRando
|
||||
move_rando: Moverando
|
||||
unlimited_eggs: UnlimitedEggs
|
||||
ring_link: RingLinkOption
|
||||
|
@@ -479,7 +479,7 @@ rules_dict: dict[str,list[list[str]]] = {
|
||||
[]
|
||||
],
|
||||
"WV - Exhaust Pipes": [
|
||||
[REL]
|
||||
[WV, REL]
|
||||
],
|
||||
"WF - Skis": [
|
||||
[WF]
|
||||
|
@@ -8,7 +8,7 @@ from .Client import *
|
||||
from typing import ClassVar
|
||||
|
||||
from worlds.AutoWorld import World
|
||||
import Options
|
||||
from Options import OptionError
|
||||
|
||||
from .Options import GrinchOptions
|
||||
from .Rules import access_rules_dict
|
||||
@@ -31,7 +31,7 @@ class GrinchWorld(World):
|
||||
|
||||
def generate_early(self) -> None: #Special conditions changed before generation occurs
|
||||
if self.options.ring_link == 1 and self.options.unlimited_eggs == 1:
|
||||
raise Options.OptionError("Cannot enable both unlimited rotten eggs and ring links. You can only enable one of these at a time."+
|
||||
raise OptionError("Cannot enable both unlimited rotten eggs and ring links. You can only enable one of these at a time." +
|
||||
f"The following player's YAML needs to be fixed: {self.player_name}")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user