From f2e4dca40843f44938358fcb2df2f1e03339f959 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 19 Dec 2017 14:18:45 +0100 Subject: Account for health in fear mechanics. --- src/game/units.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/units.cpp b/src/game/units.cpp index f25fdc8..e7f5e81 100644 --- a/src/game/units.cpp +++ b/src/game/units.cpp @@ -334,7 +334,7 @@ void unit_soldier_t::check_area(void) if (unit->type == UNIT_NEST) fear_dc += 6; else - fear_dc += 3; + fear_dc += 4; } } } @@ -382,6 +382,11 @@ void unit_soldier_t::on_think(void) controllable = true; } + if (health == max_health) + willpower_bonus += 3; + else if (fear_dc > 1 && health < max_health / 2) + fear_dc += 3; + if (!panic && fear_dc > 1 && game->now > next_fear_test) { size_t roll; bool success; -- cgit