Codota Logo
mage.abilities.effects
Code IndexAdd Codota to your IDE (free)

How to use mage.abilities.effects

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: magefree/mage

private void applyContinuousEffect(ContinuousEffect effect, Layer currentLayer, Game game) {
  Set<Ability> abilities = layeredEffects.getAbility(effect.getId());
  for (Ability ability : abilities) {
    //effect.apply(currentLayer, SubLayer.NA, ability, game);
    if (isAbilityStillExists(game, ability, effect)) {
      effect.apply(currentLayer, SubLayer.NA, ability, game);
    }
  }
}
origin: magefree/mage

  public ContinuousEffects() {
    applyCounters = new ApplyCountersEffect();
//        planeswalkerRedirectionEffect = new PlaneswalkerRedirectionEffect();
    auraReplacementEffect = new AuraReplacementEffect();
    collectAllEffects();
  }

origin: magefree/mage

public PutIntoGraveFromAnywhereEffect(Effect baseEffect, Condition condition, String text, boolean selfScope, boolean optional) {
  super(Duration.EndOfGame, baseEffect.getOutcome(), selfScope);
  this.baseEffects.add(baseEffect);
  this.text = text;
  this.condition = condition;
  this.optional = optional;
}
origin: magefree/mage

public boolean replaceEvent(GameEvent event, Ability targetAbility, Game game) {
  if (effects.preventedByRuleModification(event, targetAbility, game, false)) {
    return true;
  }
  return effects.replaceEvent(event, game);
}
origin: magefree/mage

public Effects(final Effects effects) {
  for (Effect effect : effects) {
    this.add(effect.copy());
  }
}
origin: magefree/mage

@Override
public EnumSet<DependencyType> getDependencyTypes() {
  if (effect != null) {
    return effect.getDependencyTypes();
  }
  return super.getDependencyTypes();
}
origin: magefree/mage

@Override
public Set<UUID> isDependentTo(List<ContinuousEffect> allEffectsInLayer) {
  if (effect != null) {
    return effect.isDependentTo(allEffectsInLayer);
  }
  return super.isDependentTo(allEffectsInLayer);
}
origin: magefree/mage

public ConditionalContinuousRuleModifyingEffect(ContinuousRuleModifyingEffect effect, Condition condition, ContinuousRuleModifyingEffect otherwiseEffect) {
  super(effect.getDuration(), effect.getOutcome());
  this.effect = effect;
  this.baseCondition = condition;
  this.otherwiseEffect = otherwiseEffect;
}
origin: magefree/mage

public void addEffect(Effect effect) {
  if (effect != null) {
    executingEffects.add(effect);
  }
}
origin: magefree/mage

public AsTurnedFaceUpEffect(final AsTurnedFaceUpEffect effect) {
  super(effect);
  this.baseEffects = effect.baseEffects.copy();
  this.optional = effect.optional;
}
origin: magefree/mage

public ConditionalOneShotEffect(ConditionalOneShotEffect effect) {
  super(effect);
  this.effect = (OneShotEffect) effect.effect.copy();
  if (effect.otherwiseEffect != null) {
    this.otherwiseEffect = (OneShotEffect) effect.otherwiseEffect.copy();
  }
  this.condition = effect.condition;
}
origin: magefree/mage

public Set<Ability> getLayeredEffectAbilities(ContinuousEffect effect) {
  return layeredEffects.getAbility(effect.getId());
}
origin: magefree/mage

@Override
public UUID mustAttackDefender(Ability source, Game game) {
  if (conditionState) {
    return effect.mustAttackDefender(source, game);
  } else if (otherwiseEffect != null) {
    return otherwiseEffect.mustAttackDefender(source, game);
  }
  return null;
}
origin: magefree/mage

public void newId() {
  for (Effect effect : this) {
    effect.newId();
  }
}
origin: magefree/mage

@Override
public boolean mustBlock(Game game) {
  if (conditionState) {
    return effect.mustBlock(game);
  } else if (otherwiseEffect != null) {
    return otherwiseEffect.mustBlock(game);
  }
  return false;
}
origin: magefree/mage

@Override
public UUID mustBlockAttacker(Ability source, Game game) {
  if (conditionState) {
    return effect.mustBlockAttacker(source, game);
  } else if (otherwiseEffect != null) {
    return otherwiseEffect.mustBlockAttacker(source, game);
  }
  return null;
}

origin: magefree/mage

public ConditionalContinuousRuleModifyingEffect(final ConditionalContinuousRuleModifyingEffect effect) {
  super(effect);
  this.effect = (ContinuousRuleModifyingEffect) effect.effect.copy();
  if (effect.otherwiseEffect != null) {
    this.otherwiseEffect = (ContinuousRuleModifyingEffect) effect.otherwiseEffect.copy();
  }
  this.condition = effect.condition;
  this.baseCondition = effect.baseCondition;
  this.initDone = effect.initDone;
}
origin: magefree/mage

public EntersBattlefieldEffect(Effect baseEffect, Condition condition, String text, boolean selfScope, boolean optional, EnterEventType enterEventType) {
  super(Duration.WhileOnBattlefield, baseEffect.getOutcome(), selfScope);
  this.baseEffects.add(baseEffect);
  this.enterEventType = enterEventType;
  this.text = text;
  this.condition = condition;
  this.optional = optional;
}
origin: magefree/mage

public KinshipBaseEffect(Effect kinshipEffect) {
  super(kinshipEffect.getOutcome());
  this.kinshipEffects.add(kinshipEffect);
  this.staticText = "you may look at the top card of your library. If it shares a creature type with {this}, you may reveal it. If you do, ";
}

origin: magefree/mage

public AsTurnedFaceUpEffect(Effect baseEffect, boolean optional) {
  super(Duration.WhileOnBattlefield, baseEffect.getOutcome(), true);
  this.baseEffects.add(baseEffect);
  this.optional = optional;
}
mage.abilities.effects

Most used classes

  • Effects
  • Effect
  • ContinuousEffects
  • InfoEffect
  • RequirementEffect
  • AsThoughEffect,
  • AsThoughEffectImpl,
  • AsTurnedFaceUpEffect,
  • ContinuousEffect,
  • ContinuousEffectImpl,
  • ContinuousRuleModifyingEffect,
  • ContinuousRuleModifyingEffectImpl,
  • CreateTokenCopySourceEffect,
  • EntersBattlefieldEffect,
  • GainAbilitySpellsEffect,
  • OneShotEffect,
  • PhantomPreventionEffect,
  • PreventionEffect,
  • PreventionEffectData
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now