From 7a3c11ec6bf038c2edf06191104abf0dbbf87d84 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 5 Aug 2022 15:05:10 -0700 Subject: [PATCH] more Wizard of Yendor The earlier attempt to prevent the Wizard from immediately teleporting (and giving a vanishes and reappears message before the player has had a chance to see the level) when you arrive on the Plane of Earth ended up being worse. He just stayed put, so no vanish and reappear but no other activity either. --- src/wizard.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/wizard.c b/src/wizard.c index 9d0fb0e03..6093559a0 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -455,8 +455,7 @@ has_aggravatables(struct monst *mon) continue; if (in_w_tower != In_W_tower(mtmp->mx, mtmp->my, &u.uz)) continue; - if ((mtmp->mstrategy & STRAT_WAITFORU) != 0 - || helpless(mtmp)) + if ((mtmp->mstrategy & STRAT_WAITFORU) != 0 || helpless(mtmp)) return TRUE; } return FALSE; @@ -688,7 +687,8 @@ resurrect(void) mtmp = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy, MM_NOWAIT); /* affects experience; he's not coming back from a corpse but is subject to repeated killing like a revived corpse */ - if (mtmp) mtmp->mrevived = 1; + if (mtmp) + mtmp->mrevived = 1; } else { /* look for a migrating Wizard */ verb = "elude"; @@ -722,14 +722,15 @@ resurrect(void) } if (mtmp) { - /* if wizard ended up far away because of conjestion, clear his - wait-until-close flag; otherwise set that flag in case he just - came off the migrating_mons list to prevent him from triggering - " vanishes and reappears" on his first move */ - if (!couldsee(mtmp->mx, mtmp->my)) - mtmp->mstrategy &= ~STRAT_WAITMASK; - else - mtmp->mstrategy |= STRAT_WAITMASK; + /* FIXME: when a new wizard is created by makemon(), it gives + a " appears" message, delivered after he's been placed + on the map; however, when an existing wizard comes off + migrating_mons, he ends up triggering " vanishes and + reappears" on his first move (tactics when hero is carrying + the Amulet); setting STRAT_WAITMASK suppresses that but then + he just sits wherever he is, "meditating", contradicting the + threatening message below */ + mtmp->mstrategy &= ~STRAT_WAITMASK; mtmp->mtame = 0, mtmp->mpeaceful = 0; /* paranoia */ set_malign(mtmp);