summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-15 18:39:46 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-15 18:39:46 +0000
commitd6e2f77b10192e765011097444a5abef03421eb5 (patch)
treef5a06d0da56e3ff0f1cd9f401f7c99cba8254abf /crawl-ref/source/effects.cc
parent5d779389acb04736973b634302dab6592b49d53d (diff)
downloadcrawl-ref-d6e2f77b10192e765011097444a5abef03421eb5.tar.gz
crawl-ref-d6e2f77b10192e765011097444a5abef03421eb5.zip
Add yet more miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5855 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 594d71a460..066a1fba06 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -2502,7 +2502,7 @@ void handle_time(long time_delta)
// we take off about .5 points per turn
if (!you.duration[DUR_INVIS] && !you.duration[DUR_HASTE] && coinflip())
- added_contamination -= 1;
+ added_contamination--;
// only punish if contamination caused by mutagenic randarts
// (haste and invisibility already penalized earlier)
@@ -2536,10 +2536,9 @@ void handle_time(long time_delta)
// the magical contamination has a harder time dissipating
// through non-living flesh. :-)
boom.damage =
- dice_def( 3,
- you.magic_contamination
- * (you.is_undead? 4 : 2)
- / 4 );
+ dice_def(3,
+ you.magic_contamination
+ * (you.is_undead ? 4 : 2) / 4);
boom.thrower = KILL_MISC;
boom.aux_source = "a magical explosion";
boom.beam_source = NON_MONSTER;
@@ -2549,9 +2548,7 @@ void handle_time(long time_delta)
boom.name = "magical storm";
boom.ench_power = (you.magic_contamination * 5);
- boom.ex_size = (you.magic_contamination / 15);
- if (boom.ex_size > 9)
- boom.ex_size = 9;
+ boom.ex_size = std::min(9, you.magic_contamination / 15);
explosion(boom);
}
@@ -2565,7 +2562,7 @@ void handle_time(long time_delta)
// we're meaner now, what with explosions and whatnot, but
// we dial down the contamination a little faster if its actually
// mutating you. -- GDL
- contaminate_player( -(random2(you.magic_contamination / 4) + 1) );
+ contaminate_player(-(random2(you.magic_contamination / 4) + 1));
}
}
@@ -2644,7 +2641,7 @@ void handle_time(long time_delta)
handle_god_time();
if (player_mutation_level(MUT_SCREAM)
- && (random2(100) <= 2 + player_mutation_level(MUT_SCREAM) * 3) )
+ && (random2(100) <= 2 + player_mutation_level(MUT_SCREAM) * 3))
{
yell(true);
}