Package mage.abilities.dynamicvalue

Examples of mage.abilities.dynamicvalue.DynamicValue


        cardType.add(CardType.CREATURE);
        color.setGreen(true);
        subtype.add("Elemental");
        power = new MageInt(0);
        toughness = new MageInt(0);
        DynamicValue controlledLands = new PermanentsOnBattlefieldCount(filterLands);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(controlledLands, controlledLands, Duration.WhileOnBattlefield)));
    }
View Full Code Here


        this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // Enchanted creature gets +1/+1 for each card in your hand.
        DynamicValue xValue = new CardsInControllerHandCount();
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(xValue, xValue, Duration.WhileOnBattlefield)));
    }
View Full Code Here

        // Domain - Until end of turn, creatures you control gain trample and get +1/+1 for each basic land type among lands you control.
        Effect effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("<i>Domain</i> - Until end of turn, creatures you control gain Trample");
        this.getSpellAbility().addEffect(effect);
        DynamicValue domain = new DomainValue();
        effect = new BoostControlledEffect(domain, domain, Duration.EndOfTurn, new FilterCreaturePermanent(), false);
        effect.setText(" and get +1/+1 for each basic land type among lands you control");
        this.getSpellAbility().addEffect(effect);

    }
View Full Code Here

        this.toughness = new MageInt(0);

        // Bestow {2}{B}{B}
        this.addAbility(new BestowAbility(this, "{2}{B}{B}"));
        // Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.
        DynamicValue graveCreatures = new CardsInAllGraveyardsCount(new FilterCreatureCard());
        Effect effect = new BoostSourceEffect(graveCreatures, graveCreatures, Duration.WhileOnBattlefield);
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        effect = new BoostEnchantedEffect(graveCreatures, graveCreatures, Duration.WhileOnBattlefield);
        ability.addEffect(effect);
        this.addAbility(ability);
View Full Code Here

        this.expansionSetCode = "TSP";

        this.color.setRed(true);

        // Conflagrate deals X damage divided as you choose among any number of target creatures and/or players.
        DynamicValue xValue = new ManacostVariableValue();
        this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue));       
       
        // Flashback-{R}{R}, Discard X cards.
        Ability ability = new FlashbackAbility(new ManaCostsImpl("{R}{R}"), TimingRule.SORCERY);
View Full Code Here

        // As Nyxathid enters the battlefield, choose an opponent.
        this.addAbility(new AsEntersBattlefieldAbility(new ChooseOpponent()));

        // Nyxathid gets -1/-1 for each card in the chosen player's hand.
        DynamicValue chosenPlayerHand = new SignInversionDynamicValue(new CardsInChosenPlayerHandCount());
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(chosenPlayerHand, chosenPlayerHand, Duration.WhileOnBattlefield)));

    }
View Full Code Here

        this.color.setBlack(true);

        // Sweep - Return any number of Swamps you control to their owner's hand. Target player discards a card for each Swamp returned this way.
        this.getSpellAbility().addEffect(new SweepEffect("Swamp"));
        DynamicValue sweepValue = new SweepNumber("Swamp", false);
        this.getSpellAbility().addEffect(new DiscardTargetEffect(sweepValue));
        this.getSpellAbility().addTarget(new TargetPlayer());
    }
View Full Code Here

        // Sacrifice a creature: Put X +1/+1 counters on Vish Kal, Blood Arbiter, where X is the sacrificed creature's power.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new SacrificeCostCreaturesPower(), true),
                new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"), false))));
        // Remove all +1/+1 counters from Vish Kal: Target creature gets -1/-1 until end of turn for each +1/+1 counter removed this way.
        DynamicValue removedCounters = new SignInversionDynamicValue(new VishKalBloodArbiterDynamicValue());
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(removedCounters, removedCounters, Duration.EndOfTurn), new VishKalBloodArbiterCost(CounterType.P1P1.createInstance()));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);

    }
View Full Code Here

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

        // Fire Covenant deals X damage divided as you choose among any number of target creatures.
        DynamicValue xValue = new GetXValue();
        this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
        this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(xValue));
    }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        DynamicValue value = new CardsInControllerGraveyardCount();
        if (player != null) {
            player.gainLife(value.calculate(game, source, this) * 2, game);
            player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
            player.getGraveyard().clear();
            player.shuffleLibrary(game);
            return true;
        }
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.