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

How to use
EntwineAbility
in
mage.abilities.keyword

Best Java code snippets using mage.abilities.keyword.EntwineAbility (Showing top 20 results out of 315)

origin: magefree/mage

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

public EntwineAbility(Cost cost) {
  super(Zone.STACK, null);
  this.additionalCost = new OptionalAdditionalCostImpl(keywordText, "-", reminderText, cost);
  setRuleAtTheTop(true);
}
origin: magefree/mage

@Override
public void changeModes(Ability ability, Game game) {
  if (ability instanceof SpellAbility) {
    Player player = game.getPlayer(controllerId);
    if (player != null) {
      this.resetCosts();
      if (additionalCost != null) {
        if (additionalCost.canPay(ability, ability.getSourceId(), ability.getControllerId(), game)
            && player.chooseUse(Outcome.Benefit, "Pay " + additionalCost.getText(false) + " ?", ability, game)) {
          additionalCost.activate();
          ability.getModes().setAdditionalCost(this);
          ability.getModes().setMinModes(2);
          ability.getModes().setMaxModes(2);
        }
      }
    }
  }
}
origin: magefree/mage

public TemporalCascade(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{U}{U}");
  // Choose one - Each player shuffles their hand and graveyard into their library;
  this.getSpellAbility().addEffect(new ShuffleHandGraveyardAllEffect());
  // or each player draws seven cards.
  Mode mode = new Mode();
  mode.addEffect(new TemporalCascadeDrawEffect());
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {2}
  this.addAbility(new EntwineAbility("{2}"));
}
origin: magefree/mage

public RoarOfTheKha(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
  // Choose one - Creatures you control get +1/+1 until end of turn;
  this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn));
  
  // or untap all creatures you control.
  Mode mode = new Mode();
  mode.addEffect(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), rule));
  this.getSpellAbility().getModes().addMode(mode);
  
  // Entwine {1}{W}
  this.addAbility(new EntwineAbility("{1}{W}"));
}
origin: magefree/mage

public WailOfTheNim(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}");
  // Choose one - Regenerate each creature you control;
  this.getSpellAbility().addEffect(new RegenerateAllEffect(new FilterControlledCreaturePermanent()));
  
  // or Wail of the Nim deals 1 damage to each creature and each player.
  Mode mode = new Mode();
  mode.addEffect(new DamageEverythingEffect(1));
  this.getSpellAbility().getModes().addMode(mode);
  
  // Entwine {B}
  this.addAbility(new EntwineAbility("{B}"));
}
origin: magefree/mage

public JourneyOfDiscovery(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}");
  // Choose one - Search your library for up to two basic land cards, reveal them, put them into your hand, then shuffle your library; 
  this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, StaticFilters.FILTER_CARD_BASIC_LAND)));
  
  // or you may play up to two additional lands this turn.
  Mode mode = new Mode();
  mode.addEffect(new PlayAdditionalLandsControllerEffect(2, Duration.EndOfTurn));
  this.getSpellAbility().getModes().addMode(mode);
  
  // Entwine {2}{G}
  this.addAbility(new EntwineAbility("{2}{G}"));
}
origin: magefree/mage

public ShrivelingRot(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}{B}");
  // Choose one -
  // Until end of turn, whenever a creature is dealt damage, destroy it.
  this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new ShrivelingRotDestroyTriggeredAbility()));
  // Until end of turn, whenever a creature dies, that creature's controller loses life equal to its toughness.
  Mode mode = new Mode();
  mode.addEffect(new CreateDelayedTriggeredAbilityEffect(new ShrivelingRotLoseLifeTriggeredAbility()));
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {2}{B}
  this.addAbility(new EntwineAbility("{2}{B}"));
}
origin: magefree/mage

public ToothAndNail(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{G}{G}");
  // Choose one -
  // Search your library for up to two creature cards, reveal them, put them into your hand, then shuffle your library;
  this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 2, new FilterCreatureCard()), true));
  // or put up to two creature cards from your hand onto the battlefield.
  Mode mode = new Mode();
  mode.addEffect(new ToothAndNailPutCreatureOnBattlefieldEffect());
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {2}
  this.addAbility(new EntwineAbility("{2}"));
}
origin: magefree/mage

