diff --git a/Mage.Sets/src/mage/cards/b/Brightmare.java b/Mage.Sets/src/mage/cards/b/Brightmare.java new file mode 100644 index 00000000000..5dfc133b5d1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/Brightmare.java @@ -0,0 +1,76 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Brightmare extends CardImpl { + + public Brightmare(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.UNICORN); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // When Brightmare enters the battlefield, tap up to one target creature. You gain life equal to that creature's power. + Ability ability = new EntersBattlefieldTriggeredAbility(new BrightmareEffect()); + ability.addTarget(new TargetCreaturePermanent(0, 1)); + this.addAbility(ability); + } + + private Brightmare(final Brightmare card) { + super(card); + } + + @Override + public Brightmare copy() { + return new Brightmare(this); + } +} + +class BrightmareEffect extends OneShotEffect { + + BrightmareEffect() { + super(Outcome.Benefit); + staticText = "tap up to one target creature. You gain life equal to that creature's power"; + } + + private BrightmareEffect(final BrightmareEffect effect) { + super(effect); + } + + @Override + public BrightmareEffect copy() { + return new BrightmareEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent == null) { + return false; + } + permanent.tap(game); + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.gainLife(permanent.getPower().getValue(), game, source); + } + return true; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/Jumpstart.java b/Mage.Sets/src/mage/sets/Jumpstart.java index 3bf24355038..5566783192c 100644 --- a/Mage.Sets/src/mage/sets/Jumpstart.java +++ b/Mage.Sets/src/mage/sets/Jumpstart.java @@ -47,6 +47,7 @@ public final class Jumpstart extends ExpansionSet { cards.add(new SetCardInfo("Bogbrew Witch", 211, Rarity.RARE, mage.cards.b.BogbrewWitch.class)); cards.add(new SetCardInfo("Bone Picker", 212, Rarity.UNCOMMON, mage.cards.b.BonePicker.class)); cards.add(new SetCardInfo("Bone Splinters", 213, Rarity.COMMON, mage.cards.b.BoneSplinters.class)); + cards.add(new SetCardInfo("Brightmare", 2, Rarity.COMMON, mage.cards.b.Brightmare.class)); cards.add(new SetCardInfo("Brindle Shoat", 380, Rarity.UNCOMMON, mage.cards.b.BrindleShoat.class)); cards.add(new SetCardInfo("Brushstrider", 381, Rarity.UNCOMMON, mage.cards.b.Brushstrider.class)); cards.add(new SetCardInfo("Bubbling Cauldron", 460, Rarity.UNCOMMON, mage.cards.b.BubblingCauldron.class));