mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
ENCHANTER_CASTING trigger tweak
This commit is contained in:
@@ -87,10 +87,14 @@ void BattleSpellCastParameters::cast(const SpellCastEnvironment * env)
|
||||
spell->battleCast(env, *this);
|
||||
}
|
||||
|
||||
void BattleSpellCastParameters::castIfPossible(const SpellCastEnvironment * env)
|
||||
bool BattleSpellCastParameters::castIfPossible(const SpellCastEnvironment * env)
|
||||
{
|
||||
if(ESpellCastProblem::OK == cb->battleCanCastThisSpell(caster, spell, mode))
|
||||
{
|
||||
cast(env);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
BattleHex BattleSpellCastParameters::getFirstDestinationHex() const
|
||||
|
||||
@@ -57,7 +57,8 @@ public:
|
||||
void cast(const SpellCastEnvironment * env);
|
||||
|
||||
///cast with silent check for permitted cast
|
||||
void castIfPossible(const SpellCastEnvironment * env);
|
||||
///returns true if cast was permitted
|
||||
bool castIfPossible(const SpellCastEnvironment * env);
|
||||
|
||||
BattleHex getFirstDestinationHex() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user