Fixed up building enemies and items using componentsin the JSON.

This commit is contained in:
Zed A. Shaw 2025-01-09 14:01:40 -05:00
parent 9ce4fbd552
commit 222b39c403
13 changed files with 76 additions and 60 deletions

View file

@ -4,7 +4,8 @@
"background": [30, 20, 75],
"components": [
{"type": "Tile", "config": {"chr": "\ua66b"}},
{"type": "Combat", "config": {"hp": 200, "damage": 15}}
{"type": "Combat", "config": {"hp": 200, "damage": 15}},
{"type": "EnemyConfig", "config": {"hearing_distance": 5}}
]
},
"SNAKE": {
@ -12,7 +13,8 @@
"background": [30, 20, 75],
"components": [
{"type": "Tile", "config": {"chr": "\u06b1"}},
{"type": "Combat", "config": {"hp": 20, "damage": 15}}
{"type": "Combat", "config": {"hp": 20, "damage": 15}},
{"type": "EnemyConfig", "config": {"hearing_distance": 6}}
]
},
"GOBLIN": {
@ -21,7 +23,8 @@
"components": [
{"type": "LightSource", "config": {"strength": 70, "radius": 1.8}},
{"type": "Tile", "config": {"chr": "\u06bf"}},
{"type": "Combat", "config": {"hp": 50, "damage": 35}}
{"type": "Combat", "config": {"hp": 50, "damage": 35}},
{"type": "EnemyConfig", "config": {"hearing_distance": 4}}
]
},
"UNICORN": {
@ -29,7 +32,8 @@
"background": [30, 20, 75],
"components": [
{"type": "Tile", "config": {"chr": "\u17a5"}},
{"type": "Combat", "config": {"hp": 2000, "damage": 5}}
{"type": "Combat", "config": {"hp": 100, "damage": 5}},
{"type": "EnemyConfig", "config": {"hearing_distance": 3}}
]
},
"RAT": {
@ -37,7 +41,8 @@
"background": [30, 20, 75],
"components": [
{"type": "Tile", "config": {"chr": "\u08ac"}},
{"type": "Combat", "config": {"hp": 10, "damage": 5}}
{"type": "Combat", "config": {"hp": 10, "damage": 5}},
{"type": "EnemyConfig", "config": {"hearing_distance": 10}}
]
}
}

View file

@ -8,8 +8,7 @@
"inventory_count": 1,
"components": [
{"type": "LightSource", "config": {"strength": 70, "radius": 2.0}},
{"type": "Tile", "config": {"chr": "\u0f08"}},
{"type": "Weapon", "config": {"damage": 35}}
{"type": "Tile", "config": {"chr": "\u0f08"}}
]
},
"SWORD_RUSTY": {
@ -57,9 +56,8 @@
"description": "A torch on a wall you can't pick up.",
"inventory_count": 0,
"components": [
{"type": "Tile", "config": {"chr": "\u06bf"}},
{"type": "Tile", "config": {"chr": "\u077e"}},
{"type": "LightSource", "config": {"strength": 60, "radius": 1.8}}
],
"display": "☀"
]
}
}