summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-miscast.cc
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2013-08-16 23:12:28 +0200
committerRaphael Langella <raphael.langella@gmail.com>2013-08-16 23:19:42 +0200
commitc56f7848c24e60f938bec429afc467bfb06599a6 (patch)
treebb5ac33403f5c584554b7f0dcf61d792e3970fc1 /crawl-ref/source/spl-miscast.cc
parentbdd80194b71b95e59c46d35c8bc371a5d616d8c0 (diff)
downloadcrawl-ref-c56f7848c24e60f938bec429afc467bfb06599a6.tar.gz
crawl-ref-c56f7848c24e60f938bec429afc467bfb06599a6.zip
Use a finer scale for magic contamination.
It's now updated every turn instead of every 20 turns and it's almost deterministic (only the time scaling use randomized rounding). The bad effects still happen every 20 turns though (just like hell effects and other stuff). It has been scaled by 1000. I tried with 100, but I still had some significant rounding issues, especially with scaling to time_taken. It shouldn't be possible anymore to gain yellow glow from a single cast of invisibility even at max power. Although, in theory, it has a slight chance of putting you just 1 point short of yellow (4999).
Diffstat (limited to 'crawl-ref/source/spl-miscast.cc')
-rw-r--r--crawl-ref/source/spl-miscast.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/spl-miscast.cc b/crawl-ref/source/spl-miscast.cc
index baf9f58311..a6b2a1e011 100644
--- a/crawl-ref/source/spl-miscast.cc
+++ b/crawl-ref/source/spl-miscast.cc
@@ -1053,7 +1053,7 @@ void MiscastEffect::_enchantment(int severity)
_potion_effect(POT_CONFUSION, 10);
break;
case 2:
- contaminate_player(random2avg(19, 3), spell != SPELL_NO_SPELL);
+ contaminate_player(random2avg(18000, 3), spell != SPELL_NO_SPELL);
break;
case 3:
do
@@ -1236,7 +1236,7 @@ void MiscastEffect::_translocation(int severity)
goto reroll_3;
break;
case 3:
- contaminate_player(random2avg(19, 3), spell != SPELL_NO_SPELL);
+ contaminate_player(random2avg(18000, 3), spell != SPELL_NO_SPELL);
break;
}
break;
@@ -1961,7 +1961,7 @@ void MiscastEffect::_transmutation(int severity)
_potion_effect(POT_CONFUSION, 10);
break;
case 4:
- contaminate_player(random2avg(19, 3), spell != SPELL_NO_SPELL);
+ contaminate_player(random2avg(18000, 3), spell != SPELL_NO_SPELL);
break;
}
break;
@@ -1979,7 +1979,7 @@ void MiscastEffect::_transmutation(int severity)
if (_ouch(3 + random2avg(18, 2)) && target->alive())
if (target->is_player())
{
- contaminate_player(random2avg(35, 3),
+ contaminate_player(random2avg(34000, 3),
spell != SPELL_NO_SPELL, false);
}
else
@@ -3043,7 +3043,7 @@ void MiscastEffect::_zot()
break;
case 9:
if (target->is_player())
- contaminate_player(2 + random2avg(14, 2), false);
+ contaminate_player(2000 + random2avg(13000, 2), false);
else
target->polymorph(0);
break;