Files
systemic-game-design-course/course/schema/card.schema.json
T
2026-10-29 00:00:21 +01:00

46 lines
3.4 KiB
JSON

{
"$comment": "Structured card text. A trigger clause applies to the effect clauses after it until the next trigger/keyword/aura. split divides top (text[0:split]) from bottom (text[split:]).",
"type": "object",
"required": ["name", "type", "cost", "text", "split"],
"properties": {
"name": { "type": "string" },
"type": { "enum": ["minion", "spell"] },
"cost": { "type": "integer", "minimum": 0 },
"attack": { "type": "integer", "minimum": 0 },
"health": { "type": "integer", "minimum": 1 },
"noun": { "type": "string" },
"split": { "type": "integer", "minimum": 0 },
"fictional": { "type": "boolean" },
"game": { "type": "string" },
"text": {
"type": "array",
"items": {
"oneOf": [
{ "type": "object", "required": ["kind", "keyword"], "properties": { "kind": { "const": "keyword" }, "keyword": { "type": "string" } } },
{ "type": "object", "required": ["kind", "on"], "properties": {
"kind": { "const": "trigger" },
"on": { "enum": ["deathrattle", "battlecry", "selfDamaged", "friendlyMinionDamaged", "anyMinionDamaged", "heroDamaged", "endOfTurn"] } } },
{ "type": "object", "required": ["kind", "modifier"], "properties": {
"kind": { "const": "aura" },
"modifier": { "type": "object", "required": ["type", "trigger", "times", "stacking"], "properties": {
"type": { "const": "triggerMultiplier" },
"trigger": { "enum": ["deathrattle", "battlecry", "selfDamaged", "friendlyMinionDamaged", "anyMinionDamaged", "heroDamaged", "endOfTurn"] },
"times": { "type": "integer", "minimum": 2 },
"stacking": { "enum": ["max", "additive"] } } } } },
{ "type": "object", "required": ["kind", "effect"], "properties": {
"kind": { "const": "effect" },
"effect": { "oneOf": [
{ "type": "object", "required": ["type", "target", "amount"], "properties": { "type": { "const": "dealDamage" }, "target": { "enum": ["self", "allMinions", "allOtherMinions", "allOtherCharacters", "enemyHero", "chosen"] }, "amount": { "type": "integer", "minimum": 0 } } },
{ "type": "object", "required": ["type", "count"], "properties": { "type": { "const": "draw" }, "count": { "type": "integer", "minimum": 1 } } },
{ "type": "object", "required": ["type", "card", "count"], "properties": { "type": { "const": "summon" }, "card": { "type": "string" }, "count": { "type": "integer", "minimum": 1 } } },
{ "type": "object", "required": ["type", "amount"], "properties": { "type": { "const": "gainArmor" }, "amount": { "type": "integer", "minimum": 1 } } },
{ "type": "object", "required": ["type", "target", "amount"], "properties": { "type": { "const": "gainAttack" }, "target": { "enum": ["self", "allMinions", "allOtherMinions", "allOtherCharacters", "enemyHero", "chosen"] }, "amount": { "type": "integer" } } },
{ "type": "object", "required": ["type", "target"], "properties": { "type": { "const": "destroy" }, "target": { "enum": ["self", "allMinions", "allOtherMinions", "allOtherCharacters", "enemyHero", "chosen"] } } },
{ "type": "object", "required": ["type", "word", "at"], "properties": { "type": { "const": "spawnText" }, "word": { "type": "string" }, "at": { "const": "self" } } }
] } } }
]
}
}
}
}