From 1f0b69a6561eb02fdb9aed1c5b70c7084137b686 Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Fri, 17 Feb 2012 03:33:14 +0000 Subject: [PATCH] - Added Angel's Trumpet. - Added RememberTapped to AB TapAll. --- .gitattributes | 1 + res/cardsfolder/a/angels_trumpet.txt | 20 +++++++++++++++++++ .../AbilityFactoryPermanentState.java | 8 ++++++++ 3 files changed, 29 insertions(+) create mode 100644 res/cardsfolder/a/angels_trumpet.txt diff --git a/.gitattributes b/.gitattributes index 355ee714096..a311f6a22d3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -290,6 +290,7 @@ res/cardsfolder/a/angels_feather.txt svneol=native#text/plain res/cardsfolder/a/angels_grace.txt svneol=native#text/plain res/cardsfolder/a/angels_herald.txt -text res/cardsfolder/a/angels_mercy.txt svneol=native#text/plain +res/cardsfolder/a/angels_trumpet.txt -text svneol=unset#text/plain res/cardsfolder/a/angelsong.txt svneol=native#text/plain res/cardsfolder/a/anger.txt svneol=native#text/plain res/cardsfolder/a/angry_mob.txt svneol=native#text/plain diff --git a/res/cardsfolder/a/angels_trumpet.txt b/res/cardsfolder/a/angels_trumpet.txt new file mode 100644 index 00000000000..825afa1c99a --- /dev/null +++ b/res/cardsfolder/a/angels_trumpet.txt @@ -0,0 +1,20 @@ +Name:Angel's Trumpet +ManaCost:3 +Types:Artifact +Text:no text +S:Mode$ Continuous | Affected$ Creature | AddHiddenKeyword$ Vigilance | Description$ All creatures have vigilance. +T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | Execute$ TrigTapAllYou | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's end step, tap all untapped creatures that player controls that didn't attack this turn. CARDNAME deals damage to the player equal to the number of creatures tapped this way. +SVar:TrigTapAllYou:AB$ TapAll | Cost$ 0 | ValidCards$ Creature.untapped+notAttackedThisTurn+YouCtrl | RememberTapped$ True | SubAbility$ DBDamageYou +SVar:DBDamageYou:DB$ DealDamage | Defined$ You | NumDmg$ AngelYouX | SubAbility$ DBCleanupYou +SVar:DBCleanupYou:DB$ Cleanup | ClearRemembered$ True +T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Opponent | Execute$ TrigTapAllOpp | TriggerZones$ Battlefield | Secondary$ True | TriggerDescription$ At the beginning of each player's end step, tap all untapped creatures that player controls that didn't attack this turn. CARDNAME deals damage to the player equal to the number of creatures tapped this way. +SVar:TrigTapAllOpp:AB$ TapAll | Cost$ 0 | ValidCards$ Creature.untapped+notAttackedThisTurn+YouDontCtrl | RememberTapped$ True | SubAbility$ DBDamageOpp +SVar:DBDamageOpp:DB$ DealDamage | Defined$ Opponent | NumDmg$ AngelOppX | SubAbility$ DBCleanupOpp +SVar:DBCleanupOpp:DB$ Cleanup | ClearRemembered$ True +SVar:AngelYouX:Remembered$Amount +SVar:AngelOppX:Remembered$Amount +SVar:RemAIDeck:True +SVar:RemRandomDeck:True +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/angels_trumpet.jpg +End \ No newline at end of file diff --git a/src/main/java/forge/card/abilityfactory/AbilityFactoryPermanentState.java b/src/main/java/forge/card/abilityfactory/AbilityFactoryPermanentState.java index c7535cff05f..2ae7a01fcb8 100644 --- a/src/main/java/forge/card/abilityfactory/AbilityFactoryPermanentState.java +++ b/src/main/java/forge/card/abilityfactory/AbilityFactoryPermanentState.java @@ -1508,6 +1508,11 @@ public class AbilityFactoryPermanentState { */ private static void tapAllResolve(final AbilityFactory af, final SpellAbility sa) { final HashMap params = af.getMapParams(); + final Card card = sa.getSourceCard(); + final boolean remTapped = params.containsKey("RememberTapped"); + if (remTapped) { + card.clearRemembered(); + } CardList cards = null; @@ -1530,6 +1535,9 @@ public class AbilityFactoryPermanentState { cards = AbilityFactory.filterListByType(cards, params.get("ValidCards"), sa); for (final Card c : cards) { + if (remTapped) { + card.addRemembered(c); + } c.tap(); } }