Implemented Charmed Stray

This commit is contained in:
Evan Kranzler 2019-04-18 12:55:15 -04:00
parent dee2f9ab75
commit 86895041ef
2 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,56 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.abilities.keyword.LifelinkAbility;
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.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CharmedStray extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("other creature you control named Charmed Stray");
static {
filter.add(new NamePredicate("Charmed Stray"));
filter.add(AnotherPredicate.instance);
}
public CharmedStray(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
this.subtype.add(SubType.CAT);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Lifelink
this.addAbility(LifelinkAbility.getInstance());
// Whenever Charmed Stray enters the battlefield, put a +1/+1 counter on each other creature you control named Charmed Stray.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter)
));
}
private CharmedStray(final CharmedStray card) {
super(card);
}
@Override
public CharmedStray copy() {
return new CharmedStray(this);
}
}

View file

@ -59,6 +59,7 @@ public final class WarOfTheSpark extends ExpansionSet {
cards.add(new SetCardInfo("Chandra's Triumph", 121, Rarity.UNCOMMON, mage.cards.c.ChandrasTriumph.class));
cards.add(new SetCardInfo("Chandra, Fire Artisan", 119, Rarity.RARE, mage.cards.c.ChandraFireArtisan.class));
cards.add(new SetCardInfo("Charity Extractor", 81, Rarity.COMMON, mage.cards.c.CharityExtractor.class));
cards.add(new SetCardInfo("Charmed Stray", 8, Rarity.COMMON, mage.cards.c.CharmedStray.class));
cards.add(new SetCardInfo("Command the Dreadhorde", 82, Rarity.RARE, mage.cards.c.CommandTheDreadhorde.class));
cards.add(new SetCardInfo("Commence the Endgame", 45, Rarity.RARE, mage.cards.c.CommenceTheEndgame.class));
cards.add(new SetCardInfo("Contentious Plan", 46, Rarity.COMMON, mage.cards.c.ContentiousPlan.class));