Package mage.game.permanent

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


    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

    }

    @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

    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

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.