mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
More mechanics for creature spells.
This commit is contained in:
@@ -3511,13 +3511,7 @@ void CBattleInterface::activateStack()
|
||||
{
|
||||
stackCanCastSpell = true;
|
||||
|
||||
TBonusListPtr bl = s->getBonuses(Selector::type(Bonus::SPELLCASTER));
|
||||
BOOST_FOREACH(Bonus * b, *bl)
|
||||
{
|
||||
stackSpells.push_back(CGI->spellh->spells[b->subtype]);
|
||||
}
|
||||
if (stackSpells.size())
|
||||
creatureSpellToCast = stackSpells[111 % stackSpells.size()]; //TODO: randomize? weighted chance?
|
||||
|
||||
}
|
||||
else
|
||||
stackCanCastSpell = false;
|
||||
|
||||
Reference in New Issue
Block a user