public Unit getUnitForEffect(Colony colony, Effect effect, Random random) {
        List<Unit> units = new ArrayList<Unit>();
        for (Unit unit : colony.getUnitList()) {
            if (effect.appliesTo(unit.getType())) {
                units.add(unit);
            }
        }
        if (units.isEmpty()) {
            return null;
        } else {
            return Utils.getRandomMember(logger, "select unit", units, random);
        }
    }