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:
@@ -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)
|
||||
getobj can now see user-specified count when using inventory to make selection
|
||||
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
|
||||
|
||||
23
src/dokick.c
23
src/dokick.c
@@ -1280,6 +1280,29 @@ boolean shop_floor_obj;
|
||||
if (otmp == uquiver) setuqwep((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);
|
||||
otmp->ox = cc.x;
|
||||
otmp->oy = cc.y;
|
||||
|
||||
Reference in New Issue
Block a user