[CLB] Implemented Robe of the Archmagi

This commit is contained in:
Evan Kranzler 2022-05-23 08:10:30 -04:00
parent fef1281314
commit 59718793a6
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,60 @@
package mage.cards.r;
import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.common.SavedDamageValue;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RobeOfTheArchmagi extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent("Shaman, Warlock, or Wizard");
static {
filter.add(Predicates.or(
SubType.SHAMAN.getPredicate(),
SubType.WARLOCK.getPredicate(),
SubType.WIZARD.getPredicate()
));
}
public RobeOfTheArchmagi(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{U}");
this.subtype.add(SubType.EQUIPMENT);
// Whenever equipped creature deals combat damage to a player, you draw that many cards.
this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(
new DrawCardSourceControllerEffect(SavedDamageValue.MANY), "equipped", false
));
// Equip {4}
this.addAbility(new EquipAbility(4));
// Equip Shaman, Warlock, or Wizard {1}
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1), new TargetPermanent(filter)));
}
private RobeOfTheArchmagi(final RobeOfTheArchmagi card) {
super(card);
}
@Override
public RobeOfTheArchmagi copy() {
return new RobeOfTheArchmagi(this);
}
}

View file

@ -94,6 +94,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
cards.add(new SetCardInfo("Raphael, Fiendish Savior", 292, Rarity.RARE, mage.cards.r.RaphaelFiendishSavior.class));
cards.add(new SetCardInfo("Reflecting Pool", 358, Rarity.RARE, mage.cards.r.ReflectingPool.class));
cards.add(new SetCardInfo("Renari, Merchant of Marvels", 90, Rarity.UNCOMMON, mage.cards.r.RenariMerchantOfMarvels.class));
cards.add(new SetCardInfo("Robe of the Archmagi", 91, Rarity.RARE, mage.cards.r.RobeOfTheArchmagi.class));
cards.add(new SetCardInfo("Roving Harper", 40, Rarity.COMMON, mage.cards.r.RovingHarper.class));
cards.add(new SetCardInfo("Sarevok, Deathbringer", 144, Rarity.UNCOMMON, mage.cards.s.SarevokDeathbringer.class));
cards.add(new SetCardInfo("Sea Hag", 95, Rarity.COMMON, mage.cards.s.SeaHag.class));