Examples of untap()


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

        Permanent target = game.getPermanent(targetPointer.getFirst(game, source));
        Player player = game.getPlayer(source.getControllerId());
        if (target != null && player != null) {
            if (target.isTapped()) {
                if (player.chooseUse(Outcome.Untap, "Untap that permanent?", game)) {
                    target.untap(game);
                }
            } else {
                if (player.chooseUse(Outcome.Tap, "Tap that permanent?", game)) {
                    target.tap(game);
                }
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
                permanent.untap(game);
                return true;
        }
        return false;
    }
View Full Code Here

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

        if (target.canChoose(source.getControllerId(), game)) {
            if (target.choose(Outcome.Untap, source.getControllerId(), source.getSourceId(), game)) {
                for (Object targetId : target.getTargets()) {
                    Permanent p = game.getPermanent((UUID) targetId);
                    if (p.isTapped())
                        p.untap(game);
                }
            }
        }
        return false;
    }
View Full Code Here

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

                            manaCostsToReduce.load("{1}");
                            CardUtil.reduceCost((SpellAbility)ability, manaCostsToReduce);
                        }
                        if (costBefore == ability.getManaCostsToPay().convertedManaCost()) {
                            // creature could not reduce mana costs so tap must be reverted
                            perm.untap(game);
                        } else {
                            game.informPlayers("Convoke: " + player.getName() + " taps " + perm.getLogName() + " to reduce mana costs by " + manaCostsToReduce.getText());
                        }
                    }
                }
View Full Code Here

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

        if (target.choose(Outcome.Untap, controllerId, sourceId, game)) {
            for (UUID targetId: (List<UUID>)target.getTargets()) {
                Permanent permanent = game.getPermanent(targetId);
                if (permanent == null)
                    return false;
                paid |= permanent.untap(game);
            }
        }
        return paid;
    }
View Full Code Here

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

    @Override
    public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
        Permanent permanent = game.getPermanent(sourceId);
        if (permanent != null) {
            paid = permanent.untap(game);
        }
        return paid;
    }

    @Override
View Full Code Here

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

    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            Permanent attach = game.getPermanent(permanent.getAttachedTo());
            if (attach != null) {
                attach.untap(game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        for (UUID target: targetPointer.getTargets(game, source)) {
            Permanent permanent = game.getPermanent(target);
            if (permanent != null) {
                permanent.untap(game);
            }
        }
        return true;
    }
View Full Code Here

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

            if (!target.getTargets().isEmpty()) {
                List<UUID> targets = target.getTargets();
                for (UUID targetId : targets) {
                    Permanent permanent = game.getPermanent(targetId);
                    if (permanent != null) {
                        permanent.untap(game);
                    }
                }
            }
            return true;
        }
View Full Code Here

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

    @Override
    public boolean applies(Permanent permanent, Ability source, Game game) {
        if (permanent.getId().equals(targetPointer.getFirst(game, source))) {
            Permanent blocker = game.getPermanent(source.getFirstTarget());
            if (blocker != null && blocker.isTapped()) {
                blocker.untap(game);
                if (blocker.canBlock(source.getSourceId(), game)) {
                    return true;
                }
            }
        }
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.