eggs and other breakables break falling down stairs

<Someone> questioned why eggs and potions don't break when falling downstairs.
For that matter, other breakables should as well.
This commit is contained in:
cohrs
2002-01-29 06:35:17 +00:00
parent 05ab895737
commit f51556bc59
2 changed files with 24 additions and 0 deletions
+1
View File
@@ -410,6 +410,7 @@ secret corridor detected out of vision range is still displayed (prevents bug
where wand of secret door detection found nothing but still identified) where wand of secret door detection found nothing but still identified)
getobj can now see user-specified count when using inventory to make selection getobj can now see user-specified count when using inventory to make selection
scalpel is stainless steel (i.e. METAL) not regular steel (IRON) scalpel is stainless steel (i.e. METAL) not regular steel (IRON)
eggs, potions & other breakables may break when they fall down stairs
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+23
View File
@@ -1280,6 +1280,29 @@ boolean shop_floor_obj;
if (otmp == uquiver) setuqwep((struct obj *)0); if (otmp == uquiver) setuqwep((struct obj *)0);
if (otmp == uswapwep) setuswapwep((struct obj *)0); if (otmp == uswapwep) setuswapwep((struct obj *)0);
/* some things break rather than ship */
if (breaktest(otmp)) {
char *result;
if (objects[otmp->otyp].oc_material == GLASS
#ifdef TOURIST
|| otmp->otyp == EXPENSIVE_CAMERA
#endif
) {
if (otmp->otyp == MIRROR)
change_luck(-2);
result = "crash";
} else {
/* penalty for breaking eggs laid by you */
if (otmp->otyp == EGG && otmp->spe && otmp->corpsenm >= LOW_PM)
change_luck((schar) -min(otmp->quan, 5L));
result = "splatt";
}
You_hear("a muffled %s.",result);
obj_extract_self(otmp);
obfree(otmp, (struct obj *) 0);
return TRUE;
}
add_to_migration(otmp); add_to_migration(otmp);
otmp->ox = cc.x; otmp->ox = cc.x;
otmp->oy = cc.y; otmp->oy = cc.y;