Examples of assignNewId()


Examples of mage.cards.Card.assignNewId()

    }

    @Override
    public Card copyCard(Card cardToCopy, Ability source, UUID newController) {
        Card copiedCard = cardToCopy.copy();
        copiedCard.assignNewId();
        copiedCard.setControllerId(newController);
        copiedCard.setCopy(true);
        Set<Card> cards = new HashSet<>();
        cards.add(copiedCard);
        loadCards(cards, source.getControllerId());
View Full Code Here

Examples of mage.cards.Card.assignNewId()

        if (card == null || permanent == null) {
            return false;
        }
        card.moveToExile(null, "Dimir Doppelganger", source.getSourceId(), game);
        Card cardToCopy = card.copy();
        cardToCopy.assignNewId();
        permanent.setName(cardToCopy.getName());
        permanent.getPower().setValue(cardToCopy.getPower().getValue());
        permanent.getToughness().setValue(cardToCopy.getToughness().getValue());
        permanent.getColor().setColor(cardToCopy.getColor());
        permanent.getManaCost().clear();
View Full Code Here

Examples of mage.game.command.Emblem.assignNewId()

        if (toPlayerId == null) {
            newEmblem.setControllerId(source.getControllerId());
        } else {
            newEmblem.setControllerId(toPlayerId);
        }
        newEmblem.assignNewId();
        newEmblem.getAbilities().newId();
        for (Ability ability : newEmblem.getAbilities()) {
            ability.setSourceId(newEmblem.getId());
        }
        state.addCommandObject(newEmblem);
View Full Code Here

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

        //getState().addCard(permanent);
        permanent.reset(this);
        if (copyFromPermanent.isMorphCard() && copyFromPermanent.isFaceDown()) {
            MorphAbility.setPermanentToMorph(permanent);
        }
        permanent.assignNewId();
        if (copyFromPermanent.isTransformed()) {
            TransformAbility.transform(permanent, copyFromPermanent.getSecondCardFace(), this);
        }
        applier.apply(this, permanent);
View Full Code Here

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

    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
        Permanent perm = game.getPermanent(source.getSourceId());
        if (perm != null) {
            perm = perm.copy();
            perm.reset(game);
            perm.assignNewId();
            game.addEffect(new EssenceOfTheWildCopyEffect(perm, event.getTargetId()), source);
        }
        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.