individual poison damage messages

This commit is contained in:
Enno Rehling 2015-07-03 18:27:10 +02:00
parent c42227c9e4
commit af004bb27b
2 changed files with 22 additions and 3 deletions

View File

@ -1182,6 +1182,24 @@
<text locale="en">"$unit($unit) drowns in $region($region)."</text>
</message>
<message name="poison_damage" section="events">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
</type>
<text locale="de">"$unit($unit) nimmt Schaden durch den Giftelementar in $region($region)."</text>
<text locale="en">"$unit($unit) is taking poison damage in $region($region)."</text>
</message>
<message name="poison_death" section="events">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
</type>
<text locale="de">"$unit($unit) stirbt am Schaden durch den Giftelementar in $region($region)."</text>
<text locale="en">"$unit($unit) dies from poison damage taken in $region($region)."</text>
</message>
<message name="drown_amphibian_dead" section="events">
<type>
<arg name="amount" type="int"/>

View File

@ -2820,9 +2820,9 @@ static int dc_age(struct curse *c)
if (curse_active(c))
while (*up != NULL) {
unit *u = *up;
int hp;
double damage = c->effect * u->number;
freset(u->faction, FFL_SELECT);
if (u->number <= 0 || target_resists_magic(mage, u, TYP_UNIT, 0)) {
up = &u->next;
continue;
@ -2830,8 +2830,9 @@ static int dc_age(struct curse *c)
/* Reduziert durch Magieresistenz */
damage *= (1.0 - magic_resistance(u));
change_hitpoints(u, -(int)damage);
hp = change_hitpoints(u, -(int)damage);
ADDMSG(&u->faction->msgs, msg_message((hp>0)?"poison_damage":"poison_death", "region unit", r, u));
if (*up == u)
up = &u->next;
}