1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

* partially reverted r861 - one of those lines is actually useful

* fixed bug with defending / waiting while no stack is active
This commit is contained in:
mateuszb 2009-05-12 17:30:32 +00:00
parent 51216c224d
commit cc053e4dc2
2 changed files with 5 additions and 2 deletions

View File

@ -1028,12 +1028,14 @@ void CBattleInterface::bSpellf()
void CBattleInterface::bWaitf()
{
giveCommand(8,0,activeStack);
if(activeStack != -1)
giveCommand(8,0,activeStack);
}
void CBattleInterface::bDefencef()
{
giveCommand(3,0,activeStack);
if(activeStack != -1)
giveCommand(3,0,activeStack);
}
void CBattleInterface::bConsoleUpf()

View File

@ -2393,6 +2393,7 @@ bool CGameHandler::makeCustomAction( BattleAction &ba )
|| (h->mana < s->costs[skill]) //not enough mana
|| (ba.additionalInfo < 10) //it's adventure spell (not combat)
|| (gs->curB->castSpells[ba.side]) //spell has been cast
|| (secondHero && secondHero->hasBonusOfType(HeroBonus::SPELL_IMMUNITY, s->id)) //non - casting hero provides immunity for this spell
|| (gs->battleMaxSpellLevel() < s->level) //non - casting hero stops caster from casting this spell
)
{