private static boolean millTargetAI(AbilityFactory af, SpellAbility sa, boolean mandatory) {
        Target tgt = af.getAbTgt();
        HashMap<String, String> params = af.getMapParams();

        if (tgt != null) {
            tgt.resetTargets();
            Card source = sa.getSourceCard();
            if (!AllZone.getHumanPlayer().canTarget(source)) {
                if (mandatory && AllZone.getComputerPlayer().canTarget(source)) {
                    tgt.addTarget(AllZone.getComputerPlayer());
                    return true;
                }
                return false;
            }

            int numCards = AbilityFactory.calculateAmount(sa.getSourceCard(), params.get("NumCards"), sa);

            CardList pLibrary = AllZoneUtil.getCardsInZone(Constant.Zone.Library, AllZone.getHumanPlayer());

            if (pLibrary.size() == 0) {    // deck already empty, no need to mill
                if (!mandatory)
                    return false;

                tgt.addTarget(AllZone.getHumanPlayer());
                return true;
            }

            if (numCards >= pLibrary.size()) {
                // Can Mill out Human's deck? Do it!
                tgt.addTarget(AllZone.getHumanPlayer());
                return true;
            }

            // Obscure case when you know what your top card is so you might? want to mill yourself here
            // if (AI wants to mill self)
            // tgt.addTarget(AllZone.getComputerPlayer());
            // else
            tgt.addTarget(AllZone.getHumanPlayer());
        }
        return true;
    }