From 1dcd531156e228602df388e16bdf101e3fdc955c Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 15:02:38 +0000 Subject: [PATCH] now, add Instill Energy --- .gitattributes | 1 + res/cardsfolder/instill_energy.txt | 13 +++++++++++++ src/forge/AbilityFactory_PermanentState.java | 8 ++++---- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 res/cardsfolder/instill_energy.txt diff --git a/.gitattributes b/.gitattributes index d1b7c0581d7..54a744a56fe 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2556,6 +2556,7 @@ res/cardsfolder/inspiration.txt -text svneol=native#text/plain res/cardsfolder/inspired_charge.txt -text svneol=native#text/plain res/cardsfolder/inspired_sprite.txt -text svneol=native#text/plain res/cardsfolder/inspirit.txt -text svneol=native#text/plain +res/cardsfolder/instill_energy.txt -text svneol=native#text/plain res/cardsfolder/instill_furor.txt -text svneol=native#text/plain res/cardsfolder/instill_infection.txt -text svneol=native#text/plain res/cardsfolder/insurrection.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/instill_energy.txt b/res/cardsfolder/instill_energy.txt new file mode 100644 index 00000000000..8d08df89865 --- /dev/null +++ b/res/cardsfolder/instill_energy.txt @@ -0,0 +1,13 @@ +Name:Instill Energy +ManaCost:G +Types:Enchantment Aura +Text:no text +K:Enchant creature +K:enPump:0/0 +A:AB$Untap | Cost$ 0 | PlayerTurn$True | ActivationLimit$ 1 | Defined$ Enchanted | SpellDescription$ Untap enchanted creature. Activate this ability only during your turn and only once each turn. +SVar:PlayMain1:True +#AI can't use this effectively right now +SVar:RemAIDeck:True +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/instill_energy.jpg +End \ No newline at end of file diff --git a/src/forge/AbilityFactory_PermanentState.java b/src/forge/AbilityFactory_PermanentState.java index 9a76856b37f..d7930142f30 100644 --- a/src/forge/AbilityFactory_PermanentState.java +++ b/src/forge/AbilityFactory_PermanentState.java @@ -84,6 +84,8 @@ public class AbilityFactory_PermanentState { public static String untapStackDescription(AbilityFactory af, SpellAbility sa){ // when getStackDesc is called, just build exactly what is happening StringBuilder sb = new StringBuilder(); + final HashMap params = af.getMapParams(); + Card hostCard = sa.getSourceCard(); if (sa instanceof Ability_Sub) sb.append(" "); @@ -97,8 +99,7 @@ public class AbilityFactory_PermanentState { if (tgt != null) tgtCards = tgt.getTargetCards(); else{ - tgtCards = new ArrayList(); - tgtCards.add(af.getHostCard()); + tgtCards = AbilityFactory.getDefinedCards(hostCard, params.get("Defined"), sa); } for(Card c : tgtCards) @@ -252,8 +253,7 @@ public class AbilityFactory_PermanentState { if (tgt != null) tgtCards = tgt.getTargetCards(); else{ - tgtCards = new ArrayList(); - tgtCards.add(card); + tgtCards = AbilityFactory.getDefinedCards(card, params.get("Defined"), sa); } for(Card tgtC : tgtCards){