screwed over by input again...

Everytime I think I start to understand input and abilities better, I run into something that screws me over.
Mana Vault is my latest example. In GameActionUtil, I have an upkeep method to handle this:
"At the beginning of your upkeep, you may pay 4. If you do, untap Mana Vault."
So, the code looks like:
1) in it's current form, no mana cost is prompted to be paid
2) nothing is put on the stack
3) the resolve() is thus, expectedly ignored
If I uncomment the AllZone.Stack.add(untap), then it goes on the stack, but mana is not prompted for.
Obviously, my untap.setBeforePayMana(new Input_PayManaCost(untap)); is doing nothing.
What bonehead thing am I doing wrong?
Thanks,
-slapshot5
Mana Vault is my latest example. In GameActionUtil, I have an upkeep method to handle this:
"At the beginning of your upkeep, you may pay 4. If you do, untap Mana Vault."
So, the code looks like:
- Code: Select all
private static void upkeep_Mana_Vault() {
//this card is filtered out for the computer, so we will only worry about Human here
final String player = AllZone.Phase.getActivePlayer();
CardList vaults = AllZoneUtil.getPlayerCardsInPlay(player, "Mana Vault");
for(Card vault:vaults) {
if(vault.isTapped()) {
final Card thisVault = vault;
final String[] choices = {"Yes", "No"};
Object o = AllZone.Display.getChoice("Untap Mana Vault?", choices);
String choice = (String) o;
if(choice.equals("Yes")) {
//prompt for pay mana cost, then untap
final SpellAbility untap = new Ability(thisVault, "4") {
@Override
public void resolve() {
thisVault.untap();
}
};//Ability
untap.setStackDescription("Untap "+thisVault);
untap.setBeforePayMana(new Input_PayManaCost(untap));
//AllZone.Stack.add(untap);
}
}
}
}
1) in it's current form, no mana cost is prompted to be paid
2) nothing is put on the stack
3) the resolve() is thus, expectedly ignored
If I uncomment the AllZone.Stack.add(untap), then it goes on the stack, but mana is not prompted for.
Obviously, my untap.setBeforePayMana(new Input_PayManaCost(untap)); is doing nothing.
What bonehead thing am I doing wrong?
Thanks,
-slapshot5