8 Commits

6 changed files with 84 additions and 42 deletions

View File

@@ -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)

View File

@@ -50,7 +50,7 @@ VT: str = "Progressive Vacuum Tube"
PC: str = "Pancake"
SR: str = "Sleigh Room Key"
BB: str = "Bad Breath"
SE: str = "Seize"
SZ: str = "Seize"
MX: str = "Max"
SN: str = "Sneak"
WC: str = "Who Cloak"

View File

@@ -189,11 +189,11 @@ grinch_locations = {
# "Bike Race - Top 2": GrinchLocationData("Bike Race", ["Supadow Minigames", "Bike Race"], 1510, [GrinchRamData()]),
# "Bike Race - Top 3": GrinchLocationData("Bike Race", ["Supadow Minigames", "Bike Race"], 1511, [GrinchRamData()]),
# Sleigh Part Locations
"WV - Exhaust Pipes": GrinchLocationData("Sleigh Room", ["Sleigh Ride", "Whoville"], 1600, [GrinchRamData(0x0101FB, binary_bit_pos=2)]),
"WF - Skis": GrinchLocationData("Sleigh Room", ["Sleigh Ride", "Who Forest"], 1601, [GrinchRamData(0x0101FB, binary_bit_pos=3)]),
"WD - Tires": GrinchLocationData("Sleigh Room", ["Sleigh Ride", "Who Dump"], 1602, [GrinchRamData(0x0101FB, binary_bit_pos=4)]),
"WL - Submarine World - Twin-End Tuba": GrinchLocationData("Sleigh Room", ["Sleigh Ride", "Who Lake", "South Shore"], 1603, [GrinchRamData(0x0101FB, binary_bit_pos=6)]),
"WL - South Shore - GPS": GrinchLocationData("Sleigh Room", ["Sleigh Ride", "Who Lake", "Submarine World"], 1604, [GrinchRamData(0x0101FB, binary_bit_pos=5)]),
"WV - Exhaust Pipes": GrinchLocationData("Whoville", ["Sleigh Ride", "Whoville"], 1600, [GrinchRamData(0x0101FB, binary_bit_pos=2)]),
"WF - Skis": GrinchLocationData("Who Forest", ["Sleigh Ride", "Who Forest"], 1601, [GrinchRamData(0x0101FB, binary_bit_pos=3)]),
"WD - Tires": GrinchLocationData("Who Dump", ["Sleigh Ride", "Who Dump"], 1602, [GrinchRamData(0x0101FB, binary_bit_pos=4)]),
"WL - Submarine World - Twin-End Tuba": GrinchLocationData("Submarine World", ["Sleigh Ride", "Who Lake", "South Shore"], 1603, [GrinchRamData(0x0101FB, binary_bit_pos=6)]),
"WL - South Shore - GPS": GrinchLocationData("Who Lake", ["Sleigh Ride", "Who Lake", "Submarine World"], 1604, [GrinchRamData(0x0101FB, binary_bit_pos=5)]),
# Mount Crumpit Locations
"MC - 1st Crate Squashed": GrinchLocationData("Mount Crumpit", ["Mount Crumpit"], 1700, [GrinchRamData(0x095343, value=1)]),
"MC - 2nd Crate Squashed": GrinchLocationData("Mount Crumpit", ["Mount Crumpit"], 1701, [GrinchRamData(0x095343, value=2)]),

View File

@@ -76,34 +76,10 @@ class Gifts(Range):
range_end = 300
default = 0
class GadgetRando(OptionSet):
"""
Randomizes Grinch's gadgets along with randomizing Binoculars into the pool. [NOT IMPLEMENTED]
"""
display_name = "Gadgets Randomized"
default = [
"Binoculars",
"Rotten Egg Launcher",
"Rocket Spring",
"Slime Shooter",
"Octopus Climbing Device",
"Marine Mobile",
"Grinch Copter"
]
class Moverando(OptionSet):
class Moverando(Toggle):
"""Randomizes Grinch's moveset along with randomizing max into the pool. [NOT IMPLEMENTED]
Valid keys: "Pancake", "Seize", "Max", "Bad Breath", "Sneak"
"""
display_name = "Moves Randomized"
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."""
@@ -126,7 +102,6 @@ class GrinchOptions(PerGameCommonOptions):#DeathLinkMixin
progressive_gadget: ProgressiveGadget
supadow_minigames: Supadow
giftsanity: Gifts
gadget_rando: GadgetRando
move_rando: Moverando
unlimited_eggs: UnlimitedEggs
ring_link: RingLinkOption

View File

@@ -85,6 +85,8 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WV - Smashing Snowmen": [
[]
# "move_rando"
# [PC]
],
"WV - Painting The Mayor's Posters": [
[PB]
@@ -94,6 +96,9 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WV - City Hall - Modifying The Mayor's Statue": [
[ST]
# "move_rando"
# [ST, SN],
# [ST, SS]
],
"WV - Clock Tower - Advancing The Countdown-To-Xmas Clock": [
[HMR, RS]
@@ -103,6 +108,8 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WF - Making Xmas Trees Droop": [
[REL]
# "move_rando"
# [REL, BB]
],
"WF - Sabotaging Snow Cannon With Glue": [
[GB, RS],
@@ -118,6 +125,10 @@ rules_dict: dict[str,list[list[str]]] = {
"WF - Civic Center - Replacing The Candles On The Cake With Fireworks": [
[REL, GC],
[REL, OCD, RS]
# "move_rando"
# [REL, GC],
# [REL, OCD, RS, SN],
# [REL, OCD, RS, SS]
],
"WF - Squashing All Gifts": [
[GC, CCAC, SS, REL],
@@ -125,20 +136,32 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WD - Stealing Food From Birds": [
[RS, REL]
# "move_rando"
# [RS, REL, PC]
],
"WD - Feeding The Computer With Robot Parts": [
[RS, REL]
# "move_rando"
# [RS, REL, PC]
],
"WD - Infesting The Mayor's House With Rats": [
[REL, RS],
[REL, GC]
# "move_rando"
# [REL, RS, PC],
# [REL, GC, PC]
],
"WD - Conducting The Stinky Gas To Who-Bris' Shack": [
[RS, REL]
# "move_rando"
# [RS, REL, PC]
],
"WD - Minefield - Shaving Who Dump Guardian": [
[SC, GC],
[SC, SS, RS]
# "move_rando"
# [SC, GC, SN],
# [SC, SS, RS, SN]
],
"WD - Generator Building - Short-Circuiting Power-Plant": [
[REL, GC],
@@ -158,7 +181,6 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WL - North Shore - Drilling Holes In Canoes": [
[DRL]
# [DRL, MX]
],
"WL - Submarine World - Modifying The Marine Mobile": [
[]
@@ -190,10 +212,12 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WV - Post Office - REL BP inside Silver Room": [
[WC]
# "move_rando"
# [WC, MX]
],
"WV - Post Office - REL BP at Entrance Door after Mission Completion": [
[WC]
# "move_rando"
# [WC, MX]
],
"WF - RS BP behind Vacuum Tube": [
@@ -291,6 +315,7 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WD - Minefield - OCD BP on Left Side of House": [
[]
# "move_rando"
# [REL, GC],
# [REL, SS, RS]
# [MX]
@@ -301,6 +326,7 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WD - Minefield - OCD BP inside Guardian's House": [
[]
# "move_rando"
# [REL, GC],
# [REL, SS, RS]
# [MX]
@@ -341,10 +367,12 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WL - North Shore - MM BP inside Skunk Hut": [
[]
# "move_rando"
# [MX]
],
"WL - North Shore - MM BP inside House's Fence": [
[]
# "move_rando"
# [MX]
],
"WL - North Shore - MM BP inside Boulder Box near Bridge": [
@@ -367,6 +395,7 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WV - Clock Tower - GC BP in Bedroom": [
[RS]
# "move_rando"
# [MX, RS]
],
"WV - Clock Tower - GC BP in Bell Room": [
@@ -377,6 +406,7 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WF - Ski Resort - GC BP in Max Cave": [
[]
# "move_rando"
# [MX]
],
"WF - Civic Center - GC BP on Left Side in Bat Cave Wall": [
@@ -391,11 +421,13 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WD - Power Plant - GC BP in Max Cave": [
[]
# "move_rando"
# [MX]
],
"WD - Power Plant - GC BP After First Gate": [
[REL, RS],
[GC]
# "move_rando"
# [MX, REL, RS]
],
"WD - Generator Building - GC BP on the Highest Platform": [
@@ -440,6 +472,7 @@ rules_dict: dict[str,list[list[str]]] = {
],
"WL - North Shore - Heart of Stone": [
[]
# "move_rando"
# [MX]
],
"Spin N' Win - Easy": [
@@ -479,34 +512,44 @@ rules_dict: dict[str,list[list[str]]] = {
[]
],
"WV - Exhaust Pipes": [
[REL]
[WV, REL, SR]
],
"WF - Skis": [
[WF]
[WF, SR]
],
"WD - Tires": [
[WD, RS, REL]
[WD, RS, REL, SR]
],
"WL - Submarine World - Twin-End Tuba": [
[WL, MM]
[WL, MM, SR]
],
"WL - South Shore - GPS": [
[WL, REL]
[WL, REL, SR]
],
"MC - 1st Crate Squashed": [
[]
# "move_rando"
# [PC]
],
"MC - 2nd Crate Squashed": [
[]
# "move_rando"
# [PC]
],
"MC - 3rd Crate Squashed": [
[]
# "move_rando"
# [PC]
],
"MC - 4th Crate Squashed": [
[]
# "move_rando"
# [PC]
],
"MC - 5th Crate Squashed": [
[]
# "move_rando"
# [PC]
]
# "Green Present": [
# []
@@ -516,9 +559,12 @@ rules_dict: dict[str,list[list[str]]] = {
# ],
# "Pink Present": [
# [REL],
# [move_rando]
# [PC]
# ],
# "Yellow Present": [
# []
# "move_rando"
# [PC]
# ]
}
@@ -537,6 +583,8 @@ access_rules_dict: dict[str,list[list[str]]] = {
],
"Clock Tower": [
[]
# "move_rando"
# [SN]
],
"Who Forest": [
[WF],
@@ -556,11 +604,18 @@ access_rules_dict: dict[str,list[list[str]]] = {
"Minefield": [
[REL, RS],
[REL, GC]
# "move_rando"
# [REL, RS, PC],
# [REL, GC, PC]
],
"Power Plant": [
[REL, GC],
[SS, GC],
[REL, OCD, SS, RS]
# "move_rando"
# [REL, GC, PC],
# [SS, GC, PC],
# [REL, OCD, SS, RS, PC]
],
"Generator Building": [
[REL, GC],

View File

@@ -0,0 +1,8 @@
{
"minimum_ap_version": "0.6.3",
"world_version": "1.3.0",
"authors": ["MarioSpore"],
"version": 7,
"compatible_version": 7,
"game": "The Grinch"
}