Skills

Card Game

Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn...

Install

npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -g -a claude-code -y
Category
Engineering
Updated
8d ago
License
Apache-2.0
Context cost
Mediumabout 1,701 tokens
Runs scripts
No, instructions only

What it does

Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution. Use for a deckbuilder, TCG/CCG, or roguelike deckbuilder.

Card Game

A playbook for card games, card data, the deck/hand/discard zones, the turn structure, and how card effects resolve. This is a compositional skill: it models cards as data and wires them to UI. It does not re-teach data assets or UI nodes; it defines the zone model, the draw machinery, and the effect-resolution rules that keep a card game correct and bug-free.

When to use

  • Use when building any game where the core objects are cards moving between zones (deck → hand → play → discard): deckbuilder, TCG/CCG, solitaire, roguelike deckbuilder.
  • Use when designing draw/shuffle/reshuffle, turn structure, card costs, or how effects resolve.

When not to use: board/tile state with matching rules → puzzle. RPG with an incidental card battler → start from rpg. For defining cards as assets, use godot-resources / unity-scriptableobjects; for the hand/drag UI, use godot-ui-control.

Core loop

Draw to your hand → spend resources to play cards → effects resolve and change the board → end the turn (cleanup/discard) → opponent/next phase → repeat until a win condition. Depth comes from the combinations a hand allows; the engine's job is to resolve them unambiguously.

Must-have systems

  1. Card data, id, name, cost, type, text, and an effect spec (data, not code).
  2. Zones, deck (draw pile), hand, play/board, discard, exile/removed; cards live in exactly one.
  3. Draw + shuffle + reshuffle, draw from deck to hand; reshuffle discard into deck when empty.
  4. Turn structure, phases (untap/draw/main/combat/end) as a state machine.
  5. Resource system, mana/energy/actions that gate how much you do per turn.
  6. Effect resolution, apply a card's effects in a defined order; handle targets and triggers.
  7. Win/loss condition, life total, deck-out, objective.
  8. UI, hand layout, drag/drop or tap-to-play, zone counts, targeting affordances.

Design knobs

Read the whole SKILL.md on GitHub

More in Engineering