From 5952b708148bf18f287fc4865921a0385e1768d2 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 03:04:02 +0000 Subject: [PATCH] Bridge from Below added. --- res/card-pictures.txt | 1 + res/cards.txt | 5 +++ src/forge/CardFactory.java | 12 +++++++ src/forge/GameAction.java | 16 ++++++++- src/forge/GameActionUtil.java | 63 +++++++++++++++++++++++++++++++++++ 5 files changed, 96 insertions(+), 1 deletion(-) diff --git a/res/card-pictures.txt b/res/card-pictures.txt index e236ab85054..85a40e5b460 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -18,6 +18,7 @@ forest.jpg http://resources.wizards.com/magic/cards/unh/en-us/card73946.jpg forest1.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=2748 forest2.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=587 forest3.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=586 +bridge_from_below.jpg http://www.wizards.com/global/images/magic/general/bridge_from_below.jpg swamp_mosquito.jpg http://www.wizards.com/global/images/magic/general/swamp_mosquito.jpg suqata_assassin.jpg http://www.wizards.com/global/images/magic/general/suqata_assassin.jpg crypt_cobra.jpg http://www.wizards.com/global/images/magic/general/crypt_cobra.jpg diff --git a/res/cards.txt b/res/cards.txt index d6cd3f932da..c0cf28b016f 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,8 @@ +Bridge from Below +B B B +Enchantment +Whenever a nontoken creature is put into your graveyard from the battlefield, if Bridge from Below is in your graveyard, put a 2/2 black Zombie creature token onto the battlefield. When a creature is put into an opponent’s graveyard from the battlefield, if Bridge from Below is in your graveyard, exile Bridge from Below. + Swamp Mosquito 1 B Creature Insect diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 78edc9cbc53..cf0320792af 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -3050,7 +3050,19 @@ public class CardFactory implements NewConstants { } //*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Bridge from Below")) + { + SpellAbility spell = new Spell_Permanent(card) + { + private static final long serialVersionUID = 7254358703158629514L; + public boolean canPlayAI() { return false; } + }; + card.clearSpellAbility(); + card.addSpellAbility(spell); + } +//*************** END ************ END ************************* //*************** START *********** START ************************** else if(cardName.equals("Nevinyrral's Disk")) diff --git a/src/forge/GameAction.java b/src/forge/GameAction.java index 5810e286963..b4aa7d18e6c 100644 --- a/src/forge/GameAction.java +++ b/src/forge/GameAction.java @@ -579,7 +579,8 @@ private Card getCurrentCard(int ID) //destroy card effects: PlayerZone comp = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer); PlayerZone hum = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human); - + PlayerZone grv_comp = AllZone.getZone(Constant.Zone.Graveyard, Constant.Player.Computer); + PlayerZone grv_hum = AllZone.getZone(Constant.Zone.Graveyard, Constant.Player.Human); CardList list = new CardList(); list.addAll(comp.getCards()); list.addAll(hum.getCards()); @@ -594,9 +595,22 @@ private Card getCurrentCard(int ID) return false; } }); + CardList grv = new CardList(); + grv.addAll(grv_comp.getCards()); + grv.addAll(grv_hum.getCards()); + grv = grv.filter(new CardListFilter(){ + public boolean addCard(Card c) { + if (c.getName().contains("Bridge from Below")) + return true; + return false; + } + }); + for (int i=0;i