RoR2: Add Support for New Stage (#3436)

* add support for the new stage added to RoR2

* Fix stage being unreachable

* add option groups

* reorder option groups
This commit is contained in:
Rjosephson
2024-06-04 13:24:14 -06:00
committed by GitHub
parent ee1b13f219
commit f30f2d3a3f
4 changed files with 51 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
from dataclasses import dataclass
from Options import Toggle, DefaultOnToggle, DeathLink, Range, Choice, PerGameCommonOptions
from Options import Toggle, DefaultOnToggle, DeathLink, Range, Choice, PerGameCommonOptions, OptionGroup
# NOTE be aware that since the range of item ids that RoR2 uses is based off of the maximums of checks
@@ -350,7 +350,7 @@ class ItemPoolPresetToggle(Toggle):
class ItemWeights(Choice):
"""Set item_pool_presets to true if you want to use one of these presets.
"""Set Use Item Weight Presets to yes if you want to use one of these presets.
Preset choices for determining the weights of the item pool.
- New is a test for a potential adjustment to the default weights.
- Uncommon puts a large number of uncommon items in the pool.
@@ -375,6 +375,44 @@ class ItemWeights(Choice):
option_void = 9
ror2_option_groups = [
OptionGroup("Explore Mode Options", [
ChestsPerEnvironment,
ShrinesPerEnvironment,
ScavengersPerEnvironment,
ScannersPerEnvironment,
AltarsPerEnvironment,
RequireStages,
ProgressiveStages,
]),
OptionGroup("Classic Mode Options", [
TotalLocations,
], start_collapsed=True),
OptionGroup("Weighted Choices", [
ItemWeights,
ItemPoolPresetToggle,
WhiteScrap,
GreenScrap,
YellowScrap,
RedScrap,
CommonItem,
UncommonItem,
LegendaryItem,
BossItem,
LunarItem,
VoidItem,
Equipment,
Money,
LunarCoin,
Experience,
MountainTrap,
TimeWarpTrap,
CombatTrap,
TeleportTrap,
]),
]
@dataclass
class ROR2Options(PerGameCommonOptions):
goal: Goal
@@ -399,10 +437,10 @@ class ROR2Options(PerGameCommonOptions):
item_weights: ItemWeights
item_pool_presets: ItemPoolPresetToggle
# define the weights of the generated item pool.
green_scrap: GreenScrap
red_scrap: RedScrap
yellow_scrap: YellowScrap
white_scrap: WhiteScrap
green_scrap: GreenScrap
yellow_scrap: YellowScrap
red_scrap: RedScrap
common_item: CommonItem
uncommon_item: UncommonItem
legendary_item: LegendaryItem