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

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

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

origin: magefree/mage

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

public SwarmIntelligence(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{6}{U}");
  // Whenever you cast an instant or sorcery spell, you may copy that spell. You may choose new targets for the copy.
  this.addAbility(new SpellCastControllerTriggeredAbility(
      new CopyTargetSpellEffect(true).setText("you may copy that spell. You may choose new targets for the copy"), new FilterInstantOrSorcerySpell("an instant or sorcery spell"), true, true));
}
origin: magefree/mage

  public WillKenrithEmblem() {
    this.setName("Emblem Will Kenrith");
    this.getAbilities().add(new SpellCastControllerTriggeredAbility(
        Zone.COMMAND,
        new CopyTargetSpellEffect(true).withSpellName("it"),
        StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
        false,
        true
    ));
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
      if (controller.flipCoin(source, game, false)) {
        game.informPlayers("Odds: Spell countered");
        return game.getStack().counter(getTargetPointer().getFirst(game, source), source.getSourceId(), game);

      } else {
        game.informPlayers("Odds: Spell will be copied");
        return new CopyTargetSpellEffect().apply(game, source);
      }
    }
    return false;
  }
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
      int denialCount = 0;
      int duplicationCount = 0;
      for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
        Player player = game.getPlayer(playerId);
        if (player != null) {
          if (player.chooseUse(Outcome.ExtraTurn, "Choose denial?", source, game)) {
            denialCount++;
            game.informPlayers(player.getLogName() + " has voted for denial");
          } else {
            duplicationCount++;
            game.informPlayers(player.getLogName() + " has voted for duplication");
          }
        }
      }
      if (denialCount > duplicationCount) {
        return game.getStack().counter(getTargetPointer().getFirst(game, source), source.getSourceId(), game);
      } else {
        return new CopyTargetSpellEffect().apply(game, source);
      }
    }
    return false;
  }
}
origin: magefree/mage

PyromancerAscensionCopyTriggeredAbility() {
  super(Zone.BATTLEFIELD, new CopyTargetSpellEffect(true), true);
}
origin: magefree/mage

public TheMirariConjectureDelayedTriggeredAbility() {
  super(new CopyTargetSpellEffect(true), Duration.EndOfTurn, false);
}
origin: magefree/mage

public BonusRoundDelayedTriggeredAbility() {
  super(new CopyTargetSpellEffect(true, true), Duration.EndOfTurn, false);
}
origin: magefree/mage

ChandraTheFirebrandAbility() {
  super(new CopyTargetSpellEffect(true), Duration.EndOfTurn);
}
origin: magefree/mage

HowlOfTheHordeDelayedTriggeredAbility() {
  super(new CopyTargetSpellEffect(true), Duration.EndOfTurn);
}
origin: magefree/mage

public DoublecastAbility() {
  super(new CopyTargetSpellEffect(true), Duration.EndOfTurn);
}
origin: magefree/mage

public MelekIzzetParagonTriggeredAbility() {
  super(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), false);
}
origin: magefree/mage

MirariTriggeredAbility() {
  super(Zone.BATTLEFIELD, new DoIfCostPaid(
      new CopyTargetSpellEffect(true),
      new GenericManaCost(3)), false);
}
origin: magefree/mage

public MirrorSheen(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U/R}{U/R}");
  // {1}{UR}{UR}: Copy target instant or sorcery spell that targets you. You may choose new targets for the copy.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl("{1}{U/R}{U/R}"));
  ability.addTarget(new TargetSpell(filter));
  this.addAbility(ability);
}
origin: magefree/mage

public IzzetGuildmage(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}{U/R}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // <i>({UR} can be paid with either {U} or {R}.)</i>
  // {2}{U}: Copy target instant spell you control with converted mana cost 2 or less. You may choose new targets for the copy.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl("{2}{U}"));
  ability.addTarget(new TargetSpell(filterInstant));
  this.addAbility(ability);
  // {2}{R}: Copy target sorcery spell you control with converted mana cost 2 or less. You may choose new targets for the copy.
  ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CopyTargetSpellEffect(), new ManaCostsImpl("{2}{R}"));
  ability.addTarget(new TargetSpell(filterSorcery));
  this.addAbility(ability);
}
origin: magefree/mage

public Reverberate(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{R}");
  
  // Copy target instant or sorcery spell. You may choose new targets for the copy.
  this.getSpellAbility().addTarget(new TargetSpell(filter));
  this.getSpellAbility().addEffect(new CopyTargetSpellEffect());
}
origin: magefree/mage

public Twincast(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}{U}");
  // Copy target instant or sorcery spell. You may choose new targets for the copy.
  this.getSpellAbility().addEffect(new CopyTargetSpellEffect());
  this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
}
origin: magefree/mage

public DualcasterMage(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WIZARD);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // Flash
  this.addAbility(FlashAbility.getInstance());
  
  // When Dualcaster Mage enters the battlefield, copy target instant or sorcery spell. You may choose new targets for the copy.
  Ability ability = new EntersBattlefieldTriggeredAbility(new CopyTargetSpellEffect(), false);
  ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
  this.addAbility(ability);
}
origin: magefree/mage

public PrimalWellspring(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
  this.nightCard = true;
  // Add one mana of any color.
  Ability ability = new AnyColorManaAbility();
  this.addAbility(ability);
  // When that mana is spent to cast an instant or sorcery spell, copy that spell and you may choose new targets for the copy.
  Effect effect = new CopyTargetSpellEffect(true);
  effect.setText("copy that spell and you may choose new targets for the copy");
  this.addAbility(new PyrimalWellspringTriggeredAbility(ability.getOriginalId(), effect));
}
origin: magefree/mage

public Reiterate(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{R}");
  // Buyback {3}
  this.addAbility(new BuybackAbility("{3}"));
  // Copy target instant or sorcery spell. You may choose new targets for the copy.
  this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
  this.getSpellAbility().addEffect(new CopyTargetSpellEffect());
}
mage.abilities.effects.commonCopyTargetSpellEffect

Most used methods

  • <init>
  • apply
  • setText
  • withSpellName

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • startActivity (Activity)
  • setScale (BigDecimal)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • CodeWhisperer alternatives
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