ai-behavior-trees-util…
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators)…
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.
Claude Code
$ npx -y skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game --agent claude-code
Codex
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -a codex -y
Cursor
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -a cursor -y
Gemini CLI
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -a gemini-cli -y
GitHub Copilot
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -a github-copilot -y
OpenCode
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -a opencode -y
Windsurf
$ npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill card-game -a windsurf -y
name: card-game description: > Designs card games and deckbuilders in any engine: cards as data with one effect interpreter, deck zones, a trigger stack and seeded shuffles. Use for a Slay the Spire- or Balatro-like or a TCG, or cards that duplicate or streaky shuffles. Pair with the engine skill for card data and hand UI (`godot-resources`, `godot-ui-control`, `unity-scriptableobjects`). Not for grid crawlers (`roguelike`).
Owns the rules engine of a card game: zones, draw, costs, effect resolution, rewards and balance math, including the run structure of a roguelike deckbuilder. Engine skills supply the data assets and UI.
TCG/CCG, solitaire, poker-hand scorer, card battler.
cards that duplicate, vanish or resolve in the wrong order.
**When not to use:** grid dungeon runs (`roguelike`); board games with matching or pushing rules (`puzzle`); an RPG with a small card minigame (start in `rpg`).
1. **Name the reference game and fix the frame.** Write the numbers down before any card: deck size, hand size, draw per turn, resource per turn, what happens to the hand at end of turn, copy limits. Reference frames are in the table below. 2. **Model zones and cards as data.** Every card instance has a unique id and lives in exactly one zone. Card text maps to a list of ops for one interpreter (Pattern 1). 3. **Pick the resolution model:** a stack (last in resolves first, for response-heavy TCGs) or a queue (first in first, simpler for PvE deckbuilders). Write the order for simultaneous triggers (active player first, then by timestamp). 4. **Write a power budget** for one resource and price every card against it (below). 5. **Build the reward loop** (deckbuilders): after each fight offer 3 cards, pick 1 or skip, with rarity weighted by act; give removal at shops or events. 6. **Check it.** Write and run these as tests and report the results:
one zone and the total count never changes;
land near 1,000 (a chi-square statistic above about 41 at 23 degrees of freedom means bias, p < 0.01);
size the first enemies from it (about 3-4 turns of starter damage is a common start).
| Game | Deck | Hand and draw | Resource | End of turn | |------|------|---------------|----------|-------------| | Slay the Spire | 10-card starter (Ironclad: 5 Strike, 4 Defend, Bash) | draw 5 | 3 energy | discard hand | | Balatro | 52 playing cards | hand size 8, play up to 5 | 4 hands, 3 discards per blind | redraw to 8 | | Hearthstone | 30 cards | hand cap 10, extra draws are destroyed | mana 1 to 10, +1 per turn | keep hand | | Magic: the Gathering | 60+ constructed, 40+ limited, max 4 copies | 7-card opening hand, draw 1 | lands | discard to 7 |
Balatro's run is 8 antes of three blinds (small 1x, big 1.5x, boss mostly 2x the ante's base score). Slay the Spire's enemies show their next action (intent), which is what makes a PvE card game a planning puzzle rather than a guess. Copy the idea, never the cards.
starters set 1 energy = 6 damage (Strike) or 5 block (Defend), and an upgrade adds about half again (Strike+ deals 9). Rares may exceed the budget; zero-cost cards need a drawback or a small effect.
hand is 5/deck size: 50% in a 10-card deck, 33% at 15, 25% at 20. That is why skipping a reward or removing a Strike is often the strongest pick, and why removal belongs in the reward economy.
time and in the first 10 cards about 53% (hypergeometric). Use the same formula to tune any draw consistency.
2 turns. Draw and deck thinning shorten it; that is where infinite combos come from.
chips, then added chips, then added mult, then multiplying mult, applied left to right in slot order. Additive and multiplicative stages in the wrong order change scores by orders of magnitude.
# Pseudocode. One zone per card instance; moving = remove from one list, append to another.
def draw(player, n):
for _ in range(n):
if not player.draw_pile:
if not player.discard:
return on_empty_draw(player) # deck-out loss, fatigue, or simply stop
player.draw_pile = player.discard; player.discard = []
shuffle(player.draw_pile, player.rng) # seeded Fisher-Yates (refs §6)
card = player.draw_pile.pop()
if len(player.hand) >= HAND_CAP:
move(card, to=player.discard); log("burned", card) # define overdraw explicitly
else:
player.hand.append(card)
def play(card, player, targets):
if player.energy < cost(card) or not legal(card, targets):
return False # nothing changed yet
player.energy -= cost(card)
move(card, frm=player.hand, to=player.limbo) # in play while resolving
for op<img src="docs/assets/awesome-gamedev-agent-skills-banner.png" width="820" alt="awesome-gamedev-agent-skills — game-dev skills for AI coding agents.
Build a production behavior-tree runtime (Blackboard, action/condition leaves, sequence/selector/parallel composites, decorators)…
Implement game audio practice — bus/mixer architecture and gain in decibels, ducking (sidechain), adaptive/dynamic music via…
Build game cameras that feel good — 2D follow with a deadzone, look-ahead, smoothing, and level-bounds clamping; 3D third-person…
Plan, generate, source, normalize, and validate cohesive visual game assets. Use for art direction, style bibles, sprites,…
Build branching dialogue and narrative — a node/choice graph with conditions, variables, and localization hooks — and choose…
Design NPC and enemy decision-making with finite state machines, behavior trees, steering behaviors, and A* pathfinding —…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.