- type: entity
  parent: BaseGameRule
  id: SiliconLiberation
  components:
  - type: SELFRule
  - type: AntagObjectives
    objectives:
    - SiliconRightsObjective
    - FreeAIObjective
    - FreeBorgsObjective
  - type: AntagSelection
    agentName: self-round-end-agent-name
    selectionTime: IntraPlayerSpawn
    definitions:
    - prefRoles: [ SELFAgent ]
      max: 3
      startingGear: SELFAgentGear
      mindRoles:
      - MindRoleSELFAgent
      briefing:
        sound: "/Audio/_Starlight/Ambience/Antag/self_greeting.ogg"
      allowNonHumans: true
  - type: DynamicRuleCost
    cost: 75

# Variant of thieves that only spawn up to 3. Used in revs to prevent emags from being too easily obtained.
- type: entity
  parent: Thief
  id: ThiefLess
  components:
  - type: ThiefRule
# - type: AntagObjectives
#   objectives: # We won't be using this, we'll be taking it from GroupOuter instead so we can roll for Master Thief
#   - EscapeThiefShuttleObjective # Keeping this here in case someone wonders why it's gone in the future, though.
  - type: AntagRandomObjectives
    sets:
    - groups: ThiefObjectiveGroupOuter # Replaced with outer group, so we can *finally* roll the escape objective more reliably.
      maxPicks: 10
    maxDifficulty: 3
  - type: AntagSelection
    agentName: thief-round-end-agent-name
    selectionTime: IntraPlayerSpawn
    definitions:
    - prefRoles: [ Thief ]
      max: 3 # Starlight. Prevents excess thieves from spawning on Revs.
      playerRatio: 26 # Starlight. Scales at same ratio as normal thieves now.
      lateJoinAdditional: true
      allowNonHumans: true
      multiAntagSetting: NotExclusive
      startingGear: ThiefGear
      components:
      - type: Pacified
      - type: Thieving
        stripTimeReduction: 2
        stealthy: true
      mindRoles:
      - MindRoleThief
      briefing:
        sound: "/Audio/Misc/thief_greeting.ogg"

#Subgamemode variant of vamps. There's less of them.
- type: entity
  parent: Vampire
  id: VampireLess
  components:
  - type: VampireRule
  - type: AntagSelection
    agentName: vampire-roundend-name
    selectionTime: IntraPlayerSpawn # Only select vamps on round start
    definitions:
    - prefRoles: [ Vampire ]
      max: 6 # Starlight. Accounting for scaling. Not as many as the full gamemode.
      playerRatio: 28 # Starlight. Scales similar to the other common sub-antags.
      lateJoinAdditional: true
      allowNonHumans: True
      multiAntagSetting: None
      mindRoles:
      - MindRoleVampire
      # Starlight-start
      tags:
        - CantBecomeRevolutionary
  - type: DynamicRuleCost
    cost: 75
    # Starlight-end


#Subgamemode Lings for Vamptraitorlings.
- type: entity
  parent: BaseGameRule
  id: SLChangelingLess
  components:
  - type: SLChangelingRule
  - type: AntagSelection
    agentName: changeling-roundend-name
    definitions:
    - prefRoles: [ Changeling ]
      max: 4 # Starlight, same reasoning as the roundstart changeling change, for alpha.
      playerRatio: 35 # Starlight, to make sure Beta doesn't get more than 2 changelings as a submode on VTL. Same justification as Thieves. Should be harder to get 4 lings on VTL now.
      lateJoinAdditional: true
      allowNonHumans: false
      multiAntagSetting: None
      mindRoles:
      - MindRoleChangeling
      components:
        - type: ChangelingDevour
        - type: ChangelingIdentity
        - type: ChangelingTransform
      # Starlight-start
      tags:
        - CantBecomeRevolutionary
  - type: DynamicRuleCost
    cost: 75

- type: entity
  parent: Traitor
  id: SubTraitor
  components:
  - type: GameRule
    minPlayers: 5
    delay:
      min: 240
      max: 420
  - type: AntagRandomObjectives
    sets:
    - groups: SubTraitorObjectiveGroups
    maxDifficulty: 4 # Less intrusive traitors.
  - type: AntagSelection
    selectionTime: IntraPlayerSpawn
    definitions:
    - prefRoles: [ Traitor ]
      max: 6 # Starlight. Less intrusive traitors.
      playerRatio: 21 # Starlight. Less intrusive traitors.
      blacklist:
        components:
        - AntagImmune
      lateJoinAdditional: false
      allowNonHumans: true
      mindRoles:
      - MindRoleTraitor
  - type: DynamicRuleCost
    cost: 75

- type: entity
  parent: BaseGameRule
  id: Devil
  components:
  - type: DevilRule
  - type: AntagObjectives
    objectives:
    - SurviveDevilObjective
    - DamnSoulsDevilObjective
  - type: AntagSelection
    agentName: devil-round-end-agent-name
    selectionTime: IntraPlayerSpawn
    definitions:
    - prefRoles: [ Devil ]
      max: 2
      playerRatio: 50 # not meant to be a ton of them
      lateJoinAdditional: false
      allowNonHumans: true
      multiAntagSetting: NotExclusive
      mindRoles:
      - MindRoleDevil
      briefing:
        sound: "/Audio/_Starlight/Misc/devil_greeting.ogg"
      components:
      - type: ActiveListener
      - type: Unholy
      - type: Clumsy
        clumsyDefaultCheck: 1
        clumsyGuns: true
        clumsySound: "/Audio/Weapons/Guns/Gunshots/bang.ogg"
        clumsyDefib: false
        clumsyHypo: false
        clumsyVaulting: false
      tags:
        - CantBecomeRevolutionary
  - type: DynamicRuleCost
    cost: 100

- type: entity
  parent: Xenoborgs
  id: SubXenoborgs
  components:
  - type: AntagMultipleRoleSpawner
    antagRoleToPrototypes:
      MothershipCore: [ MothershipCore ]
      Xenoborg: [ XenoborgEngi, XenoborgHeavy, XenoborgScout, XenoborgStealth ]
    pickAndTake: true
  - type: AntagSelection
    selectionTime: PrePlayerSpawn
    definitions:
    - prefRoles: [ MothershipCore ]
      fallbackRoles: [ Xenoborg ]
      spawnerPrototype: SpawnPointGhostRoleMothershipCore
      # Starlight Start
      roleLoadout:
      - AntagMothership
      # Starlight End
      mindRoles:
      - MindRoleMothershipCore
    - prefRoles: [ Xenoborg ]
      fallbackRoles: [ MothershipCore ]
      spawnerPrototype: SpawnPointGhostRoleXenoborg
      # Starlight Start
      roleLoadout:
      - AntagXenoborg
      # Starlight End
      mindRoles:
      - MindRoleXenoborg
      min: 4
      max: 4
  - type: DynamicRuleCost
    cost: 150
