mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
added Curse of Wizardry from Rise of the Eldrazi
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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<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) {
|
||||
|
||||
Reference in New Issue
Block a user