mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-05 00:49:09 +02:00
Fixes for several discovered edge cases
This commit is contained in:
@ -2284,14 +2284,12 @@ void StartAction::applyGs(CGameState *gs)
|
||||
return;
|
||||
}
|
||||
|
||||
if(ba.actionType != EActionType::HERO_SPELL) //don't check for stack if it's custom action by hero
|
||||
{
|
||||
assert(st);
|
||||
}
|
||||
else
|
||||
{
|
||||
[[maybe_unused]] bool heroAction = ba.actionType == EActionType::HERO_SPELL || ba.actionType ==EActionType::SURRENDER || ba.actionType ==EActionType::RETREAT || ba.actionType == EActionType::END_TACTIC_PHASE;
|
||||
|
||||
assert(st || heroAction); // stack must exists for all non-hero actions
|
||||
|
||||
if(ba.actionType == EActionType::HERO_SPELL)
|
||||
gs->curB->sides[ba.side].usedSpellsHistory.emplace_back(ba.actionSubtype);
|
||||
}
|
||||
|
||||
switch(ba.actionType)
|
||||
{
|
||||
|
Reference in New Issue
Block a user