From 6d9b6f226847487b3fd9e2ff408d7c0f42361c93 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 16 Oct 2009 14:33:41 +1000 Subject: Make Toxic Radiance and Refrigeration monster castable. Allow player ghosts and random pandemonium lords to also cast it. Signed-off-by: Robert Vollmert --- crawl-ref/source/ghost.cc | 4 +++- crawl-ref/source/mon-util.cc | 2 ++ crawl-ref/source/mstuff2.cc | 17 +++++++++++++++++ crawl-ref/source/spells2.cc | 7 +++++-- crawl-ref/source/spells2.h | 2 +- crawl-ref/source/spl-data.h | 4 ++-- 6 files changed, 30 insertions(+), 6 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc index fffe1dc4eb..922e9fca13 100644 --- a/crawl-ref/source/ghost.cc +++ b/crawl-ref/source/ghost.cc @@ -47,6 +47,7 @@ static spell_type search_order_conj[] = { SPELL_STICKY_FLAME, SPELL_ISKENDERUNS_MYSTIC_BLAST, // 10 + SPELL_OZOCUBUS_REFRIGERTION, SPELL_BOLT_OF_MAGMA, SPELL_ICE_BOLT, SPELL_BOLT_OF_FIRE, @@ -56,8 +57,8 @@ static spell_type search_order_conj[] = { SPELL_VENOM_BOLT, SPELL_BOLT_OF_IRON, SPELL_STONE_ARROW, - SPELL_THROW_FLAME, // 20 + SPELL_THROW_FLAME, SPELL_THROW_FROST, SPELL_PAIN, SPELL_STING, @@ -66,6 +67,7 @@ static spell_type search_order_conj[] = { SPELL_MAGIC_DART, SPELL_SLEEP, SPELL_BACKLIGHT, + SPELL_OLGREBS_TOXIC_RADIANCE, SPELL_NO_SPELL, // end search }; diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 925c4fa46f..b014595b38 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3492,6 +3492,8 @@ bool mons_has_smite_attack(const monsters *monster) || hspell_pass[i] == SPELL_SMITING || hspell_pass[i] == SPELL_HELLFIRE_BURST || hspell_pass[i] == SPELL_FIRE_STORM + || hspell_pass[i] == SPELL_OZOCUBUS_REFRIGERATION + || hspell_pass[i] == SPELL_OLGREBS_TOXIC_RADIANCE || hspell_pass[i] == SPELL_AIRSTRIKE) { return (true); diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index ef95a45c67..75532cac3f 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -39,6 +39,7 @@ REVISION("$Rev$"); #include "player.h" #include "religion.h" #include "spells1.h" +#include "spells2.h" #include "spells3.h" #include "spl-cast.h" #include "spl-mis.h" @@ -481,6 +482,20 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, torment(monster_index(monster), monster->pos()); return; + case SPELL_OZOCUBUS_REFRIGERATION: + if (!monsterNearby || mons_friendly(monster)) + return; + + cast_refrigeration(random2(12 * monster->hit_dice)); + return; + + case SPELL_OLGREBS_TOXIC_RADIANCE: + if (!monsterNearby || mons_friendly(monster)) + return; + + cast_toxic_radiance(true); + return; + case SPELL_SUMMON_GREATER_DEMON: if (_mons_abjured(monster, monsterNearby)) return; @@ -1158,6 +1173,8 @@ void setup_mons_cast(monsters *monster, bolt &pbolt, case SPELL_SUMMON_HORRIBLE_THINGS: case SPELL_HAUNT: case SPELL_SYMBOL_OF_TORMENT: + case SPELL_OZOCUBUS_REFRIGERATION: + case SPELL_OLGREBS_TOXIC_RADIANCE: case SPELL_SUMMON_GREATER_DEMON: case SPELL_CANTRIP: case SPELL_BERSERKER_RAGE: diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index cec9e6ce30..c2d4478462 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -509,9 +509,12 @@ static std::string _describe_monsters(const counted_monster_list &list) // Poisonous light passes right through invisible players // and monsters, and so, they are unaffected by this spell -- // assumes only you can cast this spell (or would want to). -void cast_toxic_radiance() +void cast_toxic_radiance(bool monster_cast) { - mpr("You radiate a sickly green light!"); + if (monster_cast) + mpr("Sickly green light fills the air!"); + else + mpr("You radiate a sickly green light!"); you.flash_colour = GREEN; viewwindow(true, false); diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h index c1b1ff2c9f..0fee00e019 100644 --- a/crawl-ref/source/spells2.h +++ b/crawl-ref/source/spells2.h @@ -24,7 +24,7 @@ int detect_creatures(int pow, bool telepathic = false); int detect_items(int pow); int detect_traps(int pow); void cast_refrigeration(int pow); -void cast_toxic_radiance(void); +void cast_toxic_radiance(bool monster_cast = false); void drain_life(int pow); int fungal_bloom(); diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h index c478d552d8..9e76c1df6f 100644 --- a/crawl-ref/source/spl-data.h +++ b/crawl-ref/source/spl-data.h @@ -486,7 +486,7 @@ -1, -1, 0, NULL, - true, + false, false }, @@ -929,7 +929,7 @@ -1, -1, 0, NULL, - true, + false, false }, -- cgit v1.2.3-54-g00ecf