summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-08 05:21:59 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-08 05:21:59 +0000
commite104efe7e42dbd793859761d7508f68f70bb1bca (patch)
tree9a97ec47f5ea8a81ca65d925b4faaad90690e98a /crawl-ref/source/spells2.cc
parent5c5f41caea2c309b8ff1cb72dab9fa6ec857a2d8 (diff)
downloadcrawl-ref-e104efe7e42dbd793859761d7508f68f70bb1bca.tar.gz
crawl-ref-e104efe7e42dbd793859761d7508f68f70bb1bca.zip
Move cast_summon_butterflies() to the right place.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5585 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc46
1 files changed, 23 insertions, 23 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index a04069c929..fb40b02738 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1466,6 +1466,29 @@ void summon_animals(int pow)
}
}
+bool cast_summon_butterflies(int pow, bool god_gift)
+{
+ bool success = false;
+
+ const int how_many = std::max(15, 4 + random2(3) + random2(pow) / 10);
+
+ for (int i = 0; i < how_many; ++i)
+ {
+ if (create_monster(
+ mgen_data(MONS_BUTTERFLY, BEH_FRIENDLY, 3,
+ you.pos(), you.pet_target,
+ god_gift ? MF_GOD_GIFT : 0)) != -1)
+ {
+ success = true;
+ }
+ }
+
+ if (!success)
+ canned_msg(MSG_NOTHING_HAPPENS);
+
+ return (success);
+}
+
//jmf: beefed up higher-level casting of this (formerly lame) spell
bool cast_summon_small_mammals(int pow, bool god_gift)
{
@@ -1522,29 +1545,6 @@ bool cast_summon_small_mammals(int pow, bool god_gift)
return (success);
}
-bool cast_summon_butterflies(int pow, bool god_gift)
-{
- bool success = false;
-
- const int how_many = std::max(15, 4 + random2(3) + random2(pow) / 10);
-
- for (int i = 0; i < how_many; ++i)
- {
- if (create_monster(
- mgen_data(MONS_BUTTERFLY, BEH_FRIENDLY, 3,
- you.pos(), you.pet_target,
- god_gift ? MF_GOD_GIFT : 0)) != -1)
- {
- success = true;
- }
- }
-
- if (!success)
- canned_msg(MSG_NOTHING_HAPPENS);
-
- return (success);
-}
-
bool cast_summon_scorpions(int pow, bool god_gift)
{
bool success = false;