summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-09-26 12:11:24 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-09-26 12:11:24 +0000
commitb3df90222267176962658de48c3717dc0aacbab5 (patch)
treebe245f3ccc0f8ddf1209349503efe5ba3b1a1d3c
parentef6e7277f36d2273d29e06fbf2c3b56ae829e860 (diff)
downloadcrawl-ref-b3df90222267176962658de48c3717dc0aacbab5.tar.gz
crawl-ref-b3df90222267176962658de48c3717dc0aacbab5.zip
Added MS_SUMMON_SMALL_MAMMALS, and gave it the appropriate ghosts.
Fixes bug 1563773. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@137 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/files.cc2
-rw-r--r--crawl-ref/source/mon-util.cc4
-rw-r--r--crawl-ref/source/mstuff2.cc7
4 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index b07df97f61..607948b460 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2391,6 +2391,7 @@ enum mon_spell_type
MS_DISPEL_UNDEAD,
MS_HELLFROST,
MS_POISON_ARROW, // 60
+ MS_SUMMON_SMALL_MAMMALS,
// XXX: before adding more monster versions of player spells we should
// consider merging the two lists into one and just having monsters
// fail to implement the ones that are impractical.
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index c9ec8aa52b..2194be911c 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1673,7 +1673,7 @@ unsigned char translate_spell(unsigned char spel)
case SPELL_TELEPORT_OTHER:
return (MS_TELEPORT_OTHER);
case SPELL_SUMMON_SMALL_MAMMAL:
- return (MS_VAMPIRE_SUMMON); /* approximate */
+ return (MS_SUMMON_SMALL_MAMMALS);
case SPELL_BOLT_OF_DRAINING:
return (MS_NEGATIVE_BOLT);
case SPELL_LEHUDIBS_CRYSTAL_SPEAR:
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 1d229c02c9..57c6daba62 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1837,6 +1837,7 @@ bool ms_requires_tracer(int monspell)
case MS_SUMMON_UFETUBUS:
case MS_TELEPORT:
case MS_TORMENT:
+ case MS_SUMMON_SMALL_MAMMALS:
case MS_VAMPIRE_SUMMON:
case MS_CANTRIP:
@@ -1877,6 +1878,7 @@ bool ms_direct_nasty(int monspell)
case MS_SUMMON_DEMON_GREATER:
case MS_SUMMON_UFETUBUS:
case MS_TELEPORT:
+ case MS_SUMMON_SMALL_MAMMALS:
case MS_VAMPIRE_SUMMON:
nasty = false;
break;
@@ -1914,6 +1916,7 @@ bool ms_useful_fleeing_out_of_sight( struct monsters *mon, int monspell )
case MS_ANIMATE_DEAD:
return (true);
+ case MS_SUMMON_SMALL_MAMMALS:
case MS_VAMPIRE_SUMMON:
case MS_SUMMON_UFETUBUS:
case MS_FAKE_RAKSHASA_SUMMON:
@@ -1963,6 +1966,7 @@ bool ms_low_hitpoint_cast( struct monsters *mon, int monspell )
ret = true;
break;
+ case MS_SUMMON_SMALL_MAMMALS:
case MS_VAMPIRE_SUMMON:
case MS_SUMMON_UFETUBUS:
case MS_FAKE_RAKSHASA_SUMMON:
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index 2b2fbf508c..6fb3459120 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -368,8 +368,12 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
switch (spell_cast)
{
+ case MS_SUMMON_SMALL_MAMMALS:
case MS_VAMPIRE_SUMMON:
- sumcount2 = 3 + random2(3) + monster->hit_dice / 5;
+ if ( spell_cast == MS_SUMMON_SMALL_MAMMALS )
+ sumcount2 = 1 + random2(4);
+ else
+ sumcount2 = 3 + random2(3) + monster->hit_dice / 5;
for (sumcount = 0; sumcount < sumcount2; sumcount++)
{
@@ -662,6 +666,7 @@ void setup_mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cas
// fire_tracer, or beam.
switch (spell_cast)
{
+ case MS_SUMMON_SMALL_MAMMALS:
case MS_VAMPIRE_SUMMON:
case MS_LEVEL_SUMMON: // summon anything appropriate for level
case MS_FAKE_RAKSHASA_SUMMON: