Package mage.target

Examples of mage.target.Target.addTarget()


      newTarget.clearChosen();
      for (UUID targetId: target.getTargets()) {
        MageObject object = game.getObject(targetId);
        if (player.chooseUse(ability.getEffects().get(0).getOutcome(), "Change target from " + object.getName() + "?", game)) {
          if (!player.chooseTarget(ability.getEffects().get(0).getOutcome(), newTarget, ability, game))
            newTarget.addTarget(targetId, ability, game);
        }
        else {
          newTarget.addTarget(targetId, ability, game);
        }
      }
View Full Code Here


        if (player.chooseUse(ability.getEffects().get(0).getOutcome(), "Change target from " + object.getName() + "?", game)) {
          if (!player.chooseTarget(ability.getEffects().get(0).getOutcome(), newTarget, ability, game))
            newTarget.addTarget(targetId, ability, game);
        }
        else {
          newTarget.addTarget(targetId, ability, game);
        }
      }
      target.clearChosen();
      for (UUID newTargetId: newTarget.getTargets()) {
        target.addTarget(newTargetId, ability, game);
View Full Code Here

            FilterCreaturePermanent filter = new FilterCreaturePermanent("enchant creature put onto the battlefield with Animate Dead");
            filter.add(new PermanentIdPredicate(cardInGraveyard.getId()));
            Target target = new TargetCreaturePermanent(filter);
            //enchantAbility.setTargetName(target.getTargetName());
            if (enchantedCreature != null) {
                target.addTarget(enchantedCreature.getId(), source, game);
                enchantment.getSpellAbility().getTargets().clear();
                enchantment.getSpellAbility().getTargets().add(target);
                enchantedCreature.addAttachment(enchantment.getId(), game);
            }
            return true;
View Full Code Here

                        }
                        if (name != null && player.chooseUse(Outcome.Neutral, new StringBuilder("Change target from ").append(name).append(" to ").append(sourceObject.getName()).append("?").toString(), game)) {
                            if (target.canTarget(stackObject.getControllerId(), source.getSourceId(), sourceAbility, game)) {
                                oldTarget = game.getObject(targets.getFirstTarget());
                                target.remove(targetId);
                                target.addTarget(source.getSourceId(), source, game);
                                break;
                            }
                        }
                    }
                }
View Full Code Here

            if (enchantedCreature != null) {
                enchantedCreature.addAttachment(enchantment.getId(), game);
                FilterCreaturePermanent filter = new FilterCreaturePermanent("enchant creature put onto the battlefield with Necromancy");
                filter.add(new PermanentIdPredicate(cardInGraveyard.getId()));
                Target target = new TargetCreaturePermanent(filter);
                target.addTarget(enchantedCreature.getId(), source, game);
                game.addEffect(new NecromancyChangeAbilityEffect(target), source);
            }
            return true;
        }
       
View Full Code Here

            FilterCreaturePermanent filter = new FilterCreaturePermanent("enchant creature put onto the battlefield with Dance of the Dead");
            filter.add(new PermanentIdPredicate(cardInGraveyard.getId()));
            Target target = new TargetCreaturePermanent(filter);
            //enchantAbility.setTargetName(target.getTargetName());
            if (enchantedCreature != null) {
                target.addTarget(enchantedCreature.getId(), source, game);
                enchantment.getSpellAbility().getTargets().clear();
                enchantment.getSpellAbility().getTargets().add(target);
                enchantedCreature.addAttachment(enchantment.getId(), game);
            }
            return true;
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.