summaryrefslogtreecommitdiff
path: root/src/mimic.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:58 +0100
committerBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:58 +0100
commit9670b948b8d1974ae3ec8212eec1773908c345c5 (patch)
tree1a85630b08d072dded8104edc7debb7b073a343a /src/mimic.cc
parente9d57ecb0090655ec46a780dc450bc170abd9068 (diff)
Move mimic.cc function delcarations into separate header
Diffstat (limited to 'src/mimic.cc')
-rw-r--r--src/mimic.cc30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/mimic.cc b/src/mimic.cc
index 90c8a62a..873ff55a 100644
--- a/src/mimic.cc
+++ b/src/mimic.cc
@@ -1,6 +1,32 @@
-#include "angband.h"
+#include "mimic.hpp"
#include <assert.h>
+/**
+ * Mimicry forms
+ */
+typedef struct mimic_duration_type mimic_duration_type;
+struct mimic_duration_type
+{
+ s16b min;
+ s16b max;
+};
+
+typedef struct mimic_form_type mimic_form_type;
+struct mimic_form_type
+{
+ int modules[3]; /* Modules where this mimicry form is available; terminated with a -1 entry */
+ cptr name; /* Name of mimicry form */
+ cptr obj_name; /* Object mimicry form name */
+ cptr desc; /* Description */
+ cptr realm; /* Realm of mimicry */
+ bool_ limit; /* If true, the form is not available except through special means */
+ byte level;
+ byte rarity;
+ mimic_duration_type duration;
+ s32b (*calc)(); /* Callback to calculate bonuses; return number of blows to add */
+ void (*power)(); /* Callback to calculate powers */
+};
+
static s32b abomination_calc()
{
apply_flags(TR1_SPEED + TR1_STR + TR1_INT + TR1_WIS + TR1_DEX + TR1_CON + TR1_CHR, 0, 0, 0, 0, 0, -10, 0, 0, 0, 0);
@@ -371,7 +397,7 @@ static s32b fire_elemental_calc()
/*
* Mimicry forms
*/
-mimic_form_type mimic_forms[MIMIC_FORMS_MAX] =
+static mimic_form_type mimic_forms[MIMIC_FORMS_MAX] =
{
{ /* 0 */
{ MODULE_TOME, MODULE_THEME, -1 },