Package mage.abilities.keyword

Examples of mage.abilities.keyword.FlashbackAbility


        // Each instant and sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost.
        this.getSpellAbility().addEffect(new PastInFlamesEffect());

        // Flashback {4}{R}
        this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{R}"), TimingRule.SORCERY));

    }
View Full Code Here


        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            for (UUID cardId: player.getGraveyard()) {
                if (objects.contains(cardId)) {
                    Card card = game.getCard(cardId);
                    FlashbackAbility ability = null;
                    if (card.getCardType().contains(CardType.INSTANT)) {
                        ability = new FlashbackAbility(card.getManaCost(), TimingRule.INSTANT);
                    }
                    else if (card.getCardType().contains(CardType.SORCERY)) {
                        ability = new FlashbackAbility(card.getManaCost(), TimingRule.SORCERY);
                    }
                    if (ability != null) {
                        ability.setSourceId(cardId);
                        ability.setControllerId(card.getOwnerId());
                        game.getState().addOtherAbility(cardId, ability);
                    }
                }
            }
            return true;
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Card card = game.getCard(targetPointer.getFirst(game, source));
        if (card != null) {
            FlashbackAbility ability;
            if (card.getCardType().contains(CardType.INSTANT)) {
                ability = new FlashbackAbility(card.getManaCost(), TimingRule.INSTANT);
            }
            else {
                ability = new FlashbackAbility(card.getManaCost(), TimingRule.SORCERY);
            }
            ability.setSourceId(card.getId());
            ability.setControllerId(card.getOwnerId());
            game.getState().addOtherAbility(card.getId(), ability);
            return true;
        }
        return false;
    }
View Full Code Here

        // Put target creature on top of its owner's library.
        this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());

        // Flashback {7}{U}
        this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{U}"), TimingRule.SORCERY));
    }
View Full Code Here

        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new BoostTargetEffect(3, 0, Duration.EndOfTurn));
        this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
       
        // Flashback {2}{R}
        this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{R}"), TimingRule.INSTANT));
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Card card = game.getCard(targetPointer.getFirst(game, source));
        if (card != null) {
            FlashbackAbility ability;
            if (card.getCardType().contains(CardType.INSTANT)) {
                ability = new FlashbackAbility(card.getManaCost(), TimingRule.INSTANT);
            }
            else {
                ability = new FlashbackAbility(card.getManaCost(), TimingRule.SORCERY);
            }
            ability.setSourceId(card.getId());
            ability.setControllerId(card.getOwnerId());
            game.getState().addOtherAbility(card.getId(), ability);
            return true;
        }
        return false;
    }
View Full Code Here

        // Flashback-{1}{U}, Pay 3 life.
        CostsImpl costs = new CostsImpl();
        costs.add(new ManaCostsImpl("{1}{U}"));
        costs.add(new PayLifeCost(3));
        this.addAbility(new FlashbackAbility(costs, TimingRule.SORCERY));
    }
View Full Code Here

        this.color.setGreen(true);

        // Prevent all combat damage that would be dealt this turn.
        this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
        // Flashback {2}{G}
        this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}"), TimingRule.INSTANT));
    }
View Full Code Here

        // Put a 4/4 green Beast creature token onto the battlefield.
        this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken_44()));
       
        // Flashback {2}{G}{G}{G}
        this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}{G}{G}"), TimingRule.INSTANT));
    }
View Full Code Here

        this.color.setGreen(true);

        // Put a 3/3 green Elephant creature token onto the battlefield.
        this.getSpellAbility().addEffect(new CreateTokenEffect(new ElephantToken()));
        // Flashback {6}{G}{G}
        this.addAbility(new FlashbackAbility(new ManaCostsImpl("{6}{G}{G}"), TimingRule.INSTANT));
    }
View Full Code Here

TOP

Related Classes of mage.abilities.keyword.FlashbackAbility

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.