spell of protection feedback
From the newsgroup (subject: "3 xorn fixes"): casting spell of protection would report "the air around you begins to shimmer" even when you were embedded in rock or swallowed. It included a pointer to a patch; I looked at that but ended up not using it.
This commit is contained in:
@@ -285,6 +285,7 @@ suppress corpse from bones data if death is due to being dissolved in lava
|
||||
suppress "you rise from the dead" if game ends due to be turned into slime
|
||||
don't give erroneous "<mon> disppears" message for hero poly'd into quantum
|
||||
mechanic who hits engulfer while swallowed and blinded
|
||||
feedback from casting spell of protection was wrong in some situations
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
23
src/spell.c
23
src/spell.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)spell.c 3.5 2006/07/08 */
|
||||
/* SCCS Id: @(#)spell.c 3.5 2006/12/06 */
|
||||
/* Copyright (c) M. Stephenson 1988 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -704,16 +704,25 @@ cast_protection()
|
||||
|
||||
if (gain > 0) {
|
||||
if (!Blind) {
|
||||
const char *hgolden = hcolor(NH_GOLDEN);
|
||||
int rmtyp;
|
||||
const char *hgolden = hcolor(NH_GOLDEN), *atmosphere;
|
||||
|
||||
if (u.uspellprot)
|
||||
if (u.uspellprot) {
|
||||
pline_The("%s haze around you becomes more dense.",
|
||||
hgolden);
|
||||
else
|
||||
} else {
|
||||
rmtyp = levl[u.ux][u.uy].typ;
|
||||
atmosphere = u.uswallow ?
|
||||
((u.ustuck->data == &mons[PM_FOG_CLOUD]) ? "mist" :
|
||||
is_whirly(u.ustuck->data) ? "maelstrom" :
|
||||
is_animal(u.ustuck->data) ? "maw" : "ooze") :
|
||||
u.uinwater ? "water" :
|
||||
(rmtyp == CLOUD) ? "cloud" :
|
||||
IS_TREE(rmtyp) ? "vegitation" :
|
||||
IS_STWALL(rmtyp) ? "stone" : "air";
|
||||
pline_The("%s around you begins to shimmer with %s haze.",
|
||||
/*[ what about being inside solid rock while polyd? ]*/
|
||||
(Underwater || Is_waterlevel(&u.uz)) ? "water" : "air",
|
||||
an(hgolden));
|
||||
atmosphere, an(hgolden));
|
||||
}
|
||||
}
|
||||
u.uspellprot += gain;
|
||||
u.uspmtime =
|
||||
|
||||
Reference in New Issue
Block a user