mantimon-tcg/backend/data/definitions
Cal Corum b78236ac49 Simplify card image URLs to use set-based paths
- Derive image_path from card ID instead of raw data image_file field
- Use simplified CDN paths: /<set>/<card>.webp (e.g., a1/033-charmander.webp)
- Energy cards use basic/<type>.webp paths
- Fix undefined variable bug in transform_trainer_card
- Update tests to match new path format
- Regenerate all 382 card definitions with correct image_url fields
2026-01-27 16:16:51 -06:00
..
energy/basic Simplify card image URLs to use set-based paths 2026-01-27 16:16:51 -06:00
pokemon Simplify card image URLs to use set-based paths 2026-01-27 16:16:51 -06:00
trainer Simplify card image URLs to use set-based paths 2026-01-27 16:16:51 -06:00
_index.json Simplify card image URLs to use set-based paths 2026-01-27 16:16:51 -06:00
README.md Add CardService and card data conversion pipeline 2026-01-27 14:16:40 -06:00

Card Definitions (Authoritative)

These JSON files are the authoritative source for card data used by the game engine. Edit these files for gameplay changes.

Structure

definitions/
├── _index.json          # Master index with all cards + set metadata
├── pokemon/
│   ├── a1/              # Pokemon from Genetic Apex
│   └── a1a/             # Pokemon from Mythical Island
├── trainer/
│   ├── a1/              # Trainers from Genetic Apex
│   └── a1a/             # Trainers from Mythical Island
└── energy/
    └── basic/           # Universal basic energy cards

Generating Definitions

Definitions are generated from raw scraped data:

cd backend
python scripts/convert_cards.py

After generation, you can manually edit files for corrections or gameplay tweaks.

Schema

Each JSON file conforms to the CardDefinition Pydantic model in app/core/models/card.py.

Key fields:

  • id: Unique identifier (e.g., "a1-001-bulbasaur")
  • name: Display name
  • card_type: "pokemon", "trainer", or "energy"
  • set_id: Which set this card belongs to

See the model documentation for complete field descriptions.