Examples of Ability


Examples of com.garbagemule.MobArena.waves.ability.Ability

        // And the abilities.
        String ablts = config.getString("abilities");
        if (ablts != null) {
            String[] parts = ablts.split(",");
            for (String ability : parts) {
                Ability a = AbilityManager.getAbility(ability.trim());
                if (a == null) {
                    Messenger.warning(WaveError.BOSS_ABILITY.format(ability.trim(), name, arena.configName()));
                    continue;
                }
               
View Full Code Here

Examples of com.garbagemule.MobArena.waves.ability.Ability

        for (MABoss boss : bosses) {
            if (boss.isDead()) return;
        }
       
        // Get the next ability in the list.
        Ability ability = abilities.get(counter++ % abilities.size());
       
        // And make each boss in this boss wave use it!
        for (MABoss boss : bosses) {
            wave.announceAbility(ability, boss, arena);
            ability.execute(arena, boss);
        }
       
        // Schedule for another run!
        arena.scheduleTask(this, wave.getAbilityInterval());
    }
View Full Code Here

Examples of com.github.clentfort.dota2.dota.Ability

    }
    return;
  }
 
  protected static Ability baseAbility(ParserObject baseObject) throws ParserException {
    Ability baseAbility = new Ability();
    baseAbility.setId(baseObject.getInt("ID"));
    baseAbility.setName(baseObject.getString("AbilityName"));
    baseAbility.setType(baseObject.getString("AbilityType"));
    baseAbility.setBehavior(baseObject.getString("AbilityBehavior"));
   
    fillAbilityLevelBasedList(baseAbility.getCastRange(), baseObject.getString("AbilityCastRange"));
    fillAbilityLevelBasedList(baseAbility.getChannelTime(), baseObject.getString("AbilityChannelTime"));
    fillAbilityLevelBasedList(baseAbility.getCooldown(), baseObject.getString("AbilityCooldown"));
    fillAbilityLevelBasedList(baseAbility.getDuration(), baseObject.getString("AbilityDuration"));
    fillAbilityLevelBasedList(baseAbility.getDamage(), baseObject.getString("AbilityDamage"));
    fillAbilityLevelBasedList(baseAbility.getManacost(), baseObject.getString("AbilityManaCost"));
   
    return baseAbility;
  }
View Full Code Here

Examples of com.pokemon.mmo.Enums.Ability

  }
 
  private static Ability determineAbility(PokemonSpecies species) {
    Random generator = new Random();
    int numOfAbilities = 0;
    Ability ability = Ability.NONE;
    Ability[] abilities = species.getAbilityArray();
    for (int i = 0; i < abilities.length; i++) {
      if(abilities[i] != Ability.NONE) {
        numOfAbilities++;
      }
View Full Code Here

Examples of mage.abilities.Ability

  @Override
  public boolean replaceEvent(GameEvent event, Ability source, Game game) {
    DamageEvent damageEvent = (DamageEvent)event;
    Permanent permanent = game.getPermanent(redirectTarget.getFirstTarget());
    Ability damageSource = getSource(damageEvent.getSourceId(), game);
    if (permanent != null) {
      permanent.damage(damageEvent.getAmount(), damageSource.getId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage());
      return true;
    }
    Player player = game.getPlayer(redirectTarget.getFirstTarget());
    if (player != null) {
      player.damage(damageEvent.getAmount(), damageSource.getId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable());
      return true;
    }
    return false;
  }
View Full Code Here

Examples of mage.abilities.Ability

    return sb.toString();
  }

  @Override
  public void addAbility(Ability ability) {
    Ability copy = ability.copy();
    copy.setControllerId(controllerId);
    copy.setSourceId(objectId);
    abilities.add(copy);
  }
View Full Code Here

Examples of mage.abilities.Ability

    if (card != null) {
      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());
          game.removeLastBookmark();
          return true;
        }
        game.restoreState();
View Full Code Here

Examples of mage.abilities.Ability

    return options;
  }

  private void addTargetOptions(List<Ability> options, Ability option, int targetNum, Game game) {
    for (UUID targetId: option.getTargets().getUnchosen().get(targetNum).possibleTargets(option.getSourceId(), playerId, game)) {
      Ability newOption = option.copy();
      newOption.getTargets().get(targetNum).addTarget(targetId, option, game);
      if (targetNum < option.getTargets().size() - 1) {
        addTargetOptions(options, newOption, targetNum + 1, game);
      }
      else {
        if (option.getChoices().size() > 0)
View Full Code Here

Examples of mage.abilities.Ability

    }
  }

  private void addChoiceOptions(List<Ability> options, Ability option, int choiceNum, Game game) {
    for (String choice: option.getChoices().get(choiceNum).getChoices()) {
      Ability newOption = option.copy();
      newOption.getChoices().get(choiceNum).setChoice(choice);
      if (choiceNum < option.getChoices().size() - 1) {
        addChoiceOptions(options, newOption, choiceNum + 1, game);
      }
      else {
        if (option.getCosts().getTargets().size() > 0)
View Full Code Here

Examples of mage.abilities.Ability

    }
  }

  private void addCostTargetOptions(List<Ability> options, Ability option, int targetNum, Game game) {
    for (UUID targetId: option.getCosts().getTargets().get(targetNum).possibleTargets(option.getSourceId(), playerId, game)) {
      Ability newOption = option.copy();
      newOption.getCosts().getTargets().get(targetNum).addTarget(targetId, option, game);
      if (targetNum < option.getCosts().getTargets().size() - 1) {
        addCostTargetOptions(options, newOption, targetNum + 1, game);
      }
      else {
        options.add(newOption);
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.