diff --git a/Mage.Sets/src/mage/cards/f/FeedTheInfection.java b/Mage.Sets/src/mage/cards/f/FeedTheInfection.java new file mode 100644 index 00000000000..ee3407c223e --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FeedTheInfection.java @@ -0,0 +1,71 @@ +package mage.cards.f; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.game.Game; +import mage.players.Player; + +/** + * @author TheElk801 + */ +public final class FeedTheInfection extends CardImpl { + + public FeedTheInfection(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}"); + + // You draw three cards and lose 3 life. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(3, "you")); + this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(3).concatBy("and")); + + // Corrupted -- Each opponent with three or more poison counters loses 3 life. + this.getSpellAbility().addEffect(new FeedTheInfectionEffect()); + } + + private FeedTheInfection(final FeedTheInfection card) { + super(card); + } + + @Override + public FeedTheInfection copy() { + return new FeedTheInfection(this); + } +} + +class FeedTheInfectionEffect extends OneShotEffect { + + FeedTheInfectionEffect() { + super(Outcome.Benefit); + staticText = "
" + AbilityWord.CORRUPTED.formatWord() + + "Each opponent with three or more poison counters loses 3 life"; + } + + private FeedTheInfectionEffect(final FeedTheInfectionEffect effect) { + super(effect); + } + + @Override + public FeedTheInfectionEffect copy() { + return new FeedTheInfectionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (UUID playerId : game.getOpponents(source.getControllerId())) { + Player player = game.getPlayer(playerId); + if (player != null && player.getCounters().getCount(CounterType.POISON) >= 3) { + player.loseLife(3, game, source, false); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java index d07ab39bdad..a90da3efdc7 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java @@ -43,6 +43,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet { cards.add(new SetCardInfo("Evolved Spinoderm", 166, Rarity.RARE, mage.cards.e.EvolvedSpinoderm.class)); cards.add(new SetCardInfo("Experimental Augury", 49, Rarity.COMMON, mage.cards.e.ExperimentalAugury.class)); cards.add(new SetCardInfo("Ezuri, Stalker of Spheres", 201, Rarity.RARE, mage.cards.e.EzuriStalkerOfSpheres.class)); + cards.add(new SetCardInfo("Feed the Infection", 93, Rarity.UNCOMMON, mage.cards.f.FeedTheInfection.class)); cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Furnace Skullbomb", 228, Rarity.COMMON, mage.cards.f.FurnaceSkullbomb.class)); cards.add(new SetCardInfo("Graaz, Unstoppable Juggernaut", 229, Rarity.RARE, mage.cards.g.GraazUnstoppableJuggernaut.class));