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:
parent
6cfa21466c
commit
d326c53b9a
@ -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);
|
||||
|
||||
|
@ -69,7 +69,6 @@
|
||||
[
|
||||
{
|
||||
"name": "enableAutocombatSpellsCheckbox",
|
||||
"help": "vcmi.battleOptions.enableAutocombatSpells",
|
||||
"callback": "enableAutocombatSpellsChanged"
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user