congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PermanentToken.getToken
Code IndexAdd Tabnine to your IDE (free)

How to use
getToken
method
in
mage.game.permanent.PermanentToken

Best Java code snippets using mage.game.permanent.PermanentToken.getToken (Showing top 7 results out of 315)

origin: magefree/mage

@Override
public void adjustCosts(Ability ability, Game game) {
  if (getToken().getCopySourceCard() != null) {
    getToken().getCopySourceCard().adjustCosts(ability, game);
  } else {
    super.adjustCosts(ability, game);
  }
}
origin: magefree/mage

  this.mageObjectType = MageObjectType.TOKEN;
  this.rarity = Rarity.COMMON;
  boolean originalCardNumberIsNull = ((PermanentToken) card).getToken().getOriginalCardNumber() == null;
  if (!originalCardNumberIsNull && !"0".equals(((PermanentToken) card).getToken().getOriginalCardNumber())) {
    this.expansionSetCode = ((PermanentToken) card).getToken().getOriginalExpansionSetCode();
    this.cardNumber = ((PermanentToken) card).getToken().getOriginalCardNumber();
  } else {
  this.type = ((PermanentToken) card).getToken().getTokenType();
} else {
  this.rarity = card.getRarity();
origin: magefree/mage

@Override
public void adjustTargets(Ability ability, Game game) {
  if (getToken().getCopySourceCard() != null) {
    getToken().getCopySourceCard().adjustTargets(ability, game);
  } else {
    super.adjustTargets(ability, game);
  }
}
origin: magefree/mage

@Override
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
  for (Permanent entering : game.getPermanentsEntering().values()) {
    if (entering.getId().equals(copyToObjectId) && entering instanceof PermanentToken) {
      UUID originalCardId = ((PermanentToken) entering).getToken().getCopySourceCard().getId();
      EmbalmedThisTurnWatcher watcher = game.getState().getWatcher(EmbalmedThisTurnWatcher.class);
      if (watcher != null) {
        for (MageObjectReference mor : watcher.getEmbalmedThisTurnCards()) {
          if (mor.getSourceId().equals(originalCardId) && game.getState().getZoneChangeCounter(originalCardId) == mor.getZoneChangeCounter()) {
            permanent.getManaCost().clear();
            if (!permanent.hasSubtype(SubType.ZOMBIE, game)) {
              permanent.getSubtype(game).add(SubType.ZOMBIE);
            }
            permanent.getColor(game).setColor(ObjectColor.WHITE);
          }
        }
      }
    }
  }
  return true;
}
origin: magefree/mage

original = new CardView(((PermanentToken) permanent).getToken());
original.expansionSetCode = permanent.getExpansionSetCode();
tokenSetCode = original.getTokenSetCode();
origin: magefree/mage

  this.expansionSetCode = permanentToken.getExpansionSetCode();
  this.rules = permanentToken.getRules();
  this.type = permanentToken.getToken().getTokenType();
} else if (object instanceof Emblem) {
  this.mageObjectType = MageObjectType.EMBLEM;
origin: magefree/mage

  sourceObj = ((PermanentToken) source).getToken();
  target.setCopySourceCard(((PermanentToken) source).getToken().getCopySourceCard());
} else if (source instanceof PermanentCard) {
  if (((PermanentCard) source).isMorphed() || ((PermanentCard) source).isManifested()) {
mage.game.permanentPermanentTokengetToken

Popular methods of PermanentToken

  • <init>
  • getExpansionSetCode
  • addAbility
  • copyFromToken
  • getId
  • getManaCost
  • getName
  • getRules
  • getTokenDescriptor
  • removeSummoningSickness
  • setTapped
  • setTapped

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JTable (javax.swing)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now