Implemented Oakhame Adversary

This commit is contained in:
Evan Kranzler 2019-09-13 20:13:49 -04:00
parent c06a7b35a1
commit 537c48b204
2 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,69 @@
package mage.cards.o;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class OakhameAdversary extends CardImpl {
private static final FilterPermanent filter
= new FilterPermanent("your opponent controls a green permanent");
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));
filter.add(new ColorPredicate(ObjectColor.GREEN));
}
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
public OakhameAdversary(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// This spell costs {2} less to cast if your opponent controls a green permanent.
this.addAbility(new SimpleStaticAbility(
Zone.STACK, new SpellCostReductionSourceEffect(2, condition)
).setRuleAtTheTop(true));
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance());
// Whenever Oakhame Adversary deals combat damage to a player, draw a card.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
new DrawCardSourceControllerEffect(1), false
));
}
private OakhameAdversary(final OakhameAdversary card) {
super(card);
}
@Override
public OakhameAdversary copy() {
return new OakhameAdversary(this);
}
}

View file

@ -118,6 +118,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Mistford River Turtle", 56, Rarity.COMMON, mage.cards.m.MistfordRiverTurtle.class));
cards.add(new SetCardInfo("Murderous Rider", 97, Rarity.RARE, mage.cards.m.MurderousRider.class));
cards.add(new SetCardInfo("Mystical Dispute", 58, Rarity.UNCOMMON, mage.cards.m.MysticalDispute.class));
cards.add(new SetCardInfo("Oakhame Adversary", 167, Rarity.UNCOMMON, mage.cards.o.OakhameAdversary.class));
cards.add(new SetCardInfo("Oakhame Ranger", 212, Rarity.UNCOMMON, mage.cards.o.OakhameRanger.class));
cards.add(new SetCardInfo("Ogre Errant", 132, Rarity.COMMON, mage.cards.o.OgreErrant.class));
cards.add(new SetCardInfo("Oko's Accomplices", 310, Rarity.COMMON, mage.cards.o.OkosAccomplices.class));