summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/skills.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-21 23:36:54 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-22 20:36:05 +0100
commit2fc79a6d0d709878025fa1f06cf2a5344098f333 (patch)
treeffd97f7279c9a34b5d6d0e776c1facf4dc1307c9 /crawl-ref/source/skills.cc
parentc652cbec1739a628f87aedc4874c782429f8d7ce (diff)
downloadcrawl-ref-2fc79a6d0d709878025fa1f06cf2a5344098f333.tar.gz
crawl-ref-2fc79a6d0d709878025fa1f06cf2a5344098f333.zip
Deny skill exercise if not enough available xp (mesilliac).
Patch 1744207. Should be easy enough to revert if it doesn't work out, and seems quite independent from other 0.6 changes. From the request: After a while of playing i found that available xp for exercising skills decreases to zero quickly after gaining it. It means most skills don't get excercised unless you usually use them right after fighting. I hacked my version to randomly deny a skill exercise if you don't have much available xp. The chance is available xp / total xp needed this level. Seems to work well - skills are getting exercised more evenly and it finds its own equilibrium. You can still do something repeatedly to practice its skill, just you don't have to do it immediately after killing a powerful monster.
Diffstat (limited to 'crawl-ref/source/skills.cc')
-rw-r--r--crawl-ref/source/skills.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc
index d39635531a..66d6adb6c2 100644
--- a/crawl-ref/source/skills.cc
+++ b/crawl-ref/source/skills.cc
@@ -150,6 +150,13 @@ int exercise(int exsk, int deg)
if (you.exp_available <= 0 || you.skills[exsk] >= 27)
break;
+ // randomly deny skill excercise if not many points available
+ if (random2(you.exp_pool_cutoff()/10) >= you.exp_available)
+ {
+ deg--;
+ continue;
+ }
+
if (you.practise_skill[exsk] || one_chance_in(4))
ret += _exercise2( exsk );