diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-09-25 10:27:43 -0500 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-09-25 10:27:43 -0500 |
commit | 2b42ba608882155fc6c306ab57a4e6a4c2823aa0 (patch) | |
tree | a0511dff7e0fe2907e678f4207e32d12df1e2a81 /crawl-ref/source/mgrow.cc | |
parent | 58eff259a0f37495f45b2d14d6d916c054c3cfb1 (diff) | |
download | crawl-ref-2b42ba608882155fc6c306ab57a4e6a4c2823aa0.tar.gz crawl-ref-2b42ba608882155fc6c306ab57a4e6a4c2823aa0.zip |
Don't allow no-XP monsters to gain experience, so that kraken tentacles
can't go up in levels. (Plants and fungi are already covered.)
Diffstat (limited to 'crawl-ref/source/mgrow.cc')
-rw-r--r-- | crawl-ref/source/mgrow.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/mgrow.cc b/crawl-ref/source/mgrow.cc index e2a2548c8a..eb79932e05 100644 --- a/crawl-ref/source/mgrow.cc +++ b/crawl-ref/source/mgrow.cc @@ -210,6 +210,10 @@ bool monsters::gain_exp(int exp) if (holiness() != MH_NATURAL) return (false); + // Only monsters that you can gain XP from can level-up. + if (mons_class_flag(type, M_NO_EXP_GAIN)) + return (false); + // Avoid wrap-around. if (experience + exp < experience) return (false); |