1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00
vcmi/lib/spells/CreatureSpellMechanics.h

42 lines
1.4 KiB
C
Raw Normal View History

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
#include "ISpellMechanics.h"
2015-02-26 19:59:18 +02:00
#include "CDefaultSpellMechanics.h"
2015-02-02 11:22:19 +02:00
class DLL_LINKAGE AcidBreathDamageMechanics : public DefaultSpellMechanics
2015-02-02 11:22:19 +02:00
{
public:
AcidBreathDamageMechanics(const CSpell * s);
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
};
class DLL_LINKAGE DeathStareMechanics : public DefaultSpellMechanics
2015-02-02 11:22:19 +02:00
{
public:
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
};
class DLL_LINKAGE DispellHelpfulMechanics : public DefaultSpellMechanics
2015-02-02 11:22:19 +02:00
{
public:
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;
private:
static bool positiveSpellEffects(const Bonus * b);
2015-02-02 11:22:19 +02:00
};