Package mage.abilities

Examples of mage.abilities.Ability


    this.subtype.add("Wizard");
    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


    this.addAbility(new ColorlessManaAbility());
    Costs costs = new CostsImpl();
    costs.add(new TapSourceCost());
    costs.add(new SacrificeSourceCost());
    costs.add(new TectonicEdgeCost());
    Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), costs);
    ability.addTarget(new TargetNonBasicLandPermanent());
    ability.addManaCost(new GenericManaCost(1));
    this.addAbility(ability);
  }
View Full Code Here

    addBlocker(game, remaining, engagements);
  }

  @Override
  public boolean triggerAbility(TriggeredAbility source, Game game) {
    Ability ability = source.copy();
    List<Ability> options = getPlayableOptions(ability, game);
    if (options.size() == 0) {
      if (logger.isLoggable(Level.FINE))
        logger.fine("simulating -- triggered ability:" + ability);
      game.getStack().push(new StackAbility(ability, playerId));
      ability.activate(game, false);
      game.applyEffects();
      game.getPlayers().resetPassed();
    }
    else {
      SimulationNode parent = (SimulationNode) game.getCustomData();
View Full Code Here

    if (actions == null || actions.size() == 0)
      pass();
    else {
      boolean usedStack = false;
      while (actions.peek() != null) {
        Ability ability = actions.poll();
        this.activateAbility((ActivatedAbility) ability, game);
        if (ability.isUsesStack())
          usedStack = true;
      }
      if (usedStack)
        pass();
    }
View Full Code Here

  public TeeteringPeaks(UUID ownerId) {
    super(ownerId, 226, "Teetering Peaks", Rarity.COMMON, new CardType[]{CardType.LAND}, null);
    this.expansionSetCode = "ZEN";
    this.addAbility(new EntersBattlefieldTappedAbility());
    Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(2, 0, Duration.EndOfTurn), false);
    ability.addTarget(new TargetCreaturePermanent());
    this.addAbility(ability);
    this.addAbility(new RedManaAbility());
  }
View Full Code Here

    this.color.setBlue(true);
    this.subtype.add("Shapeshifter");
    this.power = new MageInt(0);
    this.toughness = new MageInt(0);

    Ability ability = new EntersBattlefieldAbility(new CopyEffect(), "You may have Clone enter the battlefield as a copy of any creature on the battlefield");
    ability.addTarget(new TargetCreaturePermanent());
    this.addAbility(ability);
  }
View Full Code Here

        this.color.setBlack(true);
        this.subtype.add("Human");
        this.subtype.add("Rogue");
        this.power = new MageInt(4);
  this.toughness = new MageInt(3);
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(-2, -0, Duration.EndOfTurn), new ManaCostsImpl("{U}{B}"));
        ability.addEffect(new GainAbilitySourceEffect(UnblockableAbility.getInstance(), Duration.EndOfTurn));
        this.addAbility(ability);
    }
View Full Code Here

    this.subtype.add("Aura");

    TargetPermanent auraTarget = new TargetLandPermanent();
    this.getSpellAbility().addTarget(auraTarget);
    this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
    Ability ability = new EnchantAbility(auraTarget.getTargetName());
    this.addAbility(ability);
    this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardControllerEffect(1), false));
    this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpreadingSeasEffect()));

  }
View Full Code Here

    this.subtype.add("Vampire");
    this.power = new MageInt(2);
    this.toughness = new MageInt(2);

    this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter1, true)));
    Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CaptivatingVampireEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(5, 5, filter2, true)));
    ability.addTarget(new TargetCreaturePermanent());
    this.addAbility(ability);
  }
View Full Code Here

    this.subtype.add("Aura");

    TargetPermanent auraTarget = new TargetCreaturePermanent();
    this.getSpellAbility().addTarget(auraTarget);
    this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
    Ability ability = new EnchantAbility(auraTarget.getTargetName());
    this.addAbility(ability);
    this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PacifismEffect()));

  }
View Full Code Here

TOP

Related Classes of mage.abilities.Ability

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.