mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Battle AI: archangels cast again
This commit is contained in:
parent
1eabb738dc
commit
a7859dae39
@ -1732,6 +1732,10 @@ SpellID CBattleInfoCallback::getRandomCastedSpell(CRandomGenerator & rand,const
|
||||
TConstBonusListPtr bl = caster->getBonuses(Selector::type()(BonusType::SPELLCASTER));
|
||||
if (!bl->size())
|
||||
return SpellID::NONE;
|
||||
|
||||
if(bl->size() == 1)
|
||||
return SpellID(bl->front()->subtype);
|
||||
|
||||
int totalWeight = 0;
|
||||
for(const auto & b : *bl)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user