congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DamageWithPowerTargetEffect
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: magefree/mage

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

public ThrashThreat(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{R/G}{R/G}", "{2}{R}{G}", SpellAbilityType.SPLIT);
  // Thrash
  // Target creature you control deals damage equal to its power to target creature or planeswalker you don't control.
  this.getLeftHalfCard().getSpellAbility().addEffect(
      new DamageWithPowerTargetEffect()
          .setText("Target creature you control deals damage equal to its power " +
              "to target creature or planeswalker you don't control.")
  );
  this.getLeftHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
  this.getLeftHalfCard().getSpellAbility().addTarget(new TargetPermanent(filter));
  // Threat
  // Create a 4/4 red and green Beast creature token with trample.
  this.getRightHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new RedGreenBeastToken()));
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player controller = game.getPlayer(source.getControllerId());
  Permanent controlledCreature = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
  Permanent targetCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
  if (controller != null) {
    if (targetCreature != null && controlledCreature != null) {
      targetCreature.damage(controlledCreature.getPower().getValue(), controlledCreature.getId(), game, false, true);
    }
    return true;
  }
  return false;
}
origin: magefree/mage

public Brawl(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}{R}");
  // Until end of turn, all creatures gain "{T}: This creature deals damage equal to its power to target creature."
  Ability ability = new SimpleActivatedAbility(new DamageWithPowerTargetEffect(), new TapSourceCost());
  ability.addTarget(new TargetCreaturePermanent());
  this.getSpellAbility().addEffect(
      new GainAbilityAllEffect(ability, Duration.EndOfTurn, new FilterCreaturePermanent())
          .setText("Until end of turn, all creatures gain \"{T}: This creature deals damage equal to its power to target creature.\"")
  );
}
origin: magefree/mage

public AggressiveInstinct(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
  // Target creature you control deals damage equal to its power to target creature you don't control.
  this.getSpellAbility().addEffect(new DamageWithPowerTargetEffect());
  this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
  this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
}
origin: magefree/mage

public TailSlash(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
  // Target creature you control deals damage equal to its power to target creature you don't control.
  this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
  this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
  this.getSpellAbility().addEffect(new DamageWithPowerTargetEffect());
}
origin: magefree/mage

public RabidBite(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
  // Target creature you control deals damage equal to its power to target creature you don't control.
  this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
  this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
  this.getSpellAbility().addEffect(new DamageWithPowerTargetEffect());
}
origin: magefree/mage

public Ambuscade(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
  // Target creature you control gets +1/+0 until end of turn.
  Effect effect = new BoostTargetEffect(1, 0, Duration.EndOfTurn);
  this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
  this.getSpellAbility().addEffect(effect);
  // It deals damage equal to its power to target creature you don't control.
  effect = new DamageWithPowerTargetEffect();
  effect.setText("It deals damage equal to its power to target creature you don't control");
  this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
  this.getSpellAbility().addEffect(effect);
}
origin: magefree/mage

public ClearShot(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
  // Target creature you control gets +1/+1 until end of turn.
  Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn);
  this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
  this.getSpellAbility().addEffect(effect);
  // It deals damage equal to its power to target creature you don't control.
  effect = new DamageWithPowerTargetEffect();
  effect.setText("It deals damage equal to its power to target creature you don't control");
  this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
  this.getSpellAbility().addEffect(effect);
}
origin: magefree/mage

public HuatliDinosaurKnight(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{R}{W}");
  addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.HUATLI);
  this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
  // +2: Put two +1/+1 counters on up to one target Dinosaur you control.
  Ability ability = new LoyaltyAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2))
      .setText("Put two +1/+1 counters on up to one target Dinosaur you control."), 2
  );
  ability.addTarget(new TargetCreaturePermanent(0, 1, filter, false));
  this.addAbility(ability);
  // -3: Target Dinosaur you control deals damage equal to its power to target creature you don't control.
  ability = new LoyaltyAbility(new DamageWithPowerTargetEffect(), -3);
  ability.addTarget(new TargetCreaturePermanent(filter));
  ability.addTarget(new TargetCreaturePermanent(filter2));
  this.addAbility(ability);
  // -7: Dinosaurs you control get +4/+4 until end of turn.
  this.addAbility(new LoyaltyAbility(new BoostControlledEffect(4, 4, Duration.EndOfTurn, filter3), -7));
}
origin: magefree/mage

public VivienOfTheArkbow(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{G}{G}");
  this.addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.VIVIEN);
  this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5));
  // +2: Put two +1/+1 counters on up to one target creature.
  Ability ability = new LoyaltyAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)), 2);
  ability.addTarget(new TargetCreaturePermanent(0, 1));
  this.addAbility(ability);
  // −3: Target creature you control deals damage equal to its power to target creature you don't control.
  ability = new LoyaltyAbility(new DamageWithPowerTargetEffect(), -3);
  ability.addTarget(new TargetControlledCreaturePermanent());
  ability.addTarget(new TargetCreaturePermanent(filter));
  this.addAbility(ability);
  // −9: Creatures you control get +4/+4 and gain trample until end of turn.
  ability = new LoyaltyAbility(
      new BoostControlledEffect(4, 4, Duration.EndOfTurn)
          .setText("Creatures you control get +4/+4"), -9
  );
  ability.addEffect(new GainAbilityControlledEffect(
      TrampleAbility.getInstance(),
      Duration.EndOfTurn,
      StaticFilters.FILTER_PERMANENT_CREATURES
  ).setText("and gain trample until end of turn"));
  this.addAbility(ability);
}
origin: magefree/mage

public NaturesWay(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
  // Target creature you control gains vigilance and trample until end of turn.
  Effect effect = new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn);
  effect.setText("Target creature you control gains vigilance");
  this.getSpellAbility().addEffect(effect);
  effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
  effect.setText("and trample until end of turn");
  this.getSpellAbility().addEffect(effect);
  this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
  // It deals damage equal to its power to target creature you don't control.
  effect = new DamageWithPowerTargetEffect();
  effect.setText("It deals damage equal to its power to target creature you don't control");
  this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
  this.getSpellAbility().addEffect(effect);
}
mage.abilities.effects.commonDamageWithPowerTargetEffect

Most used methods

  • <init>
  • getTargetPointer
  • setText

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 12 Jupyter Notebook extensions
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