mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +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:
@@ -1028,12 +1028,14 @@ void CBattleInterface::bSpellf()
|
|||||||
|
|
||||||
void CBattleInterface::bWaitf()
|
void CBattleInterface::bWaitf()
|
||||||
{
|
{
|
||||||
giveCommand(8,0,activeStack);
|
if(activeStack != -1)
|
||||||
|
giveCommand(8,0,activeStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBattleInterface::bDefencef()
|
void CBattleInterface::bDefencef()
|
||||||
{
|
{
|
||||||
giveCommand(3,0,activeStack);
|
if(activeStack != -1)
|
||||||
|
giveCommand(3,0,activeStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBattleInterface::bConsoleUpf()
|
void CBattleInterface::bConsoleUpf()
|
||||||
|
|||||||
@@ -2393,6 +2393,7 @@ bool CGameHandler::makeCustomAction( BattleAction &ba )
|
|||||||
|| (h->mana < s->costs[skill]) //not enough mana
|
|| (h->mana < s->costs[skill]) //not enough mana
|
||||||
|| (ba.additionalInfo < 10) //it's adventure spell (not combat)
|
|| (ba.additionalInfo < 10) //it's adventure spell (not combat)
|
||||||
|| (gs->curB->castSpells[ba.side]) //spell has been cast
|
|| (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
|
|| (gs->battleMaxSpellLevel() < s->level) //non - casting hero stops caster from casting this spell
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user