mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Implemented Brightmare
This commit is contained in:
parent
d6f87d29c6
commit
ae32bc2b77
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/b/Brightmare.java
Normal file
76
Mage.Sets/src/mage/cards/b/Brightmare.java
Normal file
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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("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 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("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("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("Brushstrider", 381, Rarity.UNCOMMON, mage.cards.b.Brushstrider.class));
|
||||||
cards.add(new SetCardInfo("Bubbling Cauldron", 460, Rarity.UNCOMMON, mage.cards.b.BubblingCauldron.class));
|
cards.add(new SetCardInfo("Bubbling Cauldron", 460, Rarity.UNCOMMON, mage.cards.b.BubblingCauldron.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue