Implemented Surly Badgersaur

This commit is contained in:
Evan Kranzler 2020-04-16 23:02:55 -04:00
parent 41df7d3209
commit 914a358a40
2 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,77 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DiscardCardControllerTriggeredAbility;
import mage.abilities.effects.common.FightTargetSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.common.FilterNonlandCard;
import mage.filter.predicate.Predicates;
import mage.game.permanent.token.TreasureToken;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SurlyBadgersaur extends CardImpl {
private static final FilterCard filter = new FilterNonlandCard("a noncreature, nonland card");
private static final FilterPermanent filter2 = new FilterCreaturePermanent("creature you don't control");
static {
filter.add(Predicates.not(CardType.CREATURE.getPredicate()));
filter2.add(TargetController.NOT_YOU.getControllerPredicate());
}
public SurlyBadgersaur(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.BADGER);
this.subtype.add(SubType.DINOSAUR);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Whenever you discard a creature card, put a +1/+1 counter on Surly Badgersaur.
this.addAbility(new DiscardCardControllerTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
false, StaticFilters.FILTER_CARD_CREATURE_A
));
// Whenever you discard a land card, create a treasure token.
this.addAbility(new DiscardCardControllerTriggeredAbility(
new CreateTokenEffect(new TreasureToken()),
false, StaticFilters.FILTER_CARD_LAND_A
));
// Whenever you discard a noncreature, nonland card, Surly Badgersaur fights up to one target creature you don't control.
Ability ability = new DiscardCardControllerTriggeredAbility(
new FightTargetSourceEffect().setText(
"{this} fights up to one target creature you don't control"
), false, filter
);
ability.addTarget(new TargetPermanent(0, 1, filter2, false));
this.addAbility(ability);
}
private SurlyBadgersaur(final SurlyBadgersaur card) {
super(card);
}
@Override
public SurlyBadgersaur copy() {
return new SurlyBadgersaur(this);
}
}

View file

@ -284,6 +284,7 @@ public final class Commander2020Edition extends ExpansionSet {
cards.add(new SetCardInfo("Sunblast Angel", 102, Rarity.RARE, mage.cards.s.SunblastAngel.class));
cards.add(new SetCardInfo("Sungrass Prairie", 317, Rarity.RARE, mage.cards.s.SungrassPrairie.class));
cards.add(new SetCardInfo("Sunken Hollow", 318, Rarity.RARE, mage.cards.s.SunkenHollow.class));
cards.add(new SetCardInfo("Surly Badgersaur", 57, Rarity.RARE, mage.cards.s.SurlyBadgersaur.class));
cards.add(new SetCardInfo("Surreal Memoir", 161, Rarity.UNCOMMON, mage.cards.s.SurrealMemoir.class));
cards.add(new SetCardInfo("Swarm Intelligence", 124, Rarity.RARE, mage.cards.s.SwarmIntelligence.class));
cards.add(new SetCardInfo("Swiftfoot Boots", 254, Rarity.UNCOMMON, mage.cards.s.SwiftfootBoots.class));