Skip to content

Commit

Permalink
Instead of 'yes' show the defense cap value in help.
Browse files Browse the repository at this point in the history
Suggested by Soliton. Also add a line of explanation in the help
that although a value is shown, if there is a cap it is always
the same as the defensive rating of the unit on that terrain and
cannot be larger.
  • Loading branch information
cbeck88 committed Jul 16, 2014
1 parent 09c062d commit 43fb84d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion data/core/help.cfg
Expand Up @@ -496,7 +496,9 @@ Terrains come in two types: <italic>text='basic'</italic> terrain types and <ita

You can see what basic types are associated to a mixed type by mousing over its hex and checking the terrain type icons displayed in the upper right, under the default theme." + _"

Some units have <italic>text='defense caps'</italic> for a particular basic terrain type. In that case, the 'best defense' behavior is overridden -- they can never recieve a higher defense rating than the lowest defense cap value for any mixed terrain type which includes that basic type. For example, the loyalist cavalryman has a defense rating of 30% on forests, and a defense cap for forests. Thus, on forested hills, he has a defense rating of 30% rather than 40%, because the mixed rating cannot exceed the cap.
Some units have <italic>text='defense caps'</italic> for a particular basic terrain type. In that case, the 'best defense' behavior is overridden -- they can never recieve a higher defense rating than the lowest defense cap value for any mixed terrain type which includes that basic type. For example, the loyalist cavalryman has a defense rating of 30% on forests, and a defense cap for forests. Thus, on forested hills, he has a defense rating of 30% rather than 40%, because the mixed rating cannot exceed the cap." + _"

If a unit has a defense cap for some terrain, it is always the same as its defense rating on that terrain (it cannot be larger)." + _"

<header>text='Basic Terrain Types'</header>

Expand Down
4 changes: 2 additions & 2 deletions src/help.cpp
Expand Up @@ -1816,14 +1816,14 @@ class unit_topic_generator: public topic_generator
str.str(clear_stringstream);
const bool has_cap = movement_type.get_defense().capped(terrain);
if (has_cap) {
str << "<format>color=yellow text='yes'</format>";
str << "<format>color=yellow text='" << defense << "%'</format>";
} else {
str << "<format>color=white text='" << utils::unicode_figure_dash << "'</format>";
}
markup = str.str();
str.str(clear_stringstream);
if (has_cap) {
str << "yes";
str << defense << '%';
} else {
str << utils::unicode_figure_dash;
}
Expand Down

0 comments on commit 43fb84d

Please sign in to comment.