|
@@ -571,7 +571,8 @@ void BattleFlowProcessor::onActionMade(const CBattleInfoCallback & battle, const
|
|
|
assert(activeStack != nullptr);
|
|
|
assert(actedStack != nullptr);
|
|
|
|
|
|
- if(actedStack->castSpellThisTurn && SpellID(ba.spell).toSpell()->canCastWithoutSkip())
|
|
|
+ // NOTE: in case of random spellcaster, (e.g. Master Genie) spell has been selected by server and was not present in action received from player
|
|
|
+ if(actedStack->castSpellThisTurn && ba.spell.hasValue() && ba.spell.toSpell()->canCastWithoutSkip())
|
|
|
{
|
|
|
setActiveStack(battle, actedStack);
|
|
|
return;
|