half poison gas damage from wearing a wet towel

Make wearing a wet towel confer new attribute Half_gas_damage in
addition to the usual blindness.  It reduces damage from being inside
a gas cloud region and from being hit by poison gas breath attack.
It also fully blocks breathing of potion vapors.

Might make the Plane of Fire easier although overcoming its blindness
with telepathy won't reveal elementals.  Definitely has the potential
to make blind-from-birth conduct easier which wasn't the intent and
probably isn't significant.
This commit is contained in:
PatR
2020-01-21 17:03:54 -08:00
parent a13d6c03c9
commit 3e18804371
7 changed files with 36 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 potion.c $NHDT-Date: 1573848199 2019/11/15 20:03:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ */
/* NetHack 3.6 potion.c $NHDT-Date: 1579655028 2020/01/22 01:03:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.179 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1627,13 +1627,19 @@ register struct obj *obj;
remains in inventory where our caller expects it to be */
obj->in_use = 1;
switch (obj->otyp) {
/* wearing a wet towel protects both eyes and breathing, even when
the breath effect might be beneficial; we still pass down to the
naming opportunity in case potion was thrown at hero by a monster */
switch (Half_gas_damage ? TOWEL : obj->otyp) {
case TOWEL:
pline("Some vapor passes harmlessly around you.");
break;
case POT_RESTORE_ABILITY:
case POT_GAIN_ABILITY:
if (obj->cursed) {
if (!breathless(g.youmonst.data))
if (!breathless(g.youmonst.data)) {
pline("Ulch! That potion smells terrible!");
else if (haseyes(g.youmonst.data)) {
} else if (haseyes(g.youmonst.data)) {
const char *eyes = body_part(EYE);
if (eyecount(g.youmonst.data) != 1)