mirror of
https://github.com/vcmi/vcmi.git
synced 2026-05-22 09:55:17 +02:00
Allow toggling quick combat spells usage
This commit is contained in:
@@ -93,6 +93,12 @@ void CBattleAI::initBattleInterface(std::shared_ptr<Environment> ENV, std::share
|
||||
movesSkippedByDefense = 0;
|
||||
}
|
||||
|
||||
void CBattleAI::initBattleInterface(std::shared_ptr<Environment> ENV, std::shared_ptr<CBattleCallback> CB, AutocombatPreferences autocombatPreferences)
|
||||
{
|
||||
initBattleInterface(ENV, CB);
|
||||
autobattlePreferences = autocombatPreferences;
|
||||
}
|
||||
|
||||
BattleAction CBattleAI::useHealingTent(const CStack *stack)
|
||||
{
|
||||
auto healingTargets = cb->battleGetStacks(CBattleInfoEssentials::ONLY_MINE);
|
||||
@@ -283,7 +289,8 @@ void CBattleAI::activeStack( const CStack * stack )
|
||||
return;
|
||||
}
|
||||
|
||||
attemptCastingSpell();
|
||||
if(autobattlePreferences.enableSpellsUsage)
|
||||
attemptCastingSpell();
|
||||
|
||||
logAi->trace("Spellcast attempt completed in %lld", timeElapsed(start));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user