|
@@ -266,7 +266,9 @@ void DefaultSpellMechanics::castNormal(const SpellCastEnvironment * env, const B
|
|
|
|
|
|
|
|
//checking if creatures resist
|
|
//checking if creatures resist
|
|
|
handleResistance(env, ctx.attackedCres, ctx.sc);
|
|
handleResistance(env, ctx.attackedCres, ctx.sc);
|
|
|
- //it is actual spell and can be reflected to single target, no recurrence
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //reflection is applied only to negative spells
|
|
|
|
|
+ //if it is actual spell and can be reflected to single target, no recurrence
|
|
|
const bool tryMagicMirror = owner->isNegative() && owner->level && owner->getLevelInfo(0).range == "0";
|
|
const bool tryMagicMirror = owner->isNegative() && owner->level && owner->getLevelInfo(0).range == "0";
|
|
|
if(tryMagicMirror)
|
|
if(tryMagicMirror)
|
|
|
{
|
|
{
|
|
@@ -765,7 +767,7 @@ void DefaultSpellMechanics::handleImmunities(const CBattleInfoCallback * cb, con
|
|
|
void DefaultSpellMechanics::handleResistance(const SpellCastEnvironment * env, std::vector<const CStack* >& attackedCres, BattleSpellCast& sc) const
|
|
void DefaultSpellMechanics::handleResistance(const SpellCastEnvironment * env, std::vector<const CStack* >& attackedCres, BattleSpellCast& sc) const
|
|
|
{
|
|
{
|
|
|
//checking if creatures resist
|
|
//checking if creatures resist
|
|
|
- //resistance/reflection is applied only to negative spells
|
|
|
|
|
|
|
+ //resistance is applied only to negative spells
|
|
|
if(owner->isNegative())
|
|
if(owner->isNegative())
|
|
|
{
|
|
{
|
|
|
std::vector <const CStack*> resisted;
|
|
std::vector <const CStack*> resisted;
|
|
@@ -802,7 +804,6 @@ bool DefaultSpellMechanics::requiresCreatureTarget() const
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
std::vector<const CStack *> SpecialSpellMechanics::calculateAffectedStacks(const CBattleInfoCallback * cb, const SpellTargetingContext & ctx) const
|
|
std::vector<const CStack *> SpecialSpellMechanics::calculateAffectedStacks(const CBattleInfoCallback * cb, const SpellTargetingContext & ctx) const
|
|
|
{
|
|
{
|
|
|
return std::vector<const CStack *>();
|
|
return std::vector<const CStack *>();
|