diff --git a/worlds/sm64ex/Items.py b/worlds/sm64ex/Items.py index ce125a2b..8e38129d 100644 --- a/worlds/sm64ex/Items.py +++ b/worlds/sm64ex/Items.py @@ -3,7 +3,7 @@ from BaseClasses import Item class SM64Item(Item): game: str = "Super Mario 64" -item_table = { +generic_item_table = { "Power Star": 3626000, "Basement Key": 3626178, "Second Floor Key": 3626179, @@ -12,4 +12,19 @@ item_table = { "Metal Cap": 3626182, "Vanish Cap": 3626183, "1Up Mushroom": 3626184 -} \ No newline at end of file +} + +cannon_item_table = { + "Cannon Unlock BoB": 3626200, + "Cannon Unlock WF": 3626201, + "Cannon Unlock JRB": 3626202, + "Cannon Unlock CCM": 3626203, + "Cannon Unlock SSL": 3626207, + "Cannon Unlock SL": 3626209, + "Cannon Unlock WDW": 3626210, + "Cannon Unlock TTM": 3626211, + "Cannon Unlock THI": 3626212, + "Cannon Unlock RR": 3626214 +} + +item_table = {**generic_item_table, **cannon_item_table} \ No newline at end of file diff --git a/worlds/sm64ex/Locations.py b/worlds/sm64ex/Locations.py index 501c284b..5aee0189 100644 --- a/worlds/sm64ex/Locations.py +++ b/worlds/sm64ex/Locations.py @@ -10,7 +10,8 @@ locBoB_table = { "BoB: Shoot to the Island in the Sky": 3626002, "BoB: Find the 8 Red Coins": 3626003, "BoB: Mario Wings to the Sky": 3626004, - "BoB: Behind Chain Chomp's Gate": 3626005 + "BoB: Behind Chain Chomp's Gate": 3626005, + "BoB: Bob-omb Buddy": 3626200, } #Whomp's Fortress @@ -20,7 +21,8 @@ locWhomp_table = { "WF: Shoot into the Wild Blue": 3626009, "WF: Red Coins on the Floating Isle": 3626010, "WF: Fall onto the Caged Island": 3626011, - "WF: Blast Away the Wall": 3626012 + "WF: Blast Away the Wall": 3626012, + "WF: Bob-omb Buddy": 3626201, } #Jolly Roger Bay @@ -30,7 +32,8 @@ locJRB_table = { "JRB: Treasure of the Ocean Cave": 3626016, "JRB: Red Coins on the Ship Afloat": 3626017, "JRB: Blast to the Stone Pillar": 3626018, - "JRB: Through the Jet Stream": 3626019 + "JRB: Through the Jet Stream": 3626019, + "JRB: Bob-omb Buddy": 3626202, } @@ -41,7 +44,8 @@ locCCM_table = { "CCM: Big Penguin Race": 3626023, "CCM: Frosty Slide for 8 Red Coins": 3626024, "CCM: Snowman's Lost His Head": 3626025, - "CCM: Wall Kicks Will Work": 3626026 + "CCM: Wall Kicks Will Work": 3626026, + "CCM: Bob-omb Buddy": 3626203, } #Big Boo's Haunt @@ -81,7 +85,8 @@ locSSL_table = { "SSL: Inside the Ancient Pyramid": 3626051, "SSL: Stand Tall on the Four Pillars": 3626052, "SSL: Free Flying for 8 Red Coins": 3626053, - "SSL: Pyramid Puzzle": 3626054 + "SSL: Pyramid Puzzle": 3626054, + "SSL: Bob-omb Buddy": 3626207, } #Dire, Dire Docks @@ -101,7 +106,8 @@ locSL_table = { "SL: In the Deep Freeze": 3626065, "SL: Whirl from the Freezing Pond": 3626066, "SL: Shell Shreddin' for Red Coins": 3626067, - "SL: Into the Igloo": 3626068 + "SL: Into the Igloo": 3626068, + "SL: Bob-omb Buddy": 3626209, } #Wet-Dry World @@ -111,7 +117,8 @@ locWDW_table = { "WDW: Secrets in the Shallows & Sky": 3626072, "WDW: Express Elevator--Hurry Up!": 3626073, "WDW: Go to Town for Red Coins": 3626074, - "WDW: Quick Race Through Downtown!": 3626075 + "WDW: Quick Race Through Downtown!": 3626075, + "WDW: Bob-omb Buddy": 3626210, } #Tall, Tall Mountain @@ -121,7 +128,8 @@ locTTM_table = { "TTM: Scary 'Shrooms, Red Coins": 3626079, "TTM: Mysterious Mountainside": 3626080, "TTM: Breathtaking View from Bridge": 3626081, - "TTM: Blast to the Lonely Mushroom": 3626082 + "TTM: Blast to the Lonely Mushroom": 3626082, + "TTM: Bob-omb Buddy": 3626211, } #Tiny-Huge Island @@ -131,7 +139,8 @@ locTHI_table = { "THI: Rematch with Koopa the Quick": 3626086, "THI: Five Itty Bitty Secrets": 3626087, "THI: Wiggler's Red Coins": 3626088, - "THI: Make Wiggler Squirm": 3626089 + "THI: Make Wiggler Squirm": 3626089, + "THI: Bob-omb Buddy": 3626212, } #Tick Tock Clock @@ -151,7 +160,8 @@ locRR_table = { "RR: Coins Amassed in a Maze": 3626100, "RR: Swingin' in the Breeze": 3626101, "RR: Tricky Triangles!": 3626102, - "RR: Somewhere Over the Rainbow": 3626103 + "RR: Somewhere Over the Rainbow": 3626103, + "RR: Bob-omb Buddy": 3626214, } loc100Coin_table = { diff --git a/worlds/sm64ex/Options.py b/worlds/sm64ex/Options.py index be88592a..a078e9e1 100644 --- a/worlds/sm64ex/Options.py +++ b/worlds/sm64ex/Options.py @@ -9,6 +9,10 @@ class StrictCapRequirements(DefaultOnToggle): """If disabled, Stars that expect special caps may have to be acquired without the caps""" display_name = "Strict Cap Requirements" +class StrictCannonRequirements(DefaultOnToggle): + """If disabled, Stars that expect cannons may have to be acquired without them. Only makes a difference if Buddy Checks are enabled""" + display_name = "Strict Cannon Requirements" + class StarsToFinish(Range): """How many stars are required at the infinite stairs""" range_start = 50 @@ -25,6 +29,10 @@ class AreaRandomizer(Toggle): """Randomize Entrances to Courses""" display_name = "Course Randomizer" +class BuddyChecks(Toggle): + """Bob-omb Buddies are checks, Cannon Unlocks are items""" + display_name = "Bob-omb Buddy Checks" + class ProgressiveKeys(DefaultOnToggle): """Keys will first grant you access to the Basement, then to the Secound Floor""" display_name = "Progressive Keys" @@ -34,7 +42,9 @@ sm64_options: typing.Dict[str,type(Option)] = { "ProgressiveKeys": ProgressiveKeys, "EnableCoinStars": EnableCoinStars, "StrictCapRequirements": StrictCapRequirements, + "StrictCannonRequirements": StrictCannonRequirements, "StarsToFinish": StarsToFinish, "ExtraStars": ExtraStars, "DeathLink": DeathLink, + "BuddyChecks": BuddyChecks, } \ No newline at end of file diff --git a/worlds/sm64ex/Rules.py b/worlds/sm64ex/Rules.py index 7aaa4125..5d6b41b9 100644 --- a/worlds/sm64ex/Rules.py +++ b/worlds/sm64ex/Rules.py @@ -54,6 +54,11 @@ def set_rules(world,player,area_connections): add_rule(world.get_location("SSL: Free Flying for 8 Red Coins", player), lambda state: state.has("Wing Cap", player)) add_rule(world.get_location("DDD: Through the Jet Stream", player), lambda state: state.has("Metal Cap", player)) add_rule(world.get_location("Vanish Cap Under the Moat Red Coins", player), lambda state: state.has("Vanish Cap", player)) + if (world.StrictCannonRequirements[player].value): + add_rule(world.get_location("BoB: Mario Wings to the Sky", player), lambda state: state.has("Cannon Unlock BoB", player)) + add_rule(world.get_location("WF: Blast Away the Wall", player), lambda state: state.has("Cannon Unlock WF", player)) + add_rule(world.get_location("JRB: Blast to the Stone Pillar", player), lambda state: state.has("Cannon Unlock JRB", player)) + add_rule(world.get_location("RR: Somewhere Over the Rainbow", player), lambda state: state.has("Cannon Unlock RR", player)) #Rules for Secret Stars add_rule(world.get_location("Bowser in the Sky Red Coins", player), lambda state: state.can_reach("Third Floor",'Region',player) and state.has("Power Star", player, world.StarsToFinish[player].value)) diff --git a/worlds/sm64ex/__init__.py b/worlds/sm64ex/__init__.py index 5e640280..13eaf675 100644 --- a/worlds/sm64ex/__init__.py +++ b/worlds/sm64ex/__init__.py @@ -1,5 +1,5 @@ import typing -from .Items import item_table, SM64Item +from .Items import item_table, cannon_item_table, SM64Item from .Locations import location_table, SM64Location from .Options import sm64_options from .Rules import set_rules @@ -21,7 +21,7 @@ class SM64World(World): item_name_to_id = item_table location_name_to_id = location_table - data_version = 5 + data_version = 6 forced_auto_forfeit = False area_connections: typing.Dict[int, int] @@ -65,6 +65,20 @@ class SM64World(World): vanishcap = self.create_item("Vanish Cap") self.world.itempool += [wingcap,metalcap,vanishcap] + if (self.world.BuddyChecks[self.player].value): + self.world.itempool += [self.create_item(name) for name, id in cannon_item_table.items()] + else: + self.world.get_location("BoB: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock BoB")) + self.world.get_location("WF: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock WF")) + self.world.get_location("JRB: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock JRB")) + self.world.get_location("CCM: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock CCM")) + self.world.get_location("SSL: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock SSL")) + self.world.get_location("SL: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock SL")) + self.world.get_location("WDW: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock WDW")) + self.world.get_location("TTM: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock TTM")) + self.world.get_location("THI: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock THI")) + self.world.get_location("RR: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock RR")) + def fill_slot_data(self): return { "AreaRando": self.area_connections,