mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
Compare commits
11 Commits
v1.2.0
...
5e71874446
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5e71874446 | ||
![]() |
1870dd24ba | ||
![]() |
f70b6c4c9c | ||
![]() |
79d4d5b10b | ||
![]() |
7fea34adc3 | ||
![]() |
a3f9e6cbc9 | ||
![]() |
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)
|
||||
|
@@ -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"
|
||||
|
@@ -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)]),
|
||||
|
@@ -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,30 +69,17 @@ 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
|
||||
default = 0
|
||||
|
||||
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"}
|
||||
|
||||
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"
|
||||
valid_keys = {"Pancake", "Seize", "Max", "Bad Breath", "Sneak"}
|
||||
|
||||
class UnlimitedEggs(Toggle):
|
||||
"""Determine whether or not you run out of rotten eggs when you utilize your gadgets."""
|
||||
|
@@ -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],
|
||||
|
@@ -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}")
|
||||
|
||||
|
||||
|
8
worlds/grinch/archipelago.json
Normal file
8
worlds/grinch/archipelago.json
Normal 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"
|
||||
}
|
Reference in New Issue
Block a user