[LTR] Implement Flowering of the White Tree

This commit is contained in:
theelk801 2023-06-08 20:36:00 -04:00
parent fe9b644168
commit 1aea1ebe92
3 changed files with 70 additions and 1 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.f;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FloweringOfTheWhiteTree extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonlegendary creatures");
static {
filter.add(Predicates.not(SuperType.LEGENDARY.getPredicate()));
}
public FloweringOfTheWhiteTree(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}{W}");
this.supertype.add(SuperType.LEGENDARY);
// Legendary creatures you control get +2/+1 and have ward {1}.
Ability ability = new SimpleStaticAbility(new BoostControlledEffect(
2, 1, Duration.WhileOnBattlefield,
StaticFilters.FILTER_CREATURE_LEGENDARY
));
ability.addEffect(new GainAbilityControlledEffect(
new WardAbility(new GenericManaCost(1)), Duration.WhileOnBattlefield,
StaticFilters.FILTER_CREATURES_LEGENDARY
).setText("and have ward {1}"));
this.addAbility(ability);
// Nonlegendary creatures you control get +1/+1.
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
1, 1, Duration.WhileOnBattlefield, filter
)));
}
private FloweringOfTheWhiteTree(final FloweringOfTheWhiteTree card) {
super(card);
}
@Override
public FloweringOfTheWhiteTree copy() {
return new FloweringOfTheWhiteTree(this);
}
}

View file

@ -48,6 +48,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
cards.add(new SetCardInfo("Fangorn, Tree Shepherd", 166, Rarity.RARE, mage.cards.f.FangornTreeShepherd.class));
cards.add(new SetCardInfo("Fiery Inscription", 126, Rarity.UNCOMMON, mage.cards.f.FieryInscription.class));
cards.add(new SetCardInfo("Fire of Orthanc", 127, Rarity.COMMON, mage.cards.f.FireOfOrthanc.class));
cards.add(new SetCardInfo("Flowering of the White Tree", 15, Rarity.RARE, mage.cards.f.FloweringOfTheWhiteTree.class));
cards.add(new SetCardInfo("Foray of Orcs", 128, Rarity.UNCOMMON, mage.cards.f.ForayOfOrcs.class));
cards.add(new SetCardInfo("Forest", 270, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Frodo Baggins", 205, Rarity.UNCOMMON, mage.cards.f.FrodoBaggins.class));

View file

@ -1089,13 +1089,20 @@ public final class StaticFilters {
FILTER_PERMANENT_LEGENDARY.setLockedFilter(true);
}
public static final FilterCreaturePermanent FILTER_CREATURE_LEGENDARY = new FilterCreaturePermanent();
public static final FilterCreaturePermanent FILTER_CREATURE_LEGENDARY = new FilterCreaturePermanent("legendary creature");
static {
FILTER_CREATURE_LEGENDARY.add(SuperType.LEGENDARY.getPredicate());
FILTER_CREATURE_LEGENDARY.setLockedFilter(true);
}
public static final FilterCreaturePermanent FILTER_CREATURES_LEGENDARY = new FilterCreaturePermanent("legendary creatures");
static {
FILTER_CREATURES_LEGENDARY.add(SuperType.LEGENDARY.getPredicate());
FILTER_CREATURES_LEGENDARY.setLockedFilter(true);
}
public static final FilterCard FILTER_CARD_ARTIFACT_OR_CREATURE = new FilterCard("artifact or creature card");
static {