Tabnine Logo
GainLifeEffect.concatBy
Code IndexAdd Tabnine to your IDE (free)

How to use
concatBy
method
in
mage.abilities.effects.common.GainLifeEffect

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

origin: magefree/mage

public VindictiveVampire(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
  this.subtype.add(SubType.VAMPIRE);
  this.power = new MageInt(2);
  this.toughness = new MageInt(3);
  // Whenever another creature you control dies, Vindictive Vampire deals 1 damage to each opponent and you gain 1 life.
  Ability ability = new DiesCreatureTriggeredAbility(
      new DamagePlayersEffect(1, TargetController.OPPONENT), false,
      filter, true
  );
  ability.addEffect(new GainLifeEffect(1).concatBy("and"));
  this.addAbility(ability);
}
origin: magefree/mage

public IllGottenInheritance(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}");
  // At the beginning of your upkeep, Ill-Gotten Inheritance deals 1 damage to each opponent and you gain 1 life.
  Ability ability = new BeginningOfUpkeepTriggeredAbility(
      new DamagePlayersEffect(1, TargetController.OPPONENT),
      TargetController.YOU, false
  );
  ability.addEffect(new GainLifeEffect(1).concatBy("and"));
  this.addAbility(ability);
  // {5}{B}, Sacrifice Ill-Gotten Inheritance: It deals 4 damage to target opponent and you gain 4 life.
  ability = new SimpleActivatedAbility(
      new DamageTargetEffect(4, "it"),
      new ManaCostsImpl("{5}{B}")
  );
  ability.addEffect(new GainLifeEffect(4).concatBy("and"));
  ability.addCost(new SacrificeSourceCost());
  ability.addTarget(new TargetOpponent());
  this.addAbility(ability);
}
origin: magefree/mage

public ConsumeSpirit(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{1}{B}");
  // Spend only black mana on X.
  this.addAbility(new SimpleStaticAbility(
      Zone.ALL, new InfoEffect("Spend only black mana on X")).setRuleAtTheTop(true)
  );
  // Consume Spirit deals X damage to any target and you gain X life.
  this.getSpellAbility().addTarget(new TargetAnyTarget());
  this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance));
  this.getSpellAbility().addEffect(new GainLifeEffect(ManacostVariableValue.instance).concatBy("and"));
  VariableCost variableCost = this.getSpellAbility().getManaCostsToPay().getVariableCosts().get(0);
  if (variableCost instanceof VariableManaCost) {
    ((VariableManaCost) variableCost).setFilter(filterBlack);
  }
}
origin: magefree/mage

public CarrionImp(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
  this.subtype.add(SubType.IMP);
  this.power = new MageInt(2);
  this.toughness = new MageInt(3);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // When Carrion Imp enters the battlefield, you may exile target creature card from a graveyard. If you do, you gain 2 life.
  Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(), true);
  ability.addEffect(new GainLifeEffect(2).concatBy("If you do,"));
  ability.addTarget(new TargetCardInGraveyard(filter));
  this.addAbility(ability);
}
mage.abilities.effects.commonGainLifeEffectconcatBy

Popular methods of GainLifeEffect

  • <init>
  • setText
  • apply

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JButton (javax.swing)
  • JOptionPane (javax.swing)
  • Join (org.hibernate.mapping)
  • Top Vim 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