Examples of TargetOpponent


Examples of mage.target.common.TargetOpponent

    this.subtype.add("Gideon");
    this.color.setWhite(true);
    this.loyalty = new MageInt(6);

    LoyaltyAbility ability1 = new LoyaltyAbility(new GideonJuraEffect(), 2);
    ability1.addTarget(new TargetOpponent());
    this.addAbility(ability1);

    LoyaltyAbility ability2 = new LoyaltyAbility(new DestroyTargetEffect(), -2);
    ability2.addTarget(new TargetCreaturePermanent(filter));
    this.addAbility(ability2);
View Full Code Here

Examples of mage.target.common.TargetOpponent

  public ArchiveTrap(UUID ownerId) {
    super(ownerId, 41, "Archive Trap", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{U}{U}");
    this.expansionSetCode = "ZEN";
    this.color.setBlue(true);
    this.getSpellAbility().addTarget(new TargetOpponent());
    this.getSpellAbility().addEffect(new PutLibraryIntoGraveTargetEffect(13));
    this.getSpellAbility().addAlternativeCost(new ArchiveTrapAlternativeCost());
    this.watchers.add(new ArchiveTrapWatcher(ownerId));
  }
View Full Code Here

Examples of mage.target.common.TargetOpponent

        // Kicker - Tap an untapped Vampire you control.
        OptionalAdditionalCost cost = new OptionalAdditionalCostImpl("Kicker-","",new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
        this.addAbility(new KickerAbility(cost));

        // Target opponent loses half his or her life, rounded up.
        this.getSpellAbility().addTarget(new TargetOpponent());
        this.getSpellAbility().addEffect(new BloodTributeLoseLifeEffect());
        
        // If Blood Tribute was kicked, you gain life equal to the life lost this way.
        Effect effect = new ConditionalOneShotEffect(
                new BloodTributeGainLifeEffect(),
View Full Code Here

Examples of mage.target.common.TargetOpponent

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null && !game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CLASH, controller.getId(), controller.getId()))) {
            // choose opponent
            Target target = new TargetOpponent(true);
            target.setTargetName("an opponent to clash with");
            if (controller.choose(Outcome.Benefit, target, source.getSourceId(), game)) {
                Player opponent = game.getPlayer(target.getFirstTarget());
                if (opponent != null) {
                    int cmcController = Integer.MIN_VALUE;
                    Card cardController = null;
                    boolean topController = true;
                    int cmcOpponent = Integer.MIN_VALUE;
View Full Code Here

Examples of mage.target.common.TargetOpponent

        this.expansionSetCode = "ZEN";

        this.subtype.add("Trap");
        this.color.setBlue(true);

        this.getSpellAbility().addTarget(new TargetOpponent());
        this.getSpellAbility().addEffect(new PutLibraryIntoGraveTargetEffect(13));
        this.getSpellAbility().addAlternativeCost(new ArchiveTrapAlternativeCost());
        this.addWatcher(new ArchiveTrapWatcher());
    }
View Full Code Here

Examples of mage.target.common.TargetOpponent

    @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

Examples of mage.target.common.TargetOpponent

        if (controller != null && sourcePermanent != null) {
            UUID opponentId;
            if (game.getOpponents(controller.getId()).size() == 1) {
                opponentId = game.getOpponents(controller.getId()).iterator().next();
            } else {
                Target target = new TargetOpponent();
                controller.choose(outcome, target, source.getSourceId(), game);
                opponentId = target.getFirstTarget();
            }
            if (opponentId != null) {
                Player opponent = game.getPlayer(opponentId);
                if (opponent != null) {
                    StringBuilder sb = new StringBuilder("Pay tribute to ");
View Full Code Here

Examples of mage.target.common.TargetOpponent

        ability1.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability1);

        // -3: Target opponent's life total becomes 10.
        LoyaltyAbility ability2 = new LoyaltyAbility(new SorinMarkovEffect(), -3);
        ability2.addTarget(new TargetOpponent());
        this.addAbility(ability2);

        // -7: You control target player during that player's next turn.
        LoyaltyAbility ability3 = new LoyaltyAbility(new ControlTargetPlayerNextTurnEffect(), -7);
        ability3.addTarget(new TargetPlayer());
View Full Code Here

Examples of mage.target.common.TargetOpponent

            // Some spells and abilities specify that a player other than their controller chooses a mode for it.
            // In that case, the other player does so when the spell or ability’s controller normally would do so.
            // If there is more than one other player who could make such a choice, the spell or ability’s controller decides which of those players will make the choice.
            UUID playerId = null;
            if (modeChooser == TargetController.OPPONENT) {
                TargetOpponent targetOpponent = new TargetOpponent();
                if (targetOpponent.choose(Outcome.Benefit, source.getControllerId(), source.getSourceId(), game)) {
                    playerId = targetOpponent.getFirstTarget();
                }
            } else {
                playerId = source.getControllerId();
            }
            if (playerId == null) {
View Full Code Here

Examples of mage.target.common.TargetOpponent

        // Intimidate
        this.addAbility(IntimidateAbility.getInstance());
        // When Lifebane Zombie enters the battlefield, target opponent reveals his or her hand. You choose a green or white creature card from it and exile that card.
        Ability ability = new EntersBattlefieldTriggeredAbility(new ExileCardYouChooseTargetOpponentEffect(filter));
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);       
    }
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.