summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.com>2009-10-16 14:33:41 +1000
committerRobert Vollmert <rvollmert@gmx.net>2009-10-16 08:56:35 +0200
commit6d9b6f226847487b3fd9e2ff408d7c0f42361c93 (patch)
tree3f3c81c79eb038caf21ad19c715b66fbbf794178 /crawl-ref
parentabb48a2dd69dbc9743bc952a5c3afacc1e7efa16 (diff)
downloadcrawl-ref-6d9b6f226847487b3fd9e2ff408d7c0f42361c93.tar.gz
crawl-ref-6d9b6f226847487b3fd9e2ff408d7c0f42361c93.zip
Make Toxic Radiance and Refrigeration monster castable.
Allow player ghosts and random pandemonium lords to also cast it. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/ghost.cc4
-rw-r--r--crawl-ref/source/mon-util.cc2
-rw-r--r--crawl-ref/source/mstuff2.cc17
-rw-r--r--crawl-ref/source/spells2.cc7
-rw-r--r--crawl-ref/source/spells2.h2
-rw-r--r--crawl-ref/source/spl-data.h4
6 files changed, 30 insertions, 6 deletions
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
},