summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-27 02:40:32 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-27 02:40:32 +0000
commitcba4178e07a46150eb2f541e5d491c4297470080 (patch)
treef5aea7060c6299a94716967d37514a480b686821 /crawl-ref/source
parent431d2a497f4ab751f659caf9e2631a286e9368f9 (diff)
downloadcrawl-ref-cba4178e07a46150eb2f541e5d491c4297470080.tar.gz
crawl-ref-cba4178e07a46150eb2f541e5d491c4297470080.zip
Implement "Summon Ugly Things" as a monster spell, roughly equivalent to
"Summon Demon" in many ways, as they have similar hit dice, but aren't evil, undead, or demonic. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3890 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/mstuff2.cc14
-rw-r--r--crawl-ref/source/spl-data.h11
3 files changed, 24 insertions, 2 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 237d1106ee..2d1321d89b 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2565,6 +2565,7 @@ enum spell_type
SPELL_SUMMON_DRAKES,
SPELL_BLINK_OTHER, // 220
SPELL_SUMMON_MUSHROOMS,
+ SPELL_SUMMON_UGLY_THINGS,
NUM_SPELLS,
SPELL_NO_SPELL = 250 // 255 - added 22jan2000 {dlb}
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index 6aef1749d1..27c96a3517 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -608,6 +608,7 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast)
return;
case SPELL_SUMMON_DEMON: // class 2-4 demons
+ case SPELL_SUMMON_UGLY_THINGS:
if (mons_abjured(monster, monsterNearby))
return;
@@ -616,8 +617,16 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast)
duration = std::min(2 + monster->hit_dice / 10, 6);
for (sumcount = 0; sumcount < sumcount2; sumcount++)
{
- create_monster( summon_any_demon(DEMON_COMMON), duration,
- SAME_ATTITUDE(monster), monster->x, monster->y,
+ monster_type mons;
+
+ if (spell_cast == SPELL_SUMMON_DEMON)
+ mons = summon_any_demon(DEMON_COMMON);
+ else
+ mons = one_chance_in(monster->hit_dice / 4) ?
+ MONS_VERY_UGLY_THING : MONS_UGLY_THING;
+
+ create_monster( mons, duration, SAME_ATTITUDE(monster),
+ monster->x, monster->y,
monster->foe, MONS_PROGRAM_BUG );
}
return;
@@ -867,6 +876,7 @@ void setup_mons_cast(const monsters *monster, struct bolt &pbolt, int spell_cast
case SPELL_SHADOW_CREATURES: // summon anything appropriate for level
case SPELL_FAKE_RAKSHASA_SUMMON:
case SPELL_SUMMON_DEMON:
+ case SPELL_SUMMON_UGLY_THINGS:
case SPELL_ANIMATE_DEAD:
case SPELL_CALL_IMP:
case SPELL_SUMMON_UFETUBUS:
diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h
index f93eeb5581..b9e8a2df2c 100644
--- a/crawl-ref/source/spl-data.h
+++ b/crawl-ref/source/spl-data.h
@@ -2350,6 +2350,17 @@
},
{
+ SPELL_SUMMON_UGLY_THINGS, "Summon Ugly Things",
+ SPTYP_SUMMONING,
+ SPFLAG_NONE,
+ 5,
+ 200,
+ NULL,
+ false,
+ false
+},
+
+{
SPELL_NO_SPELL, "nonexistent spell",
0,
0,