summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-29 06:09:25 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-29 06:09:25 +0000
commit4e484905bc378b2a6a86a17b874a740118d62539 (patch)
tree6f69965159fcfa3c6579198ca5e217dd9d16c753 /crawl-ref
parentde335f00ea4b4ccf145dbac9a78d1bb81acb36b3 (diff)
downloadcrawl-ref-4e484905bc378b2a6a86a17b874a740118d62539.tar.gz
crawl-ref-4e484905bc378b2a6a86a17b874a740118d62539.zip
Add minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5324 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/beam.cc6
-rw-r--r--crawl-ref/source/decks.cc2
-rw-r--r--crawl-ref/source/effects.cc2
-rw-r--r--crawl-ref/source/fight.cc8
-rw-r--r--crawl-ref/source/religion.cc2
-rw-r--r--crawl-ref/source/spells2.cc4
6 files changed, 12 insertions, 12 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index f78121bc8e..89a926a2d2 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2174,7 +2174,7 @@ int mons_adjust_flavoured( monsters *monster, bolt &pbolt,
break;
case BEAM_NEG:
- if (mons_res_negative_energy(monster) > 0)
+ if (mons_res_negative_energy(monster))
{
if (doFlavouredEffects)
simple_monster_message(monster, " appears unharmed.");
@@ -2214,7 +2214,7 @@ int mons_adjust_flavoured( monsters *monster, bolt &pbolt,
break;
case BEAM_MIASMA:
- if (mons_res_negative_energy( monster ) >= 3)
+ if (mons_res_negative_energy( monster ) == 3)
{
if (doFlavouredEffects)
simple_monster_message(monster, " appears unharmed.");
@@ -4162,7 +4162,7 @@ static bool _beam_is_harmless(bolt &beam, monsters *mon)
return (mons_res_cold(mon) >= 3);
case BEAM_MIASMA:
case BEAM_NEG:
- return (mons_res_negative_energy(mon) >= 3);
+ return (mons_res_negative_energy(mon) == 3);
case BEAM_ELECTRICITY:
return (mons_res_elec(mon) >= 3);
case BEAM_POISON:
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 4231df4bc9..1fb01e6a6d 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1530,7 +1530,7 @@ static int _drain_monsters(int x, int y, int pow, int garbage)
monsters& mon = menv[mnstr];
- if (mons_res_negative_energy(&mon) > 0)
+ if (mons_res_negative_energy(&mon))
simple_monster_message(&mon, " is unaffected.");
else
{
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index fae20f6a8a..53156bdcb3 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -263,7 +263,7 @@ int torment_monsters(int x, int y, int pow, int caster)
monsters *monster = &menv[mon];
- if (invalid_monster(monster) || mons_res_negative_energy(monster) >= 3)
+ if (invalid_monster(monster) || mons_res_negative_energy(monster) == 3)
return retval;
int hploss = monster->hit_points / 2 - 1;
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 7228295e86..952ba93e29 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1961,7 +1961,7 @@ void melee_attack::drain_player()
void melee_attack::drain_monster()
{
- if (defender->res_negative_energy() > 0 || one_chance_in(3))
+ if (defender->res_negative_energy() || one_chance_in(3))
return;
if (defender_visible)
@@ -2226,7 +2226,7 @@ bool melee_attack::apply_damage_brand()
}
if (defender->holiness() != MH_NATURAL || !weapon
- || defender->res_negative_energy() > 0
+ || defender->res_negative_energy()
|| damage_done < 1 || attacker->stat_hp() == attacker->stat_maxhp()
|| one_chance_in(5))
{
@@ -2275,7 +2275,7 @@ bool melee_attack::apply_damage_brand()
break;
}
case SPWPN_PAIN:
- if (defender->res_negative_energy() <= 0
+ if (defender->res_negative_energy()
&& random2(8) <= attacker->skill(SK_NECROMANCY))
{
if (defender_visible)
@@ -2554,7 +2554,7 @@ void melee_attack::player_apply_staff_damage()
}
case STAFF_DEATH:
- if (mons_res_negative_energy(def) > 0)
+ if (mons_res_negative_energy(def))
break;
if (random2(8) <= you.skills[SK_NECROMANCY])
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 3c9f911af9..0530ee811a 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -988,7 +988,7 @@ static bool _tso_blessing_holy_wpn(monsters* mon)
static bool _tso_blessing_holy_arm(monsters* mon)
{
// If a monster has full negative energy resistance, get out.
- if (mons_res_negative_energy(mon) >= 3)
+ if (mons_res_negative_energy(mon) == 3)
return false;
// Pick either a monster's armour or its shield.
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index b1e52bf169..3880f22b79 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1050,7 +1050,7 @@ void drain_life(int pow)
if (mons_holiness(monster) != MH_NATURAL)
continue;
- if (mons_res_negative_energy( monster ))
+ if (mons_res_negative_energy(monster))
continue;
if (mons_near(monster))
@@ -1108,7 +1108,7 @@ int vampiric_drain(int pow, const dist &vmove)
return -1;
}
- if (mons_res_negative_energy( monster ))
+ if (mons_res_negative_energy(monster))
{
canned_msg(MSG_NOTHING_HAPPENS);
return -1;