Package mage.target.common

Examples of mage.target.common.TargetOpponent


        super(effect);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        TargetOpponent target = new TargetOpponent();
        Player you = game.getPlayer(source.getControllerId());
        if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
            you.chooseTarget(Outcome.DrawCard, target, source, game);
            Player opponent = game.getPlayer(target.getFirstTarget());
            if (opponent != null) {
                you.drawCards(opponent.getHand().size(), game);
                return true;
            }
        }
View Full Code Here


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

        // When Tyrant of Discord enters the battlefield, target opponent chooses a permanent he or she controls at random and sacrifices it. If a nonland permanent is sacrificed this way, repeat this process.
        Ability ability = new EntersBattlefieldTriggeredAbility(new TyrantOfDiscordEffect());
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
    }
View Full Code Here

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

        // Target opponent discards two cards and you gain 2 life.
        this.getSpellAbility().addEffect(new DiscardTargetEffect(2));
        this.getSpellAbility().addTarget(new TargetOpponent());
        this.getSpellAbility().addEffect(new GainLifeEffect(2));
    }
View Full Code Here

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

        // When Wanderguard Sentry enters the battlefield, look at target opponent's hand.
        Ability ability = new EntersBattlefieldTriggeredAbility(new RevealHandTargetEffect(TargetController.OPPONENT));
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setBlue(true);

        // Target opponent exiles cards from the top of his or her library until he or she exiles a nonland card. Until end of turn, you may cast that card without paying its mana cost.
        this.getSpellAbility().addEffect(new StolenGoodsEffect());
        this.getSpellAbility().addTarget(new TargetOpponent());
    }
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.expansionSetCode = "ISD";

        this.color.setBlack(true);

        // Target opponent sacrifices a creature. You gain life equal to that creature's toughness.
        this.getSpellAbility().addTarget(new TargetOpponent());
        this.getSpellAbility().addEffect(new TributeToHungerEffect());
    }
View Full Code Here

        this.subtype.add("Mercenary");
        this.color.setBlack(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);
        Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2));
        ability.addTarget(new TargetOpponent());
        ability.addEffect(new LoseLifeTargetEffect(2));
        this.addAbility(ability);
    }
View Full Code Here

        this.addAbility(FlyingAbility.getInstance());
       
        // {1}{U}, {untap}: Target opponent exiles the top card of his or her library. Until end of turn, you may play that card.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new KnacksawCliqueEffect(), new ManaCostsImpl("{1}{U}"));
        ability.addCost(new UntapSourceCost());
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
       
    }
View Full Code Here

        this.addAbility(new EntersBattlefieldTappedAbility());
       
        // <em>Raid</em> - When Mardu Skullhunter enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.
        Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)), RaidCondition.getInstance(),
                 "<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.", false);       
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
        this.addWatcher(new PlayerAttackedWatcher());
    }
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.