Tell json to be more strict about missing fields to avoid that bug in the future, then fix all of the data.

This commit is contained in:
Zed A. Shaw 2025-02-09 14:17:07 -05:00
parent b6831b75a3
commit 27bb08d62c
4 changed files with 56 additions and 39 deletions

View file

@ -1,21 +1,23 @@
{
"PLAYER_TILE": {
"foreground": [255, 200, 125],
"background": [30, 20, 75],
"components": [
{"_type": "Tile", "chr": "\ua66b"},
{"_type": "Combat", "hp": 200, "damage": 15},
{"_type": "Tile", "chr": "\ua66b",
"foreground": [255, 200, 125],
"background": [30, 20, 75]
},
{"_type": "Combat", "hp": 200, "damage": 15, "dead": false},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "LightSource", "strength": 70, "radius": 2},
{"_type": "EnemyConfig", "hearing_distance": 5}
]
},
"EVIL_EYE": {
"foreground": [75, 200, 125],
"background": [30, 20, 75],
"components": [
{"_type": "Tile", "chr": "\u08ac"},
{"_type": "Combat", "hp": 100, "damage": 50},
{"_type": "Tile", "chr": "\u08ac",
"foreground": [75, 200, 125],
"background": [30, 20, 75]
},
{"_type": "Combat", "hp": 100, "damage": 50, "dead": false},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "hearing_distance": 10}
]