summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.h
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-08 06:11:34 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-08 06:11:34 +0000
commit0a035731a014657ed31f567eb854033a1a62f0e4 (patch)
treea11451152c40e2f48966b6b1d3ea1114b2773321 /crawl-ref/source/monplace.h
parent5dc8d3bb786e86a7c4460f29277ef50468e3c9f8 (diff)
downloadcrawl-ref-0a035731a014657ed31f567eb854033a1a62f0e4.tar.gz
crawl-ref-0a035731a014657ed31f567eb854033a1a62f0e4.zip
Added BEAM_CHAOS and changed chaos launchers/ammo to use that. Currently only
chooses a different, random beam flavour (which undoudtedly needs to have their relative weights changed after playtesting) for each square it passes through, but in the future it might do things like bounce off walls at weird angles or animate weapons left laying on the ground. Added CLOUD_CHAOS, though it doesn't do anything yet. Monsters which are marked summoned or otherwise given ENCH_ABJ can also be marked with the type of summoning that happened, which is stored in the until-now-unused ENCH_SUMMON. This is useful for figuring out if a monster has ENCH_ABJ but isn't really summoned (like fire vortices created by Fire Storm or dancing weapons created by Tukima's Dance) so that they won't be affected by abjuration. It's also currently used to do a different "dissapears in a puff of smoke" messages for summoned monsters based on the summoning type, so that monsters summoned by Shadow Creature "dissolve into shadows" and don't leave behind any clouds, and temporary god gift monsters from good gods "dissolve into sparkling lights". In the future it might be used to do temporarily animated corpses, which turn back into a corpse when killed or when the animation runs out. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7778 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.h')
-rw-r--r--crawl-ref/source/monplace.h37
1 files changed, 33 insertions, 4 deletions
diff --git a/crawl-ref/source/monplace.h b/crawl-ref/source/monplace.h
index 4ddd2d1a21..2b4529e59f 100644
--- a/crawl-ref/source/monplace.h
+++ b/crawl-ref/source/monplace.h
@@ -127,6 +127,11 @@ struct mgen_data
// that aren't summoned.
int abjuration_duration;
+ // For summoned monsters this is their type of summoning, either the
+ // spell which summoned them or one of the values of the enumeration
+ // mon_summon_type in mon-util.h
+ int summon_type;
+
// Where the monster will be created.
coord_def pos;
@@ -189,10 +194,33 @@ struct mgen_data
level_area_type ltype = you.level_type)
: cls(mt), base_type(base), behaviour(beh),
- abjuration_duration(abj), pos(p), foe(mfoe), flags(monflags),
- god(which_god), number(monnumber), colour(moncolour),
+ abjuration_duration(abj), summon_type(0), pos(p), foe(mfoe),
+ flags(monflags), god(which_god), number(monnumber), colour(moncolour),
+ power(monpower), proximity(prox), level_type(ltype), map_mask(0)
+ {
+ }
+
+ mgen_data(monster_type mt,
+ beh_type beh,
+ int abj,
+ int st,
+ const coord_def &p = coord_def(-1, -1),
+ unsigned short mfoe = MHITNOT,
+ unsigned monflags = 0,
+ god_type which_god = GOD_NO_GOD,
+ monster_type base = MONS_PROGRAM_BUG,
+ int monnumber = 0,
+ int moncolour = BLACK,
+ int monpower = you.your_level,
+ proximity_type prox = PROX_ANYWHERE,
+ level_area_type ltype = you.level_type)
+
+ : cls(mt), base_type(base), behaviour(beh),
+ abjuration_duration(abj), summon_type(st), pos(p), foe(mfoe),
+ flags(monflags), god(which_god), number(monnumber), colour(moncolour),
power(monpower), proximity(prox), level_type(ltype), map_mask(0)
{
+ ASSERT(summon_type == 0 || (abj >= 1 && abj <= 6));
}
bool permit_bands() const { return (flags & MG_PERMIT_BANDS); }
@@ -217,9 +245,10 @@ struct mgen_data
int abj_deg = 0,
unsigned flags = 0,
bool alert = false,
- god_type god = GOD_NO_GOD)
+ god_type god = GOD_NO_GOD,
+ int summon_type = 0)
{
- return mgen_data(what, BEH_HOSTILE, abj_deg, where,
+ return mgen_data(what, BEH_HOSTILE, abj_deg, summon_type, where,
alert ? MHITYOU : MHITNOT,
flags, god);
}