public BarbedLightning(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
  // Choose one - Barbed Lightning deals 3 damage to target creature;
  this.getSpellAbility().addEffect(new DamageTargetEffect(3));
  this.getSpellAbility().addTarget(new TargetCreaturePermanent());
  // or Barbed Lightning deals 3 damage to target player.
  Mode mode = new Mode();
  mode.addEffect(new DamageTargetEffect(3));
  mode.addTarget(new TargetPlayerOrPlaneswalker());
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {2}
  this.addAbility(new EntwineAbility("{2}"));
}
origin: magefree/mage

public RainOfRust(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}{R}");
  // Choose one -
  //Destroy target artifact;
  this.getSpellAbility().addEffect(new DestroyTargetEffect());
  this.getSpellAbility().addTarget(new TargetArtifactPermanent());
  //or destroy target land.
  Mode mode = new Mode();
  mode.addEffect(new DestroyTargetEffect());
  mode.addTarget(new TargetLandPermanent());
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {3}{R}
  this.addAbility(new EntwineAbility("{3}{R}"));
}
origin: magefree/mage

public PlungeIntoDarkness(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
  // Choose one -
  this.getSpellAbility().getModes().setMinModes(1);
  this.getSpellAbility().getModes().setMaxModes(1);
  // Sacrifice any number of creatures, then you gain 3 life for each sacrificed creature;
  this.getSpellAbility().addEffect(new PlungeIntoDarknessLifeEffect());
  // or pay X life, then look at the top X cards of your library, put one of those cards into your hand, and exile the rest.
  Mode mode = new Mode();
  mode.addEffect(new PlungeIntoDarknessSearchEffect());
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {B}
  this.addAbility(new EntwineAbility("{B}"));
}
origin: magefree/mage

public InciteWar(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
  // Choose one - Creatures target player controls attack this turn if able;
  this.getSpellAbility().addEffect(new InciteWarMustAttackEffect());
  this.getSpellAbility().addTarget(new TargetPlayer());
  this.getSpellAbility().addWatcher(new AttackedThisTurnWatcher());
  // or creatures you control gain first strike until end of turn.
  Mode mode = new Mode();
  mode.addEffect(new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, filter));
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {2}
  this.addAbility(new EntwineAbility("{2}"));
}
origin: magefree/mage

public SavageBeating(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}{R}");
  // Cast Savage Beating only during your turn and only during combat.
  this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT, null, MyTurnCondition.instance,
      "Cast this spell only during your turn and only during combat"));
  // Choose one - Creatures you control gain double strike until end of turn;
  this.getSpellAbility().addEffect(new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false));
  // or untap all creatures you control and after this phase, there is an additional combat phase.
  Mode mode = new Mode();
  mode.addEffect(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), "untap all creatures you control"));
  mode.addEffect(new AdditionalCombatPhaseEffect("and after this phase, there is an additional combat phase"));
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {1}{R}
  this.addAbility(new EntwineAbility("{1}{R}"));
}
origin: magefree/mage

public SolarTide(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{W}{W}");
  // Choose one - Destroy all creatures with power 2 or less;
  this.getSpellAbility().addEffect(new DestroyAllEffect(filter1));
  
  // or destroy all creatures with power 3 or greater.
  Mode mode = new Mode();
  mode.addEffect(new DestroyAllEffect(filter2));
  this.getSpellAbility().getModes().addMode(mode);
  
  // Entwine-Sacrifice two lands.
  this.addAbility(new EntwineAbility(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("two lands"), true))));
}
origin: magefree/mage

