From: arromdee Date: Mon, 11 Feb 2002 00:42:44 +0000 (+0000) Subject: mirrors X-Git-Tag: MOVE2GIT~3205 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14a6d90763f6bf5584d52ec3394c867b07f61588;p=nethack mirrors Invisibility should be treated consistently regarding passive reflection of gaze attacks and explicit mirror use against gaze attacks. --- diff --git a/doc/fixes34.0 b/doc/fixes34.0 index 66d3c9e5c..2a3ee6be3 100644 --- a/doc/fixes34.0 +++ b/doc/fixes34.0 @@ -429,6 +429,7 @@ avoid giving odd "the bat is moving faster" when seeing a bat created in gehennom and inaccurate "the monster is moving slower" when a monster puts on speed boots. gold detection "materially poor" message inappropriate if you have hidden_gold() +cannot reflect back an invisible umber hulk or medusa's attack diff --git a/src/apply.c b/src/apply.c index 848660942..15afdb659 100644 --- a/src/apply.c +++ b/src/apply.c @@ -683,7 +683,8 @@ struct obj *obj; } else if (mlet == S_VAMPIRE || mlet == S_GHOST) { if (vis) pline ("%s doesn't have a reflection.", Monnam(mtmp)); - } else if(!mtmp->mcan && mtmp->data == &mons[PM_MEDUSA]) { + } else if(!mtmp->mcan && !mtmp->minvis && + mtmp->data == &mons[PM_MEDUSA]) { if (mon_reflects(mtmp, "The gaze is reflected away by %s %s!")) return 1; if (vis) @@ -694,9 +695,6 @@ struct obj *obj; mtmp->data == &mons[PM_FLOATING_EYE]) { int tmp = d((int)mtmp->m_lev, (int)mtmp->data->mattk[0].damd); if (!rn2(4)) tmp = 120; - /* Note: floating eyes cannot use their abilities while invisible, - * but Medusa and umber hulks can. - */ if (vis) pline("%s is frozen by its reflection.", Monnam(mtmp)); else You_hear("%s stop moving.",something); @@ -704,7 +702,8 @@ struct obj *obj; if ( (int) mtmp->mfrozen + tmp > 127) mtmp->mfrozen = 127; else mtmp->mfrozen += tmp; - } else if(!mtmp->mcan && mtmp->data == &mons[PM_UMBER_HULK]) { + } else if(!mtmp->mcan && !mtmp->minvis && + mtmp->data == &mons[PM_UMBER_HULK]) { if (vis) pline ("%s confuses itself!", Monnam(mtmp)); mtmp->mconf = 1;