Package mage.abilities.dynamicvalue

Examples of mage.abilities.dynamicvalue.DynamicValue


        // As an additional cost to cast Hatred, pay X life.
        this.getSpellAbility().addCost(new PayVariableLifeCost(true));

        // Target creature gets +X/+0 until end of turn.
        DynamicValue xValue = new GetXValue();
        this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, new StaticValue(0), Duration.EndOfTurn));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here


        // Flying
        this.addAbility(FlyingAbility.getInstance());

        // Whenever Scourge of Valkas or another Dragon enters the battlefield under your control, it deals X damage to target creature or player, where X is the number of Dragons you control.
        DynamicValue dragons = new PermanentsOnBattlefieldCount(filter2);
        Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(dragons), filter, false, rule);
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);

        // {R}: Scourge of Valkas gets +1/+0 until end of turn.
View Full Code Here

        this.expansionSetCode = "MOR";
        this.subtype.add("Soldier");
        this.subtype.add("Equipment");

        // Equipped creature has "Whenever this creature attacks or blocks, it gets +1/+1 until end of turn for each attacking creature."
        DynamicValue attackingCreatures = new AttackingCreatureCount("attacking creature");
        Ability gainedAbility = new AttacksOrBlocksTriggeredAbility(new BoostSourceEffect(attackingCreatures,attackingCreatures, Duration.EndOfTurn),false);
        Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT);
        effect.setText("Equipped creature has \"Whenever this creature attacks or blocks, it gets +1/+1 until end of turn for each attacking creature.\"");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        this.addAbility(ability);
View Full Code Here

        this.color.setBlack(true);

        // As an additional cost to cast Call for Blood, sacrifice a creature.
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
        // Target creature gets -X/-X until end of turn, where X is the sacrificed creature's power.
        DynamicValue xValue = new CallForBloodDynamicValue();
        this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());

    }
View Full Code Here

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

        DynamicValue value = new OpponentsPoisonCountersCount();
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(value, value, Duration.WhileOnBattlefield)));
    }
View Full Code Here

        this.expansionSetCode = "AVR";

        this.color.setBlack(true);

        // Target creature gets -X/-X until end of turn.
        DynamicValue x = new SignInversionDynamicValue(new ManacostVariableValue());
        this.getSpellAbility().addEffect(new BoostTargetEffect(x, x, Duration.EndOfTurn, true));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

        this.toughness = new MageInt(4);

        // Reach
        this.addAbility(ReachAbility.getInstance());
        // {3}{B}: Graverobber Spider gets +X/+X until end of turn, where X is the number of creature cards in your graveyard. Activate this ability only once each turn.
        DynamicValue xValue = new CardsInControllerGraveyardCount(new FilterCreatureCard("creature cards"));
        Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(xValue, xValue, Duration.EndOfTurn, true), new ManaCostsImpl("{3}{B}"));
        this.addAbility(ability);
    }
View Full Code Here

        // You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield.
        this.addAbility(new ChancellorAbility(new ChancellorOfTheForgeDelayedTriggeredAbility(), abilityText));

        // When Chancellor of the Forge enters the battlefield, put X 1/1 red Goblin creature tokens with haste onto the battlefield, where X is the number of creatures you control.
        DynamicValue value = new PermanentsOnBattlefieldCount(filter);
        this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinToken(), value), false));
    }
View Full Code Here

        this.expansionSetCode = "ISD";
        this.subtype.add("Wurm");
        this.color.setGreen(true);

        // Boneyard Wurm's power and toughness are each equal to the number of creature cards in your graveyard.
        DynamicValue value = new CardsInControllerGraveyardCount(new FilterCreatureCard());
        this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame)));
    }
View Full Code Here

        this.expansionSetCode = "JOU";

        this.color.setGreen(true);

        // Constellation - Whenever Strength from the Fallen or another entchantment enters the battlefield under your control, target creature gets +X/+X until end of turn, where X is the number of creature cards in your graveyard.
        DynamicValue xValue = new CardsInControllerGraveyardCount(new FilterCreatureCard("creature cards"));
        Ability ability = new ConstellationAbility(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);

    }
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.