]> granicus.if.org Git - nethack/commitdiff
fix #H5524 - green dragon breath
authorPatR <rankin@nethack.org>
Mon, 29 May 2017 19:47:40 +0000 (12:47 -0700)
committerPatR <rankin@nethack.org>
Mon, 29 May 2017 19:47:40 +0000 (12:47 -0700)
> Green dragons should probably not cough in their own breath.

They took no damage, but they did become blind.  Make creatures who
breath poison gas (adult green dragons, the Chromatic Dragon) be
immune to gas clouds like non-breathing creatures are.

There's no way to distinguish gas left behind by dragon breath from
that created by scroll of stinking cloud, so gas breathers are no
longer affected by the latter.

doc/fixes36.1
src/region.c

index 27c588e5e67c3f358ce4a9a8774b47974a454088..3206662399a36becf56895feb177d4b78d87fdad 100644 (file)
@@ -389,6 +389,7 @@ poor message when shape-shifted vampire reverts if cause of 'death' was
        The vampire bat is disintegrated.  The vampire bat suddenly transforms
        and rises as a vampire.  (fix: switch to existing alternate phrasing
        used for amorphous form, "reconstitute" rather than "transform")
+adult green dragons and the Chromatic Dragon were blinded by gas clouds
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index b38936c81d13d7034377613f717ad7450c1c1f29..d91b9fa3982c0a2843781b20fe7baf032ff62a17 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 region.c        $NHDT-Date: 1446892454 2015/11/07 10:34:14 $  $NHDT-Branch: master $:$NHDT-Revision: 1.36 $ */
+/* NetHack 3.6 region.c        $NHDT-Date: 1496087244 2017/05/29 19:47:24 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.40 $ */
 /* Copyright (c) 1996 by Jean-Christophe Collet  */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -969,9 +969,15 @@ genericptr_t p2;
     } else { /* A monster is inside the cloud */
         mtmp = (struct monst *) p2;
 
-        /* Non living and non breathing monsters are not concerned */
+        /* Non living and non breathing monsters are not concerned;
+           adult green dragon is not affected by gas cloud, baby one is */
         if (!(nonliving(mtmp->data) || is_vampshifter(mtmp))
-            && !breathless(mtmp->data)) {
+            && !breathless(mtmp->data)
+            /* exclude monsters with poison gas breath attack:
+               adult green dragon and Chromatic Dragon (and iron golem,
+               but nonliving() and breathless() tests also catch that) */
+            && !(attacktype_fordmg(mtmp->data, AT_BREA, AD_DRST)
+                 || attacktype_fordmg(mtmp->data, AT_BREA, AD_RBRE))) {
             if (cansee(mtmp->mx, mtmp->my))
                 pline("%s coughs!", Monnam(mtmp));
             if (heros_fault(reg))