# Fighter Cards: A Turn-Based 3D Card Duel from a Brief

> Write four lines (stage, your fighter, the opponent, mood) and get a playable turn-based 3D card duel in one offline HTML file. Each fighter is a generated rigged model with a stat card, three skills and spoken lines; you pick a skill or Guard each turn against a seeded, replayable opponent. Models, sky, voices, sounds and music are generated through SandBase; the stage, turn rules and effects are code.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Game creation](https://www.sandbase.ai/skills/games)
- Version: 0.1.1
- Runs online: yes
- Page: https://www.sandbase.ai/skills/games/fighter-cards

## What you get

Bring a stage, your fighter, the opponent and a mood; optionally the palette, landmark and music. The Skill returns a downloadable Skill (the duel engine, a budgeted 3D asset generator with rigging, verification) and one playable example with its generated media and billed cost.

## Install

Download the Skill package from https://www.sandbase.ai/skills/games/fighter-cards (sign-in required), unzip it into your agent's skills folder, then ask your agent to use it:

```text
/fighter-cards build a turn-based 3D card duel on <your stage>, between <your fighter> and <your opponent>, in a <your mood> mood
```

## How it works

1. **Fill the slots** Describe the stage, your fighter, the opponent and the mood, for example a hilltop orchard threshing floor at sunset, a young beekeeper against a patchwork scarecrow, a playful harvest-festival rivalry. The spec writes both stat cards, the skills and the lines.
2. **Plan and generate the media** npm run assets prints every SandBase call with its worst-case estimate and refuses a plan over the budget, without spending. With --confirm-real it makes the calls through your logged-in sandbase CLI or SANDBASE_API_KEY, saves each run id at once so --recover can download finished runs without paying again, and compresses both rigged fighters. The example made 34 calls and billed a few US dollars.
3. **Build and verify** THEME=<id> npm run build:single inlines Three.js, the duel, both rigged fighters, the sky and every sound into one file that makes no network requests. npm run shoot runs the scene-verify checks, from the title and skill picks to a win, a loss and rematch. The example passed 39 of 39 checks.

## FAQ

### Does Fighter Cards call a model or need a key?

Only while a theme is being built. The asset step calls SandBase models for the two rigged fighters, the props, the sky, the voices, the sounds and the music, through your own SandBase login, and the scripts never read, print or store the key. Once built, the duel page itself makes no network requests and calls no model. Nothing is billed without --confirm-real.

### Is the fight random?

The seed decides crits, dodges and stuns. The same seed and the same picks always give the same fight, which is what the replay link and the replay button use.

### Why is the duel in a sandboxed frame?

It has no network and an opaque origin, so the card duel cannot touch this page or the outside world — what you play is the verified build.

### Where is the share button?

The sandbox blocks the clipboard and navigation, so the end card shows the replay link as text to copy by hand.

### Can I use my own models in Fighter Cards?

Yes. Put your own fighter GLB files in the theme’s media folder, skip generating those parts, and record their source and licence in CREDITS.json.

### Can this page build me a new duel?

Not yet — a fresh theme calls SandBase models and the sandbox has no key for that. Run the Skill on your own machine with your agent for now.

## Examples

- Fighter Cards playable duel (scene)
- Rooftop Rumble (video)
