Package mage.target.common

Examples of mage.target.common.TargetCreatureOrPlayer


    Effects effects1 = new Effects();
    effects1.add(new DamageTargetEffect(3));
    effects1.add(new GainLifeEffect(3));
    LoyaltyAbility ability2 = new LoyaltyAbility(effects1, -2);
    ability2.addTarget(new TargetCreatureOrPlayer());
    this.addAbility(ability2);

    FilterPermanent filter = new FilterPermanent("lands");
    filter.getCardType().add(CardType.LAND);
    LoyaltyAbility ability3 = new LoyaltyAbility(new DestroyAllControlledTargetEffect(filter), -7);
View Full Code Here


  public HornetSting(UUID ownerId) {
    super(ownerId, 181, "Hornet Sting", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
    this.expansionSetCode = "M11";
    this.color.setGreen(true);
    this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
    this.getSpellAbility().addEffect(new DamageTargetEffect(1));
  }
View Full Code Here

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

    this.addAbility(new EntersBattlefieldAbility(new AddPlusOneCountersSourceEffect(3), "with three +1/+1 counters on it"));
    Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost("+1/+1", 1));
    ability.addTarget(new TargetCreatureOrPlayer());
    this.addAbility(ability);
  }
View Full Code Here

  public LightningBolt(UUID ownerId) {
    super(ownerId, 146, "Lightning Bolt", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
    this.expansionSetCode = "M10";
    this.color.setRed(true);
    this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
    this.getSpellAbility().addEffect(new DamageTargetEffect(3));
  }
View Full Code Here

  public Fireball(UUID ownerId) {
    super(ownerId, 136, "Fireball", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{R}");
    this.expansionSetCode = "M10";
    this.color.setRed(true);
    this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(0, 0));
    this.getSpellAbility().addEffect(new FireballEffect());
  }
View Full Code Here

    this.color.setRed(true);
    this.power = new MageInt(1);
    this.toughness = new MageInt(1);

    Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
    ability.addTarget(new TargetCreatureOrPlayer());
    this.addAbility(ability);
  }
View Full Code Here

    super(ownerId, 62, "Vengeful Rebirth", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{R}{G}");
    this.expansionSetCode = "ARB";
    this.color.setRed(true);
    this.color.setGreen(true);
    this.getSpellAbility().addTarget(new TargetCardInYourGraveyard());
    this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
    this.getSpellAbility().addEffect(new VengefulRebirthEffect());
    this.getSpellAbility().addEffect(ExileSpellEffect.getInstance());
  }
View Full Code Here

  @Override
  public void assignDamage(int damage, List<UUID> targets, UUID sourceId, Game game) {
    int remainingDamage = damage;
    while (remainingDamage > 0) {
      Target target = new TargetCreatureOrPlayer();
      choose(Outcome.Damage, target, game);
      if (targets.size() == 0 || targets.contains(target.getFirstTarget())) {
        int damageAmount = getAmount(0, remainingDamage, "Select amount", game);
        Permanent permanent = game.getPermanent(target.getFirstTarget());
        if (permanent != null) {
          permanent.damage(damageAmount, sourceId, game, true, false);
          remainingDamage -= damageAmount;
        }
        else {
          Player player = game.getPlayer(target.getFirstTarget());
          if (player != null) {
            player.damage(damageAmount, sourceId, game, false, true);
            remainingDamage -= damageAmount;
          }
        }
View Full Code Here

  public BurstLightning(UUID ownerId) {
    super(ownerId, 119, "Burst Lightning", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
    this.expansionSetCode = "ZEN";
    this.color.setRed(true);
    this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
    this.getSpellAbility().addEffect(new DamageTargetEffect(2));
    KickerAbility ability = new KickerAbility(new DamageTargetEffect(4), true);
    ability.addTarget(this.getSpellAbility().getTargets().get(0));
    ability.addManaCost(new GenericManaCost(4));
    this.addAbility(ability);
View Full Code Here

    Costs<Cost> costs = new CostsImpl();
    costs.add(new GenericManaCost(1));
    costs.add(new SacrificeSourceCost());
    Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), costs);
    ability.addTarget(new TargetCreatureOrPlayer());
    this.addAbility(ability);
  }
View Full Code Here

TOP

Related Classes of mage.target.common.TargetCreatureOrPlayer

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.