Package mage.abilities

Examples of mage.abilities.Ability.activate()


      if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, ability.getId(), playerId))) {
        game.bookmarkState();
        removeFromHand(card, game);
        card.moveToZone(Zone.STACK, ability.getId(), game, false);
        Ability spellAbility = game.getStack().getSpell(ability.getId()).getSpellAbility();
        if (spellAbility.activate(game, noMana)) {
          for (KickerAbility kicker: card.getAbilities().getKickerAbilities()) {
            kicker.activate(game, false);
          }
          game.fireEvent(GameEvent.getEvent(GameEvent.EventType.SPELL_CAST, spellAbility.getId(), playerId));
          game.fireInformEvent(name + " casts " + card.getName());
View Full Code Here


    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

    @Override
    public void addTriggeredAbility(TriggeredAbility ability) {
        if (ability instanceof TriggeredManaAbility || ability instanceof DelayedTriggeredManaAbility) {
            // 20110715 - 605.4
            Ability manaAbiltiy = ability.copy();
            manaAbiltiy.activate(this, false);
            manaAbiltiy.resolve(this);
        }
        else {
            TriggeredAbility newAbility = ability.copy();
            newAbility.newId();
View Full Code Here

        List<Ability> options = getPlayableOptions(ability, game);
        if (options.isEmpty()) {
            if (logger.isDebugEnabled())
                logger.debug("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

        Ability ability = source.copy();
        List<Ability> options = getPlayableOptions(ability, game);
        if (options.isEmpty()) {
            logger.debug("simulating -- triggered ability:" + ability);
            game.getStack().push(new StackAbility(ability, playerId));
            ability.activate(game, false);
            game.applyEffects();
            game.getPlayers().resetPassed();
        }
        else {
            SimulationNode2 parent = (SimulationNode2) game.getCustomData();
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.