Tabnine Logo
AttachEffect
Code IndexAdd Tabnine to your IDE (free)

How to use
AttachEffect
in
mage.abilities.effects.common

Best Java code snippets using mage.abilities.effects.common.AttachEffect (Showing top 20 results out of 315)

origin: magefree/mage

public EquipLegendaryAbility(Outcome outcome, Cost cost, Target target) {
  super(Zone.BATTLEFIELD, new AttachEffect(outcome, "Equip"), cost);
  this.addTarget(target);
  this.timing = TimingRule.SORCERY;
}
origin: magefree/mage

public HerosBlade(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
  this.subtype.add(SubType.EQUIPMENT);
  // Equipped creature gets +3/+2.
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 2)));
  // Whenever a legendary creature enters the battlefield under your control, you may attach Hero's Blade to it.
  this.addAbility(new EntersBattlefieldAllTriggeredAbility(
      Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"),
      filter, true, SetTargetPointer.PERMANENT, null, true));
  // Equip {4}
  this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(4)));
}
origin: magefree/mage

public StormriderRig(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
  this.subtype.add(SubType.EQUIPMENT);
  // Equipped creature gets +1/+1.
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1)));
  // Whenever a creature enters the battlefield under your control, you may attach Stormrider Rig to it.
  this.addAbility(new EntersBattlefieldAllTriggeredAbility(
      Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"),
      new FilterControlledCreaturePermanent("a creature"), true, SetTargetPointer.PERMANENT, null, true));
  // Equip {2}
  this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2)));
}
origin: magefree/mage

public CranialPlating(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
  this.subtype.add(SubType.EQUIPMENT);
  // Equipped creature gets +1/+0 for each artifact you control.
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new PermanentsOnBattlefieldCount(filterCounted), new StaticValue(0))));
  // {B}{B}: Attach Cranial Plating to target creature you control.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttachEffect(Outcome.BoostCreature, "Attach {this} to target creature you control"), new ManaCostsImpl("{B}{B}"));
  ability.addTarget(new TargetControlledCreaturePermanent());
  this.addAbility(ability);
  // Equip {1}
  this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(1)));
}
origin: magefree/mage

public CurseOfOblivion(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}");
  this.subtype.add(SubType.AURA, SubType.CURSE);
  // Enchant player
  TargetPlayer target = new TargetPlayer();
  this.getSpellAbility().addTarget(target);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
  Ability ability = new EnchantAbility(target.getTargetName());
  this.addAbility(ability);
  // At the beginning of enchanted player's upkeep, that player exiles two cards from their graveyard.
  this.addAbility(new CurseOfOblivionAbility());
}
origin: magefree/mage

public CurseOfTheBloodyTome(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
  this.subtype.add(SubType.AURA, SubType.CURSE);
  // Enchant player
  TargetPlayer target = new TargetPlayer();
  this.getSpellAbility().addTarget(target);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
  Ability ability = new EnchantAbility(target.getTargetName());
  this.addAbility(ability);
  // At the beginning of enchanted player's upkeep, that player puts the top two cards of their library into their graveyard.
  this.addAbility(new CurseOfTheBloodyTomeAbility());
}
origin: magefree/mage

public ElvishGuidance(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
  this.subtype.add(SubType.AURA);
  // Enchant land
  TargetPermanent auraTarget = new TargetLandPermanent();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutManaInPool));
  Ability ability = new EnchantAbility(auraTarget.getTargetName());
  this.addAbility(ability);
  // Whenever enchanted land is tapped for mana, its controller adds {G} for each Elf on the battlefield.
  this.addAbility(new ElvishGuidanceTriggeredAbility());
}
origin: magefree/mage

public CurseOfEchoes(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}");
  this.subtype.add(SubType.AURA, SubType.CURSE);
  // Enchant player
  TargetPlayer auraTarget = new TargetPlayer();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.Damage));
  this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
  // Whenever enchanted player casts an instant or sorcery spell, each other player may copy that spell and may choose new targets for the copy he or she controls.
  this.addAbility(new CurseOfEchoesCopyTriggeredAbility());
}
origin: magefree/mage

