public static Input input_payXMana(final int numX, final SpellAbility sa, final Cost_Payment payment) {
        Input payX = new Input() {
            private static final long serialVersionUID = -6900234444347364050L;
            int xPaid = 0;
            ManaCost manaCost = new ManaCost(Integer.toString(numX));

            @Override
            public void showMessage() {
                if (manaCost.toString().equals(Integer.toString(numX))) // Can only cancel if partially paid an X value
                    ButtonUtil.enableAll();
                else
                    ButtonUtil.enableOnlyCancel();

                AllZone.getDisplay().showMessage("Pay X Mana Cost for " + sa.getSourceCard().getName() + "\n" + xPaid + " Paid so far.");
            }

            // selectCard
            @Override
            public void selectCard(Card card, PlayerZone zone) {
                if (sa.getSourceCard().equals(card) && sa.isTapAbility()) {
                    // this really shouldn't happen but just in case
                    return;
                }

                manaCost = Input_PayManaCostUtil.activateManaAbility(sa, card, manaCost);
                if (manaCost.isPaid()) {
                    manaCost = new ManaCost(Integer.toString(numX));
                    xPaid++;
                }

                if (AllZone.getInputControl().getInput() == this)
                    showMessage();
            }

            @Override
            public void selectButtonCancel() {
                payment.setCancel(true);
                payment.payCost();
                AllZone.getHumanBattlefield().updateObservers();//DO NOT REMOVE THIS, otherwise the cards don't always tap
                stop();
            }

            @Override
            public void selectButtonOK() {
                payment.setPayXMana(true);
                payment.getCard().setXManaCostPaid(xPaid);
                stop();
                payment.payCost();
            }

        };

        return payX;
    }