mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
hack-fixed ENCHANTED trigger for first 2 rounds
This commit is contained in:
parent
0f5202689e
commit
754d63f7a5
@ -5750,11 +5750,14 @@ void CGameHandler::runBattle()
|
||||
}
|
||||
}
|
||||
|
||||
bool firstRound = true;//FIXME: why first round is -1?
|
||||
|
||||
//main loop
|
||||
while (!battleResult.get()) //till the end of the battle ;]
|
||||
{
|
||||
BattleNextRound bnr;
|
||||
bnr.round = gs->curB->round + 1;
|
||||
logGlobal->debug("Round %d", bnr.round);
|
||||
sendAndApply(&bnr);
|
||||
|
||||
auto obstacles = gs->curB->obstacles; //we copy container, because we're going to modify it
|
||||
@ -5769,7 +5772,7 @@ void CGameHandler::runBattle()
|
||||
|
||||
for(auto stack : curB.stacks)
|
||||
{
|
||||
if(stack->alive() && curB.round > 1)
|
||||
if(stack->alive() && !firstRound)
|
||||
stackEnchantedTrigger(stack);
|
||||
}
|
||||
|
||||
@ -6001,6 +6004,7 @@ void CGameHandler::runBattle()
|
||||
}
|
||||
|
||||
}
|
||||
firstRound = false;
|
||||
}
|
||||
|
||||
endBattle(gs->curB->tile, gs->curB->battleGetFightingHero(0), gs->curB->battleGetFightingHero(1));
|
||||
|
Loading…
Reference in New Issue
Block a user