Implemented Burning-Yard Trainer

This commit is contained in:
Evan Kranzler 2019-09-09 18:12:52 -04:00
parent abeb6ec9d0
commit c60b56b2a1
2 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,70 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BurningYardTrainer extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.KNIGHT);
static {
filter.add(AnotherPredicate.instance);
}
public BurningYardTrainer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Trample
this.addAbility(TrampleAbility.getInstance());
// Haste
this.addAbility(HasteAbility.getInstance());
// When Burning-Yard Trainer enters the battlefield, another target Knight you control gets +2/+2 and gains trample and haste until end of turn.
Ability ability = new EntersBattlefieldTriggeredAbility(
new BoostTargetEffect(2, 2, Duration.EndOfTurn)
.setText("another target Knight you control gets +2/+2")
);
ability.addEffect(new GainAbilityTargetEffect(
TrampleAbility.getInstance(), Duration.EndOfTurn
).setText("and gains trample"));
ability.addEffect(new GainAbilityTargetEffect(
HasteAbility.getInstance(), Duration.EndOfTurn
).setText("and haste until end of turn"));
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
private BurningYardTrainer(final BurningYardTrainer card) {
super(card);
}
@Override
public BurningYardTrainer copy() {
return new BurningYardTrainer(this);
}
}

View file

@ -40,6 +40,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Blow Your House Down", 114, Rarity.COMMON, mage.cards.b.BlowYourHouseDown.class));
cards.add(new SetCardInfo("Bramblefort Fink", 311, Rarity.UNCOMMON, mage.cards.b.BramblefortFink.class));
cards.add(new SetCardInfo("Brimstone Trebuchet", 116, Rarity.COMMON, mage.cards.b.BrimstoneTrebuchet.class));
cards.add(new SetCardInfo("Burning-Yard Trainer", 117, Rarity.UNCOMMON, mage.cards.b.BurningYardTrainer.class));
cards.add(new SetCardInfo("Chittering Witch", 319, Rarity.RARE, mage.cards.c.ChitteringWitch.class));
cards.add(new SetCardInfo("Chulane, Teller of Tales", 326, Rarity.MYTHIC, mage.cards.c.ChulaneTellerOfTales.class));
cards.add(new SetCardInfo("Command Tower", 333, Rarity.COMMON, mage.cards.c.CommandTower.class));