diff --git a/Mage.Sets/src/mage/cards/e/ExcaliburSwordOfEden.java b/Mage.Sets/src/mage/cards/e/ExcaliburSwordOfEden.java new file mode 100644 index 00000000000..fe2a24e51dd --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ExcaliburSwordOfEden.java @@ -0,0 +1,72 @@ +package mage.cards.e; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.common.TotalPermanentsManaValue; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.HistoricPredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author grimreap124 + */ +public final class ExcaliburSwordOfEden extends CardImpl { + + private static final FilterControlledCreaturePermanent filterLegendary + = new FilterControlledCreaturePermanent("legendary creature"); + private static final FilterControlledPermanent historicFilter = new FilterControlledPermanent("historic permanents you control"); + + static { + filterLegendary.add(SuperType.LEGENDARY.getPredicate()); + historicFilter.add(HistoricPredicate.instance); + } + + private static final TotalPermanentsManaValue xValue = new TotalPermanentsManaValue(historicFilter); + + public ExcaliburSwordOfEden(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{12}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.EQUIPMENT); + + // This spell costs {X} less to cast, where X is the total mana value of historic permanents you control. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, + new SpellCostReductionSourceEffect(xValue) + ).addHint(xValue.getHint()).setRuleAtTheTop(true) + ); + + // Equipped creature gets +10/+0 and has vigilance. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(10, 0)); + ability.addEffect(new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.EQUIPMENT).setText("and has vigilance")); + this.addAbility(ability); + + // Equip legendary creature {2} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), new TargetControlledCreaturePermanent(filterLegendary), false)); + + } + + private ExcaliburSwordOfEden(final ExcaliburSwordOfEden card) { + super(card); + } + + @Override + public ExcaliburSwordOfEden copy() { + return new ExcaliburSwordOfEden(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AssassinsCreed.java b/Mage.Sets/src/mage/sets/AssassinsCreed.java index c8700482689..b9609324ae0 100644 --- a/Mage.Sets/src/mage/sets/AssassinsCreed.java +++ b/Mage.Sets/src/mage/sets/AssassinsCreed.java @@ -50,6 +50,7 @@ public final class AssassinsCreed extends ExpansionSet { cards.add(new SetCardInfo("Escape Detection", 18, Rarity.UNCOMMON, mage.cards.e.EscapeDetection.class)); cards.add(new SetCardInfo("Escarpment Fortress", 278, Rarity.RARE, mage.cards.e.EscarpmentFortress.class)); cards.add(new SetCardInfo("Evie Frye", 19, Rarity.RARE, mage.cards.e.EvieFrye.class)); + cards.add(new SetCardInfo("Excalibur, Sword of Eden", 72, Rarity.RARE, mage.cards.e.ExcaliburSwordOfEden.class)); cards.add(new SetCardInfo("Ezio, Blade of Vengeance", 275, Rarity.MYTHIC, mage.cards.e.EzioBladeOfVengeance.class)); cards.add(new SetCardInfo("Ezio, Brash Novice", 55, Rarity.UNCOMMON, mage.cards.e.EzioBrashNovice.class)); cards.add(new SetCardInfo("Fatal Push", 90, Rarity.UNCOMMON, mage.cards.f.FatalPush.class));