Ejemplo n.º 1
0
  /**
   * gets the experience for a player kill.
   *
   * @param sagaDefender saga player
   * @return experience
   */
  public Double getExp(SagaLiving sagaDefender) {

    Double exp = playerExp.value(sagaDefender.getUsedAttributePoints());
    if (exp == null) return 0.0;

    return exp;
  }
Ejemplo n.º 2
0
  /**
   * Gets the experience for ability usage.
   *
   * @param ability ability
   * @param value ability specific value
   * @return
   */
  public Double getExp(Ability ability, Integer value) {

    Double exp = null;

    TwoPointFunction expFun = abilityExp.get(ability.getName());
    if (expFun != null) exp = expFun.value(value);

    if (exp == null) return 0.0;

    return exp;
  }
Ejemplo n.º 3
0
 /**
  * Gets the experience gain multiplier.
  *
  * @param exp exp
  * @return experience gain multiplier
  */
 public Double getExpGainMultiplier(Double exp) {
   return expGainMultiplier.value(exp);
 }