2015-02-02 11:40:06 +03:00
|
|
|
/*
|
|
|
|
* CreatureSpellMechanics.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
2015-02-26 20:59:18 +03:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2015-03-09 19:24:45 +01:00
|
|
|
#include "ISpellMechanics.h"
|
2015-02-26 20:59:18 +03:00
|
|
|
#include "CDefaultSpellMechanics.h"
|
2015-02-02 12:22:19 +03:00
|
|
|
|
2015-03-09 19:24:45 +01:00
|
|
|
class DLL_LINKAGE AcidBreathDamageMechanics : public DefaultSpellMechanics
|
2015-02-02 12:22:19 +03:00
|
|
|
{
|
|
|
|
public:
|
2017-06-06 07:53:51 +03:00
|
|
|
AcidBreathDamageMechanics(const CSpell * s);
|
2016-09-06 10:52:54 +03:00
|
|
|
ESpellCastProblem::ESpellCastProblem isImmuneByStack(const ISpellCaster * caster, const CStack * obj) const override;
|
2015-02-02 12:22:19 +03:00
|
|
|
protected:
|
2015-09-26 21:35:30 +03:00
|
|
|
void applyBattleEffects(const SpellCastEnvironment * env, const BattleSpellCastParameters & parameters, SpellCastContext & ctx) const override;
|
2015-02-02 12:22:19 +03:00
|
|
|
};
|
|
|
|
|
2015-03-09 19:24:45 +01:00
|
|
|
class DLL_LINKAGE DeathStareMechanics : public DefaultSpellMechanics
|
2015-02-02 12:22:19 +03:00
|
|
|
{
|
|
|
|
public:
|
2017-06-06 07:53:51 +03:00
|
|
|
DeathStareMechanics(const CSpell * s);
|
2015-02-02 12:22:19 +03:00
|
|
|
protected:
|
2015-09-26 21:35:30 +03:00
|
|
|
void applyBattleEffects(const SpellCastEnvironment * env, const BattleSpellCastParameters & parameters, SpellCastContext & ctx) const override;
|
2015-02-02 12:22:19 +03:00
|
|
|
};
|
|
|
|
|
2015-03-09 19:24:45 +01:00
|
|
|
class DLL_LINKAGE DispellHelpfulMechanics : public DefaultSpellMechanics
|
2015-02-02 12:22:19 +03:00
|
|
|
{
|
|
|
|
public:
|
2017-06-06 07:53:51 +03:00
|
|
|
DispellHelpfulMechanics(const CSpell * s);
|
2015-03-09 20:07:28 +01:00
|
|
|
void applyBattle(BattleInfo * battle, const BattleSpellCast * packet) const override final;
|
2015-09-26 20:09:54 +03:00
|
|
|
ESpellCastProblem::ESpellCastProblem isImmuneByStack(const ISpellCaster * caster, const CStack * obj) const override;
|
2016-10-01 10:31:59 +03:00
|
|
|
private:
|
2017-06-06 07:53:51 +03:00
|
|
|
static bool positiveSpellEffects(const Bonus * b);
|
2015-02-02 12:22:19 +03:00
|
|
|
};
|