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

How to use
TapAttachedCost
in
mage.abilities.costs.common

Best Java code snippets using mage.abilities.costs.common.TapAttachedCost (Showing top 6 results out of 315)

origin: magefree/mage

  @Override
  public TapAttachedCost copy() {
    return new TapAttachedCost(this);
  }
}
origin: magefree/mage

public VeteransVoice(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}");
  this.subtype.add(SubType.AURA);
  // Enchant creature you control
  TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
  Ability ability = new EnchantAbility(auraTarget.getTargetName());
  this.addAbility(ability);
  // Tap enchanted creature: Target creature other than the creature tapped this way gets +2/+1 until end of turn. Activate this ability only if enchanted creature is untapped.
  FilterPermanent filterTarget = new FilterCreaturePermanent("creature other than the creature tapped this way");
  filterTarget.add(Predicates.not(new AttachmentByUUIDPredicate(this.getId()))); 
  Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
      new BoostTargetEffect(2, 1, Duration.EndOfTurn), new TapAttachedCost(), new AttachedToMatchesFilterCondition(filterUntapped));
  ability2.addTarget(new TargetPermanent(filterTarget));
  this.addAbility(ability2);
}
origin: magefree/mage

public NaturesChosen(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}");
  this.subtype.add(SubType.AURA);
  // Enchant creature you control
  TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
  Ability ability = new EnchantAbility(auraTarget.getTargetName());
  this.addAbility(ability);
  // {0}: Untap enchanted creature. Activate this ability only during your turn and only once each turn.
  this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapEnchantedEffect(), new GenericManaCost(0), 1, MyTurnCondition.instance));
  // Tap enchanted creature: Untap target artifact, creature, or land. Activate this ability only if enchanted creature is white and is untapped and only once each turn.
  Effect effect = new UntapTargetEffect();
  effect.setText("Untap target artifact, creature, or land");
  LimitedTimesPerTurnActivatedAbility ability2 = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, effect, new TapAttachedCost(), 1, new AttachedToMatchesFilterCondition(filterWhiteUntappedCreature));
  ability2.addTarget(new TargetPermanent(filterPermanent));
  this.addAbility(ability2);
}
origin: magefree/mage

public KrovikanPlague(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
  this.subtype.add(SubType.AURA);
  // Enchant non-Wall creature you control
  TargetPermanent auraTarget = new TargetControlledCreaturePermanent(filterNonWall);
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
  Ability ability = new EnchantAbility(auraTarget.getTargetName());
  this.addAbility(ability);
  // When Krovikan Plague enters the battlefield, draw a card at the beginning of the next turn's upkeep.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(
      new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse)), false));
  // Tap enchanted creature: Tap enchanted creature: Krovikan Plague deals 1 damage to any target. Put a -0/-1 counter on enchanted creature. Activate this ability only if enchanted creature is untapped.
  Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
      new DamageTargetEffect(1), new TapAttachedCost(), new AttachedToMatchesFilterCondition(filter));
  ability2.addEffect(new AddCountersAttachedEffect(new BoostCounter(0, -1),"enchanted creature"));
  ability2.addTarget(new TargetAnyTarget());
  this.addAbility(ability2);
}
origin: magefree/mage

public Earthlore(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}");
  this.subtype.add(SubType.AURA);
  // Enchant land you control
  TargetPermanent auraTarget = new TargetControlledPermanent(filterLand);
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
  Ability ability = new EnchantAbility(auraTarget.getTargetName());
  this.addAbility(ability);
  // Tap enchanted land: Target blocking creature gets +1/+2 until end of turn. Activate this ability only if enchanted land is untapped.
  Cost cost = new TapAttachedCost();
  cost.setText("Tap enchanted land");
  Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
      new BoostTargetEffect(1, 2, Duration.EndOfTurn), cost, new AttachedToMatchesFilterCondition(filterUntapped));
  ability2.addTarget(new TargetCreaturePermanent(new FilterBlockingCreature("blocking creature")));
  this.addAbility(ability2);
}
origin: magefree/mage

public TourachsGate(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}");
  this.subtype.add(SubType.AURA);
  // Enchant land you control
  TargetPermanent auraTarget = new TargetControlledPermanent(filterLand);
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
  Ability ability = new EnchantAbility(auraTarget.getTargetName());
  this.addAbility(ability);
  // Sacrifice a Thrull: Put three time counters on Tourach's Gate.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.TIME.createInstance(3)), 
      new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filterThrull, true))));
  
  // At the beginning of your upkeep, remove a time counter from Tourach's Gate. If there are no time counters on Tourach's Gate, sacrifice it.
  this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TourachsGateUpkeepEffect(), TargetController.YOU, false));
  // Tap enchanted land: Attacking creatures you control get +2/-1 until end of turn. Activate this ability only if enchanted land is untapped.
  Cost cost = new TapAttachedCost();
  cost.setText("Tap enchanted land");
  this.addAbility(new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(2, -1, Duration.EndOfTurn, filterAttackingCreatures, false), 
      cost, new AttachedToMatchesFilterCondition(filterUntapped)));
}
mage.abilities.costs.commonTapAttachedCost

Most used methods

  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Kernel (java.awt.image)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Reference (javax.naming)
  • Top plugins for Android Studio
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