From f5c157cb4bfe1fd7912ce268a43e39826cffa8a4 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 29 May 2017 12:47:40 -0700 Subject: [PATCH] fix #H5524 - green dragon breath > 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 | 1 + src/region.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 27c588e5e..320666239 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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 diff --git a/src/region.c b/src/region.c index b38936c81..d91b9fa39 100644 --- a/src/region.c +++ b/src/region.c @@ -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)) -- 2.40.0