summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-12-15 17:33:52 -0600
committerJesse Luehrs <doy@tozt.net>2009-12-16 00:14:40 -0600
commit5d66ced3af630a94100a50f71224f6c7d1b2ef83 (patch)
treefb6c6ebe98af2cf506877d85026a15d606b3321f /crawl-ref/source/player.cc
parenteb57a1698ab651071a136b82ffee4f3e1f7bc073 (diff)
downloadcrawl-ref-5d66ced3af630a94100a50f71224f6c7d1b2ef83.tar.gz
crawl-ref-5d66ced3af630a94100a50f71224f6c7d1b2ef83.zip
Revert "Remove hard skill pool cutoff."
This reverts commit c652cbec1739a628f87aedc4874c782429f8d7ce. This really needs more discussion; the current implementation isn't reallly reasonable
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc30
1 files changed, 8 insertions, 22 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 7975d102f0..b74219279a 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2494,21 +2494,6 @@ void forget_map(unsigned char chance_forgotten, bool force)
#endif
}
-int player::exp_pool_cutoff() const
-{
- int total = std::max(total_skill_points, skill_cost_needed(2));
- // total = std::min(total, skill_cost_needed(27));
- return (total / 3);
-}
-
-void player::step_down_exp_pool()
-{
- int cutoff = you.exp_pool_cutoff();
- int step = cutoff/4;
- you.exp_available = stepdown_value(you.exp_available,
- cutoff, step, 3*step, 4*step);
-}
-
void gain_exp( unsigned int exp_gained, unsigned int* actual_gain,
unsigned int* actual_avail_gain)
{
@@ -2521,6 +2506,10 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain,
const unsigned long old_exp = you.experience;
const int old_avail = you.exp_available;
+#if DEBUG_DIAGNOSTICS
+ mprf(MSGCH_DIAGNOSTICS, "gain_exp: %d", exp_gained );
+#endif
+
if (you.experience + exp_gained > MAX_EXP_TOTAL)
you.experience = MAX_EXP_TOTAL;
else
@@ -2536,13 +2525,10 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain,
exp_gained /= 2;
}
- you.exp_available += exp_gained;
- you.step_down_exp_pool();
-
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "gain_exp: %d of %d",
- you.exp_available - old_avail, exp_gained);
-#endif
+ if (you.exp_available + exp_gained > MAX_EXP_POOL)
+ you.exp_available = MAX_EXP_POOL;
+ else
+ you.exp_available += exp_gained;
level_change();