Examples of triggerAbility()


Examples of mage.players.Player.triggerAbility()

        TriggeredAbilities abilities = state.getTriggered().getControlledBy(player.getId());
        if (abilities.size() == 0)
          break;
        if (abilities.size() == 1) {
          state.getTriggered().remove(abilities.get(0));
          played |= player.triggerAbility(abilities.get(0), this);
        }
        else {
          TriggeredAbility ability = player.chooseTriggeredAbility(abilities, this);
          state.getTriggered().remove(ability);
          played |= player.triggerAbility(ability, this);
View Full Code Here

Examples of mage.players.Player.triggerAbility()

          played |= player.triggerAbility(abilities.get(0), this);
        }
        else {
          TriggeredAbility ability = player.chooseTriggeredAbility(abilities, this);
          state.getTriggered().remove(ability);
          played |= player.triggerAbility(ability, this);
        }
      }
    }
    return played;
  }
View Full Code Here

Examples of mage.players.Player.triggerAbility()

                // triggered abilities that don't use the stack have to be executed first (e.g. Banisher Priest Return exiled creature
                for (Iterator<TriggeredAbility> it = abilities.iterator(); it.hasNext();) {
                    TriggeredAbility triggeredAbility = it.next();
                    if (!triggeredAbility.isUsesStack()) {
                        state.removeTriggeredAbility(triggeredAbility);
                        played |= player.triggerAbility(triggeredAbility, this);
                        it.remove();
                    }
                }
                if (abilities.isEmpty()) {
                    break;
View Full Code Here

Examples of mage.players.Player.triggerAbility()

                if (abilities.isEmpty()) {
                    break;
                }
                if (abilities.size() == 1) {
                    state.removeTriggeredAbility(abilities.get(0));
                    played |= player.triggerAbility(abilities.get(0), this);
                }
                else {
                    TriggeredAbility ability = player.chooseTriggeredAbility(abilities, this);
                    if (ability != null) {
                        state.removeTriggeredAbility(ability);
View Full Code Here

Examples of mage.players.Player.triggerAbility()

                }
                else {
                    TriggeredAbility ability = player.chooseTriggeredAbility(abilities, this);
                    if (ability != null) {
                        state.removeTriggeredAbility(ability);
                        played |= player.triggerAbility(ability, this);
                    }
                }
            }
        }
        return played;
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.