diff --git a/Mage.Sets/src/mage/cards/a/AureliaExemplarOfJustice.java b/Mage.Sets/src/mage/cards/a/AureliaExemplarOfJustice.java new file mode 100644 index 0000000000..255859b4d3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AureliaExemplarOfJustice.java @@ -0,0 +1,103 @@ +package mage.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.MentorAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public final class AureliaExemplarOfJustice extends CardImpl { + + public AureliaExemplarOfJustice(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ANGEL); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Mentor + this.addAbility(new MentorAbility()); + + // At the beginning of combat on your turn, choose up to one target creature you control. Until end of turn, that creature gets +2/+0, gains trample if it's red, and gains vigilance if it's white. + Ability ability = new BeginningOfCombatTriggeredAbility( + new AureliaExemplarOfJusticeEffect(), + TargetController.YOU, false + ); + ability.addTarget(new TargetControlledCreaturePermanent(0, 1)); + this.addAbility(ability); + } + + public AureliaExemplarOfJustice(final AureliaExemplarOfJustice card) { + super(card); + } + + @Override + public AureliaExemplarOfJustice copy() { + return new AureliaExemplarOfJustice(this); + } +} + +class AureliaExemplarOfJusticeEffect extends OneShotEffect { + + public AureliaExemplarOfJusticeEffect() { + super(Outcome.Benefit); + this.staticText = "choose up to one target creature you control. " + + "Until end of turn, that creature gets +2/+0, " + + "gains trample if it's red, " + + "and gains vigilance if it's white."; + } + + public AureliaExemplarOfJusticeEffect(final AureliaExemplarOfJusticeEffect effect) { + super(effect); + } + + @Override + public AureliaExemplarOfJusticeEffect copy() { + return new AureliaExemplarOfJusticeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(source.getFirstTarget()); + if (creature == null) { + return false; + } + game.addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn), source); + if (creature.getColor(game).isRed()) { + game.addEffect(new GainAbilityTargetEffect( + TrampleAbility.getInstance(), Duration.EndOfTurn + ), source); + } + if (creature.getColor(game).isWhite()) { + game.addEffect(new GainAbilityTargetEffect( + VigilanceAbility.getInstance(), Duration.EndOfTurn + ), source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java index ab329eb971..925df443ed 100644 --- a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java +++ b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java @@ -28,6 +28,7 @@ public final class GuildsOfRavnica extends ExpansionSet { cards.add(new SetCardInfo("Artful Takedown", 151, Rarity.COMMON, mage.cards.a.ArtfulTakedown.class)); cards.add(new SetCardInfo("Assassin's Trophy", 152, Rarity.RARE, mage.cards.a.AssassinsTrophy.class)); cards.add(new SetCardInfo("Attendant of Vraska", 271, Rarity.UNCOMMON, mage.cards.a.AttendantOfVraska.class)); + cards.add(new SetCardInfo("Aurelia, Exemplar of Justice", 153, Rarity.MYTHIC, mage.cards.a.AureliaExemplarOfJustice.class)); cards.add(new SetCardInfo("Barging Sergeant", 92, Rarity.COMMON, mage.cards.b.BargingSergeant.class)); cards.add(new SetCardInfo("Beast Whisperer", 123, Rarity.RARE, mage.cards.b.BeastWhisperer.class)); cards.add(new SetCardInfo("Blade Instructor", 1, Rarity.COMMON, mage.cards.b.BladeInstructor.class));