diff --git a/Mage.Sets/src/mage/cards/b/BloodchiefsThirst.java b/Mage.Sets/src/mage/cards/b/BloodchiefsThirst.java new file mode 100644 index 0000000000..b1d3533c26 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BloodchiefsThirst.java @@ -0,0 +1,72 @@ +package mage.cards.b; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.KickerAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.target.TargetPermanent; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreatureOrPlaneswalker; +import mage.target.targetadjustment.TargetAdjuster; + +/** + * @author TheElk801 + */ +public final class BloodchiefsThirst extends CardImpl { + + public BloodchiefsThirst(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}"); + + // Kicker {2}{B} + this.addAbility(new KickerAbility(new ManaCostsImpl<>("{2}{B}"))); + + // Destroy target creature or planeswalker with converted mana cost 2 or less. If this spell was kicked, instead destroy target creature or planeswalker. + this.getSpellAbility().addEffect(new DestroyTargetEffect( + "Destroy target creature or planeswalker with converted mana cost 2 or less. " + + "If this spell was kicked, instead destroy target creature or planeswalker." + )); + this.getSpellAbility().setTargetAdjuster(BloodchiefsThirstAdjuster.instance); + } + + private BloodchiefsThirst(final BloodchiefsThirst card) { + super(card); + } + + @Override + public BloodchiefsThirst copy() { + return new BloodchiefsThirst(this); + } +} + +enum BloodchiefsThirstAdjuster implements TargetAdjuster { + instance; + + private static final FilterPermanent filter = new FilterCreatureOrPlaneswalkerPermanent( + "creature or planeswalker with converted mana cost 2 or less" + ); + + static { + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3)); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + ability.getTargets().clear(); + if (KickedCondition.instance.apply(game, ability)) { + ability.addTarget(new TargetCreatureOrPlaneswalker()); + } else { + ability.addTarget(new TargetPermanent(filter)); + } + } +} diff --git a/Mage.Sets/src/mage/sets/ZendikarRising.java b/Mage.Sets/src/mage/sets/ZendikarRising.java index 17613cf7fc..3ad8f9f82e 100644 --- a/Mage.Sets/src/mage/sets/ZendikarRising.java +++ b/Mage.Sets/src/mage/sets/ZendikarRising.java @@ -27,6 +27,7 @@ public final class ZendikarRising extends ExpansionSet { this.ratioBoosterMythic = 8; this.maxCardNumberInBooster = 280; + cards.add(new SetCardInfo("Bloodchief's Thirst", 94, Rarity.UNCOMMON, mage.cards.b.BloodchiefsThirst.class)); cards.add(new SetCardInfo("Jace, Mirror Mage", 63, Rarity.MYTHIC, mage.cards.j.JaceMirrorMage.class)); cards.add(new SetCardInfo("Lotus Cobra", 193, Rarity.RARE, mage.cards.l.LotusCobra.class)); cards.add(new SetCardInfo("Murasa Rootgrazer", 229, Rarity.UNCOMMON, mage.cards.m.MurasaRootgrazer.class));