1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-07-28 16:32:27 +01:00

BUGFIX: Poison shouldn't wear off of a whole stack at once

This commit is contained in:
Chris-plus-alphanumericgibberish 2016-08-22 16:56:08 -04:00
parent a3451462bd
commit 21a5548542

View file

@ -1882,8 +1882,18 @@ defaultvalue:
else if(!rn2(10)) amnesiamon = TRUE;
}
if (obj && !rn2(20) && obj->opoisoned) {
obj->opoisoned = FALSE;
pline("The coating on your %s has worn off.", xname(obj));
if(obj->quan > 1){
struct obj *unpoisd = splitobj(obj, 1L);
unpoisd->opoisoned = FALSE;
pline("The coating on your %s has worn off.", xname(unpoisd));
obj_extract_self(unpoisd); /* free from inv */
/* shouldn't merge */
unpoisd = hold_another_object(unpoisd, "You drop %s!",
doname(unpoisd), (const char *)0);
} else {
obj->opoisoned = FALSE;
pline("The coating on your %s has worn off.", xname(obj));
}
}
}
if(uclockwork && u.utemp >= BURNING_HOT && obj && is_metallic(obj) && !resists_fire(mon)){