cockatrice eggs vs gravity
Eggs thrown straight up which don't splatter on the ceiling yield "you've got it all over your face", so wearing a helmet shouldn't protect against petrification from cockatrice eggs in that situation. This was part of my delayed helm vs hat stuff; I can't remember whether it was done before or after this same issue came up in the newsgroup.
This commit is contained in:
@@ -63,6 +63,7 @@ panic on subsequent move if engulfer gets turned to stone and poly'd hero
|
|||||||
also has attached ball&chain
|
also has attached ball&chain
|
||||||
give more specific messages when dropping weapons due to slippery fingers
|
give more specific messages when dropping weapons due to slippery fingers
|
||||||
various helmet messages changed to distinguish between "helm" and "hat"
|
various helmet messages changed to distinguish between "helm" and "hat"
|
||||||
|
helmets don't protect against cockatrice eggs thrown straight up
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+28
-19
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)dothrow.c 3.4 2003/12/04 */
|
/* SCCS Id: @(#)dothrow.c 3.4 2004/11/11 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -733,6 +733,8 @@ struct obj *obj;
|
|||||||
boolean hitsroof;
|
boolean hitsroof;
|
||||||
{
|
{
|
||||||
const char *almost;
|
const char *almost;
|
||||||
|
boolean petrifier = ((obj->otyp == EGG || obj->otyp == CORPSE) &&
|
||||||
|
touch_petrifies(&mons[obj->corpsenm]));
|
||||||
/* note: obj->quan == 1 */
|
/* note: obj->quan == 1 */
|
||||||
|
|
||||||
if (hitsroof) {
|
if (hitsroof) {
|
||||||
@@ -767,10 +769,15 @@ boolean hitsroof;
|
|||||||
obj = 0; /* it's now gone */
|
obj = 0; /* it's now gone */
|
||||||
switch (otyp) {
|
switch (otyp) {
|
||||||
case EGG:
|
case EGG:
|
||||||
if (touch_petrifies(&mons[ocorpsenm]) &&
|
if (petrifier && !Stone_resistance &&
|
||||||
!uarmh && !Stone_resistance &&
|
!(poly_when_stoned(youmonst.data) &&
|
||||||
!(poly_when_stoned(youmonst.data) && polymon(PM_STONE_GOLEM)))
|
polymon(PM_STONE_GOLEM))) {
|
||||||
goto petrify;
|
/* egg ends up "all over your face"; perhaps
|
||||||
|
visored helmet should still save you here */
|
||||||
|
if (uarmh) Your("%s fails to protect you.",
|
||||||
|
helm_simple_name(uarmh));
|
||||||
|
goto petrify;
|
||||||
|
}
|
||||||
case CREAM_PIE:
|
case CREAM_PIE:
|
||||||
case BLINDING_VENOM:
|
case BLINDING_VENOM:
|
||||||
pline("You've got it all over your %s!", body_part(FACE));
|
pline("You've got it all over your %s!", body_part(FACE));
|
||||||
@@ -812,20 +819,21 @@ boolean hitsroof;
|
|||||||
if (less_damage && dmg < (Upolyd ? u.mh : u.uhp)) {
|
if (less_damage && dmg < (Upolyd ? u.mh : u.uhp)) {
|
||||||
if (!artimsg)
|
if (!artimsg)
|
||||||
pline("Fortunately, you are wearing a hard helmet.");
|
pline("Fortunately, you are wearing a hard helmet.");
|
||||||
} else if (flags.verbose &&
|
/* helmet definitely protects you when it blocks petrification */
|
||||||
!(obj->otyp == CORPSE && touch_petrifies(&mons[obj->corpsenm])))
|
} else if (!petrifier) {
|
||||||
pline("%s does not protect you.", Yname2(uarmh));
|
if (flags.verbose)
|
||||||
} else if (obj->otyp == CORPSE && touch_petrifies(&mons[obj->corpsenm])) {
|
Your("%s does not protect you.", helm_simple_name(uarmh));
|
||||||
if (!Stone_resistance &&
|
|
||||||
!(poly_when_stoned(youmonst.data) && polymon(PM_STONE_GOLEM))) {
|
|
||||||
petrify:
|
|
||||||
killer.format = KILLED_BY;
|
|
||||||
Strcpy(killer.name, "elementary physics"); /* "what goes up..." */
|
|
||||||
You("turn to stone.");
|
|
||||||
if (obj) dropy(obj); /* bypass most of hitfloor() */
|
|
||||||
done(STONING);
|
|
||||||
return obj ? TRUE : FALSE;
|
|
||||||
}
|
}
|
||||||
|
} else if (petrifier && !Stone_resistance &&
|
||||||
|
!(poly_when_stoned(youmonst.data) &&
|
||||||
|
polymon(PM_STONE_GOLEM))) {
|
||||||
|
petrify:
|
||||||
|
killer.format = KILLED_BY;
|
||||||
|
Strcpy(killer.name, "elementary physics"); /* "what goes up..." */
|
||||||
|
You("turn to stone.");
|
||||||
|
if (obj) dropy(obj); /* bypass most of hitfloor() */
|
||||||
|
done(STONING);
|
||||||
|
return obj ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
hitfloor(obj);
|
hitfloor(obj);
|
||||||
losehp(Maybe_Half_Phys(dmg), "falling object", KILLED_BY_AN);
|
losehp(Maybe_Half_Phys(dmg), "falling object", KILLED_BY_AN);
|
||||||
@@ -1739,7 +1747,8 @@ struct obj *obj;
|
|||||||
pline_The("gold hits the %s, then falls back on top of your %s.",
|
pline_The("gold hits the %s, then falls back on top of your %s.",
|
||||||
ceiling(u.ux,u.uy), body_part(HEAD));
|
ceiling(u.ux,u.uy), body_part(HEAD));
|
||||||
/* some self damage? */
|
/* some self damage? */
|
||||||
if(uarmh) pline("Fortunately, you are wearing a helmet!");
|
if (uarmh) pline("Fortunately, you are wearing %s!",
|
||||||
|
an(helm_simple_name(uarmh)));
|
||||||
}
|
}
|
||||||
bhitpos.x = u.ux;
|
bhitpos.x = u.ux;
|
||||||
bhitpos.y = u.uy;
|
bhitpos.y = u.uy;
|
||||||
|
|||||||
Reference in New Issue
Block a user