Package mage.target.common

Examples of mage.target.common.TargetOpponent


        this.color.setBlue(true);

        // Reveal the top three cards of your library. Target opponent may choose to put those cards into your hand.
        // If he or she doesn't, put those cards into your graveyard and draw five cards.
        this.getSpellAbility().addEffect(new CovenantOfMindsEffect());
        this.getSpellAbility().addTarget(new TargetOpponent());
    }
View Full Code Here


        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantGainLifeAllEffect()));
        // At the beginning of your upkeep, Witch Hunt deals 4 damage to you.
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageControllerEffect(4), TargetController.YOU, false));
        // At the beginning of your end step, target opponent chosen at random gains control of Witch Hunt.
        Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new WitchHuntEffect(), TargetController.YOU, null, false);
        Target target = new TargetOpponent();
        target.setRandom(true);
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

        Set<UUID> opponents = game.getOpponents(source.getControllerId());
        if (!opponents.isEmpty()) {
            Player opponent = null;
            if (opponents.size() > 1) {
                TargetOpponent targetOpponent = new TargetOpponent();
                if (player.chooseTarget(Outcome.Neutral, targetOpponent, source, game)) {
                    opponent = game.getPlayer(targetOpponent.getFirstTarget());
                }
            }
            if (opponent == null)  {
                opponent = game.getPlayer(opponents.iterator().next());
            }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null && permanent != null) {
            TargetOpponent target = new TargetOpponent();
            target.setNotTarget(true);
            if (player.choose(this.outcome, target, source.getSourceId(), game)) {
                Player chosenPlayer = game.getPlayer(target.getFirstTarget());
                if (chosenPlayer != null) {
                    game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName());
                    game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget());
                    return true;
                }
            }
        }
        return false;
View Full Code Here

        this.power = new MageInt(8);
        this.toughness = new MageInt(4);

        // When Hunted Troll enters the battlefield, put four 1/1 blue Faerie creature tokens with flying onto the battlefield under target opponent's control.
        Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenTargetEffect(new FaerieToken(), 4), false);
        Target target = new TargetOpponent();
        ability.addTarget(target);
        this.addAbility(ability);
        // {G}: Regenerate Hunted Troll.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ColoredManaCost(ColoredManaSymbol.G)));
    }
View Full Code Here

        this.color.setBlack(true);
        this.color.setWhite(true);

        // Target opponent loses 2 life for each Swamp you control. Last Stand deals damage equal to the number of Mountains you control to target creature. Put a 1/1 green Saproling creature token onto the battlefield for each Forest you control. You gain 2 life for each Plains you control. Draw a card for each Island you control, then discard that many cards.
        this.getSpellAbility().addEffect(new LastStandEffect());
        this.getSpellAbility().addTarget(new TargetOpponent());
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

        this.color.setBlue(true);

        // Search target opponent's library for an artifact card and put that card onto the battlefield under your control.
        // Then that player shuffles his or her library.
        this.getSpellAbility().addEffect(new AcquireEffect());
        this.getSpellAbility().addTarget(new TargetOpponent());
    }
View Full Code Here

        this.color.setRed(true);

        // Target opponent reveals his or her hand. You may copy an instant or sorcery card in it. If you do, you may cast the copy without paying its mana cost.
        this.getSpellAbility().addEffect(new ReversalOfFortuneEffect());
        this.getSpellAbility().addTarget(new TargetOpponent());
    }
View Full Code Here

        this.color.setBlue(true);

        // Search target opponent's library for an artifact, creature, enchantment, or land card.
        // Put that card onto the battlefield under your control. Then that player shuffles his or her library.
        this.getSpellAbility().addEffect(new EternalDominionEffect());
        this.getSpellAbility().addTarget(new TargetOpponent());
       
        // Epic
        this.getSpellAbility().addEffect(new EpicEffect());

    }
View Full Code Here

        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // When Tidehollow Sculler enters the battlefield, target opponent reveals his or her hand and you choose a nonland card from it. Exile that card.
        Ability ability = new EntersBattlefieldTriggeredAbility(new TidehollowScullerExileEffect(), false);
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);


        // When Tidehollow Sculler leaves the battlefield, return the exiled card to its owner's hand.
        this.addAbility(new LeavesBattlefieldTriggeredAbility(new TidehollowScullerLeaveEffect(), false ));
View Full Code Here

TOP

Related Classes of mage.target.common.TargetOpponent

Copyright © 2018 www.massapicom. 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.