diff --git a/Mage.Sets/src/mage/cards/t/ThoughtStalkerWarlock.java b/Mage.Sets/src/mage/cards/t/ThoughtStalkerWarlock.java new file mode 100644 index 00000000000..a745cbaa90d --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThoughtStalkerWarlock.java @@ -0,0 +1,69 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.target.common.TargetOpponent; +import mage.watchers.common.PlayerLostLifeWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ThoughtStalkerWarlock extends CardImpl { + + public ThoughtStalkerWarlock(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.LIZARD); + this.subtype.add(SubType.WARLOCK); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Menace + this.addAbility(new MenaceAbility()); + + // When Thought-Stalker Warlock enters, choose target opponent. If they lost life this turn, they reveal their hand, you choose a nonland card from it, and they discard that card. Otherwise, they discard a card. + Ability ability = new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect( + new DiscardCardYouChooseTargetEffect(StaticFilters.FILTER_CARD_NON_LAND), + new DiscardTargetEffect(1), ThoughtStalkerWarlockCondition.instance, "choose " + + "target opponent. If they lost life this turn, they reveal their hand, you choose " + + "a nonland card from it, and they discard that card. Otherwise, they discard a card" + )); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + private ThoughtStalkerWarlock(final ThoughtStalkerWarlock card) { + super(card); + } + + @Override + public ThoughtStalkerWarlock copy() { + return new ThoughtStalkerWarlock(this); + } +} + +enum ThoughtStalkerWarlockCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + return game + .getState() + .getWatcher(PlayerLostLifeWatcher.class) + .getLifeLost(source.getFirstTarget()) > 0; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/Bloomburrow.java b/Mage.Sets/src/mage/sets/Bloomburrow.java index 60d1cafbf7c..e6259320fb1 100644 --- a/Mage.Sets/src/mage/sets/Bloomburrow.java +++ b/Mage.Sets/src/mage/sets/Bloomburrow.java @@ -206,6 +206,7 @@ public final class Bloomburrow extends ExpansionSet { cards.add(new SetCardInfo("Thistledown Players", 35, Rarity.COMMON, mage.cards.t.ThistledownPlayers.class)); cards.add(new SetCardInfo("Thornplate Intimidator", 117, Rarity.COMMON, mage.cards.t.ThornplateIntimidator.class)); cards.add(new SetCardInfo("Thornvault Forager", 197, Rarity.RARE, mage.cards.t.ThornvaultForager.class)); + cards.add(new SetCardInfo("Thought-Stalker Warlock", 118, Rarity.UNCOMMON, mage.cards.t.ThoughtStalkerWarlock.class)); cards.add(new SetCardInfo("Three Tree Mascot", 251, Rarity.COMMON, mage.cards.t.ThreeTreeMascot.class)); cards.add(new SetCardInfo("Three Tree Rootweaver", 198, Rarity.COMMON, mage.cards.t.ThreeTreeRootweaver.class)); cards.add(new SetCardInfo("Thundertrap Trainer", 78, Rarity.RARE, mage.cards.t.ThundertrapTrainer.class));