Package mage.abilities.effects.common

Examples of mage.abilities.effects.common.CreateTokenEffect.apply()


    }

    @Override
    public boolean apply(Game game, Ability source) {
        CreateTokenEffect effect =  new CreateTokenEffect(new TatsumaDragonToken());
        effect.apply(game, source);
        FixedTarget fixedTarget = new FixedTarget(effect.getLastAddedTokenId());
        DelayedTriggeredAbility delayedAbility = new TatsumaTheDragonsFangTriggeredAbility(fixedTarget);
        delayedAbility.setSourceId(source.getSourceId());
        delayedAbility.setControllerId(source.getControllerId());
        game.addDelayedTriggeredAbility(delayedAbility);
View Full Code Here


    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            CreateTokenEffect effect = new CreateTokenEffect(new MarduCharmWarriorToken(), 2);
            effect.apply(game, source);
            for (UUID tokenId :effect.getLastAddedTokenIds()) {
                Permanent token = game.getPermanent(tokenId);
                if (token != null) {
                    ContinuousEffect continuousEffect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
                    continuousEffect.setTargetPointer(new FixedTarget(tokenId));
View Full Code Here

            if (lessLife) {
                controller.gainLife(6, game);
            }
            if (lessCreatures) {
                Effect effect = new CreateTokenEffect(new SoldierToken(), 3);
                effect.apply(game, source);
            }
            return true;
        }
        return false;
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        if (new HelmOfKaldraCondition().apply(game, source)) {
            CreateTokenEffect effect = new CreateTokenEffect(new KaldraToken());
            effect.apply(game, source);
            UUID kaldraId = effect.getLastAddedTokenId();
            Permanent kaldra = game.getPermanent(kaldraId);
            if (kaldra != null) {
                // Attach helm to the token
                for (Permanent kaldrasHelm :game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterHelm, source.getControllerId(), game)) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.