2015-02-02 10:40:06 +02: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 19:59:18 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2015-03-09 20:24:45 +02:00
|
|
|
#include "ISpellMechanics.h"
|
2015-02-26 19:59:18 +02:00
|
|
|
#include "CDefaultSpellMechanics.h"
|
2015-02-02 11:22:19 +02:00
|
|
|
|
2015-03-09 20:24:45 +02:00
|
|
|
class DLL_LINKAGE AcidBreathDamageMechanics : public DefaultSpellMechanics
|
2015-02-02 11:22:19 +02:00
|
|
|
{
|
|
|
|
public:
|
2017-06-06 06:53:51 +02:00
|
|
|
AcidBreathDamageMechanics(const CSpell * s);
|
2016-09-06 09:52:54 +02:00
|
|
|
ESpellCastProblem::ESpellCastProblem isImmuneByStack(const ISpellCaster * caster, const CStack * obj) const override;
|
2015-02-02 11:22:19 +02:00
|
|
|
protected:
|
2015-09-26 20:35:30 +02:00
|
|
|
void applyBattleEffects(const SpellCastEnvironment * env, const BattleSpellCastParameters & parameters, SpellCastContext & ctx) const override;
|
2015-02-02 11:22:19 +02:00
|
|
|
};
|
|
|
|
|
2015-03-09 20:24:45 +02:00
|
|
|
class DLL_LINKAGE DeathStareMechanics : public DefaultSpellMechanics
|
2015-02-02 11:22:19 +02:00
|
|
|
{
|
|
|
|
public:
|
2017-06-06 06:53:51 +02:00
|
|
|
DeathStareMechanics(const CSpell * s);
|
2015-02-02 11:22:19 +02:00
|
|
|
protected:
|
2015-09-26 20:35:30 +02:00
|
|
|
void applyBattleEffects(const SpellCastEnvironment * env, const BattleSpellCastParameters & parameters, SpellCastContext & ctx) const override;
|
2015-02-02 11:22:19 +02:00
|
|
|
};
|
|
|
|
|
2015-03-09 20:24:45 +02:00
|
|
|
class DLL_LINKAGE DispellHelpfulMechanics : public DefaultSpellMechanics
|
2015-02-02 11:22:19 +02:00
|
|
|
{
|
|
|
|
public:
|
2017-06-06 06:53:51 +02:00
|
|
|
DispellHelpfulMechanics(const CSpell * s);
|
2015-03-09 21:07:28 +02:00
|
|
|
void applyBattle(BattleInfo * battle, const BattleSpellCast * packet) const override final;
|
2015-09-26 19:09:54 +02:00
|
|
|
ESpellCastProblem::ESpellCastProblem isImmuneByStack(const ISpellCaster * caster, const CStack * obj) const override;
|
2016-10-01 09:31:59 +02:00
|
|
|
private:
|
2017-06-06 06:53:51 +02:00
|
|
|
static bool positiveSpellEffects(const Bonus * b);
|
2015-02-02 11:22:19 +02:00
|
|
|
};
|