From 1f525dad0d97f206912f85c7958ac62175a39af3 Mon Sep 17 00:00:00 2001
From: Sloth
Date: Thu, 21 Jun 2012 18:22:36 +0000
Subject: [PATCH] - Converted Yawgmoth Demon to script.
---
res/cardsfolder/y/yawgmoth_demon.txt | 8 +++++++-
src/main/java/forge/game/phase/Upkeep.java | 11 +++++------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/res/cardsfolder/y/yawgmoth_demon.txt b/res/cardsfolder/y/yawgmoth_demon.txt
index dea414d917b..5b67d241626 100644
--- a/res/cardsfolder/y/yawgmoth_demon.txt
+++ b/res/cardsfolder/y/yawgmoth_demon.txt
@@ -1,10 +1,16 @@
Name:Yawgmoth Demon
ManaCost:4 B B
Types:Creature Demon
-Text:At the beginning of your upkeep, you may sacrifice an artifact. If you don't, tap Yawgmoth Demon and it deals 2 damage to you.
+Text:no text
PT:6/6
K:Flying
K:First Strike
+T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigElderSpawnSacrifice | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, you may sacrifice an artifact. If you don't, tap CARDNAME and it deals 2 damage to you.
+SVar:TrigElderSpawnSacrifice:AB$ Sacrifice | Cost$ 0 | SacValid$ Artifact | Optional$ True | RememberSacrificed$ True | SubAbility$ DBElderSpawnSacrificeMe
+SVar:DBElderSpawnSacrificeMe:DB$ Tap | Defined$ Self | ConditionDefined$ Remembered | ConditionPresent$ Artifact | ConditionCompare$ EQ0 | SubAbility$ DBElderSpawnDamage
+SVar:DBElderSpawnDamage:DB$ DealDamage | Defined$ You | NumDmg$ 2 | ConditionDefined$ Remembered | ConditionPresent$ Artifact | ConditionCompare$ EQ0 | SubAbility$ DBElderSpawnCleanup
+SVar:DBElderSpawnCleanup:DB$ Cleanup | ClearRemembered$ True
+SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/yawgmoth_demon.jpg
diff --git a/src/main/java/forge/game/phase/Upkeep.java b/src/main/java/forge/game/phase/Upkeep.java
index 1f320ddbe7d..b90d8a0c882 100644
--- a/src/main/java/forge/game/phase/Upkeep.java
+++ b/src/main/java/forge/game/phase/Upkeep.java
@@ -80,7 +80,7 @@ public class Upkeep extends Phase implements java.io.Serializable {
Upkeep.upkeepEcho();
Upkeep.upkeepTheAbyss();
- Upkeep.upkeepYawgmothDemon();
+ //Upkeep.upkeepYawgmothDemon();
Upkeep.upkeepDropOfHoney();
Upkeep.upkeepDemonicHordes();
Upkeep.upkeepTangleWire();
@@ -533,8 +533,7 @@ public class Upkeep extends Phase implements java.io.Serializable {
final StringBuilder sb = new StringBuilder();
sb.append(abyss.getName()).append(" - destroy a nonartifact creature of your choice.");
sacrificeCreature.setStackDescription(sb.toString());
- AllZone.getStack().addSimultaneousStackEntry(sacrificeCreature);
-
+ AllZone.getStack().addAndUnfreeze(sacrificeCreature);
} // end for
} // The Abyss
@@ -543,12 +542,12 @@ public class Upkeep extends Phase implements java.io.Serializable {
* upkeepYawgmothDemon.
*
*/
- private static void upkeepYawgmothDemon() {
+ /*private static void upkeepYawgmothDemon() {
/*
* At the beginning of your upkeep, you may sacrifice an artifact. If
* you don't, tap Yawgmoth Demon and it deals 2 damage to you.
*/
- final Player player = Singletons.getModel().getGameState().getPhaseHandler().getPlayerTurn();
+ /*final Player player = Singletons.getModel().getGameState().getPhaseHandler().getPlayerTurn();
final CardList cards = player.getCardsIn(ZoneType.Battlefield, "Yawgmoth Demon");
for (int i = 0; i < cards.size(); i++) {
@@ -611,7 +610,7 @@ public class Upkeep extends Phase implements java.io.Serializable {
AllZone.getStack().addSimultaneousStackEntry(sacrificeArtifact);
} // end for
- }
+ }*/
/**
*