summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mgen_data.h
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2011-04-17 11:32:44 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2011-04-17 11:32:44 +1000
commit387052d2f793affc4d1f819c57a887863a0b6dac (patch)
tree01c7d6778f33c2d2dddfe9cef625d77df5ca84db /crawl-ref/source/mgen_data.h
parentfb7832e8402e54c80a543c851b0167231f62d8a6 (diff)
downloadcrawl-ref-387052d2f793affc4d1f819c57a887863a0b6dac.tar.gz
crawl-ref-387052d2f793affc4d1f819c57a887863a0b6dac.zip
Allow setting of shapeshifter initial form via monster spec (#3818)
It's a bit difficult to get a shapeshifter as an unseen horror without trial and error, so I added this in to allow you to place "shapeshifter shifter:unseen_horror" to get an unseen horror-flavoured shapeshifter! It's possible code for this already exists but I couldn't find any.
Diffstat (limited to 'crawl-ref/source/mgen_data.h')
-rw-r--r--crawl-ref/source/mgen_data.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/crawl-ref/source/mgen_data.h b/crawl-ref/source/mgen_data.h
index f24b70f213..5cc92aaf64 100644
--- a/crawl-ref/source/mgen_data.h
+++ b/crawl-ref/source/mgen_data.h
@@ -97,7 +97,6 @@ struct mgen_data
// be available (vault metadata is not preserved across game saves).
unsigned map_mask;
- // XXX: Also rather hackish.
int hd;
int hp;
@@ -105,13 +104,15 @@ struct mgen_data
// These flags are MF_XXX, rather than MG_XXX flags.
uint64_t extra_flags;
- // XXX: Rather hackish.
std::string mname;
// This is used to account for non-actor summoners. Blasted by an Ice
// Fiend ... summoned by the effects of Hell.
std::string non_actor_summoner;
+ // This simply stores the initial shape-shifter type.
+ monster_type initial_shifter;
+
// This can eventually be used to store relevant information.
CrawlHashTable props;
@@ -133,7 +134,8 @@ struct mgen_data
int mhd = 0, int mhp = 0,
uint64_t extflags = 0,
std::string monname = "",
- std::string nas = "")
+ std::string nas = "",
+ monster_type is = RANDOM_MONSTER)
: cls(mt), base_type(base), behaviour(beh), summoner(sner),
abjuration_duration(abj), summon_type(st), pos(p),
@@ -141,7 +143,7 @@ struct mgen_data
god(which_god), number(monnumber), colour(moncolour),
power(monpower), proximity(prox), level_type(ltype), map_mask(0),
hd(mhd), hp(mhp), extra_flags(extflags), mname(monname),
- non_actor_summoner(nas), props()
+ non_actor_summoner(nas), initial_shifter(is), props()
{
ASSERT(summon_type == 0 || (abj >= 1 && abj <= 6)
|| mt == MONS_BALL_LIGHTNING || mt == MONS_ORB_OF_DESTRUCTION
@@ -180,7 +182,8 @@ struct mgen_data
return mgen_data(mt, BEH_HOSTILE, 0, abj, st, p,
alert ? MHITYOU : MHITNOT,
genflags, ngod, base, 0, BLACK, you.absdepth0,
- PROX_ANYWHERE, you.level_type, 0, 0, 0, "", nsummoner);
+ PROX_ANYWHERE, you.level_type, 0, 0, 0, "", nsummoner,
+ RANDOM_MONSTER);
}
};