#include "mondata.h" /* for mindless() */
#endif
-#ifndef INVISIBLE_OBJECTS
+/*
+ * vobj_at()
+ *
+ * Returns the head of the list of objects that the player can see
+ * at location (x,y).
+ */
#define vobj_at(x,y) (level.objects[x][y])
-#endif
/*
* sensemon()
/* ### display.c ### */
-#ifdef INVISIBLE_OBJECTS
-E struct obj * FDECL(vobj_at, (XCHAR_P,XCHAR_P));
-#endif /* INVISIBLE_OBJECTS */
E void FDECL(magic_map_background, (XCHAR_P,XCHAR_P,int));
E void FDECL(map_background, (XCHAR_P,XCHAR_P,int));
E void FDECL(map_trap, (struct trap *,int));
Bitfield(recharged,3); /* number of times it's been recharged */
#define on_ice recharged /* corpse on ice */
Bitfield(lamplit,1); /* a light-source -- can be lit */
-#ifdef INVISIBLE_OBJECTS
- Bitfield(oinvis,1); /* invisible */
-#else
- Bitfield(oreserved1,1);
-#endif
+ Bitfield(oreserved1,1); /* was the placeholder for invisible objects, free for use */
Bitfield(greased,1); /* covered with grease */
Bitfield(nomerge,1); /* set temporarily to prevent merging */
Bitfield(was_thrown,1); /* thrown by hero since last picked up */
if(!getdir((char *)0)) return 0;
invis_mirror = Invis;
-#ifdef INVISIBLE_OBJECTS
- if (obj->oinvis) invis_mirror = TRUE;
-#endif
useeit = !Blind && (!invis_mirror || See_invisible);
uvisage = (ACURR(A_CHA) > 14) ?
(poly_gender() == 1 ? "beautiful" : "handsome") : "ugly";
#define remember_topology(x,y) (lastseentyp[x][y] = levl[x][y].typ)
-#ifdef INVISIBLE_OBJECTS
-/*
- * vobj_at()
- *
- * Returns a pointer to an object if the hero can see an object at the
- * given location. This takes care of invisible objects. NOTE, this
- * assumes that the hero is not blind and on top of the object pile.
- * It does NOT take into account that the location is out of sight, or,
- * say, one can see blessed, etc.
- */
-struct obj *
-vobj_at(x,y)
- xchar x,y;
-{
- register struct obj *obj = level.objects[x][y];
-
- while (obj) {
- if (!obj->oinvis || See_invisible) return obj;
- obj = obj->nexthere;
- }
- return ((struct obj *) 0);
-}
-#endif /* else vobj_at() is defined in display.h */
-
/*
* magic_map_background()
*
/* can now see invisible monsters */
set_mimic_blocking(); /* do special mimic handling */
see_monsters();
-#ifdef INVISIBLE_OBJECTS
- see_objects();
-#endif
if (Invis && !oldprop && !HSee_invisible && !Blind) {
newsym(u.ux,u.uy);
if (!See_invisible) {
set_mimic_blocking(); /* do special mimic handling */
see_monsters();
-#ifdef INVISIBLE_OBJECTS
- see_objects();
-#endif
}
if (Invisible && !Blind) {
/* only one object */
if (dfeature) pline1(fbuf);
read_engr_at(u.ux, u.uy); /* Eric Backus */
-#ifdef INVISIBLE_OBJECTS
- if (otmp->oinvis && !See_invisible) verb = "feel";
-#endif
You("%s here %s.", verb, doname(otmp));
iflags.last_msg = PLNMSG_ONE_ITEM_HERE;
if (otmp->otyp == CORPSE) feel_cockatrice(otmp, FALSE);
obj->obroken != otmp->obroken ||
obj->otrapped != otmp->otrapped ||
obj->lamplit != otmp->lamplit ||
-#ifdef INVISIBLE_OBJECTS
- obj->oinvis != otmp->oinvis ||
-#endif
obj->greased != otmp->greased ||
obj->oeroded != otmp->oeroded ||
obj->oeroded2 != otmp->oeroded2 ||
otmp->known = 1;
otmp->lknown = 0;
otmp->cknown = 0;
-#ifdef INVISIBLE_OBJECTS
- otmp->oinvis = !rn2(1250);
-#endif
otmp->corpsenm = NON_PM;
if (init) switch (let) {
*/
if (Blind && !sensemon(mtmp)) obj->dknown = 0;
-#ifdef INVISIBLE_OBJECTS
- /* Invisible monster ==> invisible corpse */
- obj->oinvis = mtmp->minvis;
-#endif
-
stackobj(obj);
newsym(x, y);
return obj;
if (!touch_artifact(otmp,mtmp)) continue;
if (!can_carry(mtmp,otmp)) continue;
if (is_pool(mtmp->mx,mtmp->my)) continue;
-#ifdef INVISIBLE_OBJECTS
- if (otmp->oinvis && !perceives(mtmp->data)) continue;
-#endif
if (cansee(mtmp->mx,mtmp->my) && flags.verbose)
pline("%s picks up %s.", Monnam(mtmp),
(distu(mtmp->mx, mtmp->my) <= 5) ?
} else
Strcpy(prefix, "a ");
-#ifdef INVISIBLE_OBJECTS
- if (obj->oinvis) Strcat(prefix,"invisible ");
-#endif
-
/* "empty" goes at the beginning, but item count goes at the end */
if (cknown &&
(Is_container(obj) || obj->otyp == STATUE) && !Has_contents(obj))
int cnt, spe, spesgn, typ, very, rechrg;
int blessed, uncursed, iscursed, ispoisoned, isgreased;
int eroded, eroded2, erodeproof;
-#ifdef INVISIBLE_OBJECTS
- int isinvisible;
-#endif
int halfeaten, mntmp, contents;
int islit, unlabeled, ishistoric, isdiluted, trapped;
int tmp, tinv, tvariety;
cnt = spe = spesgn = typ = very = rechrg =
blessed = uncursed = iscursed =
-#ifdef INVISIBLE_OBJECTS
- isinvisible =
-#endif
ispoisoned = isgreased = eroded = eroded2 = erodeproof =
halfeaten = islit = unlabeled = ishistoric = isdiluted =
trapped = 0;
iscursed = 1;
} else if (!strncmpi(bp, "uncursed ", l=9)) {
uncursed = 1;
-#ifdef INVISIBLE_OBJECTS
- } else if (!strncmpi(bp, "invisible ", l=10)) {
- isinvisible = 1;
-#endif
} else if (!strncmpi(bp, "rustproof ", l=10) ||
!strncmpi(bp, "erodeproof ", l=11) ||
!strncmpi(bp, "corrodeproof ", l=13) ||
curse(otmp);
}
-#ifdef INVISIBLE_OBJECTS
- if (isinvisible) otmp->oinvis = 1;
-#endif
-
/* set eroded */
if (is_damageable(otmp) || otmp->otyp == CRYSKNIFE) {
if (eroded && (is_flammable(otmp) || is_rustprone(otmp)))
/* In case of auto-pickup, where we haven't had a chance
to look at it yet; affects docall(SCR_SCARE_MONSTER). */
if (!Blind)
-#ifdef INVISIBLE_OBJECTS
- if (!obj->oinvis || See_invisible)
-#endif
obj->dknown = 1;
if (obj == uchain) { /* do not pick up attached chain */
return 1;
}
-#ifdef INVISIBLE_OBJECTS
- if (potion->otyp == POT_INVISIBILITY && !obj->oinvis) {
- obj->oinvis = TRUE;
- if (!Blind) {
- if (!See_invisible) pline("Where did %s go?",
- the(xname(obj)));
- else You("notice a little haziness around %s.",
- the(xname(obj)));
- }
- goto poof;
- } else if (potion->otyp == POT_SEE_INVISIBLE && obj->oinvis) {
- obj->oinvis = FALSE;
- if (!Blind) {
- if (!See_invisible) pline("So that's where %s went!",
- the(xname(obj)));
- else pline_The("haziness around %s disappears.",
- the(xname(obj)));
- }
- goto poof;
- }
-#endif
-
if(is_poisonable(obj)) {
if(potion->otyp == POT_SICKNESS && !obj->opoisoned) {
char buf[BUFSZ];
retry:
tmp = 0;
for(otmp = invent; otmp; otmp = otmp->nobj)
- if ((!uarm || otmp != uarmc) && otmp != uskin
- && otmp->oclass != COIN_CLASS
-#ifdef INVISIBLE_OBJECTS
- && (!otmp->oinvis || perceives(mtmp->data))
-#endif
- )
- tmp += ((otmp->owornmask &
- (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1);
+ if ((!uarm || otmp != uarmc) && otmp != uskin && otmp->oclass != COIN_CLASS)
+ tmp += ((otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1);
if (!tmp) goto nothing_to_steal;
tmp = rn2(tmp);
for(otmp = invent; otmp; otmp = otmp->nobj)
- if ((!uarm || otmp != uarmc) && otmp != uskin
- && otmp->oclass != COIN_CLASS
-#ifdef INVISIBLE_OBJECTS
- && (!otmp->oinvis || perceives(mtmp->data))
-#endif
- )
- if((tmp -= ((otmp->owornmask &
- (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1)) < 0)
- break;
+ if ((!uarm || otmp != uarmc) && otmp != uskin && otmp->oclass != COIN_CLASS)
+ if((tmp -= ((otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1)) < 0)
+ break;
if(!otmp) {
impossible("Steal fails!");
return(0);
if (is_pick(otmp) &&
(passes_walls(ptr) && thick_skinned(ptr))) tmp += 2;
-#ifdef INVISIBLE_OBJECTS
- /* Invisible weapons against monsters who can't see invisible */
- if (otmp->oinvis && !perceives(ptr)) tmp += 3;
-#endif
-
/* Check specially named weapon "to hit" bonuses */
if (otmp->oartifact) tmp += spec_abon(otmp, mon);
}
unbless(obj);
uncurse(obj);
-#ifdef INVISIBLE_OBJECTS
- /*[this will be insufficient if it ever reduces obj's shop value]*/
- if (obj->oinvis) obj->oinvis = 0;
-#endif
return;
}
(void) rloco(obj);
break;
case WAN_MAKE_INVISIBLE:
-#ifdef INVISIBLE_OBJECTS
- obj->oinvis = TRUE;
- newsym(obj->ox,obj->oy); /* make object disappear */
-#endif
break;
case WAN_UNDEAD_TURNING:
case SPE_TURN_UNDEAD: