mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Fixed Enchanter ability.
This commit is contained in:
parent
ca4a34df7b
commit
bbdac2f068
@ -4496,7 +4496,7 @@ void CGameHandler::stackTurnTrigger(const CStack * st)
|
||||
if (st->alive())
|
||||
{
|
||||
//unbind
|
||||
if (st->getEffect(72))
|
||||
if (st->getEffect (SpellID::BIND))
|
||||
{
|
||||
bool unbind = true;
|
||||
BonusList bl = *(st->getBonuses(Selector::type(Bonus::BIND_EFFECT)));
|
||||
@ -4590,7 +4590,7 @@ void CGameHandler::stackTurnTrigger(const CStack * st)
|
||||
{
|
||||
int index = rand() % bl.size();
|
||||
SpellID spellID = SpellID(bl[index]->subtype);
|
||||
if (gs->curB->battleCanCastThisSpell(st->owner, SpellID(spellID).toSpell(), ECastingMode::ENCHANTER_CASTING)) //TODO: select another?
|
||||
if (gs->curB->battleCanCastThisSpell(st->owner, SpellID(spellID).toSpell(), ECastingMode::ENCHANTER_CASTING) == ESpellCastProblem::OK) //TODO: select another available?
|
||||
{
|
||||
int spellLeveL = bl[index]->val; //spell level
|
||||
const CGHeroInstance * enemyHero = gs->curB->getHero(gs->curB->theOtherPlayer(st->owner));
|
||||
|
Loading…
Reference in New Issue
Block a user