Initial implementation of fishing system. A couple bugs fixed, e.g. zombies that are killed by residents actually die.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user