public override void Heal() { var cells = AllyCells .Where(x => x.Unit.CurrentHealth < x.Unit.Data.Health) .ToList(); var random = new Random().Next(0, cells.Count); BattleUnitsView.TargetCell = cells[random]; ProjectileSpawner.CreateHealProjectile(base.Heal); }
public void SetTargets() { if (ActiveUnit.Data.AttackType == AttackType.Heal) { AllyCells .Where(x => x.Unit.CurrentHealth < x.Unit.Data.Health) .ToList() .ForEach(x => x.SetTargetIcon(true)); } EnemyCells.ForEach(x => x.SetTargetIcon(true)); }