Examples of moveToExile()


Examples of mage.game.permanent.Permanent.moveToExile()

    @Override
    public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
        Permanent permanent = game.getPermanent(sourceId);
        if (permanent != null) {
            paid = permanent.moveToExile(null, "", sourceId, game);
        }
        return paid;
    }

    @Override
View Full Code Here

Examples of mage.game.permanent.Permanent.moveToExile()

    public boolean apply(Game game, Ability source) {
        Permanent equipment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
        if (equipment != null && equipment.getAttachedTo() != null) {
            Permanent creature = game.getPermanent(equipment.getAttachedTo());
            if (creature != null) {
                return creature.moveToExile(null, "", source.getSourceId(), game);
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.game.permanent.Permanent.moveToExile()

            if (target instanceof TargetCreaturePermanent) {
                Permanent targetCreature = game.getPermanent(target.getFirstTarget());
                if (targetCreature != null && !targetCreature.getControllerId().equals(source.getControllerId())) {
                    int amountLife = targetCreature.getPower().getValue();
                    Player controller = game.getPlayer(targetCreature.getControllerId());
                    targetCreature.moveToExile(null, null, source.getSourceId(), game);
                    if (controller != null && amountLife != 0) {
                        controller.gainLife(amountLife, game);
                    }
                }
            }
View Full Code Here

Examples of mage.game.permanent.Permanent.moveToExile()

    public boolean apply(Game game, Ability source) {
        Permanent creature = game.getPermanent(source.getFirstTarget());
        if (creature != null) {
            if (creature.hasSubtype("Zombie")) {
                creature.tap(game);
                creature.moveToExile(source.getSourceId(), creature.getName(), source.getSourceId(), game);
            } else {
                creature.tap(game);
            }
            return true;
        }
View Full Code Here

Examples of mage.game.permanent.Permanent.moveToExile()

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent sourcePermanent = game.getPermanent(source.getSourceId());
        Permanent targetPermanent = game.getPermanent(targetPointer.getFirst(game, source));
        if (sourcePermanent != null && targetPermanent != null) {
            targetPermanent.moveToExile(getId(), sourcePermanent.getLogName() + " (Imprint)", source.getSourceId(), game);
            sourcePermanent.imprint(targetPermanent.getId(), game);
        }
        return true;
    }
View Full Code Here

Examples of mage.game.permanent.Permanent.moveToExile()

        @Override
        public boolean replaceEvent(GameEvent event, Ability source, Game game) {
                Permanent permanent = ((ZoneChangeEvent)event).getTarget();
                if (permanent != null) {
                    return permanent.moveToExile(null, "", source.getSourceId(), game);
                }
                return false;
        }

        @Override
View Full Code Here

Examples of mage.game.permanent.Permanent.moveToExile()

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getFirstTarget());
        if (permanent != null) {
            if (permanent.moveToExile(source.getSourceId(), "Mistmeadow Witch Exile", source.getSourceId(), game)) {
                //create delayed triggered ability
                AtEndOfTurnDelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
                delayedAbility.setSourceId(source.getSourceId());
                delayedAbility.setControllerId(source.getControllerId());
                game.addDelayedTriggeredAbility(delayedAbility);
View Full Code Here

Examples of mage.game.permanent.Permanent.moveToExile()

    @Override
    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
        Permanent permanent = ((ZoneChangeEvent)event).getTarget();
        if (permanent != null) {
            permanent.moveToExile(null, "", source.getSourceId(), game);
            new AddExtraTurnControllerEffect().apply(game, source);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.game.permanent.Permanent.moveToExile()

    public boolean apply(Game game, Ability source) {
        UUID exileId = source.getSourceId();
        for (UUID permanentId : targetPointer.getTargets(game, source)) {
            Permanent target = game.getPermanent(permanentId);
            if (target != null) {
                target.moveToExile(exileId, "Ghostly Flicker", source.getSourceId(), game);
                Card card = game.getCard(target.getId());
                if (card != null) {
                    Zone currentZone = game.getState().getZone(card.getId());
                    card.putOntoBattlefield(game, currentZone, source.getSourceId(), source.getControllerId());
                }
View Full Code Here

Examples of mage.game.stack.Spell.moveToExile()

            for (UUID targetId: targets.get(0).getTargets()) {
                Spell spellToExile = game.getStack().getSpell(targetId);
                if (spellToExile == null) {
                    return false;
                }
                paid |= spellToExile.moveToExile(null, "", ability.getSourceId(), game);
                if (paid) {
                    game.informPlayers(player.getName() + " exiles " + spellToExile.getName() +" (as costs)");
                }
            }
        }
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.