summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/skills.cc
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2012-08-21 16:29:13 +0200
committerRaphael Langella <raphael.langella@gmail.com>2012-08-21 16:29:13 +0200
commite18259c34b09138cb05bf5451d0356b98103046c (patch)
tree07055b6867470eaadd56a6c889d3cc547391fe90 /crawl-ref/source/skills.cc
parent06d33846c1c3cb84b68cdb4e644c558c9b898303 (diff)
downloadcrawl-ref-e18259c34b09138cb05bf5451d0356b98103046c.tar.gz
crawl-ref-e18259c34b09138cb05bf5451d0356b98103046c.zip
Don't touch maxHP and maxMP when simulating gaining skills (#5979).
On top of getting negative rot, you could also scum for free maxMP by toggling spellcasting on/off.
Diffstat (limited to 'crawl-ref/source/skills.cc')
-rw-r--r--crawl-ref/source/skills.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc
index 3d7ae1e122..dcba9ea828 100644
--- a/crawl-ref/source/skills.cc
+++ b/crawl-ref/source/skills.cc
@@ -998,7 +998,9 @@ static int _train(skill_type exsk, int &max_exp, bool simu)
you.total_experience += cost;
max_exp -= cost;
- redraw_skill(exsk, old_best_skill);
+ if (!simu)
+ redraw_skill(exsk, old_best_skill);
+
check_skill_cost_change();
ASSERT(you.exp_available >= 0);
ASSERT(max_exp >= 0);