[MOC] Implement Chivalric Alliance

This commit is contained in:
theelk801 2023-04-09 09:10:32 -04:00
parent eb27c30409
commit 9237b26b74
3 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,46 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.permanent.token.KnightWhiteBlueToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ChivalricAlliance extends CardImpl {
public ChivalricAlliance(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
// Whenever you attack with two or more creatures, draw a card.
this.addAbility(new AttacksWithCreaturesTriggeredAbility(
new DrawCardSourceControllerEffect(1), 2
));
// {2}, Discard a card: Create a 2/2 white and blue Knight creature token with vigilance.
Ability ability = new SimpleActivatedAbility(
new CreateTokenEffect(new KnightWhiteBlueToken()), new GenericManaCost(2)
);
ability.addCost(new DiscardCardCost());
this.addAbility(ability);
}
private ChivalricAlliance(final ChivalricAlliance card) {
super(card);
}
@Override
public ChivalricAlliance copy() {
return new ChivalricAlliance(this);
}
}

View file

@ -63,6 +63,7 @@ public final class MarchOfTheMachineCommander extends ExpansionSet {
cards.add(new SetCardInfo("Chant of Vitu-Ghazi", 177, Rarity.UNCOMMON, mage.cards.c.ChantOfVituGhazi.class));
cards.add(new SetCardInfo("Chaos Warp", 273, Rarity.RARE, mage.cards.c.ChaosWarp.class));
cards.add(new SetCardInfo("Chasm Skulker", 218, Rarity.RARE, mage.cards.c.ChasmSkulker.class));
cards.add(new SetCardInfo("Chivalric Alliance", 11, Rarity.RARE, mage.cards.c.ChivalricAlliance.class));
cards.add(new SetCardInfo("Choked Estuary", 394, Rarity.RARE, mage.cards.c.ChokedEstuary.class));
cards.add(new SetCardInfo("Cinder Glade", 395, Rarity.RARE, mage.cards.c.CinderGlade.class));
cards.add(new SetCardInfo("Cloud of Faeries", 219, Rarity.COMMON, mage.cards.c.CloudOfFaeries.class));

View file

@ -18,6 +18,10 @@ public class DauntAbility extends SimpleEvasionAbility {
filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3));
}
public static FilterCreaturePermanent getFilter() {
return filter;
}
public DauntAbility() {
super(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield));
}