Package mage.abilities.dynamicvalue

Examples of mage.abilities.dynamicvalue.DynamicValue


        this.expansionSetCode = "JOU";

        this.color.setBlack(true);

        // Target creature gets -X/-X until end of turn, where X is the number of cards in your hand.
        DynamicValue xValue = new SignInversionDynamicValue(new CardsInControllerHandCount());
        Effect effect = new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true);
        effect.setText("Target creature gets -X/-X until end of turn, where X is the number of cards in your hand");
        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here


        // Delve
        this.addAbility(new DelveAbility());
        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // {X}, {T}, Exile X cards from your graveyard: Target creature gets -X/-X until end of turn.
        DynamicValue xValue = new SignInversionDynamicValue(new ManacostVariableValue());
        Effect effect = new BoostTargetEffect(xValue,xValue,Duration.EndOfTurn);
        effect.setText("Target creature gets -X/-X until end of turn");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
View Full Code Here

        // Equipped creature has defender and "{2}, {T}: Other creatures you control gain trample and get +X/+X until end of turn, where X is this creature's power."
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DefenderAbility.getInstance(), AttachmentType.EQUIPMENT));
        Effect effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent(), true);
        effect.setText("Other creatures you control gain trample");
        Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
        DynamicValue xValue = new SourcePermanentPowerCount();
        effect = new BoostControlledEffect(xValue, xValue, Duration.EndOfTurn, new FilterCreaturePermanent(), true, true);
        effect.setText("and get +X/+X until end of turn, where X is this creature's power");
        gainedAbility.addEffect(effect);
        gainedAbility.addCost(new TapSourceCost());
        effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT);
View Full Code Here

        super(ownerId, 156, "Profane Command", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{B}{B}");
        this.expansionSetCode = "C14";

        this.color.setBlack(true);

        DynamicValue xValue = new ManacostVariableValue();
        // Choose two -
        this.getSpellAbility().getModes().setMinModes(2);
        this.getSpellAbility().getModes().setMaxModes(2);
        // * Target player loses X life.
        this.getSpellAbility().addEffect(new LoseLifeTargetEffect(xValue));
View Full Code Here

        this.color.setBlack(true);

        // As an additional cost to cast Ichor Explosion, sacrifice a creature.
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
        // All creatures get -X/-X until end of turn, where X is the sacrificed creature's power.
        DynamicValue xValue = new IchorExplosionDynamicValue();
        this.getSpellAbility().addEffect(new BoostAllEffect(xValue, xValue, Duration.EndOfTurn, new FilterCreaturePermanent(), false, null, true));

    }
View Full Code Here

        this.expansionSetCode = "BNG";

        this.color.setGreen(true);

        // Target creature gets +X/+X until end of turn, where X is your devotion to green.
        DynamicValue greenDevotion = new DevotionCount(ColoredManaSymbol.G);
        Effect effect = new BoostTargetEffect(greenDevotion, greenDevotion, Duration.EndOfTurn, true);
        effect.setText("Target creature gets +X/+X until end of turn, where X is your devotion to green");
        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

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

        // You gain X life if {G} was spent to cast Dawnglow Infusion and X life if {W} was spent to cast it.
        DynamicValue xValue = new ManacostVariableValue();
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new GainLifeEffect(xValue),
                new ManaWasSpentCondition(ColoredManaSymbol.G), "You gain X life if {G} was spent to cast {this}"));
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new GainLifeEffect(xValue),
View Full Code Here

        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // Enchanted creature gets +X/+X, where X is the number of creature cards in your graveyard.
        DynamicValue value = new CardsInControllerGraveyardCount(new FilterCreatureCard());
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(value, value)));
    }
View Full Code Here

        this.expansionSetCode = "ISD";

        this.color.setGreen(true);

        // You gain 2 life for each creature card in your graveyard.
        DynamicValue value = new CardsInControllerGraveyardCount(new FilterCreatureCard(), 2);
        this.getSpellAbility().addEffect(new GainLifeEffect(value));

        // Flashback {2}{G}
        this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}"), TimingRule.INSTANT));
    }
View Full Code Here

        this.addAbility(ability);

        // When Raised by Wolves enters the battlefield, put two 2/2 green Wolf creature tokens onto the battlefield.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WolfToken(), 2)));
        // Enchanted creature gets +1/+1 for each Wolf you control.
        DynamicValue amountOfWolves = new PermanentsOnBattlefieldCount(filter);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amountOfWolves, amountOfWolves, Duration.WhileOnBattlefield)));
    }
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.