add a help topic link from "Defense Cap" col. to terrains section

Added to the topic for that section a brief explanation of mixed
terrains vs basic terrains, "best defense worst movement", and
defense caps.
This commit is contained in:
Chris Beck 2014-07-16 01:52:45 -04:00
parent 47f9accb9e
commit 42c58da859
2 changed files with 7 additions and 6 deletions

View file

@ -490,7 +490,11 @@ Thick-bodied and clumsy, slow individuals of goblins and other species take a mo
[topic]
id=..terrains_section
title= _ "Terrains"
text= _ "Game maps feature a variety of terrains that affect both unit movement and a units defensive capability in combat."
text= _ "Game maps feature a variety of terrains that affect both unit movement and a units defensive capability in combat." + _"
Terrains come in two types: <italic>text='basic'</italic> terrain types and <italic>text='mixed'</italic> terrain types. Descriptions of the basic terrain types are listed in this section. Mixed terrain types share properties of multiple basic terrain types -- units generally recieve the <italic>text='best defense'</italic> and <italic>text='worst movement'</italic> of the underlying basic types when they move onto a mixed type. 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 overrided -- they can never recieve a higher defense rating than the lowest defense cap value for any mixed terrain 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."
generator="contents:terrains"
[/topic]

View file

@ -1821,14 +1821,11 @@ public:
if ( has_terrain_defense_caps ) {
str.str(clear_stringstream);
const bool has_cap = movement_type.get_defense().capped(terrain);
str << "<format>color=" << (has_cap? "yellow" : "white")
<< " text='";
if (has_cap) {
str << "yes";
str << make_link("yes","..terrains_section");
} else {
str << utils::unicode_figure_dash;
str << "<format>color=white text='" << utils::unicode_figure_dash << "'</format>";
}
str << "'</format>";
markup = str.str();
str.str(clear_stringstream);
if (has_cap) {