private static boolean matchesValid(Object o, String[] valids, SpellAbility sa) {
        Card srcCard = sa.getSourceCard();
        Player activatingPlayer = sa.getActivatingPlayer();
        if (o instanceof Card) {
            Card c = (Card) o;
            return c.isValidCard(valids, activatingPlayer, srcCard);
        }

        if (o instanceof Player) {
            for (String v : valids) {
                if (v.equalsIgnoreCase("Player"))
                    return true;

                if (v.equalsIgnoreCase("Opponent")) {
                    if (o.equals(activatingPlayer.getOpponent())) {
                        return true;
                    }
                }
                if (v.equalsIgnoreCase("You"))
                    return o.equals(activatingPlayer);
            }
        }

        if (o instanceof SpellAbility) {
            Card c = ((SpellAbility) o).getSourceCard();
            return c.isValidCard(valids, activatingPlayer, srcCard);
        }

        return false;
    }