forked from github/server
fixed messed up english strings for wounds
This commit is contained in:
parent
81e96c121a
commit
a9a14a79d0
|
@ -3569,13 +3569,13 @@
|
|||
|
||||
</namespace>
|
||||
<namespace name="damage">
|
||||
<string name="critical">
|
||||
<string name="plusstrong">
|
||||
<text locale="de">sehr stark</text>
|
||||
<text locale="en">critically wounded</text>
|
||||
<text locale="en">super strong</text>
|
||||
</string>
|
||||
<string name="heavily">
|
||||
<string name="strong">
|
||||
<text locale="de">stark</text>
|
||||
<text locale="en">heavily wounded</text>
|
||||
<text locale="en">strong</text>
|
||||
</string>
|
||||
<string name="badly">
|
||||
<text locale="de">schwer verwundet</text>
|
||||
|
|
|
@ -126,18 +126,24 @@ const char *report_kampfstatus(const unit * u, const struct locale *lang)
|
|||
|
||||
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)
|
||||
return mkname("damage", "badly");
|
||||
if (p < 0.75)
|
||||
return mkname("damage", "wounded");
|
||||
if (p < 0.99)
|
||||
return mkname("damage", "exhausted");
|
||||
if (p > 2.00)
|
||||
return mkname("damage", "plusstrong");
|
||||
if (p > 1.50)
|
||||
return mkname("damage", "strong");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue