diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-09 18:22:35 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-09 18:22:35 +0000 |
commit | c1bcbec614c07a816debe3a6e1a67baeb84712e0 (patch) | |
tree | 763edba3e6f39426f088fced6df0263852c41262 /crawl-ref/source/spells2.cc | |
parent | 2ee0afe954a7c72856fd5f0f7d3080012638bb98 (diff) | |
download | crawl-ref-c1bcbec614c07a816debe3a6e1a67baeb84712e0.tar.gz crawl-ref-c1bcbec614c07a816debe3a6e1a67baeb84712e0.zip |
Consolidate the (single) spatial vortex-summoning routines, and add more
minor cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5667 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r-- | crawl-ref/source/spells2.cc | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 205683c47c..3a0bffba35 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -971,8 +971,20 @@ char burn_freeze(int pow, beam_type flavour) return 1; } -void summon_animals(int pow) +bool summon_spatial_vortex(bool god_gift) { + mpr("Space twists in upon itself!"); + + return (create_monster( + mgen_data(MONS_SPATIAL_VORTEX, BEH_HOSTILE, + 3, you.pos(), + MHITYOU, (god_gift ? MG_GOD_GIFT : 0))) != -1); +} + +bool summon_animals(int pow) +{ + bool success = false; + // Maybe we should just generate a Lair monster instead (and // guarantee that it is mobile)? const monster_type animals[] = { @@ -1010,12 +1022,17 @@ void summon_animals(int pow) const bool friendly = (random2(pow) > 4); - create_monster( - mgen_data(mon, - friendly ? BEH_FRIENDLY : BEH_HOSTILE, - 4, you.pos(), - friendly ? you.pet_target : MHITYOU)); + if (create_monster( + mgen_data(mon, + friendly ? BEH_FRIENDLY : BEH_HOSTILE, + 4, you.pos(), + friendly ? you.pet_target : MHITYOU)) != -1) + { + success = true; + } } + + return (success); } bool cast_summon_butterflies(int pow, bool god_gift) |