public AbunasChant(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W}");
  // Choose one - 
  this.getSpellAbility().getModes().setMinModes(1);
  this.getSpellAbility().getModes().setMaxModes(1);
  //You gain 5 life; 
  this.getSpellAbility().addEffect(new GainLifeEffect(5));
  //or prevent the next 5 damage that would be dealt to target creature this turn.
  Mode mode = new Mode();
  mode.addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 5));
  mode.addTarget(new TargetCreaturePermanent());
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {2}
  this.addAbility(new EntwineAbility("{2}"));
}
origin: magefree/mage

public SecondSight(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
  // Choose one -
  this.getSpellAbility().getModes().setMinModes(1);
  this.getSpellAbility().getModes().setMaxModes(1);
  //Look at the top five cards of target opponent's library, then put them back in any order;
  this.getSpellAbility().addEffect(new SecondSightEffect());
  this.getSpellAbility().addTarget(new TargetOpponent());
  //or look at the top five cards of your library, then put them back in any order.
  this.getSpellAbility().getModes().addMode(new Mode(new LookLibraryControllerEffect(5)));
  // Entwine {U}
  this.addAbility(new EntwineAbility("{U}"));
}
origin: magefree/mage

public OneDozenEyes(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{G}");
  // Choose one -
  this.getSpellAbility().getModes().setMinModes(1);
  this.getSpellAbility().getModes().setMaxModes(1);
  // Create a 5/5 green Beast creature token;
  this.getSpellAbility().addEffect(new CreateTokenEffect(new OneDozenEyesBeastToken()));
  // or create five 1/1 green Insect creature tokens.
  Mode mode = new Mode();
  mode.addEffect(new CreateTokenEffect(new InsectToken(), 5));
  this.getSpellAbility().addMode(mode);
  // Entwine {G}{G}{G}
  this.addAbility(new EntwineAbility("{G}{G}{G}"));
}
origin: magefree/mage

public StirThePride(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{W}");
  // Choose one - 
  this.getSpellAbility().getModes().setMinModes(1);
  this.getSpellAbility().getModes().setMaxModes(1);
  // Creatures you control get +2/+2 until end of turn;
  this.getSpellAbility().addEffect(new BoostControlledEffect(2,2, Duration.EndOfTurn));
  // or until end of turn, creatures you control gain "Whenever this creature deals damage, you gain that much life."
  Mode mode = new Mode();
  Effect effect = new GainAbilityControlledEffect(new DealsDamageGainLifeSourceTriggeredAbility(), Duration.EndOfTurn);
  effect.setText("until end of turn, creatures you control gain \"Whenever this creature deals damage, you gain that much life.\"");
  mode.addEffect(effect);
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {1}{W}
  this.addAbility(new EntwineAbility("{1}{W}"));
}
origin: magefree/mage

public RudeAwakening(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}");
  // Choose one -
  this.getSpellAbility().getModes().setMinModes(1);
  this.getSpellAbility().getModes().setMaxModes(1);
  // Untap all lands you control;
  this.getSpellAbility().addEffect(new UntapAllLandsControllerEffect());
  // or until end of turn, lands you control become 2/2 creatures that are still lands.
  Mode mode = new Mode();
  mode.addEffect(new BecomesCreatureAllEffect(
      new CreatureToken(2, 2),
      "lands", new FilterControlledLandPermanent("lands you control"), Duration.EndOfTurn, false));
  this.getSpellAbility().getModes().addMode(mode);
  // Entwine {2}{G}
  this.addAbility(new EntwineAbility("{2}{G}"));
}
mage.abilities.keywordEntwineAbility

Javadoc

702.40. Entwine 702.40a Entwine is a static ability of modal spells (see rule 700.2) that functions while the spell is on the stack. "Entwine [cost]" means "You may choose all modes of this spell instead of just one. If you do, you pay an additional [cost]." Using the entwine ability follows the rules for choosing modes and paying additional costs in rules 601.2b and 601.2e-g. 702.40b If the entwine cost was paid, follow the text of each of the modes in the order written on the card when the spell resolves.

Most used methods

  • <init>
  • resetCosts
  • setRuleAtTheTop

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ImageIO (javax.imageio)
  • 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.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • From CI to AI: The AI layer in your organization
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