Skip to content

Commit

Permalink
Game over if DevTeam member killed by monster
Browse files Browse the repository at this point in the history
The "rocks fall, you die" ending for killing a DevTeam member applied
only if the player directly did the deed (it was in xkilled), so
training up a purple worm to a high level and letting 'er rip provided a
way to kill off Pat Rankin without any punishment (besides the
admittedly severe intrinsic punishment of losing Pat).  Collapse the
dungeon if a DevTeam member is killed, whether by the player or by a
monster.
  • Loading branch information
entrez committed Nov 4, 2022
1 parent 2a4bfd5 commit b76a810
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions src/mon.c
Expand Up @@ -2060,6 +2060,28 @@ register struct monst *mtmp;
if (mvitals[tmp].died < 255)
mvitals[tmp].died++;

/* TNNT - killing the DevTeam is VERY BAD */
if (tmp == PM_DEVTEAM_MEMBER) {
struct monst *mon;
com_pager(QT_DEVTEAM_END);
for (mon = fmon; mon; mon = mon->nmon) {
if (DEADMONSTER(mon))
continue;
if (mon->mnum == PM_DEVTEAM_MEMBER)
mongone(mon); /* vanish out of this world indeed */
}
pline("Fissures open up, and the realm collapses in on itself.");
You("die...");
Strcpy(killer.name, "collapsing dungeon");
killer.format = KILLED_BY_AN;
done(CRUSHING);
/* life saving? */
pline("Unfortunately, you are still buried under tons of rock...");
Strcpy(killer.name, "dungeon debris");
killer.format = KILLED_BY;
done(CRUSHING);
/* wizards can refuse to die twice, I guess. */
}
/* if it's a (possibly polymorphed) quest leader, mark him as dead */
if (mtmp->m_id == quest_status.leader_m_id)
quest_status.leader_is_dead = TRUE;
Expand Down Expand Up @@ -2831,29 +2853,6 @@ int xkill_flags; /* 1: suppress message, 2: suppress corpse, 4: pacifist */
more_experienced(tmp, 0);
newexplevel(); /* will decide if you go up */

/* TNNT - killing the DevTeam is VERY BAD */
if (mndx == PM_DEVTEAM_MEMBER) {
struct monst *mon;
com_pager(QT_DEVTEAM_END);
for (mon = fmon; mon; mon = mon->nmon) {
if (DEADMONSTER(mon))
continue;
if (mon->mnum == PM_DEVTEAM_MEMBER)
mongone(mon); /* vanish out of this world indeed */
}
pline("Fissures open up, and the realm collapses in on itself.");
You("die...");
Strcpy(killer.name, "collapsing dungeon");
killer.format = KILLED_BY_AN;
done(CRUSHING);
/* life saving? */
pline("Unfortunately, you are still buried under tons of rock...");
Strcpy(killer.name, "dungeon debris");
killer.format = KILLED_BY;
done(CRUSHING);
/* wizards can refuse to die twice, I guess. */
}

/* adjust alignment points */
if (mtmp->m_id == quest_status.leader_m_id) { /* REAL BAD! */
adjalign(-(u.ualign.record + (int) ALIGNLIM / 2));
Expand Down

0 comments on commit b76a810

Please sign in to comment.