Package mage.target

Examples of mage.target.TargetPlayer


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

        Ability ability = new LandfallAbility(new LoseLifeTargetEffect(3), true);
        ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)));
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here


        this.color.setGreen(true);
        this.power = new MageInt(4);
        this.toughness = new MageInt(4);
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost());
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

                player.shuffleLibrary(this);
            }
        }

        //20091005 - 103.2
        TargetPlayer targetPlayer = new TargetPlayer();
        targetPlayer.setTargetName("starting player");
        Player choosingPlayer = null;
        if (choosingPlayerId != null) {
            choosingPlayer = this.getPlayer(choosingPlayerId);
        }
        if (choosingPlayer == null) {
            choosingPlayer = getPlayer(pickChoosingPlayer());
        }

        if (choosingPlayer != null && choosingPlayer.choose(Outcome.Benefit, targetPlayer, null, this)) {
            startingPlayerId = targetPlayer.getTargets().get(0);
            Player startingPlayer = state.getPlayer(startingPlayerId);
            StringBuilder message = new StringBuilder(choosingPlayer.getName()).append(" chooses that ");
            if (choosingPlayer.getId().equals(startingPlayerId)) {
                message.append("he or she");
            } else {
View Full Code Here

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

        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(1), new TapSourceCost());
        ability.addEffect(new DiscardTargetEffect(1));
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

        this.toughness = new MageInt(2);

        // {2}{B}, {tap}: Target player discards a card. Activate this ability only any time you could cast a sorcery.
        Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(1), new ManaCostsImpl("{2}{B}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setBlue(true);

        // Target player reveals his or her hand and discards all Trap cards.
        this.getSpellAbility().addEffect(new TrapfindersTrickEffect());
        this.getSpellAbility().addTarget(new TargetPlayer());
    }
View Full Code Here

        // At the beginning of each player's upkeep, that player chooses target player who controls more lands than he or she does and is his or her opponent. The first player may search his or her library for a basic land card, put that card onto the battlefield, then shuffle his or her library.
        Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterBasicLandCard()), false, Outcome.PutLandInPlay);
        effect.setText("that player chooses target player who controls more lands than he or she does and is his or her opponent. The first player may search his or her library for a basic land card, put that card onto the battlefield, then shuffle his or her library");
        Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.ANY, true);
        ability.addTarget(new TargetPlayer(1, 1, false, filter));
        this.addAbility(ability);
    }
View Full Code Here

        if (ability instanceof BeginningOfUpkeepTriggeredAbility) {
            Player activePlayer = game.getPlayer(game.getActivePlayerId());
            if (activePlayer != null) {
                ability.setControllerId(activePlayer.getId());
                ability.getTargets().clear();
                TargetPlayer target = new TargetPlayer(1, 1, false, filter);
                ability.getTargets().add(target);
            }
        }
    }
View Full Code Here

    @Override
    public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
        Player controller = game.getPlayer(controllerId);
        if (controller != null) {
            TargetPlayer target = new TargetPlayer(1, 1, true, filter);
            if (controller.chooseTarget(Outcome.Detriment, target, ability, game)) {
                Player opponent = game.getPlayer(target.getFirstTarget());
                if (opponent != null) {
                    opponent.gainLife(amount, game);
                    paid = true;

                }
View Full Code Here

        this.color.setGreen(true);

        // At the beginning of each player's upkeep, that player chooses target player who controls more creatures than he or she does and is his or her opponent. The first player may reveal cards from the top of his or her library until he or she reveals a creature card. If he or she does, that player puts that card onto the battlefield and all other cards revealed this way into his or her graveyard.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(new OathOfDruidsEffect(), TargetController.ANY, true);
        ability.addTarget(new TargetPlayer(1, 1, false, filter));
        this.addAbility(ability);
    }
View Full Code Here

TOP

Related Classes of mage.target.TargetPlayer

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.