From a48dbbe674c40de79c126e6cd5752a0e3785742b Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 04:25:24 +0000 Subject: [PATCH] add Psychic Venom (from original limited base set) via generic aura code --- res/card-pictures.txt | 1 + res/cards.txt | 6 ++++++ src/forge/GameActionUtil.java | 23 +++++++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 0c613332c7a..4633d03f2d8 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 +psychic_venom.jpg http://www.wizards.com/global/images/magic/general/psychic_venom.jpg wanderlust.jpg http://www.wizards.com/global/images/magic/general/wanderlust.jpg moonglove_extract.jpg http://www.wizards.com/global/images/magic/general/moonglove_extract.jpg artisan_of_kozilek.jpg http://www.wizards.com/global/images/magic/general/artisan_of_kozilek.jpg diff --git a/res/cards.txt b/res/cards.txt index 25d034381ef..d0b4dc5cfc1 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,9 @@ +Psychic Venom +1 U +Enchantment Aura +Whenever enchanted land becomes tapped, Psychic Venom deals 2 damage to that land's controller. +Enchant Land Curse + Wanderlust 2 G Enchantment Aura diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 1e8b9a19f1d..744577c9acc 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -111,6 +111,8 @@ public class GameActionUtil { } public static void executeTapSideEffects(Card c) { + + final String activePlayer = AllZone.Phase.getActivePlayer(); /* cards with Tap side effects can be listed here, just like in * the CardFactory classes @@ -191,6 +193,27 @@ public class GameActionUtil { } } }//end Blight + + /* + * Psychic Venom - When enchanted land becomes tapped, it deals 2 damage + * to enchanted lands' controller + */ + if(c.isEnchantedBy("Psychic Venom")) { + final ArrayList cards = c.getEnchantedBy(); + for(Card card:cards) { + final Card source = card; + if(card.getName().equals("Psychic Venom")) { + Ability ability = new Ability(card, "0") { + @Override + public void resolve() { + AllZone.GameAction.addDamage(activePlayer, source, 2); + } + };//Ability + ability.setStackDescription(card.getName()+" - deals 2 damage to "+activePlayer); + AllZone.Stack.add(ability); + } + } + }//end Blight }//end executeTapSideEffects()