From 1b490890d245da181d79e8730f1357759028eb9e Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Sun, 15 Nov 2009 20:21:51 -0800 Subject: 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". --- crawl-ref/source/mon-abil.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/mon-abil.cc') 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; } } -- cgit v1.2.3-54-g00ecf