]> granicus.if.org Git - nethack/commitdiff
golem life
authornethack.rankin <nethack.rankin>
Thu, 1 Jun 2006 04:27:35 +0000 (04:27 +0000)
committernethack.rankin <nethack.rankin>
Thu, 1 Jun 2006 04:27:35 +0000 (04:27 +0000)
     When testing the spoteffects/drown hack I noticed that draining myself
with Stormbringer (toss up, get hit on head) while in iron golem form gave
messages about it drawing or draining life.  (I'm sure that this has come
up before....)  I've altered the artifact hit message rather than making
golems become resistant, although the opposite approach seems at least as
valid.  The drain life spell uses different wording and isn't affected.

doc/fixes34.4
src/artifact.c

index 0e8523e941a21c57f426490c245f29d087c9bf8a..290c22c734b93c2d054d00618a20fbafff3b8682 100644 (file)
@@ -234,6 +234,7 @@ temple donation can recover protection previously stolen by attrcurse attack
 display the invisible monster glyph ('I') whenever an unseen monster forces
        poly'd hero out of hiding
 escape the deleted trap after performing the invocation while trapped
+use alternate phrasing when life drain attack affects non-living creature
 
 
 Platform- and/or Interface-Specific Fixes
index 44496631eaafc531dcd9b9e9c828b4d3fa259f41..75f26d9300263994bb1734dcb954fc678ea45745 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)artifact.c 3.5     2006/04/14      */
+/*     SCCS Id: @(#)artifact.c 3.5     2006/05/31      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1142,16 +1142,21 @@ int dieroll; /* needed for Magicbane and vorpal blades */
            }
        }
        if (spec_ability(otmp, SPFX_DRLI)) {
+               /* some non-living creatures (golems, vortices) are
+                  vulnerable to life drain effects */
+               const char *life = nonliving(mdef->data) ?
+                                       "animating force" : "life";
+
                if (!youdefend) {
                        if (vis) {
                            if(otmp->oartifact == ART_STORMBRINGER)
-                               pline_The("%s blade draws the life from %s!",
+                               pline_The("%s blade draws the %s from %s!",
                                      hcolor(NH_BLACK),
-                                     mon_nam(mdef));
+                                     life, mon_nam(mdef));
                            else
-                               pline("%s draws the life from %s!",
+                               pline("%s draws the %s from %s!",
                                      The(distant_name(otmp, xname)),
-                                     mon_nam(mdef));
+                                     life, mon_nam(mdef));
                        }
                        if (mdef->m_lev == 0) {
                            *dmgptr = 2 * mdef->mhp + FATAL_DAMAGE_MODIFIER;
@@ -1168,15 +1173,15 @@ int dieroll; /* needed for Magicbane and vorpal blades */
                        int oldhpmax = u.uhpmax;
 
                        if (Blind)
-                               You_feel("an %s drain your life!",
+                               You_feel("an %s drain your %s!",
                                    otmp->oartifact == ART_STORMBRINGER ?
-                                   "unholy blade" : "object");
+                                   "unholy blade" : "object", life);
                        else if (otmp->oartifact == ART_STORMBRINGER)
-                               pline_The("%s blade drains your life!",
-                                     hcolor(NH_BLACK));
+                               pline_The("%s blade drains your %s!",
+                                     hcolor(NH_BLACK), life);
                        else
-                               pline("%s drains your life!",
-                                     The(distant_name(otmp, xname)));
+                               pline("%s drains your %s!",
+                                     The(distant_name(otmp, xname)), life);
                        losexp("life drainage");
                        if (magr && magr->mhp < magr->mhpmax) {
                            magr->mhp += (oldhpmax - u.uhpmax)/2;