diff --git a/res/cardsfolder/covetous_dragon.txt b/res/cardsfolder/covetous_dragon.txt index 39b88244074..cb2f8256ec3 100644 --- a/res/cardsfolder/covetous_dragon.txt +++ b/res/cardsfolder/covetous_dragon.txt @@ -1,9 +1,10 @@ Name:Covetous Dragon ManaCost:4 R Types:Creature Dragon -Text:When you control no artifacts, sacrifice Covetous Dragon. +Text:no text PT:6/5 K:Flying +K:When you control no artifacts, sacrifice CARDNAME. SVar:RemAIDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/covetous_dragon.jpg diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index faa184c5f6b..c15ebca1544 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -11447,6 +11447,7 @@ public class GameActionUtil { Sacrifice_NoIslands.execute(); Sacrifice_NoForests.execute(); + Sacrifice_NoArtifacts.execute(); Sacrifice_NoLands.execute(); Sacrifice_NoCreatures.execute(); @@ -14130,33 +14131,6 @@ public class GameActionUtil { };//Plague_Rats - public static Command Covetous_Dragon = new Command() { - private static final long serialVersionUID = -8898010588711890705L; - - int artifacts = 0; - - public void execute() { - CardList creature = AllZoneUtil.getCardsInPlay("Covetous Dragon"); - - for(int i = 0; i < creature.size(); i++) { - Card c = creature.get(i); - artifacts = countArtifacts(c); - if(artifacts == 0) { - AllZone.GameAction.sacrifice(c); - } - } - - }//execute() - - private int countArtifacts(Card c) { - PlayerZone play = AllZone.getZone( - Constant.Zone.Battlefield, c.getController()); - CardList artifacts = new CardList(play.getCards()); - artifacts = artifacts.getType("Artifact"); - return artifacts.size(); - } - }; - public static Command Phylactery_Lich = new Command() { private static final long serialVersionUID = -1606115081917467754L; @@ -14299,6 +14273,36 @@ public class GameActionUtil { }//execute() }; + public static Command Sacrifice_NoArtifacts = new Command() { + private static final long serialVersionUID = -2546650213674544590L; + int artifacts = 0; + + public void execute() { + CardList list = AllZoneUtil.getCardsInPlay(); + + list = list.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.getKeyword().contains("When you control no artifacts, sacrifice CARDNAME."); + } + }); + + for(int i = 0; i < list.size(); i++) { + Card c = list.get(i); + artifacts = countArtifacts(c); + if(artifacts == 0) { + AllZone.GameAction.sacrifice(c); + } + } + + }//execute() + + private int countArtifacts(Card c) { + CardList artifacts = AllZoneUtil.getPlayerTypeInPlay(c.getController(), "Artifact"); + return artifacts.size(); + } + + }; + public static Command Sacrifice_NoLands = new Command() { private static final long serialVersionUID = 2768929064034728027L; @@ -15985,7 +15989,6 @@ public class GameActionUtil { commands.put("Coat_of_Arms", Coat_of_Arms); //commands.put("Cognivore", Cognivore); commands.put("Conspiracy", Conspiracy); - commands.put("Covetous_Dragon", Covetous_Dragon); //commands.put("Crowd_of_Cinders", Crowd_of_Cinders); //commands.put("Dakkon_Blackblade", Dakkon_Blackblade); diff --git a/src/forge/StaticEffects.java b/src/forge/StaticEffects.java index 04c11e844a6..e4071528171 100644 --- a/src/forge/StaticEffects.java +++ b/src/forge/StaticEffects.java @@ -36,7 +36,6 @@ public class StaticEffects cardToEffectsList.put("Coat of Arms", new String[] {"Coat_of_Arms"}); //cardToEffectsList.put("Cognivore", new String[] {"Cognivore"}); cardToEffectsList.put("Conspiracy", new String[] {"Conspiracy"}); - cardToEffectsList.put("Covetous Dragon", new String[] {"Covetous_Dragon"}); //cardToEffectsList.put("Crowd of Cinders", new String[] {"Crowd_of_Cinders"}); //cardToEffectsList.put("Dakkon Blackblade", new String[] {"Dakkon_Blackblade"});