summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-cast.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/mon-cast.cc')
-rw-r--r--crawl-ref/source/mon-cast.cc31
1 files changed, 30 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc
index 7bbbd77862..5190625c61 100644
--- a/crawl-ref/source/mon-cast.cc
+++ b/crawl-ref/source/mon-cast.cc
@@ -217,6 +217,7 @@ bolt mons_spells( monsters *mons, spell_type spell_cast, int power,
beam.type = dchar_glyph(DCHAR_FIRED_ZAP); // default
beam.thrower = KILL_MON_MISSILE;
+ beam.origin_spell = real_spell;
// FIXME: this should use the zap_data[] struct from beam.cc!
switch (real_spell)
@@ -361,6 +362,19 @@ bolt mons_spells( monsters *mons, spell_type spell_cast, int power,
beam.is_beam = true;
break;
+ case SPELL_PRIMAL_WAVE:
+ beam.name = "great wave of water";
+ // Water attack is weaker than the pure elemental damage
+ // attacks, but also less resistible.
+ beam.damage = dice_def( 3, 6 + power / 12 );
+ beam.colour = LIGHTBLUE;
+ beam.flavour = BEAM_WATER;
+ // Huge wave of water is hard to dodge.
+ beam.hit = 20 + power / 20;
+ beam.is_beam = false;
+ beam.type = dchar_glyph(DCHAR_WAVY);
+ break;
+
case SPELL_FREEZING_CLOUD:
beam.name = "freezing blast";
beam.damage = dice_def( 2, 9 + power / 11 );
@@ -825,6 +839,7 @@ bool setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
case SPELL_SUMMON_EYEBALLS:
case SPELL_SUMMON_BUTTERFLIES:
case SPELL_MISLEAD:
+ case SPELL_CALL_TIDE:
return (true);
default:
if (check_validity)
@@ -840,6 +855,8 @@ bool setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
bolt theBeam = mons_spells(monster, spell_cast, power);
+ // [ds] remind me again why we're doing this piecemeal copying?
+ pbolt.origin_spell = theBeam.origin_spell;
pbolt.colour = theBeam.colour;
pbolt.range = theBeam.range;
pbolt.hit = theBeam.hit;
@@ -1662,6 +1679,18 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
simple_monster_message(monster, " seems to move somewhat quicker.");
return;
+ case SPELL_CALL_TIDE:
+ {
+ const int tide_duration = random_range(18, 50, 2);
+ monster->add_ench(mon_enchant(ENCH_TIDE, 0, KC_OTHER,
+ tide_duration * 10));
+ monster->props[TIDE_CALL_TURN] = you.num_turns;
+ simple_monster_message(monster,
+ " sings a water chant to call the tide!");
+ flash_view_delay(ETC_WATER, 300);
+ return;
+ }
+
case SPELL_SUMMON_SMALL_MAMMALS:
case SPELL_VAMPIRE_SUMMON:
if (spell_cast == SPELL_SUMMON_SMALL_MAMMALS)
@@ -1821,7 +1850,7 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
if (created == -1)
continue;
- // Mara's clones are special; they have the same stats as him, and
+ // Mara's clones are special; they have the same stats as him, and
// are exact clones, so they are created damaged if necessary, with
// identical enchants and with the same items.
monsters *new_fake = &menv[created];