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

        ArrayList<SpellAbility> tgtSpells;

        Target tgt = af.getAbTgt();
        if (tgt != null)
            tgtSpells = tgt.getTargetSAs();
        else
            tgtSpells = AbilityFactory.getDefinedSpellAbilities(sa.getSourceCard(), params.get("Defined"), sa);

        if (tgtSpells.size() == 0)
            return;

        SpellAbility chosenSA = null;
        if (tgtSpells.size() == 1)
            chosenSA = tgtSpells.get(0);
        else if (sa.getActivatingPlayer().isHuman())
            chosenSA = (SpellAbility) GuiUtils.getChoice("Select a spell to copy", tgtSpells.toArray());
        else
            chosenSA = tgtSpells.get(0);

        if (tgt == null || CardFactoryUtil.canTarget(card, chosenSA.getSourceCard()))
            AllZone.getCardFactory().copySpellontoStack(card, chosenSA.getSourceCard(), chosenSA, true);
    }//end resolve