diff --git a/Mage.Sets/src/mage/cards/a/AzureFleetAdmiral.java b/Mage.Sets/src/mage/cards/a/AzureFleetAdmiral.java new file mode 100644 index 0000000000..13ecea64a7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AzureFleetAdmiral.java @@ -0,0 +1,66 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.BecomesMonarchSourceEffect; +import mage.abilities.effects.common.combat.CantBeBlockedByAllSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AzureFleetAdmiral extends CardImpl { + + private static final FilterCreaturePermanent filter + = new FilterCreaturePermanent("creatures the monarch controls"); + + static { + filter.add(AzureFleetAdmiralPredicate.instance); + } + + public AzureFleetAdmiral(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Azure Fleet Admiral enters the battlefield, you become the monarch. + this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect())); + + // Azure Fleet Admiral can't be blocked by creatures the monarch controls. + this.addAbility(new SimpleStaticAbility( + new CantBeBlockedByAllSourceEffect(filter, Duration.WhileOnBattlefield) + )); + } + + private AzureFleetAdmiral(final AzureFleetAdmiral card) { + super(card); + } + + @Override + public AzureFleetAdmiral copy() { + return new AzureFleetAdmiral(this); + } +} + +enum AzureFleetAdmiralPredicate implements Predicate { + instance; + + @Override + public boolean apply(Permanent input, Game game) { + return input.isControlledBy(game.getMonarchId()); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegends.java b/Mage.Sets/src/mage/sets/CommanderLegends.java index c2bd3c2afb..5c1b5d1c98 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegends.java +++ b/Mage.Sets/src/mage/sets/CommanderLegends.java @@ -61,6 +61,7 @@ public final class CommanderLegends extends ExpansionSet { cards.add(new SetCardInfo("Austere Command", 12, Rarity.RARE, mage.cards.a.AustereCommand.class)); cards.add(new SetCardInfo("Aven Surveyor", 57, Rarity.COMMON, mage.cards.a.AvenSurveyor.class)); cards.add(new SetCardInfo("Averna, the Chaos Bloom", 269, Rarity.RARE, mage.cards.a.AvernaTheChaosBloom.class)); + cards.add(new SetCardInfo("Azure Fleet Admiral", 58, Rarity.COMMON, mage.cards.a.AzureFleetAdmiral.class)); cards.add(new SetCardInfo("Belbe, Corrupted Observer", 270, Rarity.RARE, mage.cards.b.BelbeCorruptedObserver.class)); cards.add(new SetCardInfo("Biowaste Blob", 219, Rarity.RARE, mage.cards.b.BiowasteBlob.class)); cards.add(new SetCardInfo("Bitter Revelation", 109, Rarity.COMMON, mage.cards.b.BitterRevelation.class));