Mild Zombie Apocalypse

When a zombie (or lich) kills a monster in melee without a weapon,
the monster can rise few turns later as a zombie.

The only creatures that can be zombified are ones that actually have
a zombie counterpart monster. A zombie cannot turn a jackal into
a zombie, for instance. But it could turn a shopkeeper into a human
zombie, or a dwarf king into a dwarf zombie.

Zombies will fight with monsters that can be turned into zombies.

Originally this was a SliceHack feature, but this is based on xNetHack
version of it, with some modifications.
This commit is contained in:
Pasi Kallinen
2020-10-21 21:04:03 +03:00
parent 1cc26106bf
commit aeb0ea65e3
13 changed files with 182 additions and 27 deletions

View File

@@ -1198,6 +1198,10 @@ struct obj *body;
when = age;
break;
}
} else if (!no_revival && g.zombify
&& zombie_form(&mons[body->corpsenm]) != NON_PM) {
action = ZOMBIFY_MON;
when = 5 + rn2(15);
}
(void) start_timer(when, TIMER_OBJECT, action, obj_to_any(body));
@@ -1541,7 +1545,7 @@ unsigned corpstatflags;
otmp->corpsenm = monsndx(ptr);
otmp->owt = weight(otmp);
if (otmp->otyp == CORPSE && (special_corpse(old_corpsenm)
if (otmp->otyp == CORPSE && (g.zombify || special_corpse(old_corpsenm)
|| special_corpse(otmp->corpsenm))) {
obj_stop_timers(otmp);
start_corpse_timeout(otmp);