1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

AI will now respect current value of "Use spells in autocombat" setting

This commit is contained in:
Ivan Savenko 2023-11-28 15:48:35 +02:00
parent 6cfa21466c
commit d326c53b9a
2 changed files with 1 additions and 2 deletions

View File

@ -145,7 +145,7 @@ void CBattleAI::activeStack(const BattleID & battleID, const CStack * stack )
result = evaluator.selectStackAction(stack);
if(!skipCastUntilNextBattle && evaluator.canCastSpell())
if(autobattlePreferences.enableSpellsUsage && !skipCastUntilNextBattle && evaluator.canCastSpell())
{
auto spelCasted = evaluator.attemptCastingSpell(stack);

View File

@ -69,7 +69,6 @@
[
{
"name": "enableAutocombatSpellsCheckbox",
"help": "vcmi.battleOptions.enableAutocombatSpells",
"callback": "enableAutocombatSpellsChanged"
}
]