public static bool ApplyFireball(Fireball ability) { KeyValuePair <ushort, Hero>[] enemyheroes = heroes.Where(f => f.Value.GetFaction() != ability.GetFaction() && !f.Value.IsDead()).ToArray(); foreach (KeyValuePair <ushort, Hero> enemy in enemyheroes) { if (ServerMath.Distance(ability, enemy.Value) <= 0) { ability.Attack(enemy.Value, 180); return(true); } } return(false); }
void Fire() { Fireball.Attack(); }