feat: card/level schemas and verified catalog
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9a00b8ac18
commit
a4b72ad110
10 files changed
+545
No files matched your search
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"$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" } } }
|
||||
] } } }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$comment": "x grows right, y grows down.",
|
||||
"type": "object",
|
||||
"required": ["width", "height", "objects"],
|
||||
"properties": {
|
||||
"width": { "type": "integer", "minimum": 1 },
|
||||
"height": { "type": "integer", "minimum": 1 },
|
||||
"objects": { "type": "array", "items": { "type": "object", "required": ["kind", "x", "y"],
|
||||
"properties": { "kind": { "type": "string" }, "x": { "type": "integer", "minimum": 0 }, "y": { "type": "integer", "minimum": 0 } } } },
|
||||
"cards": { "type": "array", "items": { "type": "object", "required": ["card", "x", "y"],
|
||||
"properties": { "card": { "type": "string" }, "x": { "type": "integer", "minimum": 0 }, "y": { "type": "integer", "minimum": 0 } } } }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user