{
  "format": "deckcraft-game/1",
  "name": "Starforge Rivals",
  "meta": {
    "actions": [
      "play_card",
      "buy_from_market",
      "draw_n_cards",
      "discard_zone",
      "end_phase",
      "activate_ability",
      "strike",
      "bombard"
    ],
    "card_types": {
      "unit": {
        "enabled": true
      },
      "structure": {
        "enabled": true
      }
    },
    "enabled_mechanics": [
      "draw_cards",
      "deal_damage",
      "discard_cards",
      "gain_resource",
      "heal"
    ],
    "ending": {
      "ends_when": [
        {
          "label": "Reduce Authority to 0",
          "when": {
            "<=": [
              {
                "var": "trigger.target.trackers.authority"
              },
              0
            ]
          },
          "scope": "any_player",
          "terminates_at": "immediately",
          "resolution": {
            "kind": "instant",
            "winner_rule": "trigger_target_loses"
          },
          "_recipe": "combat",
          "_recipe_values": {
            "tracker": "authority",
            "threshold": 0,
            "comparator": "<="
          }
        }
      ]
    },
    "game_briefing": {
      "game_name": "Starforge Rivals",
      "elevator_pitch": "Two rival fleets forge warships from the scrap of a dying star and race to shatter each other's command authority.",
      "mechanic": "deckbuild",
      "subgenre": "combat",
      "player_mode": "competitive",
      "card_volume_preset": "small_game",
      "card_volume_data": {
        "volume_label": "Small Game",
        "volume_description": "Quick setup, fast rounds, minimal components. Ideal for compact card decks.",
        "min_card_count": 46,
        "soft_card_cap": 60,
        "hard_card_cap": 72
      },
      "player_count_min": 2,
      "player_count_max": 2,
      "game_description": "Each turn you spend Salvage to buy stronger ships from a shared scrapyard row, then send what you have built into battle. Decks start identical and thin; within a few turns each player's fleet has its own character. Rounds are fast and the pressure builds as both authority totals fall.",
      "game_inspired_in": "Star Realms, Ascension",
      "game_goal": "Reduce your opponent's Authority from 50 to zero.",
      "game_imaginary": "The debris field of a collapsing star, where scavenger fleets weld warships out of wreckage.",
      "game_graphic_style": "Gritty painted sci-fi: scorched hull plating, cold starlight, muted teal and rust palette.",
      "age_rating": "12+",
      "play_time": "15_30",
      "complexity": "2",
      "product_model": "",
      "is_team_game": false,
      "game_genre_subgenre": "deckbuild|combat"
    },
    "game_zones": [
      {
        "id": "draw_pile",
        "label": "Draw Pile",
        "description": "",
        "icon": "fas fa-layer-group",
        "scope": "per_player",
        "visibility": "hidden",
        "ordering": "stack",
        "constraints": {
          "accepts_types": [
            "*"
          ],
          "max_cards": null,
          "exclusive": false
        },
        "auto_refill": null,
        "reset": null,
        "setup": {
          "start_filled_from": null,
          "shuffle_at_start": true
        }
      },
      {
        "id": "hand",
        "label": "Hand",
        "description": "",
        "icon": "fas fa-hand-paper",
        "scope": "per_player",
        "visibility": "owner_count_to_others",
        "ordering": "unordered",
        "constraints": {
          "accepts_types": [
            "*"
          ],
          "max_cards": null,
          "exclusive": false
        },
        "auto_refill": null,
        "reset": null,
        "setup": {
          "start_filled_from": null,
          "shuffle_at_start": false
        }
      },
      {
        "id": "in_play",
        "label": "In Play",
        "description": "",
        "icon": "fas fa-chess-board",
        "scope": "per_player",
        "visibility": "public",
        "ordering": "unordered",
        "constraints": {
          "accepts_types": [
            "*"
          ],
          "max_cards": null,
          "exclusive": false
        },
        "auto_refill": null,
        "reset": {
          "trigger": "per_turn",
          "destination": null
        },
        "setup": {
          "start_filled_from": null,
          "shuffle_at_start": false
        }
      },
      {
        "id": "discard",
        "label": "Discard",
        "description": "",
        "icon": "fas fa-trash",
        "scope": "per_player",
        "visibility": "public",
        "ordering": "stack",
        "constraints": {
          "accepts_types": [
            "*"
          ],
          "max_cards": null,
          "exclusive": false
        },
        "auto_refill": null,
        "reset": null,
        "setup": {
          "start_filled_from": null,
          "shuffle_at_start": false
        }
      },
      {
        "id": "market_deck",
        "label": "Market Deck",
        "description": "",
        "icon": "fas fa-clone",
        "scope": "shared",
        "visibility": "hidden",
        "ordering": "stack",
        "constraints": {
          "accepts_types": [
            "*"
          ],
          "max_cards": null,
          "exclusive": false
        },
        "auto_refill": null,
        "reset": null,
        "setup": {
          "start_filled_from": null,
          "shuffle_at_start": true
        }
      },
      {
        "id": "trade_row",
        "label": "Trade Row",
        "description": "",
        "icon": "fas fa-store",
        "scope": "shared",
        "visibility": "public",
        "ordering": "unordered",
        "constraints": {
          "accepts_types": [
            "*"
          ],
          "max_cards": 5,
          "exclusive": false
        },
        "auto_refill": {
          "from": "market_deck",
          "to": 5,
          "trigger": "after_action",
          "when_empty": "stop_refill"
        },
        "reset": null,
        "setup": {
          "start_filled_from": "market_deck",
          "shuffle_at_start": false
        }
      }
    ],
    "phases": [
      {
        "id": "main",
        "label": "Main Phase",
        "description": "Player plays cards, buys from market, attacks.",
        "kind": "player_driven",
        "scope": "per_player",
        "allowed_actions": [
          "play_card",
          "buy_from_market",
          "activate_ability",
          "end_phase",
          "strike",
          "bombard"
        ],
        "mandatory_actions": [],
        "repeat": "until_player_ends"
      },
      {
        "id": "cleanup",
        "label": "Cleanup",
        "description": "Discard hand and in_play, draw 5.",
        "kind": "automatic",
        "scope": "per_player",
        "allowed_actions": [],
        "mandatory_actions": [
          {
            "action": "discard_zone",
            "params": {
              "from_zone": "hand",
              "to_zone": "discard"
            }
          },
          {
            "action": "discard_zone",
            "params": {
              "from_zone": "in_play",
              "to_zone": "discard"
            }
          },
          {
            "action": "draw_n_cards",
            "params": {
              "from_zone": "draw_pile",
              "n": 5
            }
          }
        ],
        "repeat": "once"
      }
    ],
    "setup_spec": {
      "turn_order": "clockwise",
      "first_player_rule": "random",
      "starting_hand_size": 5,
      "initial_tracker_overrides": [],
      "deck_to_zone_map": [],
      "steps": [
        {
          "action": "fill_zone",
          "params": {
            "zone": "draw_pile",
            "from_deck": "Shared Starter Deck",
            "shuffle": true
          }
        },
        {
          "action": "fill_zone",
          "params": {
            "zone": "market_deck",
            "from_deck": "Deck 1",
            "shuffle": true
          }
        },
        {
          "action": "draw_n_cards",
          "params": {
            "n": 3,
            "from_zone": "draw_pile",
            "seat": 1
          }
        },
        {
          "action": "draw_n_cards",
          "params": {
            "n": 5,
            "from_zone": "draw_pile",
            "seat": 2
          }
        }
      ]
    },
    "trackers": [
      {
        "id": "authority",
        "label": "Authority",
        "description": "Your command standing. Starts at 50; when it reaches zero your fleet is finished.",
        "type": "counter",
        "role": "life",
        "scope": "per_player",
        "visibility": "public",
        "icon": "fas fa-heart",
        "units": null,
        "starts_at": 50,
        "min": 0,
        "max": null,
        "regenerates": null
      },
      {
        "id": "trade",
        "label": "Trade",
        "description": "Salvage currency. Spend it to buy ships from the scrapyard row. Resets to zero at end of turn.",
        "type": "counter",
        "role": "resource",
        "scope": "per_player",
        "visibility": "public",
        "icon": "fas fa-bolt",
        "units": null,
        "starts_at": 0,
        "min": 0,
        "max": null,
        "regenerates": "per_turn_reset_to_zero"
      },
      {
        "id": "combat",
        "label": "Combat",
        "description": "Firepower generated this turn. Spend it to strike the opponent's Authority. Resets to zero at end of turn.",
        "type": "counter",
        "role": "resource",
        "scope": "per_player",
        "visibility": "public",
        "icon": "fas fa-bolt",
        "units": null,
        "starts_at": 0,
        "min": 0,
        "max": null,
        "regenerates": "per_turn_reset_to_zero"
      }
    ],
    "attribute_rules": {
      "health": {
        "min": 0,
        "on_deplete": {
          "move_to": "discard"
        }
      }
    },
    "conditions": {
      "can_attack": {
        "label": "Has combat to spend",
        "authored": {
          "preset": "tracker_compare",
          "params": {
            "tracker": "combat",
            "op": ">=",
            "value": 1
          }
        }
      },
      "no_enemy_outpost": {
        "label": "No enemy Outpost in play",
        "authored": {
          "preset": "count_cards_compare",
          "params": {
            "zones": [
              "in_play"
            ],
            "owner": "opponent",
            "op": "==",
            "value": 0,
            "filter_behaviour": "Outpost"
          }
        }
      }
    },
    "action_definitions": {
      "strike": {
        "label": "Attack",
        "category": "attack",
        "authored": {
          "preset": "spend_pool_at_player",
          "params": {
            "pool": "combat",
            "target_tracker": "authority"
          }
        }
      },
      "bombard": {
        "label": "Bombard a base",
        "category": "attack",
        "steps": [
          {
            "do": "choose",
            "kind": "cards",
            "of": "opponent",
            "from": "in_play",
            "count": 1,
            "as": "target",
            "per": "card",
            "price": {
              "tracker": "combat",
              "amount": {
                "attribute": "health",
                "of": "$target"
              }
            }
          },
          {
            "do": "adjust_value",
            "target": {
              "tracker": "combat",
              "of": "actor"
            },
            "amount": {
              "attribute": "health",
              "of": "$target"
            },
            "op": "subtract"
          },
          {
            "do": "adjust_value",
            "target": {
              "attribute": "health",
              "of": "$target"
            },
            "amount": 0,
            "op": "set"
          }
        ]
      }
    },
    "action_bindings": {
      "strike": {
        "requires": {
          "and": [
            {
              "named": "can_attack"
            },
            {
              "named": "no_enemy_outpost"
            }
          ]
        }
      },
      "bombard": {
        "requires": {
          "named": "can_attack"
        }
      }
    }
  },
  "decks": [
    {
      "name": "Deck 1",
      "is_starter": 0,
      "soft": 60,
      "hard": 60,
      "cards": [
        {
          "name": "Scrap Raider",
          "type": "unit",
          "description": "A stealthy raider constructed from salvaged starship parts, designed to strike swiftly and evade detection.",
          "cost": {
            "trade": 3
          },
          "attributes": {
            "attack": 2,
            "health": 3
          },
          "effects": [
            {
              "effect_key": "deal_1_damage_to_opponent",
              "trigger": "on_play",
              "parameters": []
            }
          ],
          "behaviours": [
            "Permanent"
          ],
          "img_prompt": "A stealthy scrappy raider ship crafted from rusted and scorched hulls.",
          "img_prompt_composed": {
            "central_illustration": "A stealthy raider ship with mismatched, welded parts.",
            "background_scene": "Vast field of debris amidst the cold starlight of a collapsing star."
          },
          "meta_tags": {
            "type": "unit",
            "has_mechanics": "with_mechanics",
            "mechanic": "deal_damage",
            "strength": "medium"
          },
          "subtype": "unit__stealth",
          "families": []
        },
        {
          "name": "Salvage Vanguard",
          "type": "unit",
          "description": "A nimble scout ship pieced together from star debris, capable of evading enemy fire.",
          "cost": {
            "trade": 3
          },
          "attributes": {
            "attack": 2,
            "health": 3
          },
          "effects": [
            {
              "effect_key": "deal_n_damage_to_target",
              "trigger": "on_play",
              "parameters": {
                "amount": 2
              }
            }
          ],
          "behaviours": [
            "Permanent"
          ],
          "img_prompt": "A nimble scout ship with stealth capabilities, evading enemy fire amidst space debris.",
          "img_prompt_composed": {
            "central_illustration": "A cobbled-together scout ship zooming through a debris field.",
            "background_scene": "Cold starlight illuminating twisted metal and chunks of broken ships."
          },
          "meta_tags": {
            "type": "unit",
            "has_mechanics": "with_mechanics",
            "mechanic": "deal_damage",
            "strength": "medium"
          },
          "subtype": "unit__stealth",
          "families": []
        },
        {
          "name": "Asteroid Bastion",
          "type": "structure",
          "description": "A fortified asteroid base, providing strong defenses and strategic advantage.",
          "cost": {
            "trade": 3
          },
          "effects": [
            {
              "effect_key": "deal_n_damage_to_target",
              "trigger": "at_start_of_turn",
              "parameters": {
                "amount": 2
              }
            }
          ],
          "behaviours": [
            "Permanent",
            "Targetable"
          ],
          "img_prompt": "A fortified asteroid base with defense turrets glinting under cold starlight, set amidst a field of debris.",
          "img_prompt_composed": {
            "central_illustration": "A massive asteroid base with fortified structures and defense turrets.",
            "background_scene": "A dramatic backdrop of drifting spacecraft wreckage and starry void."
          },
          "meta_tags": {
            "type": "structure",
            "has_mechanics": "with_mechanics",
            "mechanic": "deal_damage",
            "strength": "medium"
          },
          "families": []
        },
        {
          "name": "Scrapyard Bastion",
          "type": "structure",
          "description": "A formidable salvage fortress that shields allied units, with the ability to deal damage to attackers.",
          "cost": {
            "trade": 4
          },
          "effects": [
            {
              "effect_key": "deal_n_damage_to_target",
              "trigger": "at_start_of_turn",
              "parameters": {
                "amount": 2
              }
            }
          ],
          "behaviours": [
            "Permanent",
            "Targetable"
          ],
          "flags": [],
          "img_prompt": "A rugged, towering bastion made from mismatched ship hulls, bristling with makeshift turrets.",
          "img_prompt_composed": {
            "central_illustration": "A massive, cobbled-together fortress dominating the scene.",
            "background_scene": "The chaotic expanse of a collapsing star's debris field."
          },
          "meta_tags": {
            "type": "structure",
            "has_mechanics": "with_mechanics",
            "mechanic": "deal_damage",
            "strength": "medium"
          },
          "families": []
        },
        {
          "name": "Salvage Raider",
          "type": "unit",
          "description": "A nimble craft cobbled together from scrap, quick to strike and hard to catch.",
          "cost": {
            "trade": 3
          },
          "attributes": {
            "attack": 2,
            "health": 2
          },
          "effects": [
            {
              "effect_key": "deal_1_damage_to_opponent",
              "trigger": "on_play",
              "parameters": []
            }
          ],
          "behaviours": [
            "Permanent"
          ],
          "img_prompt": "A small, angular ship pieced together from various starship remnants, glinting faintly in the cold starlight as it speeds through the debris field.",
          "img_prompt_composed": {
            "central_illustration": "Crafty ship made from scavenged parts.",
            "background_scene": "Starry backdrop with swirling debris."
          },
          "meta_tags": {
            "type": "unit",
            "has_mechanics": "with_mechanics",
            "mechanic": "deal_damage",
            "strength": "medium"
          },
          "families": []
        },
        {
          "name": "Salvage Outpost",
          "type": "structure",
          "description": "A fortified base designed to extract precious resources from the debris field. Activate (tap): gain 2 Trade.",
          "cost": {
            "trade": 3
          },
          "effects": [
            {
              "effect_key": "gain_n_resource_to_self",
              "trigger": "activated",
              "activation": {
                "exhaust": true
              },
              "parameters": {
                "amount": 2,
                "resource_type": "trade"
              }
            }
          ],
          "behaviours": [
            "Permanent",
            "Targetable"
          ],
          "img_prompt": "A rugged outpost constructed from starship wreckage.",
          "img_prompt_composed": {
            "central_illustration": "Battered space outpost harvesting salvage.",
            "background_scene": "Cold starlight illuminating fields of debris."
          },
          "meta_tags": {
            "type": "structure",
            "has_mechanics": "with_mechanics",
            "mechanic": "gain_resource",
            "strength": "medium"
          },
          "families": []
        },
        {
          "name": "Salvage Enforcer",
          "type": "unit",
          "description": "A battle-hardened ship assembled from scrapyard remnants.",
          "cost": {
            "trade": 4
          },
          "attributes": {
            "attack": 3,
            "health": 4
          },
          "effects": [
            {
              "effect_key": "deal_1_damage_to_opponent",
              "trigger": "on_play",
              "parameters": []
            }
          ],
          "behaviours": [
            "Permanent"
          ],
          "img_prompt": "A powerful, rugged ship forged from salvaged parts, flying through a debris-filled space.",
          "img_prompt_composed": {
            "central_illustration": "A large, gritty spaceship with visible wear and modifications.",
            "background_scene": "The debris field of a collapsing star."
          },
          "meta_tags": {
            "type": "unit",
            "has_mechanics": "with_mechanics",
            "mechanic": "deal_damage",
            "strength": "medium"
          },
          "families": []
        },
        {
          "name": "Fortified Salvage Outpost",
          "type": "structure",
          "description": "A resilient outpost assembled from star debris, providing strategic advantage through increased resource extraction.",
          "cost": {
            "trade": 4
          },
          "effects": [
            {
              "effect_key": "gain_n_resource_to_self",
              "trigger": "at_start_of_turn",
              "parameters": {
                "amount": 2,
                "resource_type": "trade"
              }
            }
          ],
          "behaviours": [
            "Permanent",
            "Targetable"
          ],
          "img_prompt": "A fortified outpost pieced together from metallic debris, nestled against the vibrant backdrop of a collapsing star.",
          "img_prompt_composed": {
            "central_illustration": "Imposing salvage outpost constructed from mismatched metal plating.",
            "background_scene": "Bright fragments of a collapsing star scattered across space."
          },
          "meta_tags": {
            "type": "structure",
            "has_mechanics": "with_mechanics",
            "mechanic": "gain_resource",
            "strength": "medium"
          },
          "families": []
        },
        {
          "name": "Salvage Raider",
          "type": "unit",
          "description": "A nimble scavenger ship that harasses opponent fleets.",
          "cost": {
            "trade": 3
          },
          "attributes": {
            "attack": 2,
            "health": 3
          },
          "effects": [
            {
              "effect_key": "deal_1_damage_to_opponent",
              "trigger": "on_play",
              "parameters": []
            }
          ],
          "behaviours": [
            "Permanent"
          ],
          "img_prompt": "A sleek, battle-worn ship with patches of rust and scorch marks, darting through a field of star debris.",
          "img_prompt_composed": {
            "central_illustration": "Nimble scavenger ship in action.",
            "background_scene": "Chaos of a collapsing star's debris field."
          },
          "meta_tags": {
            "type": "unit",
            "has_mechanics": "with_mechanics",
            "mechanic": "deal_damage",
            "strength": "medium"
          },
          "families": []
        },
        {
          "name": "Rustbound Outpost",
          "type": "structure",
          "description": "A fortified station known for its resilient defenses, salvaged from the debris field.",
          "cost": {
            "trade": 3
          },
          "effects": [
            {
              "effect_key": "deal_n_damage_to_target",
              "trigger": "at_start_of_turn",
              "parameters": {
                "amount": 1
              }
            }
          ],
          "behaviours": [
            "Permanent",
            "Targetable"
          ],
          "img_prompt": "A rugged outpost amid space debris with glowing shields.",
          "img_prompt_composed": {
            "central_illustration": "A decrepit station with defensive turrets and shields.",
            "background_scene": "Stars and floating wreckage illuminated by a collapsing star."
          },
          "meta_tags": {
            "type": "structure",
            "has_mechanics": "with_mechanics",
            "mechanic": "deal_damage",
            "strength": "medium"
          },
          "families": []
        },
        {
          "name": "Scavenger Frigate",
          "type": "unit",
          "description": "A nimble ship assembled from the remains of larger vessels, ready for battle.",
          "cost": {
            "trade": 3
          },
          "attributes": {
            "attack": 2,
            "health": 3
          },
          "effects": [
            {
              "effect_key": "deal_n_damage_to_target",
              "trigger": "on_play",
              "parameters": {
                "amount": 2
              }
            }
          ],
          "behaviours": [
            "Permanent"
          ],
          "img_prompt": "A sleek, patched-together frigate with visible weld marks, drifting through a dense field of twisted metal and starlight.",
          "img_prompt_composed": {
            "central_illustration": "A gritty scavenger frigate in motion.",
            "background_scene": "Star-lit debris field of a collapsing star."
          },
          "meta_tags": {
            "type": "unit",
            "has_mechanics": "with_mechanics",
            "mechanic": "deal_damage",
            "strength": "medium"
          },
          "families": []
        },
        {
          "name": "Fragmented Outpost",
          "type": "structure",
          "description": "A derelict space station fortified with scavenged defense turrets.",
          "cost": {
            "trade": 3
          },
          "effects": [
            {
              "effect_key": "deal_n_damage_to_target",
              "trigger": "at_start_of_turn",
              "parameters": {
                "amount": 1
              }
            }
          ],
          "behaviours": [
            "Permanent",
            "Targetable"
          ],
          "img_prompt": "A shattered space station with makeshift turrets amidst swirling debris.",
          "img_prompt_composed": {
            "central_illustration": "Fragmented space outpost with defense turrets.",
            "background_scene": "A chaotic debris field under cold starlight."
          },
          "meta_tags": {
            "type": "structure",
            "has_mechanics": "with_mechanics",
            "mechanic": "deal_damage",
            "strength": "low"
          },
          "families": []
        }
      ]
    },
    {
      "name": "Shared Starter Deck",
      "is_starter": 1,
      "soft": 10,
      "hard": 10,
      "cards": [
        {
          "name": "Scrap Scout",
          "type": "unit",
          "behaviours": [
            "Strike"
          ],
          "copies": 8,
          "description": "A salvage skiff that hauls in a trickle of trade.",
          "cost": [],
          "attributes": {
            "attack": 0
          },
          "effects": [
            {
              "effect_key": "gain_n_resource_to_self",
              "trigger": "on_play",
              "parameters": {
                "amount": 1,
                "resource_type": "trade"
              }
            }
          ],
          "img_prompt": "A small rusty salvage skiff towing scrap containers.",
          "families": []
        },
        {
          "name": "Rust Viper",
          "type": "unit",
          "behaviours": [
            "Strike"
          ],
          "copies": 2,
          "description": "A jagged interceptor welded from wreck plating.",
          "cost": [],
          "attributes": {
            "attack": 0
          },
          "effects": [
            {
              "effect_key": "gain_n_resource_to_self",
              "trigger": "on_play",
              "parameters": {
                "amount": 1,
                "resource_type": "combat"
              }
            }
          ],
          "img_prompt": "A jagged little interceptor ship with mismatched hull plates.",
          "families": []
        }
      ]
    }
  ]
}