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