|
8 | 8 | from src.events import Event, EventListener |
9 | 9 | from src.users import User |
10 | 10 | from src.cats import (All, Cursed, Wolf, Wolfchat, Innocent, Village, Neutral, Hidden, Team_Switcher, |
11 | | - Win_Stealer, Nocturnal, Killer, Vampire, Spy, all_roles) |
| 11 | + Win_Stealer, Nocturnal, Killer, Vampire, Spy) |
12 | 12 | from src.gamestate import GameState |
13 | 13 |
|
14 | 14 | __all__ = ["InvalidModeException", "game_mode", "import_builtin_modes", "GameMode", "GAME_MODES"] |
@@ -182,32 +182,31 @@ class GameMode: |
182 | 182 |
|
183 | 183 | def __init__(self, arg=""): |
184 | 184 | # Default values for the role sets and secondary roles restrictions |
185 | | - defined_roles = all_roles() |
186 | 185 | self.ROLE_SETS = {} |
187 | 186 | self.SECONDARY_ROLES = {} |
188 | 187 |
|
189 | | - if "gunner" in defined_roles and "sharpshooter" in defined_roles: |
| 188 | + if "gunner" in All and "sharpshooter" in All: |
190 | 189 | self.ROLE_SETS["gunner/sharpshooter"] = {"gunner": 4, "sharpshooter": 1} |
191 | 190 |
|
192 | | - if "cursed villager" in defined_roles: |
| 191 | + if "cursed villager" in All: |
193 | 192 | self.SECONDARY_ROLES["cursed villager"] = All - Cursed - Wolf - Innocent |
194 | | - if "seer" in defined_roles: |
| 193 | + if "seer" in All: |
195 | 194 | self.SECONDARY_ROLES["cursed villager"] -= {"seer"} |
196 | | - if "oracle" in defined_roles: |
| 195 | + if "oracle" in All: |
197 | 196 | self.SECONDARY_ROLES["cursed villager"] -= {"oracle"} |
198 | 197 |
|
199 | | - if "gunner" in defined_roles: |
| 198 | + if "gunner" in All: |
200 | 199 | self.SECONDARY_ROLES["gunner"] = Village + Neutral + Hidden - Innocent - Team_Switcher |
201 | 200 |
|
202 | | - if "sharpshooter" in defined_roles: |
| 201 | + if "sharpshooter" in All: |
203 | 202 | self.SECONDARY_ROLES["sharpshooter"] = Village + Neutral + Hidden - Innocent - Team_Switcher |
204 | 203 |
|
205 | | - if "mayor" in defined_roles: |
| 204 | + if "mayor" in All: |
206 | 205 | self.SECONDARY_ROLES["mayor"] = All - Innocent - Win_Stealer |
207 | 206 |
|
208 | | - if "assassin" in defined_roles: |
| 207 | + if "assassin" in All: |
209 | 208 | self.SECONDARY_ROLES["assassin"] = All - Nocturnal + Killer - Spy + Wolfchat - Wolf - Vampire - Innocent - Team_Switcher |
210 | | - if "traitor" in defined_roles: |
| 209 | + if "traitor" in All: |
211 | 210 | self.SECONDARY_ROLES["assassin"] -= {"traitor"} |
212 | 211 |
|
213 | 212 | self.DEFAULT_TOTEM_CHANCES = self.TOTEM_CHANCES = {} |
|
0 commit comments