sm64ex: Add Option to limit stars, replace with junk
This commit is contained in:
parent
e85baa8068
commit
0507d6923e
|
@ -9,5 +9,6 @@ item_table = {
|
||||||
"Second Floor Key": 3626179,
|
"Second Floor Key": 3626179,
|
||||||
"Wing Cap": 3626180,
|
"Wing Cap": 3626180,
|
||||||
"Metal Cap": 3626181,
|
"Metal Cap": 3626181,
|
||||||
"Vanish Cap": 3626182
|
"Vanish Cap": 3626182,
|
||||||
|
"1Up Mushroom": 3626183
|
||||||
}
|
}
|
|
@ -15,8 +15,15 @@ class StarsToFinish(Range):
|
||||||
range_end = 100
|
range_end = 100
|
||||||
default = 70
|
default = 70
|
||||||
|
|
||||||
|
class ExtraStars(Range):
|
||||||
|
"""How many stars exist beyond those set for StarsToFinish"""
|
||||||
|
range_start = 0
|
||||||
|
range_end = 50
|
||||||
|
default = 50
|
||||||
|
|
||||||
sm64_options: typing.Dict[str,type(Option)] = {
|
sm64_options: typing.Dict[str,type(Option)] = {
|
||||||
"EnableCoinStars": EnableCoinStars,
|
"EnableCoinStars": EnableCoinStars,
|
||||||
"StrictCapRequirements": StrictCapRequirements,
|
"StrictCapRequirements": StrictCapRequirements,
|
||||||
"StarsToFinish": StarsToFinish
|
"StarsToFinish": StarsToFinish,
|
||||||
|
"ExtraStars": ExtraStars
|
||||||
}
|
}
|
|
@ -21,7 +21,7 @@ class SM64World(World):
|
||||||
item_name_to_id = item_table
|
item_name_to_id = item_table
|
||||||
location_name_to_id = location_table
|
location_name_to_id = location_table
|
||||||
|
|
||||||
data_version = 3
|
data_version = 4
|
||||||
forced_auto_forfeit = False
|
forced_auto_forfeit = False
|
||||||
|
|
||||||
options = sm64_options
|
options = sm64_options
|
||||||
|
@ -35,15 +35,17 @@ class SM64World(World):
|
||||||
|
|
||||||
def create_item(self, name: str) -> Item:
|
def create_item(self, name: str) -> Item:
|
||||||
item_id = item_table[name]
|
item_id = item_table[name]
|
||||||
item = SM64Item(name, True, item_id, self.player)
|
item = SM64Item(name, name != "1Up Mushroom", item_id, self.player)
|
||||||
return item
|
return item
|
||||||
|
|
||||||
def generate_basic(self):
|
def generate_basic(self):
|
||||||
staritem = self.create_item("Power Star")
|
staritem = self.create_item("Power Star")
|
||||||
if (self.world.EnableCoinStars[self.player].value):
|
starcount = self.world.StarsToFinish[self.player].value + self.world.ExtraStars[self.player].value
|
||||||
self.world.itempool += [staritem for i in range(0,120)]
|
if (self.world.EnableCoinStars[self.player].value and (starcount-15) >= self.world.StarsToFinish[self.player].value):
|
||||||
else:
|
starcount -= 15
|
||||||
self.world.itempool += [staritem for i in range(0,105)]
|
self.world.itempool += [staritem for i in range(0,starcount)]
|
||||||
|
mushroomitem = self.create_item("1Up Mushroom")
|
||||||
|
self.world.itempool += [mushroomitem for i in range(starcount,120)]
|
||||||
|
|
||||||
key1 = self.create_item("Basement Key")
|
key1 = self.create_item("Basement Key")
|
||||||
key2 = self.create_item("Second Floor Key")
|
key2 = self.create_item("Second Floor Key")
|
||||||
|
|
Loading…
Reference in New Issue