summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells4.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 17:30:31 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 17:30:31 +0000
commit57f3e71ae59d5e4830bdf787d9f2d5e9d5fe8fc8 (patch)
tree835d7e23d1c0d27e935015288effd8115a949cf0 /crawl-ref/source/spells4.cc
parent1f9e38751c81744f2e8d4ffb1aea7f3870ba9d5b (diff)
downloadcrawl-ref-57f3e71ae59d5e4830bdf787d9f2d5e9d5fe8fc8.tar.gz
crawl-ref-57f3e71ae59d5e4830bdf787d9f2d5e9d5fe8fc8.zip
In ouch(), use NON_MONSTER instead of 0 as the index for non-monster
attacks, so as to avoid overlap with the first monster on the level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6985 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r--crawl-ref/source/spells4.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 002554c889..7ee3913b65 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -327,8 +327,8 @@ void cast_shatter(int pow)
mpr("cast_shatter(): unknown transformation in spells4.cc");
}
- if (damage)
- ouch(damage, 0, KILLED_BY_TARGETTING);
+ if (damage > 0)
+ ouch(damage, NON_MONSTER, KILLED_BY_TARGETTING);
int rad = 3 + (you.skills[SK_EARTH_MAGIC] / 5);
@@ -748,7 +748,7 @@ void cast_ignite_poison(int pow)
mpr("The poison in your system burns!");
}
- ouch( damage, 0, KILLED_BY_TARGETTING );
+ ouch(damage, NON_MONSTER, KILLED_BY_TARGETTING);
if (you.duration[DUR_POISONING] > 0)
{
@@ -799,7 +799,7 @@ static int _discharge_monsters( coord_def where, int pow, int garbage )
damage = check_your_resists( damage, BEAM_ELECTRICITY );
if ( player_is_airborne() )
damage /= 2;
- ouch( damage, 0, KILLED_BY_WILD_MAGIC );
+ ouch(damage, NON_MONSTER, KILLED_BY_WILD_MAGIC);
}
else if (mon == NON_MONSTER)
return (0);
@@ -1144,7 +1144,7 @@ static int _passwall(coord_def where, int pow, int garbage)
{
if (howdeep > range || non_rock_barriers)
{
- ouch(1 + you.hp, 0, KILLED_BY_PETRIFICATION);
+ ouch(1 + you.hp, NON_MONSTER, KILLED_BY_PETRIFICATION);
//jmf: not return; if wizard, successful transport is option
}
}