added Curse of Wizardry from Rise of the Eldrazi

This commit is contained in:
jendave
2011-08-06 04:17:59 +00:00
parent e44bda4b1c
commit 521f90909c
4 changed files with 70 additions and 1 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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) {

View File

@@ -194,6 +194,7 @@ public class GameActionUtil {
playCard_Mold_Adder(c);
playCard_Fable_of_Wolf_and_Owl(c);
playCard_Kor_Firewalker(c);
playCard_Curse_of_Wizardry(c);
}
public static void playCard_Kozilek(Card c)
@@ -2145,6 +2146,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<String> cl=CardUtil.getColors(c);
for (int i=0;i<list.size();i++) {
final Card card = list.get(i);
if(cl.contains(card.getChosenColor())) {
Ability ability = new Ability(card, "0") {
public void resolve() {
AllZone.GameAction.getPlayerLife(c.getController()).subtractLife(1);
} //resolve
};//ability
ability.setStackDescription(card.getName() + " - " + c.getController() +
" played a "+card.getChosenColor()+" spell, " + c.getController()+" loses 1 life.");
AllZone.Stack.add(ability);
}
}//if
}//if
}//Curse of Wizardry
public static void executeDrawCardTriggeredEffects(String player) {
drawCardTriggered_Niv_Mizzet(player);