diff --git a/Mage.Sets/src/mage/cards/b/BattlefieldButcher.java b/Mage.Sets/src/mage/cards/b/BattlefieldButcher.java new file mode 100644 index 0000000000..ab752a8e2c --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BattlefieldButcher.java @@ -0,0 +1,68 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.CostAdjuster; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +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.util.CardUtil; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BattlefieldButcher extends CardImpl { + + public BattlefieldButcher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // {5}, {T}: Each opponent loses 2 life. This ability costs {1} less to activate for each creature card in your graveyard. + Ability ability = new SimpleActivatedAbility(new LoseLifeOpponentsEffect(2), new GenericManaCost(5)); + ability.addCost(new TapSourceCost()); + ability.addEffect(new InfoEffect("this ability costs {1} less to activate for each creature card in your graveyard")); + this.addAbility(ability.setCostAdjuster(BattlefieldButcherAdjuster.instance).addHint(BattlefieldButcherAdjuster.getHint())); + } + + private BattlefieldButcher(final BattlefieldButcher card) { + super(card); + } + + @Override + public BattlefieldButcher copy() { + return new BattlefieldButcher(this); + } +} + +enum BattlefieldButcherAdjuster implements CostAdjuster { + instance; + private static final DynamicValue xValue = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE); + private static final Hint hint = new ValueHint("Creature cards in your graveyard", xValue); + + @Override + public void adjustCosts(Ability ability, Game game) { + CardUtil.reduceCost(ability, xValue.calculate(game, ability, null)); + } + + public static Hint getHint() { + return hint; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index b37210e0ce..eb2574408f 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -38,6 +38,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Audacity", 169, Rarity.UNCOMMON, mage.cards.a.Audacity.class)); cards.add(new SetCardInfo("Autonomous Assembler", 34, Rarity.RARE, mage.cards.a.AutonomousAssembler.class)); cards.add(new SetCardInfo("Awaken the Woods", 170, Rarity.MYTHIC, mage.cards.a.AwakenTheWoods.class)); + cards.add(new SetCardInfo("Battlefield Butcher", 86, Rarity.UNCOMMON, mage.cards.b.BattlefieldButcher.class)); cards.add(new SetCardInfo("Battlefield Forge", 257, Rarity.RARE, mage.cards.b.BattlefieldForge.class)); cards.add(new SetCardInfo("Bitter Reunion", 127, Rarity.COMMON, mage.cards.b.BitterReunion.class)); cards.add(new SetCardInfo("Bladecoil Serpent", 229, Rarity.MYTHIC, mage.cards.b.BladecoilSerpent.class));