diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-19 14:18:45 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-19 14:18:54 +0100 |
commit | f2e4dca40843f44938358fcb2df2f1e03339f959 (patch) | |
tree | ea73db980616d87e34367e3f30e01715bd1625d7 /src | |
parent | 85e9cfb2a8222249cc8f677b576ccba62ba6dc4a (diff) |
Account for health in fear mechanics.
Diffstat (limited to 'src')
-rw-r--r-- | src/game/units.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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; |