summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-01 03:50:29 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-01 03:50:29 +0000
commit595e6714fd6863571ca6b900685782f2ab27c397 (patch)
tree800af49740a53f7082de0959580c449000538ec6 /crawl-ref/source
parentc24cfde50a08a4ac472466508cab62ba1ace74ca (diff)
downloadcrawl-ref-595e6714fd6863571ca6b900685782f2ab27c397.tar.gz
crawl-ref-595e6714fd6863571ca6b900685782f2ab27c397.zip
Bug #2478490: provide casting message for titans doing Lesser Healing.
Also provide a default message for targeted beams. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8072 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/dat/database/monspell.txt33
-rw-r--r--crawl-ref/source/mstuff2.cc25
2 files changed, 52 insertions, 6 deletions
diff --git a/crawl-ref/source/dat/database/monspell.txt b/crawl-ref/source/dat/database/monspell.txt
index 4b2a74cdbb..2d3d5610d9 100644
--- a/crawl-ref/source/dat/database/monspell.txt
+++ b/crawl-ref/source/dat/database/monspell.txt
@@ -13,6 +13,8 @@
# 4) The name of the monster's genus.
# 5) "priest" if the monster is a priest type, "wizard" if it's a wizard type,
# or "demon" if it's demonic.
+# 6) If the spell uses a targeted, visible beam, it will try
+# "<beam_short_name> beam cast", then "beam catchall cast".
#
# For 2 to 5, if the spell has a target it will first add the suffix
# "targeted" to the lookup key before trying without the suffix.
@@ -47,6 +49,30 @@ Animate Dead cast gestures
@The_monster@ throws @possessive@ @arms@ wide.
%%%%
+Lesser Healing cast real
+
+__NEXT
+%%%%
+Lesser Healing cast gestures
+
+@The_monster@ briefly glows while making a small gesture.
+%%%%
+Lesser Healing cast
+
+@The_monster@ briefly glows.
+%%%%
+Greater Healing cast real
+
+__NEXT
+%%%%
+Greater Healing cast gestures
+
+@The_monster@ briefly glows brightly while making a large gesture.
+%%%%
+Greater Healing cast
+
+@The_monster@ briefly glows brightly.
+%%%%
Symbol of Torment cast
@The_monster@ calls on the powers of Hell!
@@ -216,3 +242,10 @@ demon cast
@The_monster@ gestures.
%%%%
+######################################################
+# Generic beam messages.
+######################################################
+beam catchall cast
+
+@The_monster@ throws @beam@ at @target@.
+%%%%
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index bb70bb8907..d2f1a283b8 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -551,7 +551,7 @@ void mons_cast_noise(monsters *monster, bolt &pbolt, spell_type spell_cast)
const bool silent = silenced(monster->pos()) || force_silent;
const bool no_silent = mons_class_flag(monster->type, M_SPELL_NO_SILENT);
- if (unseen && silent || silent && no_silent)
+ if (unseen && silent)
return;
const unsigned int flags = get_spell_flags(real_spell);
@@ -612,15 +612,29 @@ void mons_cast_noise(monsters *monster, bolt &pbolt, spell_type spell_cast)
else if (mons_is_demon(monster->type))
key_list.push_back("demon" + cast_str);
- // For targeted spells, try with the targeted suffix first.
- if (in_bounds(pbolt.target) && pbolt.target != monster->pos()
- && (flags & SPFLAG_TARGETING_MASK))
+ const bool visible_beam = pbolt.type != 0 && pbolt.type != ' '
+ && pbolt.name[0] != '0'
+ && !pbolt.is_enchantment();
+
+ const bool targeted = in_bounds(pbolt.target)
+ && pbolt.target != monster->pos()
+ && (flags & SPFLAG_TARGETING_MASK);
+
+ if (targeted)
{
+ // For targeted spells, try with the targeted suffix first.
for (unsigned int i = key_list.size() - 1; i >= num_spell_keys; i--)
{
std::string str = key_list[i] + " targeted";
key_list.insert(key_list.begin() + i, str);
}
+
+ // Generic beam messages.
+ if (visible_beam)
+ {
+ key_list.push_back(pbolt.short_name + " beam " + cast_str);
+ key_list.push_back("beam catchall cast");
+ }
}
std::string prefix;
@@ -719,8 +733,7 @@ void mons_cast_noise(monsters *monster, bolt &pbolt, spell_type spell_cast)
{
beam_name = "INVALID BEAM";
}
- else if (pbolt.type == 0 || pbolt.type == ' ' || pbolt.name[0] == '0'
- || pbolt.is_enchantment())
+ else if (!visible_beam)
{
beam_name = "INVISIBLE BEAM";
}