mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Let's cast combat spells again.
This commit is contained in:
parent
c1eea72fce
commit
68d106ff1a
@ -2393,8 +2393,6 @@ bool CGameHandler::makeCustomAction( BattleAction &ba )
|
||||
|| (h->mana < s->costs[skill]) //not enough mana
|
||||
|| (ba.additionalInfo < 10) //it's adventure spell (not combat)
|
||||
|| (gs->curB->castedSpells[ba.side]) //spell has been casted
|
||||
|| (secondHero && secondHero->hasBonusOfType(HeroBonus::SPELL_IMMUNITY, s->id)) //non - casting hero provides immunity for this spell
|
||||
|| (h->valOfBonuses(HeroBonus::BLOCK_SPELLS_ABOVE_LEVEL) <= s->level) //caster's 'bonus' prevents him from casting this spell
|
||||
|| (gs->battleMaxSpellLevel() < s->level) //non - casting hero stops caster from casting this spell
|
||||
)
|
||||
{
|
||||
@ -2619,4 +2617,4 @@ bool CGameHandler::isAllowedExchange( int id1, int id2 )
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user