@Override public BoostEnchantedEffect copy() { return new BoostEnchantedEffect(this); }
public StreetSavvy(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); this.subtype.add(SubType.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 can block creatures with landwalk abilities as though they didn't have those abilities. SimpleStaticAbility staticAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(0 ,2) .setText("Enchanted creature gets +0/+2 and can block creatures with landwalk abilities as though they didn't have those abilities.")); staticAbility.addEffect(new StreetSavvyEffect()); this.addAbility(staticAbility); }
public ThunderousMight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); this.subtype.add(SubType.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); // Whenever enchanted creature attacks, it gets +X/+0 until end of turn, where X is your devotion to red. BoostEnchantedEffect effect = new BoostEnchantedEffect(new DevotionCount(ColoredManaSymbol.R), new StaticValue(0), Duration.EndOfTurn); effect.setText("it gets +X/+0 until end of turn, where X is your devotion to red"); effect.setLockedIn(true); this.addAbility(new AttacksAttachedTriggeredAbility(effect, AttachmentType.AURA, false)); }
@Override public boolean apply(Game game, Ability source) { Permanent permanent = null; if (affectedObjectsSet) { permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent == null) { discard(); return true; } } else { Permanent equipment = game.getPermanent(source.getSourceId()); if (equipment != null && equipment.getAttachedTo() != null) { permanent = game.getPermanent(equipment.getAttachedTo()); } } if (permanent != null) { permanent.addPower(power.calculate(game, source, this)); permanent.addToughness(toughness.calculate(game, source, this)); } return true; }
@Override public void init(Ability source, Game game) { super.init(source, game); if (lockedIn) { power = new StaticValue(power.calculate(game, source, this)); toughness = new StaticValue(toughness.calculate(game, source, this)); } if (affectedObjectsSet) { // Added boosts of activated or triggered abilities exist independent from the source they are created by // so a continuous effect for the permanent itself with the attachment is created Permanent equipment = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (equipment != null && equipment.getAttachedTo() != null) { this.setTargetPointer(new FixedTarget(equipment.getAttachedTo(), game.getState().getZoneChangeCounter(equipment.getAttachedTo()))); } } }
public NyxbornTriton(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{U}"); this.subtype.add(SubType.MERFOLK); this.power = new MageInt(2); this.toughness = new MageInt(3); // Bestow {4}{U} this.addAbility(new BestowAbility(this, "{4}{U}")); // Enchanted creature gets +2/+3. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2,3, Duration.WhileOnBattlefield))); }
public AetherWeb(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); this.subtype.add(SubType.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 +1/+1, has reach, and can block creatures with shadow as though they didn't have shadow. StaticAbility staticAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1) .setText("Enchanted creature gets +1/+1, has reach, and can block creatures with shadow as though they didn't have shadow.")); staticAbility.addEffect(new GainAbilityAttachedEffect(ReachAbility.getInstance(), AttachmentType.AURA).setText("")); staticAbility.addEffect(new AetherWebEffect()); this.addAbility(staticAbility); }
public NyxbornRollicker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{R}"); this.subtype.add(SubType.SATYR); this.power = new MageInt(1); this.toughness = new MageInt(1); // Bestow {1}{R} this.addAbility(new BestowAbility(this, "{1}{R}")); // Enchanted creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1,1, Duration.WhileOnBattlefield ))); }
public WitheringHex(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}"); this.subtype.add(SubType.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); // Whenever a player cycles a card, put a plague counter on Withering Hex. this.addAbility(new CycleAllTriggeredAbility(new AddCountersSourceEffect(CounterType.PLAGUE.createInstance()), false)); // Enchanted creature gets -1/-1 for each plague counter on Withering Hex. DynamicValue value = new MultipliedValue(new CountersSourceCount(CounterType.PLAGUE), -1); this.addAbility(new SimpleStaticAbility( Zone.BATTLEFIELD, new BoostEnchantedEffect(value, value, Duration.WhileOnBattlefield) .setText("Enchanted creature gets -1/-1 for each plague counter on {this}.") )); }
public NyxbornEidolon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{B}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); this.toughness = new MageInt(1); // Bestow {4}{B} this.addAbility(new BestowAbility(this, "{4}{B}")); // Enchanted creature gets +2/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 1, Duration.WhileOnBattlefield))); }
public ConclavesBlessing(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); this.subtype.add(SubType.AURA); // Convoke this.addAbility(new ConvokeAbility()); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); this.addAbility(new EnchantAbility(auraTarget.getTargetName())); // Enchanted creature gets +0/+2 for each other creature you control. PermanentsOnBattlefieldCount value = new PermanentsOnBattlefieldCount(filter, 2); BoostEnchantedEffect effect = new BoostEnchantedEffect(new StaticValue(0), value, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +0/+2 for each other creature you control."); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }
public NyxbornWolf(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{G}"); this.subtype.add(SubType.WOLF); this.power = new MageInt(3); this.toughness = new MageInt(1); // Bestow {4}{G} this.addAbility(new BestowAbility(this, "{4}{G}")); // Enchanted creature gets +3/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3,1, Duration.WhileOnBattlefield))); }
public AuramancersGuise(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); this.subtype.add(SubType.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/+2 for each Aura attached to it and has vigilance. DynamicValue ptBoost = new EnchantedCreatureAurasCount(); BoostEnchantedEffect effect = new BoostEnchantedEffect(ptBoost, ptBoost, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +2/+2 for each Aura attached to it"); SimpleStaticAbility ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); ability2.addEffect(new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA).setText("and has vigilance")); this.addAbility(ability2); }
public NyxbornShieldmate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(2); // Bestow {2}{W} this.addAbility(new BestowAbility(this, "{2}{W}")); // Enchanted creature gets +1/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1,2, Duration.WhileOnBattlefield))); }
public GleamOfAuthority(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); this.subtype.add(SubType.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 for each +1/+1 counter on other creatures you control DynamicValue amount = new CountersOnControlledCount(); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield) .setText("Enchanted creature gets +1/+1 for each +1/+1 counter on other creatures you control.") )); // Enchanted creature has vigilance and "{W}, {T}: Bloster 1." ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA)); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BolsterEffect(1), new ManaCostsImpl("{W}")); gainedAbility.addCost(new TapSourceCost()); ability.addEffect(new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA).setText("and \"{W}, {T}: Bloster 1.\"")); this.addAbility(ability); }
public BriarShield(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); this.subtype.add(SubType.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/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield))); // Sacrifice Briar Shield: Enchanted creature gets +3/+3 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.EndOfTurn), new SacrificeSourceCost())); }
public Stonehands(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); this.subtype.add(SubType.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 +0/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(0,2, Duration.WhileOnBattlefield))); // {R}: Enchanted creature gets +1/+0 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); }
public BoonSatyr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{G}{G}"); this.subtype.add(SubType.SATYR); this.power = new MageInt(4); this.toughness = new MageInt(2); // Flash this.addAbility(FlashAbility.getInstance()); // Bestow {3}{G}{G} this.addAbility(new BestowAbility(this, "{3}{G}{G}")); // Enchanted creature gets +4/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(4,2, Duration.WhileOnBattlefield))); }
public ThassasEmissary(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{U}"); this.subtype.add(SubType.CRAB); this.power = new MageInt(3); this.toughness = new MageInt(3); // Bestow {5}{U} (If you cast this card for its bestow cost, it's an Aura spell with enchant creature. It becomes a creature again if it's not attached to a creature.) this.addAbility(new BestowAbility(this, "{5}{U}")); // Whenever Thassa's Emissary or enchanted creature deals combat damage to a player, draw a card. this.addAbility(new ThassasEmissaryTriggeredAbility(new DrawCardSourceControllerEffect(1), false)); // Enchanted creature gets +3/+3. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3,3))); }