From 8ccbffce48eab5b49e7aecfbd49af1bda9857d88 Mon Sep 17 00:00:00 2001 From: Hans Mackowiak Date: Thu, 25 Feb 2021 17:08:49 +0100 Subject: [PATCH] CardProperty: make sharesCreatureTypeWith use DefinedCard --- .../java/forge/game/card/CardFactory.java | 1 + .../java/forge/game/card/CardPredicates.java | 9 +++ .../java/forge/game/card/CardProperty.java | 63 ++++--------------- .../res/cardsfolder/c/call_to_the_kindred.txt | 3 +- .../res/cardsfolder/c/crown_of_ascension.txt | 4 +- forge-gui/res/cardsfolder/c/crown_of_awe.txt | 4 +- forge-gui/res/cardsfolder/c/crown_of_fury.txt | 4 +- .../res/cardsfolder/c/crown_of_suspicion.txt | 4 +- .../res/cardsfolder/c/crown_of_vigor.txt | 4 +- .../res/cardsfolder/d/descendants_path.txt | 10 ++- .../res/cardsfolder/e/endemic_plague.txt | 4 +- .../res/cardsfolder/h/heirloom_blade.txt | 10 +-- forge-gui/res/cardsfolder/k/kondas_banner.txt | 1 - forge-gui/res/cardsfolder/m/mana_echoes.txt | 11 ++-- .../res/cardsfolder/p/pyre_of_heroes.txt | 5 +- .../cardsfolder/r/reins_of_the_vinesteed.txt | 8 +-- .../res/cardsfolder/s/shared_animosity.txt | 7 +-- .../res/cardsfolder/t/tajuru_paragon.txt | 2 +- 18 files changed, 51 insertions(+), 103 deletions(-) diff --git a/forge-game/src/main/java/forge/game/card/CardFactory.java b/forge-game/src/main/java/forge/game/card/CardFactory.java index 059b28c9081..9d24e6d34e0 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactory.java +++ b/forge-game/src/main/java/forge/game/card/CardFactory.java @@ -140,6 +140,7 @@ public class CardFactory { c.clearControllers(); c.setOwner(controller); c.setCopiedSpell(true); + c.setCopiedPermanent(original); c.setXManaCostPaidByColor(original.getXManaCostPaidByColor()); c.setKickerMagnitude(original.getKickerMagnitude()); diff --git a/forge-game/src/main/java/forge/game/card/CardPredicates.java b/forge-game/src/main/java/forge/game/card/CardPredicates.java index 63ee3b22f8b..80684efc9d2 100644 --- a/forge-game/src/main/java/forge/game/card/CardPredicates.java +++ b/forge-game/src/main/java/forge/game/card/CardPredicates.java @@ -162,6 +162,15 @@ public final class CardPredicates { }; } + public static Predicate sharesCardTypeWith(final Card card) { + return new Predicate() { + @Override + public boolean apply(final Card c) { + return c.sharesCardTypeWith(card); + } + }; + } + public static Predicate sharesCreatureTypeWith(final Card card) { return new Predicate() { @Override diff --git a/forge-game/src/main/java/forge/game/card/CardProperty.java b/forge-game/src/main/java/forge/game/card/CardProperty.java index 16e67183153..59fdd9e0baa 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -789,12 +789,6 @@ public class CardProperty { } else { final String restriction = property.split("sharesCreatureTypeWith ")[1]; switch (restriction) { - case "TopCardOfLibrary": - final CardCollectionView cards = sourceController.getCardsIn(ZoneType.Library); - if (cards.isEmpty() || !card.sharesCreatureTypeWith(cards.get(0))) { - return false; - } - break; case "Commander": final List cmdrs = sourceController.getCommanders(); for (Card cmdr : cmdrs) { @@ -803,35 +797,6 @@ public class CardProperty { } } return false; - case "Enchanted": - for (final SpellAbility sa : source.getCurrentState().getNonManaAbilities()) { - final SpellAbility root = sa.getRootAbility(); - Card c = source.getEnchantingCard(); - if ((c == null) && (root != null) - && (root.getPaidList("Sacrificed") != null) - && !root.getPaidList("Sacrificed").isEmpty()) { - c = root.getPaidList("Sacrificed").get(0).getEnchantingCard(); - if (!card.sharesCreatureTypeWith(c)) { - return false; - } - } - } - break; - case "Equipped": - if (source.isEquipping() && card.sharesCreatureTypeWith(source.getEquipping())) { - return true; - } - return false; - case "Remembered": - for (final Object rem : source.getRemembered()) { - if (rem instanceof Card) { - final Card c = (Card) rem; - if (card.sharesCreatureTypeWith(c)) { - return true; - } - } - } - return false; case "AllRemembered": for (final Object rem : source.getRemembered()) { if (rem instanceof Card) { @@ -843,13 +808,7 @@ public class CardProperty { } break; default: - boolean shares = false; - for (final Card c : sourceController.getCardsIn(ZoneType.Battlefield)) { - if (c.isValid(restriction, sourceController, source, spellAbility) && card.sharesCreatureTypeWith(c)) { - shares = true; - } - } - if (!shares) { + if (!Iterables.any(AbilityUtils.getDefinedCards(source, restriction, spellAbility), CardPredicates.sharesCreatureTypeWith(card))) { return false; } break; @@ -891,15 +850,9 @@ public class CardProperty { } return false; default: - final CardCollection cards1 = AbilityUtils.getDefinedCards(card, restriction, spellAbility); - if (cards1.isEmpty()) { + if (!Iterables.any(AbilityUtils.getDefinedCards(source, restriction, spellAbility), CardPredicates.sharesCardTypeWith(card))) { return false; } - for (Card c : cards1) { - if (!card.sharesCardTypeWith(c)) { - return false; - } - } } } } else if (property.equals("sharesPermanentTypeWith")) { @@ -935,9 +888,6 @@ public class CardProperty { return !CardLists.filter(game.getCardsIn(ZoneType.Battlefield), CardPredicates.sharesNameWith(card)).isEmpty(); } else if (restriction.equals("ThisTurnCast")) { return !CardLists.filter(CardUtil.getThisTurnCast("Card", source), CardPredicates.sharesNameWith(card)).isEmpty(); - } else if (restriction.startsWith("Remembered") || restriction.startsWith("Imprinted")) { - CardCollection list = AbilityUtils.getDefinedCards(source, restriction, spellAbility); - return !CardLists.filter(list, CardPredicates.sharesNameWith(card)).isEmpty(); } else if (restriction.equals("MovedToGrave")) { for (final SpellAbility sa : source.getCurrentState().getNonManaAbilities()) { final SpellAbility root = sa.getRootAbility(); @@ -969,6 +919,10 @@ public class CardProperty { } } return false; + } else { + if (!Iterables.any(AbilityUtils.getDefinedCards(source, restriction, spellAbility), CardPredicates.sharesNameWith(card))) { + return false; + } } } } else if (property.startsWith("doesNotShareNameWith")) { @@ -1859,6 +1813,11 @@ public class CardProperty { if (card.equals(obj)) { return false; } + } else if (property.startsWith("NotDefined")) { + final String key = property.substring("NotDefined".length()); + if (Iterables.contains(AbilityUtils.getDefinedCards(source, key, spellAbility), card)) { + return false; + } } else if (property.equals("CanPayManaCost")) { final class CheckCanPayManaCost { private List manaPaid; diff --git a/forge-gui/res/cardsfolder/c/call_to_the_kindred.txt b/forge-gui/res/cardsfolder/c/call_to_the_kindred.txt index dc77ff7a072..bb5c7e285c9 100644 --- a/forge-gui/res/cardsfolder/c/call_to_the_kindred.txt +++ b/forge-gui/res/cardsfolder/c/call_to_the_kindred.txt @@ -4,6 +4,5 @@ Types:Enchantment Aura K:Enchant creature A:SP$ Attach | Cost$ 3 U | ValidTgts$ Creature | AILogic$ Pump T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You| Execute$ TrigDig | TriggerDescription$ At the beginning of your upkeep, you may look at the top five cards of your library. If you do, you may put a creature card that shares a creature type with enchanted creature from among them onto the battlefield, then you put the rest of those cards on the bottom of your library in any order. -SVar:TrigDig:DB$ Dig | DigNum$ 5 | ChangeNum$ 1 | ChangeValid$ Creature.sharesCreatureTypeWith Card.EnchantedBy | Optional$ True | DestinationZone$ Battlefield -SVar:Picture:http://www.wizards.com/global/images/magic/general/call_to_the_kindred.jpg +SVar:TrigDig:DB$ Dig | DigNum$ 5 | ChangeNum$ 1 | ChangeValid$ Creature.sharesCreatureTypeWith Enchanted | Optional$ True | DestinationZone$ Battlefield Oracle:Enchant creature\nAt the beginning of your upkeep, you may look at the top five cards of your library. If you do, you may put a creature card that shares a creature type with enchanted creature from among them onto the battlefield, then you put the rest of those cards on the bottom of your library in any order. diff --git a/forge-gui/res/cardsfolder/c/crown_of_ascension.txt b/forge-gui/res/cardsfolder/c/crown_of_ascension.txt index c09d56cefd0..70a61f55955 100644 --- a/forge-gui/res/cardsfolder/c/crown_of_ascension.txt +++ b/forge-gui/res/cardsfolder/c/crown_of_ascension.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura K:Enchant creature A:SP$ Attach | Cost$ 1 U | ValidTgts$ Creature | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Flying | Description$ Enchanted creature has flying. -A:AB$ PumpAll | Cost$ Sac<1/CARDNAME> | ValidCards$ Creature.sharesCreatureTypeWith Enchanted | KW$ Flying | SpellDescription$ Enchanted creature and other creatures that share a creature type with it gain flying until end of turn. +A:AB$ Pump | Cost$ Sac<1/CARDNAME> | Defined$ AttachedBy Sacrificed | KW$ Flying | SubAbility$ DBPumpAll | SpellDescription$ Enchanted creature and other creatures that share a creature type with it gain flying until end of turn. +SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.NotDefinedAttachedBy Sacrificed+sharesCreatureTypeWith AttachedBy Sacrificed | KW$ Flying AI:RemoveDeck:All -SVar:Picture:http://www.wizards.com/global/images/magic/general/crown_of_ascension.jpg Oracle:Enchant creature\nEnchanted creature has flying.\nSacrifice Crown of Ascension: Enchanted creature and other creatures that share a creature type with it gain flying until end of turn. diff --git a/forge-gui/res/cardsfolder/c/crown_of_awe.txt b/forge-gui/res/cardsfolder/c/crown_of_awe.txt index 609fb778a84..8d6c42ad5df 100644 --- a/forge-gui/res/cardsfolder/c/crown_of_awe.txt +++ b/forge-gui/res/cardsfolder/c/crown_of_awe.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura K:Enchant creature A:SP$ Attach | Cost$ 1 W | ValidTgts$ Creature | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Protection from black & Protection from red | Description$ Enchanted creature has protection from black and from red. -A:AB$ PumpAll | Cost$ Sac<1/CARDNAME> | ValidCards$ Creature.sharesCreatureTypeWith Enchanted | KW$ Protection from black & Protection from red | SpellDescription$ Enchanted creature and other creatures that share a creature type with it gain protection from black and from red until end of turn. +A:AB$ Pump | Cost$ Sac<1/CARDNAME> | Defined$ AttachedBy Sacrificed | KW$ Protection from black & Protection from red | SubAbility$ DBPumpAll | SpellDescription$ Enchanted creature and other creatures that share a creature type with it gain protection from black and from red until end of turn. +SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.NotDefinedAttachedBy Sacrificed+sharesCreatureTypeWith AttachedBy Sacrificed | KW$ Protection from black & Protection from red AI:RemoveDeck:All -SVar:Picture:http://www.wizards.com/global/images/magic/general/crown_of_awe.jpg Oracle:Enchant creature\nEnchanted creature has protection from black and from red.\nSacrifice Crown of Awe: Enchanted creature and other creatures that share a creature type with it gain protection from black and from red until end of turn. diff --git a/forge-gui/res/cardsfolder/c/crown_of_fury.txt b/forge-gui/res/cardsfolder/c/crown_of_fury.txt index 7498e04c1e2..af39212ce65 100644 --- a/forge-gui/res/cardsfolder/c/crown_of_fury.txt +++ b/forge-gui/res/cardsfolder/c/crown_of_fury.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura K:Enchant creature A:SP$ Attach | Cost$ 1 R | ValidTgts$ Creature | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 1 | AddKeyword$ First Strike | Description$ Enchanted creature gets +1/+0 and has first strike. -A:AB$ PumpAll | Cost$ Sac<1/CARDNAME> | ValidCards$ Creature.sharesCreatureTypeWith Enchanted | NumAtt$ 1 | KW$ First Strike | SpellDescription$ Enchanted creature and other creatures that share a creature type with it get +1/+0 and gain first strike until end of turn. +A:AB$ Pump | Cost$ Sac<1/CARDNAME> | Defined$ AttachedBy Sacrificed | NumAtt$ 1 | KW$ First Strike | SubAbility$ DBPumpAll | SpellDescription$ Enchanted creature and other creatures that share a creature type with it get +1/+0 and gain first strike until end of turn. +SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.NotDefinedAttachedBy Sacrificed+sharesCreatureTypeWith AttachedBy Sacrificed | NumAtt$ 1 | KW$ First Strike AI:RemoveDeck:All -SVar:Picture:http://www.wizards.com/global/images/magic/general/crown_of_fury.jpg Oracle:Enchant creature\nEnchanted creature gets +1/+0 and has first strike.\nSacrifice Crown of Fury: Enchanted creature and other creatures that share a creature type with it get +1/+0 and gain first strike until end of turn. diff --git a/forge-gui/res/cardsfolder/c/crown_of_suspicion.txt b/forge-gui/res/cardsfolder/c/crown_of_suspicion.txt index 9e20530b62e..31a58341c43 100644 --- a/forge-gui/res/cardsfolder/c/crown_of_suspicion.txt +++ b/forge-gui/res/cardsfolder/c/crown_of_suspicion.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura K:Enchant creature A:SP$ Attach | Cost$ 1 B | ValidTgts$ Creature | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 2 | AddToughness$ -1 | Description$ Enchanted creature gets +2/-1. -A:AB$ PumpAll | Cost$ Sac<1/CARDNAME> | ValidCards$ Creature.sharesCreatureTypeWith Enchanted | NumAtt$ 2 | NumDef$ -1 | SpellDescription$ Enchanted creature and other creatures that share a creature type with it get +2/-1 until end of turn. +A:AB$ Pump | Cost$ Sac<1/CARDNAME> | Defined$ AttachedBy Sacrificed | NumAtt$ 2 | NumDef$ -1 | SubAbility$ DBPumpAll | SpellDescription$ Enchanted creature and other creatures that share a creature type with it get +2/-1 until end of turn. +SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.NotDefinedAttachedBy Sacrificed+sharesCreatureTypeWith AttachedBy Sacrificed | NumAtt$ 2 | NumDef$ -1 AI:RemoveDeck:All -SVar:Picture:http://www.wizards.com/global/images/magic/general/crown_of_suspicion.jpg Oracle:Enchant creature\nEnchanted creature gets +2/-1.\nSacrifice Crown of Suspicion: Enchanted creature and other creatures that share a creature type with it get +2/-1 until end of turn. diff --git a/forge-gui/res/cardsfolder/c/crown_of_vigor.txt b/forge-gui/res/cardsfolder/c/crown_of_vigor.txt index 989a126245f..621ea311851 100644 --- a/forge-gui/res/cardsfolder/c/crown_of_vigor.txt +++ b/forge-gui/res/cardsfolder/c/crown_of_vigor.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura K:Enchant creature A:SP$ Attach | Cost$ 1 G | ValidTgts$ Creature | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 1 | AddToughness$ 1 | Description$ Enchanted creature gets +1/+1. -A:AB$ PumpAll | Cost$ Sac<1/CARDNAME> | ValidCards$ Creature.sharesCreatureTypeWith Enchanted | NumAtt$ 1 | NumDef$ 1 | SpellDescription$ Enchanted creature and other creatures that share a creature type with it get +1/+1 until end of turn. +A:AB$ Pump | Cost$ Sac<1/CARDNAME> | Defined$ AttachedBy Sacrificed | NumAtt$ 1 | NumDef$ 1 | SubAbility$ DBPumpAll | SpellDescription$ Enchanted creature and other creatures that share a creature type with it get +1/+1 until end of turn. +SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.Other+sharesCreatureTypeWith AttachedBy Sacrificed | NumAtt$ 1 | NumDef$ 1 AI:RemoveDeck:All -SVar:Picture:http://www.wizards.com/global/images/magic/general/crown_of_vigor.jpg Oracle:Enchant creature\nEnchanted creature gets +1/+1.\nSacrifice Crown of Vigor: Enchanted creature and other creatures that share a creature type with it get +1/+1 until end of turn. diff --git a/forge-gui/res/cardsfolder/d/descendants_path.txt b/forge-gui/res/cardsfolder/d/descendants_path.txt index c3e822c7b62..b172e3d3650 100644 --- a/forge-gui/res/cardsfolder/d/descendants_path.txt +++ b/forge-gui/res/cardsfolder/d/descendants_path.txt @@ -1,11 +1,9 @@ Name:Descendants' Path ManaCost:2 G Types:Enchantment -T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDig | TriggerDescription$ At the beginning of your upkeep, reveal the top card of your library. If it's a creature card that shares a creature type with a creature you control, you may cast that card without paying its mana cost. Otherwise, put that card on the bottom of your library. -SVar:TrigDig:DB$ Dig | DigNum$ 1 | Reveal$ True | RememberRevealed$ True | ChangeNum$ All | ChangeValid$ Creature.sharesCreatureTypeWith Creature.YouCtrl | DestinationZone$ Library | LibraryPosition$ 0 | LibraryPosition2$ -1 | SubAbility$ DBPlayIT -SVar:DBPlayIT:DB$ Play | Defined$ Remembered | Controller$ You | WithoutManaCost$ True | Optional$ True | RememberPlayed$ True | ConditionCheckSVar$ MatchType | ConditionSVarCompare$ EQ1 | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:MatchType:Remembered$Valid Creature.sharesCreatureTypeWith Card +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ DBReveal | TriggerDescription$ At the beginning of your upkeep, reveal the top card of your library. If it's a creature card that shares a creature type with a creature you control, you may cast that card without paying its mana cost. Otherwise, put that card on the bottom of your library. +SVar:DBReveal:DB$ PeekAndReveal | PeekAmount$ 1 | RevealValid$ Card | RememberRevealed$ True | SubAbility$ DBMayCast +SVar:DBMayCast:DB$ Play | Defined$ Remembered | ForgetRemembered$ True | WithoutManaCost$ True | Optional$ True | ConditionDefined$ Remembered | ConditionPresent$ Creature.sharesCreatureTypeWith Valid Creature.YouCtrl | SubAbility$ DBChangeZone +SVar:DBChangeZone:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | DestinationZone$ Library | LibraryPosition$ -1 | NoShuffle$ True | ForgetChanged$ True AI:RemoveDeck:Random -SVar:Picture:http://www.wizards.com/global/images/magic/general/descendants_path.jpg Oracle:At the beginning of your upkeep, reveal the top card of your library. If it's a creature card that shares a creature type with a creature you control, you may cast that card without paying its mana cost. Otherwise, put that card on the bottom of your library. diff --git a/forge-gui/res/cardsfolder/e/endemic_plague.txt b/forge-gui/res/cardsfolder/e/endemic_plague.txt index e406c855b1d..7c992265819 100644 --- a/forge-gui/res/cardsfolder/e/endemic_plague.txt +++ b/forge-gui/res/cardsfolder/e/endemic_plague.txt @@ -1,8 +1,6 @@ Name:Endemic Plague ManaCost:3 B Types:Sorcery -A:SP$ DestroyAll | Cost$ 3 B Sac<1/Creature> | RememberCostCards$ True | ValidCards$ Creature.sharesCreatureTypeWith Remembered | SubAbility$ DBCleanup | SpellDescription$ Destroy all creatures that share a creature type with the sacrificed creature. They can't be regenerated. -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +A:SP$ DestroyAll | Cost$ 3 B Sac<1/Creature> | ValidCards$ Creature.sharesCreatureTypeWith Sacrificed | SpellDescription$ Destroy all creatures that share a creature type with the sacrificed creature. They can't be regenerated. AI:RemoveDeck:All -SVar:Picture:http://www.wizards.com/global/images/magic/general/endemic_plague.jpg Oracle:As an additional cost to cast Endemic Plague, sacrifice a creature.\nDestroy all creatures that share a creature type with the sacrificed creature. They can't be regenerated. diff --git a/forge-gui/res/cardsfolder/h/heirloom_blade.txt b/forge-gui/res/cardsfolder/h/heirloom_blade.txt index 812adf8f9bc..cc101b6c4c3 100644 --- a/forge-gui/res/cardsfolder/h/heirloom_blade.txt +++ b/forge-gui/res/cardsfolder/h/heirloom_blade.txt @@ -1,14 +1,8 @@ Name:Heirloom Blade ManaCost:3 Types:Artifact Equipment -T:Mode$ Attached | ValidSource$ Card.Self | ValidTarget$ Creature | TriggerZones$ Battlefield | Execute$ TrigRemember | Static$ True -SVar:TrigRemember:DB$ Cleanup | ClearRemembered$ True | SubAbility$ RememberNew -SVar:RememberNew:DB$ Pump | RememberObjects$ Equipped S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 3 | AddToughness$ 1 | Description$ Equipped creature gets +3/+1. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.AttachedBy | Execute$ TrigDigUntil | OptionalDecider$ You | TriggerDescription$ Whenever equipped creature dies, you may reveal cards from the top of your library until you reveal a creature card that shares a creature type with it. Put that card into your hand and the rest on the bottom of your library in a random order. -SVar:TrigDigUntil:DB$DigUntil | Valid$ Creature.sharesCreatureTypeWith Remembered | ValidDescription$ creature that shares a creature type | FoundDestination$ Hand | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | RevealRandomOrder$ True | SubAbility$ DBCleanup -T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ DBCleanup | Static$ True -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:TrigDigUntil:DB$ DigUntil | Valid$ Creature.sharesCreatureTypeWith TriggeredCardLKICopy | ValidDescription$ creature that shares a creature type | FoundDestination$ Hand | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | RevealRandomOrder$ True K:Equip:1 -SVar:Picture:http://www.wizards.com/global/images/magic/general/heirloom_blade.jpg -Oracle:Equipped creature gets +3/+1.\nWhenever equipped creature dies, you may reveal cards from the top of your library until you reveal a creature card that shares a creature type with it. Put that card into your hand and the rest on the bottom of your library in a random order.\nEquip {1} \ No newline at end of file +Oracle:Equipped creature gets +3/+1.\nWhenever equipped creature dies, you may reveal cards from the top of your library until you reveal a creature card that shares a creature type with it. Put that card into your hand and the rest on the bottom of your library in a random order.\nEquip {1} diff --git a/forge-gui/res/cardsfolder/k/kondas_banner.txt b/forge-gui/res/cardsfolder/k/kondas_banner.txt index 47ff7eb36fc..265e57d57ac 100644 --- a/forge-gui/res/cardsfolder/k/kondas_banner.txt +++ b/forge-gui/res/cardsfolder/k/kondas_banner.txt @@ -7,5 +7,4 @@ S:Mode$ Continuous | Affected$ Creature.SharesColorWith Equipped | AddPower$ 1 | S:Mode$ Continuous | Affected$ Creature.sharesCreatureTypeWith Equipped | AddPower$ 1 | AddToughness$ 1 | Description$ Creatures that share a creature type with equipped creature get +1/+1. AI:RemoveDeck:Random DeckHints:Type$Legendary -SVar:Picture:http://www.wizards.com/global/images/magic/general/kondas_banner.jpg Oracle:Konda's Banner can be attached only to a legendary creature.\nCreatures that share a color with equipped creature get +1/+1.\nCreatures that share a creature type with equipped creature get +1/+1.\nEquip {2} diff --git a/forge-gui/res/cardsfolder/m/mana_echoes.txt b/forge-gui/res/cardsfolder/m/mana_echoes.txt index 159abe09436..836c0a34357 100644 --- a/forge-gui/res/cardsfolder/m/mana_echoes.txt +++ b/forge-gui/res/cardsfolder/m/mana_echoes.txt @@ -1,11 +1,8 @@ Name:Mana Echoes ManaCost:2 R R Types:Enchantment -T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature | TriggerZones$ Battlefield | TriggerController$ You | OptionalDecider$ You | Execute$ TrigPump | TriggerDescription$ Whenever a creature enters the battlefield, you may add an amount of {C} equal to the number of creatures you control that share a creature type with it. -SVar:TrigPump:DB$ Pump | Defined$ TriggeredCard | RememberObjects$ TriggeredCard | AILogic$ MimicVat | SubAbility$ DBMana -SVar:DBMana:DB$ Mana | Produced$ C | Defined$ You | Amount$ X | References$ X | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Count$Valid Creature.sharesCreatureTypeWith Remembered+YouCtrl +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature | TriggerZones$ Battlefield | TriggerController$ You | OptionalDecider$ You | Execute$ DBMana | TriggerDescription$ Whenever a creature enters the battlefield, you may add an amount of {C} equal to the number of creatures you control that share a creature type with it. +SVar:DBMana:DB$ Mana | Produced$ C | Defined$ You | Amount$ X | References$ X +SVar:X:Count$Valid Creature.YouCtrl+sharesCreatureTypeWith TriggeredCard AI:RemoveDeck:Random -SVar:Picture:http://www.wizards.com/global/images/magic/general/mana_echoes.jpg -Oracle:Whenever a creature enters the battlefield, you may add an amount of {C} equal to the number of creatures you control that share a creature type with it. \ No newline at end of file +Oracle:Whenever a creature enters the battlefield, you may add an amount of {C} equal to the number of creatures you control that share a creature type with it. diff --git a/forge-gui/res/cardsfolder/p/pyre_of_heroes.txt b/forge-gui/res/cardsfolder/p/pyre_of_heroes.txt index c8f8f640ada..c8ee0ff8a87 100644 --- a/forge-gui/res/cardsfolder/p/pyre_of_heroes.txt +++ b/forge-gui/res/cardsfolder/p/pyre_of_heroes.txt @@ -1,9 +1,8 @@ Name:Pyre of Heroes ManaCost:2 Types:Artifact -A:AB$ ChangeZone | Cost$ 2 T Sac<1/Creature> | RememberCostCards$ True | Origin$ Library | Destination$ Battlefield | ChangeType$ Creature.cmcEQX+sharesCreatureTypeWith Remembered | References$ X | ChangeNum$ 1 | SorcerySpeed$ True | AILogic$ SacAndUpgrade | StackDescription$ Search your library for a creature card that shares a creature type with the sacrificed creature and has converted mana cost equal to 1 plus that creature's converted mana cost. Put that card onto the battlefield, then shuffle your library. | SubAbility$ DBCleanup | SpellDescription$ Search your library for a creature card that shares a creature type with the sacrificed creature and has converted mana cost equal to 1 plus that creature's converted mana cost. Put that card onto the battlefield, then shuffle your library. Activate this ability only any time you could cast a sorcery. -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Remembered$CardManaCost/Plus.1 +A:AB$ ChangeZone | Cost$ 2 T Sac<1/Creature> | Origin$ Library | Destination$ Battlefield | ChangeType$ Creature.cmcEQX+sharesCreatureTypeWith Sacrificed | References$ X | ChangeNum$ 1 | SorcerySpeed$ True | AILogic$ SacAndUpgrade | StackDescription$ SpellDescription | SpellDescription$ Search your library for a creature card that shares a creature type with the sacrificed creature and has converted mana cost equal to 1 plus that creature's converted mana cost. Put that card onto the battlefield, then shuffle your library. Activate this ability only any time you could cast a sorcery. +SVar:X:Sacrificed$CardManaCost/Plus.1 SVar:AIPreference:SacCost$Creature DeckHas:Ability$Sacrifice DeckNeeds:Type$Creature diff --git a/forge-gui/res/cardsfolder/r/reins_of_the_vinesteed.txt b/forge-gui/res/cardsfolder/r/reins_of_the_vinesteed.txt index 6e8318c6841..0cb835bfc00 100644 --- a/forge-gui/res/cardsfolder/r/reins_of_the_vinesteed.txt +++ b/forge-gui/res/cardsfolder/r/reins_of_the_vinesteed.txt @@ -4,12 +4,10 @@ Types:Enchantment Aura K:Enchant creature A:SP$ Attach | Cost$ 3 G | ValidTgts$ Creature | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 2 | AddToughness$ 2 | Description$ Enchanted creature gets +2/+2. -T:Mode$ ChangesZone | ValidCard$ Creature.EnchantedBy | Origin$ Battlefield | Destination$ Graveyard | OptionalDecider$ You | Execute$ TrigReturnOwner | TriggerDescription$ When enchanted creature dies, you may return CARDNAME from your graveyard to the battlefield attached to a creature that shares a creature type with that creature. -SVar:TrigReturnOwner:DB$ Pump | RememberObjects$ TriggeredCard | SubAbility$ DBReturnChoose -SVar:DBReturnChoose:DB$ ChooseCard | Choices$ Creature.sharesCreatureTypeWith Remembered+CanBeEnchantedBy | ChoiceTitle$ Choose a creature shares a creature type with the former enchanted creature | SubAbility$ DBReturn +T:Mode$ ChangesZone | ValidCard$ Creature.EnchantedBy | Origin$ Battlefield | Destination$ Graveyard | OptionalDecider$ You | Execute$ DBReturnChoose | TriggerDescription$ When enchanted creature dies, you may return CARDNAME from your graveyard to the battlefield attached to a creature that shares a creature type with that creature. +SVar:DBReturnChoose:DB$ ChooseCard | Choices$ Creature.CanBeEnchantedBy+sharesCreatureTypeWith TriggeredCardLKICopy | ChoiceTitle$ Choose a creature shares a creature type with the former enchanted creature | SubAbility$ DBReturn SVar:DBReturn:DB$ ChangeZone | Defined$ Self | Origin$ Graveyard | Destination$ Battlefield | AttachedTo$ ChosenCard | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True AI:RemoveDeck:All AI:RemoveDeck:Random -SVar:Picture:http://www.wizards.com/global/images/magic/general/reins_of_the_vinesteed.jpg Oracle:Enchant creature\nEnchanted creature gets +2/+2.\nWhen enchanted creature dies, you may return Reins of the Vinesteed from your graveyard to the battlefield attached to a creature that shares a creature type with that creature. diff --git a/forge-gui/res/cardsfolder/s/shared_animosity.txt b/forge-gui/res/cardsfolder/s/shared_animosity.txt index ceebf59d8f5..22f5ab9b367 100644 --- a/forge-gui/res/cardsfolder/s/shared_animosity.txt +++ b/forge-gui/res/cardsfolder/s/shared_animosity.txt @@ -2,10 +2,7 @@ Name:Shared Animosity ManaCost:2 R Types:Enchantment T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ AnimosityPump | TriggerDescription$ Whenever a creature you control attacks, it gets +1/+0 until end of turn for each other attacking creature that shares a creature type with it. -SVar:AnimosityPump:DB$ Pump | RememberObjects$ TriggeredAttacker | SubAbility$ AnimosityPump2 -SVar:AnimosityPump2:DB$ Pump | Defined$ Remembered | NumAtt$ X | References$ X | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:Count$Valid Creature.attacking+IsNotRemembered+sharesCreatureTypeWith Remembered +SVar:AnimosityPump:DB$ Pump | Defined$ TriggeredAttacker | NumAtt$ X | References$ X +SVar:X:Count$Valid Creature.attacking+NotTriggeredAttacker+sharesCreatureTypeWith TriggeredAttacker AI:RemoveDeck:Random -SVar:Picture:http://www.wizards.com/global/images/magic/general/shared_animosity.jpg Oracle:Whenever a creature you control attacks, it gets +1/+0 until end of turn for each other attacking creature that shares a creature type with it. diff --git a/forge-gui/res/cardsfolder/t/tajuru_paragon.txt b/forge-gui/res/cardsfolder/t/tajuru_paragon.txt index 0a809c26cfe..180f95a12e1 100644 --- a/forge-gui/res/cardsfolder/t/tajuru_paragon.txt +++ b/forge-gui/res/cardsfolder/t/tajuru_paragon.txt @@ -5,6 +5,6 @@ PT:3/2 S:Mode$ Continuous | EffectZone$ All | Affected$ Card.Self | CharacteristicDefining$ True | AddType$ Cleric & Rogue & Warrior & Wizard | Description$ CARDNAME is also a Cleric, Rogue, Warrior, and Wizard. K:Kicker:3 T:Mode$ ChangesZone | ValidCard$ Card.Self+kicked | Origin$ Any | Destination$ Battlefield | Execute$ TrigDig | TriggerDescription$ When CARDNAME enters the battlefield, if it was kicked, reveal the top six cards of your library. You may put a card that shares a creature type with it from among them into your hand. Put the rest on the bottom of your library in a random order. -SVar:TrigDig:DB$ Dig | DigNum$ 6 | Reveal$ True | ChangeNum$ 1 | Optional$ True | ChangeValid$ Creature.sharesCreatureTypeWith Card.Self | DestinationZone$ Hand | DestinationZone2$ Library | LibraryPosition$ -1 | RestRandomOrder$ True +SVar:TrigDig:DB$ Dig | DigNum$ 6 | Reveal$ True | ChangeNum$ 1 | Optional$ True | ChangeValid$ Creature.sharesCreatureTypeWith Self | DestinationZone$ Hand | DestinationZone2$ Library | LibraryPosition$ -1 | RestRandomOrder$ True DeckHints:Ability$Party Oracle:Tajuru Paragon is also a Cleric, Rogue, Warrior, and Wizard.\nKicker {3}\nWhen Tajuru Paragon enters the battlefield, if it was kicked, reveal the top six cards of your library. You may put a card that shares a creature type with it from among them into your hand. Put the rest on the bottom of your library in a random order.