Examples of canTransform()


Examples of mage.cards.Card.canTransform()

                    if (object != null) {
                        stack.put(stackObject.getId(), new StackAbilityView(game, (StackAbility)stackObject, card.getName(), new CardView(card)));
                    } else {
                        stack.put(stackObject.getId(), new StackAbilityView(game, (StackAbility)stackObject, "", new CardView(card)));
                    }
                    if (card.canTransform()) {
                        updateLatestCardView(game, card, stackObject.getId());
                    }
                    checkPaid(stackObject.getId(), (StackAbility)stackObject);
                } else if (object != null) {
                    if (object instanceof PermanentToken) {
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            if (permanent.canTransform()) {
                // check not to transform twice the same side
                if (permanent.isTransformed() != fromDayToNight) {
                    if (withoutTrigger) {                       
                        permanent.setTransformed(fromDayToNight);
                    } else {
View Full Code Here

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

    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            Cost cost = new ManaCostsImpl("{2}{B}{B}");
            if (cost.pay(source, game, permanent.getControllerId(), permanent.getControllerId(), false)) {
                if (permanent.canTransform()) {
                    permanent.setTransformed(!permanent.isTransformed());
                }
            }
            return true;
        }
View Full Code Here

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

    }

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null && permanent.canTransform()) {
            if (permanent.transform(game)) {
                Permanent attachTo = game.getPermanent(targetPointer.getFirst(game, source));
                if (attachTo != null) {
                    return attachTo.addAttachment(source.getSourceId(), game);
                }
View Full Code Here

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

    public boolean apply(Game game, Ability source) {
        Card card = game.getCard(cardId);
        if (card != null) {
            card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId());
            Permanent perm = game.getPermanent(cardId);
            if (perm != null && perm.canTransform()) {
                perm.transform(game);
                return true;
            }
        }
        return false;
View Full Code Here

Examples of mage.game.permanent.PermanentCard.canTransform()

        boolean exists = true;
        if (!object.getAbilities().contains(ability)) {
            exists = false;
            if (object instanceof PermanentCard) {
                PermanentCard permanent = (PermanentCard)object;
                if (permanent.canTransform() && event.getType() == GameEvent.EventType.TRANSFORMED) {
                    exists = permanent.getCard().getAbilities().contains(ability);
                }
            }
        }
        return exists;
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.