1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-09 01:01:06 -09:00

Implemented Tribute Mage

This commit is contained in:
Evan Kranzler 2019-05-29 08:18:55 -04:00
parent 304552b440
commit 40580ee012
2 changed files with 53 additions and 0 deletions
Mage.Sets/src/mage

View file

@ -0,0 +1,52 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TributeMage extends CardImpl {
private static final FilterCard filter = new FilterCard("an artifact card with converted mana cost 2");
static {
filter.add(new CardTypePredicate(CardType.ARTIFACT));
filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, 2));
}
public TributeMage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// When Tribute Mage enters the battlefield, you may search your library for an artifact card with converted mana cost 2, reveal that card, put it into your hand, then shuffle your library.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(
new TargetCardInLibrary(0, 1, filter), true, true
), true));
}
private TributeMage(final TributeMage card) {
super(card);
}
@Override
public TributeMage copy() {
return new TributeMage(this);
}
}

View file

@ -160,6 +160,7 @@ public final class ModernHorizons extends ExpansionSet {
cards.add(new SetCardInfo("The First Sliver", 200, Rarity.MYTHIC, mage.cards.t.TheFirstSliver.class));
cards.add(new SetCardInfo("Throes of Chaos", 150, Rarity.UNCOMMON, mage.cards.t.ThroesOfChaos.class));
cards.add(new SetCardInfo("Thundering Djinn", 215, Rarity.UNCOMMON, mage.cards.t.ThunderingDjinn.class));
cards.add(new SetCardInfo("Tribute Mage", 73, Rarity.UNCOMMON, mage.cards.t.TributeMage.class));
cards.add(new SetCardInfo("Twisted Reflection", 74, Rarity.UNCOMMON, mage.cards.t.TwistedReflection.class));
cards.add(new SetCardInfo("Umezawa's Charm", 111, Rarity.COMMON, mage.cards.u.UmezawasCharm.class));
cards.add(new SetCardInfo("Undead Augur", 112, Rarity.UNCOMMON, mage.cards.u.UndeadAugur.class));