private static void removeResolve(final AbilityFactory af, final SpellAbility sa) {
        HashMap<String, String> params = af.getMapParams();

        Card card = af.getHostCard();
        String type = params.get("CounterType");
        int counterAmount = AbilityFactory.calculateAmount(af.getHostCard(), params.get("CounterNum"), sa);

        ArrayList<Card> tgtCards;

        Target tgt = af.getAbTgt();
        if (tgt != null)
            tgtCards = tgt.getTargetCards();
        else {
            tgtCards = AbilityFactory.getDefinedCards(card, params.get("Defined"), sa);
        }

        for (Card tgtCard : tgtCards)
            if (tgt == null || CardFactoryUtil.canTarget(card, tgtCard)) {
                PlayerZone zone = AllZone.getZone(tgtCard);

                if (zone.is(Constant.Zone.Battlefield) || zone.is(Constant.Zone.Exile))
                    if (params.containsKey("UpTo") && sa.getActivatingPlayer().isHuman()) {
                        ArrayList<String> choices = new ArrayList<String>();
                        for (int i = 0; i <= counterAmount; i++) choices.add("" + i);
                        Object o = GuiUtils.getChoice("Select the number of " + type + " counters to remove", choices.toArray());
                        counterAmount = Integer.parseInt((String) o);
                    }
                tgtCard.subtractCounter(Counters.valueOf(type), counterAmount);
            }
    }