From f24f0106a6eca61c3f3021a32ddd58638bf52f68 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 8 Apr 2020 18:06:06 -0400 Subject: [PATCH] Implemented Keensight Mentor --- .../src/mage/cards/k/KeensightMentor.java | 71 +++++++++++++++++++ .../src/mage/sets/IkoriaLairOfBehemoths.java | 1 + 2 files changed, 72 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KeensightMentor.java diff --git a/Mage.Sets/src/mage/cards/k/KeensightMentor.java b/Mage.Sets/src/mage/cards/k/KeensightMentor.java new file mode 100644 index 0000000000..d43a187a7c --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KeensightMentor.java @@ -0,0 +1,71 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KeensightMentor extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("non-Human creature you control"); + private static final FilterPermanent filter2 + = new FilterControlledCreaturePermanent("creature you control with vigilance"); + + static { + filter.add(Predicates.not(SubType.HUMAN.getPredicate())); + filter2.add(new AbilityPredicate(VigilanceAbility.class)); + } + + public KeensightMentor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // When Keensight Mentor enters the battlefield, put a vigilance counter on target non-Human creature you control. + Ability ability = new EntersBattlefieldTriggeredAbility( + new AddCountersTargetEffect(CounterType.VIGILANCE.createInstance()) + ); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + + // {1}{W}, {T}: Put a +1/+1 counter on each creature you control with vigilance. + ability = new SimpleActivatedAbility( + new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter2), new ManaCostsImpl("{1}{W}") + ); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + private KeensightMentor(final KeensightMentor card) { + super(card); + } + + @Override + public KeensightMentor copy() { + return new KeensightMentor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java b/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java index 0b4a5b1d36..5c99e2054d 100644 --- a/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java +++ b/Mage.Sets/src/mage/sets/IkoriaLairOfBehemoths.java @@ -108,6 +108,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet { cards.add(new SetCardInfo("Huntmaster Liger", 16, Rarity.UNCOMMON, mage.cards.h.HuntmasterLiger.class)); cards.add(new SetCardInfo("Indatha Crystal", 235, Rarity.UNCOMMON, mage.cards.i.IndathaCrystal.class)); cards.add(new SetCardInfo("Insatiable Hemophage", 93, Rarity.UNCOMMON, mage.cards.i.InsatiableHemophage.class)); + cards.add(new SetCardInfo("Keensight Mentor", 18, Rarity.UNCOMMON, mage.cards.k.KeensightMentor.class)); cards.add(new SetCardInfo("Keep Safe", 56, Rarity.COMMON, mage.cards.k.KeepSafe.class)); cards.add(new SetCardInfo("Ketria Crystal", 236, Rarity.UNCOMMON, mage.cards.k.KetriaCrystal.class)); cards.add(new SetCardInfo("Kogla, the Titan Ape", 162, Rarity.RARE, mage.cards.k.KoglaTheTitanApe.class));