From: cohrs Date: Tue, 29 Jan 2002 06:35:17 +0000 (+0000) Subject: eggs and other breakables break falling down stairs X-Git-Tag: MOVE2GIT~3316 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f51556bc59ce93c89eeca2b8f0c9917248788e25;p=nethack eggs and other breakables break falling down stairs questioned why eggs and potions don't break when falling downstairs. For that matter, other breakables should as well. --- diff --git a/doc/fixes33.2 b/doc/fixes33.2 index 8782f59d3..3693db6c3 100644 --- a/doc/fixes33.2 +++ b/doc/fixes33.2 @@ -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 diff --git a/src/dokick.c b/src/dokick.c index 43673f33e..46fd6963a 100644 --- a/src/dokick.c +++ b/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;