Fixed discrepancy of missing defense values between help and effects.

(Fix for bug #16730.)
This commit is contained in:
Guillaume Melquiond 2010-09-25 17:38:29 +00:00
parent 93d8ca7d0f
commit 1be5939a0e

View file

@ -2462,7 +2462,7 @@ void unit::add_modification(const std::string& type, const config& mod, bool no_
int v = i.second.to_int();
config::attribute_value &dst = def[i.first];
if (!replace) {
int w = dst;
int w = dst.to_int(100);
v += w;
if ((w >= 0 && v < 0) || (w < 0 && v > 0)) v = 0;
else if (v < -100) v = -100;