summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/spells2.cc23
-rw-r--r--crawl-ref/source/spells2.h1
-rw-r--r--crawl-ref/source/spl-cast.cc60
3 files changed, 52 insertions, 32 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 729a062cdd..7d1706aebe 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -971,29 +971,6 @@ char burn_freeze(int pow, beam_type flavour)
return 1;
}
-bool summon_spatial_vortices(int pow, bool god_gift)
-{
- bool success = false;
-
- mpr("Space twists in upon itself!");
-
- // Maximum power is 300 (5 vortices).
- const int how_many = (pow / 75 + 1);
-
- for (int i = 0; i < how_many; ++i)
- {
- if (create_monster(
- mgen_data(MONS_SPATIAL_VORTEX, BEH_HOSTILE,
- 3, you.pos(), MHITYOU,
- (god_gift ? MG_GOD_GIFT : 0) | MG_FORCE_BEH)) != -1)
- {
- success = true;
- }
- }
-
- return (success);
-}
-
bool summon_animals(int pow)
{
bool success = false;
diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h
index 6f3b4cdebf..61d7744072 100644
--- a/crawl-ref/source/spells2.h
+++ b/crawl-ref/source/spells2.h
@@ -152,7 +152,6 @@ bool summon_daeva(int pow, bool god_gift = false, bool quiet = false);
/* ***********************************************************************
* called from: spell
* *********************************************************************** */
-bool summon_spatial_vortices(int pow, bool god_gift = false);
bool summon_animals(int pow);
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 4d91bcd278..44d7ad56c4 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -2316,8 +2316,6 @@ static void _miscast_enchantment(int severity, const char* cause)
static void _miscast_translocation(int severity, const char* cause)
{
- const bool god_gift = crawl_state.is_god_acting();
-
switch (severity)
{
case 0: // harmless messages only
@@ -2372,7 +2370,14 @@ static void _miscast_translocation(int severity, const char* cause)
ouch(4 + random2avg(7, 2), 0, KILLED_BY_WILD_MAGIC, cause);
break;
case 5:
- summon_spatial_vortices(0, god_gift);
+ if (create_monster(
+ mgen_data::alert_hostile_at(MONS_SPATIAL_VORTEX,
+ you.pos(), 3)) != -1)
+ {
+ mpr("Space twists in upon itself!");
+ }
+ else
+ canned_msg(MSG_NOTHING_HAPPENS);
break;
}
break;
@@ -2399,9 +2404,25 @@ static void _miscast_translocation(int severity, const char* cause)
potion_effect(POT_CONFUSION, 40);
break;
case 5:
- // Summon 2-4 spatial vortices.
- summon_spatial_vortices(75 + random2(151), god_gift);
+ {
+ bool success = false;
+
+ for (int i = 1 + random2(3); i >= 0; --i)
+ {
+ if (create_monster(
+ mgen_data::alert_hostile_at(MONS_SPATIAL_VORTEX,
+ you.pos(), 3)) != -1)
+ {
+ success = true;
+ }
+ }
+
+ if (success)
+ mpr("Space twists in upon itself!");
+ else
+ canned_msg(MSG_NOTHING_HAPPENS);
break;
+ }
case 6:
_send_abyss(cause);
break;
@@ -2490,7 +2511,14 @@ static void _miscast_summoning(int severity, const char* cause)
ouch(5 + random2avg(9, 2), 0, KILLED_BY_WILD_MAGIC, cause);
break;
case 3:
- summon_spatial_vortices(0, god_gift);
+ if (create_monster(
+ mgen_data::alert_hostile_at(MONS_SPATIAL_VORTEX,
+ you.pos(), 3)) != -1)
+ {
+ mpr("Space twists in upon itself!");
+ }
+ else
+ canned_msg(MSG_NOTHING_HAPPENS);
break;
case 4:
case 5:
@@ -2510,9 +2538,25 @@ static void _miscast_summoning(int severity, const char* cause)
switch (random2(6))
{
case 0:
- // Summon 2-4 spatial vortices.
- summon_spatial_vortices(75 + random2(151), god_gift);
+ {
+ bool success = false;
+
+ for (int i = 1 + random2(3); i >= 0; --i)
+ {
+ if (create_monster(
+ mgen_data::alert_hostile_at(MONS_SPATIAL_VORTEX,
+ you.pos(), 3)) != -1)
+ {
+ success = true;
+ }
+ }
+
+ if (success)
+ mpr("Space twists in upon itself!");
+ else
+ canned_msg(MSG_NOTHING_HAPPENS);
break;
+ }
case 1:
case 2: