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

How to use
mage.abilities.costs.common.ExileTargetCost
constructor

Best Java code snippets using mage.abilities.costs.common.ExileTargetCost.<init> (Showing top 5 results out of 315)

origin: magefree/mage

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

public FoodChain(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
  // Exile a creature you control: Add X mana of any one color, where X is the exiled creature's converted mana cost plus one. Spend this mana only to cast creature spells.
  Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new FoodChainManaEffect(),
      new ExileTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_A_CREATURE, true)));
  this.addAbility(ability);
}
origin: magefree/mage

public SoulExchange(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}{B}");
  // As an additional cost to cast Soul Exchange, exile a creature you control.
  Cost cost = new ExileTargetCost(new TargetControlledCreaturePermanent());
  this.getSpellAbility().addCost(cost);
  // Return target creature card from your graveyard to the battlefield. Put a +2/+2 counter on that creature if the exiled creature was a Thrull.
  this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
  this.getSpellAbility().addEffect(new SoulExchangeEffect());
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    Permanent permanent = source.getSourcePermanentIfItStillExists(game);
    if (player == null || permanent == null) {
      return false;
    }
    FilterControlledPermanent filter = new FilterControlledPermanent("tokens created with " + permanent.getName());
    filter.add(new TetravusPredicate(new MageObjectReference(permanent, game)));
    filter.add(TokenPredicate.instance);
    ExileTargetCost cost = new ExileTargetCost(new TargetControlledPermanent(0, Integer.MAX_VALUE, filter, true));
    if (cost.pay(source, game, source.getSourceId(), player.getId(), true)) {
      return new AddCountersSourceEffect(CounterType.P1P1.createInstance(cost.getPermanents().size())).apply(game, source);
    }
    return false;
  }
}
origin: magefree/mage

public CityOfShadows(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
  // {T}, Exile a creature you control: Put a storage counter on City of Shadows.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.STORAGE.createInstance()), new TapSourceCost());
  ability.addCost(new ExileTargetCost(new TargetControlledCreaturePermanent()));
  this.addAbility(ability);
  // {T}: Add X mana of {C}, where X is the number of storage counters on City of Shadows.
  ability = new DynamicManaAbility(Mana.ColorlessMana(1), new CountersSourceCount(CounterType.STORAGE),
      "Add X mana of {C}, where X is the number of storage counters on {this}");
  this.addAbility(ability);
}
mage.abilities.costs.commonExileTargetCost<init>

Popular methods of ExileTargetCost

  • addTarget
  • getPermanents
  • pay

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Permission (java.security)
    Legacy security code; do not use.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Top plugins for WebStorm
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