private double distanceToWoundedAllies(@NotNull Position p) {
        double result = 0;
        for (Warrior ally : situation.allies) {
            if (ally.equals(situation.self)) continue;
            Integer dist = situation.board.distance(ally.point, p.me);
            if (dist == null || dist == 0) continue;
            int toHeal = ally.getMaximalHitpoints() - p.allyHp[ally.index];
            if (toHeal > 60) result += 3 * dist;
            else if (toHeal > 15) result += dist;
            else if (toHeal > 0) result += 0.1 * dist;
        }
        return result;
    }