mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 12:19:59 -08:00
[ECL] Implement Tend the Sprigs
This commit is contained in:
parent
dcaaafd9d1
commit
0d582aa764
3 changed files with 98 additions and 0 deletions
66
Mage.Sets/src/mage/cards/t/TendTheSprigs.java
Normal file
66
Mage.Sets/src/mage/cards/t/TendTheSprigs.java
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
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.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.permanent.token.TreefolkReachToken;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TendTheSprigs extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent();
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.LAND.getPredicate(),
|
||||
SubType.TREEFOLK.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 6);
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Lands and Treefolk you control", new PermanentsOnBattlefieldCount(filter)
|
||||
);
|
||||
|
||||
public TendTheSprigs(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}");
|
||||
|
||||
// Search your library for a basic land card, put it onto the battlefield tapped, then shuffle. Then if you control seven or more lands and/or Treefolk, create a 3/4 green Treefolk creature token with reach.
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(
|
||||
new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true)
|
||||
);
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new CreateTokenEffect(new TreefolkReachToken()), condition, "Then if you control seven " +
|
||||
"or more lands and/or Treefolk, create a 3/4 green Treefolk creature token with reach"
|
||||
));
|
||||
this.getSpellAbility().addHint(hint);
|
||||
}
|
||||
|
||||
private TendTheSprigs(final TendTheSprigs card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TendTheSprigs copy() {
|
||||
return new TendTheSprigs(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -155,6 +155,7 @@ public final class LorwynEclipsed extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Temple Garden", 268, Rarity.RARE, mage.cards.t.TempleGarden.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Temple Garden", 351, Rarity.RARE, mage.cards.t.TempleGarden.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Temporal Cleansing", 78, Rarity.COMMON, mage.cards.t.TemporalCleansing.class));
|
||||
cards.add(new SetCardInfo("Tend the Sprigs", 197, Rarity.COMMON, mage.cards.t.TendTheSprigs.class));
|
||||
cards.add(new SetCardInfo("Thoughtweft Lieutenant", 246, Rarity.UNCOMMON, mage.cards.t.ThoughtweftLieutenant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Thoughtweft Lieutenant", 343, Rarity.UNCOMMON, mage.cards.t.ThoughtweftLieutenant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Tweeze", 162, Rarity.COMMON, mage.cards.t.Tweeze.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TreefolkReachToken extends TokenImpl {
|
||||
|
||||
public TreefolkReachToken() {
|
||||
super("Treefolk Token", "3/4 green Treefolk creature token with reach");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add(SubType.TREEFOLK);
|
||||
power = new MageInt(3);
|
||||
toughness = new MageInt(4);
|
||||
|
||||
addAbility(ReachAbility.getInstance());
|
||||
}
|
||||
|
||||
private TreefolkReachToken(final TreefolkReachToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public TreefolkReachToken copy() {
|
||||
return new TreefolkReachToken(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue