diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-03 06:37:43 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-03 06:37:43 +0000 |
commit | a59ecb47aaf7a31776f383446c9b5f2788f42d98 (patch) | |
tree | 11dbb488dfc35980c1bccf9314c8ec65b69e1965 /crawl-ref/source/monplace.h | |
parent | 55e422bf9dcda3c8515848e84e079da6dc9a9ad9 (diff) | |
download | crawl-ref-a59ecb47aaf7a31776f383446c9b5f2788f42d98.tar.gz crawl-ref-a59ecb47aaf7a31776f383446c9b5f2788f42d98.zip |
Expand the setting of spell_type in mgen_data to include all
monster-creating spells, and avoid assertion failures caused by setting
an abjuration duration of 0 and a spell_type to something other than 0.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8162 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.h')
-rw-r--r-- | crawl-ref/source/monplace.h | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/crawl-ref/source/monplace.h b/crawl-ref/source/monplace.h index 6e51f386aa..2ac22d950d 100644 --- a/crawl-ref/source/monplace.h +++ b/crawl-ref/source/monplace.h @@ -182,28 +182,7 @@ struct mgen_data mgen_data(monster_type mt = RANDOM_MONSTER, beh_type beh = BEH_HOSTILE, int abj = 0, - 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(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, + int st = 0, const coord_def &p = coord_def(-1, -1), unsigned short mfoe = MHITNOT, unsigned monflags = 0, @@ -237,7 +216,7 @@ struct mgen_data const coord_def &where, unsigned flags = 0) { - return mgen_data(what, BEH_SLEEP, 0, where, MHITNOT, flags); + return mgen_data(what, BEH_SLEEP, 0, 0, where, MHITNOT, flags); } static mgen_data hostile_at(monster_type what, |