+void PerformAttacks::AddNumberAnimations(const TargetSelection &ts) {
+ if (ts.TargetsEnemies()) {
+ for (int i(0); i < battle->MaxMonsters(); ++i) {
+ if (ts.IsBad(i)) {
+ numberAnimation.push_back(NumberAnimation(ts.GetAmount(i), battle->Res().numberAnimationPrototype, battle->Res().bigNumberSprite));
+ numberPosition.push_back(
+ battle->MonsterPositions()[i]);
+ } else if (ts.IsGood(i)) {
+ numberAnimation.push_back(NumberAnimation(ts.GetAmount(i), battle->Res().numberAnimationPrototype, battle->Res().greenNumberSprite));
+ numberPosition.push_back(
+ battle->MonsterPositions()[i]);
+ }
+ }
+ } else {
+ for (int i(0); i < battle->NumHeroes(); ++i) {
+ if (ts.IsBad(i)) {
+ numberAnimation.push_back(NumberAnimation(ts.GetAmount(i), battle->Res().numberAnimationPrototype, battle->Res().bigNumberSprite));
+ numberPosition.push_back(
+ battle->HeroesPositions()[i]);
+ } else if (ts.IsGood(i)) {
+ numberAnimation.push_back(NumberAnimation(ts.GetAmount(i), battle->Res().numberAnimationPrototype, battle->Res().greenNumberSprite));
+ numberPosition.push_back(
+ battle->HeroesPositions()[i]);
+ }
+ }
+ }
+}
+