summaryrefslogtreecommitdiff
path: root/src/monster_spell.hpp
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2020-05-23 00:33:19 -0700
committerManoj Srivastava <srivasta@debian.org>2020-05-23 00:33:19 -0700
commitd6b913d3ca2e84b75f3675fd6e9f5246c100cf27 (patch)
tree5fc28b7efc737bf2c79dc7d799e0a6013957fe11 /src/monster_spell.hpp
parentc42f029316c0c004a795ca170bdb50644a800534 (diff)
parent73a0259be1d44fdb2ab34266ae0ff63f0d8f0b60 (diff)
Merge branch 'master' into dgit/siddebian/2.4.0-ah-1archive/debian/2.4.0-ah-1
Diffstat (limited to 'src/monster_spell.hpp')
-rw-r--r--src/monster_spell.hpp91
1 files changed, 91 insertions, 0 deletions
diff --git a/src/monster_spell.hpp b/src/monster_spell.hpp
new file mode 100644
index 00000000..4dfaf974
--- /dev/null
+++ b/src/monster_spell.hpp
@@ -0,0 +1,91 @@
+#pragma once
+
+#include "monster_spell_flag_set.hpp"
+
+#include <vector>
+
+struct monster_spell {
+
+ /**
+ * The global index of the spell.
+ */
+ const std::size_t spell_idx;
+
+ /**
+ * Flag set representation of the spell.
+ */
+ const monster_spell_flag_set flag_set;
+
+ /**
+ * System name of the spell as a string.
+ */
+ const char *name;
+
+ /**
+ * Is the spell a summoning spell?
+ */
+ const bool is_summon;
+
+ /**
+ * Is the spell an "annoyance" spell?
+ */
+ const bool is_annoy;
+
+ /**
+ * Is the spell a direct damage spell?
+ */
+ const bool is_damage;
+
+ /**
+ * Is the spell a bolt spell, i.e. would it
+ * affect any creature along the trajectory from
+ * the source to its target?
+ */
+ const bool is_bolt;
+
+ /**
+ * Does the spell require an intelligent caster?
+ */
+ const bool is_smart;
+
+ /**
+ * Is the spell an innate attack? For example, breaths
+ * are innate attacks.
+ */
+ const bool is_innate;
+
+ /**
+ * Is the spell an escape spell?
+ */
+ const bool is_escape;
+
+ /**
+ * Is the spell a "tactical" spell?
+ */
+ const bool is_tactic;
+
+ /**
+ * Does the spell apply haste?
+ */
+ const bool is_haste;
+
+ /**
+ * Does the spell apply any healing?
+ */
+ const bool is_heal;
+
+ /**
+ * Is the spell "magical" in nature? Magical spells
+ * can be stopped by the anti-magic field, and non-magical
+ * ones cannot.
+ *
+ * This is the inverse of the "innate" flag.
+ */
+ const bool is_magic;
+
+};
+
+/**
+ * Get a vector of all the spells.
+ */
+std::vector<monster_spell const *> const &monster_spells();