mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
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:
@@ -1,8 +1,10 @@
|
||||
Name:Dance of the Dead
|
||||
ManaCost:1 B
|
||||
Types:Enchantment Aura
|
||||
Text:Enchant creature card in a graveyard\r\n\r\nWhen CARDNAME enters the battlefield, if it's on the battlefield, it loses "enchant creature card in a graveyard" and gains "enchant creature put onto the battlefield with CARDNAME." Return enchanted creature card to the battlefield tapped under your control and attach CARDNAME to it. When CARDNAME leaves the battlefield, that creature's controller sacrifices it.\r\n\r\nAt the beginning of the upkeep of enchanted creature's controller, that player may pay 1 B. If he or she does, untap that creature.
|
||||
Text:Enchant creature card in a graveyard\r\n\r\nWhen CARDNAME enters the battlefield, if it's on the battlefield, it loses "enchant creature card in a graveyard" and gains "enchant creature put onto the battlefield with CARDNAME." Return enchanted creature card to the battlefield tapped under your control and attach CARDNAME to it. When CARDNAME leaves the battlefield, that creature's controller sacrifices it.
|
||||
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 1 | AddToughness$ 1 | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature gets +1/+1 and doesn't untap during its controller's untap step.
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ EnchantedController | TriggerZones$ Battlefield | OptionalDecider$ EnchantedController | Execute$ TrigUntap | TriggerDescription$ At the beginning of the upkeep of enchanted creature's controller, that player may pay 1 B. If he or she does, untap that creature.
|
||||
SVar:TrigUntap:AB$Untap | Cost$ 1 B | Defined$ Enchanted
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/dance_of_the_dead.jpg
|
||||
SetInfo:ICE|Uncommon|http://magiccards.info/scans/en/ia/6.jpg
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
|
||||
@@ -882,48 +881,6 @@ public class Upkeep implements java.io.Serializable {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <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
|
||||
/////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user