예제 #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 int damageRoll(Hero hero) {

    int damage = super.damageRoll(hero);

    if (hero.usingRanged == (hero.heroClass == HeroClass.HUNTRESS)) {
      int exStr = hero.STR() - STR;
      if (exStr > 0) {
        damage += Random.IntRange(0, exStr);
      }
    }

    return damage;
  }
예제 #3
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;
  }