Card Data Format Specification
Overview
Card data is stored in data/cards.json as a JSON file. This document describes the schema and valid values for card definitions.
Schema
Root Object
| Field |
Type |
Required |
Description |
version |
string |
Yes |
Schema version for compatibility |
cards |
array |
Yes |
Array of card objects |
Card Object
| Field |
Type |
Required |
Description |
id |
string |
Yes |
Unique card identifier (e.g., "1-003C") |
name |
string |
Yes |
Card name |
type |
string |
Yes |
Card type: "Forward", "Backup", "Summon", "Monster" |
element |
string/array |
Yes |
Element(s): see Element Values |
cost |
integer |
Yes |
CP cost to play (0-10) |
power |
integer/null |
Conditional |
Power value (required for Forwards, null otherwise) |
job |
string |
No |
Job class (for characters) |
category |
string |
No |
Game category (e.g., "II", "VII", "XIV") |
is_generic |
boolean |
No |
If true, can have multiple copies on field (default: false) |
has_ex_burst |
boolean |
No |
If true, has EX Burst ability (default: false) |
abilities |
array |
No |
Array of ability objects |
image |
string |
No |
Image filename in assets/cards/ |
Element Values
Single element (string):
"Fire" - Red
"Ice" - Cyan/Light Blue
"Wind" - Green
"Lightning" - Purple
"Water" - Blue
"Earth" - Yellow/Brown
"Light" - White
"Dark" - Black
Multi-element (array):
Card Types
| Type |
Description |
Has Power |
Notes |
Forward |
Combat units |
Yes |
Can attack and block |
Backup |
Support units |
No |
Generate CP, max 5 |
Summon |
One-time effects |
No |
Goes to Break Zone |
Monster |
Special characters |
Varies |
Can have unique rules |
Ability Object
| Field |
Type |
Required |
Description |
type |
string |
Yes |
Ability type (see Ability Types) |
name |
string |
No |
Named ability (for Special abilities) |
cost |
object |
Conditional |
Cost to activate (for action/special) |
effect |
string |
Yes |
Effect text description |
is_ex_burst |
boolean |
No |
If true, this is the EX Burst ability |
trigger |
string |
Conditional |
Trigger condition (for auto abilities) |
Ability Types
| Type |
Description |
Has Cost |
field |
Always active while on field |
No |
auto |
Triggers on specific events |
No (but may have conditions) |
action |
Activated by paying cost |
Yes |
special |
Named ability requiring card discard |
Yes |
Cost Object
| Field |
Type |
Default |
Description |
generic |
integer |
0 |
Any element CP |
fire |
integer |
0 |
Fire element CP required |
ice |
integer |
0 |
Ice element CP required |
wind |
integer |
0 |
Wind element CP required |
lightning |
integer |
0 |
Lightning element CP required |
water |
integer |
0 |
Water element CP required |
earth |
integer |
0 |
Earth element CP required |
light |
integer |
0 |
Light element CP required |
dark |
integer |
0 |
Dark element CP required |
dull |
boolean |
false |
Requires dulling this card |
discard |
integer |
0 |
Number of cards to discard |
specific_discard |
string |
null |
Specific card name to discard |
Examples
Forward Card
Backup Card
Summon Card
Multi-Element Card
Validation Rules
- ID Uniqueness: Each card must have a unique
id
- Power Requirement:
power must be set for Forwards, null for others
- Element Validity: Elements must be from the valid list
- Cost Range:
cost must be 0-10
- Power Range:
power must be 1000-99000 in increments of 1000
- Ability Costs: Action and Special abilities must have a
cost object
Loading Process
- Read
data/cards.json
- Parse JSON
- Validate each card against schema
- Build lookup dictionaries (by ID, by element, by type)
- Pre-load referenced images
- Report any validation errors