[BRC] Implement Glint Raker

This commit is contained in:
Evan Kranzler 2022-11-06 17:59:12 -05:00
parent 8def408d41
commit f097e9763d
3 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,63 @@
package mage.cards.g;
import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.HighestManaValueCount;
import mage.abilities.dynamicvalue.common.SavedDamageValue;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.RevealLibraryPickControllerEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.PutCards;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class GlintRaker extends CardImpl {
private static final DynamicValue xValue = new HighestManaValueCount(StaticFilters.FILTER_PERMANENT_ARTIFACTS);
public GlintRaker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.subtype.add(SubType.DRAKE);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Glint Raker gets +X/+0, where X is the highest mana value among artifacts you control.
this.addAbility(new SimpleStaticAbility(new BoostSourceEffect(
xValue, StaticValue.get(0), Duration.WhileOnBattlefield
)));
// Whenever Glint Raker deals combat damage to a player, you may reveal that many cards from the top of your library. Put an artifact card revealed this way into your hand and the rest into your graveyard.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
new RevealLibraryPickControllerEffect(
SavedDamageValue.MANY, 1,
StaticFilters.FILTER_CARD_ARTIFACT_AN,
PutCards.HAND, PutCards.GRAVEYARD, false
), true
));
}
private GlintRaker(final GlintRaker card) {
super(card);
}
@Override
public GlintRaker copy() {
return new GlintRaker(this);
}
}

View file

@ -73,6 +73,7 @@ public final class TheBrothersWarCommander extends ExpansionSet {
cards.add(new SetCardInfo("Fellwar Stone", 141, Rarity.UNCOMMON, mage.cards.f.FellwarStone.class));
cards.add(new SetCardInfo("Filigree Attendant", 85, Rarity.UNCOMMON, mage.cards.f.FiligreeAttendant.class));
cards.add(new SetCardInfo("Geth, Lord of the Vault", 107, Rarity.MYTHIC, mage.cards.g.GethLordOfTheVault.class));
cards.add(new SetCardInfo("Glint Raker", 7, Rarity.RARE, mage.cards.g.GlintRaker.class));
cards.add(new SetCardInfo("Goldmire Bridge", 186, Rarity.COMMON, mage.cards.g.GoldmireBridge.class));
cards.add(new SetCardInfo("Great Furnace", 187, Rarity.COMMON, mage.cards.g.GreatFurnace.class));
cards.add(new SetCardInfo("Hedron Archive", 142, Rarity.UNCOMMON, mage.cards.h.HedronArchive.class));

View file

@ -1,5 +1,7 @@
package mage.abilities.effects.common;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.constants.PutCards;
import mage.filter.FilterCard;
@ -15,6 +17,11 @@ public class RevealLibraryPickControllerEffect extends LookLibraryAndPickControl
public RevealLibraryPickControllerEffect(int numberOfCards, int numberToPick, FilterCard filter,
PutCards putPickedCards, PutCards putLookedCards, boolean optional) {
this(StaticValue.get(numberOfCards), numberToPick, filter, putPickedCards, putLookedCards, optional);
}
public RevealLibraryPickControllerEffect(DynamicValue numberOfCards, int numberToPick, FilterCard filter,
PutCards putPickedCards, PutCards putLookedCards, boolean optional) {
super(numberOfCards, numberToPick, filter, putPickedCards, putLookedCards, optional);
this.revealCards = true;
this.revealPickedCards = false;