diff --git a/src/action/action_spellcast.cpp b/src/action/action_spellcast.cpp index 28e72a918..2b1484097 100644 --- a/src/action/action_spellcast.cpp +++ b/src/action/action_spellcast.cpp @@ -333,7 +333,7 @@ bool COrder_SpellCast::SpellMoveToTarget(CUnit &unit) } // FALL THROUGH case 2: // Cast spell on the target. - if (!spell.IsCasterOnly()) { + if (!spell.IsCasterOnly() || spell.ForceUseAnimation) { AnimateActionSpellCast(unit, *this); if (unit.Anim.Unbreakable) { return ; diff --git a/src/include/spells.h b/src/include/spells.h index 040dceb62..970477043 100644 --- a/src/include/spells.h +++ b/src/include/spells.h @@ -224,6 +224,7 @@ public: bool IsCasterOnly() const { return !Range && Target == TargetSelf; } + bool ForceUseAnimation; }; diff --git a/src/spell/script_spell.cpp b/src/spell/script_spell.cpp index 6280a6bc3..decd53641 100644 --- a/src/spell/script_spell.cpp +++ b/src/spell/script_spell.cpp @@ -333,6 +333,9 @@ static int CclDefineSpell(lua_State *l) } else if (!strcmp(value, "repeat-cast")) { spell->RepeatCast = 1; --i; + } else if (!strcmp(value, "force-use-animation")) { + spell->ForceUseAnimation = true; + --i; } else if (!strcmp(value, "target")) { value = LuaToString(l, i + 1); if (!strcmp(value, "self")) { diff --git a/src/spell/spells.cpp b/src/spell/spells.cpp index 6daf10962..92a639071 100644 --- a/src/spell/spells.cpp +++ b/src/spell/spells.cpp @@ -485,7 +485,7 @@ SpellType::SpellType(int slot, const std::string &ident) : Ident(ident), Slot(slot), Target(), Action(), Range(0), ManaCost(0), RepeatCast(0), DependencyId(-1), Condition(NULL), - AutoCast(NULL), AICast(NULL) + AutoCast(NULL), AICast(NULL), ForceUseAnimation(false) { memset(Costs, 0, sizeof(Costs)); }