Package mage.game.permanent

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


    @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

        @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

    @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

    @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

    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

    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, "Ashes to Ashes", source.getSourceId(), game);
            }
        }
        return true;
    }
}
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            if (permanent.moveToExile(source.getSourceId(), "Argent Sphinx 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

    @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

    @Override
    public boolean apply(Game game, Ability source) {
        for(UUID targetId : this.getTargetPointer().getTargets(game, source)) {
            Permanent creature = game.getPermanent(targetId);
            if (creature != null) {
                if (creature.moveToExile(null, null, source.getSourceId(), game)) {
                    CurseOfTheSwineBoarToken swineToken = new CurseOfTheSwineBoarToken();
                    swineToken.putOntoBattlefield(1, game, source.getSourceId(), creature.getControllerId());
                }
            }
        }
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.