congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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