]> granicus.if.org Git - nethack/commitdiff
Wielding Demonbane prevents demons summoning friends
authorPasi Kallinen <paxed@alt.org>
Tue, 18 Oct 2016 15:07:53 +0000 (18:07 +0300)
committerPasi Kallinen <paxed@alt.org>
Tue, 18 Oct 2016 15:07:53 +0000 (18:07 +0300)
doc/fixes36.1
src/minion.c

index b997f6994c17b12358892bf2c48789b15527acd0..bb74b130837b5d63bc6aba721e86c92366938cf5 100644 (file)
@@ -352,6 +352,7 @@ sometimes generate the random mazes with wide corridors, thick walls,
        or with dead ends changed to loops
 put throne room gold in the chest
 wielding Trollsbane prevents trolls from reviving
+wielding Demonbane prevents demons summoning friends
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index 1af08f5ea92db437a07275bbea1b68a9f009e59b..d0394477ba3e9b87b69b36c8039f301cead807fd 100644 (file)
@@ -57,6 +57,13 @@ struct monst *mon;
 
     if (mon) {
         ptr = mon->data;
+
+        if (uwep && uwep->oartifact == ART_DEMONBANE && is_demon(ptr)) {
+            if (canseemon(mon))
+                pline("%s looks puzzled for a moment.", Monnam(mon));
+            return 0;
+        }
+
         atyp = mon->ispriest ? EPRI(mon)->shralign
                              : mon->isminion ? EMIN(mon)->min_align
                                              : (ptr->maligntyp == A_NONE)