From efb6b63c27fab83612572f7ebba318f40886e1d7 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Wed, 20 Jun 2007 06:51:47 +0000 Subject: 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 --- crawl-ref/source/player.cc | 8 ++------ crawl-ref/source/stuff.cc | 10 +--------- 2 files changed, 3 insertions(+), 15 deletions(-) (limited to 'crawl-ref') 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 -- cgit v1.2.3-54-g00ecf