[OTJ] Implement Baron Bertram Graywater

This commit is contained in:
Susucre 2024-03-30 16:46:22 +01:00
parent da6cedf0b1
commit ef6ee4d0ea
3 changed files with 96 additions and 0 deletions

View file

@ -0,0 +1,63 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldOneOrMoreTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.permanent.token.VampireRogueToken;
import java.util.UUID;
/**
* @author Susucr
*/
public final class BaronBertramGraywater extends CardImpl {
static final FilterPermanent filter = new FilterPermanent("tokens");
static {
filter.add(TokenPredicate.TRUE);
}
public BaronBertramGraywater(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{B}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.VAMPIRE);
this.subtype.add(SubType.NOBLE);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Whenever one or more tokens enter the battlefield under your control, create a 1/1 black Vampire Rogue creature token with lifelink. This ability triggers only once each turn.
this.addAbility(new EntersBattlefieldOneOrMoreTriggeredAbility(
new CreateTokenEffect(new VampireRogueToken()), filter, TargetController.YOU
).setTriggersOnceEachTurn(true));
// {1}{B}, Sacrifice another creature or artifact: Draw a card.
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{1}{B}"));
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT_SHORT_TEXT));
this.addAbility(ability);
}
private BaronBertramGraywater(final BaronBertramGraywater card) {
super(card);
}
@Override
public BaronBertramGraywater copy() {
return new BaronBertramGraywater(this);
}
}

View file

@ -33,6 +33,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet {
cards.add(new SetCardInfo("At Knifepoint", 193, Rarity.UNCOMMON, mage.cards.a.AtKnifepoint.class));
cards.add(new SetCardInfo("Badlands Revival", 194, Rarity.UNCOMMON, mage.cards.b.BadlandsRevival.class));
cards.add(new SetCardInfo("Bandit's Haul", 240, Rarity.UNCOMMON, mage.cards.b.BanditsHaul.class));
cards.add(new SetCardInfo("Baron Bertram Graywater", 195, Rarity.UNCOMMON, mage.cards.b.BaronBertramGraywater.class));
cards.add(new SetCardInfo("Beastbond Outcaster", 154, Rarity.UNCOMMON, mage.cards.b.BeastbondOutcaster.class));
cards.add(new SetCardInfo("Blacksnag Buzzard", 79, Rarity.COMMON, mage.cards.b.BlacksnagBuzzard.class));
cards.add(new SetCardInfo("Blood Hustler", 80, Rarity.UNCOMMON, mage.cards.b.BloodHustler.class));

View file

@ -0,0 +1,32 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.LifelinkAbility;
import mage.constants.CardType;
import mage.constants.SubType;
/**
* @author Susucr
*/
public final class VampireRogueToken extends TokenImpl {
public VampireRogueToken() {
super("Vampire Rogue Token", "black Vampire Rogue creature token with lifelink");
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add(SubType.VAMPIRE);
subtype.add(SubType.ROGUE);
power = new MageInt(1);
toughness = new MageInt(1);
this.addAbility(LifelinkAbility.getInstance());
}
private VampireRogueToken(final VampireRogueToken token) {
super(token);
}
@Override
public VampireRogueToken copy() {
return new VampireRogueToken(this);
}
}