From 488e045156cc2704c51d6a31f7fcbedba2a4067f Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 1 May 2020 12:12:47 -0700 Subject: [PATCH] Double Trouble trouble From the newsgroup: if cloned Wizard arrives out of view of the hero (and vice versa), it will sit and wait until hero moves into his view or until suffering some damage (usually via pet). So if a mob causes the clone to arrive on the far side of a wall, he might not come into play until the hero goes to another level and some future harassment action pulls him off the migrating monsters list. Treat clones like the resurrected Wizard: don't start out waiting. --- doc/fixes37.0 | 3 +++ src/wizard.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index eac27182f..311f05beb 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -171,6 +171,9 @@ when hold_another_object() fails while hero is swallowed, drop the item into when digging a pit results in it being filled by adjacent pool or lava, any objects at the spot weren't subjected to water or fire damage; also, riding hero's steed wasn't subjected to immersion either +after "double trouble", cloned Wizard would wait until he had suffered some + damage or hero moved into direct view; keep STRAT_WAIT for original + Wizard but avoid that for clones Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/wizard.c b/src/wizard.c index a96281e27..b1f52a7bf 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -493,12 +493,15 @@ aggravate() } } +/* "Double Trouble" spell cast by the Wizard; caller is responsible for + only casting this when there is currently one wizard in existence; + the clone can't use it unless/until its creator has been killed off */ void clonewiz() { register struct monst *mtmp2; - if ((mtmp2 = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy, NO_MM_FLAGS)) + if ((mtmp2 = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy, MM_NOWAIT)) != 0) { mtmp2->msleeping = mtmp2->mtame = mtmp2->mpeaceful = 0; if (!u.uhave.amulet && rn2(2)) { /* give clone a fake */