[CMR] Implemented Azure Fleet Admiral

This commit is contained in:
Evan Kranzler 2020-11-05 21:43:31 -05:00
parent 8609f389c4
commit b71cb88b9a
2 changed files with 67 additions and 0 deletions

View file

@ -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<Permanent> {
instance;
@Override
public boolean apply(Permanent input, Game game) {
return input.isControlledBy(game.getMonarchId());
}
}

View file

@ -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("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("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("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("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("Biowaste Blob", 219, Rarity.RARE, mage.cards.b.BiowasteBlob.class));
cards.add(new SetCardInfo("Bitter Revelation", 109, Rarity.COMMON, mage.cards.b.BitterRevelation.class)); cards.add(new SetCardInfo("Bitter Revelation", 109, Rarity.COMMON, mage.cards.b.BitterRevelation.class));