MLSS: Various bugfixes and QoL updates (#3744)

* Small fixes

* Update Location names + Remove redundant rule

* Fix for str not being returned in get_filler_item_name()

* ASM changes + various name/logic updates

* Remove extra unintended change + Make beanstone/beanlets useful

* Add missing timer logic to client

* Update Rules.py

* Fix bad capitalization

* Small formatting and ASM changes

* Update basepatch.bsdiff

* Update seed verification to be more likely to make a correct comparison

* Add Pipe 10

* Final batch of small fixes

* FINAL CHANGE I SWEAR

* Added victory Item for spoilers

* Update worlds/mlss/Regions.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Update worlds/mlss/Items.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Fix jokes end logic

* Update worlds/mlss/Regions.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Update worlds/mlss/Rules.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Update worlds/mlss/Rules.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Update worlds/mlss/Rules.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Fix jokes end logic

* Item Location mismatch + Check options against rules

* Change List to Set + Check options against rules

* Moved Victory item to event

* Update worlds/mlss/__init__.py

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>

* Update worlds/mlss/__init__.py

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
This commit is contained in:
jamesbrq 2024-09-18 13:33:02 -04:00 committed by GitHub
parent 710609fa60
commit 51a6dc150c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 377 additions and 244 deletions

View File

@ -85,7 +85,7 @@ class MLSSClient(BizHawkClient):
if not self.seed_verify:
seed = await bizhawk.read(ctx.bizhawk_ctx, [(0xDF00A0, len(ctx.seed_name), "ROM")])
seed = seed[0].decode("UTF-8")
if seed != ctx.seed_name:
if seed not in ctx.seed_name:
logger.info(
"ERROR: The ROM you loaded is for a different game of AP. "
"Please make sure the host has sent you the correct patch file,"
@ -143,17 +143,30 @@ class MLSSClient(BizHawkClient):
# If RAM address isn't 0x0 yet break out and try again later to give the rest of the items
for i in range(len(ctx.items_received) - received_index):
item_data = items_by_id[ctx.items_received[received_index + i].item]
b = await bizhawk.guarded_read(ctx.bizhawk_ctx, [(0x3057, 1, "EWRAM")], [(0x3057, [0x0], "EWRAM")])
if b is None:
result = False
total = 0
while not result:
await asyncio.sleep(0.05)
total += 0.05
result = await bizhawk.guarded_write(
ctx.bizhawk_ctx,
[
(0x3057, [id_to_RAM(item_data.itemID)], "EWRAM")
],
[(0x3057, [0x0], "EWRAM")]
)
if result:
total = 0
if total >= 1:
break
if not result:
break
await bizhawk.write(
ctx.bizhawk_ctx,
[
(0x3057, [id_to_RAM(item_data.itemID)], "EWRAM"),
(0x4808, [(received_index + i + 1) // 0x100, (received_index + i + 1) % 0x100], "EWRAM"),
],
]
)
await asyncio.sleep(0.1)
# Early return and location send if you are currently in a shop,
# since other flags aren't going to change

View File

@ -1,6 +1,9 @@
flying = [
0x14,
0x1D,
0x32,
0x33,
0x40,
0x4C
]
@ -23,7 +26,6 @@ enemies = [
0x5032AC,
0x5032CC,
0x5032EC,
0x50330C,
0x50332C,
0x50334C,
0x50336C,
@ -151,7 +153,7 @@ enemies = [
0x50458C,
0x5045AC,
0x50468C,
0x5046CC,
# 0x5046CC, 6 enemy formation
0x5046EC,
0x50470C
]

View File

@ -78,21 +78,21 @@ itemList: typing.List[ItemData] = [
ItemData(77771060, "Beanstar Piece 3", ItemClassification.progression, 0x67),
ItemData(77771061, "Beanstar Piece 4", ItemClassification.progression, 0x70),
ItemData(77771062, "Spangle", ItemClassification.progression, 0x72),
ItemData(77771063, "Beanlet 1", ItemClassification.filler, 0x73),
ItemData(77771064, "Beanlet 2", ItemClassification.filler, 0x74),
ItemData(77771065, "Beanlet 3", ItemClassification.filler, 0x75),
ItemData(77771066, "Beanlet 4", ItemClassification.filler, 0x76),
ItemData(77771067, "Beanlet 5", ItemClassification.filler, 0x77),
ItemData(77771068, "Beanstone 1", ItemClassification.filler, 0x80),
ItemData(77771069, "Beanstone 2", ItemClassification.filler, 0x81),
ItemData(77771070, "Beanstone 3", ItemClassification.filler, 0x82),
ItemData(77771071, "Beanstone 4", ItemClassification.filler, 0x83),
ItemData(77771072, "Beanstone 5", ItemClassification.filler, 0x84),
ItemData(77771073, "Beanstone 6", ItemClassification.filler, 0x85),
ItemData(77771074, "Beanstone 7", ItemClassification.filler, 0x86),
ItemData(77771075, "Beanstone 8", ItemClassification.filler, 0x87),
ItemData(77771076, "Beanstone 9", ItemClassification.filler, 0x90),
ItemData(77771077, "Beanstone 10", ItemClassification.filler, 0x91),
ItemData(77771063, "Beanlet 1", ItemClassification.useful, 0x73),
ItemData(77771064, "Beanlet 2", ItemClassification.useful, 0x74),
ItemData(77771065, "Beanlet 3", ItemClassification.useful, 0x75),
ItemData(77771066, "Beanlet 4", ItemClassification.useful, 0x76),
ItemData(77771067, "Beanlet 5", ItemClassification.useful, 0x77),
ItemData(77771068, "Beanstone 1", ItemClassification.useful, 0x80),
ItemData(77771069, "Beanstone 2", ItemClassification.useful, 0x81),
ItemData(77771070, "Beanstone 3", ItemClassification.useful, 0x82),
ItemData(77771071, "Beanstone 4", ItemClassification.useful, 0x83),
ItemData(77771072, "Beanstone 5", ItemClassification.useful, 0x84),
ItemData(77771073, "Beanstone 6", ItemClassification.useful, 0x85),
ItemData(77771074, "Beanstone 7", ItemClassification.useful, 0x86),
ItemData(77771075, "Beanstone 8", ItemClassification.useful, 0x87),
ItemData(77771076, "Beanstone 9", ItemClassification.useful, 0x90),
ItemData(77771077, "Beanstone 10", ItemClassification.useful, 0x91),
ItemData(77771078, "Secret Scroll 1", ItemClassification.useful, 0x92),
ItemData(77771079, "Secret Scroll 2", ItemClassification.useful, 0x93),
ItemData(77771080, "Castle Badge", ItemClassification.useful, 0x9F),

View File

@ -4,9 +4,6 @@ from BaseClasses import Location
class LocationData:
name: str = ""
id: int = 0x00
def __init__(self, name, id_, itemType):
self.name = name
self.itemType = itemType
@ -93,8 +90,8 @@ mainArea: typing.List[LocationData] = [
LocationData("Hoohoo Mountain Below Summit Block 1", 0x39D873, 0),
LocationData("Hoohoo Mountain Below Summit Block 2", 0x39D87B, 0),
LocationData("Hoohoo Mountain Below Summit Block 3", 0x39D883, 0),
LocationData("Hoohoo Mountain After Hoohooros Block 1", 0x39D890, 0),
LocationData("Hoohoo Mountain After Hoohooros Block 2", 0x39D8A0, 0),
LocationData("Hoohoo Mountain Past Hoohooros Block 1", 0x39D890, 0),
LocationData("Hoohoo Mountain Past Hoohooros Block 2", 0x39D8A0, 0),
LocationData("Hoohoo Mountain Hoohooros Room Block 1", 0x39D8AD, 0),
LocationData("Hoohoo Mountain Hoohooros Room Block 2", 0x39D8B5, 0),
LocationData("Hoohoo Mountain Before Hoohooros Block", 0x39D8D2, 0),
@ -104,7 +101,7 @@ mainArea: typing.List[LocationData] = [
LocationData("Hoohoo Mountain Room 1 Block 2", 0x39D924, 0),
LocationData("Hoohoo Mountain Room 1 Block 3", 0x39D92C, 0),
LocationData("Hoohoo Mountain Base Room 1 Block", 0x39D939, 0),
LocationData("Hoohoo Village Right Side Block", 0x39D957, 0),
LocationData("Hoohoo Village Eastside Block", 0x39D957, 0),
LocationData("Hoohoo Village Bridge Room Block 1", 0x39D96F, 0),
LocationData("Hoohoo Village Bridge Room Block 2", 0x39D97F, 0),
LocationData("Hoohoo Village Bridge Room Block 3", 0x39D98F, 0),
@ -119,8 +116,8 @@ mainArea: typing.List[LocationData] = [
LocationData("Hoohoo Mountain Base Boostatue Room Digspot 2", 0x39D9E1, 0),
LocationData("Hoohoo Mountain Base Grassy Area Block 1", 0x39D9FE, 0),
LocationData("Hoohoo Mountain Base Grassy Area Block 2", 0x39D9F6, 0),
LocationData("Hoohoo Mountain Base After Minecart Minigame Block 1", 0x39DA35, 0),
LocationData("Hoohoo Mountain Base After Minecart Minigame Block 2", 0x39DA2D, 0),
LocationData("Hoohoo Mountain Base Past Minecart Minigame Block 1", 0x39DA35, 0),
LocationData("Hoohoo Mountain Base Past Minecart Minigame Block 2", 0x39DA2D, 0),
LocationData("Cave Connecting Stardust Fields and Hoohoo Village Block 1", 0x39DA77, 0),
LocationData("Cave Connecting Stardust Fields and Hoohoo Village Block 2", 0x39DA7F, 0),
LocationData("Hoohoo Village South Cave Block", 0x39DACD, 0),
@ -143,14 +140,14 @@ mainArea: typing.List[LocationData] = [
LocationData("Shop Starting Flag 3", 0x3C05F4, 3),
LocationData("Hoohoo Mountain Summit Digspot", 0x39D85E, 0),
LocationData("Hoohoo Mountain Below Summit Digspot", 0x39D86B, 0),
LocationData("Hoohoo Mountain After Hoohooros Digspot", 0x39D898, 0),
LocationData("Hoohoo Mountain Past Hoohooros Digspot", 0x39D898, 0),
LocationData("Hoohoo Mountain Hoohooros Room Digspot 1", 0x39D8BD, 0),
LocationData("Hoohoo Mountain Hoohooros Room Digspot 2", 0x39D8C5, 0),
LocationData("Hoohoo Mountain Before Hoohooros Digspot", 0x39D8E2, 0),
LocationData("Hoohoo Mountain Room 2 Digspot 1", 0x39D907, 0),
LocationData("Hoohoo Mountain Room 2 Digspot 2", 0x39D90F, 0),
LocationData("Hoohoo Mountain Base Room 1 Digspot", 0x39D941, 0),
LocationData("Hoohoo Village Right Side Digspot", 0x39D95F, 0),
LocationData("Hoohoo Village Eastside Digspot", 0x39D95F, 0),
LocationData("Hoohoo Village Super Hammer Cave Digspot", 0x39DB02, 0),
LocationData("Hoohoo Village Super Hammer Cave Block", 0x39DAEA, 0),
LocationData("Hoohoo Village North Cave Room 2 Digspot", 0x39DAB5, 0),
@ -267,7 +264,7 @@ coins: typing.List[LocationData] = [
LocationData("Chucklehuck Woods Cave Room 3 Coin Block", 0x39DDB4, 0),
LocationData("Chucklehuck Woods Pipe 5 Room Coin Block", 0x39DDE6, 0),
LocationData("Chucklehuck Woods Room 7 Coin Block", 0x39DE31, 0),
LocationData("Chucklehuck Woods After Chuckleroot Coin Block", 0x39DF14, 0),
LocationData("Chucklehuck Woods Past Chuckleroot Coin Block", 0x39DF14, 0),
LocationData("Chucklehuck Woods Koopa Room Coin Block", 0x39DF53, 0),
LocationData("Chucklehuck Woods Winkle Area Cave Coin Block", 0x39DF80, 0),
LocationData("Sewers Prison Room Coin Block", 0x39E01E, 0),
@ -286,11 +283,12 @@ baseUltraRocks: typing.List[LocationData] = [
LocationData("Hoohoo Mountain Base Past Ultra Hammer Rocks Block 1", 0x39DA42, 0),
LocationData("Hoohoo Mountain Base Past Ultra Hammer Rocks Block 2", 0x39DA4A, 0),
LocationData("Hoohoo Mountain Base Past Ultra Hammer Rocks Block 3", 0x39DA52, 0),
LocationData("Hoohoo Mountain Base Boostatue Room Digspot 3 (Rightside)", 0x39D9E9, 0),
LocationData("Hoohoo Mountain Base Boostatue Room Digspot 3 (Right Side)", 0x39D9E9, 0),
LocationData("Hoohoo Mountain Base Mole Near Teehee Valley", 0x277A45, 1),
LocationData("Teehee Valley Entrance To Hoohoo Mountain Digspot", 0x39E5B5, 0),
LocationData("Teehee Valley Solo Luigi Maze Room 2 Digspot 1", 0x39E5C8, 0),
LocationData("Teehee Valley Solo Luigi Maze Room 2 Digspot 2", 0x39E5D0, 0),
LocationData("Teehee Valley Upper Maze Room 1 Block", 0x39E5E0, 0),
LocationData("Teehee Valley Upper Maze Room 2 Digspot 1", 0x39E5C8, 0),
LocationData("Teehee Valley Upper Maze Room 2 Digspot 2", 0x39E5D0, 0),
LocationData("Hoohoo Mountain Base Guffawha Ruins Entrance Digspot", 0x39DA0B, 0),
LocationData("Hoohoo Mountain Base Teehee Valley Entrance Digspot", 0x39DA20, 0),
LocationData("Hoohoo Mountain Base Teehee Valley Entrance Block", 0x39DA18, 0),
@ -345,12 +343,12 @@ chucklehuck: typing.List[LocationData] = [
LocationData("Chucklehuck Woods Southwest of Chuckleroot Block", 0x39DEC2, 0),
LocationData("Chucklehuck Woods Wiggler room Digspot 1", 0x39DECF, 0),
LocationData("Chucklehuck Woods Wiggler room Digspot 2", 0x39DED7, 0),
LocationData("Chucklehuck Woods After Chuckleroot Block 1", 0x39DEE4, 0),
LocationData("Chucklehuck Woods After Chuckleroot Block 2", 0x39DEEC, 0),
LocationData("Chucklehuck Woods After Chuckleroot Block 3", 0x39DEF4, 0),
LocationData("Chucklehuck Woods After Chuckleroot Block 4", 0x39DEFC, 0),
LocationData("Chucklehuck Woods After Chuckleroot Block 5", 0x39DF04, 0),
LocationData("Chucklehuck Woods After Chuckleroot Block 6", 0x39DF0C, 0),
LocationData("Chucklehuck Woods Past Chuckleroot Block 1", 0x39DEE4, 0),
LocationData("Chucklehuck Woods Past Chuckleroot Block 2", 0x39DEEC, 0),
LocationData("Chucklehuck Woods Past Chuckleroot Block 3", 0x39DEF4, 0),
LocationData("Chucklehuck Woods Past Chuckleroot Block 4", 0x39DEFC, 0),
LocationData("Chucklehuck Woods Past Chuckleroot Block 5", 0x39DF04, 0),
LocationData("Chucklehuck Woods Past Chuckleroot Block 6", 0x39DF0C, 0),
LocationData("Chucklehuck Woods Koopa Room Block 1", 0x39DF4B, 0),
LocationData("Chucklehuck Woods Koopa Room Block 2", 0x39DF5B, 0),
LocationData("Chucklehuck Woods Koopa Room Digspot", 0x39DF63, 0),
@ -367,14 +365,14 @@ chucklehuck: typing.List[LocationData] = [
]
castleTown: typing.List[LocationData] = [
LocationData("Beanbean Castle Town Left Side House Block 1", 0x39D7A4, 0),
LocationData("Beanbean Castle Town Left Side House Block 2", 0x39D7AC, 0),
LocationData("Beanbean Castle Town Left Side House Block 3", 0x39D7B4, 0),
LocationData("Beanbean Castle Town Left Side House Block 4", 0x39D7BC, 0),
LocationData("Beanbean Castle Town Right Side House Block 1", 0x39D7D8, 0),
LocationData("Beanbean Castle Town Right Side House Block 2", 0x39D7E0, 0),
LocationData("Beanbean Castle Town Right Side House Block 3", 0x39D7E8, 0),
LocationData("Beanbean Castle Town Right Side House Block 4", 0x39D7F0, 0),
LocationData("Beanbean Castle Town West Side House Block 1", 0x39D7A4, 0),
LocationData("Beanbean Castle Town West Side House Block 2", 0x39D7AC, 0),
LocationData("Beanbean Castle Town West Side House Block 3", 0x39D7B4, 0),
LocationData("Beanbean Castle Town West Side House Block 4", 0x39D7BC, 0),
LocationData("Beanbean Castle Town East Side House Block 1", 0x39D7D8, 0),
LocationData("Beanbean Castle Town East Side House Block 2", 0x39D7E0, 0),
LocationData("Beanbean Castle Town East Side House Block 3", 0x39D7E8, 0),
LocationData("Beanbean Castle Town East Side House Block 4", 0x39D7F0, 0),
LocationData("Beanbean Castle Peach's Extra Dress", 0x1E9433, 2),
LocationData("Beanbean Castle Fake Beanstar", 0x1E9432, 2),
LocationData("Beanbean Castle Town Beanlet 1", 0x251347, 1),
@ -444,14 +442,14 @@ piranhaFlag: typing.List[LocationData] = [
]
kidnappedFlag: typing.List[LocationData] = [
LocationData("Badge Shop Enter Fungitown Flag 1", 0x3C0640, 2),
LocationData("Badge Shop Enter Fungitown Flag 2", 0x3C0642, 2),
LocationData("Badge Shop Enter Fungitown Flag 3", 0x3C0644, 2),
LocationData("Pants Shop Enter Fungitown Flag 1", 0x3C0646, 2),
LocationData("Pants Shop Enter Fungitown Flag 2", 0x3C0648, 2),
LocationData("Pants Shop Enter Fungitown Flag 3", 0x3C064A, 2),
LocationData("Shop Enter Fungitown Flag 1", 0x3C0606, 3),
LocationData("Shop Enter Fungitown Flag 2", 0x3C0608, 3),
LocationData("Badge Shop Trunkle Flag 1", 0x3C0640, 2),
LocationData("Badge Shop Trunkle Flag 2", 0x3C0642, 2),
LocationData("Badge Shop Trunkle Flag 3", 0x3C0644, 2),
LocationData("Pants Shop Trunkle Flag 1", 0x3C0646, 2),
LocationData("Pants Shop Trunkle Flag 2", 0x3C0648, 2),
LocationData("Pants Shop Trunkle Flag 3", 0x3C064A, 2),
LocationData("Shop Trunkle Flag 1", 0x3C0606, 3),
LocationData("Shop Trunkle Flag 2", 0x3C0608, 3),
]
beanstarFlag: typing.List[LocationData] = [
@ -553,21 +551,21 @@ surfable: typing.List[LocationData] = [
airport: typing.List[LocationData] = [
LocationData("Airport Entrance Digspot", 0x39E2DC, 0),
LocationData("Airport Lobby Digspot", 0x39E2E9, 0),
LocationData("Airport Leftside Digspot 1", 0x39E2F6, 0),
LocationData("Airport Leftside Digspot 2", 0x39E2FE, 0),
LocationData("Airport Leftside Digspot 3", 0x39E306, 0),
LocationData("Airport Leftside Digspot 4", 0x39E30E, 0),
LocationData("Airport Leftside Digspot 5", 0x39E316, 0),
LocationData("Airport Westside Digspot 1", 0x39E2F6, 0),
LocationData("Airport Westside Digspot 2", 0x39E2FE, 0),
LocationData("Airport Westside Digspot 3", 0x39E306, 0),
LocationData("Airport Westside Digspot 4", 0x39E30E, 0),
LocationData("Airport Westside Digspot 5", 0x39E316, 0),
LocationData("Airport Center Digspot 1", 0x39E323, 0),
LocationData("Airport Center Digspot 2", 0x39E32B, 0),
LocationData("Airport Center Digspot 3", 0x39E333, 0),
LocationData("Airport Center Digspot 4", 0x39E33B, 0),
LocationData("Airport Center Digspot 5", 0x39E343, 0),
LocationData("Airport Rightside Digspot 1", 0x39E350, 0),
LocationData("Airport Rightside Digspot 2", 0x39E358, 0),
LocationData("Airport Rightside Digspot 3", 0x39E360, 0),
LocationData("Airport Rightside Digspot 4", 0x39E368, 0),
LocationData("Airport Rightside Digspot 5", 0x39E370, 0),
LocationData("Airport Eastside Digspot 1", 0x39E350, 0),
LocationData("Airport Eastside Digspot 2", 0x39E358, 0),
LocationData("Airport Eastside Digspot 3", 0x39E360, 0),
LocationData("Airport Eastside Digspot 4", 0x39E368, 0),
LocationData("Airport Eastside Digspot 5", 0x39E370, 0),
]
gwarharEntrance: typing.List[LocationData] = [
@ -617,7 +615,6 @@ teeheeValley: typing.List[LocationData] = [
LocationData("Teehee Valley Past Ultra Hammer Rock Block 2", 0x39E590, 0),
LocationData("Teehee Valley Past Ultra Hammer Rock Digspot 1", 0x39E598, 0),
LocationData("Teehee Valley Past Ultra Hammer Rock Digspot 3", 0x39E5A8, 0),
LocationData("Teehee Valley Solo Luigi Maze Room 1 Block", 0x39E5E0, 0),
LocationData("Teehee Valley Before Trunkle Digspot", 0x39E5F0, 0),
LocationData("S.S. Chuckola Storage Room Block 1", 0x39E610, 0),
LocationData("S.S. Chuckola Storage Room Block 2", 0x39E628, 0),
@ -667,7 +664,7 @@ bowsers: typing.List[LocationData] = [
LocationData("Bowser's Castle Iggy & Morton Hallway Block 1", 0x39E9EF, 0),
LocationData("Bowser's Castle Iggy & Morton Hallway Block 2", 0x39E9F7, 0),
LocationData("Bowser's Castle Iggy & Morton Hallway Digspot", 0x39E9FF, 0),
LocationData("Bowser's Castle After Morton Block", 0x39EA0C, 0),
LocationData("Bowser's Castle Past Morton Block", 0x39EA0C, 0),
LocationData("Bowser's Castle Morton Room 1 Digspot", 0x39EA89, 0),
LocationData("Bowser's Castle Lemmy Room 1 Block", 0x39EA9C, 0),
LocationData("Bowser's Castle Lemmy Room 1 Digspot", 0x39EAA4, 0),
@ -705,16 +702,16 @@ jokesEntrance: typing.List[LocationData] = [
LocationData("Joke's End Second Floor West Room Block 4", 0x39E781, 0),
LocationData("Joke's End Mole Reward 1", 0x27788E, 1),
LocationData("Joke's End Mole Reward 2", 0x2778D2, 1),
]
jokesMain: typing.List[LocationData] = [
LocationData("Joke's End Furnace Room 1 Block 1", 0x39E70F, 0),
LocationData("Joke's End Furnace Room 1 Block 2", 0x39E717, 0),
LocationData("Joke's End Furnace Room 1 Block 3", 0x39E71F, 0),
LocationData("Joke's End Northeast of Boiler Room 1 Block", 0x39E732, 0),
LocationData("Joke's End Northeast of Boiler Room 3 Digspot", 0x39E73F, 0),
LocationData("Joke's End Northeast of Boiler Room 2 Block", 0x39E74C, 0),
LocationData("Joke's End Northeast of Boiler Room 2 Digspot", 0x39E754, 0),
LocationData("Joke's End Northeast of Boiler Room 3 Digspot", 0x39E73F, 0),
]
jokesMain: typing.List[LocationData] = [
LocationData("Joke's End Second Floor East Room Digspot", 0x39E794, 0),
LocationData("Joke's End Final Split up Room Digspot", 0x39E7A7, 0),
LocationData("Joke's End South of Bridge Room Block", 0x39E7B4, 0),
@ -740,10 +737,10 @@ jokesMain: typing.List[LocationData] = [
postJokes: typing.List[LocationData] = [
LocationData("Teehee Valley Past Ultra Hammer Rock Digspot 2 (Post-Birdo)", 0x39E5A0, 0),
LocationData("Teehee Valley Before Popple Digspot 1", 0x39E55B, 0),
LocationData("Teehee Valley Before Popple Digspot 2", 0x39E563, 0),
LocationData("Teehee Valley Before Popple Digspot 3", 0x39E56B, 0),
LocationData("Teehee Valley Before Popple Digspot 4", 0x39E573, 0),
LocationData("Teehee Valley Before Birdo Digspot 1", 0x39E55B, 0),
LocationData("Teehee Valley Before Birdo Digspot 2", 0x39E563, 0),
LocationData("Teehee Valley Before Birdo Digspot 3", 0x39E56B, 0),
LocationData("Teehee Valley Before Birdo Digspot 4", 0x39E573, 0),
]
theater: typing.List[LocationData] = [
@ -766,6 +763,10 @@ oasis: typing.List[LocationData] = [
LocationData("Oho Oasis Thunderhand", 0x1E9409, 2),
]
cacklettas_soul: typing.List[LocationData] = [
LocationData("Cackletta's Soul", None, 0),
]
nonBlock = [
(0x434B, 0x1, 0x243844), # Farm Mole 1
(0x434B, 0x1, 0x24387D), # Farm Mole 2
@ -1171,15 +1172,15 @@ all_locations: typing.List[LocationData] = (
+ fungitownBeanstar
+ fungitownBirdo
+ bowsers
+ bowsersMini
+ jokesEntrance
+ jokesMain
+ postJokes
+ theater
+ oasis
+ gwarharMain
+ bowsersMini
+ baseUltraRocks
+ coins
)
location_table: typing.Dict[str, int] = {locData.name: locData.id for locData in all_locations}
location_table: typing.Dict[str, int] = {location.name: location.id for location in all_locations}

View File

@ -8,14 +8,14 @@ class LocationName:
StardustFields4Block3 = "Stardust Fields Room 4 Block 3"
StardustFields5Block = "Stardust Fields Room 5 Block"
HoohooVillageHammerHouseBlock = "Hoohoo Village Hammer House Block"
BeanbeanCastleTownLeftSideHouseBlock1 = "Beanbean Castle Town Left Side House Block 1"
BeanbeanCastleTownLeftSideHouseBlock2 = "Beanbean Castle Town Left Side House Block 2"
BeanbeanCastleTownLeftSideHouseBlock3 = "Beanbean Castle Town Left Side House Block 3"
BeanbeanCastleTownLeftSideHouseBlock4 = "Beanbean Castle Town Left Side House Block 4"
BeanbeanCastleTownRightSideHouseBlock1 = "Beanbean Castle Town Right Side House Block 1"
BeanbeanCastleTownRightSideHouseBlock2 = "Beanbean Castle Town Right Side House Block 2"
BeanbeanCastleTownRightSideHouseBlock3 = "Beanbean Castle Town Right Side House Block 3"
BeanbeanCastleTownRightSideHouseBlock4 = "Beanbean Castle Town Right Side House Block 4"
BeanbeanCastleTownWestsideHouseBlock1 = "Beanbean Castle Town Westside House Block 1"
BeanbeanCastleTownWestsideHouseBlock2 = "Beanbean Castle Town Westside House Block 2"
BeanbeanCastleTownWestsideHouseBlock3 = "Beanbean Castle Town Westside House Block 3"
BeanbeanCastleTownWestsideHouseBlock4 = "Beanbean Castle Town Westside House Block 4"
BeanbeanCastleTownEastsideHouseBlock1 = "Beanbean Castle Town Eastside House Block 1"
BeanbeanCastleTownEastsideHouseBlock2 = "Beanbean Castle Town Eastside House Block 2"
BeanbeanCastleTownEastsideHouseBlock3 = "Beanbean Castle Town Eastside House Block 3"
BeanbeanCastleTownEastsideHouseBlock4 = "Beanbean Castle Town Eastside House Block 4"
BeanbeanCastleTownMiniMarioBlock1 = "Beanbean Castle Town Mini Mario Block 1"
BeanbeanCastleTownMiniMarioBlock2 = "Beanbean Castle Town Mini Mario Block 2"
BeanbeanCastleTownMiniMarioBlock3 = "Beanbean Castle Town Mini Mario Block 3"
@ -26,9 +26,9 @@ class LocationName:
HoohooMountainBelowSummitBlock1 = "Hoohoo Mountain Below Summit Block 1"
HoohooMountainBelowSummitBlock2 = "Hoohoo Mountain Below Summit Block 2"
HoohooMountainBelowSummitBlock3 = "Hoohoo Mountain Below Summit Block 3"
HoohooMountainAfterHoohoorosBlock1 = "Hoohoo Mountain After Hoohooros Block 1"
HoohooMountainAfterHoohoorosDigspot = "Hoohoo Mountain After Hoohooros Digspot"
HoohooMountainAfterHoohoorosBlock2 = "Hoohoo Mountain After Hoohooros Block 2"
HoohooMountainPastHoohoorosBlock1 = "Hoohoo Mountain Past Hoohooros Block 1"
HoohooMountainPastHoohoorosDigspot = "Hoohoo Mountain Past Hoohooros Digspot"
HoohooMountainPastHoohoorosBlock2 = "Hoohoo Mountain Past Hoohooros Block 2"
HoohooMountainHoohoorosRoomBlock1 = "Hoohoo Mountain Hoohooros Room Block 1"
HoohooMountainHoohoorosRoomBlock2 = "Hoohoo Mountain Hoohooros Room Block 2"
HoohooMountainHoohoorosRoomDigspot1 = "Hoohoo Mountain Hoohooros Room Digspot 1"
@ -44,8 +44,8 @@ class LocationName:
HoohooMountainRoom1Block3 = "Hoohoo Mountain Room 1 Block 3"
HoohooMountainBaseRoom1Block = "Hoohoo Mountain Base Room 1 Block"
HoohooMountainBaseRoom1Digspot = "Hoohoo Mountain Base Room 1 Digspot"
HoohooVillageRightSideBlock = "Hoohoo Village Right Side Block"
HoohooVillageRightSideDigspot = "Hoohoo Village Right Side Digspot"
HoohooVillageEastsideBlock = "Hoohoo Village Eastside Block"
HoohooVillageEastsideDigspot = "Hoohoo Village Eastside Digspot"
HoohooVillageBridgeRoomBlock1 = "Hoohoo Village Bridge Room Block 1"
HoohooVillageBridgeRoomBlock2 = "Hoohoo Village Bridge Room Block 2"
HoohooVillageBridgeRoomBlock3 = "Hoohoo Village Bridge Room Block 3"
@ -65,8 +65,8 @@ class LocationName:
HoohooMountainBaseGuffawhaRuinsEntranceDigspot = "Hoohoo Mountain Base Guffawha Ruins Entrance Digspot"
HoohooMountainBaseTeeheeValleyEntranceDigspot = "Hoohoo Mountain Base Teehee Valley Entrance Digspot"
HoohooMountainBaseTeeheeValleyEntranceBlock = "Hoohoo Mountain Base Teehee Valley Entrance Block"
HoohooMountainBaseAfterMinecartMinigameBlock1 = "Hoohoo Mountain Base After Minecart Minigame Block 1"
HoohooMountainBaseAfterMinecartMinigameBlock2 = "Hoohoo Mountain Base After Minecart Minigame Block 2"
HoohooMountainBasePastMinecartMinigameBlock1 = "Hoohoo Mountain Base Past Minecart Minigame Block 1"
HoohooMountainBasePastMinecartMinigameBlock2 = "Hoohoo Mountain Base Past Minecart Minigame Block 2"
HoohooMountainBasePastUltraHammerRocksBlock1 = "Hoohoo Mountain Base Past Ultra Hammer Rocks Block 1"
HoohooMountainBasePastUltraHammerRocksBlock2 = "Hoohoo Mountain Base Past Ultra Hammer Rocks Block 2"
HoohooMountainBasePastUltraHammerRocksBlock3 = "Hoohoo Mountain Base Past Ultra Hammer Rocks Block 3"
@ -148,12 +148,12 @@ class LocationName:
ChucklehuckWoodsSouthwestOfChucklerootBlock = "Chucklehuck Woods Southwest of Chuckleroot Block"
ChucklehuckWoodsWigglerRoomDigspot1 = "Chucklehuck Woods Wiggler Room Digspot 1"
ChucklehuckWoodsWigglerRoomDigspot2 = "Chucklehuck Woods Wiggler Room Digspot 2"
ChucklehuckWoodsAfterChucklerootBlock1 = "Chucklehuck Woods After Chuckleroot Block 1"
ChucklehuckWoodsAfterChucklerootBlock2 = "Chucklehuck Woods After Chuckleroot Block 2"
ChucklehuckWoodsAfterChucklerootBlock3 = "Chucklehuck Woods After Chuckleroot Block 3"
ChucklehuckWoodsAfterChucklerootBlock4 = "Chucklehuck Woods After Chuckleroot Block 4"
ChucklehuckWoodsAfterChucklerootBlock5 = "Chucklehuck Woods After Chuckleroot Block 5"
ChucklehuckWoodsAfterChucklerootBlock6 = "Chucklehuck Woods After Chuckleroot Block 6"
ChucklehuckWoodsPastChucklerootBlock1 = "Chucklehuck Woods Past Chuckleroot Block 1"
ChucklehuckWoodsPastChucklerootBlock2 = "Chucklehuck Woods Past Chuckleroot Block 2"
ChucklehuckWoodsPastChucklerootBlock3 = "Chucklehuck Woods Past Chuckleroot Block 3"
ChucklehuckWoodsPastChucklerootBlock4 = "Chucklehuck Woods Past Chuckleroot Block 4"
ChucklehuckWoodsPastChucklerootBlock5 = "Chucklehuck Woods Past Chuckleroot Block 5"
ChucklehuckWoodsPastChucklerootBlock6 = "Chucklehuck Woods Past Chuckleroot Block 6"
WinkleAreaBeanstarRoomBlock = "Winkle Area Beanstar Room Block"
WinkleAreaDigspot = "Winkle Area Digspot"
WinkleAreaOutsideColosseumBlock = "Winkle Area Outside Colosseum Block"
@ -232,21 +232,21 @@ class LocationName:
WoohooHooniversityPastCacklettaRoom2Digspot = "Woohoo Hooniversity Past Cackletta Room 2 Digspot"
AirportEntranceDigspot = "Airport Entrance Digspot"
AirportLobbyDigspot = "Airport Lobby Digspot"
AirportLeftsideDigspot1 = "Airport Leftside Digspot 1"
AirportLeftsideDigspot2 = "Airport Leftside Digspot 2"
AirportLeftsideDigspot3 = "Airport Leftside Digspot 3"
AirportLeftsideDigspot4 = "Airport Leftside Digspot 4"
AirportLeftsideDigspot5 = "Airport Leftside Digspot 5"
AirportWestsideDigspot1 = "Airport Westside Digspot 1"
AirportWestsideDigspot2 = "Airport Westside Digspot 2"
AirportWestsideDigspot3 = "Airport Westside Digspot 3"
AirportWestsideDigspot4 = "Airport Westside Digspot 4"
AirportWestsideDigspot5 = "Airport Westside Digspot 5"
AirportCenterDigspot1 = "Airport Center Digspot 1"
AirportCenterDigspot2 = "Airport Center Digspot 2"
AirportCenterDigspot3 = "Airport Center Digspot 3"
AirportCenterDigspot4 = "Airport Center Digspot 4"
AirportCenterDigspot5 = "Airport Center Digspot 5"
AirportRightsideDigspot1 = "Airport Rightside Digspot 1"
AirportRightsideDigspot2 = "Airport Rightside Digspot 2"
AirportRightsideDigspot3 = "Airport Rightside Digspot 3"
AirportRightsideDigspot4 = "Airport Rightside Digspot 4"
AirportRightsideDigspot5 = "Airport Rightside Digspot 5"
AirportEastsideDigspot1 = "Airport Eastside Digspot 1"
AirportEastsideDigspot2 = "Airport Eastside Digspot 2"
AirportEastsideDigspot3 = "Airport Eastside Digspot 3"
AirportEastsideDigspot4 = "Airport Eastside Digspot 4"
AirportEastsideDigspot5 = "Airport Eastside Digspot 5"
GwarharLagoonPipeRoomDigspot = "Gwarhar Lagoon Pipe Room Digspot"
GwarharLagoonMassageParlorEntranceDigspot = "Gwarhar Lagoon Massage Parlor Entrance Digspot"
GwarharLagoonPastHermieDigspot = "Gwarhar Lagoon Past Hermie Digspot"
@ -276,10 +276,10 @@ class LocationName:
WoohooHooniversityBasementRoom4Block = "Woohoo Hooniversity Basement Room 4 Block"
WoohooHooniversityPoppleRoomDigspot1 = "Woohoo Hooniversity Popple Room Digspot 1"
WoohooHooniversityPoppleRoomDigspot2 = "Woohoo Hooniversity Popple Room Digspot 2"
TeeheeValleyBeforePoppleDigspot1 = "Teehee Valley Before Popple Digspot 1"
TeeheeValleyBeforePoppleDigspot2 = "Teehee Valley Before Popple Digspot 2"
TeeheeValleyBeforePoppleDigspot3 = "Teehee Valley Before Popple Digspot 3"
TeeheeValleyBeforePoppleDigspot4 = "Teehee Valley Before Popple Digspot 4"
TeeheeValleyBeforeBirdoDigspot1 = "Teehee Valley Before Birdo Digspot 1"
TeeheeValleyBeforeBirdoDigspot2 = "Teehee Valley Before Birdo Digspot 2"
TeeheeValleyBeforeBirdoDigspot3 = "Teehee Valley Before Birdo Digspot 3"
TeeheeValleyBeforeBirdoDigspot4 = "Teehee Valley Before Birdo Digspot 4"
TeeheeValleyRoom1Digspot1 = "Teehee Valley Room 1 Digspot 1"
TeeheeValleyRoom1Digspot2 = "Teehee Valley Room 1 Digspot 2"
TeeheeValleyRoom1Digspot3 = "Teehee Valley Room 1 Digspot 3"
@ -296,9 +296,9 @@ class LocationName:
TeeheeValleyPastUltraHammersDigspot2 = "Teehee Valley Past Ultra Hammer Rock Digspot 2 (Post-Birdo)"
TeeheeValleyPastUltraHammersDigspot3 = "Teehee Valley Past Ultra Hammer Rock Digspot 3"
TeeheeValleyEntranceToHoohooMountainDigspot = "Teehee Valley Entrance To Hoohoo Mountain Digspot"
TeeheeValleySoloLuigiMazeRoom2Digspot1 = "Teehee Valley Solo Luigi Maze Room 2 Digspot 1"
TeeheeValleySoloLuigiMazeRoom2Digspot2 = "Teehee Valley Solo Luigi Maze Room 2 Digspot 2"
TeeheeValleySoloLuigiMazeRoom1Block = "Teehee Valley Solo Luigi Maze Room 1 Block"
TeeheeValleyUpperMazeRoom2Digspot1 = "Teehee Valley Upper Maze Room 2 Digspot 1"
TeeheeValleyUpperMazeRoom2Digspot2 = "Teehee Valley Upper Maze Room 2 Digspot 2"
TeeheeValleyUpperMazeRoom1Block = "Teehee Valley Upper Maze Room 1 Block"
TeeheeValleyBeforeTrunkleDigspot = "Teehee Valley Before Trunkle Digspot"
TeeheeValleyTrunkleRoomDigspot = "Teehee Valley Trunkle Room Digspot"
SSChuckolaStorageRoomBlock1 = "S.S. Chuckola Storage Room Block 1"
@ -314,10 +314,10 @@ class LocationName:
JokesEndFurnaceRoom1Block1 = "Joke's End Furnace Room 1 Block 1"
JokesEndFurnaceRoom1Block2 = "Joke's End Furnace Room 1 Block 2"
JokesEndFurnaceRoom1Block3 = "Joke's End Furnace Room 1 Block 3"
JokesEndNortheastOfBoilerRoom1Block = "Joke's End Northeast Of Boiler Room 1 Block"
JokesEndNortheastOfBoilerRoom3Digspot = "Joke's End Northeast Of Boiler Room 3 Digspot"
JokesEndNortheastOfBoilerRoom2Block1 = "Joke's End Northeast Of Boiler Room 2 Block"
JokesEndNortheastOfBoilerRoom2Block2 = "Joke's End Northeast Of Boiler Room 2 Digspot"
JokesEndNortheastOfBoilerRoom1Block = "Joke's End Northeast of Boiler Room 1 Block"
JokesEndNortheastOfBoilerRoom3Digspot = "Joke's End Northeast of Boiler Room 3 Digspot"
JokesEndNortheastOfBoilerRoom2Block1 = "Joke's End Northeast of Boiler Room 2 Block"
JokesEndNortheastOfBoilerRoom2Digspot = "Joke's End Northeast of Boiler Room 2 Digspot"
JokesEndSecondFloorWestRoomBlock1 = "Joke's End Second Floor West Room Block 1"
JokesEndSecondFloorWestRoomBlock2 = "Joke's End Second Floor West Room Block 2"
JokesEndSecondFloorWestRoomBlock3 = "Joke's End Second Floor West Room Block 3"
@ -505,7 +505,7 @@ class LocationName:
BowsersCastleIggyMortonHallwayBlock1 = "Bowser's Castle Iggy & Morton Hallway Block 1"
BowsersCastleIggyMortonHallwayBlock2 = "Bowser's Castle Iggy & Morton Hallway Block 2"
BowsersCastleIggyMortonHallwayDigspot = "Bowser's Castle Iggy & Morton Hallway Digspot"
BowsersCastleAfterMortonBlock = "Bowser's Castle After Morton Block"
BowsersCastlePastMortonBlock = "Bowser's Castle Past Morton Block"
BowsersCastleLudwigRoyHallwayBlock1 = "Bowser's Castle Ludwig & Roy Hallway Block 1"
BowsersCastleLudwigRoyHallwayBlock2 = "Bowser's Castle Ludwig & Roy Hallway Block 2"
BowsersCastleRoyCorridorBlock1 = "Bowser's Castle Roy Corridor Block 1"
@ -546,7 +546,7 @@ class LocationName:
ChucklehuckWoodsCaveRoom3CoinBlock = "Chucklehuck Woods Cave Room 3 Coin Block"
ChucklehuckWoodsPipe5RoomCoinBlock = "Chucklehuck Woods Pipe 5 Room Coin Block"
ChucklehuckWoodsRoom7CoinBlock = "Chucklehuck Woods Room 7 Coin Block"
ChucklehuckWoodsAfterChucklerootCoinBlock = "Chucklehuck Woods After Chuckleroot Coin Block"
ChucklehuckWoodsPastChucklerootCoinBlock = "Chucklehuck Woods Past Chuckleroot Coin Block"
ChucklehuckWoodsKoopaRoomCoinBlock = "Chucklehuck Woods Koopa Room Coin Block"
ChucklehuckWoodsWinkleAreaCaveCoinBlock = "Chucklehuck Woods Winkle Area Cave Coin Block"
SewersPrisonRoomCoinBlock = "Sewers Prison Room Coin Block"

View File

@ -1,4 +1,4 @@
from Options import Choice, Toggle, StartInventoryPool, PerGameCommonOptions, Range
from Options import Choice, Toggle, StartInventoryPool, PerGameCommonOptions, Range, Removed
from dataclasses import dataclass
@ -282,7 +282,8 @@ class MLSSOptions(PerGameCommonOptions):
extra_pipes: ExtraPipes
skip_minecart: SkipMinecart
disable_surf: DisableSurf
harhalls_pants: HarhallsPants
disable_harhalls_pants: HarhallsPants
harhalls_pants: Removed
block_visibility: HiddenVisible
chuckle_beans: ChuckleBeans
music_options: MusicOptions

View File

@ -33,6 +33,7 @@ from .Locations import (
postJokes,
baseUltraRocks,
coins,
cacklettas_soul,
)
from . import StateLogic
@ -40,44 +41,45 @@ if typing.TYPE_CHECKING:
from . import MLSSWorld
def create_regions(world: "MLSSWorld", excluded: typing.List[str]):
def create_regions(world: "MLSSWorld"):
menu_region = Region("Menu", world.player, world.multiworld)
world.multiworld.regions.append(menu_region)
create_region(world, "Main Area", mainArea, excluded)
create_region(world, "Chucklehuck Woods", chucklehuck, excluded)
create_region(world, "Beanbean Castle Town", castleTown, excluded)
create_region(world, "Shop Starting Flag", startingFlag, excluded)
create_region(world, "Shop Chuckolator Flag", chuckolatorFlag, excluded)
create_region(world, "Shop Mom Piranha Flag", piranhaFlag, excluded)
create_region(world, "Shop Enter Fungitown Flag", kidnappedFlag, excluded)
create_region(world, "Shop Beanstar Complete Flag", beanstarFlag, excluded)
create_region(world, "Shop Birdo Flag", birdoFlag, excluded)
create_region(world, "Surfable", surfable, excluded)
create_region(world, "Hooniversity", hooniversity, excluded)
create_region(world, "GwarharEntrance", gwarharEntrance, excluded)
create_region(world, "GwarharMain", gwarharMain, excluded)
create_region(world, "TeeheeValley", teeheeValley, excluded)
create_region(world, "Winkle", winkle, excluded)
create_region(world, "Sewers", sewers, excluded)
create_region(world, "Airport", airport, excluded)
create_region(world, "JokesEntrance", jokesEntrance, excluded)
create_region(world, "JokesMain", jokesMain, excluded)
create_region(world, "PostJokes", postJokes, excluded)
create_region(world, "Theater", theater, excluded)
create_region(world, "Fungitown", fungitown, excluded)
create_region(world, "Fungitown Shop Beanstar Complete Flag", fungitownBeanstar, excluded)
create_region(world, "Fungitown Shop Birdo Flag", fungitownBirdo, excluded)
create_region(world, "BooStatue", booStatue, excluded)
create_region(world, "Oasis", oasis, excluded)
create_region(world, "BaseUltraRocks", baseUltraRocks, excluded)
create_region(world, "Main Area", mainArea)
create_region(world, "Chucklehuck Woods", chucklehuck)
create_region(world, "Beanbean Castle Town", castleTown)
create_region(world, "Shop Starting Flag", startingFlag)
create_region(world, "Shop Chuckolator Flag", chuckolatorFlag)
create_region(world, "Shop Mom Piranha Flag", piranhaFlag)
create_region(world, "Shop Enter Fungitown Flag", kidnappedFlag)
create_region(world, "Shop Beanstar Complete Flag", beanstarFlag)
create_region(world, "Shop Birdo Flag", birdoFlag)
create_region(world, "Surfable", surfable)
create_region(world, "Hooniversity", hooniversity)
create_region(world, "GwarharEntrance", gwarharEntrance)
create_region(world, "GwarharMain", gwarharMain)
create_region(world, "TeeheeValley", teeheeValley)
create_region(world, "Winkle", winkle)
create_region(world, "Sewers", sewers)
create_region(world, "Airport", airport)
create_region(world, "JokesEntrance", jokesEntrance)
create_region(world, "JokesMain", jokesMain)
create_region(world, "PostJokes", postJokes)
create_region(world, "Theater", theater)
create_region(world, "Fungitown", fungitown)
create_region(world, "Fungitown Shop Beanstar Complete Flag", fungitownBeanstar)
create_region(world, "Fungitown Shop Birdo Flag", fungitownBirdo)
create_region(world, "BooStatue", booStatue)
create_region(world, "Oasis", oasis)
create_region(world, "BaseUltraRocks", baseUltraRocks)
create_region(world, "Cackletta's Soul", cacklettas_soul)
if world.options.coins:
create_region(world, "Coins", coins, excluded)
create_region(world, "Coins", coins)
if not world.options.castle_skip:
create_region(world, "Bowser's Castle", bowsers, excluded)
create_region(world, "Bowser's Castle Mini", bowsersMini, excluded)
create_region(world, "Bowser's Castle", bowsers)
create_region(world, "Bowser's Castle Mini", bowsersMini)
def connect_regions(world: "MLSSWorld"):
@ -221,6 +223,9 @@ def connect_regions(world: "MLSSWorld"):
"Bowser's Castle Mini",
lambda state: StateLogic.canMini(state, world.player) and StateLogic.thunder(state, world.player),
)
connect(world, names, "Bowser's Castle Mini", "Cackletta's Soul")
else:
connect(world, names, "PostJokes", "Cackletta's Soul")
connect(world, names, "Chucklehuck Woods", "Winkle", lambda state: StateLogic.canDash(state, world.player))
connect(
world,
@ -282,11 +287,11 @@ def connect_regions(world: "MLSSWorld"):
)
def create_region(world: "MLSSWorld", name, locations, excluded):
def create_region(world: "MLSSWorld", name, locations):
ret = Region(name, world.player, world.multiworld)
for location in locations:
loc = MLSSLocation(world.player, location.name, location.id, ret)
if location.name in excluded:
if location.name in world.disabled_locations:
continue
ret.locations.append(loc)
world.multiworld.regions.append(ret)

View File

@ -8,7 +8,7 @@ from BaseClasses import Item, Location
from settings import get_settings
from worlds.Files import APProcedurePatch, APTokenMixin, APTokenTypes, APPatchExtension
from .Items import item_table
from .Locations import shop, badge, pants, location_table, hidden, all_locations
from .Locations import shop, badge, pants, location_table, all_locations
if TYPE_CHECKING:
from . import MLSSWorld
@ -88,7 +88,7 @@ class MLSSPatchExtension(APPatchExtension):
return rom
stream = io.BytesIO(rom)
for location in all_locations:
for location in [location for location in all_locations if location.itemType == 0]:
stream.seek(location.id - 6)
b = stream.read(1)
if b[0] == 0x10 and options["block_visibility"] == 1:
@ -133,7 +133,7 @@ class MLSSPatchExtension(APPatchExtension):
stream = io.BytesIO(rom)
random.seed(options["seed"] + options["player"])
if options["randomize_bosses"] == 1 or (options["randomize_bosses"] == 2) and options["randomize_enemies"] == 0:
if options["randomize_bosses"] == 1 or (options["randomize_bosses"] == 2 and options["randomize_enemies"] == 0):
raw = []
for pos in bosses:
stream.seek(pos + 1)
@ -164,6 +164,7 @@ class MLSSPatchExtension(APPatchExtension):
enemies_raw = []
groups = []
boss_groups = []
if options["randomize_enemies"] == 0:
return stream.getvalue()
@ -171,7 +172,7 @@ class MLSSPatchExtension(APPatchExtension):
if options["randomize_bosses"] == 2:
for pos in bosses:
stream.seek(pos + 1)
groups += [stream.read(0x1F)]
boss_groups += [stream.read(0x1F)]
for pos in enemies:
stream.seek(pos + 8)
@ -221,12 +222,19 @@ class MLSSPatchExtension(APPatchExtension):
groups += [raw]
chomp = False
random.shuffle(groups)
arr = enemies
if options["randomize_bosses"] == 2:
arr += bosses
groups += boss_groups
random.shuffle(groups)
for pos in arr:
if arr[-1] in boss_groups:
stream.seek(pos)
temp = stream.read(1)
stream.seek(pos)
stream.write(bytes([temp[0] | 0x8]))
stream.seek(pos + 1)
stream.write(groups.pop())
@ -320,20 +328,9 @@ def write_tokens(world: "MLSSWorld", patch: MLSSProcedurePatch) -> None:
patch.write_token(APTokenTypes.WRITE, address + 3, bytes([world.random.randint(0x0, 0x26)]))
for location_name in location_table.keys():
if (
(world.options.skip_minecart and "Minecart" in location_name and "After" not in location_name)
or (world.options.castle_skip and "Bowser" in location_name)
or (world.options.disable_surf and "Surf Minigame" in location_name)
or (world.options.harhalls_pants and "Harhall's" in location_name)
):
if location_name in world.disabled_locations:
continue
if (world.options.chuckle_beans == 0 and "Digspot" in location_name) or (
world.options.chuckle_beans == 1 and location_table[location_name] in hidden
):
continue
if not world.options.coins and "Coin" in location_name:
continue
location = world.multiworld.get_location(location_name, world.player)
location = world.get_location(location_name)
item = location.item
address = [address for address in all_locations if address.name == location.name]
item_inject(world, patch, location.address, address[0].itemType, item)

View File

@ -13,7 +13,7 @@ def set_rules(world: "MLSSWorld", excluded):
for location in all_locations:
if "Digspot" in location.name:
if (world.options.skip_minecart and "Minecart" in location.name) or (
world.options.castle_skip and "Bowser" in location.name
world.options.castle_skip and "Bowser" in location.name
):
continue
if world.options.chuckle_beans == 0 or world.options.chuckle_beans == 1 and location.id in hidden:
@ -218,9 +218,9 @@ def set_rules(world: "MLSSWorld", excluded):
add_rule(
world.get_location(LocationName.BeanbeanOutskirtsUltraHammerUpgrade),
lambda state: StateLogic.thunder(state, world.player)
and StateLogic.pieces(state, world.player)
and StateLogic.castleTown(state, world.player)
and StateLogic.rose(state, world.player),
and StateLogic.pieces(state, world.player)
and StateLogic.castleTown(state, world.player)
and StateLogic.rose(state, world.player),
)
add_rule(
world.get_location(LocationName.BeanbeanOutskirtsSoloLuigiCaveMole),
@ -235,27 +235,27 @@ def set_rules(world: "MLSSWorld", excluded):
lambda state: StateLogic.canDig(state, world.player) and StateLogic.canMini(state, world.player),
)
add_rule(
world.get_location(LocationName.ChucklehuckWoodsAfterChucklerootBlock1),
world.get_location(LocationName.ChucklehuckWoodsPastChucklerootBlock1),
lambda state: StateLogic.fruits(state, world.player),
)
add_rule(
world.get_location(LocationName.ChucklehuckWoodsAfterChucklerootBlock2),
world.get_location(LocationName.ChucklehuckWoodsPastChucklerootBlock2),
lambda state: StateLogic.fruits(state, world.player),
)
add_rule(
world.get_location(LocationName.ChucklehuckWoodsAfterChucklerootBlock3),
world.get_location(LocationName.ChucklehuckWoodsPastChucklerootBlock3),
lambda state: StateLogic.fruits(state, world.player),
)
add_rule(
world.get_location(LocationName.ChucklehuckWoodsAfterChucklerootBlock4),
world.get_location(LocationName.ChucklehuckWoodsPastChucklerootBlock4),
lambda state: StateLogic.fruits(state, world.player),
)
add_rule(
world.get_location(LocationName.ChucklehuckWoodsAfterChucklerootBlock5),
world.get_location(LocationName.ChucklehuckWoodsPastChucklerootBlock5),
lambda state: StateLogic.fruits(state, world.player),
)
add_rule(
world.get_location(LocationName.ChucklehuckWoodsAfterChucklerootBlock6),
world.get_location(LocationName.ChucklehuckWoodsPastChucklerootBlock6),
lambda state: StateLogic.fruits(state, world.player),
)
add_rule(
@ -350,10 +350,6 @@ def set_rules(world: "MLSSWorld", excluded):
world.get_location(LocationName.TeeheeValleyPastUltraHammersBlock2),
lambda state: StateLogic.ultra(state, world.player),
)
add_rule(
world.get_location(LocationName.TeeheeValleySoloLuigiMazeRoom1Block),
lambda state: StateLogic.ultra(state, world.player),
)
add_rule(
world.get_location(LocationName.OhoOasisFirebrand),
lambda state: StateLogic.canMini(state, world.player),
@ -462,6 +458,143 @@ def set_rules(world: "MLSSWorld", excluded):
lambda state: StateLogic.canCrash(state, world.player),
)
if world.options.randomize_bosses.value != 0:
if world.options.chuckle_beans != 0:
add_rule(
world.get_location(LocationName.HoohooMountainHoohoorosRoomDigspot1),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainPastHoohoorosDigspot),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainPastHoohoorosConnectorRoomDigspot1),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainBelowSummitDigspot),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainSummitDigspot),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
if world.options.chuckle_beans == 2:
add_rule(
world.get_location(LocationName.HoohooMountainHoohoorosRoomDigspot2),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainPastHoohoorosConnectorRoomDigspot2),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooVillageHammers),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainPeasleysRose),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainHoohoorosRoomBlock1),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainHoohoorosRoomBlock2),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainBelowSummitBlock1),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainBelowSummitBlock2),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainBelowSummitBlock3),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainPastHoohoorosBlock1),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainPastHoohoorosBlock2),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
add_rule(
world.get_location(LocationName.HoohooMountainPastHoohoorosConnectorRoomBlock),
lambda state: StateLogic.hammers(state, world.player)
or StateLogic.fire(state, world.player)
or StateLogic.thunder(state, world.player),
)
if not world.options.difficult_logic:
if world.options.chuckle_beans != 0:
add_rule(
world.get_location(LocationName.JokesEndNortheastOfBoilerRoom2Digspot),
lambda state: StateLogic.canCrash(state, world.player),
)
add_rule(
world.get_location(LocationName.JokesEndNortheastOfBoilerRoom3Digspot),
lambda state: StateLogic.canCrash(state, world.player),
)
add_rule(
world.get_location(LocationName.JokesEndNortheastOfBoilerRoom1Block),
lambda state: StateLogic.canCrash(state, world.player),
)
add_rule(
world.get_location(LocationName.JokesEndNortheastOfBoilerRoom2Block1),
lambda state: StateLogic.canCrash(state, world.player),
)
add_rule(
world.get_location(LocationName.JokesEndFurnaceRoom1Block1),
lambda state: StateLogic.canCrash(state, world.player),
)
add_rule(
world.get_location(LocationName.JokesEndFurnaceRoom1Block2),
lambda state: StateLogic.canCrash(state, world.player),
)
add_rule(
world.get_location(LocationName.JokesEndFurnaceRoom1Block3),
lambda state: StateLogic.canCrash(state, world.player),
)
if world.options.coins:
add_rule(
world.get_location(LocationName.HoohooMountainBaseBooStatueCaveCoinBlock1),
@ -516,7 +649,7 @@ def set_rules(world: "MLSSWorld", excluded):
lambda state: StateLogic.brooch(state, world.player) and StateLogic.hammers(state, world.player),
)
add_rule(
world.get_location(LocationName.ChucklehuckWoodsAfterChucklerootCoinBlock),
world.get_location(LocationName.ChucklehuckWoodsPastChucklerootCoinBlock),
lambda state: StateLogic.brooch(state, world.player) and StateLogic.fruits(state, world.player),
)
add_rule(
@ -546,23 +679,23 @@ def set_rules(world: "MLSSWorld", excluded):
add_rule(
world.get_location(LocationName.GwarharLagoonFirstUnderwaterAreaRoom2CoinBlock),
lambda state: StateLogic.canDash(state, world.player)
and (StateLogic.membership(state, world.player) or StateLogic.surfable(state, world.player)),
and (StateLogic.membership(state, world.player) or StateLogic.surfable(state, world.player)),
)
add_rule(
world.get_location(LocationName.JokesEndSecondFloorWestRoomCoinBlock),
lambda state: StateLogic.ultra(state, world.player)
and StateLogic.fire(state, world.player)
and (
StateLogic.membership(state, world.player)
or (StateLogic.canDig(state, world.player) and StateLogic.canMini(state, world.player))
),
and StateLogic.fire(state, world.player)
and (StateLogic.membership(state, world.player)
or (StateLogic.canDig(state, world.player)
and StateLogic.canMini(state, world.player))),
)
add_rule(
world.get_location(LocationName.JokesEndNorthofBridgeRoomCoinBlock),
lambda state: StateLogic.ultra(state, world.player)
and StateLogic.fire(state, world.player)
and StateLogic.canDig(state, world.player)
and (StateLogic.membership(state, world.player) or StateLogic.canMini(state, world.player)),
and StateLogic.fire(state, world.player)
and StateLogic.canDig(state, world.player)
and (StateLogic.membership(state, world.player)
or StateLogic.canMini(state, world.player)),
)
if not world.options.difficult_logic:
add_rule(

View File

@ -4,7 +4,7 @@ import typing
import settings
from BaseClasses import Tutorial, ItemClassification
from worlds.AutoWorld import WebWorld, World
from typing import List, Dict, Any
from typing import Set, Dict, Any
from .Locations import all_locations, location_table, bowsers, bowsersMini, hidden, coins
from .Options import MLSSOptions
from .Items import MLSSItem, itemList, item_frequencies, item_table
@ -55,29 +55,29 @@ class MLSSWorld(World):
settings: typing.ClassVar[MLSSSettings]
item_name_to_id = {name: data.code for name, data in item_table.items()}
location_name_to_id = {loc_data.name: loc_data.id for loc_data in all_locations}
required_client_version = (0, 4, 5)
required_client_version = (0, 5, 0)
disabled_locations: List[str]
disabled_locations: Set[str]
def generate_early(self) -> None:
self.disabled_locations = []
if self.options.chuckle_beans == 0:
self.disabled_locations += [location.name for location in all_locations if "Digspot" in location.name]
if self.options.castle_skip:
self.disabled_locations += [location.name for location in all_locations if "Bowser" in location.name]
if self.options.chuckle_beans == 1:
self.disabled_locations = [location.name for location in all_locations if location.id in hidden]
self.disabled_locations = set()
if self.options.skip_minecart:
self.disabled_locations += [LocationName.HoohooMountainBaseMinecartCaveDigspot]
self.disabled_locations.update([LocationName.HoohooMountainBaseMinecartCaveDigspot])
if self.options.disable_surf:
self.disabled_locations += [LocationName.SurfMinigame]
if self.options.harhalls_pants:
self.disabled_locations += [LocationName.HarhallsPants]
self.disabled_locations.update([LocationName.SurfMinigame])
if self.options.disable_harhalls_pants:
self.disabled_locations.update([LocationName.HarhallsPants])
if self.options.chuckle_beans == 0:
self.disabled_locations.update([location.name for location in all_locations if "Digspot" in location.name])
if self.options.chuckle_beans == 1:
self.disabled_locations.update([location.name for location in all_locations if location.id in hidden])
if self.options.castle_skip:
self.disabled_locations.update([location.name for location in bowsers + bowsersMini])
if not self.options.coins:
self.disabled_locations += [location.name for location in all_locations if location in coins]
self.disabled_locations.update([location.name for location in coins])
def create_regions(self) -> None:
create_regions(self, self.disabled_locations)
create_regions(self)
connect_regions(self)
item = self.create_item("Mushroom")
@ -90,13 +90,15 @@ class MLSSWorld(World):
self.get_location(LocationName.PantsShopStartingFlag1).place_locked_item(item)
item = self.create_item("Chuckle Bean")
self.get_location(LocationName.PantsShopStartingFlag2).place_locked_item(item)
item = MLSSItem("Victory", ItemClassification.progression, None, self.player)
self.get_location("Cackletta's Soul").place_locked_item(item)
def fill_slot_data(self) -> Dict[str, Any]:
return {
"CastleSkip": self.options.castle_skip.value,
"SkipMinecart": self.options.skip_minecart.value,
"DisableSurf": self.options.disable_surf.value,
"HarhallsPants": self.options.harhalls_pants.value,
"HarhallsPants": self.options.disable_harhalls_pants.value,
"ChuckleBeans": self.options.chuckle_beans.value,
"DifficultLogic": self.options.difficult_logic.value,
"Coins": self.options.coins.value,
@ -111,7 +113,7 @@ class MLSSWorld(World):
freq = item_frequencies.get(item.itemName, 1)
if item in precollected:
freq = max(freq - precollected.count(item), 0)
if self.options.harhalls_pants and "Harhall's" in item.itemName:
if self.options.disable_harhalls_pants and "Harhall's" in item.itemName:
continue
required_items += [item.itemName for _ in range(freq)]
@ -135,21 +137,7 @@ class MLSSWorld(World):
filler_items += [item.itemName for _ in range(freq)]
# And finally take as many fillers as we need to have the same amount of items and locations.
remaining = len(all_locations) - len(required_items) - 5
if self.options.castle_skip:
remaining -= len(bowsers) + len(bowsersMini) - (5 if self.options.chuckle_beans == 0 else 0)
if self.options.skip_minecart and self.options.chuckle_beans == 2:
remaining -= 1
if self.options.disable_surf:
remaining -= 1
if self.options.harhalls_pants:
remaining -= 1
if self.options.chuckle_beans == 0:
remaining -= 192
if self.options.chuckle_beans == 1:
remaining -= 59
if not self.options.coins:
remaining -= len(coins)
remaining = len(all_locations) - len(required_items) - len(self.disabled_locations) - 5
self.multiworld.itempool += [
self.create_item(filler_item_name) for filler_item_name in self.random.sample(filler_items, remaining)
@ -157,21 +145,14 @@ class MLSSWorld(World):
def set_rules(self) -> None:
set_rules(self, self.disabled_locations)
if self.options.castle_skip:
self.multiworld.completion_condition[self.player] = lambda state: state.can_reach(
"PostJokes", "Region", self.player
)
else:
self.multiworld.completion_condition[self.player] = lambda state: state.can_reach(
"Bowser's Castle Mini", "Region", self.player
)
self.multiworld.completion_condition[self.player] = lambda state: state.has("Victory", self.player)
def create_item(self, name: str) -> MLSSItem:
item = item_table[name]
return MLSSItem(item.itemName, item.classification, item.code, self.player)
def get_filler_item_name(self) -> str:
return self.random.choice(list(filter(lambda item: item.classification == ItemClassification.filler, itemList)))
return self.random.choice(list(filter(lambda item: item.classification == ItemClassification.filler, itemList))).itemName
def generate_output(self, output_directory: str) -> None:
patch = MLSSProcedurePatch(player=self.player, player_name=self.multiworld.player_name[self.player])

Binary file not shown.