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

How to use
AttacksIfAbleSourceEffect
in
mage.abilities.effects.common.combat

Best Java code snippets using mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect (Showing top 9 results out of 315)

origin: magefree/mage

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

public LegionWarbossAbility() {
  super(Zone.BATTLEFIELD, new AttacksIfAbleSourceEffect(
      Duration.WhileOnBattlefield, true
  ).setText("this creature attacks this combat if able"));
}
origin: magefree/mage

public AttacksEachCombatStaticAbility() {
  super(Zone.BATTLEFIELD, new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true));
}
origin: magefree/mage

public RelentlessRaptor(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}");
  this.subtype.add(SubType.DINOSAUR);
  this.power = new MageInt(3);
  this.toughness = new MageInt(3);
  // Vigilance
  this.addAbility(VigilanceAbility.getInstance());
  // Relentless Raptor attacks or blocks each combat if able.
  Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true).setText("{this} attacks"));
  ability.addEffect(new BlocksIfAbleSourceEffect(Duration.WhileOnBattlefield).setText("or blocks each combat if able"));
  this.addAbility(ability);
}
origin: magefree/mage

public MaraudingMaulhorn(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
  this.subtype.add(SubType.BEAST);
  this.power = new MageInt(5);
  this.toughness = new MageInt(3);
  // Marauding Maulhorn attacks each combat if able unless you control a creature named Advocate of the Beast.
  Effect effect = new ConditionalRequirementEffect(
      new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true),
      new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 1));
  effect.setText("{this} attacks each combat if able unless you control a creature named Advocate of the Beast");
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}
origin: magefree/mage

public RecklessCohort(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WARRIOR);
  this.subtype.add(SubType.ALLY);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // Reckless Cohort attacks each combat if able unless you control another Ally.
  Effect effect = new ConditionalRequirementEffect(
      new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true),
      new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 1));
  effect.setText("{this} attacks each combat if able unless you control another Ally");
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}
origin: magefree/mage

public TerentatekCub(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
  this.subtype.add(SubType.BEAST);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // As long as an opponent controls a Jedi or Sith, {this} gets +1/+1 and attacks each turn if able 
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
      new BoostSourceEffect(1, 1, Duration.Custom),
      new OpponentControlsPermanentCondition(filter),
      "As long as an opponent controls a Jedi or Sith, {this} gets +1/+1 ")
  ));
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
      new AttacksIfAbleSourceEffect(Duration.Custom),
      new OpponentControlsPermanentCondition(filter),
      "and attacks each turn if able.")
  ));
}
origin: magefree/mage

public OtarianJuggernaut(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
  this.subtype.add(SubType.JUGGERNAUT);
  this.power = new MageInt(2);
  this.toughness = new MageInt(3);
  // Otarian Juggernaut can't be blocked by Walls.
  this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield)));
  // Threshold - As long as seven or more cards are in your graveyard, Otarian Juggernaut gets +3/+0 and attacks each combat if able.
  Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
      new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield),
      new CardsInControllerGraveCondition(7),
      "As long as seven or more cards are in your graveyard, {this} gets +3/+0"));
  Effect effect = new ConditionalContinuousEffect(
      new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true),
      new CardsInControllerGraveCondition(7),
      "and attacks each combat if able"
  );
  ability.addEffect(effect);
  ability.setAbilityWord(AbilityWord.THRESHOLD);
  this.addAbility(ability);
}
origin: magefree/mage

public Kookus(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
  this.subtype.add(SubType.DJINN);
  this.power = new MageInt(3);
  this.toughness = new MageInt(5);
  // Trample
  this.addAbility(TrampleAbility.getInstance());
  // At the beginning of your upkeep, if you don't control a creature named Keeper of Kookus, Kookus deals 3 damage to you and attacks this turn if able.
  TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new DamageControllerEffect(3), TargetController.YOU, false);
  ability.addEffect(new AttacksIfAbleSourceEffect(Duration.EndOfTurn));
  this.addAbility(new ConditionalInterveningIfTriggeredAbility(
      ability,
      new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)),
      "At the beginning of your upkeep, "
      + "if you don't control a creature named Keeper of Kookus, "
      + "{this} deals 3 damage to you and attacks this turn if able"
  ));
  // {R}: Kookus gets +1/+0 until end of turn.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R)));
}
mage.abilities.effects.common.combatAttacksIfAbleSourceEffect

Most used methods

  • <init>
  • setText

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JTextField (javax.swing)
  • 21 Best IntelliJ Plugins
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