summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-11-05 20:56:46 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-05 20:56:46 +1000
commitfc0e79dabbc83e24ac32461ab67cdd1cef765e91 (patch)
tree1c700f10513322a544fa883e2d36f5a6a293f07d /crawl-ref/source
parentb9def0122143459c4d1fd0721384028f3974dc69 (diff)
downloadcrawl-ref-fc0e79dabbc83e24ac32461ab67cdd1cef765e91.tar.gz
crawl-ref-fc0e79dabbc83e24ac32461ab67cdd1cef765e91.zip
New monster spell: Summon Eyeballs.
Summons from a (weighted) selection of: giant eyeballs, eyes of draining, golden eyes, shining eyes, great orbs of eyes, and eyes of devastation. Does not summon giant orange brains, as those aren't really eyeballs. Currently programmed only as a monster spell, and the only monsters who can get it are Pan Lords.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/acr.cc2
-rw-r--r--crawl-ref/source/enum.h7
-rw-r--r--crawl-ref/source/ghost.cc2
-rw-r--r--crawl-ref/source/mon-cast.cc25
-rw-r--r--crawl-ref/source/spl-data.h13
5 files changed, 45 insertions, 4 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 7f52fd60e3..d9f2050c73 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -4382,7 +4382,7 @@ static void _compile_time_asserts()
COMPILE_CHECK(SP_VAMPIRE == 30 , c3);
COMPILE_CHECK(SPELL_DEBUGGING_RAY == 103 , c4);
COMPILE_CHECK(SPELL_PETRIFY == 156 , c5);
- COMPILE_CHECK(NUM_SPELLS == 201 , c6);
+ COMPILE_CHECK(NUM_SPELLS == 202 , c6);
//jmf: NEW ASSERTS: we ought to do a *lot* of these
COMPILE_CHECK(NUM_SPECIES < SP_UNKNOWN , c7);
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index b4ddaa5a94..05741248ec 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2884,11 +2884,12 @@ enum spell_type
SPELL_COLD_BREATH, // 195
SPELL_DRACONIAN_BREATH,
SPELL_WATER_ELEMENTALS,
- SPELL_PORKALATOR, // 198
+ SPELL_PORKALATOR,
SPELL_KRAKEN_TENTACLES,
- SPELL_TOMB_OF_DOROKLOHE,
+ SPELL_TOMB_OF_DOROKLOHE, // 200
+ SPELL_SUMMON_EYEBALLS,
- NUM_SPELLS // 201
+ NUM_SPELLS // 202
};
enum slot_select_mode
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc
index 80aa765101..e52eb599ad 100644
--- a/crawl-ref/source/ghost.cc
+++ b/crawl-ref/source/ghost.cc
@@ -289,6 +289,8 @@ void ghost_demon::init_random_demon()
spells[2] = SPELL_SUMMON_GREATER_DEMON;
if (one_chance_in(12))
spells[2] = SPELL_SUMMON_DEMON;
+ if (one_chance_in(10))
+ spells[2] = SPELL_SUMMON_EYEBALLS;
if (one_chance_in(20))
spells[3] = SPELL_SUMMON_GREATER_DEMON;
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc
index edeaf282ae..4f877ae5c0 100644
--- a/crawl-ref/source/mon-cast.cc
+++ b/crawl-ref/source/mon-cast.cc
@@ -688,6 +688,7 @@ void setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast)
case SPELL_CONTROLLED_BLINK:
case SPELL_TOMB_OF_DOROKLOHE:
case SPELL_CHAIN_LIGHTNING: // the only user is reckless
+ case SPELL_SUMMON_EYEBALLS:
return;
default:
break;
@@ -1940,6 +1941,30 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
return;
cast_chain_lightning(4 * monster->hit_dice, monster);
return;
+ case SPELL_SUMMON_EYEBALLS:
+ if (_mons_abjured(monster, monsterNearby))
+ return;
+
+ sumcount2 = 1 + random2(2) + random2(monster->hit_dice / 7 + 1);
+
+ duration = std::min(2 + monster->hit_dice / 10, 6);
+
+ for (sumcount = 0; sumcount < sumcount2; sumcount++)
+ {
+ const monster_type mon = static_cast<monster_type>(
+ random_choose_weighted(100, MONS_GIANT_EYEBALL,
+ 80, MONS_EYE_OF_DRAINING,
+ 60, MONS_GOLDEN_EYE,
+ 40, MONS_SHINING_EYE,
+ 20, MONS_GREAT_ORB_OF_EYES,
+ 10, MONS_EYE_OF_DEVASTATION,
+ 0));
+
+ create_monster(
+ mgen_data(mon, SAME_ATTITUDE(monster), duration,
+ spell_cast, monster->pos(), monster->foe, 0, god));
+ }
+ return;
}
// If a monster just came into view and immediately cast a spell,
diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h
index 4a537980ec..d54e992954 100644
--- a/crawl-ref/source/spl-data.h
+++ b/crawl-ref/source/spl-data.h
@@ -2382,6 +2382,19 @@
},
{
+ SPELL_SUMMON_EYEBALLS, "Summon Eyeballs",
+ SPTYP_SUMMONING,
+ SPFLAG_MONSTER,
+ 5,
+ 0,
+ -1, -1,
+ 0,
+ NULL,
+ false,
+ false
+},
+
+{
SPELL_NO_SPELL, "nonexistent spell",
0,
SPFLAG_TESTING,