mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
- Some work for commanders
- New creature window - visit forum for package with necessary graphics: http://forum.vcmi.eu/viewtopic.php?p=6908#6908 - More AI optimizations - heroes will be processed starting from the fastest one. - AI will check is GATHER_ARMY object is reachable
This commit is contained in:
@@ -991,18 +991,24 @@ void BattleResult::applyGs( CGameState *gs )
|
||||
const_cast<CArmedInstance*>(s->base->armyObj)->eraseStack(s->slot);
|
||||
}
|
||||
}
|
||||
for(unsigned i=0;i<gs->curB->stacks.size();i++)
|
||||
for (unsigned i = 0; i < gs->curB->stacks.size(); i++)
|
||||
delete gs->curB->stacks[i];
|
||||
|
||||
//remove any "until next battle" bonuses
|
||||
CGHeroInstance *h;
|
||||
h = gs->curB->heroes[0];
|
||||
if(h)
|
||||
h->getBonusList().remove_if(Bonus::OneBattle);
|
||||
|
||||
h = gs->curB->heroes[1];
|
||||
if(h)
|
||||
h->getBonusList().remove_if(Bonus::OneBattle);
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
h = gs->curB->heroes[i];
|
||||
if (h)
|
||||
{
|
||||
h->getBonusList().remove_if(Bonus::OneBattle);
|
||||
if (h->commander)
|
||||
{
|
||||
h->commander->giveStackExp(exp[i]);
|
||||
CBonusSystemNode::treeHasChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (GameConstants::STACK_EXP)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user