From ad4d4e4b92fc9b56d5ffa711899bec35fd8e178e Mon Sep 17 00:00:00 2001 From: chesse20 Date: Fri, 28 Apr 2023 15:26:14 -0700 Subject: [PATCH] [J22] Implement Chains of Custody (#9958) * chains of custody j22 * add to set list * set number * set text and capitalization * remove extra ; --- .../src/mage/cards/c/ChainsOfCustody.java | 66 +++++++++++++++++++ Mage.Sets/src/mage/sets/Jumpstart2022.java | 1 + 2 files changed, 67 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/ChainsOfCustody.java diff --git a/Mage.Sets/src/mage/cards/c/ChainsOfCustody.java b/Mage.Sets/src/mage/cards/c/ChainsOfCustody.java new file mode 100644 index 0000000000..284aeb49af --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChainsOfCustody.java @@ -0,0 +1,66 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.WardAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility; +import java.util.UUID; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ExileUntilSourceLeavesEffect; +/** + + * @author Chesse20 + */ +public final class ChainsOfCustody extends CardImpl { + + + public ChainsOfCustody(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature *YOU* control + TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE); //only your creatures! + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget)); + + //exile until leaves the battlefield + Ability ability = new EnchantAbility(auraTarget); + ability = new EntersBattlefieldTriggeredAbility(new ExileUntilSourceLeavesEffect()); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_NON_LAND)); //more than just creatures + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility())); + this.addAbility(ability); + + // ward 2 + this.addAbility(new SimpleStaticAbility( + new GainAbilityAttachedEffect( + new WardAbility(new GenericManaCost(2), false), AttachmentType.AURA + ).setText("Enchanted creature has ward {2}.") + )); + + + } + + private ChainsOfCustody(final ChainsOfCustody card) { + super(card); + } + + @Override + public ChainsOfCustody copy() { + return new ChainsOfCustody(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Jumpstart2022.java b/Mage.Sets/src/mage/sets/Jumpstart2022.java index f2b159ac3a..775bdc588d 100644 --- a/Mage.Sets/src/mage/sets/Jumpstart2022.java +++ b/Mage.Sets/src/mage/sets/Jumpstart2022.java @@ -130,6 +130,7 @@ public final class Jumpstart2022 extends ExpansionSet { cards.add(new SetCardInfo("Cellar Door", 759, Rarity.UNCOMMON, mage.cards.c.CellarDoor.class)); cards.add(new SetCardInfo("Cemetery Recruitment", 385, Rarity.COMMON, mage.cards.c.CemeteryRecruitment.class)); cards.add(new SetCardInfo("Certain Death", 386, Rarity.COMMON, mage.cards.c.CertainDeath.class)); + cards.add(new SetCardInfo("Chains of Custody", 3, Rarity.COMMON, mage.cards.c.ChainsOfCustody.class)); cards.add(new SetCardInfo("Challenger Troll", 639, Rarity.UNCOMMON, mage.cards.c.ChallengerTroll.class)); cards.add(new SetCardInfo("Chandra's Magmutt", 512, Rarity.COMMON, mage.cards.c.ChandrasMagmutt.class)); cards.add(new SetCardInfo("Chandra's Pyreling", 513, Rarity.UNCOMMON, mage.cards.c.ChandrasPyreling.class));