From 2eed4c90617c884d3c32739a7fed679eb17b01fe Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 27 Jan 2023 20:22:57 -0500 Subject: [PATCH] [ONE] Implement Indoctrination Attendant --- .../mage/cards/i/IndoctrinationAttendant.java | 58 +++++++++++++++++++ .../src/mage/sets/PhyrexiaAllWillBeOne.java | 1 + 2 files changed, 59 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/i/IndoctrinationAttendant.java diff --git a/Mage.Sets/src/mage/cards/i/IndoctrinationAttendant.java b/Mage.Sets/src/mage/cards/i/IndoctrinationAttendant.java new file mode 100644 index 00000000000..3acaac1235b --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IndoctrinationAttendant.java @@ -0,0 +1,58 @@ +package mage.cards.i; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.keyword.ToxicAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.game.permanent.token.PhyrexianMiteToken; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class IndoctrinationAttendant extends CardImpl { + + private static final FilterControlledPermanent filter + = new FilterControlledPermanent("another permanent you control"); + + static { + filter.add(AnotherPredicate.instance); + } + + public IndoctrinationAttendant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.PHYREXIAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Toxic 1 + this.addAbility(new ToxicAbility(1)); + + // When Indoctrination Attendant enters the battlefield, you may return another permanent you control to its owner's hand. If you do, create a 1/1 colorless Phyrexian Mite artifact creature token with toxic 1 and "This creature can't block." + this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid( + new CreateTokenEffect(new PhyrexianMiteToken()), + new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)) + ))); + } + + private IndoctrinationAttendant(final IndoctrinationAttendant card) { + super(card); + } + + @Override + public IndoctrinationAttendant copy() { + return new IndoctrinationAttendant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java index 5619476c465..f00514490dd 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java @@ -88,6 +88,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet { cards.add(new SetCardInfo("Hexgold Slash", 137, Rarity.COMMON, mage.cards.h.HexgoldSlash.class)); cards.add(new SetCardInfo("Ichorspit Basilisk", 170, Rarity.COMMON, mage.cards.i.IchorspitBasilisk.class)); cards.add(new SetCardInfo("Incisor Glider", 15, Rarity.COMMON, mage.cards.i.IncisorGlider.class)); + cards.add(new SetCardInfo("Indoctrination Attendant", 16, Rarity.COMMON, mage.cards.i.IndoctrinationAttendant.class)); cards.add(new SetCardInfo("Infectious Bite", 172, Rarity.UNCOMMON, mage.cards.i.InfectiousBite.class)); cards.add(new SetCardInfo("Infectious Inquiry", 97, Rarity.COMMON, mage.cards.i.InfectiousInquiry.class)); cards.add(new SetCardInfo("Infested Fleshcutter", 17, Rarity.UNCOMMON, mage.cards.i.InfestedFleshcutter.class));