[LTR] Implement The Shire

This commit is contained in:
theelk801 2023-04-22 20:22:03 -04:00
parent 1bd2ea9ce4
commit 44307f2d0a
4 changed files with 86 additions and 1 deletions

View file

@ -14,6 +14,8 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.MillCardsControllerEffect;
import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -42,6 +44,7 @@ public final class ArgothSanctumOfNature extends CardImpl {
private static final Condition condition
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.EQUAL_TO, 0);
private static final Hint hint = new ConditionHint(condition, "You control a legendary green creature");
public ArgothSanctumOfNature(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
@ -53,7 +56,7 @@ public final class ArgothSanctumOfNature extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(
new ConditionalOneShotEffect(new TapSourceEffect(), condition, ""),
"tapped unless you control a legendary green creature"
));
).addHint(hint));
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());

View file

@ -0,0 +1,74 @@
package mage.cards.t;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.permanent.token.FoodToken;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TheShire extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
static {
filter.add(SuperType.LEGENDARY.getPredicate());
}
private static final Condition condition
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.EQUAL_TO, 0);
private static final Hint hint = new ConditionHint(condition, "You control a legendary creature");
public TheShire(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.addSuperType(SuperType.LEGENDARY);
// The Shire enters the battlefield tapped unless you control a legendary creature.
this.addAbility(new EntersBattlefieldAbility(
new ConditionalOneShotEffect(new TapSourceEffect(), condition, ""),
"tapped unless you control a legendary creature"
).addHint(hint));
// {T}: Add {G}.
this.addAbility(new GreenManaAbility());
// {1}{G}, {T}, Tap an untapped creature you control: Create a Food token.
Ability ability = new SimpleActivatedAbility(new CreateTokenEffect(new FoodToken()), new ManaCostsImpl<>("{1}{G}"));
ability.addCost(new TapSourceCost());
ability.addCost(new TapTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE)));
this.addAbility(ability);
}
private TheShire(final TheShire card) {
super(card);
}
@Override
public TheShire copy() {
return new TheShire(this);
}
}

View file

@ -29,6 +29,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
cards.add(new SetCardInfo("Sauron, the Lidless Eye", 288, Rarity.MYTHIC, mage.cards.s.SauronTheLidlessEye.class));
cards.add(new SetCardInfo("Swamp", 276, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("The One Ring", 246, Rarity.MYTHIC, mage.cards.t.TheOneRing.class));
cards.add(new SetCardInfo("The Shire", 260, Rarity.RARE, mage.cards.t.TheShire.class));
cards.add(new SetCardInfo("Trailblazer's Boots", 398, Rarity.RARE, mage.cards.t.TrailblazersBoots.class));
cards.add(new SetCardInfo("You Cannot Pass!", 38, Rarity.UNCOMMON, mage.cards.y.YouCannotPass.class));
}

View file

@ -608,6 +608,13 @@ public final class StaticFilters {
FILTER_CONTROLLED_ANOTHER_CREATURE.setLockedFilter(true);
}
public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_UNTAPPED_CREATURE = new FilterControlledCreaturePermanent("untapped creature you control");
static {
FILTER_CONTROLLED_UNTAPPED_CREATURE.add(TappedPredicate.UNTAPPED);
FILTER_CONTROLLED_UNTAPPED_CREATURE.setLockedFilter(true);
}
public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_UNTAPPED_CREATURES = new FilterControlledCreaturePermanent("untapped creatures you control");
static {