diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-08 22:05:53 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-08 22:05:53 +0000 |
commit | d6f431bb5de6afdcbb2c80b9c238837e52fa2cb5 (patch) | |
tree | 723b77f90169e691db36b55f0669990c64c5f853 /crawl-ref | |
parent | 1369c022c2e037a3b78eb7f10f2f3df524370df3 (diff) | |
download | crawl-ref-d6f431bb5de6afdcbb2c80b9c238837e52fa2cb5.tar.gz crawl-ref-d6f431bb5de6afdcbb2c80b9c238837e52fa2cb5.zip |
Move summon_demon_type() to spells3.cc as well.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5613 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/spells2.cc | 28 | ||||
-rw-r--r-- | crawl-ref/source/spells2.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/spells3.cc | 28 | ||||
-rw-r--r-- | crawl-ref/source/spells3.h | 1 |
4 files changed, 29 insertions, 29 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 987de531da..6e991ea386 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -2102,34 +2102,6 @@ bool cast_tukimas_dance(int pow, bool god_gift, return (true); } -// Makhleb or Kikubaaqudgha sends a demonic buddy (or enemy) for a -// follower. -bool summon_demon_type(monster_type mon, int pow, bool god_gift) -{ - bool success = false; - - const int dur = std::min(2 + (random2(pow) / 4), 6); - - const bool friendly = (random2(pow) > 3); - - if (create_monster( - mgen_data(mon, - friendly ? BEH_FRIENDLY : BEH_HOSTILE, - dur, you.pos(), - friendly ? you.pet_target : MHITYOU, - god_gift ? MF_GOD_GIFT : 0)) != -1) - { - success = true; - - mprf("A demon appears!%s", - friendly ? "" : " It doesn't look very happy."); - } - else - canned_msg(MSG_NOTHING_HAPPENS); - - return (success); -} - // Trog sends a fighting buddy (or enemy) for a follower. bool summon_berserker(int pow, bool god_gift, bool force_hostile) { diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h index e321d911eb..068378a2a5 100644 --- a/crawl-ref/source/spells2.h +++ b/crawl-ref/source/spells2.h @@ -159,7 +159,6 @@ bool cast_tukimas_dance(int pow, bool god_gift = false, /* *********************************************************************** * called from: ability - spell * *********************************************************************** */ -bool summon_demon_type(monster_type mon, int pow, bool god_gift = false); bool summon_berserker(int pow, bool god_gift = false, bool force_hostile = false); bool summon_guardian(int pow, bool god_gift = false); diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index ead8d17a10..415f38f39c 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -532,6 +532,34 @@ bool cast_summon_greater_demon(int pow, bool god_gift) return (success); } +// Makhleb or Kikubaaqudgha sends a demonic buddy (or enemy) for a +// follower. +bool summon_demon_type(monster_type mon, int pow, bool god_gift) +{ + bool success = false; + + const int dur = std::min(2 + (random2(pow) / 4), 6); + + const bool friendly = (random2(pow) > 3); + + if (create_monster( + mgen_data(mon, + friendly ? BEH_FRIENDLY : BEH_HOSTILE, + dur, you.pos(), + friendly ? you.pet_target : MHITYOU, + god_gift ? MF_GOD_GIFT : 0)) != -1) + { + success = true; + + mprf("A demon appears!%s", + friendly ? "" : " It doesn't look very happy."); + } + else + canned_msg(MSG_NOTHING_HAPPENS); + + return (success); +} + bool cast_summon_horrible_things(int pow, bool god_gift) { if (one_chance_in(3) diff --git a/crawl-ref/source/spells3.h b/crawl-ref/source/spells3.h index fc32f03151..3b6456a443 100644 --- a/crawl-ref/source/spells3.h +++ b/crawl-ref/source/spells3.h @@ -116,6 +116,7 @@ bool cast_call_imp(int pow, bool god_gift = false); bool summon_lesser_demon(int pow, bool god_gift = false); bool summon_common_demon(int pow, bool god_gift = false); bool summon_greater_demon(int pow, bool god_gift = false); +bool summon_demon_type(monster_type mon, int pow, bool god_gift = false); bool cast_summon_demon(int pow, bool god_gift = false); bool cast_demonic_horde(int pow, bool god_gift = false); bool cast_summon_greater_demon(int pow, bool god_gift = false); |