Pyrolisk eggs explode when broken

This commit is contained in:
Pasi Kallinen
2024-06-02 10:50:58 +03:00
parent d8aa4c0b1f
commit 2bec685bae
6 changed files with 34 additions and 3 deletions

View File

@@ -2438,6 +2438,7 @@ breakobj(
boolean from_invent)
{
boolean fracture = FALSE;
boolean explosion = FALSE;
if (is_crackable(obj)) /* if erodeproof, erode_obj() will say so */
return (erode_obj(obj, armor_simple_name(obj), ERODE_CRACK,
@@ -2479,6 +2480,8 @@ breakobj(
/* breaking your own eggs is bad luck */
if (hero_caused && obj->spe && ismnum(obj->corpsenm))
change_luck((schar) -min(obj->quan, 5L));
if (obj->corpsenm == PM_PYROLISK)
explosion = TRUE;
break;
case BOULDER:
case STATUE:
@@ -2519,6 +2522,8 @@ breakobj(
}
if (!fracture)
delobj(obj);
if (explosion)
explode(x, y, -11, d(3, 6), 0, EXPL_FIERY);
return 1;
}