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:
20
src/priest.c
20
src/priest.c
@@ -52,6 +52,7 @@ register xchar omx, omy, gx, gy;
|
||||
schar chcnt, cnt;
|
||||
coord poss[9];
|
||||
long info[9];
|
||||
long ninfo;
|
||||
long allowflags;
|
||||
#if 0 /* dead code; see below */
|
||||
struct obj *ib = (struct obj *) 0;
|
||||
@@ -100,12 +101,14 @@ pick_move:
|
||||
ny = poss[i].y;
|
||||
if (IS_ROOM(levl[nx][ny].typ)
|
||||
|| (mtmp->isshk && (!in_his_shop || ESHK(mtmp)->following))) {
|
||||
if (avoid && (info[i] & NOTONL))
|
||||
if (avoid && (info[i] & NOTONL) && !(info[i] & ALLOW_M))
|
||||
continue;
|
||||
if ((!appr && !rn2(++chcnt))
|
||||
|| (appr && GDIST(nx, ny) < GDIST(nix, niy))) {
|
||||
|| (appr && GDIST(nx, ny) < GDIST(nix, niy))
|
||||
|| (info[i] & ALLOW_M)) {
|
||||
nix = nx;
|
||||
niy = ny;
|
||||
ninfo = info[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,6 +121,19 @@ pick_move:
|
||||
}
|
||||
|
||||
if (nix != omx || niy != omy) {
|
||||
|
||||
if (ninfo & ALLOW_M) {
|
||||
/* mtmp is deciding it would like to attack this turn.
|
||||
* Returns from m_move_aggress don't correspond to the same things
|
||||
* as this function should return, so we need to translate. */
|
||||
switch (m_move_aggress(mtmp, nix, niy)) {
|
||||
case 2:
|
||||
return -2; /* died making the attack */
|
||||
case 3:
|
||||
return 1; /* attacked and spent this move */
|
||||
}
|
||||
}
|
||||
|
||||
if (MON_AT(nix, niy))
|
||||
return 0;
|
||||
remove_monster(omx, omy);
|
||||
|
||||
Reference in New Issue
Block a user