summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-20 06:51:47 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-20 06:51:47 +0000
commitefb6b63c27fab83612572f7ebba318f40886e1d7 (patch)
tree1a7de5a7cf347611d2de35e2af168259ce7a2ae6 /crawl-ref/source
parentc2a18ff7903205165e6eab5c619a25e6cd2216cd (diff)
downloadcrawl-ref-efb6b63c27fab83612572f7ebba318f40886e1d7.tar.gz
crawl-ref-efb6b63c27fab83612572f7ebba318f40886e1d7.zip
Robes of the archmagi reduce experience gain to 0.25 normal, instead of
the old 0.05. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1606 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/player.cc8
-rw-r--r--crawl-ref/source/stuff.cc10
2 files changed, 3 insertions, 15 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index aa5098b3ff..598aa55dc0 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2215,12 +2215,8 @@ void forget_map(unsigned char chance_forgotten)
void gain_exp( unsigned int exp_gained )
{
-
- if (player_equip_ego_type( EQ_BODY_ARMOUR, SPARM_ARCHMAGI )
- && !one_chance_in(20))
- {
- return;
- }
+ if (player_equip_ego_type( EQ_BODY_ARMOUR, SPARM_ARCHMAGI ))
+ exp_gained = div_rand_round( exp_gained, 4 );
#if DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS, "gain_exp: %d", exp_gained );
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index c40d737fd9..8f31c89f07 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -508,18 +508,10 @@ int div_rand_round( int num, int den )
return (num / den + (random2(den) < num % den));
}
-// I got so tired of seeing: ".. && random2(foo) == 0 && .." in the code
-// that I broke down and wrote this little -- very little -- function.
-// anyway, I think improving the readability of the code offsets whatever
-// overhead the additional (intermediary) function call added to Crawl -
-// we'll just make it up by tightening code elsewhere, right guys?
-// [use with == and != only .. never directly with comparisons or math]
-// -- 14jan2000 {dlb}
bool one_chance_in(int a_million)
{
return (random2(a_million) == 0);
-} // end one_chance_in() - that's it? :P {dlb}
-
+}
// simple little function to quickly modify all three stats
// at once - does check for '0' modifiers to prevent needless