public DamageControllerEffect(int amount, boolean preventable) { super(Outcome.Damage); this.amount = new StaticValue(amount); this.preventable = preventable; }
@Override public final boolean apply(Game game, Ability source) { PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filter); int count = amount.calculate(game, source, null); return count > value; } }
@Override public DevouredCreaturesCount copy() { return new DevouredCreaturesCount(this); }
@Override public boolean checkTrigger(GameEvent event, Game game) { return new CountersSourceCount(CounterType.TIDE).calculate(game, this, null) == 4; }
@Override public UrzaTerrainValue copy() { return new UrzaTerrainValue(value); }
@Override public SignInversionDynamicValue copy() { return new SignInversionDynamicValue(this); }
@Override public CardsInAllGraveyardsCount copy() { return new CardsInAllGraveyardsCount(this); }
@Override public AttackingCreatureCount copy() { return new AttackingCreatureCount(this); }
@Override public BlockedCreatureCount copy() { return new BlockedCreatureCount(this); }
@Override public AuraAttachedCount copy() { return new AuraAttachedCount(this); }
@Override public int calculate(Game game, Ability source, Effect effect) { return super.calculate(game, source, effect) + 3; }
public TargetCreatureOrPlayerAmount(int amount) { // 107.1c If a rule or ability instructs a player to choose “any number,” that player may choose // any positive number or zero, unless something (such as damage or counters) is being divided // or distributed among “any number” of players and/or objects. In that case, a nonzero number // of players and/or objects must be chosen if possible. this(new StaticValue(amount)); this.minNumberOfTargets = 1; }
/** * * @param amount * @param attackerIsSource true if the source.getSourceId() contains the * attacker false if attacker has to be taken from targetPointer */ public LoseLifeDefendingPlayerEffect(int amount, boolean attackerIsSource) { this(new StaticValue(amount), attackerIsSource); }
/** * * @param amount * @param attackerIsSource true if the source.getSourceId() contains the * attacker false if attacker has to be taken from targetPointer */ public CloakingDeviceLoseLifeDefendingPlayerEffect(int amount, boolean attackerIsSource) { this(new StaticValue(amount), attackerIsSource); }
public LookLibraryAndPickControllerEffect(int numberOfCards, int numberToPick, FilterCard pickFilter, boolean upTo) { this(new StaticValue(numberOfCards), false, new StaticValue(numberToPick), pickFilter, Zone.LIBRARY, false, true, upTo); }
public DamageControllerEffect(int amount, boolean preventable, String whoDealDamageName) { super(Outcome.Damage); this.amount = new StaticValue(amount); this.preventable = preventable; this.sourceName = whoDealDamageName; }
/** * @param maxCost Maximum converted mana cost for this effect to apply to */ public CastWithoutPayingManaCostEffect(int maxCost) { this(new StaticValue(maxCost)); }
/** * * @param amount amount of cards to discard * @param randomDiscard discard the cards by random * */ public DiscardTargetEffect(int amount, boolean randomDiscard) { super(Outcome.Discard); this.randomDiscard = randomDiscard; this.amount = new StaticValue(amount); }
public TargetAnyTargetAmount(int amount) { // 107.1c If a rule or ability instructs a player to choose “any number,” that player may choose // any positive number or zero, unless something (such as damage or counters) is being divided // or distributed among “any number” of players and/or objects. In that case, a nonzero number // of players and/or objects must be chosen if possible. this(new StaticValue(amount)); this.minNumberOfTargets = 1; }
@Override public StaticValue copy() { return new StaticValue(this); }