forked from github/server
individual poison damage messages
This commit is contained in:
parent
c42227c9e4
commit
af004bb27b
|
@ -1182,7 +1182,25 @@
|
||||||
<text locale="en">"$unit($unit) drowns in $region($region)."</text>
|
<text locale="en">"$unit($unit) drowns in $region($region)."</text>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message name="drown_amphibian_dead" section="events">
|
<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>
|
<type>
|
||||||
<arg name="amount" type="int"/>
|
<arg name="amount" type="int"/>
|
||||||
<arg name="unit" type="unit"/>
|
<arg name="unit" type="unit"/>
|
||||||
|
|
|
@ -2820,9 +2820,9 @@ static int dc_age(struct curse *c)
|
||||||
if (curse_active(c))
|
if (curse_active(c))
|
||||||
while (*up != NULL) {
|
while (*up != NULL) {
|
||||||
unit *u = *up;
|
unit *u = *up;
|
||||||
|
int hp;
|
||||||
double damage = c->effect * u->number;
|
double damage = c->effect * u->number;
|
||||||
|
|
||||||
freset(u->faction, FFL_SELECT);
|
|
||||||
if (u->number <= 0 || target_resists_magic(mage, u, TYP_UNIT, 0)) {
|
if (u->number <= 0 || target_resists_magic(mage, u, TYP_UNIT, 0)) {
|
||||||
up = &u->next;
|
up = &u->next;
|
||||||
continue;
|
continue;
|
||||||
|
@ -2830,8 +2830,9 @@ static int dc_age(struct curse *c)
|
||||||
|
|
||||||
/* Reduziert durch Magieresistenz */
|
/* Reduziert durch Magieresistenz */
|
||||||
damage *= (1.0 - magic_resistance(u));
|
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)
|
if (*up == u)
|
||||||
up = &u->next;
|
up = &u->next;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue