Merge pull request #178 from stm2/typ

Tippfehler und englische Texte für Health.
This commit is contained in:
Enno Rehling 2015-05-03 23:12:01 +02:00
commit fe3d96517e
3 changed files with 16 additions and 10 deletions

View File

@ -3569,13 +3569,13 @@
</namespace> </namespace>
<namespace name="damage"> <namespace name="damage">
<string name="critical"> <string name="plusstrong">
<text locale="de">sehr stark</text> <text locale="de">sehr stark</text>
<text locale="en">critically wounded</text> <text locale="en">super strong</text>
</string> </string>
<string name="heavily"> <string name="strong">
<text locale="de">stark</text> <text locale="de">stark</text>
<text locale="en">heavily wounded</text> <text locale="en">strong</text>
</string> </string>
<string name="badly"> <string name="badly">
<text locale="de">schwer verwundet</text> <text locale="de">schwer verwundet</text>

View File

@ -1080,7 +1080,7 @@
<arg name="region" type="region"/> <arg name="region" type="region"/>
<arg name="command" type="order"/> <arg name="command" type="order"/>
</type> </type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die einheit kann sich nicht so gut tarnen."</text> <text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Einheit kann sich nicht so gut tarnen."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' -The unit cannot hide that well."</text> <text locale="en">"$unit($unit) in $region($region): '$order($command)' -The unit cannot hide that well."</text>
</message> </message>

View File

@ -126,18 +126,24 @@ const char *report_kampfstatus(const unit * u, const struct locale *lang)
const char *hp_status(const unit * u) const char *hp_status(const unit * u)
{ {
double p = (double)((double)u->hp / (double)(u->number * unit_max_hp(u))); double p;
int max_hp = u->number * unit_max_hp(u);
if (u->hp == max_hp)
return NULL;
p = (double)((double)u->hp / (double)(max_hp));
if (p > 2.00)
return mkname("damage", "critical");
if (p > 1.50)
return mkname("damage", "heavily");
if (p < 0.50) if (p < 0.50)
return mkname("damage", "badly"); return mkname("damage", "badly");
if (p < 0.75) if (p < 0.75)
return mkname("damage", "wounded"); return mkname("damage", "wounded");
if (p < 0.99) if (p < 0.99)
return mkname("damage", "exhausted"); return mkname("damage", "exhausted");
if (p > 2.00)
return mkname("damage", "plusstrong");
if (p > 1.50)
return mkname("damage", "strong");
return NULL; return NULL;
} }