R772.2 - potions of acid in pools

- mixing potions of acid and water result in an explosion, so water_damage
should cause a potion of acid to explode as well
This commit is contained in:
cohrs
2002-04-14 06:09:00 +00:00
parent d3135ffe1c
commit 1a5f501758
2 changed files with 11 additions and 2 deletions
+1
View File
@@ -70,6 +70,7 @@ ATR_BOLD on spell menu header
travel command should restrict its shortest paths to areas of the map the travel command should restrict its shortest paths to areas of the map the
hero knows about or might reasonably guess hero knows about or might reasonably guess
non-altar prayer should limit god action, not maximize it non-altar prayer should limit god action, not maximize it
potions of acid explode, not dilute, so make water_damage behave this way
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+10 -2
View File
@@ -2418,9 +2418,12 @@ water_damage(obj, force, here)
register struct obj *obj; register struct obj *obj;
register boolean force, here; register boolean force, here;
{ {
struct obj *otmp;
/* Scrolls, spellbooks, potions, weapons and /* Scrolls, spellbooks, potions, weapons and
pieces of armor may get affected by the water */ pieces of armor may get affected by the water */
for (; obj; obj = (here ? obj->nexthere : obj->nobj)) { for (; obj; obj = otmp) {
otmp = here ? obj->nexthere : obj->nobj;
(void) snuff_lit(obj); (void) snuff_lit(obj);
@@ -2452,7 +2455,12 @@ register boolean force, here;
pline("Steam rises from %s.", the(xname(obj))); pline("Steam rises from %s.", the(xname(obj)));
else obj->otyp = SPE_BLANK_PAPER; else obj->otyp = SPE_BLANK_PAPER;
} else if (obj->oclass == POTION_CLASS) { } else if (obj->oclass == POTION_CLASS) {
if (obj->odiluted) { if (obj->otyp == POT_ACID) {
/* damage player/monster? */
pline("A potion explodes!");
delobj(obj);
continue;
} else if (obj->odiluted) {
obj->otyp = POT_WATER; obj->otyp = POT_WATER;
obj->blessed = obj->cursed = 0; obj->blessed = obj->cursed = 0;
obj->odiluted = 0; obj->odiluted = 0;