[MAT] Implement Drannith Ruins

This commit is contained in:
theelk801 2023-05-03 07:42:30 -04:00
parent 9431833058
commit 89a6f520ab
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,57 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.EnteredThisTurnPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DrannithRuins extends CardImpl {
private static final FilterPermanent filter = new FilterCreaturePermanent("non-Human creature that entered the battlefield this turn");
static {
filter.add(Predicates.not(SubType.HUMAN.getPredicate()));
filter.add(EnteredThisTurnPredicate.instance);
}
public DrannithRuins(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// {T}: Add {C}.
this.addAbility(new ColorlessManaAbility());
// {2}, {T}: Put two +1/+1 counters on target non-Human creature that entered the battlefield this turn.
Ability ability = new SimpleActivatedAbility(
new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)), new GenericManaCost(2)
);
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
private DrannithRuins(final DrannithRuins card) {
super(card);
}
@Override
public DrannithRuins copy() {
return new DrannithRuins(this);
}
}

View file

@ -21,6 +21,7 @@ public final class MarchOfTheMachineTheAftermath extends ExpansionSet {
this.hasBasicLands = false;
this.hasBoosters = false; // temporary
cards.add(new SetCardInfo("Drannith Ruins", 50, Rarity.RARE, mage.cards.d.DrannithRuins.class));
cards.add(new SetCardInfo("Filter Out", 7, Rarity.UNCOMMON, mage.cards.f.FilterOut.class));
cards.add(new SetCardInfo("Gold-Forged Thopteryx", 31, Rarity.UNCOMMON, mage.cards.g.GoldForgedThopteryx.class));
cards.add(new SetCardInfo("Harnessed Snubhorn", 3, Rarity.UNCOMMON, mage.cards.h.HarnessedSnubhorn.class));