From db5e4e47da7e729af965b3ea59d23cd6aa578e74 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 08:44:02 +0000 Subject: [PATCH] add Primalcrux (from Eventide) --- .gitattributes | 1 + res/cardsfolder/primalcrux.txt | 9 +++++++++ src/forge/GameActionUtil.java | 19 +++++++++++++++++++ src/forge/StaticEffects.java | 1 + 4 files changed, 30 insertions(+) create mode 100644 res/cardsfolder/primalcrux.txt diff --git a/.gitattributes b/.gitattributes index add1da54beb..d09a2fd21b0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2917,6 +2917,7 @@ res/cardsfolder/primal_clay.txt -text svneol=native#text/plain res/cardsfolder/primal_frenzy.txt -text svneol=native#text/plain res/cardsfolder/primal_plasma.txt -text svneol=native#text/plain res/cardsfolder/primal_rage.txt -text svneol=native#text/plain +res/cardsfolder/primalcrux.txt -text svneol=native#text/plain res/cardsfolder/primeval_shambler.txt -text svneol=native#text/plain res/cardsfolder/primeval_titan.txt -text svneol=native#text/plain res/cardsfolder/primoc_escapee.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/primalcrux.txt b/res/cardsfolder/primalcrux.txt new file mode 100644 index 00000000000..e071a7966f5 --- /dev/null +++ b/res/cardsfolder/primalcrux.txt @@ -0,0 +1,9 @@ +Name:Primalcrux +ManaCost:G G G G G G +Types:Creature Elemental +Text:Chroma — Primalcrux's power and toughness are each equal to the number of green mana symbols in the mana costs of permanents you control. +PT:1/1 +K:Trample +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/primalcrux.jpg +End diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index a4b0684c407..74ede205e47 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -11781,6 +11781,24 @@ public class GameActionUtil { } }// execute() }; + + /** + * stores the Command + */ + public static Command Primalcrux = new Command() { + private static final long serialVersionUID = -5760985115546543522L; + + public void execute() { + // get all creatures + CardList cards = AllZoneUtil.getCardsInPlay("Primalcrux"); + for(Card c:cards) { + String player = c.getController(); + int pt = CardFactoryUtil.getNumberOfManaSymbolsControlledByColor("B", player); + c.setBaseAttack(pt); + c.setBaseDefense(pt); + } + }// execute() + }; public static Command Absolute_Grace = new Command() { private static final long serialVersionUID = -6904191523315339355L; @@ -20832,6 +20850,7 @@ public class GameActionUtil { commands.put("Angry_Mob", Angry_Mob); commands.put("Maraxus_of_Keld", Maraxus_of_Keld); commands.put("Umbra_Stalker", Umbra_Stalker); + commands.put("Primalcrux", Primalcrux); //System.out.println("size of commands: " + commands.size()); diff --git a/src/forge/StaticEffects.java b/src/forge/StaticEffects.java index 6fd1bdf5050..88dd848249e 100644 --- a/src/forge/StaticEffects.java +++ b/src/forge/StaticEffects.java @@ -233,6 +233,7 @@ public class StaticEffects cardToEffectsList.put("Angry Mob", new String[] {"Angry_Mob"}); cardToEffectsList.put("Maraxus of Keld", new String[] {"Maraxus_of_Keld"}); cardToEffectsList.put("Umbra Stalker", new String[] {"Umbra_Stalker"}); + cardToEffectsList.put("Primalcrux",new String[] {"Primalcrux"}); } public HashMap getCardToEffectsList()