thedivergentai/godot-genre-card-game
Expert blueprint for digital card games (CCG/Deckbuilders) including card data structures (Resource-based), deck management (draw/discard/reshuffle), turn logic, hand layout (arcing), drag-and-drop UI, effect resolution (Command pattern), and visual polish (godot-tweening, shaders). Use for CCG, deckbuilders, or tactical card games. Trigger keywords: card_game, deck_manager, card_data, hand_layout, drag_drop_cards, effect_resolution, command_pattern, draw_pile, discard_pile.
npx skills add https://github.com/thedivergentai/GD-Agentic-Skills --skill godot-genre-card-game
Expert blueprint for digital card games with data-driven design and juicy UI.
Callable objects or Command resources pushed to a LIFO stack._process(); strictly use Signal-driven triggers or a centralized EffectStack resolver.Array.push_back() and Array.pop_back() to resolve reactions from top-to-bottom.create_tween() / tween_property chains (0.2s+) for pile moves.global_position for cards in hand; strictly position them using a Curve2D layout with sample_baked() for smooth arcs.int for Costs, Attack, and Health to avoid precision drift._draw() custom drawing to bypass SceneTree overhead when rendering 100+ cards or map icons.queue_redraw().for loop; strictly iterate in reverse or use filter() to avoid indexing errors._init(); otherwise, Resources will fail to load in the Inspector.> MANDATORY reads before implementing the matching system:
> 1. card_effect_resolution.gd — LIFO effect stack (push_back / pop_back)
> 2. card_tween_manager.gd — interruptible pile/hand Tweens (no teleports)
> 3. card_data_resource.gd — Inspector-safe Resource card definitions
_get_drag_data() for Control nodes.filter() patterns for querying board metadata.| Need | Action |
|------|--------|
| Nested reactions / counters | MANDATORY card_effect_resolution.gd — LIFO only (pop_back) |
| FIFO sequential animations only | Rare; keep a separate queue — do not reuse the reaction stack |
| Need | Action |
|------|--------|
| Arc hand layout | Curve2D.sample_baked + card_tween_manager.gd |
| Drag targeting | card_drag_drop.gd |
| Dense boards (100+ icons) | _draw() / board_state_dictionary.gd — not Control-per-token |
| Need | Action |
|------|--------|
| Card definitions | MANDATORY card_data_resource.gd (parameterless _init) |
| Deck RNG | deck_shuffle_bag.gd |
| Turn phases | turn_state_machine.gd |
| Phase | Skills | Purpose |
|-------|--------|---------|
| 1. Data | resources, custom-resources | Card properties (Cost, Type, Effect) |
| 2. UI | control-nodes, layout-containers | Hand layout, tooltips |
| 3. Input | drag-and-drop, state-machines | Targeting, hovering |
| 4. Logic | command-pattern, signals | LIFO stack, turn phases |
| 5. Polish | godot-tweening, shaders | Draw juice, foils |
| Pitfall | Solution |
|---------|----------|
| FIFO pop_front on reaction stack | Use LIFO pop_back in card_effect_resolution.gd |
| Instant pile snaps | Tween via card_tween_manager.gd |
| Float ATK/HP | Use int stats on Resources |
> LLM-ignorance rule: If a general agent would not know it before reading, load the reference — never delete expert deltas.
> Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.
.tres Resources so designers edit cost/stats without touching UI scripts.@export / @export_group patterns that drive Inspector-authored card definitions._get_drag_data / _can_drop_data / _drop_data and set_drag_preview for native card drag-and-drop._gui_input, mouse_filter, and _draw for dense boards.create_tween() / tween_property juice for draw, play, and discard moves.sample_baked() for smooth non-circular fan positions and rotations.changed and effect-stack signals that keep UI reactive without _process polling..tres ownership, duplication, and emit_changed so match buffs never leak into authored card files.match phases used by effect stacks and turn machines.Take thedivergentai/godot-genre-card-game from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.