Package mage.players

Examples of mage.players.Player.cast()


                    TargetCardInExile target = new TargetCardInExile(filter, source.getSourceId());
                    while (player.choose(Outcome.PlayForFree, game.getExile().getExileZone(source.getSourceId()), target, game)) {
                        Card card = game.getCard(target.getFirstTarget());
                        if (card != null && !card.getId().equals(spell.getSourceId())) {
                            game.getExile().removeCard(card, game);
                            return player.cast(card.getSpellAbility(), game, true);
                        }
                        target.clearChosen();
                    }
                }
                return true;
View Full Code Here


            TargetCardInExile target = new TargetCardInExile(new FilterCard(), CardUtil.getCardExileZoneId(game, source));
            if (controller.choose(Outcome.PlayForFree, game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)), target, game)) {
                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {
                    game.getExile().removeCard(card, game);
                    return controller.cast(card.getSpellAbility(), game, true);
                }
            }
        }
        return false;
    }
View Full Code Here

                    card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId());
                    return sourceCard.moveToZone(Zone.HAND, source.getSourceId(), game, false);
                }
            } else {
                if (controller.chooseUse(outcome, new StringBuilder("Cast ").append(card.getName()).append(" without paying its mana cost?").toString(), game)) {
                    return controller.cast(card.getSpellAbility(), game, true);
                }
            }
            return true;
        }
        return false;
View Full Code Here

        if (card != null) {
            Player controller = game.getPlayer(source.getControllerId());
            if (controller != null) {
                SpellAbility spellAbility = card.getSpellAbility();
                spellAbility.clear();
                return controller.cast(spellAbility, game, true);
            }
        }
        return false;
    }
}
View Full Code Here

            player.revealCards("Wild Evocation", cards, game);
            if (card.getCardType().contains(CardType.LAND)) {
                card.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), player.getId());
            }
            else {
                player.cast(card.getSpellAbility(), game, true);
            }
            return true;
        }
        return false;
    }
View Full Code Here

            }

            boolean castCardOne = true;
            if (cardOne != null && you.chooseUse(Outcome.Neutral, "Cast the copy of " + cardOne.getName() + " first?", game)) {
                Card copyOne = game.copyCard(cardOne, source, you.getId());
                you.cast(copyOne.getSpellAbility(), game, true);
                castCardOne = false;
            }
            if (cardTwo != null) {
                Card copyTwo = game.copyCard(cardTwo, source, you.getId());
                you.cast(copyTwo.getSpellAbility(), game, true);
View Full Code Here

                you.cast(copyOne.getSpellAbility(), game, true);
                castCardOne = false;
            }
            if (cardTwo != null) {
                Card copyTwo = game.copyCard(cardTwo, source, you.getId());
                you.cast(copyTwo.getSpellAbility(), game, true);
            }
            if (cardOne != null && castCardOne) {
                Card copyOne = game.copyCard(cardOne, source, you.getId());
                you.cast(copyOne.getSpellAbility(), game, true);
            }
View Full Code Here

                Card copyTwo = game.copyCard(cardTwo, source, you.getId());
                you.cast(copyTwo.getSpellAbility(), game, true);
            }
            if (cardOne != null && castCardOne) {
                Card copyOne = game.copyCard(cardOne, source, you.getId());
                you.cast(copyOne.getSpellAbility(), game, true);
            }
            return true;
        }
        return false;
    }
View Full Code Here

                        used = true;
                        player.playLand(card, game);
                    }
                } else {
                    used = true;
                    player.cast(card.getSpellAbility(), game, true);
                }
            }

            if (!used) {
                card.moveToZone(Zone.EXILED, source.getSourceId(), game, false);
View Full Code Here

                    } else {
                        cancel = true;
                    }
                }
                if (cardToCast != null) {
                    controller.cast(cardToCast.getSpellAbility(), game, true);
                }
            }
            return true;
        }
        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.