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

How to use
LockedInDynamicValue
in
mage.abilities.dynamicvalue

Best Java code snippets using mage.abilities.dynamicvalue.LockedInDynamicValue (Showing top 2 results out of 315)

origin: magefree/mage

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

public GideonChampionOfJustice(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{W}{W}");
  this.addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.GIDEON);
  this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
  // +1: Put a loyalty counter on Gideon, Champion of Justice for each creature target opponent controls.
  LoyaltyAbility ability1 = new LoyaltyAbility(
      new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(0), new PermanentsTargetOpponentControlsCount(new FilterCreaturePermanent()), true), 1);
  ability1.addTarget(new TargetOpponent());
  this.addAbility(ability1);
  // 0: Until end of turn, Gideon becomes an indestructible Human Soldier creature with power and toughness each equal to the number of loyalty counters on him. He's still a planeswalker. Prevent all damage that would be dealt to him this turn.
  LockedInDynamicValue loyaltyCount = new LockedInDynamicValue(new CountersSourceCount(CounterType.LOYALTY));
  LoyaltyAbility ability2 = new LoyaltyAbility(new BecomesCreatureSourceEffect(
      new GideonChampionOfJusticeToken(), "planeswalker", Duration.EndOfTurn, false, false, loyaltyCount, loyaltyCount), 0);
  ability2.addEffect(new PreventAllDamageToSourceEffect(Duration.EndOfTurn));
  this.addAbility(ability2);
  // -15: Exile all other permanents.
  this.addAbility(new LoyaltyAbility(new GideonExileAllOtherPermanentsEffect(), -15));
}
mage.abilities.dynamicvalueLockedInDynamicValue

Javadoc

The first calculated value is used as long as the class instance is in use IMPORTANT: If used the ability / effect that uses a locked in dynamic value has to really copy the dnamic value in its copy method (not reference)

Most used methods

  • <init>

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Notification (javax.management)
  • Top 12 Jupyter Notebook extensions
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