fix github issue #196 - green slime feedback
Fixes #196 If you didn't die from turning into green slime but then died because green slimes had been genocided, the message given assumed that you had just seen "OK, you don't die" from answering No to "Really die?". Its wording didn't make sense if the reason you didn't die was an amulet of life-saving. Give a different message for that case. Also, if you survive turning into slime (via either method) and either green slimes are still around or you answer No to "Really die?" when they've been genocided, give a message after "You survived that attempt on your life" pointing out that you have done so in green slime form. Useful since prior to 3.6.2 you would have reverted to original form-- despite the Slimed countdown saying you had turned into green slime.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1558921075 2019/05/27 01:37:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.174 $ */
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1559664950 2019/06/04 16:15:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.175 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1177,6 +1177,7 @@ int how;
|
||||
if (!survive && (wizard || discover) && how <= GENOCIDED
|
||||
&& !paranoid_query(ParanoidDie, "Die?")) {
|
||||
pline("OK, so you don't %s.", (how == CHOKING) ? "choke" : "die");
|
||||
iflags.last_msg = PLNMSG_OK_DONT_DIE;
|
||||
savelife(how);
|
||||
survive = TRUE;
|
||||
}
|
||||
|
||||
12
src/hack.c
12
src/hack.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 hack.c $NHDT-Date: 1559313320 2019/05/31 14:35:20 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.212 $ */
|
||||
/* NetHack 3.6 hack.c $NHDT-Date: 1559664951 2019/06/04 16:15:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.213 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -2901,8 +2901,16 @@ const char *msg_override;
|
||||
nomovemsg = msg_override;
|
||||
else if (!nomovemsg)
|
||||
nomovemsg = You_can_move_again;
|
||||
if (*nomovemsg)
|
||||
if (*nomovemsg) {
|
||||
pline("%s", nomovemsg);
|
||||
/* follow "you survived that attempt on your life" with a message
|
||||
about current form if it's not the default; primarily for
|
||||
life-saving while turning into green slime but is also a reminder
|
||||
if life-saved while poly'd and Unchanging (explore or wizard mode
|
||||
declining to die since can't be both Unchanging and Lifesaved) */
|
||||
if (Upolyd && !strncmpi(nomovemsg, "You survived that ", 18))
|
||||
You("are %s", an(mons[u.umonnum].mname)); /* (ignore Hallu) */
|
||||
}
|
||||
nomovemsg = 0;
|
||||
u.usleep = 0;
|
||||
multi_reason = NULL;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 polyself.c $NHDT-Date: 1556497911 2019/04/29 00:31:51 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.132 $ */
|
||||
/* NetHack 3.6 polyself.c $NHDT-Date: 1559664952 2019/06/04 16:15:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.133 $ */
|
||||
/* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -163,7 +163,7 @@ polyman(fmt, arg)
|
||||
const char *fmt, *arg;
|
||||
{
|
||||
boolean sticky = (sticks(youmonst.data) && u.ustuck && !u.uswallow),
|
||||
was_mimicking = (U_AP_TYPE == M_AP_OBJECT);
|
||||
was_mimicking = (U_AP_TYPE != M_AP_NOTHING);
|
||||
boolean was_blind = !!Blind;
|
||||
|
||||
if (Upolyd) {
|
||||
@@ -186,6 +186,7 @@ const char *fmt, *arg;
|
||||
if (multi < 0)
|
||||
unmul("");
|
||||
youmonst.m_ap_type = M_AP_NOTHING;
|
||||
youmonst.mappearance = 0;
|
||||
}
|
||||
|
||||
newsym(u.ux, u.uy);
|
||||
@@ -633,6 +634,7 @@ int mntmp;
|
||||
if (mons[mntmp].mlet != S_MIMIC) {
|
||||
/* as in polyman() */
|
||||
youmonst.m_ap_type = M_AP_NOTHING;
|
||||
youmonst.mappearance = 0;
|
||||
}
|
||||
if (is_male(&mons[mntmp])) {
|
||||
if (flags.female)
|
||||
|
||||
11
src/potion.c
11
src/potion.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 potion.c $NHDT-Date: 1549074254 2019/02/02 02:24:14 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.160 $ */
|
||||
/* NetHack 3.6 potion.c $NHDT-Date: 1559664951 2019/06/04 16:15:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.161 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -185,8 +185,15 @@ const char *msg;
|
||||
if (msg)
|
||||
pline("%s", msg);
|
||||
}
|
||||
if (!Slimed)
|
||||
if (!Slimed) {
|
||||
dealloc_killer(find_delayed_killer(SLIMED));
|
||||
/* fake appearance is set late in turn-to-slime countdown */
|
||||
if (youmonst.m_ap_type == M_AP_MONSTER
|
||||
&& youmonst.mappearance == PM_GREEN_SLIME) {
|
||||
youmonst.m_ap_type = M_AP_NOTHING;
|
||||
youmonst.mappearance = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* start or stop petrification */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 timeout.c $NHDT-Date: 1545182148 2018/12/19 01:15:48 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.89 $ */
|
||||
/* NetHack 3.6 timeout.c $NHDT-Date: 1559664953 2019/06/04 16:15:53 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.90 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -403,6 +403,7 @@ struct kinfo *kptr;
|
||||
del_light_source(LS_MONSTER, monst_to_any(&youmonst));
|
||||
save_mvflags = mvitals[PM_GREEN_SLIME].mvflags;
|
||||
mvitals[PM_GREEN_SLIME].mvflags = save_mvflags & ~G_GENOD;
|
||||
/* become a green slime; also resets youmonst.m_ap_type+.mappearance */
|
||||
(void) polymon(PM_GREEN_SLIME);
|
||||
mvitals[PM_GREEN_SLIME].mvflags = save_mvflags;
|
||||
done(TURNED_SLIME);
|
||||
@@ -410,10 +411,20 @@ struct kinfo *kptr;
|
||||
/* life-saved; even so, hero still has turned into green slime;
|
||||
player may have genocided green slimes after being infected */
|
||||
if ((mvitals[PM_GREEN_SLIME].mvflags & G_GENOD) != 0) {
|
||||
char slimebuf[BUFSZ];
|
||||
|
||||
killer.format = KILLED_BY;
|
||||
Strcpy(killer.name, "slimicide");
|
||||
/* immediately follows "OK, so you don't die." */
|
||||
pline("Yes, you do. Green slime has been genocided...");
|
||||
/* vary the message depending upon whether life-save was due to
|
||||
amulet or due to declining to die in explore or wizard mode */
|
||||
Strcpy(slimebuf, "green slime has been genocided...");
|
||||
if (iflags.last_msg == PLNMSG_OK_DONT_DIE)
|
||||
/* follows "OK, so you don't die." and arg is second sentence */
|
||||
pline("Yes, you do. %s", upstart(slimebuf));
|
||||
else
|
||||
/* follows "The medallion crumbles to dust." */
|
||||
pline("Unfortunately, %s", slimebuf);
|
||||
/* die again; no possibility of amulet this time */
|
||||
done(GENOCIDED);
|
||||
/* could be life-saved again (only in explore or wizard mode)
|
||||
but green slimes are gone; just stay in current form */
|
||||
|
||||
Reference in New Issue
Block a user