diff options
-rw-r--r-- | crawl-ref/source/acr.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/enum.h | 7 | ||||
-rw-r--r-- | crawl-ref/source/ghost.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/mon-cast.cc | 25 | ||||
-rw-r--r-- | crawl-ref/source/spl-data.h | 13 |
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, |