diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-15 20:21:51 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-15 20:30:38 -0800 |
commit | 1b490890d245da181d79e8730f1357759028eb9e (patch) | |
tree | c4ea08e956117652c8c4653565274a0bb34a0bfb /crawl-ref/source/mon-abil.cc | |
parent | 9f3f309821f3705f7129529fba62a992c01cce84 (diff) | |
download | crawl-ref-1b490890d245da181d79e8730f1357759028eb9e.tar.gz crawl-ref-1b490890d245da181d79e8730f1357759028eb9e.zip |
Bug #2896412: Breath broken after polymorph
If a wizard or priest is polymorphed into a monster without hands, then
when it casts a spell preserved across the polymorph (rather than any
innate ability or spell) then to avoid getting weird messages (like
"Harold breaths UNSEEN BEAM at you") the first lookup key for
dat/database/monspell.txt is "polymorphed wizard" or
"polymorphed priest."
NOTE: There should probably be a greater variety of messages depending
on shpae, like "quadruped wizard" and "blob wizard".
Diffstat (limited to 'crawl-ref/source/mon-abil.cc')
-rw-r--r-- | crawl-ref/source/mon-abil.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index 15cb21337d..a8037d2733 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -746,6 +746,12 @@ static bool _moth_incite_monsters(const monsters *mon) return (false); } +static inline void _mons_cast_abil(monsters *monster, bolt &pbolt, + spell_type spell_cast) +{ + mons_cast(monster, pbolt, spell_cast, true, true); +} + //--------------------------------------------------------------- // // mon_special_ability @@ -943,7 +949,7 @@ bool mon_special_ability(monsters *monster, bolt & beem) if (mons_should_fire(beem)) { make_mons_stop_fleeing(monster); - mons_cast(monster, beem, spell); + _mons_cast_abil(monster, beem, spell); used = true; } } @@ -1004,7 +1010,7 @@ bool mon_special_ability(monsters *monster, bolt & beem) { make_mons_stop_fleeing(monster); spell_cast = SPELL_SYMBOL_OF_TORMENT; - mons_cast(monster, beem, spell_cast); + _mons_cast_abil(monster, beem, spell_cast); used = true; break; } @@ -1023,7 +1029,7 @@ bool mon_special_ability(monsters *monster, bolt & beem) { make_mons_stop_fleeing(monster); - mons_cast(monster, beem, spell_cast); + _mons_cast_abil(monster, beem, spell_cast); used = true; } break; @@ -1137,7 +1143,7 @@ bool mon_special_ability(monsters *monster, bolt & beem) if (mons_should_fire(beem)) { make_mons_stop_fleeing(monster); - mons_cast(monster, beem, spell); + _mons_cast_abil(monster, beem, spell); used = true; } } |