diff --git a/Mage.Sets/src/mage/cards/b/BodyCount.java b/Mage.Sets/src/mage/cards/b/BodyCount.java new file mode 100644 index 00000000000..c095dce2569 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BodyCount.java @@ -0,0 +1,73 @@ +package mage.cards.b; + +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.keyword.SpectacleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.Game; +import mage.watchers.common.CreaturesDiedWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BodyCount extends CardImpl { + + private static final Hint hint = new ValueHint( + "Creatures that died under your control this turn", BodyCountValue.instance + ); + + public BodyCount(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}"); + + // Spectacle {B} + this.addAbility(new SpectacleAbility(this, new ManaCostsImpl<>("{B}"))); + + // Draw a card for each creature that died under your control this turn. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(BodyCountValue.instance)); + this.getSpellAbility().addHint(hint); + } + + private BodyCount(final BodyCount card) { + super(card); + } + + @Override + public BodyCount copy() { + return new BodyCount(this); + } +} + +enum BodyCountValue implements DynamicValue { + instance; + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + return game.getState() + .getWatcher(CreaturesDiedWatcher.class) + .getAmountOfCreaturesDiedThisTurnByController(sourceAbility.getControllerId()); + } + + @Override + public BodyCountValue copy() { + return this; + } + + @Override + public String getMessage() { + return "creature that died under your control this turn"; + } + + @Override + public String toString() { + return "1"; + } +} diff --git a/Mage.Sets/src/mage/sets/NewCapennaCommander.java b/Mage.Sets/src/mage/sets/NewCapennaCommander.java index 31253bcc4c4..93a074cfc1b 100644 --- a/Mage.Sets/src/mage/sets/NewCapennaCommander.java +++ b/Mage.Sets/src/mage/sets/NewCapennaCommander.java @@ -26,6 +26,7 @@ public final class NewCapennaCommander extends ExpansionSet { cards.add(new SetCardInfo("Angelic Sleuth", 113, Rarity.RARE, mage.cards.a.AngelicSleuth.class)); cards.add(new SetCardInfo("Bennie Bracks, Zoologist", 86, Rarity.MYTHIC, mage.cards.b.BennieBracksZoologist.class)); + cards.add(new SetCardInfo("Body Count", 34, Rarity.RARE, mage.cards.b.BodyCount.class)); cards.add(new SetCardInfo("Damning Verdict", 15, Rarity.RARE, mage.cards.d.DamningVerdict.class)); cards.add(new SetCardInfo("Extravagant Replication", 25, Rarity.RARE, mage.cards.e.ExtravagantReplication.class)); cards.add(new SetCardInfo("Kitt Kanto, Mayhem Diva", 4, Rarity.MYTHIC, mage.cards.k.KittKantoMayhemDiva.class));