scroll usage; also spell of ID (trunk only)
Make a not-very-robust fix for the report from <email deleted> about
being told a scoll disappears as you read it, then for the case of cursed
remove curse being told that the scroll disintegrates. He missed similar
case for scroll of fire erupting into flames after it had disappeared.
This suppresses the "disappears" part of the scroll reading message for
those two cases, but won't be very reliable if other scroll messages
referring to the scroll itself get introduced in the future. [Several
paths through scroll of fire won't report that it burns, and now it doesn't
give the disappears message any more. I don't think that's worth worrying
about; the scroll leaving inventory after burning up is implicit.]
Also cut down on redundant feedback for several scrolls (genocide,
charging, identify, stinking cloud) that start off by informing the player
what they are. That's only needed when the the player doesn't already
know the type of scroll. I've always felt it silly to be told that I've
"found a scroll of genocide" when I'm intentionally reading a known scroll
of genocide. All these types of scroll give a subsequent prompt which
makes them recongizable if you somehow manage to choose the wrong object
when picking the one to read.
Lastly, make spell of identify behave like ordinary uncursed scroll of
identify by default instead of ususally ID'ing multiple items. Now you'll
need to be skilled or better in divination spells skill in order to get the
blessed scroll effect out of it. And give some feedback if the spell is
cast when not carrying any inventory; it was just silently moving on to the
user's next command in that case.
This commit is contained in:
@@ -122,6 +122,7 @@ put #define for potion occupant chance and cursed wand zap chance in one place
|
|||||||
candles should not be fireproof
|
candles should not be fireproof
|
||||||
recognize most instances where hallucinatory monster name should be treated
|
recognize most instances where hallucinatory monster name should be treated
|
||||||
as a personal name (to avoid "the Barney") instead of a description
|
as a personal name (to avoid "the Barney") instead of a description
|
||||||
|
avoid giving misleading or redundant feedback when reading scrolls
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+1
-1
@@ -832,7 +832,7 @@ E struct obj *FDECL(getobj, (const char *,const char *));
|
|||||||
E int FDECL(ggetobj, (const char *,int (*)(OBJ_P),int,BOOLEAN_P,unsigned *));
|
E int FDECL(ggetobj, (const char *,int (*)(OBJ_P),int,BOOLEAN_P,unsigned *));
|
||||||
E void FDECL(fully_identify_obj, (struct obj *));
|
E void FDECL(fully_identify_obj, (struct obj *));
|
||||||
E int FDECL(identify, (struct obj *));
|
E int FDECL(identify, (struct obj *));
|
||||||
E void FDECL(identify_pack, (int));
|
E void FDECL(identify_pack, (int,BOOLEAN_P));
|
||||||
E int FDECL(askchain, (struct obj **,const char *,int,int (*)(OBJ_P),
|
E int FDECL(askchain, (struct obj **,const char *,int,int (*)(OBJ_P),
|
||||||
int (*)(OBJ_P),int,const char *));
|
int (*)(OBJ_P),int,const char *));
|
||||||
E void FDECL(prinv, (const char *,struct obj *,long));
|
E void FDECL(prinv, (const char *,struct obj *,long));
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)cmd.c 3.5 2005/11/19 */
|
/* SCCS Id: @(#)cmd.c 3.5 2006/02/15 */
|
||||||
/* 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. */
|
||||||
|
|
||||||
@@ -513,14 +513,14 @@ wiz_wish() /* Unlimited wishes for debug mode by Paul Polderman */
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ^I command - identify hero's inventory */
|
/* ^I command - reveal and optionally identify hero's inventory */
|
||||||
STATIC_PTR int
|
STATIC_PTR int
|
||||||
wiz_identify()
|
wiz_identify()
|
||||||
{
|
{
|
||||||
if (wizard) {
|
if (wizard) {
|
||||||
iflags.override_ID = (int)cmd_from_func(wiz_identify);
|
iflags.override_ID = (int)cmd_from_func(wiz_identify);
|
||||||
if (display_inventory((char *)0, TRUE) == -1)
|
if (display_inventory((char *)0, TRUE) == -1)
|
||||||
identify_pack(0);
|
identify_pack(0, FALSE);
|
||||||
iflags.override_ID = 0;
|
iflags.override_ID = 0;
|
||||||
} else pline("Unavailable command '^I'.");
|
} else pline("Unavailable command '^I'.");
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+60
-43
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)read.c 3.5 2005/10/07 */
|
/* SCCS Id: @(#)read.c 3.5 2006/02/15 */
|
||||||
/* 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. */
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ int
|
|||||||
doread()
|
doread()
|
||||||
{
|
{
|
||||||
register struct obj *scroll;
|
register struct obj *scroll;
|
||||||
register boolean confused;
|
boolean confused, nodisappear;
|
||||||
|
|
||||||
known = FALSE;
|
known = FALSE;
|
||||||
if(check_capacity((char *)0)) return (0);
|
if(check_capacity((char *)0)) return (0);
|
||||||
@@ -116,19 +116,26 @@ doread()
|
|||||||
return(study_book(scroll));
|
return(study_book(scroll));
|
||||||
}
|
}
|
||||||
scroll->in_use = TRUE; /* scroll, not spellbook, now being read */
|
scroll->in_use = TRUE; /* scroll, not spellbook, now being read */
|
||||||
if(scroll->otyp != SCR_BLANK_PAPER) {
|
if (scroll->otyp != SCR_BLANK_PAPER) {
|
||||||
if(Blind)
|
/* a few scroll feedback messages describe something happening
|
||||||
pline("As you %s the formula on it, the scroll disappears.",
|
to the scroll itself, so avoid "it disappears" for those */
|
||||||
is_silent(youmonst.data) ? "cogitate" : "pronounce");
|
nodisappear = (scroll->otyp == SCR_FIRE ||
|
||||||
else
|
(scroll->otyp == SCR_REMOVE_CURSE && scroll->cursed));
|
||||||
pline("As you read the scroll, it disappears.");
|
if (Blind)
|
||||||
if(confused) {
|
pline(nodisappear ? "You %s the formula on the scroll." :
|
||||||
if (Hallucination)
|
"As you %s the formula on it, the scroll disappears.",
|
||||||
pline("Being so trippy, you screw up...");
|
is_silent(youmonst.data) ? "cogitate" : "pronounce");
|
||||||
else
|
else
|
||||||
pline("Being confused, you mis%s the magic words...",
|
pline(nodisappear ? "You read the scroll." :
|
||||||
is_silent(youmonst.data) ? "understand" : "pronounce");
|
"As you read the scroll, it disappears.");
|
||||||
}
|
if (confused) {
|
||||||
|
if (Hallucination)
|
||||||
|
pline("Being so trippy, you screw up...");
|
||||||
|
else
|
||||||
|
pline("Being confused, you %s the magic words...",
|
||||||
|
is_silent(youmonst.data) ? "misunderstand" :
|
||||||
|
"mispronounce");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!seffects(scroll)) {
|
if(!seffects(scroll)) {
|
||||||
if(!objects[scroll->otyp].oc_name_known) {
|
if(!objects[scroll->otyp].oc_name_known) {
|
||||||
@@ -647,12 +654,15 @@ seffects(sobj)
|
|||||||
struct obj *sobj;
|
struct obj *sobj;
|
||||||
{
|
{
|
||||||
int cval;
|
int cval;
|
||||||
boolean confused = (Confusion != 0),
|
boolean confused = (Confusion != 0), already_known,
|
||||||
old_erodeproof, new_erodeproof;
|
old_erodeproof, new_erodeproof;
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
|
|
||||||
if (objects[sobj->otyp].oc_magic)
|
if (objects[sobj->otyp].oc_magic)
|
||||||
exercise(A_WIS, TRUE); /* just for trying */
|
exercise(A_WIS, TRUE); /* just for trying */
|
||||||
|
already_known = (sobj->oclass == SPBOOK_CLASS || /* spell */
|
||||||
|
objects[sobj->otyp].oc_name_known);
|
||||||
|
|
||||||
switch(sobj->otyp) {
|
switch(sobj->otyp) {
|
||||||
#ifdef MAIL
|
#ifdef MAIL
|
||||||
case SCR_MAIL:
|
case SCR_MAIL:
|
||||||
@@ -1059,7 +1069,8 @@ struct obj *sobj;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SCR_GENOCIDE:
|
case SCR_GENOCIDE:
|
||||||
You("have found a scroll of genocide!");
|
if (!already_known)
|
||||||
|
You("have found a scroll of genocide!");
|
||||||
known = TRUE;
|
known = TRUE;
|
||||||
if (sobj->blessed) do_class_genocide();
|
if (sobj->blessed) do_class_genocide();
|
||||||
else do_genocide(!sobj->cursed | (2 * !!Confusion));
|
else do_genocide(!sobj->cursed | (2 * !!Confusion));
|
||||||
@@ -1090,26 +1101,33 @@ struct obj *sobj;
|
|||||||
if (food_detect(sobj))
|
if (food_detect(sobj))
|
||||||
return(1); /* nothing detected */
|
return(1); /* nothing detected */
|
||||||
break;
|
break;
|
||||||
case SPE_IDENTIFY:
|
|
||||||
cval = rn2(5);
|
|
||||||
goto id;
|
|
||||||
case SCR_IDENTIFY:
|
case SCR_IDENTIFY:
|
||||||
/* known = TRUE; */
|
/* known = TRUE; */
|
||||||
if(confused)
|
if (confused)
|
||||||
You("identify this as an identify scroll.");
|
You("identify this as an identify scroll.");
|
||||||
else
|
else if (!already_known ||
|
||||||
pline("This is an identify scroll.");
|
/* force feedback now if invent will become
|
||||||
if (sobj->blessed || (!sobj->cursed && !rn2(5))) {
|
empty after using up this scroll */
|
||||||
cval = rn2(5);
|
(sobj->quan == 1L && inv_cnt() == 1))
|
||||||
/* Note: if rn2(5)==0, identify all items */
|
pline("This is an identify scroll.");
|
||||||
if (cval == 1 && sobj->blessed && Luck > 0) ++cval;
|
if (!already_known) more_experienced(0, 10);
|
||||||
} else cval = 1;
|
|
||||||
if(!objects[sobj->otyp].oc_name_known) more_experienced(0,10);
|
|
||||||
useup(sobj);
|
useup(sobj);
|
||||||
makeknown(SCR_IDENTIFY);
|
makeknown(SCR_IDENTIFY);
|
||||||
id:
|
/*FALLTHRU*/
|
||||||
if(invent && !confused) {
|
case SPE_IDENTIFY:
|
||||||
identify_pack(cval);
|
cval = 1;
|
||||||
|
if (sobj->blessed || (!sobj->cursed && !rn2(5))) {
|
||||||
|
cval = rn2(5);
|
||||||
|
/* note: if cval==0, identify all items */
|
||||||
|
if (cval == 1 && sobj->blessed && Luck > 0) ++cval;
|
||||||
|
}
|
||||||
|
if (invent && !confused) {
|
||||||
|
identify_pack(cval, !already_known);
|
||||||
|
} else if (sobj->otyp == SPE_IDENTIFY) {
|
||||||
|
/* when casting a spell we know we're not confused,
|
||||||
|
so inventory must be empty (another message has
|
||||||
|
already been given above if reading a scroll) */
|
||||||
|
pline("You're not carrying anything to be identified.");
|
||||||
}
|
}
|
||||||
return(1);
|
return(1);
|
||||||
case SCR_CHARGING:
|
case SCR_CHARGING:
|
||||||
@@ -1128,7 +1146,8 @@ struct obj *sobj;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
known = TRUE;
|
known = TRUE;
|
||||||
pline("This is a charging scroll.");
|
if (!already_known)
|
||||||
|
pline("This is a charging scroll.");
|
||||||
otmp = getobj(all_count, "charge");
|
otmp = getobj(all_count, "charge");
|
||||||
if (!otmp) break;
|
if (!otmp) break;
|
||||||
recharge(otmp, sobj->cursed ? -1 : (sobj->blessed ? 1 : 0));
|
recharge(otmp, sobj->cursed ? -1 : (sobj->blessed ? 1 : 0));
|
||||||
@@ -1183,12 +1202,8 @@ struct obj *sobj;
|
|||||||
exercise(A_WIS, FALSE);
|
exercise(A_WIS, FALSE);
|
||||||
break;
|
break;
|
||||||
case SCR_FIRE:
|
case SCR_FIRE:
|
||||||
/*
|
|
||||||
* Note: Modifications have been made as of 3.0 to allow for
|
|
||||||
* some damage under all potential cases.
|
|
||||||
*/
|
|
||||||
cval = bcsign(sobj);
|
cval = bcsign(sobj);
|
||||||
if(!objects[sobj->otyp].oc_name_known) more_experienced(0,10);
|
if (!already_known) more_experienced(0,10);
|
||||||
useup(sobj);
|
useup(sobj);
|
||||||
makeknown(SCR_FIRE);
|
makeknown(SCR_FIRE);
|
||||||
if(confused) {
|
if(confused) {
|
||||||
@@ -1206,9 +1221,9 @@ struct obj *sobj;
|
|||||||
}
|
}
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
if (Underwater)
|
if (Underwater) {
|
||||||
pline_The("water around you vaporizes violently!");
|
pline_The("water around you vaporizes violently!");
|
||||||
else {
|
} else {
|
||||||
pline_The("scroll erupts in a tower of flame!");
|
pline_The("scroll erupts in a tower of flame!");
|
||||||
burn_away_slime();
|
burn_away_slime();
|
||||||
}
|
}
|
||||||
@@ -1344,9 +1359,11 @@ struct obj *sobj;
|
|||||||
{
|
{
|
||||||
coord cc;
|
coord cc;
|
||||||
|
|
||||||
You("have found a scroll of stinking cloud!");
|
if (!already_known)
|
||||||
|
You("have found a scroll of stinking cloud!");
|
||||||
known = TRUE;
|
known = TRUE;
|
||||||
pline("Where do you want to center the cloud?");
|
pline("Where do you want to center the %scloud?",
|
||||||
|
already_known ? "stinking " : "");
|
||||||
cc.x = u.ux;
|
cc.x = u.ux;
|
||||||
cc.y = u.uy;
|
cc.y = u.uy;
|
||||||
if (getpos(&cc, TRUE, "the desired position") < 0) {
|
if (getpos(&cc, TRUE, "the desired position") < 0) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)sit.c 3.5 2005/06/02 */
|
/* SCCS Id: @(#)sit.c 3.5 2006/03/15 */
|
||||||
/* 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. */
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ dosit()
|
|||||||
You("are granted an insight!");
|
You("are granted an insight!");
|
||||||
if (invent) {
|
if (invent) {
|
||||||
/* rn2(5) agrees w/seffects() */
|
/* rn2(5) agrees w/seffects() */
|
||||||
identify_pack(rn2(5));
|
identify_pack(rn2(5), FALSE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
|
|||||||
+1
-1
@@ -947,13 +947,13 @@ boolean atme;
|
|||||||
case SPE_CONFUSE_MONSTER:
|
case SPE_CONFUSE_MONSTER:
|
||||||
case SPE_DETECT_FOOD:
|
case SPE_DETECT_FOOD:
|
||||||
case SPE_CAUSE_FEAR:
|
case SPE_CAUSE_FEAR:
|
||||||
|
case SPE_IDENTIFY:
|
||||||
/* high skill yields effect equivalent to blessed scroll */
|
/* high skill yields effect equivalent to blessed scroll */
|
||||||
if (role_skill >= P_SKILLED) pseudo->blessed = 1;
|
if (role_skill >= P_SKILLED) pseudo->blessed = 1;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case SPE_CHARM_MONSTER:
|
case SPE_CHARM_MONSTER:
|
||||||
case SPE_MAGIC_MAPPING:
|
case SPE_MAGIC_MAPPING:
|
||||||
case SPE_CREATE_MONSTER:
|
case SPE_CREATE_MONSTER:
|
||||||
case SPE_IDENTIFY:
|
|
||||||
(void) seffects(pseudo);
|
(void) seffects(pseudo);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user