congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ReturnFromGraveyardToHandTargetEffect
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: magefree/mage

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

@Override
public boolean apply(Game game, Ability source) {
  Player controller = game.getPlayer(source.getControllerId());
  if (controller != null) {
    return controller.moveCards(new CardsImpl(getTargetPointer().getTargets(game, source)), Zone.HAND, source, game);
  }
  return false;
}
origin: magefree/mage

public PharikasMender(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}");
  this.subtype.add(SubType.GORGON);
  this.power = new MageInt(4);
  this.toughness = new MageInt(3);
  // When Pharika's Mender enters the battlefield, you may return target creature or enchantment card from your graveyard to your hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect());
  Target target = new TargetCardInYourGraveyard(filter);
  ability.addTarget(target);
  this.addAbility(ability);
}
origin: magefree/mage

public ShaakHerd(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
  this.subtype.add(SubType.BEAST);
  this.power = new MageInt(1);
  this.toughness = new MageInt(2);
  // When Shaak Herd dies, you may return another target creature card from your graveyard to your hand.
  Ability ability = new DiesTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true);
  ability.addTarget(new TargetCardInYourGraveyard(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public Genesis(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
  this.subtype.add(SubType.INCARNATION);
  this.power = new MageInt(4);
  this.toughness = new MageInt(4);
  // At the beginning of your upkeep, if Genesis is in your graveyard, you may pay {2}{G}. If you do, return target creature card from your graveyard to your hand.
  Ability ability = new BeginningOfUpkeepTriggeredAbility(
      Zone.GRAVEYARD, new DoIfCostPaid(new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{2}{G}")), TargetController.YOU, false, false);
  ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
  this.addAbility(ability);
}
origin: magefree/mage

public LeoninSquire(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
  this.subtype.add(SubType.CAT);
  this.subtype.add(SubType.SOLDIER);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // When Leonin Squire enters the battlefield, return target artifact card with converted mana cost 1 or less from your graveyard to your hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect());
  ability.addTarget(new TargetCardInYourGraveyard(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public Scrivener(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // When Scrivener enters the battlefield, you may return target instant card from your graveyard to your hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true);
  ability.addTarget(new TargetCardInYourGraveyard(filter));
  this.addAbility(ability);
  
}
origin: magefree/mage

public OversoldCemetery(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
  // At the beginning of your upkeep, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand.
  TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), TargetController.YOU, true);
  ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard()));
  CardsInControllerGraveCondition condition = new CardsInControllerGraveCondition(4, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
  this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand."));
}
origin: magefree/mage

public EternalWitness(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.SHAMAN);
  this.power = new MageInt(2);
  this.toughness = new MageInt(1);
  // When Eternal Witness enters the battlefield, you may return target card from your graveyard to your hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true);
  ability.addTarget(new TargetCardInYourGraveyard());
  this.addAbility(ability);
}
origin: magefree/mage

public DutifulAttendant(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WARRIOR);
  this.power = new MageInt(1);
  this.toughness = new MageInt(2);
  // When Dutiful Ateendant dies, return another target creature card from your graveyard to your hand.
  Ability ability = new DiesTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), false);
  ability.addTarget(new TargetCardInYourGraveyard(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public SoulStrings(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}");
  // Return two target creature cards from your graveyard to your hand unless any player pays {X}.
  Effect effect = new DoUnlessAnyPlayerPaysEffect(
      new ReturnFromGraveyardToHandTargetEffect(), ManacostVariableValue.instance);
  this.getSpellAbility().addEffect(effect);
  this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(2, new FilterCreatureCard("creature cards from your graveyard")));
}
origin: magefree/mage

public WardenOfTheEye(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}{W}");
  this.subtype.add(SubType.DJINN);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(3);
  this.toughness = new MageInt(3);
  // When Warden of the Eye enters the battlefield, return target noncreature, nonland card from your graveyard to your hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect());
  ability.addTarget(new TargetCard(Zone.GRAVEYARD, filter));
  this.addAbility(ability);
}
origin: magefree/mage

public Anarchist(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // When Anarchist enters the battlefield, you may return target sorcery card from your graveyard to your hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true);
  ability.addTarget(new TargetCardInYourGraveyard(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public GolgariFindbroker(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}{G}{G}");
  this.subtype.add(SubType.ELF);
  this.subtype.add(SubType.SHAMAN);
  this.power = new MageInt(3);
  this.toughness = new MageInt(4);
  // When Golgari Findbroker enters the battlefield, return target permanent card from your graveyard to your hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(
      new ReturnFromGraveyardToHandTargetEffect(), false
  );
  ability.addTarget(new TargetCardInYourGraveyard(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public StoicBuilder(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
  this.subtype.add(SubType.HUMAN);
  this.power = new MageInt(2);
  this.toughness = new MageInt(3);
  // When Stoic Builder enters the battlefield, you may return target land card from your graveyard to your hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true);
  ability.addTarget(new TargetCardInYourGraveyard(new FilterLandCard("land card from your graveyard")));
  this.addAbility(ability);
}
origin: magefree/mage

public BalothNull(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{G}");
  this.subtype.add(SubType.ZOMBIE, SubType.BEAST);
  this.power = new MageInt(4);
  this.toughness = new MageInt(5);
  // When Baloth Null enters the battlefield, return up to two target creature cards from your graveyard to your hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), false);
  ability.addTarget(new TargetCardInYourGraveyard(0, 2, new FilterCreatureCard("creature cards from your graveyard")));
  this.addAbility(ability);
}
origin: magefree/mage

public TreasuryThrull(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{B}");
  this.subtype.add(SubType.THRULL);
  this.power = new MageInt(4);
  this.toughness = new MageInt(4);
  // Extort (Whenever you cast a spell, you may pay {WB}. If you do, each opponent loses 1 life and you gain that much life.)
  this.addAbility(new ExtortAbility());
  // Whenever Treasury Thrull attacks, you may return target artifact, creature, or enchantment card from your graveyard to your hand.
  Ability ability = new AttacksTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true);
  ability.addTarget(new TargetCardInYourGraveyard(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public Cartographer(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
  this.subtype.add(SubType.HUMAN);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // When Cartographer enters the battlefield, you may return target land card from your graveyard to your hand.
 Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true);
 ability.addTarget(new TargetCardInYourGraveyard(new FilterLandCard()));
 this.addAbility(ability);
 
}
origin: magefree/mage

public GriffinDreamfinder(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}");
  this.subtype.add(SubType.GRIFFIN);
  this.power = new MageInt(1);
  this.toughness = new MageInt(4);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // When Griffin Dreamfinder enters the battlefield, return target enchantment card from your graveyard to your hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), false);
  ability.addTarget(new TargetCardInYourGraveyard(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public Paleoloth(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}{G}");
  this.subtype.add(SubType.BEAST);
  this.power = new MageInt(5);
  this.toughness = new MageInt(5);
  // Whenever another creature with power 5 or greater enters the battlefield under your control, you may return target creature card from your graveyard to your hand.
  Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), filter, true, rule);
  ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard()));
  this.addAbility(ability);
  
}
mage.abilities.effects.commonReturnFromGraveyardToHandTargetEffect

Most used methods

  • <init>
  • getTargetPointer

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • getContentResolver (Context)
  • startActivity (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • String (java.lang)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Top PhpStorm 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