mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Initial checkin for Attach_KeepTapped
Converted some Auras to KeepTapped Logic.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -479,7 +481,46 @@ public class AbilityFactory_Attach {
|
||||
return acceptableChoice(c, mandatory);
|
||||
}
|
||||
|
||||
// Todo: Does RemainTapped need its own SubAttach AF?
|
||||
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<Card> auras = c.getEnchantedBy();
|
||||
Iterator<Card> itr = auras.iterator();
|
||||
while(itr.hasNext()){
|
||||
Card aura = (Card)itr.next();
|
||||
AbilityFactory af = aura.getSpellPermanent().getAbilityFactory();
|
||||
if (af != null && af.getAPI().equals("Attach")){
|
||||
Map<String,String> 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);
|
||||
|
||||
return acceptableChoice(c, mandatory);
|
||||
}
|
||||
|
||||
public static Player attachToPlayerAIPreferences(AbilityFactory af, final SpellAbility sa, boolean mandatory){
|
||||
Target tgt = sa.getTarget();
|
||||
|
||||
Reference in New Issue
Block a user