1
0
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:
DjWarmonger
2011-10-04 13:12:29 +00:00
parent fa6bddcad5
commit 8c2dd9fdce
4 changed files with 59 additions and 19 deletions

View File

@@ -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;