fix #H1911: poison dart message sequence (trunk only)
From a bug report, message sequence
when throwing a poisoned weapon which loses its poison was confusing.
|The dart is no longer poisoned.
|The dart hits the acid blob.
|The poison doesn't seem to affect the acid blob.
This patch makes the first sentence come out last.
[It appears that poisoned weapons thrown/shot by monsters or traps
never lose their poison. That can't be right....]
This commit is contained in:
@@ -324,6 +324,7 @@ simplify hero placement on Castle level when climbing up stairs from Valley
|
|||||||
spell attack by low-Int hero could inflict negative damage
|
spell attack by low-Int hero could inflict negative damage
|
||||||
some wand/spell/breath zaps that hit a secret door failed to reveal it
|
some wand/spell/breath zaps that hit a secret door failed to reveal it
|
||||||
wand explosion feedback about adjacent door was phrased as if for a wand zap
|
wand explosion feedback about adjacent door was phrased as if for a wand zap
|
||||||
|
improve the message sequencing when a thrown poisoned weapon loses is poison
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+16
-5
@@ -1,5 +1,4 @@
|
|||||||
/* NetHack 3.5 uhitm.c $Date$ $Revision$ */
|
/* NetHack 3.5 uhitm.c $Date$ $Revision$ */
|
||||||
/* SCCS Id: @(#)uhitm.c 3.5 2009/02/21 */
|
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -551,7 +550,8 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
*/
|
*/
|
||||||
boolean hittxt = FALSE, destroyed = FALSE, already_killed = FALSE;
|
boolean hittxt = FALSE, destroyed = FALSE, already_killed = FALSE;
|
||||||
boolean get_dmg_bonus = TRUE;
|
boolean get_dmg_bonus = TRUE;
|
||||||
boolean ispoisoned = FALSE, needpoismsg = FALSE, poiskilled = FALSE;
|
boolean ispoisoned = FALSE, needpoismsg = FALSE, poiskilled = FALSE,
|
||||||
|
unpoisonmsg = FALSE;
|
||||||
boolean silvermsg = FALSE, silverobj = FALSE;
|
boolean silvermsg = FALSE, silverobj = FALSE;
|
||||||
boolean valid_weapon_attack = FALSE;
|
boolean valid_weapon_attack = FALSE;
|
||||||
boolean unarmed = !uwep && !uarm && !uarms;
|
boolean unarmed = !uwep && !uarm && !uarms;
|
||||||
@@ -963,8 +963,10 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
adjalign(-1);
|
adjalign(-1);
|
||||||
}
|
}
|
||||||
if (obj && !rn2(nopoison)) {
|
if (obj && !rn2(nopoison)) {
|
||||||
|
/* remove poison now in case obj ends up in a bones file */
|
||||||
obj->opoisoned = FALSE;
|
obj->opoisoned = FALSE;
|
||||||
pline("%s no longer poisoned.", Yobjnam2(obj, "are"));
|
/* defer "obj is no longer poisoned" until after hit message */
|
||||||
|
unpoisonmsg = TRUE;
|
||||||
}
|
}
|
||||||
if (resists_poison(mon))
|
if (resists_poison(mon))
|
||||||
needpoismsg = TRUE;
|
needpoismsg = TRUE;
|
||||||
@@ -1093,6 +1095,12 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
whom = strcat(s_suffix(whom), " flesh");
|
whom = strcat(s_suffix(whom), " flesh");
|
||||||
pline(fmt, whom);
|
pline(fmt, whom);
|
||||||
}
|
}
|
||||||
|
/* if a "no longer poisoned" message is coming, it will be last;
|
||||||
|
obj->opoisoned was cleared above and any message referring to
|
||||||
|
"poisoned <obj>" has now been given; we want just "<obj>" for
|
||||||
|
last message, so reformat while obj is still accessible */
|
||||||
|
if (unpoisonmsg)
|
||||||
|
Strcpy(saved_oname, cxname(obj));
|
||||||
|
|
||||||
/* [note: thrown obj might go away during killed/xkilled call] */
|
/* [note: thrown obj might go away during killed/xkilled call] */
|
||||||
|
|
||||||
@@ -1101,7 +1109,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
if (poiskilled) {
|
if (poiskilled) {
|
||||||
pline_The("poison was deadly...");
|
pline_The("poison was deadly...");
|
||||||
if (!already_killed) xkilled(mon, 0);
|
if (!already_killed) xkilled(mon, 0);
|
||||||
return FALSE;
|
destroyed = TRUE; /* return FALSE; */
|
||||||
} else if (destroyed) {
|
} else if (destroyed) {
|
||||||
if (!already_killed)
|
if (!already_killed)
|
||||||
killed(mon); /* takes care of most messages */
|
killed(mon); /* takes care of most messages */
|
||||||
@@ -1114,8 +1122,11 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
pline("%s appears confused.", Monnam(mon));
|
pline("%s appears confused.", Monnam(mon));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (unpoisonmsg)
|
||||||
|
Your("%s %s no longer poisoned.", saved_oname,
|
||||||
|
vtense(saved_oname, "are"));
|
||||||
|
|
||||||
return((boolean)(destroyed ? FALSE : TRUE));
|
return destroyed ? FALSE : TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL boolean
|
STATIC_OVL boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user