From 6acf5a778407a5a8bdba6c14cd016d9e40980f7a Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Sat, 2 Dec 2023 08:12:48 +0000 Subject: [PATCH] Potions are often destroyed when dropped onto very hot ground In Gehennom and on the Plane of Fire, the ground is hot enough to boil potions (although not hot enough to, e.g., burn scrolls). The potions sometimes survive this (almost always if it's your potion, it's blessed, and you have maxed Luck), but often don't. In addition to making a lot of flavour sense, this serves a gameplay purpose in that it reduces the number of potions that are deathdropped by monsters in the late game. In Gehennom, monsters often generate with potions to use defensively, but then get killed before they have a chance to use them: this produces a surfeit of potions that players tend to convert into holy water or potions of full healing (and in general it doesn't make much sense that the basic potion of healing primarily generates in Gehennom). This commit approximately halves the number of useful potion deathdrops, whilst still allowing monsters access to their potions; when the monster dies, it drops the potion and this has a chance of destroying it. --- doc/fixes3-7-0.txt | 1 + src/do.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 16d0bb2a4..51010f0a6 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -2378,6 +2378,7 @@ allow the ')', '[', '(', '=', '"', and '*' commands to be preceded by the 'm' prefix to force a menu where the player can pick an item and choose a context-sensitive item action for it; some give a menu even without the prefix and for those, same item selection and action can be used +hot ground (Gehennom / Plane of Fire) often destroys dropped potions Platform- and/or Interface-Specific New Features diff --git a/src/do.c b/src/do.c index fc5a875c1..a6d3d4a3a 100644 --- a/src/do.c +++ b/src/do.c @@ -303,6 +303,34 @@ flooreffects(struct obj *obj, coordxy x, coordxy y, const char *verb) } else if (gc.context.mon_moving && IS_ALTAR(levl[x][y].typ) && cansee(x,y)) { doaltarobj(obj); + } else if (obj->oclass == POTION_CLASS && gl.level.flags.temperature > 0 && + (levl[x][y].typ == ROOM || levl[x][y].typ == CORR)) { + /* Potions are sometimes destroyed when landing on very hot + ground. The basic odds are 50% for nonblessed potions and + 30% for blessed potions; if you have handled the object + (i.e. it is or was yours), these odds are adjusted by Luck + (each Luck point affects them by 2%). Artifact potions + would not be affected, if any existed. */ + if (cansee(x,y)) { + /* unconditional "ground" is safe as this only runs for + room and corridor tiles */ + pline("%s up as %s the hot ground.", Tobjnam(obj, "heat"), + is_plural(obj) ? "they hit" : "it hits"); + } + + int survival_chance = obj->blessed ? 70 : 50; + if (obj->invlet) survival_chance += Luck * 2; + + if (!obj_resists(obj, survival_chance, 100)) { + if (cansee(x,y)) { + pline("%s from the heat!", + is_plural(obj) ? "They shatter" : "It shatters"); + } else { + You_hear("a shattering noise."); + } + breakobj(obj, x, y, FALSE, FALSE); + res = TRUE; + } } gb.bhitpos = save_bhitpos;