From: nethack.rankin Date: Sat, 23 Mar 2002 04:37:02 +0000 (+0000) Subject: Mjollnir fix X-Git-Tag: MOVE2GIT~2909 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db95c38e2008aef495365aed6b6ab24c98521165;p=nethack Mjollnir fix Fix one of the problems From a bug report: Mjollnir is only giving the intended feedback when it is thrown. Against ordinary monsters the problem isn't too bad--you get a lightning message without the preceding hit message--but against resistant ones there is no message at all when you hit hand-to-hand. (There is a similar bug for artifacts which add magic missile damage, but since no such artifacts exist that isn't much of a problem. :-) --- diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 28ae8904d..f877194e7 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -2,7 +2,9 @@ $RCSfile$ $Revision$ $Date$ General Fixes and Modified Features ----------------------------------- -Prevent panic() obj_not_free when pushing a boulder over a landmine +prevent panic() obj_not_free when pushing a boulder over a landmine +there was no feedback when successfully hitting shock resistant monsters + with Mjollnir via hand-to-hand attack Platform- and/or Interface-Specific Fixes diff --git a/src/artifact.c b/src/artifact.c index a8db867be..071864052 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)artifact.c 3.4 2002/02/21 */ +/* SCCS Id: @(#)artifact.c 3.4 2002/03/22 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -725,7 +725,9 @@ int dieroll; /* needed for Magicbane and vorpal blades */ return FALSE; } - realizes_damage = (youdefend || vis); + realizes_damage = (youdefend || vis || + /* feel the effect even if not seen */ + (youattack && mdef == u.ustuck)); /* the four basic attacks: fire, cold, shock and missiles */ if (attacks(AD_FIRE, otmp)) { @@ -751,8 +753,7 @@ int dieroll; /* needed for Magicbane and vorpal blades */ } if (attacks(AD_ELEC, otmp)) { if (realizes_damage) { - if (youattack ? otmp != uwep : !spec_dbon_applies) - pline("%s %s%c", Tobjnam(otmp, "hit"), + pline_The("massive hammer hits %s%c", hittee, !spec_dbon_applies ? '.' : '!'); if (spec_dbon_applies) pline("Lightning strikes %s!", hittee); @@ -763,8 +764,7 @@ int dieroll; /* needed for Magicbane and vorpal blades */ } if (attacks(AD_MAGM, otmp)) { if (realizes_damage) { - if (youattack ? otmp != uwep : !spec_dbon_applies) - pline("%s %s%c", Tobjnam(otmp, "hit"), + pline_The("imaginary widget hits %s%c", hittee, !spec_dbon_applies ? '.' : '!'); if (spec_dbon_applies) pline("A hail of magic missiles strikes %s!", hittee);