Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super Mario 64: Rework logic for 100 Coins #4131

Merged
merged 15 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions worlds/sm64ex/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,21 @@
from Options import DefaultOnToggle, Range, Toggle, DeathLink, Choice, PerGameCommonOptions, OptionSet, OptionGroup
from .Items import action_item_table

class EnableCoinStars(DefaultOnToggle):
"""Disable to Ignore 100 Coin Stars. You can still collect them, but they don't do anything.
Removes 15 locations from the pool."""
class EnableCoinStars(Choice):
"""
Determine logic for 100 Coin Stars.

Off - Removed from pool. You can still collect them, but they don't do anything.
Optimal for ignoring 100 Coin Stars entirely. Removes 15 locations from the pool.

On - Kept in pool, potentially randomized.

Vanilla - Kept in pool, but NOT randomized.
"""
display_name = "Enable 100 Coin Stars"
option_off = 0
option_on = 1
option_vanilla = 2


class StrictCapRequirements(DefaultOnToggle):
Expand Down
23 changes: 22 additions & 1 deletion worlds/sm64ex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ def create_items(self):
# 1Up Mushrooms
self.multiworld.itempool += [self.create_item("1Up Mushroom") for i in range(0,self.filler_count)]
# Power Stars
self.multiworld.itempool += [self.create_item("Power Star") for i in range(0,self.number_of_stars)]
star_range = self.number_of_stars
# Vanilla 100 Coin stars have to removed from the pool if other max star increasing options are active.
if (self.options.enable_coin_stars == "vanilla" and self.number_of_stars >= 15):
josephwhite marked this conversation as resolved.
Show resolved Hide resolved
star_range -= 15
self.multiworld.itempool += [self.create_item("Power Star") for i in range(0,star_range)]
# Keys
if (not self.options.progressive_keys):
key1 = self.create_item("Basement Key")
Expand Down Expand Up @@ -166,6 +170,23 @@ def generate_basic(self):
self.multiworld.get_location("Wing Mario Over the Rainbow 1Up Block", self.player).place_locked_item(self.create_item("1Up Mushroom"))
self.multiworld.get_location("Bowser in the Sky 1Up Block", self.player).place_locked_item(self.create_item("1Up Mushroom"))

if (self.options.enable_coin_stars == "vanilla"):
self.multiworld.get_location("BoB: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("WF: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("JRB: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("CCM: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("BBH: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("HMC: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("LLL: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("SSL: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("DDD: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("SL: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("WDW: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("TTM: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("THI: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("TTC: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))
self.multiworld.get_location("RR: 100 Coins", self.player).place_locked_item(self.create_item("Power Star"))

def get_filler_item_name(self) -> str:
return "1Up Mushroom"

Expand Down
Loading