Tweak building health, fix damage dealing

This commit is contained in:
2024-02-13 11:10:48 +01:00
parent 02a418957e
commit 0c97ba6511
3 changed files with 8 additions and 6 deletions

View File

@@ -91,9 +91,9 @@ ecs_entity_t placeBuilding(Game *game, BuildingType type,
bool hasCollision = true;
Health health = {
.startHP = 100.0f,
.hp = 100.0f,
.lastChanged = -1.0f,
.startHP = 500.0f,
.hp = 500.0f,
.lastChanged = 1000.0f,
};
switch (type) {
case BUILDING_KEEP:
@@ -113,7 +113,7 @@ ecs_entity_t placeBuilding(Game *game, BuildingType type,
.elapsed = 0.0f,
}
});
health.startHP = 1000.0f;
health.startHP = 5000.0f;
health.hp = health.startHP;
break;
case BUILDING_WAREHOUSE:
@@ -146,6 +146,8 @@ ecs_entity_t placeBuilding(Game *game, BuildingType type,
.elapsed = 0.0f
}
});
health.startHP = 2000.0f;
health.hp = health.startHP;
break;
case BUILDING_TOWER: {
ecs_entity_t mage = entityCreateEmpty();