public CallToTheKindred(UUID ownerId) { super( ownerId, 30, "Call to the Kindred", Rarity.RARE, new CardType[] {CardType.ENCHANTMENT}, "{3}{U}"); this.expansionSetCode = "DKA"; this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); this.addAbility(new EnchantAbility(auraTarget.getTargetName())); // At the beginning of your upkeep, you may look at the top five cards of your library. // If you do, you may put a creature card that shares a creature type with enchanted creature // from among them onto the battlefield, // then you put the rest of those cards on the bottom of your library in any order. this.addAbility( new OnEventTriggeredAbility( GameEvent.EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new CallToTheKindredEffect(), true)); }
public LightningDiadem(UUID ownerId) { super( ownerId, 102, "Lightning Diadem", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{5}{R}"); this.expansionSetCode = "JOU"; this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // When Lightning Diadem enters the battlefield, it deals 2 damage to target creature or player. ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); // Enchanted creature gets +2/+2. this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield))); }
public SpreadingAlgae(UUID ownerId) { super( ownerId, 274, "Spreading Algae", Rarity.UNCOMMON, new CardType[] {CardType.ENCHANTMENT}, "{G}"); this.expansionSetCode = "USG"; this.subtype.add("Aura"); this.color.setGreen(true); // Enchant Swamp TargetPermanent auraTarget = new TargetLandPermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // When enchanted land becomes tapped, destroy it. this.addAbility(new SpreadingAlgaeTriggeredAbility(new DestroyTargetEffect())); // When Spreading Algae is put into a graveyard from the battlefield, return Spreading Algae to // its owner's hand. this.addAbility( new PutIntoGraveFromBattlefieldTriggeredAbility(new ReturnToHandSourceEffect())); }
public SnakeUmbra(UUID ownerId) { super( ownerId, 207, "Snake Umbra", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{2}{G}"); this.expansionSetCode = "ROE"; this.subtype.add("Aura"); this.color.setGreen(true); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +1/+1 this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield))); // and has "Whenever this creature deals damage to an opponent, you may draw a card." Ability gainedAbility = new DealsDamageToOpponentTriggeredAbility(new DrawCardControllerEffect(1), true); this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA))); // Totem armor this.addAbility(new TotemArmorAbility()); }
public SpitefulMotives(UUID ownerId) { super( ownerId, 183, "Spiteful Motives", Rarity.UNCOMMON, new CardType[] {CardType.ENCHANTMENT}, "{3}{R}"); this.expansionSetCode = "SOI"; this.subtype.add("Aura"); // Flash this.addAbility(FlashAbility.getInstance()); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +3/+0 and has first strike. Effect effect = new BoostEnchantedEffect(3, 0, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +3/+0"); ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA); effect.setText("and has first strike"); ability.addEffect(effect); this.addAbility(ability); }
public HolyArmor(UUID ownerId) { super(ownerId, 279, "Holy Armor", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{W}"); this.expansionSetCode = "4ED"; this.subtype.add("Aura"); this.color.setWhite(true); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +0/+2. this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostEnchantedEffect(0, 2, Duration.WhileOnBattlefield))); // {W}: Enchanted creature gets +0/+1 until end of turn. Ability ability2 = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability2); this.addAbility( new SimpleActivatedAbility( Zone.BATTLEFIELD, new BoostEnchantedEffect(0, 1, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.W))); }
public InfernalScarring(UUID ownerId) { super( ownerId, 102, "Infernal Scarring", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{1}{B}"); this.expansionSetCode = "ORI"; this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +2/+0 and has "When this creature dies, draw a card." Effect effect = new BoostEnchantedEffect(2, 0, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +2/+0"); ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new GainAbilityAttachedEffect( new DiesTriggeredAbility(new DrawCardSourceControllerEffect(1)), AttachmentType.AURA, Duration.WhileOnBattlefield); effect.setText("and has \"When this creature dies, draw a card.\""); ability.addEffect(effect); this.addAbility(ability); }
public AlexisCloak(UUID ownerId) { super( ownerId, 29, "Alexi's Cloak", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{1}{U}"); this.expansionSetCode = "PCY"; this.subtype.add("Aura"); // Flash this.addAbility(FlashAbility.getInstance()); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature has shroud. this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.AURA))); }
public LeafdrakeRoost(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[] {CardType.ENCHANTMENT}, "{3}{G}{U}"); this.subtype.add("Aura"); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutCreatureInPlay)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted land has "{G}{U}, {tap}: Create a 2/2 green and blue Drake creature token with // flying." Ability abilityToGain = new SimpleActivatedAbility( Zone.BATTLEFIELD, new CreateTokenEffect(new LeafdrakeRoostDrakeToken()), new ManaCostsImpl("{G}{U}")); abilityToGain.addCost(new TapSourceCost()); this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new GainAbilityAttachedEffect( abilityToGain, AttachmentType.AURA, Duration.WhileOnBattlefield, "Enchanted land has \"{G}{U}, {t}: Create a 2/2 green and blue Drake creature token with flying.\""))); }
public ResoundingSilence(UUID ownerId) { super( ownerId, 22, "Resounding Silence", Rarity.COMMON, new CardType[] {CardType.INSTANT}, "{3}{W}"); this.expansionSetCode = "ALA"; this.color.setWhite(true); // Exile target attacking creature. this.getSpellAbility().addEffect(new ExileTargetEffect()); this.getSpellAbility().addTarget(new TargetAttackingCreature()); // Cycling {5}{G}{W}{U} this.addAbility(new CyclingAbility(new ManaCostsImpl("{5}{G}{W}{U}"))); // When you cycle Resounding Silence, exile up to two target attacking creatures. Ability ability = new CycleTriggeredAbility(new ExileTargetEffect()); TargetPermanent target = new TargetAttackingCreature( 0, 2, new FilterAttackingCreature("up to two target attacking creatures"), false); target.setRequired(true); ability.addTarget(target); this.addAbility(ability); }
public FencersMagemark(UUID ownerId) { super( ownerId, 65, "Fencer's Magemark", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{2}{R}"); this.expansionSetCode = "GPT"; this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Creatures you control that are enchanted get +1/+1 and have first strike. ability = new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false)); Effect effect = new GainAbilityAllEffect( FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, filter, " and have first strike"); ability.addEffect(effect); this.addAbility(ability); }
public RealityAcid(UUID ownerId) { super( ownerId, 45, "Reality Acid", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{2}{U}"); this.expansionSetCode = "PLC"; this.subtype.add("Aura"); // Enchant permanent TargetPermanent auraTarget = new TargetPermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.GainControl)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Vanishing 3 ability = new EntersBattlefieldAbility( new AddCountersSourceEffect(CounterType.TIME.createInstance(3))); ability.setRuleVisible(false); this.addAbility(ability); this.addAbility(new VanishingUpkeepAbility(3)); this.addAbility(new VanishingSacrificeAbility()); // When Reality Acid leaves the battlefield, enchanted permanent's controller sacrifices it. Effect effect = new SacrificeTargetEffect("enchanted permanent's controller sacrifices it"); this.addAbility(new RealityAcidTriggeredAbility(effect, false)); }
public SecurityBlockade(UUID ownerId) { super( ownerId, 20, "Security Blockade", Rarity.UNCOMMON, new CardType[] {CardType.ENCHANTMENT}, "{2}{W}"); this.expansionSetCode = "RTR"; this.subtype.add("Aura"); this.color.setWhite(true); // Enchant land TargetPermanent auraTarget = new TargetLandPermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutCreatureInPlay)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // When Security Blockade enters the battlefield, put a 2/2 white Knight creature token with // vigilance onto the battlefield. this.addAbility( new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KnightToken()))); // Enchanted land has "{T}: Prevent the next 1 damage that would be dealt to you this turn." ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new SecurityBlockadePreventionEffect(), new TapSourceCost()); this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new GainAbilityAttachedEffect( ability, AttachmentType.AURA, Duration.WhileOnBattlefield, rule))); }
@Override public boolean apply(Game game, Ability source) { TargetPermanent target = (TargetPermanent) source.getTargets().get(0); Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { for (Counter counter : permanent.getCounters().values()) { permanent.removeCounters(counter, game); } return true; } return false; }
public DebilitatingInjury(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[] {CardType.ENCHANTMENT}, "{1}{B}"); this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets -2/-2 this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostEnchantedEffect(-2, -2, Duration.WhileOnBattlefield))); }
public FrogTongue(UUID ownerId) { super(ownerId, 122, "Frog Tongue", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{G}"); this.expansionSetCode = "TMP"; this.subtype.add("Aura"); this.color.setGreen(true); TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(1), false)); this.addAbility( new SimpleStaticAbility( Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect( ReachAbility.getInstance(), Constants.AttachmentType.AURA))); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { // Find the two permanents to meld. UUID sourceId = source.getSourceId(); FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature named " + meldWithName); filter.add(new NamePredicate(meldWithName)); TargetPermanent target = new TargetControlledCreaturePermanent(filter); Set<UUID> meldWithList = target.possibleTargets(sourceId, source.getControllerId(), game); if (meldWithList.isEmpty()) { return false; // possible permanent has left the battlefield meanwhile } UUID meldWithId; if (meldWithList.size() == 1) { meldWithId = meldWithList.iterator().next(); } else { controller.choose(Outcome.BoostCreature, target, sourceId, game); meldWithId = target.getFirstTarget(); } // Exile the two permanents to meld. Permanent sourcePermanent = game.getPermanent(sourceId); Permanent meldWithPermanent = game.getPermanent(meldWithId); if (sourcePermanent != null && meldWithPermanent != null) { sourcePermanent.moveToExile(null, "", sourceId, game); meldWithPermanent.moveToExile(null, "", sourceId, game); // Create the meld card and move it to the battlefield. Card sourceCard = game.getExile().getCard(sourceId, game); Card meldWithCard = game.getExile().getCard(meldWithId, game); if (!sourceCard.isCopy() && !meldWithCard.isCopy()) { meldCard.setOwnerId(controller.getId()); meldCard.setTopHalfCard(meldWithCard, game); meldCard.setBottomHalfCard(sourceCard, game); meldCard.setMelded(true); game.addMeldCard(meldCard.getId(), meldCard); game.getState().addCard(meldCard); meldCard.setZone(Zone.EXILED, game); meldCard.moveToZone(Zone.BATTLEFIELD, sourceId, game, false); } return true; } } return false; }
public TricksOfTheTrade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[] {CardType.ENCHANTMENT}, "{3}{U}"); this.subtype.add("Aura"); // Enchant creature TargetPermanent target = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(target); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); this.addAbility(new EnchantAbility(target.getTargetName())); // Enchanted creature gets +2/+0 and can't be blocked. this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0, Duration.WhileOnBattlefield))); this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new CantBeBlockedAttachedEffect(AttachmentType.AURA))); }
public Agility(UUID ownerId) { super(ownerId, 154, "Agility", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{1}{R}"); this.expansionSetCode = "MIR"; this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +1/+1 and has flanking. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1))); this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new FlankingAbility(), AttachmentType.AURA))); }
public Mourning(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[] {CardType.ENCHANTMENT}, "{1}{B}"); this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets -2/-0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-2, 0))); // {B}: Return Mourning to its owner's hand. this.addAbility( new SimpleActivatedAbility( Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{B}"))); }
public BurdenOfGuilt(UUID ownerId) { super( ownerId, 4, "Burden of Guilt", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{W}"); this.expansionSetCode = "DKA"; this.subtype.add("Aura"); this.color.setWhite(true); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // {1}: Tap enchanted creature. this.addAbility( new SimpleActivatedAbility( Zone.BATTLEFIELD, new TapEnchantedEffect(), new GenericManaCost(1))); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int tappedAmount = 0; TargetPermanent target = new TargetPermanent(0, 1, filter, false); while (true && controller.canRespond()) { target.clearChosen(); if (target.canChoose(source.getControllerId(), game)) { Map<String, Serializable> options = new HashMap<>(); options.put("UI.right.btn.text", "Tapping complete"); controller.choose(outcome, target, source.getControllerId(), game, options); if (target.getTargets().size() > 0) { UUID creature = target.getFirstTarget(); if (creature != null) { game.getPermanent(creature).tap(game); tappedAmount++; } } else { break; } } else { break; } } if (tappedAmount > 0) { AngelToken angelToken = new AngelToken(); angelToken.putOntoBattlefield( tappedAmount, game, source.getSourceId(), source.getControllerId()); game.informPlayers( new StringBuilder(controller.getLogName()) .append(" puts ") .append(tappedAmount) .append(" token") .append(tappedAmount != 1 ? "s" : "") .append(" onto the battlefield") .toString()); } return true; } return false; }
public MarkOfSakiko(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[] {CardType.ENCHANTMENT}, "{1}{G}"); this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature has "Whenever this creature deals combat damage to a player, add that much // {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as // steps and phases end." Effect effect = new GainAbilityAttachedEffect(new MarkOfSakikoTriggeredAbility(), AttachmentType.AURA); effect.setText( "Enchanted creature has \"Whenever this creature deals combat damage to a player, add that much {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }
public Web(UUID ownerId) { super(ownerId, 137, "Web", Rarity.RARE, new CardType[] {CardType.ENCHANTMENT}, "{G}"); this.expansionSetCode = "LEA"; this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +0/+2 and has reach. this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostEnchantedEffect(0, 2, Duration.WhileOnBattlefield))); this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ReachAbility.getInstance(), AttachmentType.AURA))); }
public Defang(UUID ownerId) { super(ownerId, 15, "Defang", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{1}{W}"); this.expansionSetCode = "AVR"; this.subtype.add("Aura"); this.color.setWhite(true); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Prevent all damage that would be dealt by enchanted creature. this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new PreventAllDamageByAttachedEffect( Duration.WhileOnBattlefield, "enchanted creature", false))); }
public AngelicGift(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[] {CardType.ENCHANTMENT}, "{1}{W}"); this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // When Angelic Gift enters the battlefield, draw a card. this.addAbility( new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); // Enchanted creature has flying. this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA))); }
public Conviction(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[] {CardType.ENCHANTMENT}, "{1}{W}"); this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +1/+3. this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 3, Duration.WhileOnBattlefield))); // {W}: Return Conviction to its owner's hand. this.addAbility( new SimpleActivatedAbility( Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("W"))); }
public SpiritAway(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[] {CardType.ENCHANTMENT}, "{5}{U}{U}"); this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.GainControl)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // You control enchanted creature. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect())); // Enchanted creature gets +2/+2 and has flying. SimpleStaticAbility ability2 = new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield)); ability2.addEffect( new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA)); this.addAbility(ability2); }
public TasteForMayhem(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[] {CardType.ENCHANTMENT}, "{R}"); this.subtype.add("Aura"); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0))); // Hellbent - Enchanted creature gets an additional +2/+0 as long as you have no cards in hand. this.addAbility( new SimpleStaticAbility( Zone.BATTLEFIELD, new ConditionalContinuousEffect( new BoostEnchantedEffect(2, 0), HellbentCondition.getInstance(), "<i>Hellbent</i> — Enchanted creature gets an additional +2/+0 as long as you have no cards in hand"))); }
public Invisibility(UUID ownerId) { super( ownerId, 60, "Invisibility", Rarity.COMMON, new CardType[] {CardType.ENCHANTMENT}, "{U}{U}"); this.expansionSetCode = "LEA"; this.subtype.add("Aura"); this.color.setBlue(true); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature can't be blocked except by Walls. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByWallsEffect())); }