Implemented Tezzeret's Gatebreaker

This commit is contained in:
Evan Kranzler 2018-06-20 20:44:38 -04:00
parent 025fc755bc
commit 1dc322cd12
2 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,74 @@
package mage.cards.t;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.common.combat.CantBeBlockedAllEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ColorPredicate;
/**
*
* @author TheElk801
*/
public final class TezzeretsGatebreaker extends CardImpl {
private static final FilterCard filter = new FilterCard("a blue or artifact card");
static {
filter.add(Predicates.or(
new ColorPredicate(ObjectColor.BLUE),
new CardTypePredicate(CardType.ARTIFACT)
));
}
public TezzeretsGatebreaker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
// When Tezzeret's Gatebreaker enters the battlefield, look at the top five cards of your library. You may reveal a blue or artifact card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new LookLibraryAndPickControllerEffect(
new StaticValue(5), false, new StaticValue(1), filter,
Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false
).setBackInRandomOrder(true).setText("look at the top five cards of your library. "
+ "You may reveal a blue or artifact card from among them and put it into your hand. "
+ "Put the rest on the bottom of your library in a random order.")
));
// {5}{U}, {T}, Sacrifice Tezzeret's Gatebreaker: Creatures you control can't be blocked this turn.
Ability ability = new SimpleActivatedAbility(
new CantBeBlockedAllEffect(
StaticFilters.FILTER_CONTROLLED_CREATURES,
Duration.EndOfTurn
),
new ManaCostsImpl("{5}{U}")
);
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}
public TezzeretsGatebreaker(final TezzeretsGatebreaker card) {
super(card);
}
@Override
public TezzeretsGatebreaker copy() {
return new TezzeretsGatebreaker(this);
}
}

View file

@ -212,6 +212,7 @@ public final class CoreSet2019 extends ExpansionSet {
cards.add(new SetCardInfo("Suspicious Bookcase", 246, Rarity.UNCOMMON, mage.cards.s.SuspiciousBookcase.class));
cards.add(new SetCardInfo("Take Vengeance", 40, Rarity.COMMON, mage.cards.t.TakeVengeance.class));
cards.add(new SetCardInfo("Tattered Mummy", 295, Rarity.COMMON, mage.cards.t.TatteredMummy.class));
cards.add(new SetCardInfo("Tezzeret's Gatebreaker", 289, Rarity.RARE, mage.cards.t.TezzeretsGatebreaker.class));
cards.add(new SetCardInfo("Tezzeret's Strider", 290, Rarity.UNCOMMON, mage.cards.t.TezzeretsStrider.class));
cards.add(new SetCardInfo("Tezzeret, Cruel Machinist", 286, Rarity.MYTHIC, mage.cards.t.TezzeretCruelMachinist.class));
cards.add(new SetCardInfo("Thornhide Wolves", 204, Rarity.COMMON, mage.cards.t.ThornhideWolves.class));