Examples of untap()


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

                for (UUID targetId : source.getTargets().get(0).getTargets()) {
                    Permanent permanent = game.getPermanent(targetId);
                    if (permanent != null) {
                        if (permanent.isTapped()) {
                            if (player.chooseUse(Outcome.Untap, new StringBuilder("Untap ").append(permanent.getName()).append("?").toString(), game)) {                               
                                permanent.untap(game);
                            }
                        } else {
                            if (player.chooseUse(Outcome.Tap, new StringBuilder("Tap ").append(permanent.getName()).append("?").toString(), game)) {
                                permanent.tap(game);
                            }
View Full Code Here

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

                if (permanent != null) {
                    if (i==1) {
                        permanent.tap(game);
                    }
                    if (i==2) {
                        permanent.untap(game);
                    }
                }
            }
            return true;
        }
View Full Code Here

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

    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
        Player player = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null && permanent != null) {
            if (player.chooseUse(Outcome.Untap, "Skip your turn to untap " + permanent.getName() + "?", game)) {
                permanent.untap(game);
                game.informPlayers(player.getName() + " skips his or her turn to untap " + permanent.getLogName());
                return true;
            }
        }
        return false;
View Full Code Here

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

        if (watcher != null && watcher instanceof AttackedThisTurnWatcher) {
            Set<UUID> attackedThisTurn = ((AttackedThisTurnWatcher) watcher).getAttackedThisTurnCreatures();
            for (UUID uuid : attackedThisTurn) {
                Permanent permanent = game.getPermanent(uuid);
                if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) {
                    permanent.untap(game);
                }
            }
            return true;
        }
        return false;
View Full Code Here

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

            if (card != null) {
                player.discard(card, source, game);
                if (card.getCardType().contains(CardType.CREATURE)) {
                    Permanent permanent = game.getPermanent(source.getSourceId());
                    if (permanent != null) {
                        permanent.untap(game);
                        permanent.transform(game);
                    }
                }
                return true;
            }
View Full Code Here

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

                    Permanent permanent = game.getPermanent(targetId);
                    if (permanent != null) {
                        if (player.chooseUse(Outcome.Tap, new StringBuilder("Tap ").append(permanent.getName()).append("?").toString(), game)) {
                            permanent.tap(game);
                        } else if (player.chooseUse(Outcome.Untap, new StringBuilder("Untap ").append(permanent.getName()).append("?").toString(), game)) {
                            permanent.untap(game);
                        }
                    }
                }
                return true;
            }
View Full Code Here

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

        if (watcher != null && watcher instanceof AttackedThisTurnWatcher) {
            Set<UUID> attackedThisTurn = ((AttackedThisTurnWatcher)watcher).getAttackedThisTurnCreatures();
            for (UUID uuid : attackedThisTurn) {
                Permanent permanent = game.getPermanent(uuid);
                if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) {
                    permanent.untap(game);
                }
            }
            return true;
        }
        return false;
View Full Code Here

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

                    ContinuousEffect effect2 = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
                    effect2.setTargetPointer(new FixedTarget(targetCreature.getId()));
                    game.addEffect(effect2, source);

                    targetCreature.untap(game);
                    result = true;
                }
            }
        }
        return result;
View Full Code Here

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

        Target target = new TargetLandPermanent(filter);
        if (player != null && player.chooseTarget(Outcome.Untap, target, source, game)) {
            for (UUID landId : target.getTargets()) {
                Permanent land = game.getPermanent(landId);
                if (land != null) {
                    land.untap(game);
                }
            }
            return true;
        }
        return false;
View Full Code Here

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

                    && player.choose(outcome, target, source.getSourceId(), game)) {
                Permanent targetPermanent = game.getPermanent(target.getFirstTarget());
                if (targetPermanent != null) {
                    if (targetPermanent.isTapped()) {
                        if (player.chooseUse(Outcome.Untap, "Untap that permanent?", game)) {
                            targetPermanent.untap(game);
                        }
                    } else {
                        if (player.chooseUse(Outcome.Tap, "Tap that permanent?", game)) {
                            targetPermanent.tap(game);
                        }
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.