-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.py
More file actions
104 lines (81 loc) · 3 KB
/
options.py
File metadata and controls
104 lines (81 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
from dataclasses import dataclass
from Options import Choice, OptionSet, Toggle, DefaultOnToggle, PerGameCommonOptions, StartInventoryPool
class Factions(OptionSet):
"""
Which factions' units to shuffle as items. Other factions will be unavailable.
Clubber will always be included unless another starting unit is set in Start Inventory from Pool.
"""
display_name = "Factions"
valid_keys = [
"Legacy",
"Secret",
"Tribal",
"Farmer",
"Medieval",
"Ancient",
"Viking",
"Dynasty",
"Renaissance",
"Pirate",
"Spooky",
"Wild West",
"Fantasy Good",
"Fantasy Evil",
]
default = frozenset(valid_keys)
class ProgressiveFactions(Toggle):
"""Receive units as progressive items for each faction, unlocking the next unit within that faction."""
display_name = "Progressive Factions"
class SecretLogic(Choice):
"""
How secret unlocks are treated in the game.
- **None**: No secrets are available.
- **Regular**: Unit unlocks count as locations. Maps must be reachable to be available in sandbox.
- **No Unlocks**: Same as regular, but secrets in unlockable maps are not included. Unlocking Farmer Snow or Fantasy Good/Evil when not an available campaign is a single check.
- **All**: All secrets are available in sandbox from the start.
"""
display_name = "Secret Location Type"
option_none = 0
option_regular = 1
option_no_unlocks = 2
option_all = 3
default = option_regular
class Campaigns(OptionSet):
"""The set of campaigns to complete to win the game."""
display_name = "Victory Campaigns"
valid_keys = [
"Introduction",
"Adventure",
"Challenge",
"Dynasty",
"Renaissance",
"Pirate",
"Spooky",
"Simulation",
"Wild West",
"Legacy",
"Fantasy Good",
"Fantasy Evil",
]
default = frozenset({"Introduction", "Adventure", "Challenge"})
class ExtraCampaigns(OptionSet):
"""Additional available campaigns that have locations, but which aren't needed for goal."""
display_name = "Additional Campaigns"
valid_keys = Campaigns.valid_keys
default = frozenset({"Simulation"})
class HiddenCampaignUnlocks(DefaultOnToggle):
"""
Whether hidden campaigns must be unlocked to become available.
If Secret Location Type is regular or no unlocks, this will require the unlock locations to be reachable in campaign.
Does nothing if no unlockable campaigns are available or Secret Location Type is all. The Legacy campaign is always unlocked from the start.
"""
display_name = "Hidden Campaign Unlocks"
@dataclass
class TABSOptions(PerGameCommonOptions):
factions: Factions
progressive_factions: ProgressiveFactions
secret_type: SecretLogic
required_campaigns: Campaigns
additional_campaigns: ExtraCampaigns
hidden_campaign_unlocks: HiddenCampaignUnlocks
start_inventory_from_pool: StartInventoryPool