private static boolean digCanPlayAI(final AbilityFactory af, final SpellAbility sa) {

        Card source = sa.getSourceCard();

        if (!ComputerUtil.canPayCost(sa))
            return false;

        double chance = .4;    // 40 percent chance with instant speed stuff
        if (AbilityFactory.isSorcerySpeed(sa))
            chance = .667;    // 66.7% chance for sorcery speed (since it will never activate EOT)
        Random r = MyRandom.random;
        boolean randomReturn = r.nextFloat() <= Math.pow(chance, source.getAbilityUsed() + 1);

        Target tgt = sa.getTarget();
        Player libraryOwner = AllZone.getComputerPlayer();

        if (sa.getTarget() != null) {
            tgt.resetTargets();
            if (!AllZone.getHumanPlayer().canTarget(source))
                return false;
            else
	            sa.getTarget().addTarget(AllZone.getHumanPlayer());
	            libraryOwner = AllZone.getHumanPlayer();
        }

        //return false if nothing to dig into
        if (AllZoneUtil.getCardsInZone(Constant.Zone.Library, libraryOwner).isEmpty())
            return false;

        if (AbilityFactory.playReusable(sa))
            randomReturn = true;

        if (af.hasSubAbility()) {
            Ability_Sub abSub = sa.getSubAbility();
            if (abSub != null) {
                return randomReturn && abSub.chkAI_Drawback();
            }
        }

        return randomReturn;
    }