public DawnsReflection(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
  this.subtype.add(SubType.AURA);
  // Enchant land
  TargetPermanent auraTarget = new TargetLandPermanent();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
  Ability ability = new EnchantAbility(auraTarget.getTargetName());
  this.addAbility(ability);
  // Whenever enchanted land is tapped for mana, its controller adds two mana in any combination of colors.
  this.addAbility(new DawnsReflectionTriggeredAbility());
}
origin: magefree/mage

public LingeringDeath(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
  this.subtype.add(SubType.AURA);
  // Enchant creature
  TargetPermanent auraTarget = new TargetCreaturePermanent();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.DestroyPermanent));
  Ability ability = new EnchantAbility(auraTarget.getTargetName());
  this.addAbility(ability);
  // At the beginning of the end step of enchanted creature's controller, that player sacrifices that creature.
  this.addAbility(new LingeringDeathAbility());
}
origin: magefree/mage

public CurseOfInertia(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
  this.subtype.add(SubType.AURA, SubType.CURSE);
  // Enchant player
  TargetPlayer auraTarget = new TargetPlayer();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
  this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
  // Whenever a player attacks enchanted player with one or more creatures, that attacking player may tap or untap target permanent of their choice.
  this.addAbility(new CurseOfInertiaTriggeredAbility());
}
origin: magefree/mage

public CurseOfShallowGraves(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
  this.subtype.add(SubType.AURA, SubType.CURSE);
  // Enchant player
  TargetPlayer auraTarget = new TargetPlayer();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
  this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
  // Whenever a player attacks enchanted player with one or more creatures, that attacking player may create a tapped 2/2 black Zombie creature token.
  this.addAbility(new CurseOfShallowTriggeredAbility());
}
origin: magefree/mage

public FrenziedFugue(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}");
  this.subtype.add(SubType.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);
  // When Frenzied Fugue enters the battlefield or at the beginning of your upkeep, gain control of enchanted permanent until end of turn. Untap that permanent. It gains haste until end of turn.
  this.addAbility(new FrenziedFugueTriggeredAbility());
}
origin: magefree/mage

public CurseOfPredation(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}");
  this.subtype.add(SubType.AURA, SubType.CURSE);
  // Enchant player
  TargetPlayer auraTarget = new TargetPlayer();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
  this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
  // Whenever a creature attacks enchanted player, put a +1/+1 counter on it.
  this.addAbility(new CurseOfPredationTriggeredAbility());
}
origin: magefree/mage

public Ferocity(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{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);
  // Whenever enchanted creature blocks or becomes blocked, you may put a +1/+1 counter on it.
  this.addAbility(new FerocityTriggeredAbility());
}
origin: magefree/mage

public CurseOfChaos(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}");
  this.subtype.add(SubType.AURA, SubType.CURSE);
  // Enchant player
  TargetPlayer auraTarget = new TargetPlayer();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.DrawCard));
  this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
  // Whenever a player attacks enchanted player with one or more creatures, that attacking player may discard a card. If the player does, he or she draws a card.
  this.addAbility(new CurseOfChaosTriggeredAbility());
}
origin: magefree/mage

public Vigilance (UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}");
  this.subtype.add(SubType.AURA);
  TargetPermanent auraTarget = new TargetCreaturePermanent();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA)));
}
origin: magefree/mage

public ParadoxHaze(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
  this.subtype.add(SubType.AURA);
  // Enchant player
  TargetPlayer auraTarget = new TargetPlayer();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.Neutral));
  this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
  // At the beginning of enchanted player's first upkeep each turn, that player gets an additional upkeep step after this step.
  this.addAbility(new ParadoxHazeTriggeredAbility(), new FirstTimeStepWatcher(EventType.UPKEEP_STEP_POST));
}
origin: magefree/mage

public DebilitatingInjury(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}");
  this.subtype.add(SubType.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)));
}
origin: magefree/mage

public YokeOfTheDamned(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}");
  this.subtype.add(SubType.AURA);
  // 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);
  // When a creature dies, destroy enchanted creature.
  this.addAbility(new DiesCreatureTriggeredAbility(new DestroyAttachedToEffect("enchanted creature"), false, StaticFilters.FILTER_PERMANENT_A_CREATURE));
}
mage.abilities.effects.commonAttachEffect

Most used methods

  • <init>
  • apply
  • getTargetPointer

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now