fixed messed up english strings for wounds

This commit is contained in:
Steffen Mecke 2015-01-29 23:28:55 +01:00
parent 81e96c121a
commit a9a14a79d0
2 changed files with 15 additions and 9 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

@ -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;
} }