Tabnine Logo
CantBeBlockedByAllSourceEffect.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
mage.abilities.effects.common.combat.CantBeBlockedByAllSourceEffect
constructor

Best Java code snippets using mage.abilities.effects.common.combat.CantBeBlockedByAllSourceEffect.<init> (Showing top 4 results out of 315)

origin: magefree/mage

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

public ShroudedSerpent(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}{U}");
  this.subtype.add(SubType.SERPENT);
  this.power = new MageInt(4);
  this.toughness = new MageInt(4);
  
  // Whenever Shrouded Serpent attacks, defending player may pay {4}. If he or she doesn't, Shrouded Serpent can't be blocked this turn.
  this.addAbility(new AttacksTriggeredAbility(
      new DoUnlessTargetPlayerOrTargetsControllerPaysEffect(new CantBeBlockedByAllSourceEffect(new FilterCreaturePermanent(), Duration.EndOfCombat), new ManaCostsImpl("{4}")), 
      false, 
      "Whenever {this} attacks, defending player may pay {4}. If he or she doesn't, {this} can't be blocked this turn.", 
      SetTargetPointer.PLAYER));
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player != null) {
      Card card = player.getLibrary().getFromTop(game);
      if (card != null) {
        player.moveCards(card, Zone.GRAVEYARD, source, game);
        if (card.isLand()) {
          game.addEffect(new CantBeBlockedByAllSourceEffect(StaticFilters.FILTER_PERMANENT_CREATURES, Duration.EndOfTurn), source);
        }
      }
      return true;
    }
    return false;
  }
}
origin: magefree/mage

public RhonassStalwart(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WARRIOR);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // You may exert Rhonas's Stalwart as it attacks. When you do, it gets +1/+1 until end of turn and can't be blocked by creatures with power 2 or less this turn.
  Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn);
  effect.setText("it gets +1/+1");
  BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect);
  effect = new CantBeBlockedByAllSourceEffect(filter, Duration.EndOfTurn);
  effect.setText("and can't be blocked by creatures with power 2 or less this turn");
  ability.addEffect(effect);
  this.addAbility(new ExertAbility(ability));
}
mage.abilities.effects.common.combatCantBeBlockedByAllSourceEffect<init>

Popular methods of CantBeBlockedByAllSourceEffect

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • setScale (BigDecimal)
    • getSupportFragmentManager (FragmentActivity)
    • getContentResolver (Context)
    • Table (com.google.common.collect)
      A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
    • MessageDigest (java.security)
      Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
    • NoSuchElementException (java.util)
      Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
    • TimerTask (java.util)
      The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
    • Executor (java.util.concurrent)
      An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
    • Base64 (org.apache.commons.codec.binary)
      Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
    • Top 17 PhpStorm 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