mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 18:49:28 +00:00
Soliton noted the 50% was arbitarily chosen since 100% defence wasn't allowed,
now that it is reset to 100% if invalid.
This commit is contained in:
parent
7baa3e680c
commit
9e66e9550b
@ -2100,8 +2100,8 @@ int unit::defense_modifier(t_translation::t_terrain terrain, int recurse_count)
|
||||
}
|
||||
}
|
||||
if(res < 0) {
|
||||
ERR_CONFIG << "Defence '" << res << "' is '< 0' reset to 50.\n";
|
||||
res = 50;
|
||||
ERR_CONFIG << "Defence '" << res << "' is '< 0' reset to 0 (100% defence).\n";
|
||||
res = 0;
|
||||
}
|
||||
|
||||
// defense_mods_.insert(std::pair<terrain_type::TERRAIN,int>(terrain,res));
|
||||
|
@ -418,8 +418,8 @@ int unit_movement_type::defense_modifier(const gamemap& map,
|
||||
}
|
||||
|
||||
if(res < 0) {
|
||||
ERR_CONFIG << "Defence '" << res << "' is '< 0' reset to 50.\n";
|
||||
res = 50;
|
||||
ERR_CONFIG << "Defence '" << res << "' is '< 0' reset to 0 (100% defence).\n";
|
||||
res = 0;
|
||||
}
|
||||
|
||||
defenseMods_.insert(std::pair<t_translation::t_terrain, int>(terrain, res));
|
||||
|
Loading…
x
Reference in New Issue
Block a user