#include "hack.h"
#include "artifact.h"
+extern boolean known; /* from read.c */
+
STATIC_DCL boolean NDECL(unconstrain_map);
STATIC_DCL void NDECL(reconstrain_map);
STATIC_DCL void FDECL(browse_map, (int, const char *));
boolean stale, ugold = FALSE, steedgold = FALSE;
int ter_typ = TER_DETECT | TER_OBJ;
- g.known = stale = clear_stale_map(COIN_CLASS,
+ known = stale = clear_stale_map(COIN_CLASS,
(unsigned) (sobj->blessed ? GOLD : 0));
/* look for gold carried by monsters (might be in a container) */
if (mtmp == u.usteed) {
steedgold = TRUE;
} else {
- g.known = TRUE;
+ known = TRUE;
goto outgoldmap; /* skip further searching */
}
} else {
if (mtmp == u.usteed) {
steedgold = TRUE;
} else {
- g.known = TRUE;
+ known = TRUE;
goto outgoldmap; /* skip further searching */
}
}
/* look for gold objects */
for (obj = fobj; obj; obj = obj->nobj) {
if (sobj->blessed && o_material(obj, GOLD)) {
- g.known = TRUE;
+ known = TRUE;
if (obj->ox != u.ux || obj->oy != u.uy)
goto outgoldmap;
} else if (o_in(obj, COIN_CLASS)) {
- g.known = TRUE;
+ known = TRUE;
if (obj->ox != u.ux || obj->oy != u.uy)
goto outgoldmap;
}
}
- if (!g.known) {
+ if (!known) {
/* no gold found on floor or monster's inventory.
adjust message if you have gold in your inventory */
if (sobj) {
}
if (!ct && !ctu) {
- g.known = stale && !confused;
+ known = stale && !confused;
if (stale) {
docrt();
You("sense a lack of %s nearby.", what);
}
return !stale;
} else if (!ct) {
- g.known = TRUE;
+ known = TRUE;
You("%s %s nearby.", sobj ? "smell" : "sense", what);
if (sobj && sobj->blessed) {
if (!u.uedibility)
struct obj *temp;
int ter_typ = TER_DETECT | TER_OBJ;
- g.known = TRUE;
+ known = TRUE;
cls();
(void) unconstrain_map();
for (obj = fobj; obj; obj = obj->nobj)
((mndx) == urace.malenum \
|| (urace.femalenum != NON_PM && (mndx) == urace.femalenum))
+boolean known;
+
static NEARDATA const char readable[] = { ALL_CLASSES, SCROLL_CLASS,
SPBOOK_CLASS, 0 };
static const char all_count[] = { ALLOW_COUNT, ALL_CLASSES, 0 };
register struct obj *scroll;
boolean confused, nodisappear;
- g.known = FALSE;
+ known = FALSE;
if (check_capacity((char *) 0))
return 0;
scroll = getobj(readable, "read");
}
if (!seffects(scroll)) {
if (!objects[scroll->otyp].oc_name_known) {
- if (g.known)
+ if (known)
learnscroll(scroll);
else if (!objects[scroll->otyp].oc_uname)
docall(scroll);
if (Sokoban)
return;
- g.known = TRUE;
+ known = TRUE;
for (zx = 0; zx < COLNO; zx++)
for (zy = 0; zy < ROWNO; zy++)
if (howmuch & ALL_MAP || rn2(7)) {
switch (otyp) {
#ifdef MAIL
case SCR_MAIL:
- g.known = TRUE;
+ known = TRUE;
if (sobj->spe == 2)
/* "stamped scroll" created via magic marker--without a stamp */
pline("This scroll is marked \"postage due\".");
if (s) {
otmp->spe += s;
adj_abon(otmp, s);
- g.known = otmp->known;
+ known = otmp->known;
/* update shop bill to reflect new higher price */
if (s > 0 && otmp->unpaid)
alter_cost(otmp, 0L);
exercise(A_CON, FALSE);
break;
} else
- g.known = TRUE;
+ known = TRUE;
} else { /* armor and scroll both cursed */
pline("%s.", Yobjnam2(otmp, "vibrate"));
if (otmp->spe >= -6) {
You("don't remember there being any magic words on this scroll.");
else
pline("This scroll seems to be blank.");
- g.known = TRUE;
+ known = TRUE;
break;
case SCR_REMOVE_CURSE:
case SPE_REMOVE_CURSE: {
confused ? &mons[PM_ACID_BLOB]
: (struct permonst *) 0,
FALSE))
- g.known = TRUE;
+ known = TRUE;
/* no need to flush monsters; we ask for identification only if the
* monsters are not visible
*/
vis_results ? "is" : "seems",
(results < 0) ? "un" : "");
if (vis_results > 0)
- g.known = TRUE;
+ known = TRUE;
}
break;
}
case SCR_GENOCIDE:
if (!already_known)
You("have found a scroll of genocide!");
- g.known = TRUE;
+ known = TRUE;
if (sblessed)
do_class_genocide();
else
case SCR_LIGHT:
if (!confused || rn2(5)) {
if (!Blind)
- g.known = TRUE;
+ known = TRUE;
litroom(!confused && !scursed, sobj);
if (!confused && !scursed) {
if (lightdamage(sobj, TRUE, 5))
- g.known = TRUE;
+ known = TRUE;
}
} else {
/* could be scroll of create monster, don't set known ...*/
if (confused || scursed) {
level_tele();
} else {
- g.known = scrolltele(sobj);
+ known = scrolltele(sobj);
}
break;
case SCR_GOLD_DETECTION:
cvt_sdoor_to_door(&levl[x][y]);
/* do_mapping() already reveals secret passages */
}
- g.known = TRUE;
+ known = TRUE;
/*FALLTHRU*/
case SPE_MAGIC_MAPPING:
if (level.flags.nommap) {
}
break;
case SCR_AMNESIA:
- g.known = TRUE;
+ known = TRUE;
forget((!sblessed ? ALL_SPELLS : 0)
| (!confused || scursed ? ALL_MAP : 0));
if (Hallucination) /* Ommmmmm! */
else
pline_The("%s rumbles %s you!", ceiling(u.ux, u.uy),
sblessed ? "around" : "above");
- g.known = 1;
+ known = 1;
sokoban_guilt();
/* Loop through the surrounding squares */
}
break;
case SCR_PUNISHMENT:
- g.known = TRUE;
+ known = TRUE;
if (confused || sblessed) {
You_feel("guilty.");
break;
if (!already_known)
You("have found a scroll of stinking cloud!");
- g.known = TRUE;
+ known = TRUE;
pline("Where do you want to center the %scloud?",
already_known ? "stinking " : "");
cc.x = u.ux;