summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-grow.h
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-13 17:21:29 +0300
committerVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-13 17:26:12 +0300
commit715680dd8c38e6829166d955a5fd2ff3a495346c (patch)
tree84e5d616891b8be3a6f272978174d3650df9bb9f /crawl-ref/source/mon-grow.h
parent020f721eb9ba64eae87b03d584e70c1a159ddba6 (diff)
downloadcrawl-ref-715680dd8c38e6829166d955a5fd2ff3a495346c.tar.gz
crawl-ref-715680dd8c38e6829166d955a5fd2ff3a495346c.zip
Rename mgrow to mon-grow.
Diffstat (limited to 'crawl-ref/source/mon-grow.h')
-rw-r--r--crawl-ref/source/mon-grow.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-grow.h b/crawl-ref/source/mon-grow.h
new file mode 100644
index 0000000000..5201421019
--- /dev/null
+++ b/crawl-ref/source/mon-grow.h
@@ -0,0 +1,42 @@
+/*
+ * File: mon-grow.cc
+ * Summary: Monster level-up code.
+ * Written by: dshaligram on Fri Oct 26 08:33:37 2007 UTC
+ */
+
+#ifndef __MGROW_H__
+#define __MGROW_H__
+
+#include "fixvec.h"
+
+// Monster level-up data.
+
+struct monster_level_up
+{
+ monster_type before, after;
+ int chance; // Chance in 1000 of the monster growing up,
+ // defaults to 1000.
+
+ bool adjust_hp; // If hp post growing up is less than minimum, adjust it.
+
+ monster_level_up(monster_type _before, monster_type _after,
+ int _chance = 1000, bool _adjust = true)
+ : before(_before), after(_after), chance(_chance), adjust_hp(_adjust)
+ {
+ }
+};
+
+const int MAX_MONS_HD = 27;
+class mons_experience_levels
+{
+public:
+ mons_experience_levels();
+ unsigned operator [] (int xl) const
+ {
+ return mexp[xl];
+ }
+private:
+ FixedVector<unsigned, MAX_MONS_HD + 1> mexp;
+};
+
+#endif