mimic that ends up on the rogue level should not mimic a closed door
polymorphed or shapechanged monster sometimes got erroneous hit points
mimic should not mimic a boulder while on a pit or hole location
+Sting could trigger premature display of orcs during savegame restore
+Sting now glows light blue again
Platform- and/or Interface-Specific Fixes
#define WARNCOUNT 6 /* number of different warning levels */
E uchar warnsyms[WARNCOUNT];
+E NEARDATA int warn_obj_cnt; /* count of monsters meeting criteria */
E int x_maze_max, y_maze_max;
E int otg_temp;
E NEARDATA boolean unweapon;
E NEARDATA boolean mrg_to_wielded;
E NEARDATA struct obj *current_wand;
+E NEARDATA boolean defer_see_monsters;
E NEARDATA boolean in_steed_dismounting;
E boolean FDECL(artifact_has_invprop, (struct obj *,UCHAR_P));
E long FDECL(arti_cost, (struct obj *));
E struct obj *FDECL(what_gives, (long *));
+E void FDECL(Sting_effects, (int));
/* ### attrib.c ### */
#endif
(void) encumber_msg(); /* in case they auto-picked up something */
+ if (defer_see_monsters) {
+ defer_see_monsters = FALSE;
+ see_monsters();
+ }
u.uz0.dlevel = u.uz.dlevel;
youmonst.movement = NORMAL_SPEED; /* give the hero some movement points */
}
return (struct obj *)0;
}
+
+void
+Sting_effects(orc_count)
+int orc_count;
+{
+ if (uwep && uwep->oartifact == ART_STING) {
+ if (orc_count > 0 && warn_obj_cnt == 0)
+ pline("%s %s %s!", bare_artifactname(uwep),
+ otense(uwep,"glow"), hcolor(NH_LIGHT_BLUE));
+ else if (orc_count == 0 && warn_obj_cnt > 0)
+ pline("%s stops glowing.", bare_artifactname(uwep));
+ }
+}
/*artifact.c*/
#include "quest.h"
struct q_score quest_status = DUMMY;
+NEARDATA int warn_obj_cnt = 0;
NEARDATA int smeq[MAXNROFROOMS+1] = DUMMY;
NEARDATA int doorindex = 0;
NEARDATA char *save_cm = 0;
NEARDATA dest_area dndest = { 0, 0, 0, 0, 0, 0, 0, 0 };
NEARDATA coord inv_pos = { 0, 0 };
+NEARDATA boolean defer_see_monsters = FALSE;
NEARDATA boolean in_mklev = FALSE;
NEARDATA boolean stoned = FALSE; /* done to monsters hit by 'c' */
NEARDATA boolean unweapon = FALSE;
see_monsters()
{
register struct monst *mon;
+ int new_warn_obj_cnt = 0;
+
+ if (defer_see_monsters) return;
for (mon = fmon; mon; mon = mon->nmon) {
if (DEADMONSTER(mon)) continue;
newsym(mon->mx,mon->my);
if (mon->wormno) see_wsegs(mon);
+ if (MATCH_WARN_OF_MON(mon)) {
+ if (context.warntype.obj &&
+ (context.warntype.obj & mon->data->mflags2)) new_warn_obj_cnt++;
+ }
+ }
+ /*
+ * Make Sting glow blue or stop glowing if required.
+ */
+ if (new_warn_obj_cnt != warn_obj_cnt &&
+ uwep && uwep->oartifact == ART_STING) {
+ Sting_effects(new_warn_obj_cnt);
+ warn_obj_cnt = new_warn_obj_cnt;
}
+
#ifdef STEED
/* when mounted, hero's location gets caught by monster loop */
if (!u.usteed)
migrating_mons = restmonchn(fd, FALSE);
mread(fd, (genericptr_t) mvitals, sizeof(mvitals));
+ /*
+ * There are some things after this that can have unintended display
+ * side-effects too early in the game.
+ * Disable see_monsters() here, re-enable it at the top of moveloop()
+ */
+ defer_see_monsters = TRUE;
+
/* this comes after inventory has been loaded */
for(otmp = invent; otmp; otmp = otmp->nobj)
if(otmp->owornmask)