feat: spawn enemies from reusable definitions
This commit is contained in:
@@ -51,7 +51,7 @@ func _test_core_pack() -> void:
|
||||
"Core items should include food, wood, sword, and claw in stable-ID order"
|
||||
)
|
||||
_check(
|
||||
_enemy_ids(catalog.get_enemies()) == [&"enemy_raider", &"enemy_wolf"],
|
||||
_enemy_ids(catalog.get_enemies()) == [&"enemy_boar", &"enemy_raider", &"enemy_wolf"],
|
||||
"Core enemies should enumerate by stable ID"
|
||||
)
|
||||
var food := catalog.get_item(SimulationIds.RESOURCE_FOOD)
|
||||
@@ -69,10 +69,15 @@ func _test_core_pack() -> void:
|
||||
"Claw should preserve its weapon contract"
|
||||
)
|
||||
var wolf := catalog.get_enemy(&"enemy_wolf")
|
||||
var boar := catalog.get_enemy(&"enemy_boar")
|
||||
_check(
|
||||
wolf != null and wolf.weapon_id == SimulationIds.ITEM_CLAW,
|
||||
"Enemy references should resolve against catalog items"
|
||||
)
|
||||
_check(
|
||||
boar != null and boar.behavior_profile_id == wolf.behavior_profile_id,
|
||||
"New enemy types should be able to reuse an existing behavior profile"
|
||||
)
|
||||
|
||||
|
||||
func _test_deterministic_enumeration_and_dependencies() -> void:
|
||||
|
||||
Reference in New Issue
Block a user