]> granicus.if.org Git - nethack/commitdiff
monster hp loss with Stormbringer
authorcohrs <cohrs>
Tue, 2 Sep 2003 03:48:34 +0000 (03:48 +0000)
committercohrs <cohrs>
Tue, 2 Sep 2003 03:48:34 +0000 (03:48 +0000)
<Someone> forwarded from rgrn that a monster using Stormbringer would
lose hp when hitting the player.  The sign of the "gain" was reversed due
to subtracting the difference in the wrong order.

doc/fixes34.3
src/artifact.c

index 71ea15be1f29a08390f7e6afdc0838831c395807..de130d9b332cbab1002c83b9e1e253738d72b366 100644 (file)
@@ -2,6 +2,7 @@ $RCSfile$ $Revision$ $Date$
 
 General Fixes and Modified Features
 -----------------------------------
+monster draining the player using Stormbringer decreased monster's hitpoints
 
 
 Platform- and/or Interface-Specific Fixes
index bb70d9b9385a6764879d83e5e8181609e9900bd5..a624e5e5ac2bfbd79aa06d2ce9768c05352f03a7 100644 (file)
@@ -1157,7 +1157,7 @@ int dieroll; /* needed for Magicbane and vorpal blades */
                                      The(distant_name(otmp, xname)));
                        losexp("life drainage");
                        if (magr && magr->mhp < magr->mhpmax) {
-                           magr->mhp += (u.uhpmax - oldhpmax)/2;
+                           magr->mhp += (oldhpmax - u.uhpmax)/2;
                            if (magr->mhp > magr->mhpmax) magr->mhp = magr->mhpmax;
                        }
                        return TRUE;