Examples of changeControllerId()


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

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

    @Override
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;
    }

    @Override
View Full Code Here

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

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

    @Override
View Full Code Here

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

        Permanent permanent = game.getPermanent(source.getFirstTarget());
        if (targetPointer != null) {
            permanent = game.getPermanent(targetPointer.getFirst(game, source));
        }
        if (permanent != null) {
            return permanent.changeControllerId(controller, game);
        }
        return false;
    }

    @Override
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));
        UUID controllerId = (UUID) game.getState().getValue(source.getSourceId().toString());
        if (permanent != null && controllerId != null) {
            return permanent.changeControllerId(controllerId, game);
        }
        return false;
    }

    @Override
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        for (UUID permanentId : this.permanents) {
            Permanent permanent = game.getPermanent(permanentId);
            if (permanent != null) {
                permanent.changeControllerId(source.getControllerId(), game);
            }
        }
        return true;
    }
   
View Full Code Here

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

    public boolean apply(Game game, Ability source) {
        UUID controllerId = source.getTargets().get(0).getFirstTarget();
        Player controller = game.getPlayer(controllerId);
        Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (controller != null && permanent != null) {
            permanent.changeControllerId(controllerId, game);
        } else {
            this.discard();
        }
        return true;
    }
View Full Code Here

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

        Permanent permanent = game.getPermanent(source.getFirstTarget());
        if (targetPointer != null) {
            permanent = game.getPermanent(targetPointer.getFirst(game, source));
        }
        if (permanent != null) {
            return permanent.changeControllerId(controller, game);
        }
        return false;
    }

    @Override
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
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.