Package mage.game

Examples of mage.game.ExileZone


        super(ability);
    }

    @Override
    public boolean checkInterveningIfClause(Game game) {
        ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, this.getSourceId()));       
        return exileZone != null && exileZone.getCards(game).size() > 0;
    }
View Full Code Here


class GrinningTotemYouHaveNotPlayedCondition implements Condition {

    @Override
    public boolean apply(Game game, Ability source) {
        ExileZone zone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source));
        return zone.getCards(game).size() > 0;
    }
View Full Code Here

    }
   
    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        ExileZone zone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source));
        if (controller != null && zone != null) {
            for (Card card : zone.getCards(game)) {
                controller.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.EXILED);
            }
            return true;
        }
        return false;
View Full Code Here

                if (card != null) {
                    cardName = card.getName();
                }
            }
            if (!cardName.isEmpty()) {
                ExileZone searchTheCityExileZone = game.getExile().getExileZone(this.getSourceId());
                FilterCard filter = new FilterCard();
                filter.add(new NamePredicate(cardName));
               
                if (searchTheCityExileZone.count(filter, game) > 0) {
                    this.getEffects().get(0).setValue("cardName",cardName);
                    return true;
                }
            }
        }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        String cardName = (String) this.getValue("cardName");
        ExileZone searchTheCityExileZone = game.getExile().getExileZone(source.getSourceId());
        if (cardName != null && searchTheCityExileZone != null) {
            for (Card card :searchTheCityExileZone.getCards(game)) {
                if (card.getName().equals(cardName)) {
                    if (card.moveToZone(Zone.HAND, source.getSourceId(), game, true)) {
                        game.informPlayers("Search the City: put " + card.getName() + " into owner's hand");
                    }
                    searchTheCityExileZone.remove(card);
                    if (searchTheCityExileZone.isEmpty()) {
                        Permanent permanent = game.getPermanent(source.getSourceId());
                        if (permanent != null) {
                            permanent.sacrifice(source.getSourceId(), game);
                            // extra turn
                            game.getState().getTurnMods().add(new TurnMod(source.getControllerId(), false));
View Full Code Here

            return new EndlessHorizonsEffect2(this);
        }

        @Override
        public boolean apply(Game game, Ability source) {
            ExileZone exZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source));
            if (exZone != null) {
                for (Card card : exZone.getCards(game)) {
                    if (card.getOwnerId() == source.getControllerId()) {
                        card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
                        break; // only one
                    }
                }
View Full Code Here

        return new AngelOfSerenityLeaveEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        ExileZone exZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source));
        if (exZone != null) {
            for (Card card : exZone.getCards(game)) {
                if (card != null) {
                    card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
                }
            }
            return true;
View Full Code Here

        for (Permanent dragon : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
            if (dragon != null) {
                dragon.sacrifice(source.getSourceId(), game);
            }
        }
        ExileZone exile = game.getExile().getExileZone(exileId);
        if (exile != null) {
            exile = exile.copy();
            for (UUID cardId : exile) {
                Card card = game.getCard(cardId);
                card.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), source.getControllerId());
            }
            game.getExile().getExileZone(exileId).clear();
View Full Code Here

        return new FlickerformReturnEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        ExileZone exileZone = game.getExile().getExileZone(exileZoneId);
        Card enchantedCard = exileZone.get(enchantedCardId, game);
        if (enchantedCard != null) {
            enchantedCard.putOntoBattlefield(game, Zone.EXILED, source.getSourceId(), enchantedCard.getOwnerId());
            Permanent newPermanent = game.getPermanent(enchantedCardId);
            if (newPermanent != null) {
                for(Card enchantment : exileZone.getCards(game)) {
                    if (filterAura.match(enchantment, game)) {
                        boolean canTarget = false;
                        for (Target target : enchantment.getSpellAbility().getTargets()) {
                            Filter filter = target.getFilter();
                            if (filter.match(newPermanent, game)) {
View Full Code Here

TOP

Related Classes of mage.game.ExileZone

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.