Package mage.target

Examples of mage.target.TargetPlayer


        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


        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());
        this.addAbility(ability3);
    }
View Full Code Here

                new CardIdPredicate(this.getId()),
                new SubtypePredicate("Ally")));

        // Whenever Bala Ged Thief or another Ally enters the battlefield under your control, target player reveals a number of cards from his or her hand equal to the number of Allies you control. You choose one of them. That player discards that card.
        Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new BalaGedThiefEffect(), filter, false);
        TargetPlayer target = new TargetPlayer();
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setBlue(true);

        // Target player discards two cards, then draws as many cards as he or she discarded this way.
        this.getSpellAbility().addEffect(new ForgetEffect());
        this.getSpellAbility().addTarget(new TargetPlayer());
    }
View Full Code Here

        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));

        // +1: Chandra, Pyromaster deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn.
        LoyaltyAbility ability1 = new LoyaltyAbility(new ChandraPyromasterEffect1(), 1);
        Target target1 = new TargetPlayer();
        ability1.addTarget(target1);
        ability1.addTarget(new ChandraPyromasterTarget());
        this.addAbility(ability1);

        // 0: Exile the top card of your library. You may play it this turn.
View Full Code Here

  }

  @Override
  public boolean checkTrigger(GameEvent event, Game game) {
    if (event.getType() == EventType.DISCARDED_CARD && game.getOpponents(controllerId).contains(event.getPlayerId())) {
      this.addTarget(new TargetPlayer());
      this.targets.get(0).add(event.getPlayerId(), game);
      return true;
    }
    return false;
  }
View Full Code Here

    this.color.setBlack(true);
    this.power = new MageInt(0);
    this.toughness = new MageInt(1);
    Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), new ManaCostsImpl("{1}{B}"));
    ability.addCost(new TapSourceCost());
    ability.addTarget(new TargetPlayer());
    this.addAbility(ability);
  }
View Full Code Here

        this.color.setBlack(true);

        // Target player discards two cards and loses 2 life.
        this.getSpellAbility().addEffect(new DiscardTargetEffect(2));
        this.getSpellAbility().addEffect(new LoseLifeTargetEffect(2));
        this.getSpellAbility().addTarget(new TargetPlayer());
    }
View Full Code Here

        this.color.setBlue(true);

        // You and target player exchange control of the creature you each control with the highest converted mana cost. Then exchange control of artifacts the same way. If two or more permanents a player controls are tied for highest cost, their controller chooses one of them.
        this.getSpellAbility().addEffect(new JuxtaposeEffect(new FilterCreaturePermanent(), "You and target player exchange control of the creature you each control with the highest converted mana cost."));
        this.getSpellAbility().addEffect(new JuxtaposeEffect(new FilterArtifactPermanent(), "Then exchange control of artifacts the same way. If two or more permanents a player controls are tied for highest cost, their controller chooses one of them."));
        this.getSpellAbility().addTarget(new TargetPlayer() );
    }
View Full Code Here

        this.subtype.add("Berserker");
        this.power = new MageInt(3);
        this.toughness = new MageInt(1);
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new ManaCostsImpl("{1}{R}"));
        ability.addCost(new SacrificeSourceCost());
        ability.addTarget(new TargetPlayer());
        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.