diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 0bcf5b5d7b5..e7131afce24 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg +curse_of_wizardry.jpg http://www.wizards.com/global/images/magic/general/curse_of_wizardry.jpg kor_line_slinger.jpg http://www.wizards.com/global/images/magic/general/kor_line_slinger.jpg dawnglare_invoker.jpg http://www.wizards.com/global/images/magic/general/dawnglare_invoker.jpg perimeter_captain.jpg http://www.wizards.com/global/images/magic/general/perimeter_captain.jpg diff --git a/res/cards.txt b/res/cards.txt index 2424c5ab383..4aa621bcf17 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,8 @@ +Curse of Wizardry +2 B B +Enchantment +As Curse of Wizardry enters the battlefield, choose a color. Whenever a player casts a spell of the chosen color, that player loses 1 life. + Kor Line-Slinger 1 W Creature Kor Scout diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index b151a885f08..c2ffe5971b9 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -19276,6 +19276,45 @@ public class CardFactory implements NewConstants { card.addSpellAbility(spell); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Curse of Wizardry")) { + final Ability ability = new Ability(card, "0") { + @Override + public void resolve() { + if(card.getController().equals(Constant.Player.Human)) { + + String color = ""; + String[] colors = Constant.Color.Colors; + colors[colors.length - 1] = null; + + Object o = AllZone.Display.getChoice("Choose color", colors); + color = (String) o; + card.setChosenColor(color); + } else { + CardList list = AllZoneUtil.getPlayerCardsInLibrary(Constant.Player.Human); + list.add(AllZoneUtil.getPlayerHand(Constant.Player.Human)); + + if(list.size() > 0) { + String color = CardFactoryUtil.getMostProminentColor(list); + if(!color.equals("")) card.setChosenColor(color); + else card.setChosenColor("black"); + } else { + card.setChosenColor("black"); + } + } + } + }; + Command comesIntoPlay = new Command() { + private static final long serialVersionUID = -6417019967914398902L; + + public void execute() { + AllZone.Stack.add(ability); + } + };//Command + ability.setStackDescription("As "+cardName+" enters the battlefield, choose a color."); + card.addComesIntoPlayCommand(comesIntoPlay); + }//*************** END ************ END ************************** + // Cards with Cycling abilities // -1 means keyword "Cycling" not found if(hasKeyword(card, "Cycling") != -1) { diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 45a31e22544..4cbb81f5d48 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -193,7 +193,8 @@ public class GameActionUtil { playCard_Enchantress_Draw(c); playCard_Mold_Adder(c); playCard_Fable_of_Wolf_and_Owl(c); - playCard_Kor_Firewalker(c); + playCard_Kor_Firewalker(c); + playCard_Curse_of_Wizardry(c); } public static void playCard_Kozilek(Card c) @@ -2144,6 +2145,29 @@ public class GameActionUtil { } }//Kor Firewalker + + public static void playCard_Curse_of_Wizardry(final Card c) { + System.out.println("In curse of wizardry"); + CardList list = AllZoneUtil.getCardsInPlay("Curse of Wizardry"); + + if(list.size() > 0){ + ArrayList cl=CardUtil.getColors(c); + + for (int i=0;i