Пример #1
0
  @Override
  public float speedFactor(Hero hero) {

    int encumrance = STR - hero.STR();
    if (this instanceof MissileWeapon && hero.heroClass == HeroClass.HUNTRESS) {
      encumrance -= 2;
    }

    return encumrance > 0 ? (float) (DLY * Math.pow(1.2, encumrance)) : DLY;
  }
Пример #2
0
  @Override
  public float acuracyFactor(Hero hero) {

    int encumbrance = STR - hero.STR();

    if (this instanceof MissileWeapon) {
      switch (hero.heroClass) {
        case WARRIOR:
          encumbrance += 3;
          break;
        case HUNTRESS:
          encumbrance -= 2;
          break;
        default:
      }
    }

    return encumbrance > 0 ? (float) (ACU / Math.pow(1.5, encumbrance)) : ACU;
  }