mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
Formatting & cleanup
This commit is contained in:
@ -374,15 +374,6 @@ void DefaultSpellMechanics::battleCast(const SpellCastEnvironment * env, BattleS
|
|||||||
StacksInjured si;
|
StacksInjured si;
|
||||||
SpellCastContext ctx(attackedCres, sc, si);
|
SpellCastContext ctx(attackedCres, sc, si);
|
||||||
|
|
||||||
//TODO: extract dmg to display calculation
|
|
||||||
//calculating dmg to display
|
|
||||||
if (owner->id == SpellID::DEATH_STARE || owner->id == SpellID::ACID_BREATH_DAMAGE)
|
|
||||||
{
|
|
||||||
sc.dmgToDisplay = parameters.usedSpellPower;
|
|
||||||
if (owner->id == SpellID::DEATH_STARE)
|
|
||||||
vstd::amin(sc.dmgToDisplay, (*attackedCres.begin())->count); //stack is already reduced after attack
|
|
||||||
}
|
|
||||||
|
|
||||||
applyBattleEffects(env, parameters, ctx);
|
applyBattleEffects(env, parameters, ctx);
|
||||||
|
|
||||||
env->sendAndApply(&sc);
|
env->sendAndApply(&sc);
|
||||||
@ -464,8 +455,6 @@ int DefaultSpellMechanics::calculateDuration(const CGHeroInstance* caster, int u
|
|||||||
|
|
||||||
void DefaultSpellMechanics::applyBattleEffects(const SpellCastEnvironment* env, BattleSpellCastParameters & parameters, SpellCastContext & ctx) const
|
void DefaultSpellMechanics::applyBattleEffects(const SpellCastEnvironment* env, BattleSpellCastParameters & parameters, SpellCastContext & ctx) const
|
||||||
{
|
{
|
||||||
//TODO:applying effects
|
|
||||||
|
|
||||||
//applying effects
|
//applying effects
|
||||||
if(owner->isOffensiveSpell())
|
if(owner->isOffensiveSpell())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user