mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Added a custom dynamic item weights pool option.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import typing
|
||||
from Options import Option, Toggle, Range
|
||||
from Options import Option, DefaultOnToggle, Range, OptionList
|
||||
|
||||
|
||||
class TotalLocations(Range):
|
||||
@@ -27,21 +27,121 @@ class ItemPickupStep(Range):
|
||||
range_end = 5
|
||||
default = 1
|
||||
|
||||
class AllowLunarItems(Toggle):
|
||||
|
||||
class AllowLunarItems(DefaultOnToggle):
|
||||
"""Allows Lunar items in the item pool."""
|
||||
displayname = "Enable Lunar Item Shuffling"
|
||||
default = True
|
||||
|
||||
class StartWithRevive(Toggle):
|
||||
|
||||
class StartWithRevive(DefaultOnToggle):
|
||||
"""Start the game with a `Dio's Best Friend` item."""
|
||||
displayname = "Start with a Revive"
|
||||
default = True
|
||||
|
||||
|
||||
class GreenScrap(Range):
|
||||
"""Weight of Green Scraps in the item pool."""
|
||||
displayname = "Green Scraps"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 15
|
||||
|
||||
|
||||
class RedScrap(Range):
|
||||
"""Weight of Red Scraps in the item pool."""
|
||||
displayname = "Red Scraps"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 5
|
||||
|
||||
|
||||
class YellowScrap(Range):
|
||||
"""Weight of yellow scraps in the item pool."""
|
||||
displayname = "Yellow Scraps"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 1
|
||||
|
||||
|
||||
class WhiteScrap(Range):
|
||||
"""Weight of white scraps in the item pool."""
|
||||
displayname = "White Scraps"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 30
|
||||
|
||||
|
||||
class CommonItem(Range):
|
||||
"""Weight of common items in the item pool."""
|
||||
displayname = "Common Items"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 75
|
||||
|
||||
|
||||
class UncommonItem(Range):
|
||||
"""Weight of uncommon items in the item pool."""
|
||||
displayname = "Uncommon Items"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 40
|
||||
|
||||
|
||||
class LegendaryItem(Range):
|
||||
"""Weight of legendary items in the item pool."""
|
||||
displayname = "Legendary Items"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 10
|
||||
|
||||
|
||||
class BossItem(Range):
|
||||
"""Weight of boss items in the item pool."""
|
||||
displayname = "Boss Items"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 5
|
||||
|
||||
|
||||
class LunarItem(Range):
|
||||
"""Weight of lunar items in the item pool."""
|
||||
displayname = "Lunar Items"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 15
|
||||
|
||||
|
||||
class Equipment(Range):
|
||||
"""Weight of equipment items in the item pool."""
|
||||
displayname = "Equipment"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 25
|
||||
|
||||
|
||||
class WeightPresets(Choice):
|
||||
"""Preset item weight options."""
|
||||
displayname = "Item Weight Preset"
|
||||
option_default = 0
|
||||
|
||||
|
||||
ror2_weights: typing.Dict[str, type(Option)] = {
|
||||
"green_scrap": GreenScrap,
|
||||
"red_scrap": RedScrap,
|
||||
"yellow_scrap": YellowScrap,
|
||||
"white_scrap": WhiteScrap,
|
||||
"common_item": CommonItem,
|
||||
"uncommon_item": UncommonItem,
|
||||
"legendary_item": LegendaryItem,
|
||||
"boss_item": BossItem,
|
||||
"lunar_item": LunarItem,
|
||||
"equipment": Equipment
|
||||
}
|
||||
|
||||
ror2_options: typing.Dict[str, type(Option)] = {
|
||||
"total_locations": TotalLocations,
|
||||
"total_revivals": TotalRevivals,
|
||||
"start_with_revive": StartWithRevive,
|
||||
"item_pickup_step": ItemPickupStep,
|
||||
"enable_lunar": AllowLunarItems
|
||||
}
|
||||
"enable_lunar": AllowLunarItems,
|
||||
**ror2_weights
|
||||
}
|
||||
Reference in New Issue
Block a user