diff --git a/Mage.Sets/src/mage/cards/z/ZopandrelHungerDominus.java b/Mage.Sets/src/mage/cards/z/ZopandrelHungerDominus.java new file mode 100644 index 00000000000..f608a99b659 --- /dev/null +++ b/Mage.Sets/src/mage/cards/z/ZopandrelHungerDominus.java @@ -0,0 +1,98 @@ +package mage.cards.z; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; + +/** + * + * @author weirddan455 + */ +public final class ZopandrelHungerDominus extends CardImpl { + + private static final FilterControlledCreaturePermanent filter + = new FilterControlledCreaturePermanent("other creatures"); + + static { + filter.add(AnotherPredicate.instance); + } + + public ZopandrelHungerDominus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.PHYREXIAN); + this.subtype.add(SubType.HORROR); + this.power = new MageInt(4); + this.toughness = new MageInt(6); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // At the beginning of each combat, double the power and toughness of each creature you control until end of turn. + this.addAbility(new BeginningOfCombatTriggeredAbility(new ZopandrelHungerDominusEffect(), TargetController.ANY, false)); + + // {G/P}{G/P}, Sacrifice two other creatures: Put an indestructible counter on Zopandrel, Hunger Dominus. + Ability ability = new SimpleActivatedAbility(new AddCountersSourceEffect(CounterType.INDESTRUCTIBLE.createInstance()), new ManaCostsImpl<>("{G/P}{G/P}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, filter))); + this.addAbility(ability); + } + + private ZopandrelHungerDominus(final ZopandrelHungerDominus card) { + super(card); + } + + @Override + public ZopandrelHungerDominus copy() { + return new ZopandrelHungerDominus(this); + } +} + +class ZopandrelHungerDominusEffect extends OneShotEffect { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); + + public ZopandrelHungerDominusEffect() { + super(Outcome.BoostCreature); + staticText = "double the power and toughness of each creature you control until end of turn"; + } + + private ZopandrelHungerDominusEffect(final ZopandrelHungerDominusEffect effect) { + super(effect); + } + + @Override + public ZopandrelHungerDominusEffect copy() { + return new ZopandrelHungerDominusEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) { + ContinuousEffect effect = new BoostTargetEffect(permanent.getPower().getValue(), permanent.getToughness().getValue()); + effect.setTargetPointer(new FixedTarget(permanent, game)); + game.addEffect(effect, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java index 218e35f9cf2..6726e7d36e8 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java @@ -206,6 +206,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet { cards.add(new SetCardInfo("Vulshok Splitter", 156, Rarity.COMMON, mage.cards.v.VulshokSplitter.class)); cards.add(new SetCardInfo("Whisper of the Dross", 117, Rarity.COMMON, mage.cards.w.WhisperOfTheDross.class)); cards.add(new SetCardInfo("White Sun's Twilight", 38, Rarity.RARE, mage.cards.w.WhiteSunsTwilight.class)); + cards.add(new SetCardInfo("Zopandrel, Hunger Dominus", 195, Rarity.MYTHIC, mage.cards.z.ZopandrelHungerDominus.class)); } // @Override