- type: entity
  parent: BaseGameRule
  id: DynamicRule
  components:
  - type: GameRule
    minPlayers: 5 # <5 is greenshift hours, buddy.
  - type: DynamicRule
    startingBudgetMin: 200
    startingBudgetMax: 350
    table: !type:AllSelector
      children:
      # Roundstart Major Rules
      - !type:GroupSelector
        conditions:
        - !type:RoundDurationCondition
          max: 1
        children:
        - id: Traitor
          weight: 60
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
        - id: Nukeops
          weight: 25
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
          - !type:PlayerCountCondition
            min: 20
        - id: Revolutionary
          weight: 5
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
        - id: Zombie
          weight: 5
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
          - !type:PlayerCountCondition
            min: 20
        - id: Wizard
          weight: 5
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
          - !type:PlayerCountCondition
            min: 10
      # Roundstart Minor Rules
      - !type:GroupSelector
        conditions:
        - !type:RoundDurationCondition
          max: 1
        children:
        - id: Thief
          prob: 0.5
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
        - id: Changeling
          prob: 0.25
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
      # Midround rules
      - !type:GroupSelector
        conditions:
        - !type:RoundDurationCondition
          min: 300 # minimum 5 minutes
        children:
        - id: SleeperAgents
          weight: 15
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
          - !type:RoundDurationCondition
            min: 900 # 15 minutes
        - id: DragonSpawn
          weight: 15
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
          - !type:RoundDurationCondition
            min: 900 # 15 minutes
        - id: NinjaSpawn
          weight: 20
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
          - !type:RoundDurationCondition
            min: 900 # 15 minutes
        - id: ParadoxCloneSpawn
          weight: 25
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
            max: 2
          - !type:RoundDurationCondition
            min: 600 # 10 minutes
        - id: ZombieOutbreak
          weight: 2.5
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
          - !type:PlayerCountCondition
            min: 20
          - !type:RoundDurationCondition
            min: 2700 # 45 minutes
        - id: LoneOpsSpawn
          weight: 5
          conditions:
          - !type:HasBudgetCondition
          - !type:MaxRuleOccurenceCondition
          - !type:PlayerCountCondition
            min: 20
          - !type:RoundDurationCondition
            min: 2100 # 35 minutes
