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

@@ -161,8 +161,9 @@ void try_attack_barricade_bandit(Bandit@ bandit) {
if (can_residents_defend()) {
int counterDamage = perform_resident_defense();
if (counterDamage > 0) {
bandit.health -= counterDamage;
if (bandit.health <= 0 && x <= BASE_END) {
int before_health = bandit.health;
damage_bandit_at(bandit.position, counterDamage);
if (before_health - counterDamage <= 0 && x <= BASE_END) {
speak_with_history("Residents killed an attacking bandit.", true);
}
}