Examples of possibleTargets()


Examples of mage.target.Target.possibleTargets()

    if (ability instanceof StackAbility) {
      SearchEffect effect = getSearchEffect((StackAbility) ability);
      if (effect != null && ability.getControllerId().equals(playerId)) {
        Target target = effect.getTarget();
        if (!target.doneChosing()) {
          for (UUID targetId: target.possibleTargets(ability.getSourceId(), ability.getControllerId(), game)) {
            Game sim = game.copy();
            StackAbility newAbility = (StackAbility) ability.copy();
            SearchEffect newEffect = getSearchEffect((StackAbility) newAbility);
            newEffect.getTarget().addTarget(targetId, newAbility, sim);
            sim.getStack().push(newAbility);
View Full Code Here

Examples of mage.target.Target.possibleTargets()

        if (ability instanceof StackAbility) {
            SearchEffect effect = getSearchEffect((StackAbility) ability);
            if (effect != null && ability.getControllerId().equals(playerId)) {
                Target target = effect.getTarget();
                if (!target.doneChosing()) {
                    for (UUID targetId: target.possibleTargets(ability.getSourceId(), ability.getControllerId(), game)) {
                        Game sim = game.copy();
                        StackAbility newAbility = (StackAbility) ability.copy();
                        SearchEffect newEffect = getSearchEffect((StackAbility) newAbility);
                        newEffect.getTarget().addTarget(targetId, newAbility, sim);
                        sim.getStack().push(newAbility);
View Full Code Here

Examples of mage.target.Target.possibleTargets()

        if (ability instanceof StackAbility) {
            SearchEffect effect = getSearchEffect((StackAbility) ability);
            if (effect != null && ability.getControllerId().equals(playerId)) {
                Target target = effect.getTarget();
                if (!target.doneChosing()) {
                    for (UUID targetId : target.possibleTargets(ability.getSourceId(), ability.getControllerId(), game)) {
                        Game sim = game.copy();
                        StackAbility newAbility = (StackAbility) ability.copy();
                        SearchEffect newEffect = getSearchEffect(newAbility);
                        newEffect.getTarget().addTarget(targetId, newAbility, sim);
                        sim.getStack().push(newAbility);
View Full Code Here

Examples of mage.target.TargetSource.possibleTargets()

                }
            }
            if (target instanceof TargetSource) {
                Set<UUID> possibleTargets;
                TargetSource t = ((TargetSource) target);
                possibleTargets = t.possibleTargets(sourceId, playerId, game);
                for (UUID targetId : possibleTargets) {
                    MageObject targetObject = game.getObject(targetId);
                    if (targetObject != null) {
                        for (String choose2: choices) {
                            if (targetObject.getName().equals(choose2)) {
View Full Code Here

Examples of mage.target.common.TargetAttackingCreature.possibleTargets()

    }
  }

  protected void selectCombatGroup(UUID blockerId, Game game) {
    TargetAttackingCreature target = new TargetAttackingCreature();
    game.fireSelectTargetEvent(playerId, "Select attacker to block", target.possibleTargets(null, playerId, game), target.isRequired());
    waitForResponse();
    if (response.getBoolean() != null) {
      return;
    } else if (response.getUUID() != null) {
      declareBlocker(blockerId, response.getUUID(), game);
View Full Code Here

Examples of mage.target.common.TargetAttackingCreature.possibleTargets()

    }

    protected void selectCombatGroup(UUID defenderId, UUID blockerId, Game game) {
        updateGameStatePriority("selectCombatGroup", game);
        TargetAttackingCreature target = new TargetAttackingCreature();
        game.fireSelectTargetEvent(playerId, "Select attacker to block", target.possibleTargets(null, playerId, game), false, null);
        waitForResponse(game);
        if (response.getBoolean() != null) {
            // do nothing
        } else if (response.getUUID() != null) {
            CombatGroup group = game.getCombat().findGroup(response.getUUID());
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.