Package mage.abilities.dynamicvalue

Examples of mage.abilities.dynamicvalue.DynamicValue


        this.expansionSetCode = "BNG";

        this.color.setBlack(true);

        // You draw X cards and you lose X life, where X is your devotion to black.
        DynamicValue blackDevotion = new DevotionCount(ColoredManaSymbol.B);
        Effect effect = new DrawCardSourceControllerEffect(blackDevotion);
        effect.setText("You draw X cards");
        this.getSpellAbility().addEffect(effect);
        effect = new LoseLifeSourceControllerEffect(blackDevotion);
        effect.setText("and you lose X life, where X is your devotion to black");       
View Full Code Here


        this.toughness = new MageInt(1);

        // {T}: Put a devotion counter on Bloodthirsty Ogre
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.DEVOTION.createInstance()),new TapSourceCost()));
        // {T}: Target creature gets -X/-X until end of turn, where X is the number of devotion counters on Bloodthirsty Ogre. Activate this ability only if you control a Demon.
        DynamicValue devotionCounters = new SignInversionDynamicValue(new CountersCount(CounterType.DEVOTION));
        Ability ability;
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(devotionCounters,devotionCounters, Duration.EndOfTurn, true),new TapSourceCost());
        ability.addCost(new ControlPermanentCost(filter));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
View Full Code Here

        this.color.setGreen(true);
        this.color.setBlue(true);

        // Creatures you control become X/X until end of turn.
        DynamicValue variableMana = new ManacostVariableValue();
        this.getSpellAbility().addEffect(new SetPowerToughnessAllEffect(variableMana, variableMana, Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures you control"), true));
    }
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());
       
        // High Sentinels of Arashin gets +1/+1 for each other creature you control with a +1/+1 counter on it.
        DynamicValue count = new PermanentsOnBattlefieldCount(filter);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield)));
       
        // {3}{W}: Put a +1/+1 counter on target creature.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl<>("{3}{W}"));
        ability.addTarget(new TargetCreaturePermanent());
View Full Code Here

        super(ownerId, 85, "Retribution of the Ancients", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{B}");
        this.expansionSetCode = "KTK";

        this.color.setBlack(true);

        DynamicValue xValue = new SignInversionDynamicValue(new GetXValue());
        // {B}, Remove X +1/+1 counters from among creatures you control: Target creature gets -X/-X until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(xValue,xValue,Duration.EndOfTurn, true), new ManaCostsImpl("{B}"));
        ability.addCost(new RemoveVariableCountersTargetCost(filter, CounterType.P1P1, "X", 0));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
View Full Code Here

        // Green mana doesn't empty from your mana pool as steps and phases end.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new OmnathRuleEffect()));

        // Omnath, Locus of Mana gets +1/+1 for each green mana in your mana pool
        DynamicValue boost = new ManaTypeInManaPoolCount(ManaType.GREEN);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(boost, boost, Duration.WhileOnBattlefield)));

    }
View Full Code Here

        return new DeathforgeShamanEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        DynamicValue value = new MultikickerCount();
        int damage = value.calculate(game, source, this) * 2;

        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
            player.damage(damage, id, game, false, true);
            return true;
View Full Code Here

        this.expansionSetCode = "CHK";
        this.subtype.add("Arcane");
        this.color.setGreen(true);

        // Target creature gets +X/+X until end of turn, where X is the number of lands you control.
        DynamicValue controlledLands = new PermanentsOnBattlefieldCount(filter, null);
        this.getSpellAbility().addEffect(new BoostTargetEffect(controlledLands, controlledLands, Duration.EndOfTurn, true));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

        this.color.setGreen(true);
        this.power = new MageInt(0);
        this.toughness = new MageInt(0);

        // Dauntless Dourbark's power and toughness are each equal to the number of Forests you control plus the number of Treefolk you control.
        DynamicValue amount = new PermanentsOnBattlefieldCount(filter);
        this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(amount, Duration.EndOfGame)));
       
        // Dauntless Dourbark has trample as long as you control another Treefolk.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), new PermanentsOnTheBattlefieldCondition(filter2), rule)));
       
View Full Code Here

        this.color.setRed(true);

        // Sweep - Return any number of Mountains you control to their owner's hand. Barrel Down Sokenzan deals damage to target creature equal to twice the number of Mountains returned this way.
        this.getSpellAbility().addEffect(new SweepEffect("Mountain"));
        DynamicValue sweepValue = new MultipliedValue(new SweepNumber("Mountain", false), 2);
        this.getSpellAbility().addEffect(new DamageTargetEffect(sweepValue));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

TOP

Related Classes of mage.abilities.dynamicvalue.DynamicValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.