forked from External/mage
[TDM] Implement Abzan Monument
This commit is contained in:
parent
5f367c9049
commit
0aabd1699f
2 changed files with 102 additions and 0 deletions
101
Mage.Sets/src/mage/cards/a/AbzanMonument.java
Normal file
101
Mage.Sets/src/mage/cards/a/AbzanMonument.java
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.GreatestToughnessAmongControlledCreaturesValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.SpiritXXToken;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AbzanMonument extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a basic Plains, Swamp, or Forest card");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.BASIC.getPredicate());
|
||||
filter.add(Predicates.or(
|
||||
SubType.PLAINS.getPredicate(),
|
||||
SubType.SWAMP.getPredicate(),
|
||||
SubType.FOREST.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Greatest toughness among creatures you control",
|
||||
GreatestToughnessAmongControlledCreaturesValue.instance
|
||||
);
|
||||
|
||||
public AbzanMonument(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
// When this artifact enters, search your library for a basic Plains, Swamp, or Forest card, reveal it, put it into your hand, then shuffle.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true)
|
||||
));
|
||||
|
||||
// {1}{W}{B}{G}, {T}, Sacrifice this artifact: Create an X/X white Spirit creature token, where X is the greatest toughness among creatures you control. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||
new AbzanMonumentEffect(), new ManaCostsImpl<>("{1}{W}{B}{G}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability.addHint(hint));
|
||||
}
|
||||
|
||||
private AbzanMonument(final AbzanMonument card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbzanMonument copy() {
|
||||
return new AbzanMonument(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AbzanMonumentEffect extends OneShotEffect {
|
||||
|
||||
AbzanMonumentEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "create an X/X white Spirit creature token, " +
|
||||
"where X is the greatest toughness among creatures you control";
|
||||
}
|
||||
|
||||
private AbzanMonumentEffect(final AbzanMonumentEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbzanMonumentEffect copy() {
|
||||
return new AbzanMonumentEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return new SpiritXXToken(
|
||||
GreatestToughnessAmongControlledCreaturesValue
|
||||
.instance
|
||||
.calculate(game, source, this)
|
||||
).putOntoBattlefield(1, game, source);
|
||||
}
|
||||
}
|
||||
|
|
@ -21,6 +21,7 @@ public final class TarkirDragonstorm extends ExpansionSet {
|
|||
this.hasBasicLands = true;
|
||||
|
||||
cards.add(new SetCardInfo("Abzan Devotee", 68, Rarity.COMMON, mage.cards.a.AbzanDevotee.class));
|
||||
cards.add(new SetCardInfo("Abzan Monument", 238, Rarity.UNCOMMON, mage.cards.a.AbzanMonument.class));
|
||||
cards.add(new SetCardInfo("Aegis Sculptor", 35, Rarity.UNCOMMON, mage.cards.a.AegisSculptor.class));
|
||||
cards.add(new SetCardInfo("Agent of Kotis", 36, Rarity.COMMON, mage.cards.a.AgentOfKotis.class));
|
||||
cards.add(new SetCardInfo("Alesha's Legacy", 72, Rarity.COMMON, mage.cards.a.AleshasLegacy.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue