summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-03 22:07:11 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-03 22:07:11 +0000
commit19283b0b952522d1d019f22fcbd35294c13c235c (patch)
treeb3218c8154e017f930b11303b30f4ac5652904ff /crawl-ref/source/effects.cc
parenta32a2ae31db4aca7df3ea969b0c1ef456c0ba159 (diff)
downloadcrawl-ref-19283b0b952522d1d019f22fcbd35294c13c235c.tar.gz
crawl-ref-19283b0b952522d1d019f22fcbd35294c13c235c.zip
Fix 2008767: "random" not working for book choice option
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6375 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index eee963659e..9c9d58be54 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -2527,7 +2527,7 @@ void handle_time(long time_delta)
"energies until Zin's power calms it.", MSGCH_GOD);
}
else if (you.magic_contamination >= 5
- && random2(25) <= you.magic_contamination)
+ && random2(25) <= you.magic_contamination)
{
mpr("Your body shudders with the violent release "
"of wild energies!", MSGCH_WARN);
@@ -2544,10 +2544,8 @@ void handle_time(long time_delta)
// Undead enjoy extra contamination explosion damage because
// 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);
+ boom.damage = 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;
@@ -2661,7 +2659,7 @@ void handle_time(long time_delta)
_rot_inventory_food(time_delta);
- // exercise armour *xor* stealth skill: {dlb}
+ // Exercise armour *xor* stealth skill: {dlb}
if (!player_light_armour(true))
{
// lowered random roll from 7 to 6 -- bwross
@@ -2671,11 +2669,11 @@ void handle_time(long time_delta)
exercise(SK_ARMOUR, 1);
}
}
- // exercise stealth skill:
+ // Exercise stealth skill:
else if (you.burden_state == BS_UNENCUMBERED
&& !you.duration[DUR_BERSERKER] && you.special_wield != SPWLD_SHADOW)
{
- // diminishing returns for stealth training by waiting
+ // Diminishing returns for stealth training by waiting.
if ((you.equip[EQ_BODY_ARMOUR] == -1
|| you.equip[EQ_BODY_ARMOUR] != -1
&& random2(item_mass(you.inv[you.equip[EQ_BODY_ARMOUR]])) < 100)