Skip to content

Commit

Permalink
Potions are often destroyed when dropped onto very hot ground
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Alex Smith committed Dec 2, 2023
1 parent 87f3b48 commit 6acf5a7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/fixes3-7-0.txt
Expand Up @@ -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
Expand Down
28 changes: 28 additions & 0 deletions src/do.c
Expand Up @@ -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;
Expand Down

0 comments on commit 6acf5a7

Please sign in to comment.