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:
14
src/spell.c
14
src/spell.c
@@ -107,6 +107,7 @@ cursed_book(bp)
|
||||
struct obj *bp;
|
||||
{
|
||||
int lev = objects[bp->otyp].oc_level;
|
||||
int dmg = 0;
|
||||
|
||||
switch(rn2(lev)) {
|
||||
case 0:
|
||||
@@ -161,7 +162,8 @@ cursed_book(bp)
|
||||
} else {
|
||||
pline("As you read the book, it %s in your %s!",
|
||||
explodes, body_part(FACE));
|
||||
losehp(2*rnd(10)+5, "exploding rune", KILLED_BY_AN);
|
||||
dmg = 2*rnd(10)+5;
|
||||
losehp(Maybe_Half_Phys(dmg), "exploding rune", KILLED_BY_AN);
|
||||
}
|
||||
return TRUE;
|
||||
default:
|
||||
@@ -726,6 +728,7 @@ boolean atme;
|
||||
int energy, damage, chance, n, intell;
|
||||
int skill, role_skill;
|
||||
boolean confused = (Confusion != 0);
|
||||
boolean physical_damage = FALSE;
|
||||
struct obj *pseudo;
|
||||
coord cc;
|
||||
|
||||
@@ -833,8 +836,10 @@ boolean atme;
|
||||
* effects, e.g. more damage, further distance, and so on, without
|
||||
* additional cost to the spellcaster.
|
||||
*/
|
||||
case SPE_CONE_OF_COLD:
|
||||
case SPE_FIREBALL:
|
||||
physical_damage = TRUE;
|
||||
/* fall through */
|
||||
case SPE_CONE_OF_COLD:
|
||||
if (role_skill >= P_SKILLED) {
|
||||
if (throwspell()) {
|
||||
cc.x=u.dx;cc.y=u.dy;
|
||||
@@ -844,6 +849,8 @@ boolean atme;
|
||||
if ((damage = zapyourself(pseudo, TRUE)) != 0) {
|
||||
char buf[BUFSZ];
|
||||
Sprintf(buf, "zapped %sself with a spell", uhim());
|
||||
if (physical_damage)
|
||||
damage = Maybe_Half_Phys(damage);
|
||||
losehp(damage, buf, NO_KILLER_PREFIX);
|
||||
}
|
||||
} else {
|
||||
@@ -867,6 +874,8 @@ boolean atme;
|
||||
|
||||
/* these spells are all duplicates of wand effects */
|
||||
case SPE_FORCE_BOLT:
|
||||
physical_damage = TRUE;
|
||||
/* fall through */
|
||||
case SPE_SLEEP:
|
||||
case SPE_MAGIC_MISSILE:
|
||||
case SPE_KNOCK:
|
||||
@@ -894,6 +903,7 @@ boolean atme;
|
||||
if ((damage = zapyourself(pseudo, TRUE)) != 0) {
|
||||
char buf[BUFSZ];
|
||||
Sprintf(buf, "zapped %sself with a spell", uhim());
|
||||
if (physical_damage) damage = Maybe_Half_Phys(damage);
|
||||
losehp(damage, buf, NO_KILLER_PREFIX);
|
||||
}
|
||||
} else weffects(pseudo);
|
||||
|
||||
Reference in New Issue
Block a user