Package mage.cards

Examples of mage.cards.Card.cast()


        Card card = game.getCard(ability.getSourceId());
        if (card != null) {
            if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, ability.getId(), ability.getSourceId(), playerId))) {
                int bookmark = game.bookmarkState();
                Zone fromZone = game.getState().getZone(card.getId());
                card.cast(game, fromZone, ability, playerId);
                Spell spell = game.getStack().getSpell(ability.getId());
                // some effects set sourceId to cast without paying mana costs
                if (ability.getSourceId().equals(getCastSourceIdWithoutMana())) {
                    noMana = true;
                }
View Full Code Here


    public boolean apply(Game game, Ability source) {
        Card target = (Card) game.getObject(targetPointer.getFirst(game, source));
        if (target != null) {
            Player controller = game.getPlayer(target.getOwnerId());
            if (controller != null) {
                return target.cast(game, Zone.GRAVEYARD, target.getSpellAbility(), controller.getId());
            }
        }
        return false;
    }
}
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.