Package mage.target

Examples of mage.target.TargetStackObject


  @Override
  public boolean checkTrigger(GameEvent event, Game game) {
    if (event.getType() == EventType.TARGETED && event.getTargetId().equals(this.getSourceId()) && game.getOpponents(this.controllerId).contains(event.getPlayerId())) {
      this.getTargets().clear();
      TargetStackObject target = new TargetStackObject();
      target.add(event.getSourceId(), game);
      this.addTarget(target);
      return true;
    }
    return false;
  }
View Full Code Here


    @Override
    public boolean checkTrigger(GameEvent event, Game game) {
        if (event.getType() == EventType.TARGETED && event.getTargetId().equals(this.getSourceId()) && game.getTurnNum() > turnUsed) {

            this.getTargets().clear();
            TargetStackObject target = new TargetStackObject();
            target.add(event.getSourceId(), game);
            this.addTarget(target);
            turnUsed = game.getTurnNum();
            return true;
        }
        return false;
View Full Code Here

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

        // {UP}: Change a target of target spell or ability to Spellskite.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SpellskiteEffect(), new ManaCostsImpl("{UP}"));
        ability.addTarget(new TargetStackObject());
        this.addAbility(ability);
    }
View Full Code Here

    public boolean checkTrigger(GameEvent event, Game game) {
        if (event.getType() == EventType.TARGETED && game.getOpponents(this.controllerId).contains(event.getPlayerId())) {
            Permanent creature = game.getPermanent(event.getTargetId());
            if (creature != null && filter.match(creature, getSourceId(), getControllerId(), game)) {
                this.getTargets().clear();
                TargetStackObject target = new TargetStackObject();
                target.add(event.getSourceId(), game);
                this.addTarget(target);
                return true;
            }
        }
        return false;
View Full Code Here

    public boolean checkTrigger(GameEvent event, Game game) {
        if (event.getType() == EventType.TARGETED && event.getTargetId().equals(this.getSourceId())) {
            Integer turn = turnUsed.get(event.getTargetId());
            if (turn == null || turn.intValue() < game.getTurnNum()) {
                this.getTargets().clear();
                TargetStackObject target = new TargetStackObject();
                target.add(event.getSourceId(), game);
                this.addTarget(target);
                if (turnUsed.containsKey(event.getTargetId())) {
                    turnUsed.remove(event.getTargetId());
                    turnUsed.put(event.getTargetId(),new Integer(game.getTurnNum()));
                } else {
View Full Code Here

    @Override
    public boolean checkTrigger(GameEvent event, Game game) {
        if (event.getType() == EventType.TARGETED && event.getTargetId().equals(this.getSourceId()) && game.getTurnNum() > turnUsed) {

            this.getTargets().clear();
            TargetStackObject target = new TargetStackObject();
            target.add(event.getSourceId(), game);
            this.addTarget(target);
            turnUsed = game.getTurnNum();
            return true;
        }
        return false;
View Full Code Here

        this.color.setGreen(true);
        this.color.setBlue(true);

        // Counter target spell, activated ability, or triggered ability.
        this.getSpellAbility().addEffect(new CounterTargetEffect());
        this.getSpellAbility().addTarget(new TargetStackObject());
    }
View Full Code Here

        this.color.setRed(true);

        // You may choose new targets for target instant or sorcery spell. Then copy that spell. You may choose new targets for the copy.
        this.getSpellAbility().addEffect(new WildRicochetEffect());
        this.getSpellAbility().addTarget(new TargetStackObject(filter));

    }
View Full Code Here

    @Override
    public boolean checkTrigger(GameEvent event, Game game) {
        if (event.getType() == EventType.TARGETED && event.getTargetId().equals(this.getSourceId()) && game.getOpponents(this.controllerId).contains(event.getPlayerId())) {
            this.getTargets().clear();
            TargetStackObject target = new TargetStackObject();
            target.add(event.getSourceId(), game);
            this.addTarget(target);
            return true;
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of mage.target.TargetStackObject

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.