]> granicus.if.org Git - nethack/commitdiff
Fix zero-damage attacks
authorPasi Kallinen <paxed@alt.org>
Tue, 5 Jan 2021 15:47:53 +0000 (17:47 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 5 Jan 2021 15:51:04 +0000 (17:51 +0200)
Disenchanters dealt 0 damage with their disenchanting attack,
as did monsters with sleeping and slowing attacks.

Fixes #439

src/uhitm.c

index b3b09983a43f601a13dc7d52ed0b877edf4aab94..102db57e45bcb3728e8d4e5093ba785e9be46fba 100644 (file)
@@ -2898,10 +2898,8 @@ mhitm_ad_slee(magr, mattk, mdef, mhm)
 struct monst *magr;
 struct attack *mattk;
 struct monst *mdef;
-struct mhitm_data *mhm;
+struct mhitm_data *mhm UNUSED;
 {
-    mhm->damage = 0; /* no HP damage */
-
     if (magr == &g.youmonst) {
         /* uhitm */
         int armpro = magic_negation(mdef);
@@ -3032,10 +3030,8 @@ mhitm_ad_ench(magr, mattk, mdef, mhm)
 struct monst *magr;
 struct attack *mattk;
 struct monst *mdef;
-struct mhitm_data *mhm;
+struct mhitm_data *mhm UNUSED;
 {
-    mhm->damage = 0; /* no HP damage */
-
     if (magr == &g.youmonst) {
         /* uhitm */
         /* there's no msomearmor() function, so just do damage */
@@ -3085,10 +3081,8 @@ mhitm_ad_slow(magr, mattk, mdef, mhm)
 struct monst *magr;
 struct attack *mattk;
 struct monst *mdef;
-struct mhitm_data *mhm;
+struct mhitm_data *mhm UNUSED;
 {
-    mhm->damage = 0; /* no HP damage */
-
     if (magr == &g.youmonst) {
         /* uhitm */
         int armpro = magic_negation(mdef);