From d6f431bb5de6afdcbb2c80b9c238837e52fa2cb5 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 8 Jun 2008 22:05:53 +0000 Subject: 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 --- crawl-ref/source/spells2.cc | 28 ---------------------------- crawl-ref/source/spells2.h | 1 - crawl-ref/source/spells3.cc | 28 ++++++++++++++++++++++++++++ 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); -- cgit v1.2.3-54-g00ecf