Examples of changeControllerId()


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

            if (permanent == null || permanent.getZoneChangeCounter() != entry.getValue()) {
                // controll effect cease if the same permanent is no longer on the battlefield
                toDelete.add(entry.getKey());
                continue;
            }
            permanent.changeControllerId(lockedControllers.get(permanent.getId()), game);
        }
        if (!toDelete.isEmpty()) {
            for (UUID uuid : toDelete) {
                zoneChangeCounter.remove(uuid);
            }
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

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(this.getTargetPointer().getFirst(game, source), game);
        }
        return false;
    }

}
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getFirstTarget());
        Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (player != null && permanent != null) {
            return permanent.changeControllerId(player.getId(), game);
        }
        return false;
    }
}
View Full Code Here

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

                Card card = game.getCard(target.getFirstTarget());
                if (card != null && player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId())) {
                    // why is this change of controller neccessary?
                    Permanent permanent = game.getPermanent(card.getId());
                    if (permanent != null) {
                        permanent.changeControllerId(source.getControllerId(), game);
                    }
                   
                    ContinuousEffectImpl effect = new AshiokNightmareWeaverAddTypeEffect();
                    effect.setTargetPointer(new FixedTarget(card.getId()));
                    game.addEffect(effect, source);
View Full Code Here

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()

        Permanent permanent = game.getPermanent(source.getFirstTarget());
        if (permanent != null) {
            switch (layer) {
                case ControlChangingEffects_2:
                    if (sublayer == SubLayer.NA) {
                        permanent.changeControllerId(source.getControllerId(), game);
                    }
                    break;
                case TypeChangingEffects_4:
                    if (sublayer == SubLayer.NA) {
                        permanent.getSubtype().add("Vampire");
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(this.getTargetPointer().getFirst(game, source), game);
        }
        return false;
    }

}
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
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.