Implemented Worthy Knight

This commit is contained in:
Evan Kranzler 2019-09-10 17:23:51 -04:00
parent 71fd51ec2b
commit 10daaa3906
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,49 @@
package mage.cards.w;
import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.HumanToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class WorthyKnight extends CardImpl {
private static final FilterSpell filter = new FilterSpell("a Knight spell");
static {
filter.add(new SubtypePredicate(SubType.HUMAN));
}
public WorthyKnight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Whenever you cast a Knight spell, create a 1/1 white Human creature token.
this.addAbility(new SpellCastControllerTriggeredAbility(
new CreateTokenEffect(new HumanToken()), filter, false
));
}
private WorthyKnight(final WorthyKnight card) {
super(card);
}
@Override
public WorthyKnight copy() {
return new WorthyKnight(this);
}
}

View file

@ -124,6 +124,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Witch's Vengeance", 111, Rarity.RARE, mage.cards.w.WitchsVengeance.class));
cards.add(new SetCardInfo("Witching Well", 74, Rarity.COMMON, mage.cards.w.WitchingWell.class));
cards.add(new SetCardInfo("Workshop Elders", 318, Rarity.RARE, mage.cards.w.WorkshopElders.class));
cards.add(new SetCardInfo("Worthy Knight", 36, Rarity.RARE, mage.cards.w.WorthyKnight.class));
// This is here to prevent the incomplete adventure implementation from causing problems and will be removed
cards.removeIf(setCardInfo -> AdventureCard.class.isAssignableFrom(setCardInfo.getCardClass()));