convert Dance of the Dead upkeep ability to script (also fixes Human being prompted when it's under computer's control)

This commit is contained in:
slapshot5
2011-08-27 18:23:45 +00:00
parent c4e26d6aba
commit 99d7410adb
2 changed files with 3 additions and 44 deletions

View File

@@ -83,7 +83,6 @@ public class Upkeep implements java.io.Serializable {
upkeep_Dega_Sanctuary();
upkeep_Ceta_Sanctuary();
upkeep_Tangle_Wire();
upkeep_Dance_of_the_Dead();
@@ -881,48 +880,6 @@ public class Upkeep implements java.io.Serializable {
AllZone.getGameAction().playSpellAbilityForFree(c.getSpellPermanent());
}
/**
* <p>upkeep_Dance_of_the_Dead.</p>
*/
private static void upkeep_Dance_of_the_Dead() {
final Player player = AllZone.getPhase().getPlayerTurn();
CardList dances = AllZoneUtil.getPlayerCardsInPlay(player, "Dance of the Dead");
for (Card dance : dances) {
final Card source = dance;
final ArrayList<Card> list = source.getEnchanting();
final Card creature = list.get(0);
if (creature.isTapped()) {
Ability vaultChoice = new Ability(source, "0") {
@Override
public void resolve() {
if (GameActionUtil.showYesNoDialog(source, "Untap " + creature.getName() + "?")) {
//prompt for pay mana cost, then untap
final SpellAbility untap = new Ability(source, "1 B") {
@Override
public void resolve() {
creature.untap();
}
};//Ability
StringBuilder sb = new StringBuilder();
sb.append("Untap ").append(creature);
untap.setStackDescription(sb.toString());
AllZone.getGameAction().playSpellAbility(untap);
}
}
};
vaultChoice.setStackDescription(source.getName() + " - Untap creature during Upkeep?");
AllZone.getStack().addSimultaneousStackEntry(vaultChoice);
}
}
}
/////////////////////////
// Start of Kinship cards