From 09af60cd07a113f7306177481fe816ab7da0704c Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 14:08:41 +0000 Subject: [PATCH] add Beacon of Immortality (from Fifth Dawn) --- .gitattributes | 1 + res/cardsfolder/beacon_of_immortality.txt | 7 ++++++ src/forge/CardFactory_Instants.java | 26 +++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 res/cardsfolder/beacon_of_immortality.txt diff --git a/.gitattributes b/.gitattributes index d248f8e7b18..f1abf155e9c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -442,6 +442,7 @@ res/cardsfolder/bazaar_of_baghdad.txt -text svneol=native#text/plain res/cardsfolder/bazaar_of_wonders.txt -text svneol=native#text/plain res/cardsfolder/beacon_of_creation.txt -text svneol=native#text/plain res/cardsfolder/beacon_of_destruction.txt -text svneol=native#text/plain +res/cardsfolder/beacon_of_immortality.txt -text svneol=native#text/plain res/cardsfolder/beacon_of_tomorrows.txt -text svneol=native#text/plain res/cardsfolder/beacon_of_unrest.txt -text svneol=native#text/plain res/cardsfolder/bear_cub.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/beacon_of_immortality.txt b/res/cardsfolder/beacon_of_immortality.txt new file mode 100644 index 00000000000..25f30fd2159 --- /dev/null +++ b/res/cardsfolder/beacon_of_immortality.txt @@ -0,0 +1,7 @@ +Name:Beacon of Immortality +ManaCost:5 W +Types:Sorcery +Text:Double target player's life total. Shuffle CARDNAME into its owner's library. +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/beacon_of_immortality.jpg +End \ No newline at end of file diff --git a/src/forge/CardFactory_Instants.java b/src/forge/CardFactory_Instants.java index 092cfb88c1e..f708b89362b 100644 --- a/src/forge/CardFactory_Instants.java +++ b/src/forge/CardFactory_Instants.java @@ -4118,6 +4118,32 @@ public class CardFactory_Instants { card.addSpellAbility(spell); }//*************** END ************ END ************************** + + //*************** START *********** START ************************** + else if(cardName.equals("Beacon of Immortality")) { + final SpellAbility spell = new Spell(card) { + private static final long serialVersionUID = -3200073459471937520L; + + @Override + public void resolve() { + Player p = getTargetPlayer(); + p.setLife(p.getLife()*2, card); + done(); + }//resolve() + + void done() { + //shuffle card back into the library + AllZone.GameAction.moveToLibrary(card); + card.getController().shuffle(); + } + }; + spell.setChooseTargetAI(CardFactoryUtil.AI_targetComputer()); + spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell)); + + card.clearSpellAbility(); + card.addSpellAbility(spell); + }//*************** END ************ END ************************** + return card; }//getCard }