Codota Logo
ReturnToHandFromBattlefieldAllEffect
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: magefree/mage

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

@Override
public boolean apply(Game game, Ability source) {
  if (targetPointer.getFirst(game, source) != null) {
    FilterPermanent filter = new FilterArtifactPermanent();
    filter.add(new OwnerIdPredicate(targetPointer.getFirst(game, source)));
    return new ReturnToHandFromBattlefieldAllEffect(filter).apply(game, source);
  }
  return false;
}
origin: magefree/mage

public RemoveEnchantments(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
  // Return to your hand all enchantments you both own and control, all Auras you own attached to permanents you control, and all Auras you own attached to attacking creatures your opponents control. Then destroy all other enchantments you control, all other Auras attached to permanents you control, and all other Auras attached to attacking creatures your opponents control.
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(filter1).setText("Return to your hand all enchantments you both own and control,"));
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(filter2).setText(" all Auras you own attached to permanents you control"));
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(filter3).setText("and all Auras you own attached to attacking creatures your opponents control"));
  this.getSpellAbility().addEffect(new DestroyAllEffect(filter4).setText("Then destroy all other enchantments you control,"));
  this.getSpellAbility().addEffect(new DestroyAllEffect(filter5).setText(" all other Auras attached to permanents you control"));
  this.getSpellAbility().addEffect(new DestroyAllEffect(filter6).setText("and all other Auras attached to attacking creatures your opponents control"));
}
origin: magefree/mage

public AwokenHorrorAbility() {
  super(Zone.BATTLEFIELD, new ReturnToHandFromBattlefieldAllEffect(filter), false);
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player != null) {
      ChoiceColor choice = new ChoiceColor();
      if (player.choose(outcome, choice, game)) {
        game.informPlayers(player.getLogName() + " chooses " + choice.getChoice());
        FilterCreaturePermanent filter = new FilterCreaturePermanent();
        filter.add(new ColorPredicate(choice.getColor()));
        new ReturnToHandFromBattlefieldAllEffect(filter).apply(game, source);
        return true;
      }
    }
    return false;
  }
}
origin: magefree/mage

public Inundate(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{U}{U}");
  // Return all nonblue creatures to their owners' hands.
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(filter));
  
}
origin: magefree/mage

new ReturnToHandFromBattlefieldAllEffect(filter).apply(game, source);
new DiscardEachPlayerEffect(
    new StaticValue(1), false, TargetController.OPPONENT
origin: magefree/mage

public ReduceToDreams(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{U}");
  // Return all artifacts and enchantments to their owners' hands.
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
}
origin: magefree/mage

public Upheaval(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}");
  // Return all permanents to their owners' hands.
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(StaticFilters.FILTER_PERMANENT));
}
origin: magefree/mage

public Sunder(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}{U}");
  // Return all lands to their owners' hands.
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(StaticFilters.FILTER_LANDS));
}
origin: magefree/mage

public Evacuation(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{U}");
  // Return all creatures to their owners' hands.
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(FILTER_PERMANENT_CREATURES));
}
origin: magefree/mage

public Hibernation(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}");
  // Return all green permanents to their owners' hands.
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(filter));
}
origin: magefree/mage

public WhelmingWave(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}{U}");
  // Return all creatures to their owners' hands except for Krakens, Leviathans, Octopuses and Serpents.
  Effect effect = new ReturnToHandFromBattlefieldAllEffect(filter);
  effect.setText("Return all creatures to their owners' hands except for Krakens, Leviathans, Octopuses and Serpents");
  this.getSpellAbility().addEffect(effect);
}
origin: magefree/mage

public Aetherize(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}");
  // Return all attacking creatures to their owners' hands.
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(new FilterAttackingCreature("attacking creatures")));
}
origin: magefree/mage

public SlinnVodaTheRisingDeep(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{U}{U}");
  this.addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.LEVIATHAN);
  this.power = new MageInt(8);
  this.toughness = new MageInt(8);
  // Kicker {1}{U}
  this.addAbility(new KickerAbility("{1}{U}"));
  // When Slinn Voda, the Rising Deep enters the battlefield, if it was kicked, return all creatures to their owners' hands except for Merfolk, Krakens, Leviathans, Octopuses, and Serpents.
  this.addAbility(new ConditionalInterveningIfTriggeredAbility(
      new EntersBattlefieldTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter)),
      KickedCondition.instance,
      "when {this} enters the battlefield, if it was kicked, "
      + "return all creatures to their owners' hands except for "
      + "Merfolk, Krakens, Leviathans, Octopuses, and Serpents."
  ));
}
origin: magefree/mage

public KederektLeviathan(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}");
  this.subtype.add(SubType.LEVIATHAN);
  this.power = new MageInt(5);
  this.toughness = new MageInt(5);
  // When Kederekt Leviathan enters the battlefield, return all other nonland permanents to their owners' hands.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter)));
  // Unearth {6}{U}
  this.addAbility(new UnearthAbility(new ManaCostsImpl("{6}{U}")));
}
origin: magefree/mage

public LlawanCephalidEmpress(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
  addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.CEPHALID);
  this.power = new MageInt(2);
  this.toughness = new MageInt(3);
  // When Llawan, Cephalid Empress enters the battlefield, return all blue creatures your opponents control to their owners' hands.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter), false));
  // Your opponents can't cast blue creature spells.
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LlawanCephalidRuleModifyingEffect()));
}
origin: magefree/mage

public OmenOfFire(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}{R}");
  // Return all Islands to their owners' hands.
  this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(filter));
  
  // Each player sacrifices a Plains or a white permanent for each white permanent he or she controls.
  this.getSpellAbility().addEffect(new OmenOfFireEffect());
}
origin: magefree/mage

public Retract(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
  // Return all artifacts you control to their owner's hand.
  Effect effect = new ReturnToHandFromBattlefieldAllEffect(new FilterControlledArtifactPermanent());
  effect.setText("Return all artifacts you control to their owner's hand");
  this.getSpellAbility().addEffect(effect);        
  
}
origin: magefree/mage

public ThousandWinds(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}");
  this.subtype.add(SubType.ELEMENTAL);
  this.power = new MageInt(5);
  this.toughness = new MageInt(6);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // Morph {5}{U}{U}
  this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{U}{U}")));
  // When Thousand Winds is turned face up, return all other tapped creatures to their owners' hands.
  this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter)));
}
mage.abilities.effects.commonReturnToHandFromBattlefieldAllEffect

Most used methods

  • <init>
  • apply
  • setText

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • 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
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Reference (javax.naming)
  • JTextField (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now