diff --git a/res/cardsfolder/b/bonds_of_quicksilver.txt b/res/cardsfolder/b/bonds_of_quicksilver.txt index 3b9577ee88a..3f131b9944c 100644 --- a/res/cardsfolder/b/bonds_of_quicksilver.txt +++ b/res/cardsfolder/b/bonds_of_quicksilver.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura Text:no text K:Flash K:Enchant creature -A:SP$ Attach | Cost$ 3 U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 3 U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/bonds_of_quicksilver.jpg diff --git a/res/cardsfolder/c/coma_veil.txt b/res/cardsfolder/c/coma_veil.txt index ee4447b2cea..7f6b67adb83 100644 --- a/res/cardsfolder/c/coma_veil.txt +++ b/res/cardsfolder/c/coma_veil.txt @@ -3,7 +3,7 @@ ManaCost:4 U Types:Enchantment Aura Text:no text K:Enchant artifact or creature -A:SP$ Attach | Cost$ 4 U | ValidTgts$ Artifact,Creature | TgtPrompt$ Select target artifact or creature | AILogic$ Curse +A:SP$ Attach | Cost$ 4 U | ValidTgts$ Artifact,Creature | TgtPrompt$ Select target artifact or creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted permanent doesn't untap during its controller's untap step. SVar:RemAIDeck:True SVar:Rarity:Common diff --git a/res/cardsfolder/c/controlled_instincts.txt b/res/cardsfolder/c/controlled_instincts.txt index 65eb852859b..bdff0df5469 100644 --- a/res/cardsfolder/c/controlled_instincts.txt +++ b/res/cardsfolder/c/controlled_instincts.txt @@ -3,7 +3,7 @@ ManaCost:U Types:Enchantment Aura Text:no text K:Enchant red or green creature -A:SP$ Attach | Cost$ U | ValidTgts$ Creature.Green,Creature.Red | TgtPrompt$ Select target red or green creature | AILogic$ Curse +A:SP$ Attach | Cost$ U | ValidTgts$ Creature.Green,Creature.Red | TgtPrompt$ Select target red or green creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. SVar:RemRandomDeck:True SVar:Rarity:Uncommon diff --git a/res/cardsfolder/d/dehydration.txt b/res/cardsfolder/d/dehydration.txt index a415d80252c..867b83e0be4 100644 --- a/res/cardsfolder/d/dehydration.txt +++ b/res/cardsfolder/d/dehydration.txt @@ -3,7 +3,7 @@ ManaCost:3 U Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 3 U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 3 U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/dehydration.jpg diff --git a/res/cardsfolder/e/entangling_vines.txt b/res/cardsfolder/e/entangling_vines.txt index 19134481d8a..7a09751cf3a 100644 --- a/res/cardsfolder/e/entangling_vines.txt +++ b/res/cardsfolder/e/entangling_vines.txt @@ -3,7 +3,7 @@ ManaCost:3 G Types:Enchantment Aura Text:no text K:Enchant tapped creature -A:SP$ Attach | Cost$ 3 G | ValidTgts$ Creature.tapped | AILogic$ Curse +A:SP$ Attach | Cost$ 3 G | ValidTgts$ Creature.tapped | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/entangling_vines.jpg diff --git a/res/cardsfolder/e/eternity_snare.txt b/res/cardsfolder/e/eternity_snare.txt index 16ad6adba23..5d691611b91 100644 --- a/res/cardsfolder/e/eternity_snare.txt +++ b/res/cardsfolder/e/eternity_snare.txt @@ -3,7 +3,7 @@ ManaCost:5 U Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 5 U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 5 U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters the battlefield, draw a card. SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1 diff --git a/res/cardsfolder/f/frozen_solid.txt b/res/cardsfolder/f/frozen_solid.txt index 2ff4653efac..1b8a600967a 100644 --- a/res/cardsfolder/f/frozen_solid.txt +++ b/res/cardsfolder/f/frozen_solid.txt @@ -3,7 +3,7 @@ ManaCost:1 U U Types:Enchantment Aura Text:When enchanted creature is dealt damage, destroy it. K:Enchant creature -A:SP$ Attach | Cost$ 1 U U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 1 U U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. & HIDDEN When CARDNAME is dealt damage, destroy it. | Description$ Enchanted creature doesn't untap during its controller's untap step. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/frozen_solid.jpg diff --git a/res/cardsfolder/g/glimmerdust_nap.txt b/res/cardsfolder/g/glimmerdust_nap.txt index 334520a9411..931f020d94c 100644 --- a/res/cardsfolder/g/glimmerdust_nap.txt +++ b/res/cardsfolder/g/glimmerdust_nap.txt @@ -3,7 +3,7 @@ ManaCost:2 U Types:Enchantment Aura Text:no text K:Enchant tapped creature -A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature.tapped | AILogic$ Curse +A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature.tapped | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/glimmerdust_nap.jpg diff --git a/res/cardsfolder/i/immobilizing_ink.txt b/res/cardsfolder/i/immobilizing_ink.txt index 5ee286ac25f..b4102d72471 100644 --- a/res/cardsfolder/i/immobilizing_ink.txt +++ b/res/cardsfolder/i/immobilizing_ink.txt @@ -3,7 +3,7 @@ ManaCost:1 U Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 1 U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 1 U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddAbility$ Untap | Description$ Enchanted creature has "1, Discard a card: Untap this creature." SVar:Untap:AB$Untap | Cost$ 1 Discard<1/Card> | Defined$ Self | SpellDescription$ Untap CARDNAME. diff --git a/res/cardsfolder/i/inertia_bubble.txt b/res/cardsfolder/i/inertia_bubble.txt index 74edcebc979..7919146e055 100644 --- a/res/cardsfolder/i/inertia_bubble.txt +++ b/res/cardsfolder/i/inertia_bubble.txt @@ -3,7 +3,7 @@ ManaCost:1 U Types:Enchantment Aura Text:no text K:Enchant artifact -A:SP$ Attach | Cost$ 1 U | ValidTgts$ Artifact | AILogic$ Curse +A:SP$ Attach | Cost$ 1 U | ValidTgts$ Artifact | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted artifact doesn't untap during its controller's untap step. SVar:RemAIDeck:True SVar:Rarity:Common diff --git a/res/cardsfolder/l/leaden_fists.txt b/res/cardsfolder/l/leaden_fists.txt index 4b2d949eaab..74a5b190f6b 100644 --- a/res/cardsfolder/l/leaden_fists.txt +++ b/res/cardsfolder/l/leaden_fists.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura Text:no text K:Flash K:Enchant creature -A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 3 | AddToughness$ 3 | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature gets +3/+3 and doesn't untap during its controller's untap step. SVar:RemAIDeck:True SVar:Rarity:Common diff --git a/res/cardsfolder/m/melancholy.txt b/res/cardsfolder/m/melancholy.txt index 9ea98f4ce52..c468b491db5 100644 --- a/res/cardsfolder/m/melancholy.txt +++ b/res/cardsfolder/m/melancholy.txt @@ -3,7 +3,7 @@ ManaCost:2 B Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 2 B | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 2 B | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters the battlefield, tap enchanted creature. SVar:TrigTap:AB$Tap | Cost$ 0 | Defined$ Enchanted diff --git a/res/cardsfolder/m/mystic_restraints.txt b/res/cardsfolder/m/mystic_restraints.txt index 95549978108..d7456744ae9 100644 --- a/res/cardsfolder/m/mystic_restraints.txt +++ b/res/cardsfolder/m/mystic_restraints.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura Text:no text K:Flash K:Enchant creature -A:SP$ Attach | Cost$ 2 U U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 2 U U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters the battlefield, tap enchanted creature. SVar:TrigTap:AB$Tap | Cost$ 0 | Defined$ Enchanted diff --git a/res/cardsfolder/n/numbing_dose.txt b/res/cardsfolder/n/numbing_dose.txt index 66512d94b5f..46ccb8cf821 100644 --- a/res/cardsfolder/n/numbing_dose.txt +++ b/res/cardsfolder/n/numbing_dose.txt @@ -3,7 +3,7 @@ ManaCost:3 U U Types:Enchantment Aura Text:no text K:Enchant artifact or creature -A:SP$ Attach | Cost$ 3 U U | ValidTgts$ Artifact,Creature | TgtPrompt$ Select target artifact or creature | AILogic$ Curse +A:SP$ Attach | Cost$ 3 U U | ValidTgts$ Artifact,Creature | TgtPrompt$ Select target artifact or creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted permanent doesn't untap during its controller's untap step. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ EnchantedController | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ At the beginning of the upkeep of enchanted permanent's controller, that player loses 1 life. SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ TriggeredPlayer | LifeAmount$ 1 diff --git a/res/cardsfolder/p/paralyzing_grasp.txt b/res/cardsfolder/p/paralyzing_grasp.txt index 28b6ef6893f..72987e48025 100644 --- a/res/cardsfolder/p/paralyzing_grasp.txt +++ b/res/cardsfolder/p/paralyzing_grasp.txt @@ -3,7 +3,7 @@ ManaCost:2 U Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/paralyzing_grasp.jpg diff --git a/res/cardsfolder/p/plumes_of_peace.txt b/res/cardsfolder/p/plumes_of_peace.txt index cbdbbe0d56d..6b2f813a1da 100644 --- a/res/cardsfolder/p/plumes_of_peace.txt +++ b/res/cardsfolder/p/plumes_of_peace.txt @@ -3,7 +3,7 @@ ManaCost:1 W U Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 1 W U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 1 W U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. A:AB$ Tap | Cost$ W U | TgtPrompt$ Choose target creature | ValidTgts$ Creature | ActivationZone$ Hand | ActivationLimit$ 1 | PlayerTurn$ True | ActivationPhases$ Upkeep | PrecostDesc$ Forecast - | CostDesc$ W U, Reveal CARDNAME from your hand: | SpellDescription$ Tap target creature. (Activate this ability only during your upkeep and only once each turn.) SVar:Rarity:Common diff --git a/res/cardsfolder/p/psychic_overload.txt b/res/cardsfolder/p/psychic_overload.txt index 9989958fc84..67d92826f68 100644 --- a/res/cardsfolder/p/psychic_overload.txt +++ b/res/cardsfolder/p/psychic_overload.txt @@ -3,7 +3,7 @@ ManaCost:3 U Types:Enchantment Aura Text:no text K:Enchant permanent -A:SP$ Attach | Cost$ 3 U | ValidTgts$ Permanent | AILogic$ Curse +A:SP$ Attach | Cost$ 3 U | ValidTgts$ Permanent | AILogic$ KeepTapped T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters the battlefield, tap enchanted permanent. SVar:TrigTap:AB$Tap | Cost$ 0 | Defined$ Enchanted S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | AddAbility$ Untap | Description$ Enchanted permanent doesn't untap during its controller's untap step. Enchanted permanent has "Discard two artifact cards: Untap this permanent." diff --git a/res/cardsfolder/r/roots.txt b/res/cardsfolder/r/roots.txt index 0fc8e9b689d..cd80964e046 100644 --- a/res/cardsfolder/r/roots.txt +++ b/res/cardsfolder/r/roots.txt @@ -3,7 +3,7 @@ ManaCost:3 G Types:Enchantment Aura Text:no text K:Enchant creature without flying -A:SP$ Attach | Cost$ 3 G | ValidTgts$ Creature.withoutFlying | AILogic$ Curse +A:SP$ Attach | Cost$ 3 G | ValidTgts$ Creature.withoutFlying | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters the battlefield, tap enchanted creature. SVar:TrigTap:AB$Tap | Cost$ 0 | Defined$ Enchanted diff --git a/res/cardsfolder/s/shackles.txt b/res/cardsfolder/s/shackles.txt index 32e59d045f3..afb5139f110 100644 --- a/res/cardsfolder/s/shackles.txt +++ b/res/cardsfolder/s/shackles.txt @@ -3,7 +3,7 @@ ManaCost:2 W Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 2 W | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 2 W | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. A:AB$ ChangeZone | Cost$ W | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return CARDNAME to its owner's hand. SVar:Rarity:Common diff --git a/res/cardsfolder/s/sinking_feeling.txt b/res/cardsfolder/s/sinking_feeling.txt index c0313f1e86b..c4e014e70b3 100644 --- a/res/cardsfolder/s/sinking_feeling.txt +++ b/res/cardsfolder/s/sinking_feeling.txt @@ -3,7 +3,7 @@ ManaCost:2 U Types:Enchantment Aura Text:no text K:Enchant creature -A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddAbility$ Untap | Description$ Enchanted creature has "1, Put a -1/-1 counter on this creature: Untap this creature." SVar:Untap:AB$ Untap | Cost$ 1 AddCounter<1/M1M1> | SpellDescription$ Untap CARDNAME. diff --git a/res/cardsfolder/s/sleeping_potion.txt b/res/cardsfolder/s/sleeping_potion.txt index bd4b190c4eb..40ef9601d0b 100644 --- a/res/cardsfolder/s/sleeping_potion.txt +++ b/res/cardsfolder/s/sleeping_potion.txt @@ -5,7 +5,7 @@ Text:no text K:Enchant creature T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters the battlefield, tap enchanted creature. SVar:TrigTap:AB$Tap | Cost$ 0 | Defined$ Enchanted -A:SP$ Attach | Cost$ 1 U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 1 U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. T:Mode$ SpellAbilityCast | TargetsValid$ Card.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ When enchanted creature becomes the target of a spell or ability, sacrifice CARDNAME. SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ Self diff --git a/res/cardsfolder/t/thirst.txt b/res/cardsfolder/t/thirst.txt index bd76593698c..4248b6d245e 100644 --- a/res/cardsfolder/t/thirst.txt +++ b/res/cardsfolder/t/thirst.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:At the beginning of your upkeep, sacrifice CARDNAME unless you pay U -A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature | AILogic$ Curse +A:SP$ Attach | Cost$ 2 U | ValidTgts$ Creature | AILogic$ KeepTapped S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters the battlefield, tap enchanted creature. SVar:TrigTap:AB$Tap | Cost$ 0 | Defined$ Enchanted diff --git a/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java b/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java index 6f8ea3609cc..cea823f8dff 100644 --- a/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java +++ b/src/main/java/forge/card/abilityFactory/AbilityFactory_Attach.java @@ -197,7 +197,9 @@ public class AbilityFactory_Attach { c = attachAIPumpPreference(sa, prefList, mandatory, attachSource); else if ("ChangeType".equals(logic)) // Evil Presence, Spreading Seas c = attachAIChangeTypePreference(sa, prefList, mandatory, attachSource); - // TODO: Does KeepTapped need it's own list? Probably more efficient than just Curse + else if ("KeepTapped".equals(logic)){ + c = attachAIKeepTappedPreference(sa, prefList, mandatory, attachSource); + } return c; } @@ -460,18 +462,59 @@ public class AbilityFactory_Attach { return acceptableChoice(c, mandatory); } - public static Card attachAIChangeTypePreference(final SpellAbility sa, CardList list, boolean mandatory, Card attachSource){ - // AI For Cards like Evil Presence or Spreading Seas - - // A few of these cards are actually good, most of the Animate to Creature ones - // One or two of the give basic land types - // Maybe require Curse$ on the specific ones and filter the list that way - - Card c = CardFactoryUtil.AI_getBest(list); - - // TODO: Port over some of the existing code, but rewrite most of it. - // Filter out Basic Lands that have the same type as the changing type - // Ultimately, these spells need to be used to reduce mana base of a color. So it might be better to choose a Basic over a Nonbasic + public static Card attachAIChangeTypePreference(final SpellAbility sa, CardList list, boolean mandatory, Card attachSource){ + // AI For Cards like Evil Presence or Spreading Seas + + // A few of these cards are actually good, most of the Animate to Creature ones + // One or two of the give basic land types + // Maybe require Curse$ on the specific ones and filter the list that way + + Card c = CardFactoryUtil.AI_getBest(list); + + // TODO: Port over some of the existing code, but rewrite most of it. + // Filter out Basic Lands that have the same type as the changing type + // Ultimately, these spells need to be used to reduce mana base of a color. So it might be better to choose a Basic over a Nonbasic + + if (c == null) + return chooseLessPreferred(mandatory, list); + + return acceptableChoice(c, mandatory); + } + + public static Card attachAIKeepTappedPreference(final SpellAbility sa, CardList list, boolean mandatory, Card attachSource){ + // AI For Cards like Paralyzing Grasp and Glimmerdust Nap + CardList prefList = list.filter(new CardListFilter() { + @Override + public boolean addCard(Card c) { + // Don't do Untapped Vigilance cards + if (c.isCreature() && c.hasKeyword("Vigilance") && c.isUntapped()) + return false; + + if (!c.isEnchanted()) + return true; + + ArrayList auras = c.getEnchantedBy(); + Iterator itr = auras.iterator(); + while(itr.hasNext()){ + Card aura = (Card)itr.next(); + AbilityFactory af = aura.getSpellPermanent().getAbilityFactory(); + if (af != null && af.getAPI().equals("Attach")){ + Map params = af.getMapParams(); + if ("KeepTapped".equals(params.get("AILogic"))){ + // Don't attach multiple KeepTapped Auras to one card + return false; + } + } + } + + + + return true; + } + }); + + + Card c = CardFactoryUtil.AI_getBest(prefList); if (c == null) return chooseLessPreferred(mandatory, list); @@ -479,8 +522,6 @@ public class AbilityFactory_Attach { return acceptableChoice(c, mandatory); } - // Todo: Does RemainTapped need its own SubAttach AF? - public static Player attachToPlayerAIPreferences(AbilityFactory af, final SpellAbility sa, boolean mandatory){ Target tgt = sa.getTarget(); Player p;