summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-23 16:53:11 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-23 16:53:11 +0000
commit4bfb1777f3ec7619767801d5cfb3abf67a1032ba (patch)
treed63a5d9487fdb6c9d025b7416ffc46b0be6c73dc /crawl-ref
parent933b0c361d7ee4914b89e725a8886abb5f5e9d2c (diff)
downloadcrawl-ref-4bfb1777f3ec7619767801d5cfb3abf67a1032ba.tar.gz
crawl-ref-4bfb1777f3ec7619767801d5cfb3abf67a1032ba.zip
[1815754] Mutagenic randarts are less mutagenic.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2521 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/items.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index c2988051f0..ddcb527f8e 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2530,12 +2530,24 @@ void handle_time( long time_delta )
if (you.duration[DUR_INVIS] && random2(10) < 6)
added_contamination++;
- if (you.duration[DUR_HASTE] && !you.duration[DUR_BERSERKER] && random2(10) < 6)
+ if (you.duration[DUR_HASTE] && !you.duration[DUR_BERSERKER]
+ && random2(10) < 6)
+ {
added_contamination++;
+ }
- // randarts are usually about 20x worse than running around invisible
- // or hasted.. this seems OK.
- added_contamination += random2(1 + scan_randarts(RAP_MUTAGENIC));
+ if (const int randart_glow = scan_randarts(RAP_MUTAGENIC))
+ {
+ // Reduced randart glow. Note that one randart will contribute
+ // 2 - 5 units of glow to randart_glow. A randart with a mutagen
+ // index of 2 does about 0.58 points of contamination per turn.
+ // A randart with a mutagen index of 5 does about 0.7 points of
+ // contamination per turn.
+
+ const int mean_glow = 500 + randart_glow * 40;
+ const int actual_glow = mean_glow / 2 + random2(mean_glow);
+ added_contamination += div_rand_round(actual_glow, 1000);
+ }
// we take off about .5 points per turn
if (!you.duration[DUR_INVIS] && !you.duration[DUR_HASTE] && coinflip())