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

How to use
EnchantedCreatureBlockedTriggeredAbility
in
mage.abilities.common

Best Java code snippets using mage.abilities.common.EnchantedCreatureBlockedTriggeredAbility (Showing top 4 results out of 315)

origin: magefree/mage

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

@Override
public boolean checkTrigger(GameEvent event, Game game) {
  Permanent equipment = game.getPermanent(sourceId);
  if (equipment != null && equipment.getAttachedTo() != null) {
    Permanent equipped = game.getPermanent(equipment.getAttachedTo());
    if (equipped.getId().equals(event.getTargetId())) {
      getEffects().get(1).setTargetPointer(new FixedTarget(equipped, game));
      return true;
    }
  }
  return false;
}
origin: magefree/mage

public LaccolithRig(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}");
  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);
  // Whenever enchanted creature becomes blocked, you may have it deal damage equal to its power to target creature. If you do, the first creature assigns no combat damage this turn.
  Ability ability2 = new EnchantedCreatureBlockedTriggeredAbility(new LaccolithRigEffect(), true);
  ability2.addTarget(new TargetCreaturePermanent());
  Effect effect = new GainAbilityTargetEffect(new SimpleStaticAbility(Zone.BATTLEFIELD, new AssignNoCombatDamageSourceEffect(Duration.Custom, true).setText("")), Duration.EndOfTurn, "If you do, the first creature assigns no combat damage this turn");
  ability2.addEffect(effect);
  this.addAbility(ability2);
}
origin: magefree/mage

public BestialFury(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.BoostCreature));
  Ability enchantAbility = new EnchantAbility(auraTarget.getTargetName());
  this.addAbility(enchantAbility);
  
  // When Bestial Fury 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));
  
  // Whenever enchanted creature becomes blocked, it gets +4/+0 and gains trample until end of turn.
  Ability pumpAbility = new EnchantedCreatureBlockedTriggeredAbility(new BoostEnchantedEffect(4, 0, Duration.EndOfTurn), false);
  pumpAbility.addEffect(new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA, Duration.EndOfTurn));
  
  
  this.addAbility(pumpAbility);
  
}
mage.abilities.commonEnchantedCreatureBlockedTriggeredAbility

Most used methods

  • <init>
  • getEffects

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JButton (javax.swing)
  • JOptionPane (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Github Copilot alternatives
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