void Splash() { foreach (var hit in World.current.FindEntitiesWithinRadius(entity.position, splashRadius, entity.team)) { var dist = entity.Range(hit); Logger.Log("Splash on entity {0} at {1}, dist {2} ({3}), damage {4}", hit, hit.position, dist, dist / splashRadius, splashDamage * (1 - DReal.Clamp01(dist / splashRadius))); hit.Damage(splashDamage * (1 - DReal.Clamp01(dist / splashRadius)), entity); } entity.Destroy(); World.current.eventListener.Animate(entity, "Impact"); }