Implemented Ogre Errant

This commit is contained in:
Evan Kranzler 2019-09-12 17:22:00 -04:00
parent 9ace4df854
commit 2a514c73b2
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,57 @@
package mage.cards.o;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.MenaceAbility;
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.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.AttackingPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class OgreErrant extends CardImpl {
private static final FilterPermanent filter
= new FilterPermanent(SubType.KNIGHT, "another attacking Knight");
static {
filter.add(AttackingPredicate.instance);
filter.add(AnotherPredicate.instance);
}
public OgreErrant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.OGRE);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Whenever Ogre Errant attacks, another target attacking Knight gains menace until end of turn.
Ability ability = new AttacksTriggeredAbility(new GainAbilityTargetEffect(
new MenaceAbility(), Duration.EndOfTurn
).setText("another target attacking Knight gains menace until end of turn"), false);
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
private OgreErrant(final OgreErrant card) {
super(card);
}
@Override
public OgreErrant copy() {
return new OgreErrant(this);
}
}

View file

@ -108,6 +108,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
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 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));
cards.add(new SetCardInfo("Oko's Hospitality", 312, Rarity.RARE, mage.cards.o.OkosHospitality.class));
cards.add(new SetCardInfo("Oko, Thief of Crowns", 197, Rarity.MYTHIC, mage.cards.o.OkoThiefOfCrowns.class));