Package mage.game.permanent

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


            }
            for (UUID creatureId: creaturesToReturn) {
                Permanent creature = game.getPermanent(creatureId);
                if (creature != null) {
                    playersToShuffle.add(creature.getControllerId());
                    creature.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
                }
            }
            for (UUID playerId: playersToShuffle){
                Player player = game.getPlayer(playerId);
                if (player != null) {
View Full Code Here


    public boolean apply(Game game, Ability source) {
        Permanent target = game.getPermanent(source.getFirstTarget());
        if (target != null) {
            if (target.getColor().contains(ObjectColor.RED)
                    || target.getColor().contains(ObjectColor.GREEN)) {
                applied = target.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
            } else {
                applied = target.moveToZone(Zone.HAND, source.getSourceId(), game, false);
            }
        }
        return applied;
View Full Code Here

        if (target != null) {
            if (target.getColor().contains(ObjectColor.RED)
                    || target.getColor().contains(ObjectColor.GREEN)) {
                applied = target.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
            } else {
                applied = target.moveToZone(Zone.HAND, source.getSourceId(), game, false);
            }
        }
        return applied;
    }
}
View Full Code Here

    public boolean apply(Game game, Ability source) {
        boolean result = false;

        Permanent permanent = game.getPermanent(source.getFirstTarget());
        if (permanent != null) {
            result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
        }
        permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (permanent != null) {
            result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
        }
View Full Code Here

        if (permanent != null) {
            result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
        }
        permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (permanent != null) {
            result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
        }

        return result;
    }
}
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (permanent != null) {
            return permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
        }
        return false;
    }
}
View Full Code Here

    public boolean apply(Game game, Ability source) {
        boolean result = false;

        Permanent permanent = game.getPermanent(source.getFirstTarget());
        if (permanent != null) {
            result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
        }
        permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (permanent != null) {
            result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
        }
View Full Code Here

        if (permanent != null) {
            result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
        }
        permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (permanent != null) {
            result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
        }

        return result;
    }
}
View Full Code Here

            Permanent permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
            if (permanent != null && permanent.getAttachedTo() != null)
            {
                Permanent enchantedCreature = game.getPermanent(permanent.getAttachedTo());
                if (enchantedCreature != null) {
                    return enchantedCreature.moveToZone(Zone.HAND, source.getSourceId(), game, false);
                }
            }       
            return false;
        }
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
        if (permanent != null) {
            if (permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true) ) {
                game.getPlayer(permanent.getOwnerId()).shuffleLibrary(game);
                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.