Initial implementation of fishing system. A couple bugs fixed, e.g. zombies that are killed by residents actually die.

This commit is contained in:
Storm Dragon
2026-01-24 14:01:38 -05:00
parent 63cf759002
commit 0d711095c1
23 changed files with 837 additions and 47 deletions

View File

@@ -80,8 +80,9 @@ void try_attack_barricade_undead(Undead@ undead) {
if (can_residents_defend()) {
int counterDamage = perform_resident_defense();
if (counterDamage > 0) {
undead.health -= counterDamage;
if (undead.health <= 0 && x <= BASE_END) {
int before_health = undead.health;
damage_undead_at(undead.position, counterDamage);
if (before_health - counterDamage <= 0 && x <= BASE_END) {
speak_with_history("Residents killed an attacking zombie.", true);
}
}