mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Add some useful comments
This commit is contained in:
parent
3836f132d3
commit
6119898932
@ -998,9 +998,13 @@ void BattleActionsController::activateStack()
|
||||
};
|
||||
bool hasShootSecondaryAction = std::any_of(possibleActions.begin() + 1, possibleActions.end(), shootActionPredicate);
|
||||
|
||||
if(hasShootSecondaryAction)
|
||||
if(hasShootSecondaryAction) //casters may have shooting capabilities, for example storm elementals
|
||||
actionsToSelect.emplace_back(PossiblePlayerBattleAction::SHOOT);
|
||||
|
||||
/* TODO: maybe it would also make sense to check spellcast as non-top priority action ("NO_SPELLCAST_BY_DEFAULT" bonus)?
|
||||
* it would require going beyond this "if" block for melee casters
|
||||
* F button helps, but some mod creatures may have that bonus and more than 1 castable spell */
|
||||
|
||||
actionsToSelect.emplace_back(PossiblePlayerBattleAction::ATTACK); //always allow melee attack as last option
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user