summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/dat/descript/spells.txt4
-rw-r--r--crawl-ref/source/ghost.cc1
-rw-r--r--crawl-ref/source/mstuff2.cc4
-rw-r--r--crawl-ref/source/spells2.cc17
-rw-r--r--crawl-ref/source/spells2.h2
-rw-r--r--crawl-ref/source/spl-book.cc2
-rw-r--r--crawl-ref/source/spl-cast.cc4
-rw-r--r--crawl-ref/source/xom.cc2
8 files changed, 32 insertions, 4 deletions
diff --git a/crawl-ref/source/dat/descript/spells.txt b/crawl-ref/source/dat/descript/spells.txt
index 88400189e7..f9fe44c354 100644
--- a/crawl-ref/source/dat/descript/spells.txt
+++ b/crawl-ref/source/dat/descript/spells.txt
@@ -647,6 +647,10 @@ Summon Swarm
This spell summons forth a pestilential swarm.
%%%%
+Summon Ugly Thing
+
+This spell summons a hideous creature to the caster's aid.
+%%%%
Summon Wraiths
This spell calls on the powers of the undead to aid the caster.
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc
index c3861ef8a4..d9ef6e234e 100644
--- a/crawl-ref/source/ghost.cc
+++ b/crawl-ref/source/ghost.cc
@@ -69,6 +69,7 @@ static spell_type search_order_third[] = {
SPELL_SUMMON_DEMON,
SPELL_DEMONIC_HORDE,
SPELL_HASTE,
+ SPELL_SUMMON_UGLY_THING,
SPELL_ANIMATE_DEAD,
SPELL_INVISIBILITY,
SPELL_CALL_IMP,
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index 88eb060bb0..abebbcfce8 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -623,8 +623,8 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast)
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;
+ mons = (one_chance_in(4)) ? MONS_VERY_UGLY_THING :
+ MONS_UGLY_THING;
create_monster( mons, duration, SAME_ATTITUDE(monster),
monster->x, monster->y,
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 1104282c8d..d2d621d8bc 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1483,6 +1483,23 @@ void summon_scorpions(int pow)
}
} // end summon_scorpions()
+void summon_ugly_thing(int pow)
+{
+ monster_type ugly = (one_chance_in(4)) ? MONS_VERY_UGLY_THING :
+ MONS_UGLY_THING;
+ int numsc = std::min(2 + (random2(pow) / 4), 6);
+ beh_type beha = (random2(pow) < 4) ? BEH_HOSTILE : BEH_FRIENDLY;
+
+ create_monster(ugly, numsc, beha, you.x_pos, you.y_pos, you.pet_target,
+ MONS_PROGRAM_BUG, false, false, false, true);
+
+ mprf("A%sugly thing appears.", (ugly == MONS_VERY_UGLY_THING) ?
+ " very " : "n ");
+
+ if (beha == BEH_HOSTILE)
+ mpr("It doesn't look very happy.");
+} // end summon_ugly_thing()
+
void summon_ice_beast_etc(int pow, int ibc, bool divine_gift)
{
int numsc = std::min(2 + (random2(pow) / 4), 6);
diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h
index d718655317..890d04b8f5 100644
--- a/crawl-ref/source/spells2.h
+++ b/crawl-ref/source/spells2.h
@@ -140,6 +140,8 @@ void summon_ice_beast_etc(int pow, int ibc, bool divine_gift = false);
* *********************************************************************** */
void summon_scorpions(int pow);
+void summon_ugly_thing(int pow);
+
void summon_animals(int pow);
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index a9f27709e7..0c0a286a2d 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -122,11 +122,11 @@ static spell_type spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
{SPELL_ABJURATION_I,
SPELL_RECALL,
SPELL_SUMMON_LARGE_MAMMAL,
+ SPELL_SUMMON_UGLY_THING,
SPELL_SHADOW_CREATURES,
SPELL_SUMMON_WRAITHS,
SPELL_SUMMON_HORRIBLE_THINGS,
SPELL_NO_SPELL,
- SPELL_NO_SPELL,
},
// 8 - Book of Fire
{SPELL_EVAPORATE,
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 0dfa4cda71..2417eccf59 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -1755,6 +1755,10 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail )
zapping(ZAP_ICE_STORM, powc, beam);
break;
+ case SPELL_SUMMON_UGLY_THING:
+ summon_ugly_thing(powc);
+ break;
+
case SPELL_SHADOW_CREATURES:
{
mpr( "Wisps of shadow whirl around you..." );
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 91ee3abbd9..e00f3b8e43 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -60,7 +60,7 @@ static const spell_type xom_spells[] =
SPELL_TUKIMAS_DANCE, SPELL_SUMMON_BUTTERFLIES, SPELL_SUMMON_SMALL_MAMMAL,
SPELL_SUMMON_SCORPIONS, SPELL_FLY, SPELL_SPIDER_FORM, SPELL_STATUE_FORM,
SPELL_ICE_FORM, SPELL_DRAGON_FORM, SPELL_SWARM, SPELL_SUMMON_WRAITHS,
- SPELL_SHADOW_CREATURES, SPELL_SUMMON_ELEMENTAL,
+ SPELL_SUMMON_UGLY_THING, SPELL_SHADOW_CREATURES, SPELL_SUMMON_ELEMENTAL,
SPELL_SUMMON_HORRIBLE_THINGS, SPELL_SUMMON_LARGE_MAMMAL,
SPELL_CONJURE_BALL_LIGHTNING, SPELL_SUMMON_DRAGON, SPELL_DEATH_CHANNEL,
SPELL_NECROMUTATION