diff --git a/res/core/messages.xml b/res/core/messages.xml
index 6e6b0c8aa..6e684130c 100644
--- a/res/core/messages.xml
+++ b/res/core/messages.xml
@@ -1182,7 +1182,25 @@
"$unit($unit) drowns in $region($region)."
-
+
+
+
+
+
+ "$unit($unit) nimmt Schaden durch den Giftelementar in $region($region)."
+ "$unit($unit) is taking poison damage in $region($region)."
+
+
+
+
+
+
+
+ "$unit($unit) stirbt am Schaden durch den Giftelementar in $region($region)."
+ "$unit($unit) dies from poison damage taken in $region($region)."
+
+
+
diff --git a/src/creport.c b/src/creport.c
index 59fa60ecb..f309c2d1c 100644
--- a/src/creport.c
+++ b/src/creport.c
@@ -264,6 +264,7 @@ cr_output_curses(FILE * F, const faction * viewer, const void *obj, objtype_t ty
fprintf(F, "\"%s\"\n", buf);
msg_release(msg);
}
+ a = a->next;
}
else if (a->type == &at_effect && self) {
effect_data *data = (effect_data *)a->data.v;
@@ -276,8 +277,11 @@ cr_output_curses(FILE * F, const faction * viewer, const void *obj, objtype_t ty
fprintf(F, "\"%d %s\"\n", data->value, translate(key,
LOC(default_locale, key)));
}
+ a = a->next;
+ }
+ else {
+ a = a->nexttype;
}
- a = a->next;
}
}
diff --git a/src/kernel/config.c b/src/kernel/config.c
index d298f77d7..eb5c9064b 100644
--- a/src/kernel/config.c
+++ b/src/kernel/config.c
@@ -530,7 +530,7 @@ int alliedunit(const unit * u, const faction * f2, int mode)
ally *sf;
int automode;
- assert(u->region); /* the unit should be in a region, but it's possible that u->number==0 (TEMP units) */
+ assert(u && u->region); /* the unit should be in a region, but it's possible that u->number==0 (TEMP units) */
if (u->faction == f2)
return mode;
if (u->faction != NULL && f2 != NULL) {
diff --git a/src/kernel/curse.c b/src/kernel/curse.c
index 0cad2dfa6..2709c7ac0 100644
--- a/src/kernel/curse.c
+++ b/src/kernel/curse.c
@@ -513,12 +513,9 @@ static curse *make_curse(unit * mage, attrib ** ap, const curse_type * ct,
break;
case CURSETYP_UNIT:
- {
c->data.i = men;
break;
}
-
- }
return c;
}
diff --git a/src/kernel/unit.c b/src/kernel/unit.c
index 6a0e22f08..a43ae2153 100644
--- a/src/kernel/unit.c
+++ b/src/kernel/unit.c
@@ -1281,7 +1281,7 @@ static int update_gbdream(const unit * u, int bonus, curse *c, const curse_type
/* wir suchen jeweils den groessten Bonus und den groestsen Malus */
if (sign * effect > sign * bonus) {
if (mage == NULL || mage->number == 0
- || sign>0?alliedunit(mage, u->faction, HELP_GUARD):!alliedunit(mage, u->faction, HELP_GUARD)) {
+ || (sign>0?alliedunit(mage, u->faction, HELP_GUARD):!alliedunit(mage, u->faction, HELP_GUARD))) {
bonus = (int)effect;
}
}
diff --git a/src/spells.c b/src/spells.c
index 401f0ac9e..b7e1e6868 100644
--- a/src/spells.c
+++ b/src/spells.c
@@ -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;
}
diff --git a/src/util/attrib.h b/src/util/attrib.h
index 11bc92bd1..38055331f 100644
--- a/src/util/attrib.h
+++ b/src/util/attrib.h
@@ -90,8 +90,8 @@ extern "C" {
#define AT_READ_OK 0
#define AT_READ_FAIL -1
-#define AT_AGE_REMOVE 0 /* remove the attribute after calling age() */
-#define AT_AGE_KEEP 1 /* keep the attribute for another turn */
+#define AT_AGE_KEEP 0 /* keep the attribute for another turn */
+#define AT_AGE_REMOVE 1 /* remove the attribute after calling age() */
#ifdef __cplusplus
}