Half_physical_damage 05

- [fixed in trunk] Jumping/Newton's-Thirding into something solid
- [fixed in trunk] Being hit by Mjollnir on the return
- [fixed in trunk] Contaminated or boiling water from a sink
- [fixed in trunk] Falling on a sink while levitating
- [fixed in trunk, fire only] Any passive attack
- [fixed in trunk] Zapping yourself with a wand, horn or spell
- [fixed in trunk] Burning (un)holy water
- [fixed in trunk] Thrown potion (bottle)
- [fixed in trunk] Bumping head on ceiling by cursed levitation
- [fixed in trunk] Exploding rings and wands (under all circumstances)
- [fixed in trunk] Stinking cloud damage
- [fixed in trunk] Sitting in a spiked pit, in lava
- [fixed in trunk] Exploding spellbooks
- [fixed in trunk] Falling off or failing to mount a steed
- [fixed in trunk] Falling into a (spiked) pit
- [fixed in trunk] Land mine explosion
- [fixed in trunk] Fire traps
This commit is contained in:
nethack.allison
2003-10-21 23:45:11 +00:00
parent d3316e0436
commit cdf982e478
13 changed files with 69 additions and 28 deletions

View File

@@ -1789,9 +1789,11 @@ STATIC_OVL void
backfire(otmp)
struct obj *otmp;
{
int dmg;
otmp->in_use = TRUE; /* in case losehp() is fatal */
pline("%s suddenly explodes!", The(xname(otmp)));
losehp(d(otmp->spe+2,6), "exploding wand", KILLED_BY_AN);
dmg = d(otmp->spe+2,6);
losehp(Maybe_Half_Phys(dmg), "exploding wand", KILLED_BY_AN);
useup(otmp);
}
@@ -1823,7 +1825,7 @@ dozap()
if ((damage = zapyourself(obj, TRUE)) != 0) {
char buf[BUFSZ];
Sprintf(buf, "zapped %sself with a wand", uhim());
losehp(damage, buf, NO_KILLER_PREFIX);
losehp(Maybe_Half_Phys(damage), buf, NO_KILLER_PREFIX);
}
} else {
@@ -2313,10 +2315,12 @@ struct obj *obj; /* wand or spell */
} else if (striking && u.dz < 0 && rn2(3) &&
!Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz) &&
!Underwater && !Is_qstart(&u.uz)) {
int dmg;
/* similar to zap_dig() */
pline("A rock is dislodged from the %s and falls on your %s.",
ceiling(x, y), body_part(HEAD));
losehp(rnd((uarmh && is_metallic(uarmh)) ? 2 : 6),
dmg = rnd((uarmh && is_metallic(uarmh)) ? 2 : 6);
losehp(Maybe_Half_Phys(dmg),
"falling rock", KILLED_BY_AN);
if ((otmp = mksobj_at(ROCK, x, y, FALSE, FALSE)) != 0) {
(void)xname(otmp); /* set dknown, maybe bknown */
@@ -3835,9 +3839,11 @@ register int osym, dmgtyp;
register long i, cnt, quan;
register int dindx;
const char *mult;
boolean physical_damage;
for(obj = invent; obj; obj = obj2) {
obj2 = obj->nobj;
physical_damage = FALSE;
if(obj->oclass != osym) continue; /* test only objs of type osym */
if(obj->oartifact) continue; /* don't destroy artifacts */
if(obj->in_use && obj->quan == 1) continue; /* not available */
@@ -3856,6 +3862,7 @@ register int osym, dmgtyp;
break;
case AD_FIRE:
xresist = (Fire_resistance && obj->oclass != POTION_CLASS);
physical_damage = TRUE;
if (obj->otyp == SCR_FIRE || obj->otyp == SPE_FIREBALL)
skip++;
@@ -3941,6 +3948,7 @@ register int osym, dmgtyp;
const char *how = destroy_strings[dindx * 3 + 2];
boolean one = (cnt == 1L);
if (physical_damage) dmg = Maybe_Half_Phys(dmg);
losehp(dmg, one ? how : (const char *)makeplural(how),
one ? KILLED_BY_AN : KILLED_BY);
exercise(A_STR, FALSE);