convert Nath of the Gilt-Leaf to triggers

This commit is contained in:
jendave
2011-08-06 19:17:24 +00:00
parent 3ef2272e58
commit f5fc770120
4 changed files with 5 additions and 46 deletions

View File

@@ -1,8 +1,12 @@
Name:Nath of the Gilt-Leaf
ManaCost:3 B G
Types:Legendary Creature Elf Warrior
Text:At the beginning of your upkeep, you may have target opponent discard a card at random.\r\nWhenever an opponent discards a card, you may put a 1/1 green Elf Warrior creature token onto the battlefield.
Text:no text
PT:4/4
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDiscard | Optional$ True | TriggerDescription$ At the beginning of your upkeep, you may have target opponent discard a card at random.
SVar:TrigDiscard:AB$Discard | Cost$ 0 | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | NumCards$ 1 | Mode$ Random
T:Mode$ Discarded | ValidCard$ Card.YouDontCtrl | TriggerZones$ Battlefield | Execute$ TrigToken | Optional$ True | TriggerDescription$ Whenever an opponent discards a card, you may put a 1/1 green Elf Warrior creature token onto the battlefield.
SVar:TrigToken:AB$Token | Cost$ 0 | TokenAmount$ 1 | TokenName$ Elf Warrior | TokenTypes$ Creature,Elf,Warrior | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/nath_of_the_gilt_leaf.jpg
SetInfo:LRW|Rare|http://magiccards.info/scans/en/lw/250.jpg

View File

@@ -331,22 +331,6 @@ public class GameAction {
return false;
}
public void discard_nath(Card discardedCard) {
final Player owner = discardedCard.getOwner();
final Player opponent = owner.getOpponent();
PlayerZone opponentZone = AllZone.getZone(Constant.Zone.Battlefield, opponent);
CardList opponentList = new CardList(opponentZone.getCards());
for(int i = 0; i < opponentList.size(); i++) {
Card card = opponentList.get(i);
if(card.getName().equals("Nath of the Gilt-Leaf")) {
CardFactoryUtil.makeToken("Elf Warrior", "G 1 1 Elf Warrior", opponent, "G",
new String[] {"Creature", "Elf", "Warrior"}, 1, 1, new String[] {});
}
}
}
public void discard_PutIntoPlayInstead(Card c)
{
moveToPlay(c);

View File

@@ -51,7 +51,6 @@ public class GameActionUtil {
upkeep_Greener_Pastures();
upkeep_Heartmender();
upkeep_Nath();
upkeep_Anowon();
upkeep_Cunning_Lethemancer();
upkeep_Shapeshifter();
@@ -4789,33 +4788,6 @@ public class GameActionUtil {
} // if creatures > 0
}//upkeep_Heartmender
private static void upkeep_Nath() {
final Player player = AllZone.Phase.getPlayerTurn();
final Player opponent = player.getOpponent();
PlayerZone zone1 = AllZone.getZone(Constant.Zone.Battlefield, player);
CardList list = new CardList(zone1.getCards());
list = list.getName("Nath of the Gilt-Leaf");
Ability ability;
for(int i = 0; i < list.size(); i++) {
ability = new Ability(list.get(i), "0") {
@Override
public void resolve() {
opponent.discardRandom(this);
}
}; // ability
StringBuilder sb = new StringBuilder();
sb.append("Nath of the Gilt-Leaf - ").append(opponent).append(" discards a card at random.");
ability.setStackDescription(sb.toString());
AllZone.Stack.add(ability);
}
}
private static void upkeep_Anowon() {
final Player player = AllZone.Phase.getPlayerTurn();
CardList list = AllZoneUtil.getPlayerCardsInPlay(player, "Anowon, the Ruin Sage");

View File

@@ -648,7 +648,6 @@ public abstract class Player extends MyObservable{
}
}
AllZone.GameAction.discard_nath(c);
AllZone.GameAction.discard_megrim(c);
// necro disrupts madness