public DiscardTargetEffect(final DiscardTargetEffect effect) { super(effect); this.amount = effect.amount.copy(); this.randomDiscard = effect.randomDiscard; }
@Override public int calculate(Game game, Ability sourceAbility, Effect effect) { if (!valueChecked) { lockedInValue = basicDynamicValue.calculate(game, sourceAbility, effect); valueChecked = true; } return lockedInValue; }
@Override public String getMessage() { return value.getMessage(); } }
public DrawCardTargetEffect(DynamicValue amount, boolean optional, boolean upto) { super(Outcome.DrawCard); this.amount = amount.copy(); this.optional = optional; this.upTo = upto; }
@Override public int calculate(Game game, Ability sourceAbility, Effect effect) { int amount = value.calculate(game, sourceAbility, effect); if (amount >= 0 || canBePositive) { return -1 * amount; } else { return 0; } }
public SetPowerSourceEffect(DynamicValue amount, Duration duration, SubLayer subLayer) { super(duration, Layer.PTChangingEffects_7, subLayer, Outcome.BoostCreature); this.amount = amount; staticText = "{this}'s power is equal to the number of " + amount.getMessage(); }
public LookLibraryControllerEffect(final LookLibraryControllerEffect effect) { super(effect); this.numberOfCards = effect.numberOfCards.copy(); this.mayShuffleAfter = effect.mayShuffleAfter; this.targetZoneLookedCards = effect.targetZoneLookedCards; this.putOnTop = effect.putOnTop; this.backInRandomOrder = effect.backInRandomOrder; }
public int getAmount() { if (amount instanceof StaticValue) { return amount.calculate(null, null, this); } else { return 0; } }
@Override public String getMessage() { return value.getMessage(); } }
public int getAmount() { if (amount instanceof StaticValue) { return amount.calculate(null, null, this); } else { return 0; } }
@Override public String getMessage() { return value.getMessage(); } }
public DamageTargetEffect(final DamageTargetEffect effect) { super(effect); this.amount = effect.amount.copy(); this.preventable = effect.preventable; this.targetDescription = effect.targetDescription; this.useOnlyTargetPointer = effect.useOnlyTargetPointer; this.sourceName = effect.sourceName; }
public LoseLifeDefendingPlayerEffect(final LoseLifeDefendingPlayerEffect effect) { super(effect); this.amount = effect.amount.copy(); this.attackerIsSource = effect.attackerIsSource; }
public DiscardControllerEffect(final DiscardControllerEffect effect) { super(effect); this.amount = effect.amount.copy(); this.randomDiscard = effect.randomDiscard; }
public SkeletalScryingEffect(DynamicValue amount) { super(Outcome.Neutral); this.amount = amount.copy(); staticText = "You draw " + amount + " cards and you lose " + amount + " life"; }
public DamageTargetControllerEffect(final DamageTargetControllerEffect effect) { super(effect); amount = effect.amount.copy(); preventable = effect.preventable; }