container vulnerability to water damage
We used to have the contents of chests and large boxes be immune to water damage, oilskin sacks immune unless the sack was cursed, other containers be vulnerable. Some reddit discussion about ice boxes in unnethack indicates that they are treated like oilskin sacks, which makes sense. This adds that to nethack and also makes chests and large boxes behave similarly. So it's now: nothing is immune even when cursed (except statues); oilskin sacks, ice boxes, and other boxes are immune to water damage unless cursed; all other containers vulnerable even when not cursed. | | Old New |immune all statues, statues | the time chests, large boxes | |immune when BU, oilskin sacks oilskin sacks, | vulnerable if C ice boxes, | chests, large boxes | |vulnerable ordinary sacks, ordinary sacks, | all the time bags of holding, bags of holding | ice boxes | I suspect that the old ice box classification might have been an accident caused by the Is_box() predicate yielding False for it. The changes won't make much difference to actual play. Chests and large boxes are rarely carried and never start out cursed, ice boxes even more so, and sacks/bags haven't been changed. However, players might intentionally curse a container to keep strong pets from picking it up, or be carrying a box because they haven't found a bag yet and then muck about with fountains or thrones and get it cursed.
This commit is contained in:
16
src/trap.c
16
src/trap.c
@@ -3914,17 +3914,17 @@ water_damage(
|
||||
if (carried(obj))
|
||||
update_inventory();
|
||||
return ER_GREASED;
|
||||
} else if (Is_container(obj) && !Is_box(obj)
|
||||
&& (obj->otyp != OILSKIN_SACK || (obj->cursed && !rn2(3)))) {
|
||||
} else if (Is_container(obj)
|
||||
&& (!Waterproof_container(obj) || (obj->cursed && !rn2(3)))) {
|
||||
if (carried(obj))
|
||||
pline("Water gets into your %s!", ostr);
|
||||
|
||||
pline("Some water gets into your %s!", ostr);
|
||||
water_damage_chain(obj->cobj, FALSE);
|
||||
return ER_DAMAGED; /* contents were damaged */
|
||||
} else if (obj->otyp == OILSKIN_SACK) {
|
||||
if (carried(obj))
|
||||
pline("Some water slides right off your %s.", ostr);
|
||||
makeknown(OILSKIN_SACK);
|
||||
} else if (Waterproof_container(obj)) {
|
||||
if (carried(obj)) {
|
||||
pline_The("water slides right off your %s.", ostr);
|
||||
makeknown(obj->otyp);
|
||||
}
|
||||
/* not actually damaged, but because we /didn't/ get the "water
|
||||
gets into!" message, the player now has more information and
|
||||
thus we need to waste any potion they may have used (also,
|
||||
|
||||
Reference in New Issue
Block a user