Examples of changeControllerId()


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

        Set<UUID> toRemove = new HashSet<UUID>();
        for (UUID creatureId :objects) {
            Permanent creature = game.getPermanent(creatureId);
            if (creature != null) {
                if (!creature.getControllerId().equals(creature.getOwnerId())) {
                    creature.changeControllerId(creature.getOwnerId(), game);
                }
            } else {
                toRemove.add(creatureId);
            }
        }
View Full Code Here

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

    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        Player player = game.getPlayer(game.getActivePlayerId());
        if (player != null && permanent != null) {
            permanent.untap(game);
            if (permanent.changeControllerId(player.getId(), game)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            return permanent.changeControllerId(source.getFirstTarget(), game);
        }
        return false;
    }

}
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            return permanent.changeControllerId(source.getFirstTarget(), game);
        }
        return false;
    }

}
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
        if (permanent != null && controllerId != null) {
            return permanent.changeControllerId(controllerId, game);
        }
        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.