From 029f2ebc1997ebc22c667f8971ee47c6f8136575 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 2 Jul 2022 09:16:16 -0500 Subject: [PATCH 01/71] galaxy basic files and GE locations --- worlds/galaxy/items.py | 0 worlds/galaxy/locations.py | 13 +++++++++++++ worlds/galaxy/regions.py | 0 3 files changed, 13 insertions(+) create mode 100644 worlds/galaxy/items.py create mode 100644 worlds/galaxy/locations.py create mode 100644 worlds/galaxy/regions.py diff --git a/worlds/galaxy/items.py b/worlds/galaxy/items.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py new file mode 100644 index 00000000000..165d612d0b9 --- /dev/null +++ b/worlds/galaxy/locations.py @@ -0,0 +1,13 @@ +from BaseClasses import Location + +class SMGLocation(Location): + game: str = "Super Mario Galaxy" + +locGE_table = { +"GE: Dino Piranha": 170000000, +"GE: A Snack of Cosmic Proportions": 170000001, +"GE: King Kaliente's Battle Fleet": 170000002, +"GE: Dino Piranha Speed Run": 170000003, +"GE: Purple Coin Omelet": 170000004, +"GE: Luigi on the Roof": 170000005, +} diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py new file mode 100644 index 00000000000..e69de29bb2d From f5d9de1948071a62446b5b95fbee95f448890c04 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 2 Jul 2022 09:34:13 -0500 Subject: [PATCH 02/71] add honeyhive and some items --- worlds/galaxy/items.py | 11 +++++++++++ worlds/galaxy/locations.py | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/worlds/galaxy/items.py b/worlds/galaxy/items.py index e69de29bb2d..91b85283b5e 100644 --- a/worlds/galaxy/items.py +++ b/worlds/galaxy/items.py @@ -0,0 +1,11 @@ +from BaseClasses import Item + + +class SMGItem(Item): + game: str = "Super Mario Galaxy" + + +genric_item_table = { +"Power Star": 8010, +"Grand Star Terrace": 8011, +} \ No newline at end of file diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 165d612d0b9..085744eb804 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -11,3 +11,11 @@ class SMGLocation(Location): "GE: Purple Coin Omelet": 170000004, "GE: Luigi on the Roof": 170000005, } +locHH_table = { + "HH: Bee Mario Takes Flight": 170000006, + "HH: Trouble on the Tower": 170000007, + "HH: Big Bad Bugabooom": 170000008, + "HH: Honeyhive Cosmic Mario Race": 170000009, + "HH: Honeyhive's Purple Coins": 170000010, + "HH: Luigi in the Honeyhive Kingdom": 170000011, +} From 1e0067e6ad234aecd924d8321334f3b172a27c44 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sun, 3 Jul 2022 16:48:38 -0500 Subject: [PATCH 03/71] finish terrace locations --- worlds/galaxy/locations.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 085744eb804..3ba183268e8 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -19,3 +19,10 @@ class SMGLocation(Location): "HH: Honeyhive's Purple Coins": 170000010, "HH: Luigi in the Honeyhive Kingdom": 170000011, } +locspecialstages_table ={ + "LDL: Surfing 101": 170000012, + "FS: Painting the Planet Yellow": 170000013, +} +locbosses_table = { + "BJ: Megaleg's Moon": 170000014, +} From 63b47f7909589696566674717ff1c76c5954d8e4 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Tue, 5 Jul 2022 10:32:06 -0500 Subject: [PATCH 04/71] fountain locations changes --- worlds/galaxy/items.py | 4 ++-- worlds/galaxy/locations.py | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/worlds/galaxy/items.py b/worlds/galaxy/items.py index 91b85283b5e..222fce093f7 100644 --- a/worlds/galaxy/items.py +++ b/worlds/galaxy/items.py @@ -6,6 +6,6 @@ class SMGItem(Item): genric_item_table = { -"Power Star": 8010, -"Grand Star Terrace": 8011, + "Power Star": 8010, + "Grand Star Terrace": 8011, } \ No newline at end of file diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 3ba183268e8..6550b39caa2 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -26,3 +26,20 @@ class SMGLocation(Location): locbosses_table = { "BJ: Megaleg's Moon": 170000014, } +locSJ_table = { + "SJ: Pull Star Path": 170000015, + "SJ: Kamella's Airship Attack": 170000016, + "SJ: Tarantox's Tangled Web": 170000017, + "SJ: Pull Star Path Speed Run": 170000018, + "SJ: Purple Coin Spacewalk": 170000019, + "SJ: Yoshi's Unexpected Apparence": 170000020, +} +locBR_table = { + "BR: Battlerock Barrage": 170000021, + "BR: Breaking into the Battlerock": 170000022, + "BR: Topmaniac's Garbage dump": 170000023, + "BR: Topmanic's Dardevil Run": 170000024, + "BR: Topmanic's Dardevil Run": 170000025, + "BR: Purple Coins on the Battlerock" 170000026, + "BR: Luigi under the Saucer" 170000027, + } \ No newline at end of file From 6de6fc21eebe2921ba252b917d04feb3d29d69d0 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Tue, 5 Jul 2022 10:36:32 -0500 Subject: [PATCH 05/71] add int.py --- worlds/galaxy/__int__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 worlds/galaxy/__int__.py diff --git a/worlds/galaxy/__int__.py b/worlds/galaxy/__int__.py new file mode 100644 index 00000000000..e02f24ece4c --- /dev/null +++ b/worlds/galaxy/__int__.py @@ -0,0 +1,11 @@ +import os +import json +from base64 import b64encode, b64decode +from math import ceil +from .Items import genric_item_table +from .Locations import locHH_table, locspecialstages_table, locGE_table, locbosses_table, locSJ_table, locBR_table +from .Regions import +from .Rules import +from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification +from .Options import +from ..AutoWorld import World, WebWorld From 143741acecb413855539298d6cd7dde361e53faa Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 6 Jul 2022 09:29:08 -0500 Subject: [PATCH 06/71] finish foutain locations --- worlds/galaxy/locations.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 6550b39caa2..4be47ccbf3e 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -4,12 +4,12 @@ class SMGLocation(Location): game: str = "Super Mario Galaxy" locGE_table = { -"GE: Dino Piranha": 170000000, -"GE: A Snack of Cosmic Proportions": 170000001, -"GE: King Kaliente's Battle Fleet": 170000002, -"GE: Dino Piranha Speed Run": 170000003, -"GE: Purple Coin Omelet": 170000004, -"GE: Luigi on the Roof": 170000005, + "GE: Dino Piranha": 170000000, + "GE: A Snack of Cosmic Proportions": 170000001, + "GE: King Kaliente's Battle Fleet": 170000002, + "GE: Dino Piranha Speed Run": 170000003, + "GE: Purple Coin Omelet": 170000004, + "GE: Luigi on the Roof": 170000005, } locHH_table = { "HH: Bee Mario Takes Flight": 170000006, @@ -22,9 +22,12 @@ class SMGLocation(Location): locspecialstages_table ={ "LDL: Surfing 101": 170000012, "FS: Painting the Planet Yellow": 170000013, + "RG: Rolling in the Clouds": 170000028, + "HS: Shrinking Satellite": 170000029, } locbosses_table = { "BJ: Megaleg's Moon": 170000014, + "B: The Firery Stronghold": 170000030, } locSJ_table = { "SJ: Pull Star Path": 170000015, @@ -42,4 +45,4 @@ class SMGLocation(Location): "BR: Topmanic's Dardevil Run": 170000025, "BR: Purple Coins on the Battlerock" 170000026, "BR: Luigi under the Saucer" 170000027, - } \ No newline at end of file + } From 05240e6e95dfb2c802d294d2cf72f03d865344d0 Mon Sep 17 00:00:00 2001 From: Bokyubi <88254251+Bokyubi@users.noreply.github.com> Date: Wed, 6 Jul 2022 08:57:23 -0700 Subject: [PATCH 07/71] Update locations.py --- worlds/galaxy/locations.py | 86 +++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 4be47ccbf3e..3700191618b 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -24,10 +24,23 @@ class SMGLocation(Location): "FS: Painting the Planet Yellow": 170000013, "RG: Rolling in the Clouds": 170000028, "HS: Shrinking Satellite": 170000029, + "BB: Through the Poison Swamp": 170000043, + "BB: The Floating Fortress": 170000044, + "BB: The Secret of Buoy Base": 170000045, + "GG: Grand Star Rescue": 170000047, + "GG: Gateway's Purple coins": 170000048, + "BF: Kingfin's Fearsome Waters": 170000067, + "MS: Watch Your Step": 170000095, + "RG: Gizmos, Gears, and Gadgets": 170000096, + "LD: The Galaxy's Greatest Wave": 170000097, + "BB: The Electric Labyrinth": 170000098, } locbosses_table = { "BJ: Megaleg's Moon": 170000014, "B: The Firery Stronghold": 170000030, + "BJ: Sinking the Airships": 170000045, + "BJ: King Kaliente's Spicy Return": 170000067 + "B: The Fate of the Universe": 170000086, } locSJ_table = { "SJ: Pull Star Path": 170000015, @@ -45,4 +58,75 @@ class SMGLocation(Location): "BR: Topmanic's Dardevil Run": 170000025, "BR: Purple Coins on the Battlerock" 170000026, "BR: Luigi under the Saucer" 170000027, - } +} +locBB_table = { + "BB: Sunken Treasure": 170000031, + "BB: Passing the Swim Test": 170000032, + "BB: The Secret Undersea Cavern": 170000033 + "BB: Fast Foes on the Cyclone Stone": 170000034, + "BB: Beachcombing for Purple Coins": 170000035, + "BB: Wall Jumping Water Falls": 170000036, +} +locGG_table = { + "GG: Luigi and the Haunted Mansion": 170000037, + "GG: A Very Spooky Spirit": 170000038, + "GG: Beware of Bouldergeist": 170000039, + "GG: Bouldergeist's Daredevil Run": 170000040, + "GG: Purple Coins in the Bone Pen": 170000041, + "GG: Matter Splatter Mansion": 170000042, +} +locGL_table = { + "GL: Star Bunnies on the Hunt": 170000049, + "GL: Cataquack to the skies": 170000050, + "GL: When it Rains, it Pours": 170000051, + "GL: Cosmic Mario Forest Race": 170000052, + "GL: Purple Coins in the Woods": 170000053, + "GL: The Bell on the Big Trees": 170000054, +locSS_table = { + "SS: Going After Guppy": 170000055, + "SS: Faster Than a Speedrunning Penguin": 170000056, + "SS: The Silver Stars of Sea Slide": 170000057, + "SS: Underwater Cosmic Mario Race": 170000058, + "SS: Purple Coins by the Seaside": 170000059, + "SS: Hurry, He's Hungry": 170000060, +locTT_table = { + "TT: Heavy Metal Mecha Boswer": 170000061, + "TT: Mario (or Luigi) Meets Mario": 170000062, + "TT: Bouncing Down Cake Lane": 170000063, + "TT: The Flipswitch Chain": 170000064, + "TT: Luigi's Purple Coins": 170000065, + "TT: Fast Foes of Toy Time" 170000066, +locDD_table = { + "DD: The Underground Ghost Ship": 170000069, + "DD: Bubble Blastoff": 170000070, + "DD: Guppy and the Underground Lake": 170000071, + "DD: Ghost Ship Daredevil Run": 170000072, + "DD: Plunder the Purple Coins": 170000073, + "DD: Boo in Box": 170000074, +} +locDN_table = { + "DN: Inflitrating the Dreadnought": 170000075, + "DN: Dreanought's Colossal Cannons": 170000076, + "DN: Revenge of the Topman Tribe": 170000077, + "DN: Topman Tribe Speed Run": 170000078, + "DN: Battlestation's Purple Coins": 170000079, + "DN: Dreadnought's Garbage Dump": 170000080, +} +locMM_table: { + "MM: The Sinking Lava Spire": 170000081, + "MM: Through the Meteor Storm": 170000082, + "MM: Fiery Dino Piranha": 170000083, + "MM: Lava Spire Daredevil Run": 170000084, + "MM: Red-Hot Purple Coins": 170000085, + "MM Burning Tide": 170000086, +} +locHL_table: { + "SS: Rocky Road": 170000088, + "SP: A Very Sticky Situation": 170000089, + "DD: Giant Eel Breakout": 170000090, + "BM: Bigmouth's Gold Bait": 170000091, + "SS: Choosing a Favorite Snack": 170000092, + "BB: Racing the Spooky Speedster": 170000093, + "SC: Star Bunnies in the Snow": 170000094, +} +loc From 1350b5791ac0338beb817406715a4ec0aee94c3e Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 6 Jul 2022 12:25:13 -0500 Subject: [PATCH 08/71] add missing locations --- worlds/galaxy/locations.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 3700191618b..aa56b8171a3 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -41,6 +41,7 @@ class SMGLocation(Location): "BJ: Sinking the Airships": 170000045, "BJ: King Kaliente's Spicy Return": 170000067 "B: The Fate of the Universe": 170000086, + } locSJ_table = { "SJ: Pull Star Path": 170000015, @@ -75,6 +76,23 @@ class SMGLocation(Location): "GG: Purple Coins in the Bone Pen": 170000041, "GG: Matter Splatter Mansion": 170000042, } +locFF_table = { + "FF: The Frozen Peak of Baron Brr": 170000095, + "FF: Freezeflame's Blistering Coore": 170000096, + "FF: Hot and Cold Collide": 170000097, + "FF: Frosty Cosmic Mario race" 170000098, + "FF: Purple Coins on the Summit" 170000099, + "FF: Conquring the Summit" 170000100, +} +locDDune = { + "DDune: Soaring on the Desert Winds": 170000101, + "DDune: Blasting through the Sand": 170000102, + "DDune: Sunbaked Sand Castle": 170000103, + "DDune: Sandblast Speed Run": 170000104, + "DDune: Purple Coin in the Desert": 170000105, + "DDune: Bullet Bill on Your Back": 170000106, + "DDune: Treasure of the Pyramid": 170000107, +} locGL_table = { "GL: Star Bunnies on the Hunt": 170000049, "GL: Cataquack to the skies": 170000050, @@ -82,6 +100,7 @@ class SMGLocation(Location): "GL: Cosmic Mario Forest Race": 170000052, "GL: Purple Coins in the Woods": 170000053, "GL: The Bell on the Big Trees": 170000054, + } locSS_table = { "SS: Going After Guppy": 170000055, "SS: Faster Than a Speedrunning Penguin": 170000056, @@ -89,6 +108,7 @@ class SMGLocation(Location): "SS: Underwater Cosmic Mario Race": 170000058, "SS: Purple Coins by the Seaside": 170000059, "SS: Hurry, He's Hungry": 170000060, +} locTT_table = { "TT: Heavy Metal Mecha Boswer": 170000061, "TT: Mario (or Luigi) Meets Mario": 170000062, @@ -129,4 +149,3 @@ class SMGLocation(Location): "BB: Racing the Spooky Speedster": 170000093, "SC: Star Bunnies in the Snow": 170000094, } -loc From 31d716c3ff1f2bac6f40ce1447bb445008952136 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 6 Jul 2022 13:00:38 -0500 Subject: [PATCH 09/71] finish items.py --- worlds/galaxy/items.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worlds/galaxy/items.py b/worlds/galaxy/items.py index 222fce093f7..d6870131dbc 100644 --- a/worlds/galaxy/items.py +++ b/worlds/galaxy/items.py @@ -8,4 +8,8 @@ class SMGItem(Item): genric_item_table = { "Power Star": 8010, "Grand Star Terrace": 8011, + "Grand Star Fountain": 8012, + "Grand Star Kitchen": 8013, + "Grand Star Bedroom": 8014, + "Grand Star Engine Room": 8015, } \ No newline at end of file From 815eca53453dbedb0667c63d432fe1c5f954aae0 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 6 Jul 2022 13:04:33 -0500 Subject: [PATCH 10/71] add to int.py and some fixes --- worlds/galaxy/__int__.py | 2 +- worlds/galaxy/locations.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/worlds/galaxy/__int__.py b/worlds/galaxy/__int__.py index e02f24ece4c..91ca039d66b 100644 --- a/worlds/galaxy/__int__.py +++ b/worlds/galaxy/__int__.py @@ -3,7 +3,7 @@ from base64 import b64encode, b64decode from math import ceil from .Items import genric_item_table -from .Locations import locHH_table, locspecialstages_table, locGE_table, locbosses_table, locSJ_table, locBR_table +from .Locations import locHH_table, locspecialstages_table, locGE_table, locbosses_table, locSJ_table, locBR_table, locBB_table, locGG_table, locFF_table, locDD_table, locDDune, locGL_table, locSS_table, locTT_table, locDN_table, locMM_table, locHL_table from .Regions import from .Rules import from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index aa56b8171a3..81db6928408 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -116,6 +116,7 @@ class SMGLocation(Location): "TT: The Flipswitch Chain": 170000064, "TT: Luigi's Purple Coins": 170000065, "TT: Fast Foes of Toy Time" 170000066, +} locDD_table = { "DD: The Underground Ghost Ship": 170000069, "DD: Bubble Blastoff": 170000070, From bd7e89f6ae8f253482167cf0a255da90c2077be0 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:02:15 -0500 Subject: [PATCH 11/71] add/start rules.py and regions.py --- worlds/galaxy/__int__.py | 4 ++-- worlds/galaxy/locations.py | 6 +++--- worlds/galaxy/regions.py | 25 +++++++++++++++++++++++++ worlds/galaxy/rules.py | 2 ++ 4 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 worlds/galaxy/rules.py diff --git a/worlds/galaxy/__int__.py b/worlds/galaxy/__int__.py index 91ca039d66b..d93c737bf80 100644 --- a/worlds/galaxy/__int__.py +++ b/worlds/galaxy/__int__.py @@ -2,8 +2,8 @@ import json from base64 import b64encode, b64decode from math import ceil -from .Items import genric_item_table -from .Locations import locHH_table, locspecialstages_table, locGE_table, locbosses_table, locSJ_table, locBR_table, locBB_table, locGG_table, locFF_table, locDD_table, locDDune, locGL_table, locSS_table, locTT_table, locDN_table, locMM_table, locHL_table +locHH_table, locspecialstages_table, locGE_table, locbosses_table, locSJ_table, locBR_table, locBB_table, locGG_table, locFF_table, locDD_table, locDDune, locGL_table, locSS_table, locTT_table, locDN_table, locMM_table, locHL_tablefrom .Items import genric_item_table +from .Locations import from .Regions import from .Rules import from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 81db6928408..73997a87774 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -31,9 +31,9 @@ class SMGLocation(Location): "GG: Gateway's Purple coins": 170000048, "BF: Kingfin's Fearsome Waters": 170000067, "MS: Watch Your Step": 170000095, - "RG: Gizmos, Gears, and Gadgets": 170000096, - "LD: The Galaxy's Greatest Wave": 170000097, - "BB: The Electric Labyrinth": 170000098, + "RGT: Gizmos, Gears, and Gadgets": 170000096, + "LDT: The Galaxy's Greatest Wave": 170000097, + "BBT: The Electric Labyrinth": 170000098, } locbosses_table = { "BJ: Megaleg's Moon": 170000014, diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py index e69de29bb2d..0f9ffbf78a3 100644 --- a/worlds/galaxy/regions.py +++ b/worlds/galaxy/regions.py @@ -0,0 +1,25 @@ +import typing +from BaseClasses import MultiWorld, Region, Entrance, Location, RegionType +from .Locations import SMGLocation, location_table, locHH_table, locGE_table, \ +locSJ_table, locBR_table, locBB_table, \ +locGG_table, locFF_table, locDD_table, locDDune, \ +locspecialstages_table, locbosses_table, \ +locGL_table, locSS_table, locTT_table, \ +locDN_table, locMM_table, locHL_table, \ +smgcourses = ["Good Egg", "Honeyhive", "Loopdeeloop", "Flipswitch", "Bowser Jr. Robot Reactor", + "Space Junk", "Battlerock", "Rolling Green", "Hurry-Scurry", "Bowser's Star Reactor", + "Beach Bowl", "Ghostly", "Bubble Breeze", "Buoy Base", "Bowser Jr.'s Ariship Armada" + "Gusty gardens", "Freezeflame", "Dusty Dune", "Honeyclimb", "Bowser's Dark Matter Planet", + "Gold Leaf", "Sea Slide", "Toy Time", "Bonefin", "Bowser Jr.'s Lava Reactor", + "Gateway", "Deep Dark", "Dreadnaught", "Melty Molton", "Matter Splatter"] +def create_regions(world MultiWorld, player int): + regSS = Region("Menu", RegionType.Generic, "Comment Obserbatory", player, world) + locspecialstages_names = [name for name, id in locSS_table.items()] + locspecialstages_names += [name for name, id in locKey_table.items()] + locspecialstages_names += [name for name, id in locCap_table.items()] + regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] + world.regions.append(regSS) + regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) + locGE_names = [name for name, id in locBoB_table.items()] + regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] + world.regions.append(regGE) \ No newline at end of file diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py new file mode 100644 index 00000000000..07edd1478da --- /dev/null +++ b/worlds/galaxy/rules.py @@ -0,0 +1,2 @@ +from ..generic.Rules import add_rule +from .Regions import connect_regions, smgcourses \ No newline at end of file From 450aa1a3885df6da1d687b1b716dfdf945bc3a2a Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:07:47 -0500 Subject: [PATCH 12/71] fixes check failing (hopefully) --- worlds/galaxy/locations.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 73997a87774..f6fc30fb9f9 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -40,8 +40,7 @@ class SMGLocation(Location): "B: The Firery Stronghold": 170000030, "BJ: Sinking the Airships": 170000045, "BJ: King Kaliente's Spicy Return": 170000067 - "B: The Fate of the Universe": 170000086, - + "B: The Fate of the Universe": 170000095, } locSJ_table = { "SJ: Pull Star Path": 170000015, From 63b8b51ebb364dd460f609a23d510756817c926d Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:21:45 -0500 Subject: [PATCH 13/71] update int.py and actually fix failed check --- worlds/galaxy/__int__.py | 8 +++----- worlds/galaxy/locations.py | 12 ++++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/worlds/galaxy/__int__.py b/worlds/galaxy/__int__.py index d93c737bf80..34019dd17a9 100644 --- a/worlds/galaxy/__int__.py +++ b/worlds/galaxy/__int__.py @@ -1,11 +1,9 @@ import os import json -from base64 import b64encode, b64decode -from math import ceil -locHH_table, locspecialstages_table, locGE_table, locbosses_table, locSJ_table, locBR_table, locBB_table, locGG_table, locFF_table, locDD_table, locDDune, locGL_table, locSS_table, locTT_table, locDN_table, locMM_table, locHL_tablefrom .Items import genric_item_table -from .Locations import -from .Regions import +from .Locations import SMGLocation +from .Regions import create_regions, smgcourses from .Rules import +from .items import genric_item_table from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification from .Options import from ..AutoWorld import World, WebWorld diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index f6fc30fb9f9..7b057aa8475 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -132,7 +132,7 @@ class SMGLocation(Location): "DN: Battlestation's Purple Coins": 170000079, "DN: Dreadnought's Garbage Dump": 170000080, } -locMM_table: { +locMM_table = { "MM: The Sinking Lava Spire": 170000081, "MM: Through the Meteor Storm": 170000082, "MM: Fiery Dino Piranha": 170000083, @@ -140,7 +140,7 @@ class SMGLocation(Location): "MM: Red-Hot Purple Coins": 170000085, "MM Burning Tide": 170000086, } -locHL_table: { +locHL_table = { "SS: Rocky Road": 170000088, "SP: A Very Sticky Situation": 170000089, "DD: Giant Eel Breakout": 170000090, @@ -149,3 +149,11 @@ class SMGLocation(Location): "BB: Racing the Spooky Speedster": 170000093, "SC: Star Bunnies in the Snow": 170000094, } + +location_table{**locGE_table,**locHH_table, \ + **locSJ_table,**locBR_table,**locBB_table, \ + **locGG_table,**locFF_table,**locDDune_table, \ + **locGL_table,**locSS_table,**locTT_table, \ + **locDD_table,**locDN_table,**locMM_table, \ + **locHL_table,**locspecialstages_table,**locbosses_table, \ +} \ No newline at end of file From a653205e616615cf6d6fd37eaab424101327fde8 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Thu, 7 Jul 2022 13:37:37 -0500 Subject: [PATCH 14/71] making new regions rest of the terrace all of the fountain. --- worlds/galaxy/regions.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py index 0f9ffbf78a3..9cfc3cdb409 100644 --- a/worlds/galaxy/regions.py +++ b/worlds/galaxy/regions.py @@ -1,6 +1,6 @@ import typing -from BaseClasses import MultiWorld, Region, Entrance, Location, RegionType -from .Locations import SMGLocation, location_table, locHH_table, locGE_table, \ +from BaseClasses import MultiWorld, Region, Location +from .locations import SMGLocation, location_table, locHH_table, locGE_table, \ locSJ_table, locBR_table, locBB_table, \ locGG_table, locFF_table, locDD_table, locDDune, \ locspecialstages_table, locbosses_table, \ @@ -19,7 +19,24 @@ def create_regions(world MultiWorld, player int): locspecialstages_names += [name for name, id in locCap_table.items()] regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] world.regions.append(regSS) + + # defines the good egg galaxy region regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) locGE_names = [name for name, id in locBoB_table.items()] regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] - world.regions.append(regGE) \ No newline at end of file + world.regions.append(regGE) + # defines the honeyhive galaxey region + reg = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, world) + locHH_names = [name for name, id in locHH_table.items()] + regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] + # defines the Space Junk galaxy region + reg = Region("Space Junk", RegionType.Generic, "Space Junk", player, world) + locSJ_names = [name for name, id in locSJ_table.items()] + regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name,] regSJ) for loc_name in locSJ_names] + # defines the Battlerock galaxy + reg = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) + locBR_names = [name for name, id in locBR_table.items()] + regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name,] regBR) for loc_name in locSJ_names] + + + From 777ae757e396e483acecc26ac8fceea47a01cc82 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sun, 10 Jul 2022 10:42:03 -0500 Subject: [PATCH 15/71] Fininish regions.py and add the last locations --- worlds/galaxy/locations.py | 20 +++++++++++++------ worlds/galaxy/regions.py | 40 +++++++++++++++++++++++++++++++++++--- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 7b057aa8475..9f6196694dc 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -67,13 +67,21 @@ class SMGLocation(Location): "BB: Beachcombing for Purple Coins": 170000035, "BB: Wall Jumping Water Falls": 170000036, } +locG_table = { + "G: Luigi and the Haunted Mansion": 170000037, + "G: A Very Spooky Spirit": 170000038, + "G: Beware of Bouldergeist": 170000039, + "G: Bouldergeist's Daredevil Run": 170000040, + "G: Purple Coins in the Bone Pen": 170000041, + "G: Matter Splatter Mansion": 170000042, +} locGG_table = { - "GG: Luigi and the Haunted Mansion": 170000037, - "GG: A Very Spooky Spirit": 170000038, - "GG: Beware of Bouldergeist": 170000039, - "GG: Bouldergeist's Daredevil Run": 170000040, - "GG: Purple Coins in the Bone Pen": 170000041, - "GG: Matter Splatter Mansion": 170000042, + "GG: Bunnies in the Wind": 170000108, + "GG: The Dirty Tricks of Major Burrows", 170000109, + "GG: Gusty Garden's Gravity Scramble": 170000110, + "GG: Major Burrow's Daredevil Run": 170000111, + "GG: Purple Coins on the Puzzle Cube" 170000112, + "GG: The Golden Chomp": 170000113, } locFF_table = { "FF: The Frozen Peak of Baron Brr": 170000095, diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py index 9cfc3cdb409..692104aee28 100644 --- a/worlds/galaxy/regions.py +++ b/worlds/galaxy/regions.py @@ -36,7 +36,41 @@ def create_regions(world MultiWorld, player int): # defines the Battlerock galaxy reg = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) locBR_names = [name for name, id in locBR_table.items()] - regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name,] regBR) for loc_name in locSJ_names] - - + regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name,] regBR) for loc_name in locBR_names] + # defines the Beach Bowl galaxy + reg = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) + locBB_names = [name for name, id in locBB_table.items()] + regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name,] regBB) for loc_name in locBB_names] + # defines the Gusty Gardens galaxy + reg = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) + locGG_names = [name for name, id in locGG_table.items()] + regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name, ] regGG) for loc_name in locGG_names] + # define Ghostly galaxy + reg = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) + locGG_names = [name for name, id in locGG_table.items()] + regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name, ] regGG) for loc_name in locGG_names] + # defines Freezeflame galaxy + reg = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) + locFF_names = [name for name, id in locFF_table.items()] + regFF_names += [SMGLocation(player, loc_name, location_table[loc_name, ] regFF) for loc_name in locFF_names] + # defines golden leaf galaxy + reg = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) + locGL_names = [name for name, id in locGL_table.items()] + regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name, ] regGL) for loc_name in locGL_names] + # defines toy time galaxy + reg = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) + locTT_names = [name for name, id in locTT_table.items()] + regTT_names += [SMGLocation(player, loc_name, location_table[loc_name, ] regTT) for loc_name in locTT_names] + # defines deep dark galaxy + reg = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, world) + locDD_names = [name for name, id in locDD_table.items()] + regDD_names += [SMGLocation(player, loc_name, location_table[loc_name, ] regDD) for loc_name in locDD_names] + # defines Dreadnought galaxy + reg = Region("Dreadnought", RegionType.Generic, "Dreadnought", player, world) + locDN_names = [name for name, id in locDN_table.items()] + regDN_names += [SMGLocation (player, loc_name, location_table[loc_name, ] regDN) for loc_name in locDN_names] + # defines Melty Molten galaxy + reg = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) + locMM_names = [name for name, id in locMM_table.items()] + regMM_names += [SMGLocation (player, loc_name, location_table[loc_name, ] regMM) for loc_name in locMM_names] From 26592c9c07dbb86d93140d346e0437dd904a1841 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sun, 10 Jul 2022 13:02:47 -0500 Subject: [PATCH 16/71] add logic for main stages --- worlds/galaxy/regions.py | 16 ++++++++++++---- worlds/galaxy/rules.py | 21 ++++++++++++++++++++- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py index 692104aee28..d028c1004f9 100644 --- a/worlds/galaxy/regions.py +++ b/worlds/galaxy/regions.py @@ -41,14 +41,14 @@ def create_regions(world MultiWorld, player int): reg = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) locBB_names = [name for name, id in locBB_table.items()] regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name,] regBB) for loc_name in locBB_names] - # defines the Gusty Gardens galaxy - reg = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) - locGG_names = [name for name, id in locGG_table.items()] - regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name, ] regGG) for loc_name in locGG_names] # define Ghostly galaxy reg = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) locGG_names = [name for name, id in locGG_table.items()] regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name, ] regGG) for loc_name in locGG_names] + # defines the Gusty Gardens galaxy + reg = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) + locGG_names = [name for name, id in locGG_table.items()] + regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name, ] regGG) for loc_name in locGG_names] # defines Freezeflame galaxy reg = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) locFF_names = [name for name, id in locFF_table.items()] @@ -73,4 +73,12 @@ def create_regions(world MultiWorld, player int): reg = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) locMM_names = [name for name, id in locMM_table.items()] regMM_names += [SMGLocation (player, loc_name, location_table[loc_name, ] regMM) for loc_name in locMM_names] +def connect_regions(world: MultiWorld, player: int, source: str, target: str, rule): + sourceRegion = world.get_region(source, player) + targetRegion = world.get_region(target, player) + + connection = Entrance(player,'', sourceRegion) + connection.access_rule = rule + sourceRegion.exits.append(connection) + connection.connect(targetRegion) diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index 07edd1478da..0835f5b8c5e 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -1,2 +1,21 @@ from ..generic.Rules import add_rule -from .Regions import connect_regions, smgcourses \ No newline at end of file +from .Regions import connect_regions, smgcourses, + + connect_regions(world, player, "Menu", "Good Egg", lambda state: True) + connect_regions(world, player, "Menu", "Honeyhive", lambda state: state.has("Power Star", player, 3)) + connect_regions(world, player, "Menu", "Fountain", lambda state: state.has("Grand Star Terrace", player)) + connect_regions(world, player, "Fountain", "Space Junk", lambda state: state.has("Power Star", player, 9)) + connect_regions(world, player, "Fountain", "Space Junk", lambda state: state.has("Power Star", player, 12)) + connect_regions(world, player, "Menu", "Kitchen", lambda state: state.has("Grand Star Fountain", player)) + connect_regions(world, player, "Kitchen", "Beach Bowl", lambda state: state.has("Power Star", player, 18)) + connect_regions(world, player, "Kitchen", "Ghostly" lambda state: state.has("Power Star", player, 20)) + connect_regions(world, player, "Menu", "Bedroom", lambda state: state.has("Grand Star Kitchen", player)) + connect_regions(world, player, "Bedroom" "Gusty Gardens", lambda state: state.has("Power Star", player, 24)) + connect_regions(world, player, "Bedroom" "Freezeflame", lambda state: state.has("Power Star", player, 26)) + connect_regions(world, player, "Menu", "Engine Room", lambda state: state.has("Grand Star Bedroom", player)) + connect_regions(world, player, "Engine Room", "Gold Leaf" lambda state: state.has("Power Star", player 34)) + connect_regions(world, player, "Engine Room", "Toy Time" lambda state: state.has("Power Star", player 40)) + connect_regions(world, player, "Menu", "Garden" lambda state: state.has("Grand Star Engine Room", player)) + connect_regions(world, player, "Garden" "Deep Dark" lambda state: state.has("Power Star", player 46)) + connect_regions(world, player, "Garden" "Dreadnaught" lambda state: state.has("Power Star", player 48)) + connect_regions(world, player, "Garden" "Melty Molten" lambda state: state.has("Power Star", player 52)) \ No newline at end of file From a1689f878ea31b356893595ed286863df5ac4657 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 11 Jul 2022 14:40:09 -0500 Subject: [PATCH 17/71] remove comets --- worlds/galaxy/locations.py | 34 +--------------------------------- worlds/galaxy/rules.py | 4 +++- 2 files changed, 4 insertions(+), 34 deletions(-) diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 9f6196694dc..ce21de06234 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -7,16 +7,12 @@ class SMGLocation(Location): "GE: Dino Piranha": 170000000, "GE: A Snack of Cosmic Proportions": 170000001, "GE: King Kaliente's Battle Fleet": 170000002, - "GE: Dino Piranha Speed Run": 170000003, - "GE: Purple Coin Omelet": 170000004, - "GE: Luigi on the Roof": 170000005, + "GE: Luigi on the Roof": 170000003, } locHH_table = { "HH: Bee Mario Takes Flight": 170000006, "HH: Trouble on the Tower": 170000007, "HH: Big Bad Bugabooom": 170000008, - "HH: Honeyhive Cosmic Mario Race": 170000009, - "HH: Honeyhive's Purple Coins": 170000010, "HH: Luigi in the Honeyhive Kingdom": 170000011, } locspecialstages_table ={ @@ -46,57 +42,42 @@ class SMGLocation(Location): "SJ: Pull Star Path": 170000015, "SJ: Kamella's Airship Attack": 170000016, "SJ: Tarantox's Tangled Web": 170000017, - "SJ: Pull Star Path Speed Run": 170000018, - "SJ: Purple Coin Spacewalk": 170000019, "SJ: Yoshi's Unexpected Apparence": 170000020, } locBR_table = { "BR: Battlerock Barrage": 170000021, "BR: Breaking into the Battlerock": 170000022, "BR: Topmaniac's Garbage dump": 170000023, - "BR: Topmanic's Dardevil Run": 170000024, - "BR: Topmanic's Dardevil Run": 170000025, - "BR: Purple Coins on the Battlerock" 170000026, "BR: Luigi under the Saucer" 170000027, } locBB_table = { "BB: Sunken Treasure": 170000031, "BB: Passing the Swim Test": 170000032, "BB: The Secret Undersea Cavern": 170000033 - "BB: Fast Foes on the Cyclone Stone": 170000034, - "BB: Beachcombing for Purple Coins": 170000035, "BB: Wall Jumping Water Falls": 170000036, } locG_table = { "G: Luigi and the Haunted Mansion": 170000037, "G: A Very Spooky Spirit": 170000038, "G: Beware of Bouldergeist": 170000039, - "G: Bouldergeist's Daredevil Run": 170000040, - "G: Purple Coins in the Bone Pen": 170000041, "G: Matter Splatter Mansion": 170000042, } locGG_table = { "GG: Bunnies in the Wind": 170000108, "GG: The Dirty Tricks of Major Burrows", 170000109, "GG: Gusty Garden's Gravity Scramble": 170000110, - "GG: Major Burrow's Daredevil Run": 170000111, - "GG: Purple Coins on the Puzzle Cube" 170000112, "GG: The Golden Chomp": 170000113, } locFF_table = { "FF: The Frozen Peak of Baron Brr": 170000095, "FF: Freezeflame's Blistering Coore": 170000096, "FF: Hot and Cold Collide": 170000097, - "FF: Frosty Cosmic Mario race" 170000098, - "FF: Purple Coins on the Summit" 170000099, "FF: Conquring the Summit" 170000100, } locDDune = { "DDune: Soaring on the Desert Winds": 170000101, "DDune: Blasting through the Sand": 170000102, "DDune: Sunbaked Sand Castle": 170000103, - "DDune: Sandblast Speed Run": 170000104, - "DDune: Purple Coin in the Desert": 170000105, "DDune: Bullet Bill on Your Back": 170000106, "DDune: Treasure of the Pyramid": 170000107, } @@ -104,16 +85,12 @@ class SMGLocation(Location): "GL: Star Bunnies on the Hunt": 170000049, "GL: Cataquack to the skies": 170000050, "GL: When it Rains, it Pours": 170000051, - "GL: Cosmic Mario Forest Race": 170000052, - "GL: Purple Coins in the Woods": 170000053, "GL: The Bell on the Big Trees": 170000054, } locSS_table = { "SS: Going After Guppy": 170000055, "SS: Faster Than a Speedrunning Penguin": 170000056, "SS: The Silver Stars of Sea Slide": 170000057, - "SS: Underwater Cosmic Mario Race": 170000058, - "SS: Purple Coins by the Seaside": 170000059, "SS: Hurry, He's Hungry": 170000060, } locTT_table = { @@ -121,31 +98,23 @@ class SMGLocation(Location): "TT: Mario (or Luigi) Meets Mario": 170000062, "TT: Bouncing Down Cake Lane": 170000063, "TT: The Flipswitch Chain": 170000064, - "TT: Luigi's Purple Coins": 170000065, - "TT: Fast Foes of Toy Time" 170000066, } locDD_table = { "DD: The Underground Ghost Ship": 170000069, "DD: Bubble Blastoff": 170000070, "DD: Guppy and the Underground Lake": 170000071, - "DD: Ghost Ship Daredevil Run": 170000072, - "DD: Plunder the Purple Coins": 170000073, "DD: Boo in Box": 170000074, } locDN_table = { "DN: Inflitrating the Dreadnought": 170000075, "DN: Dreanought's Colossal Cannons": 170000076, "DN: Revenge of the Topman Tribe": 170000077, - "DN: Topman Tribe Speed Run": 170000078, - "DN: Battlestation's Purple Coins": 170000079, "DN: Dreadnought's Garbage Dump": 170000080, } locMM_table = { "MM: The Sinking Lava Spire": 170000081, "MM: Through the Meteor Storm": 170000082, "MM: Fiery Dino Piranha": 170000083, - "MM: Lava Spire Daredevil Run": 170000084, - "MM: Red-Hot Purple Coins": 170000085, "MM Burning Tide": 170000086, } locHL_table = { @@ -157,7 +126,6 @@ class SMGLocation(Location): "BB: Racing the Spooky Speedster": 170000093, "SC: Star Bunnies in the Snow": 170000094, } - location_table{**locGE_table,**locHH_table, \ **locSJ_table,**locBR_table,**locBB_table, \ **locGG_table,**locFF_table,**locDDune_table, \ diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index 0835f5b8c5e..4923ec61ff4 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -18,4 +18,6 @@ connect_regions(world, player, "Menu", "Garden" lambda state: state.has("Grand Star Engine Room", player)) connect_regions(world, player, "Garden" "Deep Dark" lambda state: state.has("Power Star", player 46)) connect_regions(world, player, "Garden" "Dreadnaught" lambda state: state.has("Power Star", player 48)) - connect_regions(world, player, "Garden" "Melty Molten" lambda state: state.has("Power Star", player 52)) \ No newline at end of file + connect_regions(world, player, "Garden" "Melty Molten" lambda state: state.has("Power Star", player 52)) + set_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player 5)) + set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star")) \ No newline at end of file From 8df51bab809a8b8535563b516c542a2a641dd138 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 11 Jul 2022 15:51:27 -0500 Subject: [PATCH 18/71] finsh special stages logic --- worlds/galaxy/locations.py | 4 ++-- worlds/galaxy/rules.py | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index ce21de06234..e0a8a36a41c 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -20,7 +20,7 @@ class SMGLocation(Location): "FS: Painting the Planet Yellow": 170000013, "RG: Rolling in the Clouds": 170000028, "HS: Shrinking Satellite": 170000029, - "BB: Through the Poison Swamp": 170000043, + "BUB: Through the Poison Swamp": 170000043, "BB: The Floating Fortress": 170000044, "BB: The Secret of Buoy Base": 170000045, "GG: Grand Star Rescue": 170000047, @@ -120,7 +120,7 @@ class SMGLocation(Location): locHL_table = { "SS: Rocky Road": 170000088, "SP: A Very Sticky Situation": 170000089, - "DD: Giant Eel Breakout": 170000090, + "DDR: Giant Eel Breakout": 170000090, "BM: Bigmouth's Gold Bait": 170000091, "SS: Choosing a Favorite Snack": 170000092, "BB: Racing the Spooky Speedster": 170000093, diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index 4923ec61ff4..f25f107f316 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -20,4 +20,16 @@ connect_regions(world, player, "Garden" "Dreadnaught" lambda state: state.has("Power Star", player 48)) connect_regions(world, player, "Garden" "Melty Molten" lambda state: state.has("Power Star", player 52)) set_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player 5)) - set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star")) \ No newline at end of file + set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player 7)) + set_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player 11) and state.has("Grand Star Terrace")) + set_rule(world.get_location("HS: Shrinking Satellite", player) lambda state: state.has ("Power Star", player 18) and state.has("Grand Star Terrace")) + set_rule(world.get_location("BUB: Through the Poison Swamp", player) lambda state: state.has ("Power Star", player 19) and state.has("Grand Star Fountain")) + set_rule(world.get_location("BB: The Secret of Buoy Base", player) lambda state: state.has ("Power Star", player 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) + set_rule(world.get_location("BB: The Floating Fortress", player) lambda state: state.has ("Power Star", player 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) + set_rule(world.get_location("GG: Gateway's Purple coins", player) lambda state: state.has("Grand Star Engine Room")) + set_rule(world.get_location("BF: Kingfin's Fearsome Waters", player) lambda state: state.has("Power Star", player 55) and state.has("Grand Star Bedroom")) + set_rule(world.get_location("MS: Watch Your Step", player) lambda state: state.has("Power Star", player 50) and state.has("Grand Star Engine Room") and state.has("Grand Star Bedroom")) + set_rule(world.get_location("DDR: Giant Eel Breakout", player) lambda state: state.has("Grand Star Fountain", player)) + set_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player) lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player) lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) + set_rule(world.get_location("BBT: The Electric Labyrinth", player) lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) \ No newline at end of file From 5071f0fd8cb6cf382b91782246c2e681c5aa1c76 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 11 Jul 2022 17:00:05 -0500 Subject: [PATCH 19/71] adds hungry luma logic --- worlds/galaxy/rules.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index f25f107f316..8ed2e2d8cec 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -32,4 +32,10 @@ set_rule(world.get_location("DDR: Giant Eel Breakout", player) lambda state: state.has("Grand Star Fountain", player)) set_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player) lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) set_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player) lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) - set_rule(world.get_location("BBT: The Electric Labyrinth", player) lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) \ No newline at end of file + set_rule(world.get_location("BBT: The Electric Labyrinth", player) lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) + set_rule(world.get_location("SS: Rocky Road", player) lambda state: state.has("Power Star", player, 7)) + set_rule(world.get_location("SP: A Very Sticky Situation") lambda state: state.has("Grand Star Terrace", player) and state.has("Power Star", player, 9)) + set_rule(world.get_location("BM: Bigmouth's Gold Bait") lambda state: state.has("Grand Star Kitchen", player) and state.has("Power Star", player, 29)) + set_rule(world.get_location("SS: Choosing a Favorite Snack") lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain")) + set_rule(world.get_location("BB: Racing the Spooky Speedster") lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) + set_rule(world.get_location("SC: Star Bunnies in the Snow") lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) \ No newline at end of file From a2360f26146e417f24646038a4661152dc9b8e01 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 11 Jul 2022 21:15:36 -0500 Subject: [PATCH 20/71] 7-11 updates adds the comet stars back and puts in some logic for them --- worlds/galaxy/locations.py | 31 ++++++++++++++++++++++++++++++- worlds/galaxy/rules.py | 14 +++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index e0a8a36a41c..4816f5a0c85 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -8,12 +8,16 @@ class SMGLocation(Location): "GE: A Snack of Cosmic Proportions": 170000001, "GE: King Kaliente's Battle Fleet": 170000002, "GE: Luigi on the Roof": 170000003, + "GE: Dino Piranha Speed Run": 170000004, + "GE: Purple Coin Omelet": 170000005, } locHH_table = { "HH: Bee Mario Takes Flight": 170000006, "HH: Trouble on the Tower": 170000007, "HH: Big Bad Bugabooom": 170000008, "HH: Luigi in the Honeyhive Kingdom": 170000011, + "HH: Honeyhive Cosmic Mario Race": 170000009, + "HH: Honeyhive's Purple Coins": 170000010, } locspecialstages_table ={ "LDL: Surfing 101": 170000012, @@ -38,28 +42,37 @@ class SMGLocation(Location): "BJ: King Kaliente's Spicy Return": 170000067 "B: The Fate of the Universe": 170000095, } + locSJ_table = { "SJ: Pull Star Path": 170000015, "SJ: Kamella's Airship Attack": 170000016, "SJ: Tarantox's Tangled Web": 170000017, "SJ: Yoshi's Unexpected Apparence": 170000020, + "SJ: Pull Star Path Speed Run": 170000018, + "SJ: Purple Coin Spacewalk": 170000019, } locBR_table = { "BR: Battlerock Barrage": 170000021, "BR: Breaking into the Battlerock": 170000022, "BR: Topmaniac's Garbage dump": 170000023, + "BR: Topmanic's Dardevil Run": 170000025, + "BR: Purple Coins on the Battlerock" 170000026, "BR: Luigi under the Saucer" 170000027, } locBB_table = { "BB: Sunken Treasure": 170000031, "BB: Passing the Swim Test": 170000032, - "BB: The Secret Undersea Cavern": 170000033 + "BB: The Secret Undersea Cavern": 170000033, + "BB: Fast Foes on the Cyclone Stone": 170000034, + "BB: Beachcombing for Purple Coins": 170000035, "BB: Wall Jumping Water Falls": 170000036, } locG_table = { "G: Luigi and the Haunted Mansion": 170000037, "G: A Very Spooky Spirit": 170000038, "G: Beware of Bouldergeist": 170000039, + "G: Bouldergeist's Daredevil Run": 170000040, + "G: Purple Coins in the Bone Pen": 170000041, "G: Matter Splatter Mansion": 170000042, } locGG_table = { @@ -73,11 +86,15 @@ class SMGLocation(Location): "FF: Freezeflame's Blistering Coore": 170000096, "FF: Hot and Cold Collide": 170000097, "FF: Conquring the Summit" 170000100, + "FF: Frosty Cosmic Mario race" 170000098, + "FF: Purple Coins on the Summit" 170000099, } locDDune = { "DDune: Soaring on the Desert Winds": 170000101, "DDune: Blasting through the Sand": 170000102, "DDune: Sunbaked Sand Castle": 170000103, + "DDune: Purple Coin in the Desert": 170000105, + "DDune: Bullet Bill on Your Back": 170000106, "DDune: Bullet Bill on Your Back": 170000106, "DDune: Treasure of the Pyramid": 170000107, } @@ -85,12 +102,16 @@ class SMGLocation(Location): "GL: Star Bunnies on the Hunt": 170000049, "GL: Cataquack to the skies": 170000050, "GL: When it Rains, it Pours": 170000051, + "GL: Cosmic Mario Forest Race": 170000052, + "GL: Purple Coins in the Woods": 170000053, "GL: The Bell on the Big Trees": 170000054, } locSS_table = { "SS: Going After Guppy": 170000055, "SS: Faster Than a Speedrunning Penguin": 170000056, "SS: The Silver Stars of Sea Slide": 170000057, + "SS: Underwater Cosmic Mario Race": 170000058, + "SS: Purple Coins by the Seaside": 170000059, "SS: Hurry, He's Hungry": 170000060, } locTT_table = { @@ -98,23 +119,31 @@ class SMGLocation(Location): "TT: Mario (or Luigi) Meets Mario": 170000062, "TT: Bouncing Down Cake Lane": 170000063, "TT: The Flipswitch Chain": 170000064, + "TT: The Flipswitch Chain": 170000112, + "TT: Luigi's Purple Coins": 170000065, } locDD_table = { "DD: The Underground Ghost Ship": 170000069, "DD: Bubble Blastoff": 170000070, "DD: Guppy and the Underground Lake": 170000071, + "DD: Ghost Ship Daredevil Run": 170000072, + "DD: Plunder the Purple Coins": 170000073, "DD: Boo in Box": 170000074, } locDN_table = { "DN: Inflitrating the Dreadnought": 170000075, "DN: Dreanought's Colossal Cannons": 170000076, "DN: Revenge of the Topman Tribe": 170000077, + "DN: Topman Tribe Speed Run": 170000078, + "DN: Battlestation's Purple Coins": 170000079, "DN: Dreadnought's Garbage Dump": 170000080, } locMM_table = { "MM: The Sinking Lava Spire": 170000081, "MM: Through the Meteor Storm": 170000082, "MM: Fiery Dino Piranha": 170000083, + "MM: Lava Spire Daredevil Run": 170000084, + "MM: Red-Hot Purple Coins": 170000085, "MM Burning Tide": 170000086, } locHL_table = { diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index 8ed2e2d8cec..38c018106fc 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -1,5 +1,11 @@ from ..generic.Rules import add_rule from .Regions import connect_regions, smgcourses, + def smg_gate_open(self, player: int): + return self.has('Grand Star Engine Room', player) + def smg_can_finish(self, player: int): + return self.has('Power Star 70') and self.has('Grand Star Bedroom') + def smg_purple_coins(self, player: int): + return return self.has('Power Star 70') and self.has('Grand Star Bedroom') and self.has('Grand Star Engine Room', player) connect_regions(world, player, "Menu", "Good Egg", lambda state: True) connect_regions(world, player, "Menu", "Honeyhive", lambda state: state.has("Power Star", player, 3)) @@ -38,4 +44,10 @@ set_rule(world.get_location("BM: Bigmouth's Gold Bait") lambda state: state.has("Grand Star Kitchen", player) and state.has("Power Star", player, 29)) set_rule(world.get_location("SS: Choosing a Favorite Snack") lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain")) set_rule(world.get_location("BB: Racing the Spooky Speedster") lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) - set_rule(world.get_location("SC: Star Bunnies in the Snow") lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) \ No newline at end of file + set_rule(world.get_location("SC: Star Bunnies in the Snow") lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) + add_rule(world.get_location("GE: Dino Piranha Speed Run") lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("GE: Purple Coin Omelet") lambda state: state.smg_gate_open and smg_can_finish) + add_rule(world.get_location("HH: Honeyhive Cosmic Mario Race") lambda state: state.has("Power Star", player, 16)) + add_rule(world.get_location("HH: Honeyhive's Purple Coins") lambda state: state.smg_can_finish and smg_gate_open) + add_rule(world.get_location("SJ: Pull Star Path Speed Run") lambda state: state.has("Power Star", player, 23)) + add_rule(world.get_location("Purple Coin Spacewalk") lambda state: state.smg_purple_coins) \ No newline at end of file From eedd0da874993f43a593e51488e5a9ae18507f60 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 11 Jul 2022 21:36:59 -0500 Subject: [PATCH 21/71] finish logic --- worlds/galaxy/locations.py | 6 ++++-- worlds/galaxy/rules.py | 39 ++++++++++++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 4816f5a0c85..68a2cbe7f77 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -40,7 +40,7 @@ class SMGLocation(Location): "B: The Firery Stronghold": 170000030, "BJ: Sinking the Airships": 170000045, "BJ: King Kaliente's Spicy Return": 170000067 - "B: The Fate of the Universe": 170000095, + "B: Darkness on the Horizon": 170000095, } locSJ_table = { @@ -79,6 +79,8 @@ class SMGLocation(Location): "GG: Bunnies in the Wind": 170000108, "GG: The Dirty Tricks of Major Burrows", 170000109, "GG: Gusty Garden's Gravity Scramble": 170000110, + "GG: Major Burrows's Daredevil Run": 170000111, + "GG: Purple Coins on the Puzzle Cube": 170000112, "GG: The Golden Chomp": 170000113, } locFF_table = { @@ -119,7 +121,7 @@ class SMGLocation(Location): "TT: Mario (or Luigi) Meets Mario": 170000062, "TT: Bouncing Down Cake Lane": 170000063, "TT: The Flipswitch Chain": 170000064, - "TT: The Flipswitch Chain": 170000112, + "TT: Fast Foes of Toy Time": 170000067, "TT: Luigi's Purple Coins": 170000065, } locDD_table = { diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index 38c018106fc..2d8f7165e50 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -3,10 +3,12 @@ def smg_gate_open(self, player: int): return self.has('Grand Star Engine Room', player) def smg_can_finish(self, player: int): - return self.has('Power Star 70') and self.has('Grand Star Bedroom') + return self.has('Power Star 60') and self.has('Grand Star Bedroom') def smg_purple_coins(self, player: int): - return return self.has('Power Star 70') and self.has('Grand Star Bedroom') and self.has('Grand Star Engine Room', player) - + return self.has('Power Star 60') and self.has('Grand Star Bedroom') and self.has('Grand Star Engine Room', player) + def smg_can_get_comet + return self.has('Power Star 13') + # main stage logic connect_regions(world, player, "Menu", "Good Egg", lambda state: True) connect_regions(world, player, "Menu", "Honeyhive", lambda state: state.has("Power Star", player, 3)) connect_regions(world, player, "Menu", "Fountain", lambda state: state.has("Grand Star Terrace", player)) @@ -25,6 +27,7 @@ def smg_purple_coins(self, player: int): connect_regions(world, player, "Garden" "Deep Dark" lambda state: state.has("Power Star", player 46)) connect_regions(world, player, "Garden" "Dreadnaught" lambda state: state.has("Power Star", player 48)) connect_regions(world, player, "Garden" "Melty Molten" lambda state: state.has("Power Star", player 52)) + # special stages logic set_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player 5)) set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player 7)) set_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player 11) and state.has("Grand Star Terrace")) @@ -45,9 +48,33 @@ def smg_purple_coins(self, player: int): set_rule(world.get_location("SS: Choosing a Favorite Snack") lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain")) set_rule(world.get_location("BB: Racing the Spooky Speedster") lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) set_rule(world.get_location("SC: Star Bunnies in the Snow") lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) + # comet logic add_rule(world.get_location("GE: Dino Piranha Speed Run") lambda state: state.has("Power Star", player, 13)) add_rule(world.get_location("GE: Purple Coin Omelet") lambda state: state.smg_gate_open and smg_can_finish) - add_rule(world.get_location("HH: Honeyhive Cosmic Mario Race") lambda state: state.has("Power Star", player, 16)) + add_rule(world.get_location("HH: Honeyhive Cosmic Mario Race") lambda state: state.has("Power Star", player, 13)) add_rule(world.get_location("HH: Honeyhive's Purple Coins") lambda state: state.smg_can_finish and smg_gate_open) - add_rule(world.get_location("SJ: Pull Star Path Speed Run") lambda state: state.has("Power Star", player, 23)) - add_rule(world.get_location("Purple Coin Spacewalk") lambda state: state.smg_purple_coins) \ No newline at end of file + add_rule(world.get_location("SJ: Pull Star Path Speed Run") lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("SJ: Purple Coin Spacewalk") lambda state: state.smg_purple_coins) + add_rule(world.get_location("BR: Topmanic's Dardevil Run") lambda state: state.smg_can_get_comet) + add_rule(world.get_location("BR: Purple Coins on the Battlerock") lambda state: state.smg_purple_coins) + add_rule(world.get_location("BB: Fast Foes on the Cyclone Stone") lambda state: state.smg_can_get_comet) + add_rule(world.get_location("G: Purple Coins in the Bone Pen") lambda state: state.smg_purple_coins) + add_rule(world.get_location("GG: Purple Coins on the Puzzle Cube") lambda state: state.smg_purple_coins) + add_rule(world.get_location("FF: Purple Coins on the Summit") lambda state: state.smg_purple_coins) + add_rule(world.get_location("DDune: Purple Coin in the Desert") lambda state: state.smg_purple_coins) + add_rule(world.get_location("GL: Purple Coins in the Woods") lambda state: state.smg_purple_coins) + add_rule(world.get_location("SS: Purple Coins by the Seaside") lambda state: state.smg_purple_coins) + add_rule(world.get_location("TT: Luigi's Purple Coins") lambda state: state.smg_purple_coins) + add_rule(world.get_location("DD: Plunder the Purple Coins") lambda state: state.smg_purple_coins) + add_rule(world.get_location("DN: Battlestation's Purple Coins") lambda state: state.smg_purple_coins) + add_rule(world.get_location("MM: Red-Hot Purple Coins") lambda state: state.smg_purple_coins) + # boss stage logic + set_rule(world.get_location("BJ: Megaleg's Moon") lambda state: state.has("Power Star", player, 8)) + set_rule(world.get_location("B: The Firery Stronghold") lambda state: state.has("Power Star", player, 15) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("BJ: Sinking the Airships") lambda state: state.has("Power Star", player, 23) and state.has("Grand Star Fountain", player)) + set_rule(world.get_location("BJ: King Kaliente's Spicy Return") lambda state: state.has("Power Star", player, 45) and state.has("Grand Star Engine Room", player)) + set_rule(world.get_location("B: Darkness on the Horizon") lambda state: state.has("Power Star", player, 33) and state.has("Grand Star Kitchen", player)) + + + + \ No newline at end of file From de74d7941c1a7db0320ed69d9a9e00da80774f54 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 13 Jul 2022 14:00:09 -0500 Subject: [PATCH 22/71] adds to int_py and revise other things --- worlds/galaxy/Options.py | 6 ++++++ worlds/galaxy/__int__.py | 30 ++++++++++++++++++++++++++++-- worlds/galaxy/rules.py | 1 + 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 worlds/galaxy/Options.py diff --git a/worlds/galaxy/Options.py b/worlds/galaxy/Options.py new file mode 100644 index 00000000000..91e48fb195f --- /dev/null +++ b/worlds/galaxy/Options.py @@ -0,0 +1,6 @@ +import typing +from Options import Option + + +Galaxy_options: typing.Dict[str, type(Option)] = { +} diff --git a/worlds/galaxy/__int__.py b/worlds/galaxy/__int__.py index 34019dd17a9..4bcbbf7f7fc 100644 --- a/worlds/galaxy/__int__.py +++ b/worlds/galaxy/__int__.py @@ -2,8 +2,34 @@ import json from .Locations import SMGLocation from .Regions import create_regions, smgcourses -from .Rules import +from .Rules import set_rules from .items import genric_item_table from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification -from .Options import from ..AutoWorld import World, WebWorld +from .Options import Galaxy_options + + + +class SuperMarioGalaxy(World): + """ + Super Mario Galaxy allows you to explore the cosomos with rosalinna in the comet obserbatory. + Mario must collect Power Stars and Grand Stars to power the obserbatory so it can go to the + center of the universe in order to save peach. + """ + game: str = "Super Mario Galaxy" + options = Galaxy_options + topology_present = True + web = GalaxyWeb() + + item_name_to_id = generic_item_table + location_name_to_id = location_table + + def set_rules(self): + set_rules(self.world, self.player) + + def create_regions(self): + create_regions(self.world,self.player) + + def make_items(self): + staritem = self.create_item("Power Star") + self.world.itempool += [staritem for i in range(0,120)] \ No newline at end of file diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index 2d8f7165e50..bae4dca94a7 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -1,5 +1,6 @@ from ..generic.Rules import add_rule from .Regions import connect_regions, smgcourses, +def set_rules(world, player: int, area_connections): def smg_gate_open(self, player: int): return self.has('Grand Star Engine Room', player) def smg_can_finish(self, player: int): From 060a747bc3ed789a8a851fb9b609d15b82207b73 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Thu, 14 Jul 2022 14:46:32 -0500 Subject: [PATCH 23/71] making steps towards generating --- worlds/galaxy/Options.py | 10 ++++++++-- worlds/galaxy/__int__.py | 27 +++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/worlds/galaxy/Options.py b/worlds/galaxy/Options.py index 91e48fb195f..608242f1509 100644 --- a/worlds/galaxy/Options.py +++ b/worlds/galaxy/Options.py @@ -1,6 +1,12 @@ import typing -from Options import Option +from Options import Choice, Option, Toggle, DefaultOnToggle, Range, OptionList, DefaultOffToggle -Galaxy_options: typing.Dict[str, type(Option)] = { +class EnablePurpleCoinStars(DefaultOffToggle): + """tuning this on we allow purple coin stars to count as checks do note all purple coin stars are postgame only.""" + display_name = "Enable Purple Coin Stars" + +smg_options: typing.Dict[str, type(Option)] = { + "EnablePurpleCoinStars": EnablePurpleCoinStars, } + diff --git a/worlds/galaxy/__int__.py b/worlds/galaxy/__int__.py index 4bcbbf7f7fc..8f02e3892fb 100644 --- a/worlds/galaxy/__int__.py +++ b/worlds/galaxy/__int__.py @@ -19,7 +19,6 @@ class SuperMarioGalaxy(World): game: str = "Super Mario Galaxy" options = Galaxy_options topology_present = True - web = GalaxyWeb() item_name_to_id = generic_item_table location_name_to_id = location_table @@ -29,7 +28,27 @@ def set_rules(self): def create_regions(self): create_regions(self.world,self.player) - - def make_items(self): + + def create_item(self, name: str) -> Item: + item_id = item_table[name] + return item + if name == "Power Star": + classification = ItemClassification.progression + else: + classification = ItemClassification.progression + item = SMGItem(name, classification, item_data.code, self.player) + return item + def generate_basic(self): staritem = self.create_item("Power Star") - self.world.itempool += [staritem for i in range(0,120)] \ No newline at end of file + if(self.world.EnablePurpleCoinStars[self.player].value): + self.world.itempool += [staritem for i in range(0,120)] + else: + self.world.itempool += [staritem for i in range(0,104)] + grandstar1 = self.create_item("Grand Star Terrace") + grandstar2 = self.create_item("Grand Star Fountain") + grandstar3 = self.create_item("Grand Star Kitchen") + grandstar4 = self.create_item("Grand Star Bedroom") + grandstar5 = self.create_item("Grand Star Engine Room") + self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] + + \ No newline at end of file From 5215497bac5cb38db50e6072e70be051941c30f1 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 20 Jul 2022 19:56:02 -0500 Subject: [PATCH 24/71] 7-20 changes --- worlds/galaxy/Options.py | 3 +- worlds/galaxy/__int__.py | 44 +++++++------- worlds/galaxy/items.py | 3 +- worlds/galaxy/locations.py | 18 +++--- worlds/galaxy/regions.py | 3 +- worlds/galaxy/rules.py | 114 +++++++++++++++++++------------------ 6 files changed, 94 insertions(+), 91 deletions(-) diff --git a/worlds/galaxy/Options.py b/worlds/galaxy/Options.py index 608242f1509..42791b3709c 100644 --- a/worlds/galaxy/Options.py +++ b/worlds/galaxy/Options.py @@ -6,7 +6,6 @@ class EnablePurpleCoinStars(DefaultOffToggle): """tuning this on we allow purple coin stars to count as checks do note all purple coin stars are postgame only.""" display_name = "Enable Purple Coin Stars" -smg_options: typing.Dict[str, type(Option)] = { +smg_options: typing.Dict[str, Type(Option)] = { "EnablePurpleCoinStars": EnablePurpleCoinStars, } - diff --git a/worlds/galaxy/__int__.py b/worlds/galaxy/__int__.py index 8f02e3892fb..37f5631bad3 100644 --- a/worlds/galaxy/__int__.py +++ b/worlds/galaxy/__int__.py @@ -1,14 +1,13 @@ -import os -import json -from .Locations import SMGLocation -from .Regions import create_regions, smgcourses +import string +from .Items import item_table, SMGItem +from .Locations import location_table, SM64Location +from .Options import sm64_options from .Rules import set_rules -from .items import genric_item_table -from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification -from ..AutoWorld import World, WebWorld -from .Options import Galaxy_options - +from .Regions import create_regions +from BaseClasses import Region, RegionType, Entrance, Item, MultiWorld +from ..AutoWorld import World +client_version = 1 class SuperMarioGalaxy(World): """ @@ -16,39 +15,40 @@ class SuperMarioGalaxy(World): Mario must collect Power Stars and Grand Stars to power the obserbatory so it can go to the center of the universe in order to save peach. """ + game: str = "Super Mario Galaxy" - options = Galaxy_options - topology_present = True + topology_present = False - item_name_to_id = generic_item_table + item_name_to_id = item_table location_name_to_id = location_table + + data_version = 1 + forced_auto_forfeit = False - def set_rules(self): - set_rules(self.world, self.player) + options = smg_options def create_regions(self): create_regions(self.world,self.player) + def set_rules(self): + set_rules(self.world, self.player) + def create_item(self, name: str) -> Item: item_id = item_table[name] + item = SMGItem(name, True, item_id, self.player) return item - if name == "Power Star": - classification = ItemClassification.progression - else: - classification = ItemClassification.progression - item = SMGItem(name, classification, item_data.code, self.player) - return item + def generate_basic(self): staritem = self.create_item("Power Star") if(self.world.EnablePurpleCoinStars[self.player].value): self.world.itempool += [staritem for i in range(0,120)] else: self.world.itempool += [staritem for i in range(0,104)] + grandstar1 = self.create_item("Grand Star Terrace") grandstar2 = self.create_item("Grand Star Fountain") grandstar3 = self.create_item("Grand Star Kitchen") grandstar4 = self.create_item("Grand Star Bedroom") grandstar5 = self.create_item("Grand Star Engine Room") - self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] - + self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] \ No newline at end of file diff --git a/worlds/galaxy/items.py b/worlds/galaxy/items.py index d6870131dbc..d30b3fe434d 100644 --- a/worlds/galaxy/items.py +++ b/worlds/galaxy/items.py @@ -4,8 +4,7 @@ class SMGItem(Item): game: str = "Super Mario Galaxy" - -genric_item_table = { +item_table = { "Power Star": 8010, "Grand Star Terrace": 8011, "Grand Star Fountain": 8012, diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 68a2cbe7f77..135f3cb8b77 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -39,7 +39,7 @@ class SMGLocation(Location): "BJ: Megaleg's Moon": 170000014, "B: The Firery Stronghold": 170000030, "BJ: Sinking the Airships": 170000045, - "BJ: King Kaliente's Spicy Return": 170000067 + "BJ: King Kaliente's Spicy Return": 170000067, "B: Darkness on the Horizon": 170000095, } @@ -56,8 +56,8 @@ class SMGLocation(Location): "BR: Breaking into the Battlerock": 170000022, "BR: Topmaniac's Garbage dump": 170000023, "BR: Topmanic's Dardevil Run": 170000025, - "BR: Purple Coins on the Battlerock" 170000026, - "BR: Luigi under the Saucer" 170000027, + "BR: Purple Coins on the Battlerock": 170000026, + "BR: Luigi under the Saucer": 170000027, } locBB_table = { "BB: Sunken Treasure": 170000031, @@ -77,7 +77,7 @@ class SMGLocation(Location): } locGG_table = { "GG: Bunnies in the Wind": 170000108, - "GG: The Dirty Tricks of Major Burrows", 170000109, + "GG: The Dirty Tricks of Major Burrows": 170000109, "GG: Gusty Garden's Gravity Scramble": 170000110, "GG: Major Burrows's Daredevil Run": 170000111, "GG: Purple Coins on the Puzzle Cube": 170000112, @@ -87,9 +87,9 @@ class SMGLocation(Location): "FF: The Frozen Peak of Baron Brr": 170000095, "FF: Freezeflame's Blistering Coore": 170000096, "FF: Hot and Cold Collide": 170000097, - "FF: Conquring the Summit" 170000100, - "FF: Frosty Cosmic Mario race" 170000098, - "FF: Purple Coins on the Summit" 170000099, + "FF: Conquring the Summit": 170000100, + "FF: Frosty Cosmic Mario race": 170000098, + "FF: Purple Coins on the Summit": 170000099, } locDDune = { "DDune: Soaring on the Desert Winds": 170000101, @@ -157,10 +157,10 @@ class SMGLocation(Location): "BB: Racing the Spooky Speedster": 170000093, "SC: Star Bunnies in the Snow": 170000094, } -location_table{**locGE_table,**locHH_table, \ +location_table = { **locGE_table,**locHH_table, \ **locSJ_table,**locBR_table,**locBB_table, \ **locGG_table,**locFF_table,**locDDune_table, \ **locGL_table,**locSS_table,**locTT_table, \ **locDD_table,**locDN_table,**locMM_table, \ **locHL_table,**locspecialstages_table,**locbosses_table, \ -} \ No newline at end of file +} diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py index d028c1004f9..4a55edbd2f2 100644 --- a/worlds/galaxy/regions.py +++ b/worlds/galaxy/regions.py @@ -1,6 +1,7 @@ import typing from BaseClasses import MultiWorld, Region, Location -from .locations import SMGLocation, location_table, locHH_table, locGE_table, \ +from .locations import SMGLocation, location_table +locHH_table, locGE_table, \ locSJ_table, locBR_table, locBB_table, \ locGG_table, locFF_table, locDD_table, locDDune, \ locspecialstages_table, locbosses_table, \ diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index bae4dca94a7..1205f875e22 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -1,14 +1,19 @@ -from ..generic.Rules import add_rule -from .Regions import connect_regions, smgcourses, -def set_rules(world, player: int, area_connections): +from ..generic.Rules import add_rule, set_rule +from .Regions import smgcourses, connect_regions +def set_rules(world, player: int): + def smg_gate_open(self, player: int): return self.has('Grand Star Engine Room', player) + def smg_can_finish(self, player: int): return self.has('Power Star 60') and self.has('Grand Star Bedroom') + def smg_purple_coins(self, player: int): return self.has('Power Star 60') and self.has('Grand Star Bedroom') and self.has('Grand Star Engine Room', player) - def smg_can_get_comet + + def smg_can_get_comet(self, player: int): return self.has('Power Star 13') + # main stage logic connect_regions(world, player, "Menu", "Good Egg", lambda state: True) connect_regions(world, player, "Menu", "Honeyhive", lambda state: state.has("Power Star", player, 3)) @@ -17,65 +22,64 @@ def smg_can_get_comet connect_regions(world, player, "Fountain", "Space Junk", lambda state: state.has("Power Star", player, 12)) connect_regions(world, player, "Menu", "Kitchen", lambda state: state.has("Grand Star Fountain", player)) connect_regions(world, player, "Kitchen", "Beach Bowl", lambda state: state.has("Power Star", player, 18)) - connect_regions(world, player, "Kitchen", "Ghostly" lambda state: state.has("Power Star", player, 20)) + connect_regions(world, player, "Kitchen", "Ghostly", lambda state: state.has("Power Star", player, 20)) connect_regions(world, player, "Menu", "Bedroom", lambda state: state.has("Grand Star Kitchen", player)) connect_regions(world, player, "Bedroom" "Gusty Gardens", lambda state: state.has("Power Star", player, 24)) connect_regions(world, player, "Bedroom" "Freezeflame", lambda state: state.has("Power Star", player, 26)) connect_regions(world, player, "Menu", "Engine Room", lambda state: state.has("Grand Star Bedroom", player)) - connect_regions(world, player, "Engine Room", "Gold Leaf" lambda state: state.has("Power Star", player 34)) - connect_regions(world, player, "Engine Room", "Toy Time" lambda state: state.has("Power Star", player 40)) - connect_regions(world, player, "Menu", "Garden" lambda state: state.has("Grand Star Engine Room", player)) - connect_regions(world, player, "Garden" "Deep Dark" lambda state: state.has("Power Star", player 46)) - connect_regions(world, player, "Garden" "Dreadnaught" lambda state: state.has("Power Star", player 48)) - connect_regions(world, player, "Garden" "Melty Molten" lambda state: state.has("Power Star", player 52)) + connect_regions(world, player, "Engine Room", "Gold Leaf", lambda state: state.has("Power Star", player 34)) + connect_regions(world, player, "Engine Room", "Toy Time", lambda state: state.has("Power Star", player 40)) + connect_regions(world, player, "Menu", "Garden", lambda state: state.has("Grand Star Engine Room", player)) + connect_regions(world, player, "Garden" "Deep Dark", lambda state: state.has("Power Star", player 46)) + connect_regions(world, player, "Garden" "Dreadnaught", lambda state: state.has("Power Star", player 48)) + connect_regions(world, player, "Garden" "Melty Molten", lambda state: state.has("Power Star", player 52)) # special stages logic set_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player 5)) set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player 7)) set_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player 11) and state.has("Grand Star Terrace")) - set_rule(world.get_location("HS: Shrinking Satellite", player) lambda state: state.has ("Power Star", player 18) and state.has("Grand Star Terrace")) - set_rule(world.get_location("BUB: Through the Poison Swamp", player) lambda state: state.has ("Power Star", player 19) and state.has("Grand Star Fountain")) - set_rule(world.get_location("BB: The Secret of Buoy Base", player) lambda state: state.has ("Power Star", player 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) - set_rule(world.get_location("BB: The Floating Fortress", player) lambda state: state.has ("Power Star", player 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) - set_rule(world.get_location("GG: Gateway's Purple coins", player) lambda state: state.has("Grand Star Engine Room")) - set_rule(world.get_location("BF: Kingfin's Fearsome Waters", player) lambda state: state.has("Power Star", player 55) and state.has("Grand Star Bedroom")) - set_rule(world.get_location("MS: Watch Your Step", player) lambda state: state.has("Power Star", player 50) and state.has("Grand Star Engine Room") and state.has("Grand Star Bedroom")) - set_rule(world.get_location("DDR: Giant Eel Breakout", player) lambda state: state.has("Grand Star Fountain", player)) - set_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player) lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player) lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) - set_rule(world.get_location("BBT: The Electric Labyrinth", player) lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) - set_rule(world.get_location("SS: Rocky Road", player) lambda state: state.has("Power Star", player, 7)) - set_rule(world.get_location("SP: A Very Sticky Situation") lambda state: state.has("Grand Star Terrace", player) and state.has("Power Star", player, 9)) - set_rule(world.get_location("BM: Bigmouth's Gold Bait") lambda state: state.has("Grand Star Kitchen", player) and state.has("Power Star", player, 29)) - set_rule(world.get_location("SS: Choosing a Favorite Snack") lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain")) - set_rule(world.get_location("BB: Racing the Spooky Speedster") lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) - set_rule(world.get_location("SC: Star Bunnies in the Snow") lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) + set_rule(world.get_location("HS: Shrinking Satellite", player), lambda state: state.has ("Power Star", player 18) and state.has("Grand Star Terrace")) + set_rule(world.get_location("BUB: Through the Poison Swamp", player), lambda state: state.has ("Power Star", player 19) and state.has("Grand Star Fountain")) + set_rule(world.get_location("BB: The Secret of Buoy Base", player), lambda state: state.has ("Power Star", player 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) + set_rule(world.get_location("BB: The Floating Fortress", player), lambda state: state.has ("Power Star", player 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) + set_rule(world.get_location("GG: Gateway's Purple coins", player), lambda state: state.has("Grand Star Engine Room")) + set_rule(world.get_location("BF: Kingfin's Fearsome Waters", player), lambda state: state.has("Power Star", player 55) and state.has("Grand Star Bedroom")) + set_rule(world.get_location("MS: Watch Your Step", player), lambda state: state.has("Power Star", player 50) and state.has("Grand Star Engine Room", player) and state.has("Grand Star Bedroom")) + set_rule(world.get_location("DDR: Giant Eel Breakout", player), lambda state: state.has("Grand Star Fountain", player)) + set_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) + set_rule(world.get_location("BBT: The Electric Labyrinth", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) + set_rule(world.get_location("SS: Rocky Road", player), lambda state: state.has("Power Star", player, 7)) + set_rule(world.get_location("SP: A Very Sticky Situation", player), lambda state: state.has("Grand Star Terrace", player) and state.has("Power Star", player, 9)) + set_rule(world.get_location("BM: Bigmouth's Gold Bait", player), lambda state: state.has("Grand Star Kitchen", player) and state.has("Power Star", player, 29)) + set_rule(world.get_location("SS: Choosing a Favorite Snack", player), lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain")) + set_rule(world.get_location("BB: Racing the Spooky Speedster", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) + set_rule(world.get_location("SC: Star Bunnies in the Snow", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) # comet logic - add_rule(world.get_location("GE: Dino Piranha Speed Run") lambda state: state.has("Power Star", player, 13)) - add_rule(world.get_location("GE: Purple Coin Omelet") lambda state: state.smg_gate_open and smg_can_finish) - add_rule(world.get_location("HH: Honeyhive Cosmic Mario Race") lambda state: state.has("Power Star", player, 13)) - add_rule(world.get_location("HH: Honeyhive's Purple Coins") lambda state: state.smg_can_finish and smg_gate_open) - add_rule(world.get_location("SJ: Pull Star Path Speed Run") lambda state: state.has("Power Star", player, 13)) - add_rule(world.get_location("SJ: Purple Coin Spacewalk") lambda state: state.smg_purple_coins) - add_rule(world.get_location("BR: Topmanic's Dardevil Run") lambda state: state.smg_can_get_comet) - add_rule(world.get_location("BR: Purple Coins on the Battlerock") lambda state: state.smg_purple_coins) - add_rule(world.get_location("BB: Fast Foes on the Cyclone Stone") lambda state: state.smg_can_get_comet) - add_rule(world.get_location("G: Purple Coins in the Bone Pen") lambda state: state.smg_purple_coins) - add_rule(world.get_location("GG: Purple Coins on the Puzzle Cube") lambda state: state.smg_purple_coins) - add_rule(world.get_location("FF: Purple Coins on the Summit") lambda state: state.smg_purple_coins) - add_rule(world.get_location("DDune: Purple Coin in the Desert") lambda state: state.smg_purple_coins) - add_rule(world.get_location("GL: Purple Coins in the Woods") lambda state: state.smg_purple_coins) - add_rule(world.get_location("SS: Purple Coins by the Seaside") lambda state: state.smg_purple_coins) - add_rule(world.get_location("TT: Luigi's Purple Coins") lambda state: state.smg_purple_coins) - add_rule(world.get_location("DD: Plunder the Purple Coins") lambda state: state.smg_purple_coins) - add_rule(world.get_location("DN: Battlestation's Purple Coins") lambda state: state.smg_purple_coins) - add_rule(world.get_location("MM: Red-Hot Purple Coins") lambda state: state.smg_purple_coins) + add_rule(world.get_location("GE: Dino Piranha Speed Run", player), lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("HH: Honeyhive Cosmic Mario Race", player), lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("SJ: Pull Star Path Speed Run", player), lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("BR: Topmanic's Dardevil Run", player), lambda state: state.smg_can_get_comet) + add_rule(world.get_location("BB: Fast Foes on the Cyclone Stone", player), lambda state: state.smg_can_get_comet) # boss stage logic - set_rule(world.get_location("BJ: Megaleg's Moon") lambda state: state.has("Power Star", player, 8)) - set_rule(world.get_location("B: The Firery Stronghold") lambda state: state.has("Power Star", player, 15) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("BJ: Sinking the Airships") lambda state: state.has("Power Star", player, 23) and state.has("Grand Star Fountain", player)) - set_rule(world.get_location("BJ: King Kaliente's Spicy Return") lambda state: state.has("Power Star", player, 45) and state.has("Grand Star Engine Room", player)) - set_rule(world.get_location("B: Darkness on the Horizon") lambda state: state.has("Power Star", player, 33) and state.has("Grand Star Kitchen", player)) - - - + set_rule(world.get_location("BJ: Megaleg's Moon", player), lambda state: state.has("Power Star", player, 8)) + set_rule(world.get_location("B: The Firery Stronghold", player), lambda state: state.has("Power Star", player, 15) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("BJ: Sinking the Airships", player), lambda state: state.has("Power Star", player, 23) and state.has("Grand Star Fountain", player)) + set_rule(world.get_location("BJ: King Kaliente's Spicy Return", player), lambda state: state.has("Power Star", player, 45) and state.has("Grand Star Engine Room", player)) + set_rule(world.get_location("B: Darkness on the Horizon", player), lambda state: state.has("Power Star", player, 33) and state.has("Grand Star Kitchen", player)) + # purple coin star logic + if world.EnablePurpleCoinStars[player]: + add_rule(world.get_location("DN: Battlestation's Purple Coins", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("MM: Red-Hot Purple Coins", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("TT: Luigi's Purple Coins", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("DD: Plunder the Purple Coins", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("GL: Purple Coins in the Woods", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("FF: Purple Coins on the Summit", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("SS: Purple Coins by the Seaside", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("GG: Purple Coins on the Puzzle Cube", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("G: Purple Coins in the Bone Pen", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("DDune: Purple Coin in the Desert", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("BR: Purple Coins on the Battlerock", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("GE: Purple Coin Omelet", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("HH: Honeyhive's Purple Coins", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("SJ: Purple Coin Spacewalk", player), lambda state: state.smg_purple_coins) \ No newline at end of file From 8bfec2e608b34cdbca59669acd4e3fcc41002c45 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 23 Jul 2022 13:09:15 -0500 Subject: [PATCH 25/71] error fixiing --- worlds/galaxy/Options.py | 3 ++- worlds/galaxy/locations.py | 2 +- worlds/galaxy/regions.py | 24 ++++++++++++------------ worlds/galaxy/rules.py | 28 ++++++++++++++-------------- 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/worlds/galaxy/Options.py b/worlds/galaxy/Options.py index 42791b3709c..32550fc0698 100644 --- a/worlds/galaxy/Options.py +++ b/worlds/galaxy/Options.py @@ -6,6 +6,7 @@ class EnablePurpleCoinStars(DefaultOffToggle): """tuning this on we allow purple coin stars to count as checks do note all purple coin stars are postgame only.""" display_name = "Enable Purple Coin Stars" -smg_options: typing.Dict[str, Type(Option)] = { +smg_options: typing.Dict[str, Type(Toggle)] = { "EnablePurpleCoinStars": EnablePurpleCoinStars, + } diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py index 135f3cb8b77..f6e9c919586 100644 --- a/worlds/galaxy/locations.py +++ b/worlds/galaxy/locations.py @@ -91,7 +91,7 @@ class SMGLocation(Location): "FF: Frosty Cosmic Mario race": 170000098, "FF: Purple Coins on the Summit": 170000099, } -locDDune = { +locDDune_table = { "DDune: Soaring on the Desert Winds": 170000101, "DDune: Blasting through the Sand": 170000102, "DDune: Sunbaked Sand Castle": 170000103, diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py index 4a55edbd2f2..b9dd97213bd 100644 --- a/worlds/galaxy/regions.py +++ b/worlds/galaxy/regions.py @@ -13,7 +13,7 @@ "Gusty gardens", "Freezeflame", "Dusty Dune", "Honeyclimb", "Bowser's Dark Matter Planet", "Gold Leaf", "Sea Slide", "Toy Time", "Bonefin", "Bowser Jr.'s Lava Reactor", "Gateway", "Deep Dark", "Dreadnaught", "Melty Molton", "Matter Splatter"] -def create_regions(world MultiWorld, player int): +def create_regions(world, MultiWorld, player, int): regSS = Region("Menu", RegionType.Generic, "Comment Obserbatory", player, world) locspecialstages_names = [name for name, id in locSS_table.items()] locspecialstages_names += [name for name, id in locKey_table.items()] @@ -33,47 +33,47 @@ def create_regions(world MultiWorld, player int): # defines the Space Junk galaxy region reg = Region("Space Junk", RegionType.Generic, "Space Junk", player, world) locSJ_names = [name for name, id in locSJ_table.items()] - regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name,] regSJ) for loc_name in locSJ_names] + regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] # defines the Battlerock galaxy reg = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) locBR_names = [name for name, id in locBR_table.items()] - regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name,] regBR) for loc_name in locBR_names] + regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] # defines the Beach Bowl galaxy reg = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) locBB_names = [name for name, id in locBB_table.items()] - regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name,] regBB) for loc_name in locBB_names] + regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] # define Ghostly galaxy reg = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) locGG_names = [name for name, id in locGG_table.items()] - regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name, ] regGG) for loc_name in locGG_names] + regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] # defines the Gusty Gardens galaxy reg = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) locGG_names = [name for name, id in locGG_table.items()] - regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name, ] regGG) for loc_name in locGG_names] + regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] # defines Freezeflame galaxy reg = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) locFF_names = [name for name, id in locFF_table.items()] - regFF_names += [SMGLocation(player, loc_name, location_table[loc_name, ] regFF) for loc_name in locFF_names] + regFF_names += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] # defines golden leaf galaxy reg = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) locGL_names = [name for name, id in locGL_table.items()] - regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name, ] regGL) for loc_name in locGL_names] + regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] # defines toy time galaxy reg = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) locTT_names = [name for name, id in locTT_table.items()] - regTT_names += [SMGLocation(player, loc_name, location_table[loc_name, ] regTT) for loc_name in locTT_names] + regTT_names += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] # defines deep dark galaxy reg = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, world) locDD_names = [name for name, id in locDD_table.items()] - regDD_names += [SMGLocation(player, loc_name, location_table[loc_name, ] regDD) for loc_name in locDD_names] + regDD_names += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] # defines Dreadnought galaxy reg = Region("Dreadnought", RegionType.Generic, "Dreadnought", player, world) locDN_names = [name for name, id in locDN_table.items()] - regDN_names += [SMGLocation (player, loc_name, location_table[loc_name, ] regDN) for loc_name in locDN_names] + regDN_names += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] # defines Melty Molten galaxy reg = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) locMM_names = [name for name, id in locMM_table.items()] - regMM_names += [SMGLocation (player, loc_name, location_table[loc_name, ] regMM) for loc_name in locMM_names] + regMM_names += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] def connect_regions(world: MultiWorld, player: int, source: str, target: str, rule): sourceRegion = world.get_region(source, player) targetRegion = world.get_region(target, player) diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index 1205f875e22..a40edecafc0 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -27,23 +27,23 @@ def smg_can_get_comet(self, player: int): connect_regions(world, player, "Bedroom" "Gusty Gardens", lambda state: state.has("Power Star", player, 24)) connect_regions(world, player, "Bedroom" "Freezeflame", lambda state: state.has("Power Star", player, 26)) connect_regions(world, player, "Menu", "Engine Room", lambda state: state.has("Grand Star Bedroom", player)) - connect_regions(world, player, "Engine Room", "Gold Leaf", lambda state: state.has("Power Star", player 34)) - connect_regions(world, player, "Engine Room", "Toy Time", lambda state: state.has("Power Star", player 40)) + connect_regions(world, player, "Engine Room", "Gold Leaf", lambda state: state.has("Power Star", player, 34)) + connect_regions(world, player, "Engine Room", "Toy Time", lambda state: state.has("Power Star", player, 40)) connect_regions(world, player, "Menu", "Garden", lambda state: state.has("Grand Star Engine Room", player)) - connect_regions(world, player, "Garden" "Deep Dark", lambda state: state.has("Power Star", player 46)) - connect_regions(world, player, "Garden" "Dreadnaught", lambda state: state.has("Power Star", player 48)) - connect_regions(world, player, "Garden" "Melty Molten", lambda state: state.has("Power Star", player 52)) + connect_regions(world, player, "Garden" "Deep Dark", lambda state: state.has("Power Star", player, 46)) + connect_regions(world, player, "Garden" "Dreadnaught", lambda state: state.has("Power Star", player, 48)) + connect_regions(world, player, "Garden" "Melty Molten", lambda state: state.has("Power Star", player, 52)) # special stages logic - set_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player 5)) - set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player 7)) - set_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player 11) and state.has("Grand Star Terrace")) - set_rule(world.get_location("HS: Shrinking Satellite", player), lambda state: state.has ("Power Star", player 18) and state.has("Grand Star Terrace")) - set_rule(world.get_location("BUB: Through the Poison Swamp", player), lambda state: state.has ("Power Star", player 19) and state.has("Grand Star Fountain")) - set_rule(world.get_location("BB: The Secret of Buoy Base", player), lambda state: state.has ("Power Star", player 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) - set_rule(world.get_location("BB: The Floating Fortress", player), lambda state: state.has ("Power Star", player 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) + set_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player, 5)) + set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player, 7)) + set_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player, 11) and state.has("Grand Star Terrace")) + set_rule(world.get_location("HS: Shrinking Satellite", player), lambda state: state.has ("Power Star", player, 18) and state.has("Grand Star Terrace")) + set_rule(world.get_location("BUB: Through the Poison Swamp", player), lambda state: state.has ("Power Star", player, 19) and state.has("Grand Star Fountain")) + set_rule(world.get_location("BB: The Secret of Buoy Base", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) + set_rule(world.get_location("BB: The Floating Fortress", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) set_rule(world.get_location("GG: Gateway's Purple coins", player), lambda state: state.has("Grand Star Engine Room")) - set_rule(world.get_location("BF: Kingfin's Fearsome Waters", player), lambda state: state.has("Power Star", player 55) and state.has("Grand Star Bedroom")) - set_rule(world.get_location("MS: Watch Your Step", player), lambda state: state.has("Power Star", player 50) and state.has("Grand Star Engine Room", player) and state.has("Grand Star Bedroom")) + set_rule(world.get_location("BF: Kingfin's Fearsome Waters", player), lambda state: state.has("Power Star", player, 55) and state.has("Grand Star Bedroom")) + set_rule(world.get_location("MS: Watch Your Step", player), lambda state: state.has("Power Star", player, 50) and state.has("Grand Star Engine Room", player) and state.has("Grand Star Bedroom")) set_rule(world.get_location("DDR: Giant Eel Breakout", player), lambda state: state.has("Grand Star Fountain", player)) set_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) set_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) From 41dbe27bfd44e6c17b64af825f4010430dff7128 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 23 Jul 2022 13:26:30 -0500 Subject: [PATCH 26/71] 7-23 changes --- worlds/galaxy/__int__.py | 2 +- worlds/galaxy/regions.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/worlds/galaxy/__int__.py b/worlds/galaxy/__int__.py index 37f5631bad3..4aa2a812560 100644 --- a/worlds/galaxy/__int__.py +++ b/worlds/galaxy/__int__.py @@ -1,7 +1,7 @@ import string from .Items import item_table, SMGItem from .Locations import location_table, SM64Location -from .Options import sm64_options +from .Options import smg_options from .Rules import set_rules from .Regions import create_regions from BaseClasses import Region, RegionType, Entrance, Item, MultiWorld diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py index b9dd97213bd..a18cdbc3090 100644 --- a/worlds/galaxy/regions.py +++ b/worlds/galaxy/regions.py @@ -1,6 +1,8 @@ +import imp import typing -from BaseClasses import MultiWorld, Region, Location +from BaseClasses import MultiWorld, Region, Location, RegionType from .locations import SMGLocation, location_table +from .regions import regspecialstages locHH_table, locGE_table, \ locSJ_table, locBR_table, locBB_table, \ locGG_table, locFF_table, locDD_table, locDDune, \ @@ -9,21 +11,20 @@ locDN_table, locMM_table, locHL_table, \ smgcourses = ["Good Egg", "Honeyhive", "Loopdeeloop", "Flipswitch", "Bowser Jr. Robot Reactor", "Space Junk", "Battlerock", "Rolling Green", "Hurry-Scurry", "Bowser's Star Reactor", - "Beach Bowl", "Ghostly", "Bubble Breeze", "Buoy Base", "Bowser Jr.'s Ariship Armada" + "Beach Bowl", "Ghostly", "Bubble Breeze", "Buoy Base", "Bowser Jr.'s Ariship Armada", "Gusty gardens", "Freezeflame", "Dusty Dune", "Honeyclimb", "Bowser's Dark Matter Planet", "Gold Leaf", "Sea Slide", "Toy Time", "Bonefin", "Bowser Jr.'s Lava Reactor", "Gateway", "Deep Dark", "Dreadnaught", "Melty Molton", "Matter Splatter"] + def create_regions(world, MultiWorld, player, int): regSS = Region("Menu", RegionType.Generic, "Comment Obserbatory", player, world) locspecialstages_names = [name for name, id in locSS_table.items()] - locspecialstages_names += [name for name, id in locKey_table.items()] - locspecialstages_names += [name for name, id in locCap_table.items()] regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] world.regions.append(regSS) # defines the good egg galaxy region regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) - locGE_names = [name for name, id in locBoB_table.items()] + locGE_names = [name for name, id in locGE_table.items()] regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] world.regions.append(regGE) # defines the honeyhive galaxey region From 5b39ccdf07dd6240abb3f5fe64531c15c7896d51 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 25 Jul 2022 11:27:49 -0500 Subject: [PATCH 27/71] 7-25 updates --- worlds/galaxy/__int__.py | 8 ++++---- worlds/galaxy/regions.py | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/worlds/galaxy/__int__.py b/worlds/galaxy/__int__.py index 4aa2a812560..0053c7371ef 100644 --- a/worlds/galaxy/__int__.py +++ b/worlds/galaxy/__int__.py @@ -1,9 +1,9 @@ import string -from .Items import item_table, SMGItem -from .Locations import location_table, SM64Location +from .items import item_table, SMGItem +from .locations import location_table, SMGLocation from .Options import smg_options -from .Rules import set_rules -from .Regions import create_regions +from .rules import set_rules +from .regions import smgcourses, create_regions from BaseClasses import Region, RegionType, Entrance, Item, MultiWorld from ..AutoWorld import World diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py index a18cdbc3090..07ead44c7ec 100644 --- a/worlds/galaxy/regions.py +++ b/worlds/galaxy/regions.py @@ -1,14 +1,13 @@ import imp import typing from BaseClasses import MultiWorld, Region, Location, RegionType -from .locations import SMGLocation, location_table -from .regions import regspecialstages -locHH_table, locGE_table, \ +from .locations import SMGLocation, location_table, locHH_table, locGE_table, \ locSJ_table, locBR_table, locBB_table, \ locGG_table, locFF_table, locDD_table, locDDune, \ locspecialstages_table, locbosses_table, \ locGL_table, locSS_table, locTT_table, \ -locDN_table, locMM_table, locHL_table, \ +locDN_table, locMM_table, locHL_table \ + smgcourses = ["Good Egg", "Honeyhive", "Loopdeeloop", "Flipswitch", "Bowser Jr. Robot Reactor", "Space Junk", "Battlerock", "Rolling Green", "Hurry-Scurry", "Bowser's Star Reactor", "Beach Bowl", "Ghostly", "Bubble Breeze", "Buoy Base", "Bowser Jr.'s Ariship Armada", From 9eb535432495b178ba0da03fbe773bb664b82626 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Thu, 11 Aug 2022 11:55:55 -0500 Subject: [PATCH 28/71] trying to gen a game :( --- worlds/galaxy/__init__.py | 64 +++++++++++++++++++++++++++++++++++++++ worlds/galaxy/rules.py | 2 +- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 worlds/galaxy/__init__.py diff --git a/worlds/galaxy/__init__.py b/worlds/galaxy/__init__.py new file mode 100644 index 00000000000..f047a12b89c --- /dev/null +++ b/worlds/galaxy/__init__.py @@ -0,0 +1,64 @@ +import string +from .items import item_table, SMGItem +from .locations import location_table, SMGLocation +from .Options import smg_options +from .rules import set_rules +from .regions import smgcourses, create_regions +from BaseClasses import Item, Tutorial, Classification +from ..AutoWorld import World, WebWorld + +client_version = 1 + + +class SM64Web(WebWorld): + tutorials = [Tutorial( + "Multiworld Setup Guide", + "A guide to setting up SMG for MultiWorld.", + "English", + "setup_en.md", + "setup/en", + ["squidy"] + )] +class SuperMarioGalaxy(World): + """ + Super Mario Galaxy allows you to explore the cosomos with rosalinna in the comet obserbatory. + Mario must collect Power Stars and Grand Stars to power the obserbatory so it can go to the + center of the universe in order to save peach. + """ + + game: str = "Super Mario Galaxy" + topology_present = False + + item_name_to_id = item_table + location_name_to_id = location_table + + data_version = 1 + forced_auto_forfeit = False + + options = smg_options + + def create_regions(self): + create_regions(self.world,self.player) + + def set_rules(self): + set_rules(self.world, self.player) + + def create_item(self, name: str) -> Item: + item_id = item_table[name] + item = SMGItem(name, True, item_id, self.player) + return item + + def generate_basic(self): + staritem = self.create_item("Power Star") + if(self.world.EnablePurpleCoinStars[self.player].value): + self.world.itempool += [staritem for i in range(0,120)] + else: + self.world.itempool += [staritem for i in range(0,104)] + + grandstar1 = self.create_item("Grand Star Terrace") + grandstar2 = self.create_item("Grand Star Fountain") + grandstar3 = self.create_item("Grand Star Kitchen") + grandstar4 = self.create_item("Grand Star Bedroom") + grandstar5 = self.create_item("Grand Star Engine Room") + self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] + \ No newline at end of file diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index a40edecafc0..cdfa8fb3869 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -1,5 +1,5 @@ from ..generic.Rules import add_rule, set_rule -from .Regions import smgcourses, connect_regions +from .regions import smgcourses, connect_regions def set_rules(world, player: int): def smg_gate_open(self, player: int): From 8b4caabec9caa44d458223f151fc419142196326 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Fri, 2 Sep 2022 20:31:00 -0500 Subject: [PATCH 29/71] Game was reconized! --- worlds/galaxy/Options.py | 6 ++-- worlds/galaxy/__init__.py | 9 ++++-- worlds/galaxy/items.py | 1 + worlds/galaxy/regions.py | 8 ++---- worlds/galaxy/rules.py | 59 ++++++++++++++++++++------------------- 5 files changed, 43 insertions(+), 40 deletions(-) diff --git a/worlds/galaxy/Options.py b/worlds/galaxy/Options.py index 32550fc0698..a97eb9a2226 100644 --- a/worlds/galaxy/Options.py +++ b/worlds/galaxy/Options.py @@ -1,12 +1,12 @@ import typing -from Options import Choice, Option, Toggle, DefaultOnToggle, Range, OptionList, DefaultOffToggle +from Options import Choice, Option, Toggle, DefaultOnToggle, Range, OptionList -class EnablePurpleCoinStars(DefaultOffToggle): +class EnablePurpleCoinStars(Toggle): """tuning this on we allow purple coin stars to count as checks do note all purple coin stars are postgame only.""" display_name = "Enable Purple Coin Stars" -smg_options: typing.Dict[str, Type(Toggle)] = { +smg_options: typing.Dict[str, type(Toggle)] = { "EnablePurpleCoinStars": EnablePurpleCoinStars, } diff --git a/worlds/galaxy/__init__.py b/worlds/galaxy/__init__.py index f047a12b89c..60bef5cad78 100644 --- a/worlds/galaxy/__init__.py +++ b/worlds/galaxy/__init__.py @@ -4,7 +4,7 @@ from .Options import smg_options from .rules import set_rules from .regions import smgcourses, create_regions -from BaseClasses import Item, Tutorial, Classification +from BaseClasses import Item, Tutorial from ..AutoWorld import World, WebWorld client_version = 1 @@ -49,11 +49,14 @@ def create_item(self, name: str) -> Item: return item def generate_basic(self): + gstaritem = self.create_item("Green Star") + self.world.itempool += [gstaritem for i in range(0,3)] + staritem = self.create_item("Power Star") if(self.world.EnablePurpleCoinStars[self.player].value): - self.world.itempool += [staritem for i in range(0,120)] + self.world.itempool += [staritem for i in range(0,117)] else: - self.world.itempool += [staritem for i in range(0,104)] + self.world.itempool += [staritem for i in range(0,101)] grandstar1 = self.create_item("Grand Star Terrace") grandstar2 = self.create_item("Grand Star Fountain") diff --git a/worlds/galaxy/items.py b/worlds/galaxy/items.py index d30b3fe434d..391d927777f 100644 --- a/worlds/galaxy/items.py +++ b/worlds/galaxy/items.py @@ -11,4 +11,5 @@ class SMGItem(Item): "Grand Star Kitchen": 8013, "Grand Star Bedroom": 8014, "Grand Star Engine Room": 8015, + "Green Star": 8016, } \ No newline at end of file diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py index 07ead44c7ec..14f4979fe5d 100644 --- a/worlds/galaxy/regions.py +++ b/worlds/galaxy/regions.py @@ -3,7 +3,7 @@ from BaseClasses import MultiWorld, Region, Location, RegionType from .locations import SMGLocation, location_table, locHH_table, locGE_table, \ locSJ_table, locBR_table, locBB_table, \ -locGG_table, locFF_table, locDD_table, locDDune, \ +locGG_table, locFF_table, locDD_table, locDDune_table, \ locspecialstages_table, locbosses_table, \ locGL_table, locSS_table, locTT_table, \ locDN_table, locMM_table, locHL_table \ @@ -15,11 +15,7 @@ "Gold Leaf", "Sea Slide", "Toy Time", "Bonefin", "Bowser Jr.'s Lava Reactor", "Gateway", "Deep Dark", "Dreadnaught", "Melty Molton", "Matter Splatter"] -def create_regions(world, MultiWorld, player, int): - regSS = Region("Menu", RegionType.Generic, "Comment Obserbatory", player, world) - locspecialstages_names = [name for name, id in locSS_table.items()] - regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] - world.regions.append(regSS) +def create_regions(world: MultiWorld, player: int): # defines the good egg galaxy region regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py index cdfa8fb3869..bd06cbddfee 100644 --- a/worlds/galaxy/rules.py +++ b/worlds/galaxy/rules.py @@ -13,6 +13,9 @@ def smg_purple_coins(self, player: int): def smg_can_get_comet(self, player: int): return self.has('Power Star 13') + + def smg_trail(self, player: int): + return self.has('Green Star 3') # main stage logic connect_regions(world, player, "Menu", "Good Egg", lambda state: True) @@ -36,30 +39,30 @@ def smg_can_get_comet(self, player: int): # special stages logic set_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player, 5)) set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player, 7)) - set_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player, 11) and state.has("Grand Star Terrace")) - set_rule(world.get_location("HS: Shrinking Satellite", player), lambda state: state.has ("Power Star", player, 18) and state.has("Grand Star Terrace")) - set_rule(world.get_location("BUB: Through the Poison Swamp", player), lambda state: state.has ("Power Star", player, 19) and state.has("Grand Star Fountain")) - set_rule(world.get_location("BB: The Secret of Buoy Base", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) - set_rule(world.get_location("BB: The Floating Fortress", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain") and state.has("Grand Star Terrace")) - set_rule(world.get_location("GG: Gateway's Purple coins", player), lambda state: state.has("Grand Star Engine Room")) - set_rule(world.get_location("BF: Kingfin's Fearsome Waters", player), lambda state: state.has("Power Star", player, 55) and state.has("Grand Star Bedroom")) - set_rule(world.get_location("MS: Watch Your Step", player), lambda state: state.has("Power Star", player, 50) and state.has("Grand Star Engine Room", player) and state.has("Grand Star Bedroom")) + set_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player, 11) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("HS: Shrinking Satellite", player), lambda state: state.has ("Power Star", player, 18) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("BUB: Through the Poison Swamp", player), lambda state: state.has ("Power Star", player, 19) and state.has("Grand Star Fountain", player)) + set_rule(world.get_location("BB: The Secret of Buoy Base", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("BB: The Floating Fortress", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("GG: Gateway's Purple coins", player), lambda state: state.has("Grand Star Engine Room", player)) + set_rule(world.get_location("BF: Kingfin's Fearsome Waters", player), lambda state: state.has("Power Star", player, 55) and state.has("Grand Star Bedroom", player)) + set_rule(world.get_location("MS: Watch Your Step", player), lambda state: state.has("Power Star", player, 50) and state.has("Grand Star Engine Room", player) and state.has("Grand Star Bedroom", player)) set_rule(world.get_location("DDR: Giant Eel Breakout", player), lambda state: state.has("Grand Star Fountain", player)) - set_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) - set_rule(world.get_location("BBT: The Electric Labyrinth", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen")) + set_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.smg_trail(player)) + set_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) + set_rule(world.get_location("BBT: The Electric Labyrinth", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) set_rule(world.get_location("SS: Rocky Road", player), lambda state: state.has("Power Star", player, 7)) set_rule(world.get_location("SP: A Very Sticky Situation", player), lambda state: state.has("Grand Star Terrace", player) and state.has("Power Star", player, 9)) set_rule(world.get_location("BM: Bigmouth's Gold Bait", player), lambda state: state.has("Grand Star Kitchen", player) and state.has("Power Star", player, 29)) - set_rule(world.get_location("SS: Choosing a Favorite Snack", player), lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain")) + set_rule(world.get_location("SS: Choosing a Favorite Snack", player), lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain", player)) set_rule(world.get_location("BB: Racing the Spooky Speedster", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) set_rule(world.get_location("SC: Star Bunnies in the Snow", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) # comet logic add_rule(world.get_location("GE: Dino Piranha Speed Run", player), lambda state: state.has("Power Star", player, 13)) add_rule(world.get_location("HH: Honeyhive Cosmic Mario Race", player), lambda state: state.has("Power Star", player, 13)) add_rule(world.get_location("SJ: Pull Star Path Speed Run", player), lambda state: state.has("Power Star", player, 13)) - add_rule(world.get_location("BR: Topmanic's Dardevil Run", player), lambda state: state.smg_can_get_comet) - add_rule(world.get_location("BB: Fast Foes on the Cyclone Stone", player), lambda state: state.smg_can_get_comet) + add_rule(world.get_location("BR: Topmanic's Dardevil Run", player), lambda state: state.smg_can_get_comet(player)) + add_rule(world.get_location("BB: Fast Foes on the Cyclone Stone", player), lambda state: state.smg_can_get_comet(player)) # boss stage logic set_rule(world.get_location("BJ: Megaleg's Moon", player), lambda state: state.has("Power Star", player, 8)) set_rule(world.get_location("B: The Firery Stronghold", player), lambda state: state.has("Power Star", player, 15) and state.has("Grand Star Terrace", player)) @@ -68,18 +71,18 @@ def smg_can_get_comet(self, player: int): set_rule(world.get_location("B: Darkness on the Horizon", player), lambda state: state.has("Power Star", player, 33) and state.has("Grand Star Kitchen", player)) # purple coin star logic if world.EnablePurpleCoinStars[player]: - add_rule(world.get_location("DN: Battlestation's Purple Coins", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("MM: Red-Hot Purple Coins", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("TT: Luigi's Purple Coins", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("DD: Plunder the Purple Coins", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("GL: Purple Coins in the Woods", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("FF: Purple Coins on the Summit", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("SS: Purple Coins by the Seaside", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("GG: Purple Coins on the Puzzle Cube", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("G: Purple Coins in the Bone Pen", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("DDune: Purple Coin in the Desert", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("BR: Purple Coins on the Battlerock", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("GE: Purple Coin Omelet", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("HH: Honeyhive's Purple Coins", player), lambda state: state.smg_purple_coins) - add_rule(world.get_location("SJ: Purple Coin Spacewalk", player), lambda state: state.smg_purple_coins) + add_rule(world.get_location("DN: Battlestation's Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("MM: Red-Hot Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("TT: Luigi's Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("DD: Plunder the Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("GL: Purple Coins in the Woods", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("FF: Purple Coins on the Summit", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("SS: Purple Coins by the Seaside", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("GG: Purple Coins on the Puzzle Cube", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("G: Purple Coins in the Bone Pen", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("DDune: Purple Coin in the Desert", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("BR: Purple Coins on the Battlerock", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("GE: Purple Coin Omelet", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("HH: Honeyhive's Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("SJ: Purple Coin Spacewalk", player), lambda state: state.smg_purple_coins(player)) \ No newline at end of file From 4744f082178ceccb5e845ae7d56f258862492d7a Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Sep 2022 10:32:35 -0500 Subject: [PATCH 30/71] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c8362dddd0a..9daa775e549 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Currently, the following games are supported: * Rogue Legacy * VVVVVV * Raft +* Super Mario Galaxy * Super Mario 64 * Meritous * Super Metroid/Link to the Past combo randomizer (SMZ3) From 120b0bda03ad3248aa4f984ac81d8038d78b19f9 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Sep 2022 11:50:44 -0500 Subject: [PATCH 31/71] Add files via upload --- worlds/smgalaxy/Options.py | 12 +++ worlds/smgalaxy/__init__.py | 67 ++++++++++++++ worlds/smgalaxy/items.py | 15 ++++ worlds/smgalaxy/locations.py | 166 +++++++++++++++++++++++++++++++++++ worlds/smgalaxy/regions.py | 80 +++++++++++++++++ worlds/smgalaxy/rules.py | 88 +++++++++++++++++++ 6 files changed, 428 insertions(+) create mode 100644 worlds/smgalaxy/Options.py create mode 100644 worlds/smgalaxy/__init__.py create mode 100644 worlds/smgalaxy/items.py create mode 100644 worlds/smgalaxy/locations.py create mode 100644 worlds/smgalaxy/regions.py create mode 100644 worlds/smgalaxy/rules.py diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py new file mode 100644 index 00000000000..21900499567 --- /dev/null +++ b/worlds/smgalaxy/Options.py @@ -0,0 +1,12 @@ +import typing +from Options import Choice, Option, Toggle, DefaultOnToggle, Range, OptionList + + +class EnablePurpleCoinStars(DefaultOnToggle): + """tuning this off we allow purple coin stars to count as checks do note all purple coin stars are postgame only but one.""" + display_name = "Disable Purple Coin Stars" + +smg_options: typing.Dict[str, type(DefaultOnToggle)] = { + "EnablePurpleCoinStars": EnablePurpleCoinStars, + +} diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py new file mode 100644 index 00000000000..60bef5cad78 --- /dev/null +++ b/worlds/smgalaxy/__init__.py @@ -0,0 +1,67 @@ +import string +from .items import item_table, SMGItem +from .locations import location_table, SMGLocation +from .Options import smg_options +from .rules import set_rules +from .regions import smgcourses, create_regions +from BaseClasses import Item, Tutorial +from ..AutoWorld import World, WebWorld + +client_version = 1 + + +class SM64Web(WebWorld): + tutorials = [Tutorial( + "Multiworld Setup Guide", + "A guide to setting up SMG for MultiWorld.", + "English", + "setup_en.md", + "setup/en", + ["squidy"] + )] +class SuperMarioGalaxy(World): + """ + Super Mario Galaxy allows you to explore the cosomos with rosalinna in the comet obserbatory. + Mario must collect Power Stars and Grand Stars to power the obserbatory so it can go to the + center of the universe in order to save peach. + """ + + game: str = "Super Mario Galaxy" + topology_present = False + + item_name_to_id = item_table + location_name_to_id = location_table + + data_version = 1 + forced_auto_forfeit = False + + options = smg_options + + def create_regions(self): + create_regions(self.world,self.player) + + def set_rules(self): + set_rules(self.world, self.player) + + def create_item(self, name: str) -> Item: + item_id = item_table[name] + item = SMGItem(name, True, item_id, self.player) + return item + + def generate_basic(self): + gstaritem = self.create_item("Green Star") + self.world.itempool += [gstaritem for i in range(0,3)] + + staritem = self.create_item("Power Star") + if(self.world.EnablePurpleCoinStars[self.player].value): + self.world.itempool += [staritem for i in range(0,117)] + else: + self.world.itempool += [staritem for i in range(0,101)] + + grandstar1 = self.create_item("Grand Star Terrace") + grandstar2 = self.create_item("Grand Star Fountain") + grandstar3 = self.create_item("Grand Star Kitchen") + grandstar4 = self.create_item("Grand Star Bedroom") + grandstar5 = self.create_item("Grand Star Engine Room") + self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] + \ No newline at end of file diff --git a/worlds/smgalaxy/items.py b/worlds/smgalaxy/items.py new file mode 100644 index 00000000000..1a7abd70f0a --- /dev/null +++ b/worlds/smgalaxy/items.py @@ -0,0 +1,15 @@ +from BaseClasses import Item + + +class SMGItem(Item): + game: str = "Super Mario Galaxy" + +item_table = { + "Power Star": 170000000, + "Grand Star Terrace": 170000001, + "Grand Star Fountain": 170000002, + "Grand Star Kitchen": 170000003, + "Grand Star Bedroom": 170000004, + "Grand Star Engine Room": 170000005, + "Green Star": 170000006, +} \ No newline at end of file diff --git a/worlds/smgalaxy/locations.py b/worlds/smgalaxy/locations.py new file mode 100644 index 00000000000..f6e9c919586 --- /dev/null +++ b/worlds/smgalaxy/locations.py @@ -0,0 +1,166 @@ +from BaseClasses import Location + +class SMGLocation(Location): + game: str = "Super Mario Galaxy" + +locGE_table = { + "GE: Dino Piranha": 170000000, + "GE: A Snack of Cosmic Proportions": 170000001, + "GE: King Kaliente's Battle Fleet": 170000002, + "GE: Luigi on the Roof": 170000003, + "GE: Dino Piranha Speed Run": 170000004, + "GE: Purple Coin Omelet": 170000005, +} +locHH_table = { + "HH: Bee Mario Takes Flight": 170000006, + "HH: Trouble on the Tower": 170000007, + "HH: Big Bad Bugabooom": 170000008, + "HH: Luigi in the Honeyhive Kingdom": 170000011, + "HH: Honeyhive Cosmic Mario Race": 170000009, + "HH: Honeyhive's Purple Coins": 170000010, +} +locspecialstages_table ={ + "LDL: Surfing 101": 170000012, + "FS: Painting the Planet Yellow": 170000013, + "RG: Rolling in the Clouds": 170000028, + "HS: Shrinking Satellite": 170000029, + "BUB: Through the Poison Swamp": 170000043, + "BB: The Floating Fortress": 170000044, + "BB: The Secret of Buoy Base": 170000045, + "GG: Grand Star Rescue": 170000047, + "GG: Gateway's Purple coins": 170000048, + "BF: Kingfin's Fearsome Waters": 170000067, + "MS: Watch Your Step": 170000095, + "RGT: Gizmos, Gears, and Gadgets": 170000096, + "LDT: The Galaxy's Greatest Wave": 170000097, + "BBT: The Electric Labyrinth": 170000098, +} +locbosses_table = { + "BJ: Megaleg's Moon": 170000014, + "B: The Firery Stronghold": 170000030, + "BJ: Sinking the Airships": 170000045, + "BJ: King Kaliente's Spicy Return": 170000067, + "B: Darkness on the Horizon": 170000095, +} + +locSJ_table = { + "SJ: Pull Star Path": 170000015, + "SJ: Kamella's Airship Attack": 170000016, + "SJ: Tarantox's Tangled Web": 170000017, + "SJ: Yoshi's Unexpected Apparence": 170000020, + "SJ: Pull Star Path Speed Run": 170000018, + "SJ: Purple Coin Spacewalk": 170000019, +} +locBR_table = { + "BR: Battlerock Barrage": 170000021, + "BR: Breaking into the Battlerock": 170000022, + "BR: Topmaniac's Garbage dump": 170000023, + "BR: Topmanic's Dardevil Run": 170000025, + "BR: Purple Coins on the Battlerock": 170000026, + "BR: Luigi under the Saucer": 170000027, +} +locBB_table = { + "BB: Sunken Treasure": 170000031, + "BB: Passing the Swim Test": 170000032, + "BB: The Secret Undersea Cavern": 170000033, + "BB: Fast Foes on the Cyclone Stone": 170000034, + "BB: Beachcombing for Purple Coins": 170000035, + "BB: Wall Jumping Water Falls": 170000036, +} +locG_table = { + "G: Luigi and the Haunted Mansion": 170000037, + "G: A Very Spooky Spirit": 170000038, + "G: Beware of Bouldergeist": 170000039, + "G: Bouldergeist's Daredevil Run": 170000040, + "G: Purple Coins in the Bone Pen": 170000041, + "G: Matter Splatter Mansion": 170000042, +} +locGG_table = { + "GG: Bunnies in the Wind": 170000108, + "GG: The Dirty Tricks of Major Burrows": 170000109, + "GG: Gusty Garden's Gravity Scramble": 170000110, + "GG: Major Burrows's Daredevil Run": 170000111, + "GG: Purple Coins on the Puzzle Cube": 170000112, + "GG: The Golden Chomp": 170000113, +} +locFF_table = { + "FF: The Frozen Peak of Baron Brr": 170000095, + "FF: Freezeflame's Blistering Coore": 170000096, + "FF: Hot and Cold Collide": 170000097, + "FF: Conquring the Summit": 170000100, + "FF: Frosty Cosmic Mario race": 170000098, + "FF: Purple Coins on the Summit": 170000099, +} +locDDune_table = { + "DDune: Soaring on the Desert Winds": 170000101, + "DDune: Blasting through the Sand": 170000102, + "DDune: Sunbaked Sand Castle": 170000103, + "DDune: Purple Coin in the Desert": 170000105, + "DDune: Bullet Bill on Your Back": 170000106, + "DDune: Bullet Bill on Your Back": 170000106, + "DDune: Treasure of the Pyramid": 170000107, +} +locGL_table = { + "GL: Star Bunnies on the Hunt": 170000049, + "GL: Cataquack to the skies": 170000050, + "GL: When it Rains, it Pours": 170000051, + "GL: Cosmic Mario Forest Race": 170000052, + "GL: Purple Coins in the Woods": 170000053, + "GL: The Bell on the Big Trees": 170000054, + } +locSS_table = { + "SS: Going After Guppy": 170000055, + "SS: Faster Than a Speedrunning Penguin": 170000056, + "SS: The Silver Stars of Sea Slide": 170000057, + "SS: Underwater Cosmic Mario Race": 170000058, + "SS: Purple Coins by the Seaside": 170000059, + "SS: Hurry, He's Hungry": 170000060, +} +locTT_table = { + "TT: Heavy Metal Mecha Boswer": 170000061, + "TT: Mario (or Luigi) Meets Mario": 170000062, + "TT: Bouncing Down Cake Lane": 170000063, + "TT: The Flipswitch Chain": 170000064, + "TT: Fast Foes of Toy Time": 170000067, + "TT: Luigi's Purple Coins": 170000065, +} +locDD_table = { + "DD: The Underground Ghost Ship": 170000069, + "DD: Bubble Blastoff": 170000070, + "DD: Guppy and the Underground Lake": 170000071, + "DD: Ghost Ship Daredevil Run": 170000072, + "DD: Plunder the Purple Coins": 170000073, + "DD: Boo in Box": 170000074, +} +locDN_table = { + "DN: Inflitrating the Dreadnought": 170000075, + "DN: Dreanought's Colossal Cannons": 170000076, + "DN: Revenge of the Topman Tribe": 170000077, + "DN: Topman Tribe Speed Run": 170000078, + "DN: Battlestation's Purple Coins": 170000079, + "DN: Dreadnought's Garbage Dump": 170000080, +} +locMM_table = { + "MM: The Sinking Lava Spire": 170000081, + "MM: Through the Meteor Storm": 170000082, + "MM: Fiery Dino Piranha": 170000083, + "MM: Lava Spire Daredevil Run": 170000084, + "MM: Red-Hot Purple Coins": 170000085, + "MM Burning Tide": 170000086, +} +locHL_table = { + "SS: Rocky Road": 170000088, + "SP: A Very Sticky Situation": 170000089, + "DDR: Giant Eel Breakout": 170000090, + "BM: Bigmouth's Gold Bait": 170000091, + "SS: Choosing a Favorite Snack": 170000092, + "BB: Racing the Spooky Speedster": 170000093, + "SC: Star Bunnies in the Snow": 170000094, +} +location_table = { **locGE_table,**locHH_table, \ + **locSJ_table,**locBR_table,**locBB_table, \ + **locGG_table,**locFF_table,**locDDune_table, \ + **locGL_table,**locSS_table,**locTT_table, \ + **locDD_table,**locDN_table,**locMM_table, \ + **locHL_table,**locspecialstages_table,**locbosses_table, \ +} diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py new file mode 100644 index 00000000000..66c7e0d9aa6 --- /dev/null +++ b/worlds/smgalaxy/regions.py @@ -0,0 +1,80 @@ +import imp +import typing +from BaseClasses import MultiWorld, Region, Location, RegionType +from .locations import SMGLocation, location_table, locHH_table, locGE_table, \ +locSJ_table, locBR_table, locBB_table, \ +locGG_table, locFF_table, locDD_table, locDDune_table, \ +locspecialstages_table, locbosses_table, \ +locGL_table, locSS_table, locTT_table, \ +locDN_table, locMM_table, locHL_table \ + +smgcourses = ["Good Egg", "Honeyhive", "Loopdeeloop", "Flipswitch", "Bowser Jr. Robot Reactor", + "Space Junk", "Battlerock", "Rolling Green", "Hurry-Scurry", "Bowser's Star Reactor", + "Beach Bowl", "Ghostly", "Bubble Breeze", "Buoy Base", "Bowser Jr.'s Ariship Armada", + "Gusty gardens", "Freezeflame", "Dusty Dune", "Honeyclimb", "Bowser's Dark Matter Planet", + "Gold Leaf", "Sea Slide", "Toy Time", "Bonefin", "Bowser Jr.'s Lava Reactor", + "Gateway", "Deep Dark", "Dreadnaught", "Melty Molton", "Matter Splatter"] + +def create_regions(world: MultiWorld, player: int): + + #defines the commet obserbatory + regSS = Region("Menu", RegionType.Generic, "Comment Obserbatory", player, world) + locSpecialstages_names = [name for name, id in locSS_table.items()] + regSpecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSpecialstages) for loc_name in locSpecialstages_names] + world.regions.append(regspecialstages) + # defines the good egg galaxy region + regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) + locGE_names = [name for name, id in locGE_table.items()] + regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] + world.regions.append(regGE) + # defines the honeyhive galaxey region + regHH = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, world) + locHH_names = [name for name, id in locHH_table.items()] + regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] + # defines the Space Junk galaxy region + regSJ = Region("Space Junk", RegionType.Generic, "Space Junk", player, world) + locSJ_names = [name for name, id in locSJ_table.items()] + regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] + # defines the Battlerock galaxy + regBR = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) + locBR_names = [name for name, id in locBR_table.items()] + regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] + # defines the Beach Bowl galaxy + regBB = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) + locBB_names = [name for name, id in locBB_table.items()] + regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] + # define Ghostly galaxy + regG = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) + locG_names = [name for name, id in locGG_table.items()] + regG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regG) for loc_name in locG_names] + # defines the Gusty Gardens galaxy + regGG = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) + locGG_names = [name for name, id in locGG_table.items()] + regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] + # defines Freezeflame galaxy + regFF = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) + locFF_names = [name for name, id in locFF_table.items()] + regFF.locations += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] + # defines golden leaf galaxy + regGL = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) + locGL_names = [name for name, id in locGL_table.items()] + regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] + # defines toy time galaxy + regTT = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) + locTT_names = [name for name, id in locTT_table.items()] + regTT.locations += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] + # defines deep dark galaxy + regDD = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, world) + locDD_names = [name for name, id in locDD_table.items()] + regDD.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] + # defines Dreadnought galaxy + regDN = Region("Dreadnought", RegionType.Generic, "Dreadnought", player, world) + locDN_names = [name for name, id in locDN_table.items()] + regDN.locations += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] + # defines Melty Molten galaxy + regMM = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) + locMM_names = [name for name, id in locMM_table.items()] + regMM.locations += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] +def connect_regions(world: MultiWorld, player: int, source: str, target: str, rule): + sourceRegion = world.get_region(source, player) + targetRegion = world.get_region(target, player) diff --git a/worlds/smgalaxy/rules.py b/worlds/smgalaxy/rules.py new file mode 100644 index 00000000000..22edb4eddcd --- /dev/null +++ b/worlds/smgalaxy/rules.py @@ -0,0 +1,88 @@ +from ..generic.Rules import add_rule, set_rule +from .regions import smgcourses, connect_regions +def set_rules(world, player: int): + + def smg_gate_open(self, player: int): + return self.has('Grand Star Engine Room', player) + + def smg_can_finish(self, player: int): + return self.has('Power Star 60') and self.has('Grand Star Bedroom') + + def smg_purple_coins(self, player: int): + return self.has('Power Star 60') and self.has('Grand Star Bedroom') and self.has('Grand Star Engine Room', player) + + def smg_can_get_comet(self, player: int): + return self.has('Power Star 13') + + def smg_trail(self, player: int): + return self.has('Green Star 3') + + # main stage logic + connect_regions(world, player, "Menu", "Good Egg", lambda state: True) + connect_regions(world, player, "Menu", "Honeyhive", lambda state: state.has("Power Star", player, 3)) + connect_regions(world, player, "Menu", "Fountain", lambda state: state.has("Grand Star Terrace", player)) + connect_regions(world, player, "Fountain", "Space Junk", lambda state: state.has("Power Star", player, 9)) + connect_regions(world, player, "Fountain", "Space Junk", lambda state: state.has("Power Star", player, 12)) + connect_regions(world, player, "Menu", "Kitchen", lambda state: state.has("Grand Star Fountain", player)) + connect_regions(world, player, "Kitchen", "Beach Bowl", lambda state: state.has("Power Star", player, 18)) + connect_regions(world, player, "Kitchen", "Ghostly", lambda state: state.has("Power Star", player, 20)) + connect_regions(world, player, "Kitchen", "Bedroom", lambda state: state.has("Grand Star Kitchen", player)) + connect_regions(world, player, "Bedroom" "Gusty Gardens", lambda state: state.has("Power Star", player, 24)) + connect_regions(world, player, "Bedroom" "Freezeflame", lambda state: state.has("Power Star", player, 26)) + connect_regions(world, player, "Menu", "Engine Room", lambda state: state.has("Grand Star Bedroom", player)) + connect_regions(world, player, "Engine Room", "Gold Leaf", lambda state: state.has("Power Star", player, 34)) + connect_regions(world, player, "Engine Room", "Toy Time", lambda state: state.has("Power Star", player, 40)) + connect_regions(world, player, "Menu", "Garden", lambda state: state.has("Grand Star Engine Room", player)) + connect_regions(world, player, "Garden" "Deep Dark", lambda state: state.has("Power Star", player, 46)) + connect_regions(world, player, "Garden" "Dreadnaught", lambda state: state.has("Power Star", player, 48)) + connect_regions(world, player, "Garden" "Melty Molten", lambda state: state.has("Power Star", player, 52)) + # special stages logic + set_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player, 5)) + set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player, 7)) + set_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player, 11) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("HS: Shrinking Satellite", player), lambda state: state.has ("Power Star", player, 18) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("BUB: Through the Poison Swamp", player), lambda state: state.has ("Power Star", player, 19) and state.has("Grand Star Fountain", player)) + set_rule(world.get_location("BB: The Secret of Buoy Base", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("BB: The Floating Fortress", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("GG: Gateway's Purple coins", player), lambda state: state.has("Grand Star Engine Room", player)) + set_rule(world.get_location("BF: Kingfin's Fearsome Waters", player), lambda state: state.has("Power Star", player, 55) and state.has("Grand Star Bedroom", player)) + set_rule(world.get_location("MS: Watch Your Step", player), lambda state: state.has("Power Star", player, 50) and state.has("Grand Star Engine Room", player) and state.has("Grand Star Bedroom", player)) + set_rule(world.get_location("DDR: Giant Eel Breakout", player), lambda state: state.has("Grand Star Fountain", player)) + set_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.smg_trail(player)) + set_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) + set_rule(world.get_location("BBT: The Electric Labyrinth", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) + set_rule(world.get_location("SS: Rocky Road", player), lambda state: state.has("Power Star", player, 7)) + set_rule(world.get_location("SP: A Very Sticky Situation", player), lambda state: state.has("Grand Star Terrace", player) and state.has("Power Star", player, 9)) + set_rule(world.get_location("BM: Bigmouth's Gold Bait", player), lambda state: state.has("Grand Star Kitchen", player) and state.has("Power Star", player, 29)) + set_rule(world.get_location("SS: Choosing a Favorite Snack", player), lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain", player)) + set_rule(world.get_location("BB: Racing the Spooky Speedster", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) + set_rule(world.get_location("SC: Star Bunnies in the Snow", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) + # comet logic + add_rule(world.get_location("GE: Dino Piranha Speed Run", player), lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("HH: Honeyhive Cosmic Mario Race", player), lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("SJ: Pull Star Path Speed Run", player), lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("BR: Topmanic's Dardevil Run", player), lambda state: state.smg_can_get_comet(player)) + add_rule(world.get_location("BB: Fast Foes on the Cyclone Stone", player), lambda state: state.smg_can_get_comet(player)) + # boss stage logic + set_rule(world.get_location("BJ: Megaleg's Moon", player), lambda state: state.has("Power Star", player, 8)) + set_rule(world.get_location("B: The Firery Stronghold", player), lambda state: state.has("Power Star", player, 15) and state.has("Grand Star Terrace", player)) + set_rule(world.get_location("BJ: Sinking the Airships", player), lambda state: state.has("Power Star", player, 23) and state.has("Grand Star Fountain", player)) + set_rule(world.get_location("BJ: King Kaliente's Spicy Return", player), lambda state: state.has("Power Star", player, 45) and state.has("Grand Star Engine Room", player)) + set_rule(world.get_location("B: Darkness on the Horizon", player), lambda state: state.has("Power Star", player, 33) and state.has("Grand Star Kitchen", player)) + # purple coin star logic + if world.EnablePurpleCoinStars[player]: + add_rule(world.get_location("DN: Battlestation's Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("MM: Red-Hot Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("TT: Luigi's Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("DD: Plunder the Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("GL: Purple Coins in the Woods", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("FF: Purple Coins on the Summit", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("SS: Purple Coins by the Seaside", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("GG: Purple Coins on the Puzzle Cube", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("G: Purple Coins in the Bone Pen", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("DDune: Purple Coin in the Desert", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("BR: Purple Coins on the Battlerock", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("GE: Purple Coin Omelet", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("HH: Honeyhive's Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("SJ: Purple Coin Spacewalk", player), lambda state: state.smg_purple_coins(player)) + \ No newline at end of file From 39a306ad27e58b19ee9b3dc8ea54d6b99a64b1e6 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Sep 2022 18:56:49 -0500 Subject: [PATCH 32/71] moving folder 1 --- worlds/galaxy/Options.py | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 worlds/galaxy/Options.py diff --git a/worlds/galaxy/Options.py b/worlds/galaxy/Options.py deleted file mode 100644 index a97eb9a2226..00000000000 --- a/worlds/galaxy/Options.py +++ /dev/null @@ -1,12 +0,0 @@ -import typing -from Options import Choice, Option, Toggle, DefaultOnToggle, Range, OptionList - - -class EnablePurpleCoinStars(Toggle): - """tuning this on we allow purple coin stars to count as checks do note all purple coin stars are postgame only.""" - display_name = "Enable Purple Coin Stars" - -smg_options: typing.Dict[str, type(Toggle)] = { - "EnablePurpleCoinStars": EnablePurpleCoinStars, - -} From 4aee767127a3672c967810ff492ab6bad08e2558 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Sep 2022 18:57:03 -0500 Subject: [PATCH 33/71] moving folder 2 --- worlds/galaxy/__init__.py | 67 --------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 worlds/galaxy/__init__.py diff --git a/worlds/galaxy/__init__.py b/worlds/galaxy/__init__.py deleted file mode 100644 index 60bef5cad78..00000000000 --- a/worlds/galaxy/__init__.py +++ /dev/null @@ -1,67 +0,0 @@ -import string -from .items import item_table, SMGItem -from .locations import location_table, SMGLocation -from .Options import smg_options -from .rules import set_rules -from .regions import smgcourses, create_regions -from BaseClasses import Item, Tutorial -from ..AutoWorld import World, WebWorld - -client_version = 1 - - -class SM64Web(WebWorld): - tutorials = [Tutorial( - "Multiworld Setup Guide", - "A guide to setting up SMG for MultiWorld.", - "English", - "setup_en.md", - "setup/en", - ["squidy"] - )] -class SuperMarioGalaxy(World): - """ - Super Mario Galaxy allows you to explore the cosomos with rosalinna in the comet obserbatory. - Mario must collect Power Stars and Grand Stars to power the obserbatory so it can go to the - center of the universe in order to save peach. - """ - - game: str = "Super Mario Galaxy" - topology_present = False - - item_name_to_id = item_table - location_name_to_id = location_table - - data_version = 1 - forced_auto_forfeit = False - - options = smg_options - - def create_regions(self): - create_regions(self.world,self.player) - - def set_rules(self): - set_rules(self.world, self.player) - - def create_item(self, name: str) -> Item: - item_id = item_table[name] - item = SMGItem(name, True, item_id, self.player) - return item - - def generate_basic(self): - gstaritem = self.create_item("Green Star") - self.world.itempool += [gstaritem for i in range(0,3)] - - staritem = self.create_item("Power Star") - if(self.world.EnablePurpleCoinStars[self.player].value): - self.world.itempool += [staritem for i in range(0,117)] - else: - self.world.itempool += [staritem for i in range(0,101)] - - grandstar1 = self.create_item("Grand Star Terrace") - grandstar2 = self.create_item("Grand Star Fountain") - grandstar3 = self.create_item("Grand Star Kitchen") - grandstar4 = self.create_item("Grand Star Bedroom") - grandstar5 = self.create_item("Grand Star Engine Room") - self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] - \ No newline at end of file From ee47efce168d89f1ebee12db0adcfb2a40ae9f36 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Sep 2022 18:57:14 -0500 Subject: [PATCH 34/71] moving folder 3 --- worlds/galaxy/__int__.py | 54 ---------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 worlds/galaxy/__int__.py diff --git a/worlds/galaxy/__int__.py b/worlds/galaxy/__int__.py deleted file mode 100644 index 0053c7371ef..00000000000 --- a/worlds/galaxy/__int__.py +++ /dev/null @@ -1,54 +0,0 @@ -import string -from .items import item_table, SMGItem -from .locations import location_table, SMGLocation -from .Options import smg_options -from .rules import set_rules -from .regions import smgcourses, create_regions -from BaseClasses import Region, RegionType, Entrance, Item, MultiWorld -from ..AutoWorld import World - -client_version = 1 - -class SuperMarioGalaxy(World): - """ - Super Mario Galaxy allows you to explore the cosomos with rosalinna in the comet obserbatory. - Mario must collect Power Stars and Grand Stars to power the obserbatory so it can go to the - center of the universe in order to save peach. - """ - - game: str = "Super Mario Galaxy" - topology_present = False - - item_name_to_id = item_table - location_name_to_id = location_table - - data_version = 1 - forced_auto_forfeit = False - - options = smg_options - - def create_regions(self): - create_regions(self.world,self.player) - - def set_rules(self): - set_rules(self.world, self.player) - - def create_item(self, name: str) -> Item: - item_id = item_table[name] - item = SMGItem(name, True, item_id, self.player) - return item - - def generate_basic(self): - staritem = self.create_item("Power Star") - if(self.world.EnablePurpleCoinStars[self.player].value): - self.world.itempool += [staritem for i in range(0,120)] - else: - self.world.itempool += [staritem for i in range(0,104)] - - grandstar1 = self.create_item("Grand Star Terrace") - grandstar2 = self.create_item("Grand Star Fountain") - grandstar3 = self.create_item("Grand Star Kitchen") - grandstar4 = self.create_item("Grand Star Bedroom") - grandstar5 = self.create_item("Grand Star Engine Room") - self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] - \ No newline at end of file From d6f5fc01ddd80c82a53ac4d746b22a048650f31a Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Sep 2022 18:57:33 -0500 Subject: [PATCH 35/71] moving folder 5 --- worlds/galaxy/items.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 worlds/galaxy/items.py diff --git a/worlds/galaxy/items.py b/worlds/galaxy/items.py deleted file mode 100644 index 391d927777f..00000000000 --- a/worlds/galaxy/items.py +++ /dev/null @@ -1,15 +0,0 @@ -from BaseClasses import Item - - -class SMGItem(Item): - game: str = "Super Mario Galaxy" - -item_table = { - "Power Star": 8010, - "Grand Star Terrace": 8011, - "Grand Star Fountain": 8012, - "Grand Star Kitchen": 8013, - "Grand Star Bedroom": 8014, - "Grand Star Engine Room": 8015, - "Green Star": 8016, -} \ No newline at end of file From beed48b333a78462abbb2f387e41841a891239f5 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Sep 2022 18:57:42 -0500 Subject: [PATCH 36/71] moving folder 6 --- worlds/galaxy/locations.py | 166 ------------------------------------- 1 file changed, 166 deletions(-) delete mode 100644 worlds/galaxy/locations.py diff --git a/worlds/galaxy/locations.py b/worlds/galaxy/locations.py deleted file mode 100644 index f6e9c919586..00000000000 --- a/worlds/galaxy/locations.py +++ /dev/null @@ -1,166 +0,0 @@ -from BaseClasses import Location - -class SMGLocation(Location): - game: str = "Super Mario Galaxy" - -locGE_table = { - "GE: Dino Piranha": 170000000, - "GE: A Snack of Cosmic Proportions": 170000001, - "GE: King Kaliente's Battle Fleet": 170000002, - "GE: Luigi on the Roof": 170000003, - "GE: Dino Piranha Speed Run": 170000004, - "GE: Purple Coin Omelet": 170000005, -} -locHH_table = { - "HH: Bee Mario Takes Flight": 170000006, - "HH: Trouble on the Tower": 170000007, - "HH: Big Bad Bugabooom": 170000008, - "HH: Luigi in the Honeyhive Kingdom": 170000011, - "HH: Honeyhive Cosmic Mario Race": 170000009, - "HH: Honeyhive's Purple Coins": 170000010, -} -locspecialstages_table ={ - "LDL: Surfing 101": 170000012, - "FS: Painting the Planet Yellow": 170000013, - "RG: Rolling in the Clouds": 170000028, - "HS: Shrinking Satellite": 170000029, - "BUB: Through the Poison Swamp": 170000043, - "BB: The Floating Fortress": 170000044, - "BB: The Secret of Buoy Base": 170000045, - "GG: Grand Star Rescue": 170000047, - "GG: Gateway's Purple coins": 170000048, - "BF: Kingfin's Fearsome Waters": 170000067, - "MS: Watch Your Step": 170000095, - "RGT: Gizmos, Gears, and Gadgets": 170000096, - "LDT: The Galaxy's Greatest Wave": 170000097, - "BBT: The Electric Labyrinth": 170000098, -} -locbosses_table = { - "BJ: Megaleg's Moon": 170000014, - "B: The Firery Stronghold": 170000030, - "BJ: Sinking the Airships": 170000045, - "BJ: King Kaliente's Spicy Return": 170000067, - "B: Darkness on the Horizon": 170000095, -} - -locSJ_table = { - "SJ: Pull Star Path": 170000015, - "SJ: Kamella's Airship Attack": 170000016, - "SJ: Tarantox's Tangled Web": 170000017, - "SJ: Yoshi's Unexpected Apparence": 170000020, - "SJ: Pull Star Path Speed Run": 170000018, - "SJ: Purple Coin Spacewalk": 170000019, -} -locBR_table = { - "BR: Battlerock Barrage": 170000021, - "BR: Breaking into the Battlerock": 170000022, - "BR: Topmaniac's Garbage dump": 170000023, - "BR: Topmanic's Dardevil Run": 170000025, - "BR: Purple Coins on the Battlerock": 170000026, - "BR: Luigi under the Saucer": 170000027, -} -locBB_table = { - "BB: Sunken Treasure": 170000031, - "BB: Passing the Swim Test": 170000032, - "BB: The Secret Undersea Cavern": 170000033, - "BB: Fast Foes on the Cyclone Stone": 170000034, - "BB: Beachcombing for Purple Coins": 170000035, - "BB: Wall Jumping Water Falls": 170000036, -} -locG_table = { - "G: Luigi and the Haunted Mansion": 170000037, - "G: A Very Spooky Spirit": 170000038, - "G: Beware of Bouldergeist": 170000039, - "G: Bouldergeist's Daredevil Run": 170000040, - "G: Purple Coins in the Bone Pen": 170000041, - "G: Matter Splatter Mansion": 170000042, -} -locGG_table = { - "GG: Bunnies in the Wind": 170000108, - "GG: The Dirty Tricks of Major Burrows": 170000109, - "GG: Gusty Garden's Gravity Scramble": 170000110, - "GG: Major Burrows's Daredevil Run": 170000111, - "GG: Purple Coins on the Puzzle Cube": 170000112, - "GG: The Golden Chomp": 170000113, -} -locFF_table = { - "FF: The Frozen Peak of Baron Brr": 170000095, - "FF: Freezeflame's Blistering Coore": 170000096, - "FF: Hot and Cold Collide": 170000097, - "FF: Conquring the Summit": 170000100, - "FF: Frosty Cosmic Mario race": 170000098, - "FF: Purple Coins on the Summit": 170000099, -} -locDDune_table = { - "DDune: Soaring on the Desert Winds": 170000101, - "DDune: Blasting through the Sand": 170000102, - "DDune: Sunbaked Sand Castle": 170000103, - "DDune: Purple Coin in the Desert": 170000105, - "DDune: Bullet Bill on Your Back": 170000106, - "DDune: Bullet Bill on Your Back": 170000106, - "DDune: Treasure of the Pyramid": 170000107, -} -locGL_table = { - "GL: Star Bunnies on the Hunt": 170000049, - "GL: Cataquack to the skies": 170000050, - "GL: When it Rains, it Pours": 170000051, - "GL: Cosmic Mario Forest Race": 170000052, - "GL: Purple Coins in the Woods": 170000053, - "GL: The Bell on the Big Trees": 170000054, - } -locSS_table = { - "SS: Going After Guppy": 170000055, - "SS: Faster Than a Speedrunning Penguin": 170000056, - "SS: The Silver Stars of Sea Slide": 170000057, - "SS: Underwater Cosmic Mario Race": 170000058, - "SS: Purple Coins by the Seaside": 170000059, - "SS: Hurry, He's Hungry": 170000060, -} -locTT_table = { - "TT: Heavy Metal Mecha Boswer": 170000061, - "TT: Mario (or Luigi) Meets Mario": 170000062, - "TT: Bouncing Down Cake Lane": 170000063, - "TT: The Flipswitch Chain": 170000064, - "TT: Fast Foes of Toy Time": 170000067, - "TT: Luigi's Purple Coins": 170000065, -} -locDD_table = { - "DD: The Underground Ghost Ship": 170000069, - "DD: Bubble Blastoff": 170000070, - "DD: Guppy and the Underground Lake": 170000071, - "DD: Ghost Ship Daredevil Run": 170000072, - "DD: Plunder the Purple Coins": 170000073, - "DD: Boo in Box": 170000074, -} -locDN_table = { - "DN: Inflitrating the Dreadnought": 170000075, - "DN: Dreanought's Colossal Cannons": 170000076, - "DN: Revenge of the Topman Tribe": 170000077, - "DN: Topman Tribe Speed Run": 170000078, - "DN: Battlestation's Purple Coins": 170000079, - "DN: Dreadnought's Garbage Dump": 170000080, -} -locMM_table = { - "MM: The Sinking Lava Spire": 170000081, - "MM: Through the Meteor Storm": 170000082, - "MM: Fiery Dino Piranha": 170000083, - "MM: Lava Spire Daredevil Run": 170000084, - "MM: Red-Hot Purple Coins": 170000085, - "MM Burning Tide": 170000086, -} -locHL_table = { - "SS: Rocky Road": 170000088, - "SP: A Very Sticky Situation": 170000089, - "DDR: Giant Eel Breakout": 170000090, - "BM: Bigmouth's Gold Bait": 170000091, - "SS: Choosing a Favorite Snack": 170000092, - "BB: Racing the Spooky Speedster": 170000093, - "SC: Star Bunnies in the Snow": 170000094, -} -location_table = { **locGE_table,**locHH_table, \ - **locSJ_table,**locBR_table,**locBB_table, \ - **locGG_table,**locFF_table,**locDDune_table, \ - **locGL_table,**locSS_table,**locTT_table, \ - **locDD_table,**locDN_table,**locMM_table, \ - **locHL_table,**locspecialstages_table,**locbosses_table, \ -} From a1777a6854672eb809855f57ce01741834aef9ea Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Sep 2022 18:57:48 -0500 Subject: [PATCH 37/71] Delete regions.py --- worlds/galaxy/regions.py | 81 ---------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 worlds/galaxy/regions.py diff --git a/worlds/galaxy/regions.py b/worlds/galaxy/regions.py deleted file mode 100644 index 14f4979fe5d..00000000000 --- a/worlds/galaxy/regions.py +++ /dev/null @@ -1,81 +0,0 @@ -import imp -import typing -from BaseClasses import MultiWorld, Region, Location, RegionType -from .locations import SMGLocation, location_table, locHH_table, locGE_table, \ -locSJ_table, locBR_table, locBB_table, \ -locGG_table, locFF_table, locDD_table, locDDune_table, \ -locspecialstages_table, locbosses_table, \ -locGL_table, locSS_table, locTT_table, \ -locDN_table, locMM_table, locHL_table \ - -smgcourses = ["Good Egg", "Honeyhive", "Loopdeeloop", "Flipswitch", "Bowser Jr. Robot Reactor", - "Space Junk", "Battlerock", "Rolling Green", "Hurry-Scurry", "Bowser's Star Reactor", - "Beach Bowl", "Ghostly", "Bubble Breeze", "Buoy Base", "Bowser Jr.'s Ariship Armada", - "Gusty gardens", "Freezeflame", "Dusty Dune", "Honeyclimb", "Bowser's Dark Matter Planet", - "Gold Leaf", "Sea Slide", "Toy Time", "Bonefin", "Bowser Jr.'s Lava Reactor", - "Gateway", "Deep Dark", "Dreadnaught", "Melty Molton", "Matter Splatter"] - -def create_regions(world: MultiWorld, player: int): - - # defines the good egg galaxy region - regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) - locGE_names = [name for name, id in locGE_table.items()] - regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] - world.regions.append(regGE) - # defines the honeyhive galaxey region - reg = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, world) - locHH_names = [name for name, id in locHH_table.items()] - regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] - # defines the Space Junk galaxy region - reg = Region("Space Junk", RegionType.Generic, "Space Junk", player, world) - locSJ_names = [name for name, id in locSJ_table.items()] - regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] - # defines the Battlerock galaxy - reg = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) - locBR_names = [name for name, id in locBR_table.items()] - regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] - # defines the Beach Bowl galaxy - reg = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) - locBB_names = [name for name, id in locBB_table.items()] - regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] - # define Ghostly galaxy - reg = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) - locGG_names = [name for name, id in locGG_table.items()] - regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] - # defines the Gusty Gardens galaxy - reg = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) - locGG_names = [name for name, id in locGG_table.items()] - regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] - # defines Freezeflame galaxy - reg = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) - locFF_names = [name for name, id in locFF_table.items()] - regFF_names += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] - # defines golden leaf galaxy - reg = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) - locGL_names = [name for name, id in locGL_table.items()] - regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] - # defines toy time galaxy - reg = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) - locTT_names = [name for name, id in locTT_table.items()] - regTT_names += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] - # defines deep dark galaxy - reg = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, world) - locDD_names = [name for name, id in locDD_table.items()] - regDD_names += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] - # defines Dreadnought galaxy - reg = Region("Dreadnought", RegionType.Generic, "Dreadnought", player, world) - locDN_names = [name for name, id in locDN_table.items()] - regDN_names += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] - # defines Melty Molten galaxy - reg = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) - locMM_names = [name for name, id in locMM_table.items()] - regMM_names += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] -def connect_regions(world: MultiWorld, player: int, source: str, target: str, rule): - sourceRegion = world.get_region(source, player) - targetRegion = world.get_region(target, player) - - connection = Entrance(player,'', sourceRegion) - connection.access_rule = rule - - sourceRegion.exits.append(connection) - connection.connect(targetRegion) From b981d3fff8c69bda3d454371b21d4b85380b521a Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Sep 2022 18:58:01 -0500 Subject: [PATCH 38/71] folder move 7 --- worlds/galaxy/rules.py | 88 ------------------------------------------ 1 file changed, 88 deletions(-) delete mode 100644 worlds/galaxy/rules.py diff --git a/worlds/galaxy/rules.py b/worlds/galaxy/rules.py deleted file mode 100644 index bd06cbddfee..00000000000 --- a/worlds/galaxy/rules.py +++ /dev/null @@ -1,88 +0,0 @@ -from ..generic.Rules import add_rule, set_rule -from .regions import smgcourses, connect_regions -def set_rules(world, player: int): - - def smg_gate_open(self, player: int): - return self.has('Grand Star Engine Room', player) - - def smg_can_finish(self, player: int): - return self.has('Power Star 60') and self.has('Grand Star Bedroom') - - def smg_purple_coins(self, player: int): - return self.has('Power Star 60') and self.has('Grand Star Bedroom') and self.has('Grand Star Engine Room', player) - - def smg_can_get_comet(self, player: int): - return self.has('Power Star 13') - - def smg_trail(self, player: int): - return self.has('Green Star 3') - - # main stage logic - connect_regions(world, player, "Menu", "Good Egg", lambda state: True) - connect_regions(world, player, "Menu", "Honeyhive", lambda state: state.has("Power Star", player, 3)) - connect_regions(world, player, "Menu", "Fountain", lambda state: state.has("Grand Star Terrace", player)) - connect_regions(world, player, "Fountain", "Space Junk", lambda state: state.has("Power Star", player, 9)) - connect_regions(world, player, "Fountain", "Space Junk", lambda state: state.has("Power Star", player, 12)) - connect_regions(world, player, "Menu", "Kitchen", lambda state: state.has("Grand Star Fountain", player)) - connect_regions(world, player, "Kitchen", "Beach Bowl", lambda state: state.has("Power Star", player, 18)) - connect_regions(world, player, "Kitchen", "Ghostly", lambda state: state.has("Power Star", player, 20)) - connect_regions(world, player, "Menu", "Bedroom", lambda state: state.has("Grand Star Kitchen", player)) - connect_regions(world, player, "Bedroom" "Gusty Gardens", lambda state: state.has("Power Star", player, 24)) - connect_regions(world, player, "Bedroom" "Freezeflame", lambda state: state.has("Power Star", player, 26)) - connect_regions(world, player, "Menu", "Engine Room", lambda state: state.has("Grand Star Bedroom", player)) - connect_regions(world, player, "Engine Room", "Gold Leaf", lambda state: state.has("Power Star", player, 34)) - connect_regions(world, player, "Engine Room", "Toy Time", lambda state: state.has("Power Star", player, 40)) - connect_regions(world, player, "Menu", "Garden", lambda state: state.has("Grand Star Engine Room", player)) - connect_regions(world, player, "Garden" "Deep Dark", lambda state: state.has("Power Star", player, 46)) - connect_regions(world, player, "Garden" "Dreadnaught", lambda state: state.has("Power Star", player, 48)) - connect_regions(world, player, "Garden" "Melty Molten", lambda state: state.has("Power Star", player, 52)) - # special stages logic - set_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player, 5)) - set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player, 7)) - set_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player, 11) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("HS: Shrinking Satellite", player), lambda state: state.has ("Power Star", player, 18) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("BUB: Through the Poison Swamp", player), lambda state: state.has ("Power Star", player, 19) and state.has("Grand Star Fountain", player)) - set_rule(world.get_location("BB: The Secret of Buoy Base", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("BB: The Floating Fortress", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("GG: Gateway's Purple coins", player), lambda state: state.has("Grand Star Engine Room", player)) - set_rule(world.get_location("BF: Kingfin's Fearsome Waters", player), lambda state: state.has("Power Star", player, 55) and state.has("Grand Star Bedroom", player)) - set_rule(world.get_location("MS: Watch Your Step", player), lambda state: state.has("Power Star", player, 50) and state.has("Grand Star Engine Room", player) and state.has("Grand Star Bedroom", player)) - set_rule(world.get_location("DDR: Giant Eel Breakout", player), lambda state: state.has("Grand Star Fountain", player)) - set_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.smg_trail(player)) - set_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) - set_rule(world.get_location("BBT: The Electric Labyrinth", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) - set_rule(world.get_location("SS: Rocky Road", player), lambda state: state.has("Power Star", player, 7)) - set_rule(world.get_location("SP: A Very Sticky Situation", player), lambda state: state.has("Grand Star Terrace", player) and state.has("Power Star", player, 9)) - set_rule(world.get_location("BM: Bigmouth's Gold Bait", player), lambda state: state.has("Grand Star Kitchen", player) and state.has("Power Star", player, 29)) - set_rule(world.get_location("SS: Choosing a Favorite Snack", player), lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain", player)) - set_rule(world.get_location("BB: Racing the Spooky Speedster", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) - set_rule(world.get_location("SC: Star Bunnies in the Snow", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) - # comet logic - add_rule(world.get_location("GE: Dino Piranha Speed Run", player), lambda state: state.has("Power Star", player, 13)) - add_rule(world.get_location("HH: Honeyhive Cosmic Mario Race", player), lambda state: state.has("Power Star", player, 13)) - add_rule(world.get_location("SJ: Pull Star Path Speed Run", player), lambda state: state.has("Power Star", player, 13)) - add_rule(world.get_location("BR: Topmanic's Dardevil Run", player), lambda state: state.smg_can_get_comet(player)) - add_rule(world.get_location("BB: Fast Foes on the Cyclone Stone", player), lambda state: state.smg_can_get_comet(player)) - # boss stage logic - set_rule(world.get_location("BJ: Megaleg's Moon", player), lambda state: state.has("Power Star", player, 8)) - set_rule(world.get_location("B: The Firery Stronghold", player), lambda state: state.has("Power Star", player, 15) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("BJ: Sinking the Airships", player), lambda state: state.has("Power Star", player, 23) and state.has("Grand Star Fountain", player)) - set_rule(world.get_location("BJ: King Kaliente's Spicy Return", player), lambda state: state.has("Power Star", player, 45) and state.has("Grand Star Engine Room", player)) - set_rule(world.get_location("B: Darkness on the Horizon", player), lambda state: state.has("Power Star", player, 33) and state.has("Grand Star Kitchen", player)) - # purple coin star logic - if world.EnablePurpleCoinStars[player]: - add_rule(world.get_location("DN: Battlestation's Purple Coins", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("MM: Red-Hot Purple Coins", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("TT: Luigi's Purple Coins", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("DD: Plunder the Purple Coins", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("GL: Purple Coins in the Woods", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("FF: Purple Coins on the Summit", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("SS: Purple Coins by the Seaside", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("GG: Purple Coins on the Puzzle Cube", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("G: Purple Coins in the Bone Pen", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("DDune: Purple Coin in the Desert", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("BR: Purple Coins on the Battlerock", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("GE: Purple Coin Omelet", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("HH: Honeyhive's Purple Coins", player), lambda state: state.smg_purple_coins(player)) - add_rule(world.get_location("SJ: Purple Coin Spacewalk", player), lambda state: state.smg_purple_coins(player)) - \ No newline at end of file From 9cbe4cd6a3bba9ddcf252b72e373a18c8410b4e2 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Sep 2022 19:52:15 -0500 Subject: [PATCH 39/71] fixing generation error 2 --- worlds/smgalaxy/locations.py | 2 +- worlds/smgalaxy/regions.py | 20 +++++++++++++------- worlds/smgalaxy/rules.py | 5 ++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/worlds/smgalaxy/locations.py b/worlds/smgalaxy/locations.py index f6e9c919586..6c986852648 100644 --- a/worlds/smgalaxy/locations.py +++ b/worlds/smgalaxy/locations.py @@ -19,7 +19,7 @@ class SMGLocation(Location): "HH: Honeyhive Cosmic Mario Race": 170000009, "HH: Honeyhive's Purple Coins": 170000010, } -locspecialstages_table ={ +locspecialstages_table = { "LDL: Surfing 101": 170000012, "FS: Painting the Planet Yellow": 170000013, "RG: Rolling in the Clouds": 170000028, diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index 66c7e0d9aa6..e9ead51a583 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -4,9 +4,9 @@ from .locations import SMGLocation, location_table, locHH_table, locGE_table, \ locSJ_table, locBR_table, locBB_table, \ locGG_table, locFF_table, locDD_table, locDDune_table, \ -locspecialstages_table, locbosses_table, \ locGL_table, locSS_table, locTT_table, \ -locDN_table, locMM_table, locHL_table \ +locDN_table, locMM_table, \ +locHL_table, locbosses_table, locspecialstages_table \ smgcourses = ["Good Egg", "Honeyhive", "Loopdeeloop", "Flipswitch", "Bowser Jr. Robot Reactor", "Space Junk", "Battlerock", "Rolling Green", "Hurry-Scurry", "Bowser's Star Reactor", @@ -18,15 +18,13 @@ def create_regions(world: MultiWorld, player: int): #defines the commet obserbatory - regSS = Region("Menu", RegionType.Generic, "Comment Obserbatory", player, world) - locSpecialstages_names = [name for name, id in locSS_table.items()] - regSpecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSpecialstages) for loc_name in locSpecialstages_names] - world.regions.append(regspecialstages) + regspecialstages = Region("Menu", RegionType.Generic, "Ship", player, world) + locspecialstages_names = [name for name, id in locspecialstages_table.items()] + regspecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] # defines the good egg galaxy region regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) locGE_names = [name for name, id in locGE_table.items()] regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] - world.regions.append(regGE) # defines the honeyhive galaxey region regHH = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, world) locHH_names = [name for name, id in locHH_table.items()] @@ -55,10 +53,18 @@ def create_regions(world: MultiWorld, player: int): regFF = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) locFF_names = [name for name, id in locFF_table.items()] regFF.locations += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] + # defines DustyDune Galaxy + regDDune = Region("Dusty Dune", RegionType.Generic, "Dusty Dune", player, world) + locDDune_names = [name for name, id in locDDune_table.items()] + regDDune.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDDune) for loc_name in locDDune_names] # defines golden leaf galaxy regGL = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) locGL_names = [name for name, id in locGL_table.items()] regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] + # defines the Sea slide galaxy + regSS = Region("Sea Slide", RegionType.Generic, "Sea Slide", player, world) + locSS_names = [name for name, id in locSS_table.items()] + regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSS) for loc_name in locSS_names] # defines toy time galaxy regTT = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) locTT_names = [name for name, id in locTT_table.items()] diff --git a/worlds/smgalaxy/rules.py b/worlds/smgalaxy/rules.py index 22edb4eddcd..45c34449945 100644 --- a/worlds/smgalaxy/rules.py +++ b/worlds/smgalaxy/rules.py @@ -1,3 +1,4 @@ +from sqlite3 import connect from ..generic.Rules import add_rule, set_rule from .regions import smgcourses, connect_regions def set_rules(world, player: int): @@ -18,6 +19,7 @@ def smg_trail(self, player: int): return self.has('Green Star 3') # main stage logic + set_rule(world.get_region('Menu', player), lambda state: True) connect_regions(world, player, "Menu", "Good Egg", lambda state: True) connect_regions(world, player, "Menu", "Honeyhive", lambda state: state.has("Power Star", player, 3)) connect_regions(world, player, "Menu", "Fountain", lambda state: state.has("Grand Star Terrace", player)) @@ -26,12 +28,13 @@ def smg_trail(self, player: int): connect_regions(world, player, "Menu", "Kitchen", lambda state: state.has("Grand Star Fountain", player)) connect_regions(world, player, "Kitchen", "Beach Bowl", lambda state: state.has("Power Star", player, 18)) connect_regions(world, player, "Kitchen", "Ghostly", lambda state: state.has("Power Star", player, 20)) - connect_regions(world, player, "Kitchen", "Bedroom", lambda state: state.has("Grand Star Kitchen", player)) + connect_regions(world, player, "Menu", "Bedroom", lambda state: state.has("Grand Star Kitchen", player)) connect_regions(world, player, "Bedroom" "Gusty Gardens", lambda state: state.has("Power Star", player, 24)) connect_regions(world, player, "Bedroom" "Freezeflame", lambda state: state.has("Power Star", player, 26)) connect_regions(world, player, "Menu", "Engine Room", lambda state: state.has("Grand Star Bedroom", player)) connect_regions(world, player, "Engine Room", "Gold Leaf", lambda state: state.has("Power Star", player, 34)) connect_regions(world, player, "Engine Room", "Toy Time", lambda state: state.has("Power Star", player, 40)) + connect_regions(world, player, "Engine Room", "Sea Slide", lambda state: state.has("Power Star", player, 36)) connect_regions(world, player, "Menu", "Garden", lambda state: state.has("Grand Star Engine Room", player)) connect_regions(world, player, "Garden" "Deep Dark", lambda state: state.has("Power Star", player, 46)) connect_regions(world, player, "Garden" "Dreadnaught", lambda state: state.has("Power Star", player, 48)) From e04bad47ec382aa9f1b9373bfc055f4bc918f791 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 5 Sep 2022 12:52:21 -0500 Subject: [PATCH 40/71] basic patching files --- Patch.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Patch.py b/Patch.py index aaa4fc2404c..3ebaade8cec 100644 --- a/Patch.py +++ b/Patch.py @@ -2,6 +2,7 @@ import shutil import json +from telnetlib import GA import bsdiff4 import yaml import os @@ -168,14 +169,16 @@ def patch(self, target: str): GAME_SOE = "Secret of Evermore" GAME_SMZ3 = "SMZ3" GAME_DKC3 = "Donkey Kong Country 3" -supported_games = {"A Link to the Past", "Super Metroid", "Secret of Evermore", "SMZ3", "Donkey Kong Country 3"} +GAME_GALAXY = "Super Mario Galaxy" +supported_games = {"A Link to the Past", "Super Metroid", "Secret of Evermore", "Super Mario Galaxy", "SMZ3", "Donkey Kong Country 3"} preferred_endings = { GAME_ALTTP: "apbp", GAME_SM: "apm3", GAME_SOE: "apsoe", GAME_SMZ3: "apsmz", - GAME_DKC3: "apdkc3" + GAME_DKC3: "apdkc3", + GAME_GALAXY: "apg", } @@ -192,6 +195,8 @@ def generate_yaml(patch: bytes, metadata: Optional[dict] = None, game: str = GAM HASH = ALTTPHASH + SMHASH elif game == GAME_DKC3: from worlds.dkc3.Rom import USHASH as HASH + elif game == GAME_GALAXY: + from worlds.smgalaxy.Rom import USHASH as HASH else: raise RuntimeError(f"Selected game {game} for base rom not found.") From 4f6da7534b4b033352b2b65a59ad700b5aeeaec4 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 5 Sep 2022 12:56:51 -0500 Subject: [PATCH 41/71] undo patch change --- Patch.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Patch.py b/Patch.py index 3ebaade8cec..7137ec0e614 100644 --- a/Patch.py +++ b/Patch.py @@ -169,8 +169,7 @@ def patch(self, target: str): GAME_SOE = "Secret of Evermore" GAME_SMZ3 = "SMZ3" GAME_DKC3 = "Donkey Kong Country 3" -GAME_GALAXY = "Super Mario Galaxy" -supported_games = {"A Link to the Past", "Super Metroid", "Secret of Evermore", "Super Mario Galaxy", "SMZ3", "Donkey Kong Country 3"} +supported_games = {"A Link to the Past", "Super Metroid", "Secret of Evermore", "SMZ3", "Donkey Kong Country 3"} preferred_endings = { GAME_ALTTP: "apbp", @@ -178,7 +177,6 @@ def patch(self, target: str): GAME_SOE: "apsoe", GAME_SMZ3: "apsmz", GAME_DKC3: "apdkc3", - GAME_GALAXY: "apg", } @@ -195,8 +193,6 @@ def generate_yaml(patch: bytes, metadata: Optional[dict] = None, game: str = GAM HASH = ALTTPHASH + SMHASH elif game == GAME_DKC3: from worlds.dkc3.Rom import USHASH as HASH - elif game == GAME_GALAXY: - from worlds.smgalaxy.Rom import USHASH as HASH else: raise RuntimeError(f"Selected game {game} for base rom not found.") From ab116e40fb3aad5291773d1a717d7e365b692fbc Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 5 Sep 2022 12:57:35 -0500 Subject: [PATCH 42/71] generation error fixes 3 --- worlds/smgalaxy/regions.py | 38 ++++++++++++++++++++++-- worlds/smgalaxy/rules.py | 61 +++++++++++++++++++------------------- 2 files changed, 66 insertions(+), 33 deletions(-) diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index e9ead51a583..e00b0247cc0 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -20,67 +20,101 @@ def create_regions(world: MultiWorld, player: int): #defines the commet obserbatory regspecialstages = Region("Menu", RegionType.Generic, "Ship", player, world) locspecialstages_names = [name for name, id in locspecialstages_table.items()] + locspecialstages_names = [name for name, id in locHL_table.items()] + locspecialstages_names = [name for name, id in locbosses_table.items()] regspecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] + world.regions.append(regspecialstages) # defines the good egg galaxy region regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) locGE_names = [name for name, id in locGE_table.items()] regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] + world.regions.append(regGE) # defines the honeyhive galaxey region regHH = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, world) locHH_names = [name for name, id in locHH_table.items()] regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] + world.regions.append(regHH) # defines the Space Junk galaxy region regSJ = Region("Space Junk", RegionType.Generic, "Space Junk", player, world) locSJ_names = [name for name, id in locSJ_table.items()] regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] + world.regions.append(regSJ) # defines the Battlerock galaxy regBR = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) locBR_names = [name for name, id in locBR_table.items()] regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] + world.regions.append(regBR) # defines the Beach Bowl galaxy regBB = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) locBB_names = [name for name, id in locBB_table.items()] regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] + world.regions.append(regBB) # define Ghostly galaxy regG = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) locG_names = [name for name, id in locGG_table.items()] regG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regG) for loc_name in locG_names] + world.regions.append(regG) # defines the Gusty Gardens galaxy regGG = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) locGG_names = [name for name, id in locGG_table.items()] regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] + world.regions.append(regGG) # defines Freezeflame galaxy regFF = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) locFF_names = [name for name, id in locFF_table.items()] regFF.locations += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] + world.regions.append(regFF) # defines DustyDune Galaxy regDDune = Region("Dusty Dune", RegionType.Generic, "Dusty Dune", player, world) locDDune_names = [name for name, id in locDDune_table.items()] regDDune.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDDune) for loc_name in locDDune_names] + world.regions.append(regDDune) # defines golden leaf galaxy regGL = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) locGL_names = [name for name, id in locGL_table.items()] regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] + world.regions.append(regGL) # defines the Sea slide galaxy regSS = Region("Sea Slide", RegionType.Generic, "Sea Slide", player, world) locSS_names = [name for name, id in locSS_table.items()] regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSS) for loc_name in locSS_names] + world.regions.append(regSS) # defines toy time galaxy regTT = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) locTT_names = [name for name, id in locTT_table.items()] regTT.locations += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] + world.regions.append(regTT) # defines deep dark galaxy regDD = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, world) locDD_names = [name for name, id in locDD_table.items()] regDD.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] - # defines Dreadnought galaxy - regDN = Region("Dreadnought", RegionType.Generic, "Dreadnought", player, world) + world.regions.append(regDD) + # defines Dreadnaught galaxy + regDN = Region("Dreadnaught", RegionType.Generic, "Dreadnaught", player, world) locDN_names = [name for name, id in locDN_table.items()] regDN.locations += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] + world.regions.append(regDN) # defines Melty Molten galaxy regMM = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) locMM_names = [name for name, id in locMM_table.items()] regMM.locations += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] + world.regions.append(regMM) + #defines the fountain + regFountain = Region("Fountain", RegionType.Generic, "Fountain", player, world) + world.regions.append(regFountain) + #defines the kitchen + regKitchen = Region("Kitchen", RegionType.Generic, "Kitchen", player, world) + world.regions.append(regKitchen) + #defines the bedroom + regBedroom = Region("Bedroom", RegionType.Generic, "Bedroom", player, world) + world.regions.append(regBedroom) + #defines the Engine Room + regEngineRoom = Region("Engine Room", RegionType.Generic, "Engine Room", player, world) + world.regions.append(regEngineRoom) + #defines the garden + regGarden = Region("Garden", RegionType.Generic, "Garden", player, world) + world.regions.append(regGarden) + def connect_regions(world: MultiWorld, player: int, source: str, target: str, rule): sourceRegion = world.get_region(source, player) targetRegion = world.get_region(target, player) diff --git a/worlds/smgalaxy/rules.py b/worlds/smgalaxy/rules.py index 45c34449945..a792f4426f8 100644 --- a/worlds/smgalaxy/rules.py +++ b/worlds/smgalaxy/rules.py @@ -19,7 +19,6 @@ def smg_trail(self, player: int): return self.has('Green Star 3') # main stage logic - set_rule(world.get_region('Menu', player), lambda state: True) connect_regions(world, player, "Menu", "Good Egg", lambda state: True) connect_regions(world, player, "Menu", "Honeyhive", lambda state: state.has("Power Star", player, 3)) connect_regions(world, player, "Menu", "Fountain", lambda state: state.has("Grand Star Terrace", player)) @@ -29,37 +28,37 @@ def smg_trail(self, player: int): connect_regions(world, player, "Kitchen", "Beach Bowl", lambda state: state.has("Power Star", player, 18)) connect_regions(world, player, "Kitchen", "Ghostly", lambda state: state.has("Power Star", player, 20)) connect_regions(world, player, "Menu", "Bedroom", lambda state: state.has("Grand Star Kitchen", player)) - connect_regions(world, player, "Bedroom" "Gusty Gardens", lambda state: state.has("Power Star", player, 24)) - connect_regions(world, player, "Bedroom" "Freezeflame", lambda state: state.has("Power Star", player, 26)) + connect_regions(world, player, "Bedroom", "Gusty Gardens", lambda state: state.has("Power Star", player, 24)) + connect_regions(world, player, "Bedroom", "Freezeflame", lambda state: state.has("Power Star", player, 26)) connect_regions(world, player, "Menu", "Engine Room", lambda state: state.has("Grand Star Bedroom", player)) connect_regions(world, player, "Engine Room", "Gold Leaf", lambda state: state.has("Power Star", player, 34)) connect_regions(world, player, "Engine Room", "Toy Time", lambda state: state.has("Power Star", player, 40)) connect_regions(world, player, "Engine Room", "Sea Slide", lambda state: state.has("Power Star", player, 36)) connect_regions(world, player, "Menu", "Garden", lambda state: state.has("Grand Star Engine Room", player)) - connect_regions(world, player, "Garden" "Deep Dark", lambda state: state.has("Power Star", player, 46)) - connect_regions(world, player, "Garden" "Dreadnaught", lambda state: state.has("Power Star", player, 48)) - connect_regions(world, player, "Garden" "Melty Molten", lambda state: state.has("Power Star", player, 52)) + connect_regions(world, player, "Garden", "Deep Dark", lambda state: state.has("Power Star", player, 46)) + connect_regions(world, player, "Garden", "Dreadnaught", lambda state: state.has("Power Star", player, 48)) + connect_regions(world, player, "Garden", "Melty Molten", lambda state: state.has("Power Star", player, 52)) # special stages logic - set_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player, 5)) - set_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player, 7)) - set_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player, 11) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("HS: Shrinking Satellite", player), lambda state: state.has ("Power Star", player, 18) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("BUB: Through the Poison Swamp", player), lambda state: state.has ("Power Star", player, 19) and state.has("Grand Star Fountain", player)) - set_rule(world.get_location("BB: The Secret of Buoy Base", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("BB: The Floating Fortress", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("GG: Gateway's Purple coins", player), lambda state: state.has("Grand Star Engine Room", player)) - set_rule(world.get_location("BF: Kingfin's Fearsome Waters", player), lambda state: state.has("Power Star", player, 55) and state.has("Grand Star Bedroom", player)) - set_rule(world.get_location("MS: Watch Your Step", player), lambda state: state.has("Power Star", player, 50) and state.has("Grand Star Engine Room", player) and state.has("Grand Star Bedroom", player)) - set_rule(world.get_location("DDR: Giant Eel Breakout", player), lambda state: state.has("Grand Star Fountain", player)) - set_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.smg_trail(player)) - set_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) - set_rule(world.get_location("BBT: The Electric Labyrinth", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) - set_rule(world.get_location("SS: Rocky Road", player), lambda state: state.has("Power Star", player, 7)) - set_rule(world.get_location("SP: A Very Sticky Situation", player), lambda state: state.has("Grand Star Terrace", player) and state.has("Power Star", player, 9)) - set_rule(world.get_location("BM: Bigmouth's Gold Bait", player), lambda state: state.has("Grand Star Kitchen", player) and state.has("Power Star", player, 29)) - set_rule(world.get_location("SS: Choosing a Favorite Snack", player), lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain", player)) - set_rule(world.get_location("BB: Racing the Spooky Speedster", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) - set_rule(world.get_location("SC: Star Bunnies in the Snow", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) + add_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player, 5)) + add_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player, 7)) + add_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player, 11) and state.has("Grand Star Terrace", player)) + add_rule(world.get_location("HS: Shrinking Satellite", player), lambda state: state.has ("Power Star", player, 18) and state.has("Grand Star Terrace", player)) + add_rule(world.get_location("BUB: Through the Poison Swamp", player), lambda state: state.has ("Power Star", player, 19) and state.has("Grand Star Fountain", player)) + add_rule(world.get_location("BB: The Secret of Buoy Base", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) + add_rule(world.get_location("BB: The Floating Fortress", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) + add_rule(world.get_location("GG: Gateway's Purple coins", player), lambda state: state.has("Grand Star Engine Room", player)) + add_rule(world.get_location("BF: Kingfin's Fearsome Waters", player), lambda state: state.has("Power Star", player, 55) and state.has("Grand Star Bedroom", player)) + add_rule(world.get_location("MS: Watch Your Step", player), lambda state: state.has("Power Star", player, 50) and state.has("Grand Star Engine Room", player) and state.has("Grand Star Bedroom", player)) + add_rule(world.get_location("DDR: Giant Eel Breakout", player), lambda state: state.has("Grand Star Fountain", player)) + add_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.smg_trail(player)) + add_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) + add_rule(world.get_location("BBT: The Electric Labyrinth", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) + add_rule(world.get_location("SS: Rocky Road", player), lambda state: state.has("Power Star", player, 7)) + add_rule(world.get_location("SP: A Very Sticky Situation", player), lambda state: state.has("Grand Star Terrace", player) and state.has("Power Star", player, 9)) + add_rule(world.get_location("BM: Bigmouth's Gold Bait", player), lambda state: state.has("Grand Star Kitchen", player) and state.has("Power Star", player, 29)) + add_rule(world.get_location("SS: Choosing a Favorite Snack", player), lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain", player)) + add_rule(world.get_location("BB: Racing the Spooky Speedster", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) + add_rule(world.get_location("SC: Star Bunnies in the Snow", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) # comet logic add_rule(world.get_location("GE: Dino Piranha Speed Run", player), lambda state: state.has("Power Star", player, 13)) add_rule(world.get_location("HH: Honeyhive Cosmic Mario Race", player), lambda state: state.has("Power Star", player, 13)) @@ -67,11 +66,11 @@ def smg_trail(self, player: int): add_rule(world.get_location("BR: Topmanic's Dardevil Run", player), lambda state: state.smg_can_get_comet(player)) add_rule(world.get_location("BB: Fast Foes on the Cyclone Stone", player), lambda state: state.smg_can_get_comet(player)) # boss stage logic - set_rule(world.get_location("BJ: Megaleg's Moon", player), lambda state: state.has("Power Star", player, 8)) - set_rule(world.get_location("B: The Firery Stronghold", player), lambda state: state.has("Power Star", player, 15) and state.has("Grand Star Terrace", player)) - set_rule(world.get_location("BJ: Sinking the Airships", player), lambda state: state.has("Power Star", player, 23) and state.has("Grand Star Fountain", player)) - set_rule(world.get_location("BJ: King Kaliente's Spicy Return", player), lambda state: state.has("Power Star", player, 45) and state.has("Grand Star Engine Room", player)) - set_rule(world.get_location("B: Darkness on the Horizon", player), lambda state: state.has("Power Star", player, 33) and state.has("Grand Star Kitchen", player)) + add_rule(world.get_location("BJ: Megaleg's Moon", player), lambda state: state.has("Power Star", player, 8)) + add_rule(world.get_location("B: The Firery Stronghold", player), lambda state: state.has("Power Star", player, 15) and state.has("Grand Star Terrace", player)) + add_rule(world.get_location("BJ: Sinking the Airships", player), lambda state: state.has("Power Star", player, 23) and state.has("Grand Star Fountain", player)) + add_rule(world.get_location("BJ: King Kaliente's Spicy Return", player), lambda state: state.has("Power Star", player, 45) and state.has("Grand Star Engine Room", player)) + add_rule(world.get_location("B: Darkness on the Horizon", player), lambda state: state.has("Power Star", player, 33) and state.has("Grand Star Kitchen", player)) # purple coin star logic if world.EnablePurpleCoinStars[player]: add_rule(world.get_location("DN: Battlestation's Purple Coins", player), lambda state: state.smg_purple_coins(player)) From 06ee4e158e4b2dd573bbbec5ddbd465072aa0aa7 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Fri, 16 Sep 2022 23:07:51 -0500 Subject: [PATCH 43/71] fixing generation fails 3(i think) --- worlds/smgalaxy/__init__.py | 8 +- worlds/smgalaxy/locations.py | 140 ++++++++++++++++++----------------- worlds/smgalaxy/regions.py | 18 ++--- worlds/smgalaxy/rules.py | 16 ++-- 4 files changed, 91 insertions(+), 91 deletions(-) diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index 60bef5cad78..8e11c773ce4 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -2,8 +2,8 @@ from .items import item_table, SMGItem from .locations import location_table, SMGLocation from .Options import smg_options -from .rules import set_rules -from .regions import smgcourses, create_regions +from .rules import set_star_rules +from .regions import create_regions from BaseClasses import Item, Tutorial from ..AutoWorld import World, WebWorld @@ -40,8 +40,8 @@ class SuperMarioGalaxy(World): def create_regions(self): create_regions(self.world,self.player) - def set_rules(self): - set_rules(self.world, self.player) + def set_star_rules(self): + set_star_rules(self.world, self.player) def create_item(self, name: str) -> Item: item_id = item_table[name] diff --git a/worlds/smgalaxy/locations.py b/worlds/smgalaxy/locations.py index 6c986852648..3d4bc8e6306 100644 --- a/worlds/smgalaxy/locations.py +++ b/worlds/smgalaxy/locations.py @@ -19,27 +19,29 @@ class SMGLocation(Location): "HH: Honeyhive Cosmic Mario Race": 170000009, "HH: Honeyhive's Purple Coins": 170000010, } + locspecialstages_table = { "LDL: Surfing 101": 170000012, "FS: Painting the Planet Yellow": 170000013, - "RG: Rolling in the Clouds": 170000028, - "HS: Shrinking Satellite": 170000029, - "BUB: Through the Poison Swamp": 170000043, - "BB: The Floating Fortress": 170000044, - "BB: The Secret of Buoy Base": 170000045, - "GG: Grand Star Rescue": 170000047, - "GG: Gateway's Purple coins": 170000048, - "BF: Kingfin's Fearsome Waters": 170000067, + "RG: Rolling in the Clouds": 170000027, + "HS: Shrinking Satellite": 170000028, + "BUB: Through the Poison Swamp": 170000042, + "BB: The Floating Fortress": 170000043, + "BB: The Secret of Buoy Base": 170000044, + "GG: Grand Star Rescue": 170000045, + "GG: Gateway's Purple coins": 170000046, + "BF: Kingfin's Fearsome Waters": 170000065, "MS: Watch Your Step": 170000095, "RGT: Gizmos, Gears, and Gadgets": 170000096, "LDT: The Galaxy's Greatest Wave": 170000097, "BBT: The Electric Labyrinth": 170000098, } + locbosses_table = { "BJ: Megaleg's Moon": 170000014, - "B: The Firery Stronghold": 170000030, + "B: The Firery Stronghold": 170000029, "BJ: Sinking the Airships": 170000045, - "BJ: King Kaliente's Spicy Return": 170000067, + "BJ: King Kaliente's Spicy Return": 170000066, "B: Darkness on the Horizon": 170000095, } @@ -55,25 +57,25 @@ class SMGLocation(Location): "BR: Battlerock Barrage": 170000021, "BR: Breaking into the Battlerock": 170000022, "BR: Topmaniac's Garbage dump": 170000023, - "BR: Topmanic's Dardevil Run": 170000025, - "BR: Purple Coins on the Battlerock": 170000026, - "BR: Luigi under the Saucer": 170000027, + "BR: Topmanic's Dardevil Run": 170000024, + "BR: Purple Coins on the Battlerock": 170000025, + "BR: Luigi under the Saucer": 170000026, } locBB_table = { - "BB: Sunken Treasure": 170000031, - "BB: Passing the Swim Test": 170000032, - "BB: The Secret Undersea Cavern": 170000033, - "BB: Fast Foes on the Cyclone Stone": 170000034, - "BB: Beachcombing for Purple Coins": 170000035, - "BB: Wall Jumping Water Falls": 170000036, + "BB: Sunken Treasure": 170000030, + "BB: Passing the Swim Test": 170000031, + "BB: The Secret Undersea Cavern": 170000032, + "BB: Fast Foes on the Cyclone Stone": 170000033, + "BB: Beachcombing for Purple Coins": 170000034, + "BB: Wall Jumping Water Falls": 170000035, } locG_table = { - "G: Luigi and the Haunted Mansion": 170000037, - "G: A Very Spooky Spirit": 170000038, - "G: Beware of Bouldergeist": 170000039, - "G: Bouldergeist's Daredevil Run": 170000040, - "G: Purple Coins in the Bone Pen": 170000041, - "G: Matter Splatter Mansion": 170000042, + "G: Luigi and the Haunted Mansion": 170000036, + "G: A Very Spooky Spirit": 170000037, + "G: Beware of Bouldergeist": 170000038, + "G: Bouldergeist's Daredevil Run": 170000039, + "G: Purple Coins in the Bone Pen": 170000040, + "G: Matter Splatter Mansion": 170000041, } locGG_table = { "GG: Bunnies in the Wind": 170000108, @@ -101,66 +103,66 @@ class SMGLocation(Location): "DDune: Treasure of the Pyramid": 170000107, } locGL_table = { - "GL: Star Bunnies on the Hunt": 170000049, - "GL: Cataquack to the skies": 170000050, - "GL: When it Rains, it Pours": 170000051, - "GL: Cosmic Mario Forest Race": 170000052, - "GL: Purple Coins in the Woods": 170000053, - "GL: The Bell on the Big Trees": 170000054, + "GL: Star Bunnies on the Hunt": 170000047, + "GL: Cataquack to the skies": 170000048, + "GL: When it Rains, it Pours": 170000049, + "GL: Cosmic Mario Forest Race": 170000050, + "GL: Purple Coins in the Woods": 170000051, + "GL: The Bell on the Big Trees": 170000052, } locSS_table = { - "SS: Going After Guppy": 170000055, - "SS: Faster Than a Speedrunning Penguin": 170000056, - "SS: The Silver Stars of Sea Slide": 170000057, - "SS: Underwater Cosmic Mario Race": 170000058, - "SS: Purple Coins by the Seaside": 170000059, - "SS: Hurry, He's Hungry": 170000060, + "SS: Going After Guppy": 170000053, + "SS: Faster Than a Speedrunning Penguin": 170000054, + "SS: The Silver Stars of Sea Slide": 170000055, + "SS: Underwater Cosmic Mario Race": 170000056, + "SS: Purple Coins by the Seaside": 170000057, + "SS: Hurry, He's Hungry": 170000058, } locTT_table = { - "TT: Heavy Metal Mecha Boswer": 170000061, - "TT: Mario (or Luigi) Meets Mario": 170000062, - "TT: Bouncing Down Cake Lane": 170000063, - "TT: The Flipswitch Chain": 170000064, - "TT: Fast Foes of Toy Time": 170000067, - "TT: Luigi's Purple Coins": 170000065, + "TT: Heavy Metal Mecha Boswer": 170000059, + "TT: Mario (or Luigi) Meets Mario": 170000060, + "TT: Bouncing Down Cake Lane": 170000061, + "TT: The Flipswitch Chain": 170000062, + "TT: Fast Foes of Toy Time": 170000063, + "TT: Luigi's Purple Coins": 170000064, } locDD_table = { - "DD: The Underground Ghost Ship": 170000069, - "DD: Bubble Blastoff": 170000070, - "DD: Guppy and the Underground Lake": 170000071, - "DD: Ghost Ship Daredevil Run": 170000072, - "DD: Plunder the Purple Coins": 170000073, - "DD: Boo in Box": 170000074, + "DD: The Underground Ghost Ship": 170000067, + "DD: Bubble Blastoff": 170000068, + "DD: Guppy and the Underground Lake": 170000069, + "DD: Ghost Ship Daredevil Run": 170000070, + "DD: Plunder the Purple Coins": 170000071, + "DD: Boo in Box": 170000072, } locDN_table = { - "DN: Inflitrating the Dreadnought": 170000075, - "DN: Dreanought's Colossal Cannons": 170000076, - "DN: Revenge of the Topman Tribe": 170000077, - "DN: Topman Tribe Speed Run": 170000078, - "DN: Battlestation's Purple Coins": 170000079, - "DN: Dreadnought's Garbage Dump": 170000080, + "DN: Inflitrating the Dreadnought": 170000073, + "DN: Dreanought's Colossal Cannons": 170000074, + "DN: Revenge of the Topman Tribe": 170000075, + "DN: Topman Tribe Speed Run": 170000076, + "DN: Battlestation's Purple Coins": 170000077, + "DN: Dreadnought's Garbage Dump": 170000078, } locMM_table = { - "MM: The Sinking Lava Spire": 170000081, - "MM: Through the Meteor Storm": 170000082, - "MM: Fiery Dino Piranha": 170000083, - "MM: Lava Spire Daredevil Run": 170000084, - "MM: Red-Hot Purple Coins": 170000085, - "MM Burning Tide": 170000086, + "MM: The Sinking Lava Spire": 170000079, + "MM: Through the Meteor Storm": 170000080, + "MM: Fiery Dino Piranha": 170000081, + "MM: Lava Spire Daredevil Run": 170000082, + "MM: Red-Hot Purple Coins": 170000083, + "MM Burning Tide": 170000084, } locHL_table = { - "SS: Rocky Road": 170000088, - "SP: A Very Sticky Situation": 170000089, - "DDR: Giant Eel Breakout": 170000090, - "BM: Bigmouth's Gold Bait": 170000091, - "SS: Choosing a Favorite Snack": 170000092, - "BB: Racing the Spooky Speedster": 170000093, - "SC: Star Bunnies in the Snow": 170000094, + "SS: Rocky Road": 170000085, + "SP: A Very Sticky Situation": 170000086, + "DDR: Giant Eel Breakout": 170000087, + "BM: Bigmouth's Gold Bait": 170000088, + "SS: Choosing a Favorite Snack": 170000089, + "BB: Racing the Spooky Speedster": 170000090, + "SC: Star Bunnies in the Snow": 170000091, } location_table = { **locGE_table,**locHH_table, \ **locSJ_table,**locBR_table,**locBB_table, \ **locGG_table,**locFF_table,**locDDune_table, \ **locGL_table,**locSS_table,**locTT_table, \ **locDD_table,**locDN_table,**locMM_table, \ - **locHL_table,**locspecialstages_table,**locbosses_table, \ + **locHL_table,**locspecialstages_table,**locbosses_table } diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index e00b0247cc0..6e85d4a6c59 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -2,19 +2,11 @@ import typing from BaseClasses import MultiWorld, Region, Location, RegionType from .locations import SMGLocation, location_table, locHH_table, locGE_table, \ -locSJ_table, locBR_table, locBB_table, \ -locGG_table, locFF_table, locDD_table, locDDune_table, \ -locGL_table, locSS_table, locTT_table, \ -locDN_table, locMM_table, \ -locHL_table, locbosses_table, locspecialstages_table \ - -smgcourses = ["Good Egg", "Honeyhive", "Loopdeeloop", "Flipswitch", "Bowser Jr. Robot Reactor", - "Space Junk", "Battlerock", "Rolling Green", "Hurry-Scurry", "Bowser's Star Reactor", - "Beach Bowl", "Ghostly", "Bubble Breeze", "Buoy Base", "Bowser Jr.'s Ariship Armada", - "Gusty gardens", "Freezeflame", "Dusty Dune", "Honeyclimb", "Bowser's Dark Matter Planet", - "Gold Leaf", "Sea Slide", "Toy Time", "Bonefin", "Bowser Jr.'s Lava Reactor", - "Gateway", "Deep Dark", "Dreadnaught", "Melty Molton", "Matter Splatter"] - + locSJ_table, locBR_table, locBB_table, \ + locGG_table, locFF_table, locDD_table, locDDune_table, \ + locGL_table, locSS_table, locTT_table, \ + locDN_table, locMM_table, \ + locHL_table, locbosses_table, locspecialstages_table def create_regions(world: MultiWorld, player: int): #defines the commet obserbatory diff --git a/worlds/smgalaxy/rules.py b/worlds/smgalaxy/rules.py index a792f4426f8..72e6432f2d3 100644 --- a/worlds/smgalaxy/rules.py +++ b/worlds/smgalaxy/rules.py @@ -1,7 +1,9 @@ from sqlite3 import connect -from ..generic.Rules import add_rule, set_rule -from .regions import smgcourses, connect_regions -def set_rules(world, player: int): + +from worlds.AutoWorld import LogicMixin +from ..generic.Rules import add_rule +from .regions import connect_regions +class GalaxyLogic(LogicMixin): def smg_gate_open(self, player: int): return self.has('Grand Star Engine Room', player) @@ -18,7 +20,8 @@ def smg_can_get_comet(self, player: int): def smg_trail(self, player: int): return self.has('Green Star 3') - # main stage logic + # main stage logic +def set_star_rules(world,player): connect_regions(world, player, "Menu", "Good Egg", lambda state: True) connect_regions(world, player, "Menu", "Honeyhive", lambda state: state.has("Power Star", player, 3)) connect_regions(world, player, "Menu", "Fountain", lambda state: state.has("Grand Star Terrace", player)) @@ -71,6 +74,8 @@ def smg_trail(self, player: int): add_rule(world.get_location("BJ: Sinking the Airships", player), lambda state: state.has("Power Star", player, 23) and state.has("Grand Star Fountain", player)) add_rule(world.get_location("BJ: King Kaliente's Spicy Return", player), lambda state: state.has("Power Star", player, 45) and state.has("Grand Star Engine Room", player)) add_rule(world.get_location("B: Darkness on the Horizon", player), lambda state: state.has("Power Star", player, 33) and state.has("Grand Star Kitchen", player)) + + # purple coin star logic if world.EnablePurpleCoinStars[player]: add_rule(world.get_location("DN: Battlestation's Purple Coins", player), lambda state: state.smg_purple_coins(player)) @@ -87,4 +92,5 @@ def smg_trail(self, player: int): add_rule(world.get_location("GE: Purple Coin Omelet", player), lambda state: state.smg_purple_coins(player)) add_rule(world.get_location("HH: Honeyhive's Purple Coins", player), lambda state: state.smg_purple_coins(player)) add_rule(world.get_location("SJ: Purple Coin Spacewalk", player), lambda state: state.smg_purple_coins(player)) - \ No newline at end of file + + world.completion_condition[player] = lambda state: state.smg_can_finish(player) \ No newline at end of file From 11e5883904fea6ba49b3d947f53e1f9d44026666 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 19 Sep 2022 08:17:57 -0500 Subject: [PATCH 44/71] fixing unit tests 1 --- worlds/smgalaxy/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index 8e11c773ce4..b0e3bba946a 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -45,15 +45,21 @@ def set_star_rules(self): def create_item(self, name: str) -> Item: item_id = item_table[name] + if name == "Power Star": + classification = ItemClassification.progression_skip_balancing + else: + classification = ItemClassification.progression item = SMGItem(name, True, item_id, self.player) + return item + def generate_basic(self): gstaritem = self.create_item("Green Star") self.world.itempool += [gstaritem for i in range(0,3)] staritem = self.create_item("Power Star") - if(self.world.EnablePurpleCoinStars[self.player].value): + if( not self.world.EnablePurpleCoinStars[self.player].value): self.world.itempool += [staritem for i in range(0,117)] else: self.world.itempool += [staritem for i in range(0,101)] @@ -64,4 +70,4 @@ def generate_basic(self): grandstar4 = self.create_item("Grand Star Bedroom") grandstar5 = self.create_item("Grand Star Engine Room") self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] - \ No newline at end of file + From 13a6faf7322037b0aba5f4eb0eae1fcb92acebd2 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 19 Sep 2022 08:23:03 -0500 Subject: [PATCH 45/71] fixing unit tests 2 --- worlds/smgalaxy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index b0e3bba946a..c985dbd3632 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -4,7 +4,7 @@ from .Options import smg_options from .rules import set_star_rules from .regions import create_regions -from BaseClasses import Item, Tutorial +from BaseClasses import Item, Tutorial, ItemClassifcation from ..AutoWorld import World, WebWorld client_version = 1 From e99698c2956f038c64b57a9662d62f2033aba1e7 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 19 Sep 2022 08:28:07 -0500 Subject: [PATCH 46/71] fixing mispell --- worlds/smgalaxy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index c985dbd3632..06f09584337 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -4,7 +4,7 @@ from .Options import smg_options from .rules import set_star_rules from .regions import create_regions -from BaseClasses import Item, Tutorial, ItemClassifcation +from BaseClasses import Item, Tutorial, ItemClassification from ..AutoWorld import World, WebWorld client_version = 1 From 19bebf60f4e7bfd123a038ecac474be700343e40 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Fri, 23 Sep 2022 07:29:10 -0500 Subject: [PATCH 47/71] add game to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9daa775e549..d612f1c651a 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Currently, the following games are supported: * Starcraft 2: Wings of Liberty * Donkey Kong Country 3 * Dark Souls 3 +* Super Mario Galaxy For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/). Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled From 6e09f540fbcabfae23eb36a56a441e0fb174f818 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Fri, 7 Oct 2022 09:39:09 -0500 Subject: [PATCH 48/71] change ids (hopefully fix duplicate id test --- worlds/smgalaxy/locations.py | 212 +++++++++++++++++------------------ 1 file changed, 106 insertions(+), 106 deletions(-) diff --git a/worlds/smgalaxy/locations.py b/worlds/smgalaxy/locations.py index 3d4bc8e6306..84ae97fb79a 100644 --- a/worlds/smgalaxy/locations.py +++ b/worlds/smgalaxy/locations.py @@ -15,149 +15,149 @@ class SMGLocation(Location): "HH: Bee Mario Takes Flight": 170000006, "HH: Trouble on the Tower": 170000007, "HH: Big Bad Bugabooom": 170000008, - "HH: Luigi in the Honeyhive Kingdom": 170000011, - "HH: Honeyhive Cosmic Mario Race": 170000009, - "HH: Honeyhive's Purple Coins": 170000010, + "HH: Luigi in the Honeyhive Kingdom": 17000009, + "HH: Honeyhive Cosmic Mario Race": 170000010, + "HH: Honeyhive's Purple Coins": 170000011, } locspecialstages_table = { "LDL: Surfing 101": 170000012, "FS: Painting the Planet Yellow": 170000013, - "RG: Rolling in the Clouds": 170000027, - "HS: Shrinking Satellite": 170000028, - "BUB: Through the Poison Swamp": 170000042, - "BB: The Floating Fortress": 170000043, - "BB: The Secret of Buoy Base": 170000044, - "GG: Grand Star Rescue": 170000045, - "GG: Gateway's Purple coins": 170000046, - "BF: Kingfin's Fearsome Waters": 170000065, - "MS: Watch Your Step": 170000095, - "RGT: Gizmos, Gears, and Gadgets": 170000096, - "LDT: The Galaxy's Greatest Wave": 170000097, - "BBT: The Electric Labyrinth": 170000098, + "RG: Rolling in the Clouds": 170000014, + "HS: Shrinking Satellite": 170000015, + "BUB: Through the Poison Swamp": 170000016, + "BB: The Floating Fortress": 170000017, + "BB: The Secret of Buoy Base": 170000018, + "GG: Grand Star Rescue": 170000019, + "GG: Gateway's Purple coins": 170000020, + "BF: Kingfin's Fearsome Waters": 170000021, + "MS: Watch Your Step": 170000022, + "RGT: Gizmos, Gears, and Gadgets": 170000023, + "LDT: The Galaxy's Greatest Wave": 170000024, + "BBT: The Electric Labyrinth": 170000025, } locbosses_table = { - "BJ: Megaleg's Moon": 170000014, - "B: The Firery Stronghold": 170000029, - "BJ: Sinking the Airships": 170000045, - "BJ: King Kaliente's Spicy Return": 170000066, - "B: Darkness on the Horizon": 170000095, + "BJ: Megaleg's Moon": 170000026, + "B: The Firery Stronghold": 170000027, + "BJ: Sinking the Airships": 170000028, + "BJ: King Kaliente's Spicy Return": 170000029, + "B: Darkness on the Horizon": 170000030, } locSJ_table = { - "SJ: Pull Star Path": 170000015, - "SJ: Kamella's Airship Attack": 170000016, - "SJ: Tarantox's Tangled Web": 170000017, - "SJ: Yoshi's Unexpected Apparence": 170000020, - "SJ: Pull Star Path Speed Run": 170000018, - "SJ: Purple Coin Spacewalk": 170000019, + "SJ: Pull Star Path": 170000031, + "SJ: Kamella's Airship Attack": 170000032, + "SJ: Tarantox's Tangled Web": 170000033, + "SJ: Yoshi's Unexpected Apparence": 170000034, + "SJ: Pull Star Path Speed Run": 170000035, + "SJ: Purple Coin Spacewalk": 170000036, } locBR_table = { - "BR: Battlerock Barrage": 170000021, - "BR: Breaking into the Battlerock": 170000022, - "BR: Topmaniac's Garbage dump": 170000023, - "BR: Topmanic's Dardevil Run": 170000024, - "BR: Purple Coins on the Battlerock": 170000025, - "BR: Luigi under the Saucer": 170000026, + "BR: Battlerock Barrage": 170000037, + "BR: Breaking into the Battlerock": 170000038, + "BR: Topmaniac's Garbage dump": 170000039, + "BR: Topmanic's Dardevil Run": 170000040, + "BR: Purple Coins on the Battlerock": 170000041, + "BR: Luigi under the Saucer": 170000042, } locBB_table = { - "BB: Sunken Treasure": 170000030, - "BB: Passing the Swim Test": 170000031, - "BB: The Secret Undersea Cavern": 170000032, - "BB: Fast Foes on the Cyclone Stone": 170000033, - "BB: Beachcombing for Purple Coins": 170000034, - "BB: Wall Jumping Water Falls": 170000035, + "BB: Sunken Treasure": 170000043, + "BB: Passing the Swim Test": 170000044, + "BB: The Secret Undersea Cavern": 170000045, + "BB: Fast Foes on the Cyclone Stone": 170000046, + "BB: Beachcombing for Purple Coins": 170000047, + "BB: Wall Jumping Water Falls": 170000048, } locG_table = { - "G: Luigi and the Haunted Mansion": 170000036, - "G: A Very Spooky Spirit": 170000037, - "G: Beware of Bouldergeist": 170000038, - "G: Bouldergeist's Daredevil Run": 170000039, - "G: Purple Coins in the Bone Pen": 170000040, - "G: Matter Splatter Mansion": 170000041, + "G: Luigi and the Haunted Mansion": 170000049, + "G: A Very Spooky Spirit": 170000050, + "G: Beware of Bouldergeist": 170000051, + "G: Bouldergeist's Daredevil Run": 170000052, + "G: Purple Coins in the Bone Pen": 170000053, + "G: Matter Splatter Mansion": 170000054, } locGG_table = { - "GG: Bunnies in the Wind": 170000108, - "GG: The Dirty Tricks of Major Burrows": 170000109, - "GG: Gusty Garden's Gravity Scramble": 170000110, - "GG: Major Burrows's Daredevil Run": 170000111, - "GG: Purple Coins on the Puzzle Cube": 170000112, - "GG: The Golden Chomp": 170000113, + "GG: Bunnies in the Wind": 170000055, + "GG: The Dirty Tricks of Major Burrows": 170000056, + "GG: Gusty Garden's Gravity Scramble": 170000057, + "GG: Major Burrows's Daredevil Run": 170000058, + "GG: Purple Coins on the Puzzle Cube": 170000059, + "GG: The Golden Chomp": 170000060, } locFF_table = { - "FF: The Frozen Peak of Baron Brr": 170000095, - "FF: Freezeflame's Blistering Coore": 170000096, - "FF: Hot and Cold Collide": 170000097, - "FF: Conquring the Summit": 170000100, - "FF: Frosty Cosmic Mario race": 170000098, - "FF: Purple Coins on the Summit": 170000099, + "FF: The Frozen Peak of Baron Brr": 170000061, + "FF: Freezeflame's Blistering Coore": 170000062, + "FF: Hot and Cold Collide": 170000063, + "FF: Conquring the Summit": 170000064, + "FF: Frosty Cosmic Mario race": 170000065, + "FF: Purple Coins on the Summit": 170000066, } locDDune_table = { - "DDune: Soaring on the Desert Winds": 170000101, - "DDune: Blasting through the Sand": 170000102, - "DDune: Sunbaked Sand Castle": 170000103, - "DDune: Purple Coin in the Desert": 170000105, - "DDune: Bullet Bill on Your Back": 170000106, - "DDune: Bullet Bill on Your Back": 170000106, - "DDune: Treasure of the Pyramid": 170000107, + "DDune: Soaring on the Desert Winds": 170000067, + "DDune: Blasting through the Sand": 170000068, + "DDune: Sunbaked Sand Castle": 170000069, + "DDune: Purple Coin in the Desert": 170000070, + "DDune: Bullet Bill on Your Back": 170000071, + "DDune: Bullet Bill on Your Back": 170000072, + "DDune: Treasure of the Pyramid": 170000073, } locGL_table = { - "GL: Star Bunnies on the Hunt": 170000047, - "GL: Cataquack to the skies": 170000048, - "GL: When it Rains, it Pours": 170000049, - "GL: Cosmic Mario Forest Race": 170000050, - "GL: Purple Coins in the Woods": 170000051, - "GL: The Bell on the Big Trees": 170000052, + "GL: Star Bunnies on the Hunt": 170000074, + "GL: Cataquack to the skies": 170000075, + "GL: When it Rains, it Pours": 170000076, + "GL: Cosmic Mario Forest Race": 170000077, + "GL: Purple Coins in the Woods": 170000078, + "GL: The Bell on the Big Trees": 170000079, } locSS_table = { - "SS: Going After Guppy": 170000053, - "SS: Faster Than a Speedrunning Penguin": 170000054, - "SS: The Silver Stars of Sea Slide": 170000055, - "SS: Underwater Cosmic Mario Race": 170000056, - "SS: Purple Coins by the Seaside": 170000057, - "SS: Hurry, He's Hungry": 170000058, + "SS: Going After Guppy": 170000080, + "SS: Faster Than a Speedrunning Penguin": 170000081, + "SS: The Silver Stars of Sea Slide": 170000082, + "SS: Underwater Cosmic Mario Race": 170000083, + "SS: Purple Coins by the Seaside": 170000084, + "SS: Hurry, He's Hungry": 170000085, } locTT_table = { - "TT: Heavy Metal Mecha Boswer": 170000059, - "TT: Mario (or Luigi) Meets Mario": 170000060, - "TT: Bouncing Down Cake Lane": 170000061, - "TT: The Flipswitch Chain": 170000062, - "TT: Fast Foes of Toy Time": 170000063, - "TT: Luigi's Purple Coins": 170000064, + "TT: Heavy Metal Mecha Boswer": 170000086, + "TT: Mario (or Luigi) Meets Mario": 170000087, + "TT: Bouncing Down Cake Lane": 170000088, + "TT: The Flipswitch Chain": 170000089, + "TT: Fast Foes of Toy Time": 170000090, + "TT: Luigi's Purple Coins": 170000091, } locDD_table = { - "DD: The Underground Ghost Ship": 170000067, - "DD: Bubble Blastoff": 170000068, - "DD: Guppy and the Underground Lake": 170000069, - "DD: Ghost Ship Daredevil Run": 170000070, - "DD: Plunder the Purple Coins": 170000071, - "DD: Boo in Box": 170000072, + "DD: The Underground Ghost Ship": 170000092, + "DD: Bubble Blastoff": 170000093, + "DD: Guppy and the Underground Lake": 170000094, + "DD: Ghost Ship Daredevil Run": 170000095, + "DD: Plunder the Purple Coins": 170000096, + "DD: Boo in Box": 170000097, } locDN_table = { - "DN: Inflitrating the Dreadnought": 170000073, - "DN: Dreanought's Colossal Cannons": 170000074, - "DN: Revenge of the Topman Tribe": 170000075, - "DN: Topman Tribe Speed Run": 170000076, - "DN: Battlestation's Purple Coins": 170000077, - "DN: Dreadnought's Garbage Dump": 170000078, + "DN: Inflitrating the Dreadnought": 170000098, + "DN: Dreanought's Colossal Cannons": 170000099, + "DN: Revenge of the Topman Tribe": 170000100, + "DN: Topman Tribe Speed Run": 170000101, + "DN: Battlestation's Purple Coins": 170000102, + "DN: Dreadnought's Garbage Dump": 170000103, } locMM_table = { - "MM: The Sinking Lava Spire": 170000079, - "MM: Through the Meteor Storm": 170000080, - "MM: Fiery Dino Piranha": 170000081, - "MM: Lava Spire Daredevil Run": 170000082, - "MM: Red-Hot Purple Coins": 170000083, - "MM Burning Tide": 170000084, + "MM: The Sinking Lava Spire": 170000104, + "MM: Through the Meteor Storm": 170000105, + "MM: Fiery Dino Piranha": 170000106, + "MM: Lava Spire Daredevil Run": 170000107, + "MM: Red-Hot Purple Coins": 170000108, + "MM Burning Tide": 170000109, } locHL_table = { - "SS: Rocky Road": 170000085, - "SP: A Very Sticky Situation": 170000086, - "DDR: Giant Eel Breakout": 170000087, - "BM: Bigmouth's Gold Bait": 170000088, - "SS: Choosing a Favorite Snack": 170000089, - "BB: Racing the Spooky Speedster": 170000090, - "SC: Star Bunnies in the Snow": 170000091, + "SS: Rocky Road": 170000110, + "SP: A Very Sticky Situation": 170000111, + "DDR: Giant Eel Breakout": 170000112, + "BM: Bigmouth's Gold Bait": 170000113, + "SS: Choosing a Favorite Snack": 170000114, + "BB: Racing the Spooky Speedster": 170000115, + "SC: Star Bunnies in the Snow": 170000116, } location_table = { **locGE_table,**locHH_table, \ **locSJ_table,**locBR_table,**locBB_table, \ From 3b9208b1f23edf9dc2d5016ba3ac12ba5ee88d12 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Fri, 7 Oct 2022 23:18:26 -0500 Subject: [PATCH 49/71] 10-7 updates part 2 --- worlds/smgalaxy/Options.py | 4 ++-- worlds/smgalaxy/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py index 21900499567..0a69c9fe002 100644 --- a/worlds/smgalaxy/Options.py +++ b/worlds/smgalaxy/Options.py @@ -3,10 +3,10 @@ class EnablePurpleCoinStars(DefaultOnToggle): - """tuning this off we allow purple coin stars to count as checks do note all purple coin stars are postgame only but one.""" + """tuning this off we allow purple coin stars to count as checks *note all purple coin stars are postgame only but one.""" display_name = "Disable Purple Coin Stars" -smg_options: typing.Dict[str, type(DefaultOnToggle)] = { +smg_options: typing.Dict[str, type(Option)] = { "EnablePurpleCoinStars": EnablePurpleCoinStars, } diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index 06f09584337..b51f33e4fe8 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -4,7 +4,7 @@ from .Options import smg_options from .rules import set_star_rules from .regions import create_regions -from BaseClasses import Item, Tutorial, ItemClassification +from BaseClasses import Item, Tutorial, ItemClassification, Multiworld, Region, RegionType from ..AutoWorld import World, WebWorld client_version = 1 @@ -59,7 +59,7 @@ def generate_basic(self): self.world.itempool += [gstaritem for i in range(0,3)] staritem = self.create_item("Power Star") - if( not self.world.EnablePurpleCoinStars[self.player].value): + if(self.world.EnablePurpleCoinStars[self.player].value): self.world.itempool += [staritem for i in range(0,117)] else: self.world.itempool += [staritem for i in range(0,101)] From 7a5a330c10ebc956d6cbed0562da4636fa1a5eac Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 8 Oct 2022 09:13:17 -0500 Subject: [PATCH 50/71] 10-8 updates --- worlds/smgalaxy/Options.py | 7 +++---- worlds/smgalaxy/__init__.py | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py index 0a69c9fe002..b41e131e517 100644 --- a/worlds/smgalaxy/Options.py +++ b/worlds/smgalaxy/Options.py @@ -1,12 +1,11 @@ import typing -from Options import Choice, Option, Toggle, DefaultOnToggle, Range, OptionList +from Options import DefaultOnToggle, Option class EnablePurpleCoinStars(DefaultOnToggle): """tuning this off we allow purple coin stars to count as checks *note all purple coin stars are postgame only but one.""" display_name = "Disable Purple Coin Stars" -smg_options: typing.Dict[str, type(Option)] = { - "EnablePurpleCoinStars": EnablePurpleCoinStars, - +smg_options= { + "EnablePurpleCoinStars": EnablePurpleCoinStars } diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index b51f33e4fe8..c47bb1954f8 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -4,7 +4,7 @@ from .Options import smg_options from .rules import set_star_rules from .regions import create_regions -from BaseClasses import Item, Tutorial, ItemClassification, Multiworld, Region, RegionType +from BaseClasses import Item, Tutorial, ItemClassification from ..AutoWorld import World, WebWorld client_version = 1 @@ -59,7 +59,7 @@ def generate_basic(self): self.world.itempool += [gstaritem for i in range(0,3)] staritem = self.create_item("Power Star") - if(self.world.EnablePurpleCoinStars[self.player].value): + if(not self.world.EnablePurpleCoinStars[self.player].value): self.world.itempool += [staritem for i in range(0,117)] else: self.world.itempool += [staritem for i in range(0,101)] From b39066d62b3db7347427a18e94efc5822207fa7c Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 8 Oct 2022 22:55:00 -0500 Subject: [PATCH 51/71] Add files via upload --- worlds/smgalaxy/Options.py | 9 +++--- worlds/smgalaxy/__init__.py | 5 ++- worlds/smgalaxy/locations.py | 45 ++++++++++++++------------- worlds/smgalaxy/regions.py | 60 +++++++++++++++++++++++++++++------- 4 files changed, 80 insertions(+), 39 deletions(-) diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py index b41e131e517..7e5ce05be8e 100644 --- a/worlds/smgalaxy/Options.py +++ b/worlds/smgalaxy/Options.py @@ -1,11 +1,12 @@ +import imp import typing -from Options import DefaultOnToggle, Option +from Options import Option, DefaultOnToggle class EnablePurpleCoinStars(DefaultOnToggle): - """tuning this off we allow purple coin stars to count as checks *note all purple coin stars are postgame only but one.""" + """tuning this off we allow purple coin stars to count as checks do note all purple coin stars are postgame only but one.""" display_name = "Disable Purple Coin Stars" -smg_options= { - "EnablePurpleCoinStars": EnablePurpleCoinStars +smg_options: typing.Dict[str, type(Option)] = { + "DisablePurpleCoinStars": EnablePurpleCoinStars, } diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index c47bb1954f8..674f7ea0a8f 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -59,7 +59,7 @@ def generate_basic(self): self.world.itempool += [gstaritem for i in range(0,3)] staritem = self.create_item("Power Star") - if(not self.world.EnablePurpleCoinStars[self.player].value): + if(self.world.EnablePurpleCoinStars[self.player].value): self.world.itempool += [staritem for i in range(0,117)] else: self.world.itempool += [staritem for i in range(0,101)] @@ -69,5 +69,4 @@ def generate_basic(self): grandstar3 = self.create_item("Grand Star Kitchen") grandstar4 = self.create_item("Grand Star Bedroom") grandstar5 = self.create_item("Grand Star Engine Room") - self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] - + self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] \ No newline at end of file diff --git a/worlds/smgalaxy/locations.py b/worlds/smgalaxy/locations.py index 84ae97fb79a..5de1f35513f 100644 --- a/worlds/smgalaxy/locations.py +++ b/worlds/smgalaxy/locations.py @@ -9,7 +9,6 @@ class SMGLocation(Location): "GE: King Kaliente's Battle Fleet": 170000002, "GE: Luigi on the Roof": 170000003, "GE: Dino Piranha Speed Run": 170000004, - "GE: Purple Coin Omelet": 170000005, } locHH_table = { "HH: Bee Mario Takes Flight": 170000006, @@ -17,7 +16,6 @@ class SMGLocation(Location): "HH: Big Bad Bugabooom": 170000008, "HH: Luigi in the Honeyhive Kingdom": 17000009, "HH: Honeyhive Cosmic Mario Race": 170000010, - "HH: Honeyhive's Purple Coins": 170000011, } locspecialstages_table = { @@ -29,7 +27,6 @@ class SMGLocation(Location): "BB: The Floating Fortress": 170000017, "BB: The Secret of Buoy Base": 170000018, "GG: Grand Star Rescue": 170000019, - "GG: Gateway's Purple coins": 170000020, "BF: Kingfin's Fearsome Waters": 170000021, "MS: Watch Your Step": 170000022, "RGT: Gizmos, Gears, and Gadgets": 170000023, @@ -51,14 +48,12 @@ class SMGLocation(Location): "SJ: Tarantox's Tangled Web": 170000033, "SJ: Yoshi's Unexpected Apparence": 170000034, "SJ: Pull Star Path Speed Run": 170000035, - "SJ: Purple Coin Spacewalk": 170000036, } locBR_table = { "BR: Battlerock Barrage": 170000037, "BR: Breaking into the Battlerock": 170000038, "BR: Topmaniac's Garbage dump": 170000039, "BR: Topmanic's Dardevil Run": 170000040, - "BR: Purple Coins on the Battlerock": 170000041, "BR: Luigi under the Saucer": 170000042, } locBB_table = { @@ -66,7 +61,6 @@ class SMGLocation(Location): "BB: Passing the Swim Test": 170000044, "BB: The Secret Undersea Cavern": 170000045, "BB: Fast Foes on the Cyclone Stone": 170000046, - "BB: Beachcombing for Purple Coins": 170000047, "BB: Wall Jumping Water Falls": 170000048, } locG_table = { @@ -74,7 +68,6 @@ class SMGLocation(Location): "G: A Very Spooky Spirit": 170000050, "G: Beware of Bouldergeist": 170000051, "G: Bouldergeist's Daredevil Run": 170000052, - "G: Purple Coins in the Bone Pen": 170000053, "G: Matter Splatter Mansion": 170000054, } locGG_table = { @@ -82,7 +75,6 @@ class SMGLocation(Location): "GG: The Dirty Tricks of Major Burrows": 170000056, "GG: Gusty Garden's Gravity Scramble": 170000057, "GG: Major Burrows's Daredevil Run": 170000058, - "GG: Purple Coins on the Puzzle Cube": 170000059, "GG: The Golden Chomp": 170000060, } locFF_table = { @@ -91,13 +83,12 @@ class SMGLocation(Location): "FF: Hot and Cold Collide": 170000063, "FF: Conquring the Summit": 170000064, "FF: Frosty Cosmic Mario race": 170000065, - "FF: Purple Coins on the Summit": 170000066, } locDDune_table = { "DDune: Soaring on the Desert Winds": 170000067, "DDune: Blasting through the Sand": 170000068, "DDune: Sunbaked Sand Castle": 170000069, - "DDune: Purple Coin in the Desert": 170000070, + "DDune: Bullet Bill on Your Back": 170000071, "DDune: Bullet Bill on Your Back": 170000072, "DDune: Treasure of the Pyramid": 170000073, @@ -107,7 +98,6 @@ class SMGLocation(Location): "GL: Cataquack to the skies": 170000075, "GL: When it Rains, it Pours": 170000076, "GL: Cosmic Mario Forest Race": 170000077, - "GL: Purple Coins in the Woods": 170000078, "GL: The Bell on the Big Trees": 170000079, } locSS_table = { @@ -115,7 +105,6 @@ class SMGLocation(Location): "SS: Faster Than a Speedrunning Penguin": 170000081, "SS: The Silver Stars of Sea Slide": 170000082, "SS: Underwater Cosmic Mario Race": 170000083, - "SS: Purple Coins by the Seaside": 170000084, "SS: Hurry, He's Hungry": 170000085, } locTT_table = { @@ -124,14 +113,12 @@ class SMGLocation(Location): "TT: Bouncing Down Cake Lane": 170000088, "TT: The Flipswitch Chain": 170000089, "TT: Fast Foes of Toy Time": 170000090, - "TT: Luigi's Purple Coins": 170000091, } locDD_table = { "DD: The Underground Ghost Ship": 170000092, "DD: Bubble Blastoff": 170000093, "DD: Guppy and the Underground Lake": 170000094, "DD: Ghost Ship Daredevil Run": 170000095, - "DD: Plunder the Purple Coins": 170000096, "DD: Boo in Box": 170000097, } locDN_table = { @@ -139,7 +126,6 @@ class SMGLocation(Location): "DN: Dreanought's Colossal Cannons": 170000099, "DN: Revenge of the Topman Tribe": 170000100, "DN: Topman Tribe Speed Run": 170000101, - "DN: Battlestation's Purple Coins": 170000102, "DN: Dreadnought's Garbage Dump": 170000103, } locMM_table = { @@ -147,7 +133,6 @@ class SMGLocation(Location): "MM: Through the Meteor Storm": 170000105, "MM: Fiery Dino Piranha": 170000106, "MM: Lava Spire Daredevil Run": 170000107, - "MM: Red-Hot Purple Coins": 170000108, "MM Burning Tide": 170000109, } locHL_table = { @@ -159,10 +144,28 @@ class SMGLocation(Location): "BB: Racing the Spooky Speedster": 170000115, "SC: Star Bunnies in the Snow": 170000116, } +locPC_table = { + "TT: Luigi's Purple Coins": 170000091, + "DN: Battlestation's Purple Coins": 170000102, + "MM: Red-Hot Purple Coins": 170000108, + "DD: Plunder the Purple Coins": 170000096, + "SS: Purple Coins by the Seaside": 170000084, + "GE: Purple Coin Omelet": 170000005, + "GG: Gateway's Purple coins": 170000020, + "BR: Purple Coins on the Battlerock": 170000041, + "SJ: Purple Coin Spacewalk": 170000036, + "GG: Purple Coins on the Puzzle Cube": 170000059, + "BB: Beachcombing for Purple Coins": 170000047, + "FF: Purple Coins on the Summit": 170000066, + "G: Purple Coins in the Bone Pen": 170000053, + "GL: Purple Coins in the Woods": 170000078, + "DDune: Purple Coin in the Desert": 170000070, + "HH: The Honeyhive's Purple Coins": 170000011, +} location_table = { **locGE_table,**locHH_table, \ - **locSJ_table,**locBR_table,**locBB_table, \ - **locGG_table,**locFF_table,**locDDune_table, \ - **locGL_table,**locSS_table,**locTT_table, \ - **locDD_table,**locDN_table,**locMM_table, \ - **locHL_table,**locspecialstages_table,**locbosses_table + **locSJ_table,**locBR_table,**locBB_table, \ + **locGG_table,**locFF_table,**locDDune_table, \ + **locGL_table,**locSS_table,**locTT_table, \ + **locDD_table,**locDN_table,**locMM_table, \ + **locPC_table,**locHL_table,**locspecialstages_table,**locbosses_table } diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index 6e85d4a6c59..e1fad7f62e3 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -1,95 +1,127 @@ import imp import typing -from BaseClasses import MultiWorld, Region, Location, RegionType -from .locations import SMGLocation, location_table, locHH_table, locGE_table, \ - locSJ_table, locBR_table, locBB_table, \ - locGG_table, locFF_table, locDD_table, locDDune_table, \ - locGL_table, locSS_table, locTT_table, \ - locDN_table, locMM_table, \ - locHL_table, locbosses_table, locspecialstages_table -def create_regions(world: MultiWorld, player: int): - +from .Options import smg_options +from BaseClasses import Region, Location, RegionType, Entrance, Multiworld +from .locations import SMGLocation, location_table,locHH_table,locGE_table, \ + locSJ_table,locBR_table,locBB_table, \ + locGG_table,locFF_table,locDD_table,locDDune_table, \ + locGL_table,locSS_table,locTT_table, \ + locDN_table,locMM_table, \ + locHL_table,locbosses_table,locspecialstages_table +def create_regions(world: Multiworld, player: int): #defines the commet obserbatory regspecialstages = Region("Menu", RegionType.Generic, "Ship", player, world) locspecialstages_names = [name for name, id in locspecialstages_table.items()] locspecialstages_names = [name for name, id in locHL_table.items()] locspecialstages_names = [name for name, id in locbosses_table.items()] regspecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] + if (world.EnablePurpleCoinStars[player].value): + regspecialstages.locations.append(SMGLocation)(player, "GG: Gateway's Purple coins", location_table["GG: Gateway's Purple coins"], regspecialstages) world.regions.append(regspecialstages) # defines the good egg galaxy region regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) locGE_names = [name for name, id in locGE_table.items()] regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] + if (world.EnablePurpleCoinStars[player].value): + regGE.locations.append(SMGLocation)(player, "GE: Purple Coin Omelet", location_table["GE: Purple Coin Omelet"], regGE) world.regions.append(regGE) # defines the honeyhive galaxey region regHH = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, world) locHH_names = [name for name, id in locHH_table.items()] regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] + if (world.EnablePurpleCoinStars[player].value): + regHH.locations.append(SMGLocation)(player, "GE: The Honeyhive's Purple Coins", location_table["HH: The Honeyhive's Purple Coins"], regHH) world.regions.append(regHH) # defines the Space Junk galaxy region regSJ = Region("Space Junk", RegionType.Generic, "Space Junk", player, world) locSJ_names = [name for name, id in locSJ_table.items()] regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] + if (world.EnablePurpleCoinStars[player].value): + regHH.locations.append(SMGLocation)(player, "SJ: Purple Coin Spacewalk", location_table["SJ: Purple Coin Spacewalk"], regSJ) world.regions.append(regSJ) # defines the Battlerock galaxy regBR = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) locBR_names = [name for name, id in locBR_table.items()] regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] - world.regions.append(regBR) + if (world.EnablePurpleCoinStars[player].value): + regBR.locations.append(SMGLocation)(player, "BR: Purple Coins on the Battlerock", location_table["BR: Purple Coins on the Battlerock"], regBR) + world.regions.append(regBR) # defines the Beach Bowl galaxy regBB = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) locBB_names = [name for name, id in locBB_table.items()] regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] + if (world.EnablePurpleCoinStars[player].value): + regBB.locations.append(SMGLocation)(player, "BB: Beachcombing for Purple Coins", location_table["BB: Beachcombing for Purple Coins"], regBB) world.regions.append(regBB) # define Ghostly galaxy regG = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) locG_names = [name for name, id in locGG_table.items()] regG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regG) for loc_name in locG_names] + if (world.EnablePurpleCoinStars[player].value): + regG.locations.append(SMGLocation)(player, "G: Purple Coins in the Bone Pen", location_table["G: Purple Coins in the Bone Pen"], regG) world.regions.append(regG) # defines the Gusty Gardens galaxy regGG = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) locGG_names = [name for name, id in locGG_table.items()] regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] + if (world.EnablePurpleCoinStars[player].value): + regGG.locations.append(SMGLocation)(player, "GG: Purple Coins on the Puzzle Cube", location_table["GG: Purple Coins on the Puzzle Cube"], regGG) world.regions.append(regGG) # defines Freezeflame galaxy regFF = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) locFF_names = [name for name, id in locFF_table.items()] regFF.locations += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] + if (world.EnablePurpleCoinStars[player].value): + regGG.locations.append(SMGLocation)(player, "FF: Purple Coins on the Summit", location_table["FF: Purple Coins on the Summit"], regGG) world.regions.append(regFF) # defines DustyDune Galaxy regDDune = Region("Dusty Dune", RegionType.Generic, "Dusty Dune", player, world) locDDune_names = [name for name, id in locDDune_table.items()] regDDune.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDDune) for loc_name in locDDune_names] + if (world.EnablePurpleCoinStars[player].value): + regDDune.locations.append(SMGLocation)(player, "DDune: Purple Coins in the Desert", location_table["DDune: Purple Coin in the Desert"], regDDune) world.regions.append(regDDune) # defines golden leaf galaxy regGL = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) locGL_names = [name for name, id in locGL_table.items()] regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] + if (world.EnablePurpleCoinStars[player].value): + regGL.locations.append(SMGLocation)(player, "GL: Purple Coins in the Woods", location_table["GL: Purple Coins in the Woods"], regGL) world.regions.append(regGL) # defines the Sea slide galaxy regSS = Region("Sea Slide", RegionType.Generic, "Sea Slide", player, world) locSS_names = [name for name, id in locSS_table.items()] regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSS) for loc_name in locSS_names] - world.regions.append(regSS) + if (world.EnablePurpleCoinStars[player].value): + regSS.locations.append(SMGLocation)(player, "SS: Purple Coins by the Seaside", location_table["SS: Purple Coins by the Seaside"], regSS) + world.regions.append(regSS) # defines toy time galaxy regTT = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) locTT_names = [name for name, id in locTT_table.items()] regTT.locations += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] + if (world.EnablePurpleCoinStars[player].value): + regSS.locations.append(SMGLocation)(player, "TT: Luigi's Purple Coins", location_table["TT: Luigi's Purple Coins"], regSS) world.regions.append(regTT) # defines deep dark galaxy regDD = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, world) locDD_names = [name for name, id in locDD_table.items()] regDD.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] + if (world.EnablePurpleCoinStars[player].value): + regDD.locations.append(SMGLocation)(player, "DD: Plunder the Purple Coins", location_table["DD: Plunder the Purple Coins"], regDD) world.regions.append(regDD) # defines Dreadnaught galaxy regDN = Region("Dreadnaught", RegionType.Generic, "Dreadnaught", player, world) locDN_names = [name for name, id in locDN_table.items()] regDN.locations += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] + if (world.EnablePurpleCoinStars[player].value): + regDN.locations.append(SMGLocation)(player, "DN: Battlestation's Purple Coins", location_table["DN: Battlestation's Purple Coins"], regDN) world.regions.append(regDN) # defines Melty Molten galaxy regMM = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) locMM_names = [name for name, id in locMM_table.items()] regMM.locations += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] + if (world.EnablePurpleCoinStars[player].value): + regMM.locations.append(SMGLocation)(player, "MM: Red-Hot Purple Coins", location_table["MM: Red-Hot Purple Coins"], regMM) world.regions.append(regMM) #defines the fountain regFountain = Region("Fountain", RegionType.Generic, "Fountain", player, world) @@ -110,3 +142,9 @@ def create_regions(world: MultiWorld, player: int): def connect_regions(world: MultiWorld, player: int, source: str, target: str, rule): sourceRegion = world.get_region(source, player) targetRegion = world.get_region(target, player) + + connection = Entrance(player,'', sourceRegion) + connection.access_rule = rule + + sourceRegion.exits.append(connection) + connection.connect(targetRegion) From 27593728d645a1d111126e9375891dae0dff8384 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 8 Oct 2022 23:22:15 -0500 Subject: [PATCH 52/71] 10-8 changes 2 --- worlds/smgalaxy/Options.py | 4 ++-- worlds/smgalaxy/locations.py | 3 +-- worlds/smgalaxy/regions.py | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py index 7e5ce05be8e..0f5b5b220af 100644 --- a/worlds/smgalaxy/Options.py +++ b/worlds/smgalaxy/Options.py @@ -5,8 +5,8 @@ class EnablePurpleCoinStars(DefaultOnToggle): """tuning this off we allow purple coin stars to count as checks do note all purple coin stars are postgame only but one.""" - display_name = "Disable Purple Coin Stars" + display_name = "Enable Purple Coin Stars" smg_options: typing.Dict[str, type(Option)] = { - "DisablePurpleCoinStars": EnablePurpleCoinStars, + "EnablePurpleCoinStars": EnablePurpleCoinStars, } diff --git a/worlds/smgalaxy/locations.py b/worlds/smgalaxy/locations.py index 5de1f35513f..28f3b8f453c 100644 --- a/worlds/smgalaxy/locations.py +++ b/worlds/smgalaxy/locations.py @@ -167,5 +167,4 @@ class SMGLocation(Location): **locGG_table,**locFF_table,**locDDune_table, \ **locGL_table,**locSS_table,**locTT_table, \ **locDD_table,**locDN_table,**locMM_table, \ - **locPC_table,**locHL_table,**locspecialstages_table,**locbosses_table -} + **locPC_table,**locHL_table,**locspecialstages_table,**locbosses_table} diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index e1fad7f62e3..b6138a2b119 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -1,14 +1,14 @@ import imp import typing from .Options import smg_options -from BaseClasses import Region, Location, RegionType, Entrance, Multiworld +from BaseClasses import Region, Location, RegionType, Entrance, MultiWorld from .locations import SMGLocation, location_table,locHH_table,locGE_table, \ locSJ_table,locBR_table,locBB_table, \ locGG_table,locFF_table,locDD_table,locDDune_table, \ locGL_table,locSS_table,locTT_table, \ locDN_table,locMM_table, \ locHL_table,locbosses_table,locspecialstages_table -def create_regions(world: Multiworld, player: int): +def create_regions(world: MultiWorld, player: int): #defines the commet obserbatory regspecialstages = Region("Menu", RegionType.Generic, "Ship", player, world) locspecialstages_names = [name for name, id in locspecialstages_table.items()] From abc4e833b167b2e97fccd04e194aadf5d837c5cc Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sun, 9 Oct 2022 09:17:45 -0500 Subject: [PATCH 53/71] generation error fixes 5 --- worlds/smgalaxy/Options.py | 2 +- worlds/smgalaxy/__init__.py | 10 +++++----- worlds/smgalaxy/regions.py | 36 +++++++++++++++++++----------------- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py index 0f5b5b220af..0dc1391e24f 100644 --- a/worlds/smgalaxy/Options.py +++ b/worlds/smgalaxy/Options.py @@ -8,5 +8,5 @@ class EnablePurpleCoinStars(DefaultOnToggle): display_name = "Enable Purple Coin Stars" smg_options: typing.Dict[str, type(Option)] = { - "EnablePurpleCoinStars": EnablePurpleCoinStars, + "enable_purple_coin_stars": EnablePurpleCoinStars, } diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index 674f7ea0a8f..3096dfaa30a 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -4,7 +4,7 @@ from .Options import smg_options from .rules import set_star_rules from .regions import create_regions -from BaseClasses import Item, Tutorial, ItemClassification +from BaseClasses import Item, Tutorial, ItemClassification, Region, Location, RegionType, Entrance, MultiWorld from ..AutoWorld import World, WebWorld client_version = 1 @@ -38,10 +38,10 @@ class SuperMarioGalaxy(World): options = smg_options def create_regions(self): - create_regions(self.world,self.player) + create_regions(self.world,self.player, location_table) def set_star_rules(self): - set_star_rules(self.world, self.player) + set_star_rules(self.world,self.player) def create_item(self, name: str) -> Item: item_id = item_table[name] @@ -54,12 +54,12 @@ def create_item(self, name: str) -> Item: return item - def generate_basic(self): + def generate_basic(self, player): gstaritem = self.create_item("Green Star") self.world.itempool += [gstaritem for i in range(0,3)] staritem = self.create_item("Power Star") - if(self.world.EnablePurpleCoinStars[self.player].value): + if(self.world.enable_purple_coin_stars[player]): self.world.itempool += [staritem for i in range(0,117)] else: self.world.itempool += [staritem for i in range(0,101)] diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index b6138a2b119..9e4570e8964 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -8,119 +8,121 @@ locGL_table,locSS_table,locTT_table, \ locDN_table,locMM_table, \ locHL_table,locbosses_table,locspecialstages_table -def create_regions(world: MultiWorld, player: int): + + +def create_regions(world: MultiWorld, player: int, self: int): #defines the commet obserbatory regspecialstages = Region("Menu", RegionType.Generic, "Ship", player, world) locspecialstages_names = [name for name, id in locspecialstages_table.items()] locspecialstages_names = [name for name, id in locHL_table.items()] locspecialstages_names = [name for name, id in locbosses_table.items()] regspecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regspecialstages.locations.append(SMGLocation)(player, "GG: Gateway's Purple coins", location_table["GG: Gateway's Purple coins"], regspecialstages) world.regions.append(regspecialstages) # defines the good egg galaxy region regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) locGE_names = [name for name, id in locGE_table.items()] regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regGE.locations.append(SMGLocation)(player, "GE: Purple Coin Omelet", location_table["GE: Purple Coin Omelet"], regGE) world.regions.append(regGE) # defines the honeyhive galaxey region regHH = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, world) locHH_names = [name for name, id in locHH_table.items()] regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regHH.locations.append(SMGLocation)(player, "GE: The Honeyhive's Purple Coins", location_table["HH: The Honeyhive's Purple Coins"], regHH) world.regions.append(regHH) # defines the Space Junk galaxy region regSJ = Region("Space Junk", RegionType.Generic, "Space Junk", player, world) locSJ_names = [name for name, id in locSJ_table.items()] regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regHH.locations.append(SMGLocation)(player, "SJ: Purple Coin Spacewalk", location_table["SJ: Purple Coin Spacewalk"], regSJ) world.regions.append(regSJ) # defines the Battlerock galaxy regBR = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) locBR_names = [name for name, id in locBR_table.items()] regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regBR.locations.append(SMGLocation)(player, "BR: Purple Coins on the Battlerock", location_table["BR: Purple Coins on the Battlerock"], regBR) world.regions.append(regBR) # defines the Beach Bowl galaxy regBB = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) locBB_names = [name for name, id in locBB_table.items()] regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regBB.locations.append(SMGLocation)(player, "BB: Beachcombing for Purple Coins", location_table["BB: Beachcombing for Purple Coins"], regBB) world.regions.append(regBB) # define Ghostly galaxy regG = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) locG_names = [name for name, id in locGG_table.items()] regG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regG) for loc_name in locG_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regG.locations.append(SMGLocation)(player, "G: Purple Coins in the Bone Pen", location_table["G: Purple Coins in the Bone Pen"], regG) world.regions.append(regG) # defines the Gusty Gardens galaxy regGG = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) locGG_names = [name for name, id in locGG_table.items()] regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regGG.locations.append(SMGLocation)(player, "GG: Purple Coins on the Puzzle Cube", location_table["GG: Purple Coins on the Puzzle Cube"], regGG) world.regions.append(regGG) # defines Freezeflame galaxy regFF = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) locFF_names = [name for name, id in locFF_table.items()] regFF.locations += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regGG.locations.append(SMGLocation)(player, "FF: Purple Coins on the Summit", location_table["FF: Purple Coins on the Summit"], regGG) world.regions.append(regFF) # defines DustyDune Galaxy regDDune = Region("Dusty Dune", RegionType.Generic, "Dusty Dune", player, world) locDDune_names = [name for name, id in locDDune_table.items()] regDDune.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDDune) for loc_name in locDDune_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regDDune.locations.append(SMGLocation)(player, "DDune: Purple Coins in the Desert", location_table["DDune: Purple Coin in the Desert"], regDDune) world.regions.append(regDDune) # defines golden leaf galaxy regGL = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) locGL_names = [name for name, id in locGL_table.items()] regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regGL.locations.append(SMGLocation)(player, "GL: Purple Coins in the Woods", location_table["GL: Purple Coins in the Woods"], regGL) world.regions.append(regGL) # defines the Sea slide galaxy regSS = Region("Sea Slide", RegionType.Generic, "Sea Slide", player, world) locSS_names = [name for name, id in locSS_table.items()] regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSS) for loc_name in locSS_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regSS.locations.append(SMGLocation)(player, "SS: Purple Coins by the Seaside", location_table["SS: Purple Coins by the Seaside"], regSS) world.regions.append(regSS) # defines toy time galaxy regTT = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) locTT_names = [name for name, id in locTT_table.items()] regTT.locations += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regSS.locations.append(SMGLocation)(player, "TT: Luigi's Purple Coins", location_table["TT: Luigi's Purple Coins"], regSS) world.regions.append(regTT) # defines deep dark galaxy regDD = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, world) locDD_names = [name for name, id in locDD_table.items()] regDD.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regDD.locations.append(SMGLocation)(player, "DD: Plunder the Purple Coins", location_table["DD: Plunder the Purple Coins"], regDD) world.regions.append(regDD) # defines Dreadnaught galaxy regDN = Region("Dreadnaught", RegionType.Generic, "Dreadnaught", player, world) locDN_names = [name for name, id in locDN_table.items()] regDN.locations += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regDN.locations.append(SMGLocation)(player, "DN: Battlestation's Purple Coins", location_table["DN: Battlestation's Purple Coins"], regDN) world.regions.append(regDN) # defines Melty Molten galaxy regMM = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) locMM_names = [name for name, id in locMM_table.items()] regMM.locations += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] - if (world.EnablePurpleCoinStars[player].value): + if (self.world.enable_purple_coin_stars[player]): regMM.locations.append(SMGLocation)(player, "MM: Red-Hot Purple Coins", location_table["MM: Red-Hot Purple Coins"], regMM) world.regions.append(regMM) #defines the fountain From ea58e9649cf85d793f0007de552a555a54118a4a Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 12 Oct 2022 07:40:44 -0500 Subject: [PATCH 54/71] remove extra import --- worlds/smgalaxy/Options.py | 1 - 1 file changed, 1 deletion(-) diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py index 0dc1391e24f..7a8ee5b65a9 100644 --- a/worlds/smgalaxy/Options.py +++ b/worlds/smgalaxy/Options.py @@ -1,4 +1,3 @@ -import imp import typing from Options import Option, DefaultOnToggle From 35db2dc1a7f476f19f9d7038f06a28ec4882afc3 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Tue, 25 Oct 2022 19:41:24 -0500 Subject: [PATCH 55/71] make purple coin star choice --- worlds/smgalaxy/Options.py | 26 ++++++++++++++++++------ worlds/smgalaxy/__init__.py | 6 +++++- worlds/smgalaxy/locations.py | 39 ++++++++++++++++++------------------ worlds/smgalaxy/regions.py | 34 +++++++++++++++---------------- 4 files changed, 61 insertions(+), 44 deletions(-) diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py index 7a8ee5b65a9..513e8018290 100644 --- a/worlds/smgalaxy/Options.py +++ b/worlds/smgalaxy/Options.py @@ -1,11 +1,25 @@ import typing -from Options import Option, DefaultOnToggle - - -class EnablePurpleCoinStars(DefaultOnToggle): +from Options import Option, Choice, Range + + +class EnablePurpleCoinStars(Choice): """tuning this off we allow purple coin stars to count as checks do note all purple coin stars are postgame only but one.""" - display_name = "Enable Purple Coin Stars" - + display_name = "enable_purple_coin_stars" + option_main_game_only = 0 + option_all = 1 + option_none = 2 + default = 0 + +class StarstoFinish(Range): + "This will set the number of stars required to reach the center of the universe." + display_name = "Stars_to_finish" + range_start = 25 + range_end = 99 + default = 60 + smg_options: typing.Dict[str, type(Option)] = { "enable_purple_coin_stars": EnablePurpleCoinStars, + "Stars_to_finish": StarstoFinish, } + + diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index 3096dfaa30a..e8c7e1ee630 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -59,8 +59,12 @@ def generate_basic(self, player): self.world.itempool += [gstaritem for i in range(0,3)] staritem = self.create_item("Power Star") - if(self.world.enable_purple_coin_stars[player]): + if(self.world.enable_purple_coin_stars == 1 [self.player]): self.world.itempool += [staritem for i in range(0,117)] + + elif self.world.enable_purple_coin_stars == 0 [self.player]: + self.world.itempool += [staritem for i in range(0,118)] + else: self.world.itempool += [staritem for i in range(0,101)] diff --git a/worlds/smgalaxy/locations.py b/worlds/smgalaxy/locations.py index 28f3b8f453c..ce8980e9636 100644 --- a/worlds/smgalaxy/locations.py +++ b/worlds/smgalaxy/locations.py @@ -8,14 +8,14 @@ class SMGLocation(Location): "GE: A Snack of Cosmic Proportions": 170000001, "GE: King Kaliente's Battle Fleet": 170000002, "GE: Luigi on the Roof": 170000003, - "GE: Dino Piranha Speed Run": 170000004, + "GE: Dino Piranha Speed Run": 170000004 } locHH_table = { "HH: Bee Mario Takes Flight": 170000006, "HH: Trouble on the Tower": 170000007, "HH: Big Bad Bugabooom": 170000008, "HH: Luigi in the Honeyhive Kingdom": 17000009, - "HH: Honeyhive Cosmic Mario Race": 170000010, + "HH: Honeyhive Cosmic Mario Race": 170000010 } locspecialstages_table = { @@ -31,7 +31,7 @@ class SMGLocation(Location): "MS: Watch Your Step": 170000022, "RGT: Gizmos, Gears, and Gadgets": 170000023, "LDT: The Galaxy's Greatest Wave": 170000024, - "BBT: The Electric Labyrinth": 170000025, + "BBT: The Electric Labyrinth": 170000025 } locbosses_table = { @@ -39,7 +39,7 @@ class SMGLocation(Location): "B: The Firery Stronghold": 170000027, "BJ: Sinking the Airships": 170000028, "BJ: King Kaliente's Spicy Return": 170000029, - "B: Darkness on the Horizon": 170000030, + "B: Darkness on the Horizon": 170000030 } locSJ_table = { @@ -47,93 +47,92 @@ class SMGLocation(Location): "SJ: Kamella's Airship Attack": 170000032, "SJ: Tarantox's Tangled Web": 170000033, "SJ: Yoshi's Unexpected Apparence": 170000034, - "SJ: Pull Star Path Speed Run": 170000035, + "SJ: Pull Star Path Speed Run": 170000035 } locBR_table = { "BR: Battlerock Barrage": 170000037, "BR: Breaking into the Battlerock": 170000038, "BR: Topmaniac's Garbage dump": 170000039, "BR: Topmanic's Dardevil Run": 170000040, - "BR: Luigi under the Saucer": 170000042, + "BR: Luigi under the Saucer": 170000042 } locBB_table = { "BB: Sunken Treasure": 170000043, "BB: Passing the Swim Test": 170000044, "BB: The Secret Undersea Cavern": 170000045, "BB: Fast Foes on the Cyclone Stone": 170000046, - "BB: Wall Jumping Water Falls": 170000048, + "BB: Wall Jumping Water Falls": 170000048 } locG_table = { "G: Luigi and the Haunted Mansion": 170000049, "G: A Very Spooky Spirit": 170000050, "G: Beware of Bouldergeist": 170000051, "G: Bouldergeist's Daredevil Run": 170000052, - "G: Matter Splatter Mansion": 170000054, + "G: Matter Splatter Mansion": 170000054 } locGG_table = { "GG: Bunnies in the Wind": 170000055, "GG: The Dirty Tricks of Major Burrows": 170000056, "GG: Gusty Garden's Gravity Scramble": 170000057, "GG: Major Burrows's Daredevil Run": 170000058, - "GG: The Golden Chomp": 170000060, + "GG: The Golden Chomp": 170000060 } locFF_table = { "FF: The Frozen Peak of Baron Brr": 170000061, "FF: Freezeflame's Blistering Coore": 170000062, "FF: Hot and Cold Collide": 170000063, "FF: Conquring the Summit": 170000064, - "FF: Frosty Cosmic Mario race": 170000065, + "FF: Frosty Cosmic Mario race": 170000065 } locDDune_table = { "DDune: Soaring on the Desert Winds": 170000067, "DDune: Blasting through the Sand": 170000068, "DDune: Sunbaked Sand Castle": 170000069, - "DDune: Bullet Bill on Your Back": 170000071, "DDune: Bullet Bill on Your Back": 170000072, - "DDune: Treasure of the Pyramid": 170000073, + "DDune: Treasure of the Pyramid": 170000073 } locGL_table = { "GL: Star Bunnies on the Hunt": 170000074, "GL: Cataquack to the skies": 170000075, "GL: When it Rains, it Pours": 170000076, "GL: Cosmic Mario Forest Race": 170000077, - "GL: The Bell on the Big Trees": 170000079, + "GL: The Bell on the Big Trees": 170000079 } locSS_table = { "SS: Going After Guppy": 170000080, "SS: Faster Than a Speedrunning Penguin": 170000081, "SS: The Silver Stars of Sea Slide": 170000082, "SS: Underwater Cosmic Mario Race": 170000083, - "SS: Hurry, He's Hungry": 170000085, + "SS: Hurry, He's Hungry": 170000085 } locTT_table = { "TT: Heavy Metal Mecha Boswer": 170000086, "TT: Mario (or Luigi) Meets Mario": 170000087, "TT: Bouncing Down Cake Lane": 170000088, "TT: The Flipswitch Chain": 170000089, - "TT: Fast Foes of Toy Time": 170000090, + "TT: Fast Foes of Toy Time": 170000090 } locDD_table = { "DD: The Underground Ghost Ship": 170000092, "DD: Bubble Blastoff": 170000093, "DD: Guppy and the Underground Lake": 170000094, "DD: Ghost Ship Daredevil Run": 170000095, - "DD: Boo in Box": 170000097, + "DD: Boo in Box": 170000097 } locDN_table = { "DN: Inflitrating the Dreadnought": 170000098, "DN: Dreanought's Colossal Cannons": 170000099, "DN: Revenge of the Topman Tribe": 170000100, "DN: Topman Tribe Speed Run": 170000101, - "DN: Dreadnought's Garbage Dump": 170000103, + "DN: Dreadnought's Garbage Dump": 170000103 } locMM_table = { "MM: The Sinking Lava Spire": 170000104, "MM: Through the Meteor Storm": 170000105, "MM: Fiery Dino Piranha": 170000106, "MM: Lava Spire Daredevil Run": 170000107, - "MM Burning Tide": 170000109, + "MM Burning Tide": 170000109 } locHL_table = { "SS: Rocky Road": 170000110, @@ -142,7 +141,7 @@ class SMGLocation(Location): "BM: Bigmouth's Gold Bait": 170000113, "SS: Choosing a Favorite Snack": 170000114, "BB: Racing the Spooky Speedster": 170000115, - "SC: Star Bunnies in the Snow": 170000116, + "SC: Star Bunnies in the Snow": 170000116 } locPC_table = { "TT: Luigi's Purple Coins": 170000091, @@ -160,7 +159,7 @@ class SMGLocation(Location): "G: Purple Coins in the Bone Pen": 170000053, "GL: Purple Coins in the Woods": 170000078, "DDune: Purple Coin in the Desert": 170000070, - "HH: The Honeyhive's Purple Coins": 170000011, + "HH: The Honeyhive's Purple Coins": 170000011 } location_table = { **locGE_table,**locHH_table, \ **locSJ_table,**locBR_table,**locBB_table, \ diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index 9e4570e8964..79de083a35c 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -17,112 +17,112 @@ def create_regions(world: MultiWorld, player: int, self: int): locspecialstages_names = [name for name, id in locHL_table.items()] locspecialstages_names = [name for name, id in locbosses_table.items()] regspecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 0 [self.player]: regspecialstages.locations.append(SMGLocation)(player, "GG: Gateway's Purple coins", location_table["GG: Gateway's Purple coins"], regspecialstages) world.regions.append(regspecialstages) # defines the good egg galaxy region regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) locGE_names = [name for name, id in locGE_table.items()] regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regGE.locations.append(SMGLocation)(player, "GE: Purple Coin Omelet", location_table["GE: Purple Coin Omelet"], regGE) world.regions.append(regGE) # defines the honeyhive galaxey region regHH = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, world) locHH_names = [name for name, id in locHH_table.items()] regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regHH.locations.append(SMGLocation)(player, "GE: The Honeyhive's Purple Coins", location_table["HH: The Honeyhive's Purple Coins"], regHH) world.regions.append(regHH) # defines the Space Junk galaxy region regSJ = Region("Space Junk", RegionType.Generic, "Space Junk", player, world) locSJ_names = [name for name, id in locSJ_table.items()] regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regHH.locations.append(SMGLocation)(player, "SJ: Purple Coin Spacewalk", location_table["SJ: Purple Coin Spacewalk"], regSJ) world.regions.append(regSJ) # defines the Battlerock galaxy regBR = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) locBR_names = [name for name, id in locBR_table.items()] regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regBR.locations.append(SMGLocation)(player, "BR: Purple Coins on the Battlerock", location_table["BR: Purple Coins on the Battlerock"], regBR) world.regions.append(regBR) # defines the Beach Bowl galaxy regBB = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) locBB_names = [name for name, id in locBB_table.items()] regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regBB.locations.append(SMGLocation)(player, "BB: Beachcombing for Purple Coins", location_table["BB: Beachcombing for Purple Coins"], regBB) world.regions.append(regBB) # define Ghostly galaxy regG = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) locG_names = [name for name, id in locGG_table.items()] regG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regG) for loc_name in locG_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regG.locations.append(SMGLocation)(player, "G: Purple Coins in the Bone Pen", location_table["G: Purple Coins in the Bone Pen"], regG) world.regions.append(regG) # defines the Gusty Gardens galaxy regGG = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) locGG_names = [name for name, id in locGG_table.items()] regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regGG.locations.append(SMGLocation)(player, "GG: Purple Coins on the Puzzle Cube", location_table["GG: Purple Coins on the Puzzle Cube"], regGG) world.regions.append(regGG) # defines Freezeflame galaxy regFF = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) locFF_names = [name for name, id in locFF_table.items()] regFF.locations += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regGG.locations.append(SMGLocation)(player, "FF: Purple Coins on the Summit", location_table["FF: Purple Coins on the Summit"], regGG) world.regions.append(regFF) # defines DustyDune Galaxy regDDune = Region("Dusty Dune", RegionType.Generic, "Dusty Dune", player, world) locDDune_names = [name for name, id in locDDune_table.items()] regDDune.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDDune) for loc_name in locDDune_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regDDune.locations.append(SMGLocation)(player, "DDune: Purple Coins in the Desert", location_table["DDune: Purple Coin in the Desert"], regDDune) world.regions.append(regDDune) # defines golden leaf galaxy regGL = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) locGL_names = [name for name, id in locGL_table.items()] regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regGL.locations.append(SMGLocation)(player, "GL: Purple Coins in the Woods", location_table["GL: Purple Coins in the Woods"], regGL) world.regions.append(regGL) # defines the Sea slide galaxy regSS = Region("Sea Slide", RegionType.Generic, "Sea Slide", player, world) locSS_names = [name for name, id in locSS_table.items()] regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSS) for loc_name in locSS_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regSS.locations.append(SMGLocation)(player, "SS: Purple Coins by the Seaside", location_table["SS: Purple Coins by the Seaside"], regSS) world.regions.append(regSS) # defines toy time galaxy regTT = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) locTT_names = [name for name, id in locTT_table.items()] regTT.locations += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regSS.locations.append(SMGLocation)(player, "TT: Luigi's Purple Coins", location_table["TT: Luigi's Purple Coins"], regSS) world.regions.append(regTT) # defines deep dark galaxy regDD = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, world) locDD_names = [name for name, id in locDD_table.items()] regDD.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regDD.locations.append(SMGLocation)(player, "DD: Plunder the Purple Coins", location_table["DD: Plunder the Purple Coins"], regDD) world.regions.append(regDD) # defines Dreadnaught galaxy regDN = Region("Dreadnaught", RegionType.Generic, "Dreadnaught", player, world) locDN_names = [name for name, id in locDN_table.items()] regDN.locations += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regDN.locations.append(SMGLocation)(player, "DN: Battlestation's Purple Coins", location_table["DN: Battlestation's Purple Coins"], regDN) world.regions.append(regDN) # defines Melty Molten galaxy regMM = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) locMM_names = [name for name, id in locMM_table.items()] regMM.locations += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] - if (self.world.enable_purple_coin_stars[player]): + if self.world.enable_purple_coin_stars == 1 [self.player]: regMM.locations.append(SMGLocation)(player, "MM: Red-Hot Purple Coins", location_table["MM: Red-Hot Purple Coins"], regMM) world.regions.append(regMM) #defines the fountain @@ -149,4 +149,4 @@ def connect_regions(world: MultiWorld, player: int, source: str, target: str, ru connection.access_rule = rule sourceRegion.exits.append(connection) - connection.connect(targetRegion) + connection.connect(targetRegion) \ No newline at end of file From 7378961631f54375df02a799489a4c138d0171dd Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:05:39 -0500 Subject: [PATCH 56/71] changes check for enable purple coin stars --- worlds/smgalaxy/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index e8c7e1ee630..daa33f8c772 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -59,10 +59,10 @@ def generate_basic(self, player): self.world.itempool += [gstaritem for i in range(0,3)] staritem = self.create_item("Power Star") - if(self.world.enable_purple_coin_stars == 1 [self.player]): + if(self.world.enable_purple_coin_stars.value == 1 [self.player]): self.world.itempool += [staritem for i in range(0,117)] - elif self.world.enable_purple_coin_stars == 0 [self.player]: + elif self.world.enable_purple_coin_stars.value == 0 [self.player]: self.world.itempool += [staritem for i in range(0,118)] else: @@ -73,4 +73,4 @@ def generate_basic(self, player): grandstar3 = self.create_item("Grand Star Kitchen") grandstar4 = self.create_item("Grand Star Bedroom") grandstar5 = self.create_item("Grand Star Engine Room") - self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] \ No newline at end of file + self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] From 5f9c185ebf27e11e2b3f97d41864e9fd9d97410a Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:08:17 -0500 Subject: [PATCH 57/71] comment options.py --- worlds/smgalaxy/Options.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py index 513e8018290..6e824f72e7a 100644 --- a/worlds/smgalaxy/Options.py +++ b/worlds/smgalaxy/Options.py @@ -1,7 +1,7 @@ import typing from Options import Option, Choice, Range - +# this defines the enable_purple_coin_stars setting class EnablePurpleCoinStars(Choice): """tuning this off we allow purple coin stars to count as checks do note all purple coin stars are postgame only but one.""" display_name = "enable_purple_coin_stars" @@ -9,7 +9,8 @@ class EnablePurpleCoinStars(Choice): option_all = 1 option_none = 2 default = 0 - + +# this allows players to pick their own star count to finish the game. class StarstoFinish(Range): "This will set the number of stars required to reach the center of the universe." display_name = "Stars_to_finish" @@ -17,6 +18,7 @@ class StarstoFinish(Range): range_end = 99 default = 60 +# this defines all the options. smg_options: typing.Dict[str, type(Option)] = { "enable_purple_coin_stars": EnablePurpleCoinStars, "Stars_to_finish": StarstoFinish, From e7059ba402be9579a63b69cc6117085238f49a0f Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:11:13 -0500 Subject: [PATCH 58/71] comment items.py --- worlds/smgalaxy/items.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/smgalaxy/items.py b/worlds/smgalaxy/items.py index 1a7abd70f0a..e575e05e561 100644 --- a/worlds/smgalaxy/items.py +++ b/worlds/smgalaxy/items.py @@ -1,9 +1,9 @@ from BaseClasses import Item - +# this lets us use these items by using SMGItem. class SMGItem(Item): game: str = "Super Mario Galaxy" - +# This is all the items that are used by the game we define them here so the they can be used. item_table = { "Power Star": 170000000, "Grand Star Terrace": 170000001, @@ -12,4 +12,4 @@ class SMGItem(Item): "Grand Star Bedroom": 170000004, "Grand Star Engine Room": 170000005, "Green Star": 170000006, -} \ No newline at end of file +} From 74401a0447f066bfdbafeb29a08bb2461aff59a6 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:13:53 -0500 Subject: [PATCH 59/71] comment rules.py --- worlds/smgalaxy/rules.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worlds/smgalaxy/rules.py b/worlds/smgalaxy/rules.py index 72e6432f2d3..5176ab2fe25 100644 --- a/worlds/smgalaxy/rules.py +++ b/worlds/smgalaxy/rules.py @@ -3,8 +3,9 @@ from worlds.AutoWorld import LogicMixin from ..generic.Rules import add_rule from .regions import connect_regions + class GalaxyLogic(LogicMixin): - +# these are varible states that the game uses for logic in different points. def smg_gate_open(self, player: int): return self.has('Grand Star Engine Room', player) @@ -93,4 +94,4 @@ def set_star_rules(world,player): add_rule(world.get_location("HH: Honeyhive's Purple Coins", player), lambda state: state.smg_purple_coins(player)) add_rule(world.get_location("SJ: Purple Coin Spacewalk", player), lambda state: state.smg_purple_coins(player)) - world.completion_condition[player] = lambda state: state.smg_can_finish(player) \ No newline at end of file + world.completion_condition[player] = lambda state: state.smg_can_finish(player) From bc2266423e22395a9d2e781ad203577dd75de080 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 26 Oct 2022 13:25:15 -0500 Subject: [PATCH 60/71] swap order on if statements and add .value --- worlds/smgalaxy/regions.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index 79de083a35c..3df605686b3 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -17,112 +17,112 @@ def create_regions(world: MultiWorld, player: int, self: int): locspecialstages_names = [name for name, id in locHL_table.items()] locspecialstages_names = [name for name, id in locbosses_table.items()] regspecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] - if self.world.enable_purple_coin_stars == 0 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 0: regspecialstages.locations.append(SMGLocation)(player, "GG: Gateway's Purple coins", location_table["GG: Gateway's Purple coins"], regspecialstages) world.regions.append(regspecialstages) # defines the good egg galaxy region regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) locGE_names = [name for name, id in locGE_table.items()] regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regGE.locations.append(SMGLocation)(player, "GE: Purple Coin Omelet", location_table["GE: Purple Coin Omelet"], regGE) world.regions.append(regGE) # defines the honeyhive galaxey region regHH = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, world) locHH_names = [name for name, id in locHH_table.items()] regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regHH.locations.append(SMGLocation)(player, "GE: The Honeyhive's Purple Coins", location_table["HH: The Honeyhive's Purple Coins"], regHH) world.regions.append(regHH) # defines the Space Junk galaxy region regSJ = Region("Space Junk", RegionType.Generic, "Space Junk", player, world) locSJ_names = [name for name, id in locSJ_table.items()] regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regHH.locations.append(SMGLocation)(player, "SJ: Purple Coin Spacewalk", location_table["SJ: Purple Coin Spacewalk"], regSJ) world.regions.append(regSJ) # defines the Battlerock galaxy regBR = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) locBR_names = [name for name, id in locBR_table.items()] regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regBR.locations.append(SMGLocation)(player, "BR: Purple Coins on the Battlerock", location_table["BR: Purple Coins on the Battlerock"], regBR) world.regions.append(regBR) # defines the Beach Bowl galaxy regBB = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) locBB_names = [name for name, id in locBB_table.items()] regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regBB.locations.append(SMGLocation)(player, "BB: Beachcombing for Purple Coins", location_table["BB: Beachcombing for Purple Coins"], regBB) world.regions.append(regBB) # define Ghostly galaxy regG = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) locG_names = [name for name, id in locGG_table.items()] regG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regG) for loc_name in locG_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regG.locations.append(SMGLocation)(player, "G: Purple Coins in the Bone Pen", location_table["G: Purple Coins in the Bone Pen"], regG) world.regions.append(regG) # defines the Gusty Gardens galaxy regGG = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) locGG_names = [name for name, id in locGG_table.items()] regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regGG.locations.append(SMGLocation)(player, "GG: Purple Coins on the Puzzle Cube", location_table["GG: Purple Coins on the Puzzle Cube"], regGG) world.regions.append(regGG) # defines Freezeflame galaxy regFF = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) locFF_names = [name for name, id in locFF_table.items()] regFF.locations += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regGG.locations.append(SMGLocation)(player, "FF: Purple Coins on the Summit", location_table["FF: Purple Coins on the Summit"], regGG) world.regions.append(regFF) # defines DustyDune Galaxy regDDune = Region("Dusty Dune", RegionType.Generic, "Dusty Dune", player, world) locDDune_names = [name for name, id in locDDune_table.items()] regDDune.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDDune) for loc_name in locDDune_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regDDune.locations.append(SMGLocation)(player, "DDune: Purple Coins in the Desert", location_table["DDune: Purple Coin in the Desert"], regDDune) world.regions.append(regDDune) # defines golden leaf galaxy regGL = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) locGL_names = [name for name, id in locGL_table.items()] regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regGL.locations.append(SMGLocation)(player, "GL: Purple Coins in the Woods", location_table["GL: Purple Coins in the Woods"], regGL) world.regions.append(regGL) # defines the Sea slide galaxy regSS = Region("Sea Slide", RegionType.Generic, "Sea Slide", player, world) locSS_names = [name for name, id in locSS_table.items()] regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSS) for loc_name in locSS_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regSS.locations.append(SMGLocation)(player, "SS: Purple Coins by the Seaside", location_table["SS: Purple Coins by the Seaside"], regSS) world.regions.append(regSS) # defines toy time galaxy regTT = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) locTT_names = [name for name, id in locTT_table.items()] regTT.locations += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regSS.locations.append(SMGLocation)(player, "TT: Luigi's Purple Coins", location_table["TT: Luigi's Purple Coins"], regSS) world.regions.append(regTT) # defines deep dark galaxy regDD = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, world) locDD_names = [name for name, id in locDD_table.items()] regDD.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regDD.locations.append(SMGLocation)(player, "DD: Plunder the Purple Coins", location_table["DD: Plunder the Purple Coins"], regDD) world.regions.append(regDD) # defines Dreadnaught galaxy regDN = Region("Dreadnaught", RegionType.Generic, "Dreadnaught", player, world) locDN_names = [name for name, id in locDN_table.items()] regDN.locations += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regDN.locations.append(SMGLocation)(player, "DN: Battlestation's Purple Coins", location_table["DN: Battlestation's Purple Coins"], regDN) world.regions.append(regDN) # defines Melty Molten galaxy regMM = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) locMM_names = [name for name, id in locMM_table.items()] regMM.locations += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] - if self.world.enable_purple_coin_stars == 1 [self.player]: + if self.world.enable_purple_coin_stars[self.player].value == 1: regMM.locations.append(SMGLocation)(player, "MM: Red-Hot Purple Coins", location_table["MM: Red-Hot Purple Coins"], regMM) world.regions.append(regMM) #defines the fountain @@ -149,4 +149,4 @@ def connect_regions(world: MultiWorld, player: int, source: str, target: str, ru connection.access_rule = rule sourceRegion.exits.append(connection) - connection.connect(targetRegion) \ No newline at end of file + connection.connect(targetRegion) From 4ea29514ceb8ce738437ac25a3140a613a9f94e5 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 26 Oct 2022 13:26:34 -0500 Subject: [PATCH 61/71] update order on if statements and add .value 2 --- worlds/smgalaxy/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index daa33f8c772..a1810ab3af9 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -59,10 +59,10 @@ def generate_basic(self, player): self.world.itempool += [gstaritem for i in range(0,3)] staritem = self.create_item("Power Star") - if(self.world.enable_purple_coin_stars.value == 1 [self.player]): + if self.world.enable_purple_coin_stars[self.player].value == 1: self.world.itempool += [staritem for i in range(0,117)] - elif self.world.enable_purple_coin_stars.value == 0 [self.player]: + elif self.world.enable_purple_coin_stars[self.player].value == 1: self.world.itempool += [staritem for i in range(0,118)] else: From 01af828419104dcadf411a0364f70ed07029a141 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Tue, 1 Nov 2022 08:04:49 -0500 Subject: [PATCH 62/71] change world to multiworld On options.py --- worlds/smgalaxy/__init__.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index a1810ab3af9..cd639d2896f 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -38,10 +38,10 @@ class SuperMarioGalaxy(World): options = smg_options def create_regions(self): - create_regions(self.world,self.player, location_table) + create_regions(self.multiworld,self.player, location_table) def set_star_rules(self): - set_star_rules(self.world,self.player) + set_star_rules(self.multiworld,self.player) def create_item(self, name: str) -> Item: item_id = item_table[name] @@ -56,21 +56,21 @@ def create_item(self, name: str) -> Item: def generate_basic(self, player): gstaritem = self.create_item("Green Star") - self.world.itempool += [gstaritem for i in range(0,3)] + self.multiworld.itempool += [gstaritem for i in range(0,3)] staritem = self.create_item("Power Star") - if self.world.enable_purple_coin_stars[self.player].value == 1: - self.world.itempool += [staritem for i in range(0,117)] + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + self.multiworld.itempool += [staritem for i in range(0,117)] - elif self.world.enable_purple_coin_stars[self.player].value == 1: - self.world.itempool += [staritem for i in range(0,118)] + elif self.multiworld.enable_purple_coin_stars[self.player].value == 1: + self.multiworld.itempool += [staritem for i in range(0,118)] else: - self.world.itempool += [staritem for i in range(0,101)] + self.multiworld.itempool += [staritem for i in range(0,101)] grandstar1 = self.create_item("Grand Star Terrace") grandstar2 = self.create_item("Grand Star Fountain") grandstar3 = self.create_item("Grand Star Kitchen") grandstar4 = self.create_item("Grand Star Bedroom") grandstar5 = self.create_item("Grand Star Engine Room") - self.world.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] + self.multiworld.itempool += [grandstar1,grandstar2,grandstar3,grandstar4,grandstar5] From 29476721fef417eedb6a1a3b941a64f6d09adf98 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Tue, 1 Nov 2022 08:11:15 -0500 Subject: [PATCH 63/71] change world to multiworld on regions.py --- worlds/smgalaxy/regions.py | 124 ++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index 3df605686b3..6a98b734d82 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -10,140 +10,140 @@ locHL_table,locbosses_table,locspecialstages_table -def create_regions(world: MultiWorld, player: int, self: int): +def create_regions(player: int, self: int): #defines the commet obserbatory - regspecialstages = Region("Menu", RegionType.Generic, "Ship", player, world) + regspecialstages = Region("Menu", RegionType.Generic, "Ship", player, multiworld) locspecialstages_names = [name for name, id in locspecialstages_table.items()] locspecialstages_names = [name for name, id in locHL_table.items()] locspecialstages_names = [name for name, id in locbosses_table.items()] regspecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] - if self.world.enable_purple_coin_stars[self.player].value == 0: + if self.multiworld.enable_purple_coin_stars[self.player].value == 0: regspecialstages.locations.append(SMGLocation)(player, "GG: Gateway's Purple coins", location_table["GG: Gateway's Purple coins"], regspecialstages) - world.regions.append(regspecialstages) + multiworld.regions.append(regspecialstages) # defines the good egg galaxy region - regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, world) + regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, multiworld) locGE_names = [name for name, id in locGE_table.items()] regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regGE.locations.append(SMGLocation)(player, "GE: Purple Coin Omelet", location_table["GE: Purple Coin Omelet"], regGE) - world.regions.append(regGE) + multiworld.regions.append(regGE) # defines the honeyhive galaxey region - regHH = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, world) + regHH = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, multiworld) locHH_names = [name for name, id in locHH_table.items()] regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regHH.locations.append(SMGLocation)(player, "GE: The Honeyhive's Purple Coins", location_table["HH: The Honeyhive's Purple Coins"], regHH) - world.regions.append(regHH) + multiworld.regions.append(regHH) # defines the Space Junk galaxy region - regSJ = Region("Space Junk", RegionType.Generic, "Space Junk", player, world) + regSJ = Region("Space Junk", RegionType.Generic, "Space Junk", player, multiworld) locSJ_names = [name for name, id in locSJ_table.items()] regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regHH.locations.append(SMGLocation)(player, "SJ: Purple Coin Spacewalk", location_table["SJ: Purple Coin Spacewalk"], regSJ) - world.regions.append(regSJ) + multiworld.regions.append(regSJ) # defines the Battlerock galaxy - regBR = Region("Battlerock", RegionType.Generic, "Battlerock", player, world) + regBR = Region("Battlerock", RegionType.Generic, "Battlerock", player, multiworld) locBR_names = [name for name, id in locBR_table.items()] regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regBR.locations.append(SMGLocation)(player, "BR: Purple Coins on the Battlerock", location_table["BR: Purple Coins on the Battlerock"], regBR) - world.regions.append(regBR) + multiworld.regions.append(regBR) # defines the Beach Bowl galaxy - regBB = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, world) + regBB = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, multiworld) locBB_names = [name for name, id in locBB_table.items()] regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regBB.locations.append(SMGLocation)(player, "BB: Beachcombing for Purple Coins", location_table["BB: Beachcombing for Purple Coins"], regBB) - world.regions.append(regBB) + multiworld.regions.append(regBB) # define Ghostly galaxy - regG = Region("Ghostly", RegionType.Generic, "Ghostly", player, world) + regG = Region("Ghostly", RegionType.Generic, "Ghostly", player, multiworld) locG_names = [name for name, id in locGG_table.items()] regG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regG) for loc_name in locG_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regG.locations.append(SMGLocation)(player, "G: Purple Coins in the Bone Pen", location_table["G: Purple Coins in the Bone Pen"], regG) - world.regions.append(regG) + multiworld.regions.append(regG) # defines the Gusty Gardens galaxy - regGG = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, world) + regGG = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, multiworld) locGG_names = [name for name, id in locGG_table.items()] regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regGG.locations.append(SMGLocation)(player, "GG: Purple Coins on the Puzzle Cube", location_table["GG: Purple Coins on the Puzzle Cube"], regGG) - world.regions.append(regGG) + multiworld.regions.append(regGG) # defines Freezeflame galaxy - regFF = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, world) + regFF = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, multiworld) locFF_names = [name for name, id in locFF_table.items()] regFF.locations += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regGG.locations.append(SMGLocation)(player, "FF: Purple Coins on the Summit", location_table["FF: Purple Coins on the Summit"], regGG) - world.regions.append(regFF) + multiworld.regions.append(regFF) # defines DustyDune Galaxy - regDDune = Region("Dusty Dune", RegionType.Generic, "Dusty Dune", player, world) + regDDune = Region("Dusty Dune", RegionType.Generic, "Dusty Dune", player, multiworld) locDDune_names = [name for name, id in locDDune_table.items()] regDDune.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDDune) for loc_name in locDDune_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regDDune.locations.append(SMGLocation)(player, "DDune: Purple Coins in the Desert", location_table["DDune: Purple Coin in the Desert"], regDDune) - world.regions.append(regDDune) + multiworld.regions.append(regDDune) # defines golden leaf galaxy - regGL = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, world) + regGL = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, multiworld) locGL_names = [name for name, id in locGL_table.items()] regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regGL.locations.append(SMGLocation)(player, "GL: Purple Coins in the Woods", location_table["GL: Purple Coins in the Woods"], regGL) - world.regions.append(regGL) + multiworld.regions.append(regGL) # defines the Sea slide galaxy - regSS = Region("Sea Slide", RegionType.Generic, "Sea Slide", player, world) + regSS = Region("Sea Slide", RegionType.Generic, "Sea Slide", player, multiworld) locSS_names = [name for name, id in locSS_table.items()] regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSS) for loc_name in locSS_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regSS.locations.append(SMGLocation)(player, "SS: Purple Coins by the Seaside", location_table["SS: Purple Coins by the Seaside"], regSS) - world.regions.append(regSS) + multiworld.regions.append(regSS) # defines toy time galaxy - regTT = Region ("Toy Time", RegionType.Generic, "Toy Time", player, world) + regTT = Region ("Toy Time", RegionType.Generic, "Toy Time", player, multiworld) locTT_names = [name for name, id in locTT_table.items()] regTT.locations += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regSS.locations.append(SMGLocation)(player, "TT: Luigi's Purple Coins", location_table["TT: Luigi's Purple Coins"], regSS) - world.regions.append(regTT) + multiworld.regions.append(regTT) # defines deep dark galaxy - regDD = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, world) + regDD = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, multiworld) locDD_names = [name for name, id in locDD_table.items()] regDD.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regDD.locations.append(SMGLocation)(player, "DD: Plunder the Purple Coins", location_table["DD: Plunder the Purple Coins"], regDD) - world.regions.append(regDD) + multiworld.regions.append(regDD) # defines Dreadnaught galaxy - regDN = Region("Dreadnaught", RegionType.Generic, "Dreadnaught", player, world) + regDN = Region("Dreadnaught", RegionType.Generic, "Dreadnaught", player, multiworld) locDN_names = [name for name, id in locDN_table.items()] regDN.locations += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regDN.locations.append(SMGLocation)(player, "DN: Battlestation's Purple Coins", location_table["DN: Battlestation's Purple Coins"], regDN) - world.regions.append(regDN) + multiworld.regions.append(regDN) # defines Melty Molten galaxy - regMM = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, world) + regMM = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, multiworld) locMM_names = [name for name, id in locMM_table.items()] regMM.locations += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] - if self.world.enable_purple_coin_stars[self.player].value == 1: + if self.multiworld.enable_purple_coin_stars[self.player].value == 1: regMM.locations.append(SMGLocation)(player, "MM: Red-Hot Purple Coins", location_table["MM: Red-Hot Purple Coins"], regMM) - world.regions.append(regMM) + multiworld.regions.append(regMM) #defines the fountain - regFountain = Region("Fountain", RegionType.Generic, "Fountain", player, world) - world.regions.append(regFountain) + regFountain = Region("Fountain", RegionType.Generic, "Fountain", player, multiworld) + multiworld.regions.append(regFountain) #defines the kitchen - regKitchen = Region("Kitchen", RegionType.Generic, "Kitchen", player, world) - world.regions.append(regKitchen) + regKitchen = Region("Kitchen", RegionType.Generic, "Kitchen", player, multiworld) + multiworld.regions.append(regKitchen) #defines the bedroom - regBedroom = Region("Bedroom", RegionType.Generic, "Bedroom", player, world) - world.regions.append(regBedroom) + regBedroom = Region("Bedroom", RegionType.Generic, "Bedroom", player, multiworld) + multiworld.regions.append(regBedroom) #defines the Engine Room - regEngineRoom = Region("Engine Room", RegionType.Generic, "Engine Room", player, world) - world.regions.append(regEngineRoom) + regEngineRoom = Region("Engine Room", RegionType.Generic, "Engine Room", player, multiworld) + multiworld.regions.append(regEngineRoom) #defines the garden - regGarden = Region("Garden", RegionType.Generic, "Garden", player, world) - world.regions.append(regGarden) + regGarden = Region("Garden", RegionType.Generic, "Garden", player, multiworld) + multiworld.regions.append(regGarden) -def connect_regions(world: MultiWorld, player: int, source: str, target: str, rule): - sourceRegion = world.get_region(source, player) - targetRegion = world.get_region(target, player) +def connect_regions(player: int, source: str, target: str, rule): + sourceRegion = multiworld.get_region(source, player) + targetRegion = multiworld.get_region(target, player) connection = Entrance(player,'', sourceRegion) connection.access_rule = rule From e7c93ff437c9c9a1a2de2231103a708dc29add23 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 2 Nov 2022 08:33:08 -0500 Subject: [PATCH 64/71] add multiworld to variables 1 --- worlds/smgalaxy/regions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index 6a98b734d82..b5410945f69 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -141,7 +141,7 @@ def create_regions(player: int, self: int): regGarden = Region("Garden", RegionType.Generic, "Garden", player, multiworld) multiworld.regions.append(regGarden) -def connect_regions(player: int, source: str, target: str, rule): +def connect_regions(multiworld: MultiWorld, player: int, source: str, target: str, rule): sourceRegion = multiworld.get_region(source, player) targetRegion = multiworld.get_region(target, player) From ada302f500c99e34732c92668aad73f6e371448e Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Wed, 2 Nov 2022 08:35:11 -0500 Subject: [PATCH 65/71] add multiworld to variables 2 --- worlds/smgalaxy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index cd639d2896f..9c3553ee981 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -54,7 +54,7 @@ def create_item(self, name: str) -> Item: return item - def generate_basic(self, player): + def generate_basic(multiworld, self, player): gstaritem = self.create_item("Green Star") self.multiworld.itempool += [gstaritem for i in range(0,3)] From ff6cf46977dbf17530faa10492f63401e0359074 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Thu, 10 Nov 2022 09:27:39 -0600 Subject: [PATCH 66/71] Update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 0caf00a9782..e0b47089e97 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.apm3 *.apmc *.apz5 +*.apg *.pyc *.pyd *.sfc @@ -17,6 +18,7 @@ *.gb *.gbc *.gba +*.iso *.wixobj *.lck *.db3 From 2b9f71a3f11af777da35c071e66dd20569c06e34 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Fri, 2 Dec 2022 11:02:05 -0600 Subject: [PATCH 67/71] fix option calling int.py --- worlds/smgalaxy/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index 9c3553ee981..4907785378f 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -59,10 +59,11 @@ def generate_basic(multiworld, self, player): self.multiworld.itempool += [gstaritem for i in range(0,3)] staritem = self.create_item("Power Star") - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: - self.multiworld.itempool += [staritem for i in range(0,117)] + # check to see what setting enable purple coin stars is on to see how many stars to create + if self.multiworld.enable_purple_coin_stars[player] == EnablePurpleCoinStars.option_main_game_only: + self.multiworld.itempool += [staritem for i in range(0,102)] - elif self.multiworld.enable_purple_coin_stars[self.player].value == 1: + elif self.multiworld.enable_purple_coin_stars[player] == EnablePurpleCoinStars.option_all: self.multiworld.itempool += [staritem for i in range(0,118)] else: From 92095362048dd3c008e304161d039db66a774741 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sat, 3 Dec 2022 20:15:05 -0600 Subject: [PATCH 68/71] 12-3 changes --- worlds/smgalaxy/Options.py | 1 - worlds/smgalaxy/Regions.py | 152 ++++++++++++++++++++++++++++++++++++ worlds/smgalaxy/Rules.py | 97 +++++++++++++++++++++++ worlds/smgalaxy/__init__.py | 6 +- 4 files changed, 252 insertions(+), 4 deletions(-) create mode 100644 worlds/smgalaxy/Regions.py create mode 100644 worlds/smgalaxy/Rules.py diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py index 6e824f72e7a..72e44bf38ca 100644 --- a/worlds/smgalaxy/Options.py +++ b/worlds/smgalaxy/Options.py @@ -8,7 +8,6 @@ class EnablePurpleCoinStars(Choice): option_main_game_only = 0 option_all = 1 option_none = 2 - default = 0 # this allows players to pick their own star count to finish the game. class StarstoFinish(Range): diff --git a/worlds/smgalaxy/Regions.py b/worlds/smgalaxy/Regions.py new file mode 100644 index 00000000000..70859f019c8 --- /dev/null +++ b/worlds/smgalaxy/Regions.py @@ -0,0 +1,152 @@ +import imp +import typing +from .Options import smg_options, EnablePurpleCoinStars +from BaseClasses import Region, Location, RegionType, Entrance, MultiWorld +from .locations import SMGLocation, location_table,locHH_table,locGE_table, \ + locSJ_table,locBR_table,locBB_table, \ + locGG_table,locFF_table,locDD_table,locDDune_table, \ + locGL_table,locSS_table,locTT_table, \ + locDN_table,locMM_table, \ + locHL_table,locbosses_table,locspecialstages_table + + +def create_regions(player: int, world: MultiWorld, regions: dict): + #defines the commet obserbatory + regspecialstages = Region("Menu", RegionType.Generic, "Ship", player, world) + locspecialstages_names = [name for name, id in locspecialstages_table.items()] + locspecialstages_names = [name for name, id in locHL_table.items()] + locspecialstages_names = [name for name, id in locbosses_table.items()] + regspecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] + #if world.enable_purple_coin_stars[player] == EnablePurpleCoinStars.option_main_game_only: + # regspecialstages.locations.append(SMGLocation)(player, "GG: Gateway's Purple coins", location_table["GG: Gateway's Purple coins"], regspecialstages) + world.regions.append(regspecialstages) + # defines the good egg galaxy region + regGE = Region("Good Egg", player, world) + locGE_names = [name for name, id in locGE_table.items()] + regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] + if world.enable_purple_coin_stars[player].value == 1: + regGE.locations.append(SMGLocation)(player, "GE: Purple Coin Omelet", location_table["GE: Purple Coin Omelet"], regGE) + world.regions.append(regGE) + # defines the honeyhive galaxey region + regHH = Region("Honeyhive", player, world) + locHH_names = [name for name, id in locHH_table.items()] + regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regHH.locations.append(SMGLocation)(player, "GE: The Honeyhive's Purple Coins", location_table["HH: The Honeyhive's Purple Coins"], regHH) + world.regions.append(regHH) + # defines the Space Junk galaxy region + regSJ = Region("Space Junk", player, world) + locSJ_names = [name for name, id in locSJ_table.items()] + regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regHH.locations.append(SMGLocation)(player, "SJ: Purple Coin Spacewalk", location_table["SJ: Purple Coin Spacewalk"], regSJ) + world.regions.append(regSJ) + # defines the Battlerock galaxy + regBR = Region("Battlerock", player, world) + locBR_names = [name for name, id in locBR_table.items()] + regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regBR.locations.append(SMGLocation)(player, "BR: Purple Coins on the Battlerock", location_table["BR: Purple Coins on the Battlerock"], regBR) + world.regions.append(regBR) + # defines the Beach Bowl galaxy + regBB = Region("Beach Bowl", player, world) + locBB_names = [name for name, id in locBB_table.items()] + regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regBB.locations.append(SMGLocation)(player, "BB: Beachcombing for Purple Coins", location_table["BB: Beachcombing for Purple Coins"], regBB) + world.regions.append(regBB) + # define Ghostly galaxy + regG = Region("Ghostly", player, world) + locG_names = [name for name, id in locGG_table.items()] + regG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regG) for loc_name in locG_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regG.locations.append(SMGLocation)(player, "G: Purple Coins in the Bone Pen", location_table["G: Purple Coins in the Bone Pen"], regG) + world.regions.append(regG) + # defines the Gusty Gardens galaxy + regGG = Region("Gusty Gardens", player, world) + locGG_names = [name for name, id in locGG_table.items()] + regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regGG.locations.append(SMGLocation)(player, "GG: Purple Coins on the Puzzle Cube", location_table["GG: Purple Coins on the Puzzle Cube"], regGG) + world.regions.append(regGG) + # defines Freezeflame galaxy + regFF = Region("Freezeflame", player, world) + locFF_names = [name for name, id in locFF_table.items()] + regFF.locations += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regGG.locations.append(SMGLocation)(player, "FF: Purple Coins on the Summit", location_table["FF: Purple Coins on the Summit"], regGG) + world.regions.append(regFF) + # defines DustyDune Galaxy + regDDune = Region("Dusty Dune", player, world) + locDDune_names = [name for name, id in locDDune_table.items()] + regDDune.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDDune) for loc_name in locDDune_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regDDune.locations.append(SMGLocation)(player, "DDune: Purple Coins in the Desert", location_table["DDune: Purple Coin in the Desert"], regDDune) + world.regions.append(regDDune) + # defines golden leaf galaxy + regGL = Region("Gold Leaf", player, world) + locGL_names = [name for name, id in locGL_table.items()] + regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regGL.locations.append(SMGLocation)(player, "GL: Purple Coins in the Woods", location_table["GL: Purple Coins in the Woods"], regGL) + world.regions.append(regGL) + # defines the Sea slide galaxy + regSS = Region("Sea Slide", player, world) + locSS_names = [name for name, id in locSS_table.items()] + regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSS) for loc_name in locSS_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regSS.locations.append(SMGLocation)(player, "SS: Purple Coins by the Seaside", location_table["SS: Purple Coins by the Seaside"], regSS) + world.regions.append(regSS) + # defines toy time galaxy + regTT = Region ("Toy Time", player, world) + locTT_names = [name for name, id in locTT_table.items()] + regTT.locations += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regSS.locations.append(SMGLocation)(player, "TT: Luigi's Purple Coins", location_table["TT: Luigi's Purple Coins"], regSS) + world.regions.append(regTT) + # defines deep dark galaxy + regDD = Region("Deep Dark", player, world) + locDD_names = [name for name, id in locDD_table.items()] + regDD.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regDD.locations.append(SMGLocation)(player, "DD: Plunder the Purple Coins", location_table["DD: Plunder the Purple Coins"], regDD) + world.regions.append(regDD) + # defines Dreadnaught galaxy + regDN = Region("Dreadnaught", player, world) + locDN_names = [name for name, id in locDN_table.items()] + regDN.locations += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regDN.locations.append(SMGLocation)(player, "DN: Battlestation's Purple Coins", location_table["DN: Battlestation's Purple Coins"], regDN) + world.regions.append(regDN) + # defines Melty Molten galaxy + regMM = Region("Melty Molten", player, world) + locMM_names = [name for name, id in locMM_table.items()] + regMM.locations += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] + if world.enable_purple_coin_stars[self.player].value == 1: + regMM.locations.append(SMGLocation)(player, "MM: Red-Hot Purple Coins", location_table["MM: Red-Hot Purple Coins"], regMM) + world.regions.append(regMM) + #defines the fountain + regFountain = Region("Fountain", player, world) + world.regions.append(regFountain) + #defines the kitchen + regKitchen = Region("Kitchen", player, world) + world.regions.append(regKitchen) + #defines the bedroom + regBedroom = Region("Bedroom", player, world) + world.regions.append(regBedroom) + #defines the Engine Room + regEngineRoom = Region("Engine Room", player, world) + world.regions.append(regEngineRoom) + #defines the garden + regGarden = Region("Garden", player, world) + world.regions.append(regGarden) + +def connect_regions(multiworld: MultiWorld, player: int, source: str, target: str, rule): + sourceRegion = multiworld.get_region(source, player) + targetRegion = multiworld.get_region(target, player) + + connection = Entrance(player,'', sourceRegion) + connection.access_rule = rule + + sourceRegion.exits.append(connection) + connection.connect(targetRegion) diff --git a/worlds/smgalaxy/Rules.py b/worlds/smgalaxy/Rules.py new file mode 100644 index 00000000000..5176ab2fe25 --- /dev/null +++ b/worlds/smgalaxy/Rules.py @@ -0,0 +1,97 @@ +from sqlite3 import connect + +from worlds.AutoWorld import LogicMixin +from ..generic.Rules import add_rule +from .regions import connect_regions + +class GalaxyLogic(LogicMixin): +# these are varible states that the game uses for logic in different points. + def smg_gate_open(self, player: int): + return self.has('Grand Star Engine Room', player) + + def smg_can_finish(self, player: int): + return self.has('Power Star 60') and self.has('Grand Star Bedroom') + + def smg_purple_coins(self, player: int): + return self.has('Power Star 60') and self.has('Grand Star Bedroom') and self.has('Grand Star Engine Room', player) + + def smg_can_get_comet(self, player: int): + return self.has('Power Star 13') + + def smg_trail(self, player: int): + return self.has('Green Star 3') + + # main stage logic +def set_star_rules(world,player): + connect_regions(world, player, "Menu", "Good Egg", lambda state: True) + connect_regions(world, player, "Menu", "Honeyhive", lambda state: state.has("Power Star", player, 3)) + connect_regions(world, player, "Menu", "Fountain", lambda state: state.has("Grand Star Terrace", player)) + connect_regions(world, player, "Fountain", "Space Junk", lambda state: state.has("Power Star", player, 9)) + connect_regions(world, player, "Fountain", "Space Junk", lambda state: state.has("Power Star", player, 12)) + connect_regions(world, player, "Menu", "Kitchen", lambda state: state.has("Grand Star Fountain", player)) + connect_regions(world, player, "Kitchen", "Beach Bowl", lambda state: state.has("Power Star", player, 18)) + connect_regions(world, player, "Kitchen", "Ghostly", lambda state: state.has("Power Star", player, 20)) + connect_regions(world, player, "Menu", "Bedroom", lambda state: state.has("Grand Star Kitchen", player)) + connect_regions(world, player, "Bedroom", "Gusty Gardens", lambda state: state.has("Power Star", player, 24)) + connect_regions(world, player, "Bedroom", "Freezeflame", lambda state: state.has("Power Star", player, 26)) + connect_regions(world, player, "Menu", "Engine Room", lambda state: state.has("Grand Star Bedroom", player)) + connect_regions(world, player, "Engine Room", "Gold Leaf", lambda state: state.has("Power Star", player, 34)) + connect_regions(world, player, "Engine Room", "Toy Time", lambda state: state.has("Power Star", player, 40)) + connect_regions(world, player, "Engine Room", "Sea Slide", lambda state: state.has("Power Star", player, 36)) + connect_regions(world, player, "Menu", "Garden", lambda state: state.has("Grand Star Engine Room", player)) + connect_regions(world, player, "Garden", "Deep Dark", lambda state: state.has("Power Star", player, 46)) + connect_regions(world, player, "Garden", "Dreadnaught", lambda state: state.has("Power Star", player, 48)) + connect_regions(world, player, "Garden", "Melty Molten", lambda state: state.has("Power Star", player, 52)) + # special stages logic + add_rule(world.get_location("LDL: Surfing 101", player), lambda state: state.has("Power Star", player, 5)) + add_rule(world.get_location("FS: Painting the Planet Yellow", player), lambda state: state.has("Power Star", player, 7)) + add_rule(world.get_location("RG: Rolling in the Clouds", player), lambda state: state.has("Power Star", player, 11) and state.has("Grand Star Terrace", player)) + add_rule(world.get_location("HS: Shrinking Satellite", player), lambda state: state.has ("Power Star", player, 18) and state.has("Grand Star Terrace", player)) + add_rule(world.get_location("BUB: Through the Poison Swamp", player), lambda state: state.has ("Power Star", player, 19) and state.has("Grand Star Fountain", player)) + add_rule(world.get_location("BB: The Secret of Buoy Base", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) + add_rule(world.get_location("BB: The Floating Fortress", player), lambda state: state.has ("Power Star", player, 30) and state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player)) + add_rule(world.get_location("GG: Gateway's Purple coins", player), lambda state: state.has("Grand Star Engine Room", player)) + add_rule(world.get_location("BF: Kingfin's Fearsome Waters", player), lambda state: state.has("Power Star", player, 55) and state.has("Grand Star Bedroom", player)) + add_rule(world.get_location("MS: Watch Your Step", player), lambda state: state.has("Power Star", player, 50) and state.has("Grand Star Engine Room", player) and state.has("Grand Star Bedroom", player)) + add_rule(world.get_location("DDR: Giant Eel Breakout", player), lambda state: state.has("Grand Star Fountain", player)) + add_rule(world.get_location("RGT: Gizmos, Gears, and Gadgets", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.smg_trail(player)) + add_rule(world.get_location("LDT: The Galaxy's Greatest Wave", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) + add_rule(world.get_location("BBT: The Electric Labyrinth", player), lambda state: state.has("Grand Star Fountain", player) and state.has("Grand Star Terrace", player) and state.has("Grand Star Kitchen", player) and state.smg_trail(player)) + add_rule(world.get_location("SS: Rocky Road", player), lambda state: state.has("Power Star", player, 7)) + add_rule(world.get_location("SP: A Very Sticky Situation", player), lambda state: state.has("Grand Star Terrace", player) and state.has("Power Star", player, 9)) + add_rule(world.get_location("BM: Bigmouth's Gold Bait", player), lambda state: state.has("Grand Star Kitchen", player) and state.has("Power Star", player, 29)) + add_rule(world.get_location("SS: Choosing a Favorite Snack", player), lambda state: state.has("Grand Star Bedroom", player) and state.has("Power Star", player, 36) and state.has("Grand Star Fountain", player)) + add_rule(world.get_location("BB: Racing the Spooky Speedster", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Grand Star Kitchen", player)) + add_rule(world.get_location("SC: Star Bunnies in the Snow", player), lambda state: state.has("Grand Star Engine Room", player) and state.has("Power Star", player, 52)) + # comet logic + add_rule(world.get_location("GE: Dino Piranha Speed Run", player), lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("HH: Honeyhive Cosmic Mario Race", player), lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("SJ: Pull Star Path Speed Run", player), lambda state: state.has("Power Star", player, 13)) + add_rule(world.get_location("BR: Topmanic's Dardevil Run", player), lambda state: state.smg_can_get_comet(player)) + add_rule(world.get_location("BB: Fast Foes on the Cyclone Stone", player), lambda state: state.smg_can_get_comet(player)) + # boss stage logic + add_rule(world.get_location("BJ: Megaleg's Moon", player), lambda state: state.has("Power Star", player, 8)) + add_rule(world.get_location("B: The Firery Stronghold", player), lambda state: state.has("Power Star", player, 15) and state.has("Grand Star Terrace", player)) + add_rule(world.get_location("BJ: Sinking the Airships", player), lambda state: state.has("Power Star", player, 23) and state.has("Grand Star Fountain", player)) + add_rule(world.get_location("BJ: King Kaliente's Spicy Return", player), lambda state: state.has("Power Star", player, 45) and state.has("Grand Star Engine Room", player)) + add_rule(world.get_location("B: Darkness on the Horizon", player), lambda state: state.has("Power Star", player, 33) and state.has("Grand Star Kitchen", player)) + + + # purple coin star logic + if world.EnablePurpleCoinStars[player]: + add_rule(world.get_location("DN: Battlestation's Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("MM: Red-Hot Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("TT: Luigi's Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("DD: Plunder the Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("GL: Purple Coins in the Woods", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("FF: Purple Coins on the Summit", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("SS: Purple Coins by the Seaside", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("GG: Purple Coins on the Puzzle Cube", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("G: Purple Coins in the Bone Pen", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("DDune: Purple Coin in the Desert", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("BR: Purple Coins on the Battlerock", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("GE: Purple Coin Omelet", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("HH: Honeyhive's Purple Coins", player), lambda state: state.smg_purple_coins(player)) + add_rule(world.get_location("SJ: Purple Coin Spacewalk", player), lambda state: state.smg_purple_coins(player)) + + world.completion_condition[player] = lambda state: state.smg_can_finish(player) diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index 4907785378f..535b28bca56 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -1,7 +1,7 @@ import string from .items import item_table, SMGItem from .locations import location_table, SMGLocation -from .Options import smg_options +from .Options import smg_options, EnablePurpleCoinStars from .rules import set_star_rules from .regions import create_regions from BaseClasses import Item, Tutorial, ItemClassification, Region, Location, RegionType, Entrance, MultiWorld @@ -38,10 +38,10 @@ class SuperMarioGalaxy(World): options = smg_options def create_regions(self): - create_regions(self.multiworld,self.player, location_table) + create_regions(self.multiworld, location_table, regions.dict) def set_star_rules(self): - set_star_rules(self.multiworld,self.player) + set_star_rules(self.multiworld, self.player) def create_item(self, name: str) -> Item: item_id = item_table[name] From c17091caa73284eee8171c23b7f350ae030a7563 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sun, 4 Dec 2022 21:14:49 -0600 Subject: [PATCH 69/71] Fix option defination in int.py and changes other option related stuff --- worlds/smgalaxy/Options.py | 8 +-- worlds/smgalaxy/__init__.py | 13 ++-- worlds/smgalaxy/locations.py | 2 + worlds/smgalaxy/regions.py | 125 +++++++++++++++++------------------ 4 files changed, 75 insertions(+), 73 deletions(-) diff --git a/worlds/smgalaxy/Options.py b/worlds/smgalaxy/Options.py index 72e44bf38ca..b0230d5c514 100644 --- a/worlds/smgalaxy/Options.py +++ b/worlds/smgalaxy/Options.py @@ -1,10 +1,10 @@ -import typing -from Options import Option, Choice, Range +from typing import TypedDict +from Options import Choice, Range # this defines the enable_purple_coin_stars setting class EnablePurpleCoinStars(Choice): """tuning this off we allow purple coin stars to count as checks do note all purple coin stars are postgame only but one.""" - display_name = "enable_purple_coin_stars" + display_name = "Enable Purple Coin Stars" option_main_game_only = 0 option_all = 1 option_none = 2 @@ -18,7 +18,7 @@ class StarstoFinish(Range): default = 60 # this defines all the options. -smg_options: typing.Dict[str, type(Option)] = { +galaxy_options = { "enable_purple_coin_stars": EnablePurpleCoinStars, "Stars_to_finish": StarstoFinish, } diff --git a/worlds/smgalaxy/__init__.py b/worlds/smgalaxy/__init__.py index 535b28bca56..f158342f106 100644 --- a/worlds/smgalaxy/__init__.py +++ b/worlds/smgalaxy/__init__.py @@ -1,8 +1,8 @@ import string from .items import item_table, SMGItem from .locations import location_table, SMGLocation -from .Options import smg_options, EnablePurpleCoinStars -from .rules import set_star_rules +from .Options import EnablePurpleCoinStars, galaxy_options +from .Rules import set_star_rules from .regions import create_regions from BaseClasses import Item, Tutorial, ItemClassification, Region, Location, RegionType, Entrance, MultiWorld from ..AutoWorld import World, WebWorld @@ -10,15 +10,16 @@ client_version = 1 -class SM64Web(WebWorld): +class SMGWeb(WebWorld): tutorials = [Tutorial( "Multiworld Setup Guide", - "A guide to setting up SMG for MultiWorld.", + "A guide to setting up Super Mario Galaxy for MultiWorld.", "English", "setup_en.md", "setup/en", ["squidy"] )] + class SuperMarioGalaxy(World): """ Super Mario Galaxy allows you to explore the cosomos with rosalinna in the comet obserbatory. @@ -35,10 +36,10 @@ class SuperMarioGalaxy(World): data_version = 1 forced_auto_forfeit = False - options = smg_options + option_definitions = galaxy_options def create_regions(self): - create_regions(self.multiworld, location_table, regions.dict) + create_regions(self.multiworld, location_table, self) def set_star_rules(self): set_star_rules(self.multiworld, self.player) diff --git a/worlds/smgalaxy/locations.py b/worlds/smgalaxy/locations.py index ce8980e9636..cb51c57f6f6 100644 --- a/worlds/smgalaxy/locations.py +++ b/worlds/smgalaxy/locations.py @@ -3,6 +3,7 @@ class SMGLocation(Location): game: str = "Super Mario Galaxy" +# good egg galaxy locGE_table = { "GE: Dino Piranha": 170000000, "GE: A Snack of Cosmic Proportions": 170000001, @@ -10,6 +11,7 @@ class SMGLocation(Location): "GE: Luigi on the Roof": 170000003, "GE: Dino Piranha Speed Run": 170000004 } +# locHH_table = { "HH: Bee Mario Takes Flight": 170000006, "HH: Trouble on the Tower": 170000007, diff --git a/worlds/smgalaxy/regions.py b/worlds/smgalaxy/regions.py index b5410945f69..fd7ebc78e12 100644 --- a/worlds/smgalaxy/regions.py +++ b/worlds/smgalaxy/regions.py @@ -1,7 +1,7 @@ import imp import typing -from .Options import smg_options -from BaseClasses import Region, Location, RegionType, Entrance, MultiWorld +from .Options import EnablePurpleCoinStars, galaxy_options +from BaseClasses import Region, Location, RegionType, Entrance, MultiWorld from .locations import SMGLocation, location_table,locHH_table,locGE_table, \ locSJ_table,locBR_table,locBB_table, \ locGG_table,locFF_table,locDD_table,locDDune_table, \ @@ -9,137 +9,136 @@ locDN_table,locMM_table, \ locHL_table,locbosses_table,locspecialstages_table - -def create_regions(player: int, self: int): +def create_regions(player: int, world: MultiWorld, self: int): #defines the commet obserbatory - regspecialstages = Region("Menu", RegionType.Generic, "Ship", player, multiworld) + regspecialstages = Region("Menu", RegionType.Generic, "Ship", player, world) locspecialstages_names = [name for name, id in locspecialstages_table.items()] locspecialstages_names = [name for name, id in locHL_table.items()] locspecialstages_names = [name for name, id in locbosses_table.items()] regspecialstages.locations += [SMGLocation(player, loc_name, location_table[loc_name], regspecialstages) for loc_name in locspecialstages_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 0: - regspecialstages.locations.append(SMGLocation)(player, "GG: Gateway's Purple coins", location_table["GG: Gateway's Purple coins"], regspecialstages) - multiworld.regions.append(regspecialstages) + if (self.multiworld.enable_purple_coin_stars[self.player] == EnablePurpleCoinStars.option_main_game_only): + regspecialstages.locations.append(SMGLocation)(player, "GG: Gateway's Purple coins", location_table["GG: Gateway's Purple coins"], regspecialstages) + world.region.append(regspecialstages) # defines the good egg galaxy region - regGE = Region("Good Egg", RegionType.Generic, "Good Egg", player, multiworld) + regGE = Region("Good Egg", player, world) locGE_names = [name for name, id in locGE_table.items()] regGE.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGE) for loc_name in locGE_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[player].value == 1: regGE.locations.append(SMGLocation)(player, "GE: Purple Coin Omelet", location_table["GE: Purple Coin Omelet"], regGE) - multiworld.regions.append(regGE) + world.regions.append(regGE) # defines the honeyhive galaxey region - regHH = Region("Honeyhive", RegionType.Generic, "Honeyhive", player, multiworld) + regHH = Region("Honeyhive", player, world) locHH_names = [name for name, id in locHH_table.items()] regHH.locations += [SMGLocation(player, loc_name, location_table[loc_name], regHH) for loc_name in locHH_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regHH.locations.append(SMGLocation)(player, "GE: The Honeyhive's Purple Coins", location_table["HH: The Honeyhive's Purple Coins"], regHH) - multiworld.regions.append(regHH) + world.regions.append(regHH) # defines the Space Junk galaxy region - regSJ = Region("Space Junk", RegionType.Generic, "Space Junk", player, multiworld) + regSJ = Region("Space Junk", player, world) locSJ_names = [name for name, id in locSJ_table.items()] regSJ.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSJ) for loc_name in locSJ_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regHH.locations.append(SMGLocation)(player, "SJ: Purple Coin Spacewalk", location_table["SJ: Purple Coin Spacewalk"], regSJ) - multiworld.regions.append(regSJ) + world.regions.append(regSJ) # defines the Battlerock galaxy - regBR = Region("Battlerock", RegionType.Generic, "Battlerock", player, multiworld) + regBR = Region("Battlerock", player, world) locBR_names = [name for name, id in locBR_table.items()] regBR.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBR) for loc_name in locBR_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regBR.locations.append(SMGLocation)(player, "BR: Purple Coins on the Battlerock", location_table["BR: Purple Coins on the Battlerock"], regBR) - multiworld.regions.append(regBR) + world.regions.append(regBR) # defines the Beach Bowl galaxy - regBB = Region("Beach Bowl", RegionType.Generic, "Beach Bowl", player, multiworld) + regBB = Region("Beach Bowl", player, world) locBB_names = [name for name, id in locBB_table.items()] regBB.locations += [SMGLocation(player, loc_name, location_table[loc_name], regBB) for loc_name in locBB_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regBB.locations.append(SMGLocation)(player, "BB: Beachcombing for Purple Coins", location_table["BB: Beachcombing for Purple Coins"], regBB) - multiworld.regions.append(regBB) + world.regions.append(regBB) # define Ghostly galaxy - regG = Region("Ghostly", RegionType.Generic, "Ghostly", player, multiworld) + regG = Region("Ghostly", player, world) locG_names = [name for name, id in locGG_table.items()] regG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regG) for loc_name in locG_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regG.locations.append(SMGLocation)(player, "G: Purple Coins in the Bone Pen", location_table["G: Purple Coins in the Bone Pen"], regG) - multiworld.regions.append(regG) + world.regions.append(regG) # defines the Gusty Gardens galaxy - regGG = Region("Gusty Gardens", RegionType.Generic, "Gusty Gardens", player, multiworld) + regGG = Region("Gusty Gardens", player, world) locGG_names = [name for name, id in locGG_table.items()] regGG.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGG) for loc_name in locGG_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regGG.locations.append(SMGLocation)(player, "GG: Purple Coins on the Puzzle Cube", location_table["GG: Purple Coins on the Puzzle Cube"], regGG) - multiworld.regions.append(regGG) + world.regions.append(regGG) # defines Freezeflame galaxy - regFF = Region("Freezeflame", RegionType.Generic, "Freezeflame", player, multiworld) + regFF = Region("Freezeflame", player, world) locFF_names = [name for name, id in locFF_table.items()] regFF.locations += [SMGLocation(player, loc_name, location_table[loc_name], regFF) for loc_name in locFF_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regGG.locations.append(SMGLocation)(player, "FF: Purple Coins on the Summit", location_table["FF: Purple Coins on the Summit"], regGG) - multiworld.regions.append(regFF) + world.regions.append(regFF) # defines DustyDune Galaxy - regDDune = Region("Dusty Dune", RegionType.Generic, "Dusty Dune", player, multiworld) + regDDune = Region("Dusty Dune", player, world) locDDune_names = [name for name, id in locDDune_table.items()] regDDune.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDDune) for loc_name in locDDune_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regDDune.locations.append(SMGLocation)(player, "DDune: Purple Coins in the Desert", location_table["DDune: Purple Coin in the Desert"], regDDune) - multiworld.regions.append(regDDune) + world.regions.append(regDDune) # defines golden leaf galaxy - regGL = Region("Gold Leaf", RegionType.Generic, "Gold Leaf", player, multiworld) + regGL = Region("Gold Leaf", player, world) locGL_names = [name for name, id in locGL_table.items()] regGL.locations += [SMGLocation(player, loc_name, location_table[loc_name], regGL) for loc_name in locGL_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regGL.locations.append(SMGLocation)(player, "GL: Purple Coins in the Woods", location_table["GL: Purple Coins in the Woods"], regGL) - multiworld.regions.append(regGL) + world.regions.append(regGL) # defines the Sea slide galaxy - regSS = Region("Sea Slide", RegionType.Generic, "Sea Slide", player, multiworld) + regSS = Region("Sea Slide", player, world) locSS_names = [name for name, id in locSS_table.items()] regSS.locations += [SMGLocation(player, loc_name, location_table[loc_name], regSS) for loc_name in locSS_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regSS.locations.append(SMGLocation)(player, "SS: Purple Coins by the Seaside", location_table["SS: Purple Coins by the Seaside"], regSS) - multiworld.regions.append(regSS) + world.regions.append(regSS) # defines toy time galaxy - regTT = Region ("Toy Time", RegionType.Generic, "Toy Time", player, multiworld) + regTT = Region ("Toy Time", player, world) locTT_names = [name for name, id in locTT_table.items()] regTT.locations += [SMGLocation(player, loc_name, location_table[loc_name], regTT) for loc_name in locTT_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regSS.locations.append(SMGLocation)(player, "TT: Luigi's Purple Coins", location_table["TT: Luigi's Purple Coins"], regSS) - multiworld.regions.append(regTT) + world.regions.append(regTT) # defines deep dark galaxy - regDD = Region("Deep Dark", RegionType.Generic, "Deep Dark", player, multiworld) + regDD = Region("Deep Dark", player, world) locDD_names = [name for name, id in locDD_table.items()] regDD.locations += [SMGLocation(player, loc_name, location_table[loc_name], regDD) for loc_name in locDD_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regDD.locations.append(SMGLocation)(player, "DD: Plunder the Purple Coins", location_table["DD: Plunder the Purple Coins"], regDD) - multiworld.regions.append(regDD) + world.regions.append(regDD) # defines Dreadnaught galaxy - regDN = Region("Dreadnaught", RegionType.Generic, "Dreadnaught", player, multiworld) + regDN = Region("Dreadnaught", player, world) locDN_names = [name for name, id in locDN_table.items()] regDN.locations += [SMGLocation (player, loc_name, location_table[loc_name], regDN) for loc_name in locDN_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regDN.locations.append(SMGLocation)(player, "DN: Battlestation's Purple Coins", location_table["DN: Battlestation's Purple Coins"], regDN) - multiworld.regions.append(regDN) + world.regions.append(regDN) # defines Melty Molten galaxy - regMM = Region("Melty Molten", RegionType.Generic, "Melty Molten", player, multiworld) + regMM = Region("Melty Molten", player, world) locMM_names = [name for name, id in locMM_table.items()] regMM.locations += [SMGLocation (player, loc_name, location_table[loc_name], regMM) for loc_name in locMM_names] - if self.multiworld.enable_purple_coin_stars[self.player].value == 1: + if world.enable_purple_coin_stars[self.player].value == 1: regMM.locations.append(SMGLocation)(player, "MM: Red-Hot Purple Coins", location_table["MM: Red-Hot Purple Coins"], regMM) - multiworld.regions.append(regMM) + world.regions.append(regMM) #defines the fountain - regFountain = Region("Fountain", RegionType.Generic, "Fountain", player, multiworld) - multiworld.regions.append(regFountain) + regFountain = Region("Fountain", player, world) + world.regions.append(regFountain) #defines the kitchen - regKitchen = Region("Kitchen", RegionType.Generic, "Kitchen", player, multiworld) - multiworld.regions.append(regKitchen) + regKitchen = Region("Kitchen", player, world) + world.regions.append(regKitchen) #defines the bedroom - regBedroom = Region("Bedroom", RegionType.Generic, "Bedroom", player, multiworld) - multiworld.regions.append(regBedroom) + regBedroom = Region("Bedroom", player, world) + world.regions.append(regBedroom) #defines the Engine Room - regEngineRoom = Region("Engine Room", RegionType.Generic, "Engine Room", player, multiworld) - multiworld.regions.append(regEngineRoom) + regEngineRoom = Region("Engine Room", player, world) + world.regions.append(regEngineRoom) #defines the garden - regGarden = Region("Garden", RegionType.Generic, "Garden", player, multiworld) - multiworld.regions.append(regGarden) + regGarden = Region("Garden", player, world) + world.regions.append(regGarden) def connect_regions(multiworld: MultiWorld, player: int, source: str, target: str, rule): sourceRegion = multiworld.get_region(source, player) From f403d89c5f0f34dc029570c8df75971b8d764471 Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Sun, 4 Dec 2022 21:16:04 -0600 Subject: [PATCH 70/71] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 83a49b828b8..f71a284a2e5 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ Currently, the following games are supported: * Rogue Legacy * VVVVVV * Raft -* Super Mario Galaxy * Super Mario 64 * Meritous * Super Metroid/Link to the Past combo randomizer (SMZ3) From 9d2d027b99f7e0fab964d2b8c9aaf28955710b0e Mon Sep 17 00:00:00 2001 From: Joethepic <60947591+Joethepic@users.noreply.github.com> Date: Mon, 5 Dec 2022 07:23:33 -0600 Subject: [PATCH 71/71] create game info file --- worlds/smgalaxy/docs/en_Super_Mario_Galaxy.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 worlds/smgalaxy/docs/en_Super_Mario_Galaxy.md diff --git a/worlds/smgalaxy/docs/en_Super_Mario_Galaxy.md b/worlds/smgalaxy/docs/en_Super_Mario_Galaxy.md new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/worlds/smgalaxy/docs/en_Super_Mario_Galaxy.md @@ -0,0 +1 @@ +