public boolean canSurpriseAttack(){ if (belongings.weapon == null || !(belongings.weapon instanceof Weapon)) return true; if (STR() < ((Weapon)belongings.weapon).STRReq()) return false; if (belongings.weapon instanceof Flail) return false; return true; }
public boolean canSurpriseAttack(){ if (belongings.weapon == null || !(belongings.weapon instanceof Weapon)) return true; if (STR() < ((Weapon)belongings.weapon).STRReq()) return false; if (belongings.weapon instanceof Flail) return false; return true; }
public abstract int STRReq(int lvl);
public abstract int STRReq(int lvl);
@Override public float accuracyFactor( Char owner ) { int encumbrance = 0; if( owner instanceof Hero ){ encumbrance = STRReq() - ((Hero)owner).STR(); } if (hasEnchant(Wayward.class, owner)) encumbrance = Math.max(2, encumbrance+2); float ACC = this.ACC; return encumbrance > 0 ? (float)(ACC / Math.pow( 1.5, encumbrance )) : ACC; }
@Override public float accuracyFactor( Char owner ) { int encumbrance = 0; if( owner instanceof Hero ){ encumbrance = STRReq() - ((Hero)owner).STR(); } if (hasEnchant(Wayward.class, owner)) encumbrance = Math.max(2, encumbrance+2); float ACC = this.ACC; return encumbrance > 0 ? (float)(ACC / Math.pow( 1.5, encumbrance )) : ACC; }
@Override public float speedFactor( Char owner ) { int encumbrance = 0; if (owner instanceof Hero) { encumbrance = STRReq() - ((Hero)owner).STR(); } float DLY = augment.delayFactor(this.DLY); DLY *= RingOfFuror.attackDelayMultiplier(owner); return (encumbrance > 0 ? (float)(DLY * Math.pow( 1.2, encumbrance )) : DLY); }
@Override public float speedFactor( Char owner ) { int encumbrance = 0; if (owner instanceof Hero) { encumbrance = STRReq() - ((Hero)owner).STR(); } float DLY = augment.delayFactor(this.DLY); DLY *= RingOfFuror.attackDelayMultiplier(owner); return (encumbrance > 0 ? (float)(DLY * Math.pow( 1.2, encumbrance )) : DLY); }
@Override public int drRoll() { int dr = 0; Barkskin bark = buff(Barkskin.class); if (belongings.armor != null) { int armDr = Random.NormalIntRange( belongings.armor.DRMin(), belongings.armor.DRMax()); if (STR() < belongings.armor.STRReq()){ armDr -= 2*(belongings.armor.STRReq() - STR()); } if (armDr > 0) dr += armDr; } if (belongings.weapon != null) { int wepDr = Random.NormalIntRange( 0 , belongings.weapon.defenseFactor( this ) ); if (STR() < ((Weapon)belongings.weapon).STRReq()){ wepDr -= 2*(((Weapon)belongings.weapon).STRReq() - STR()); } if (wepDr > 0) dr += wepDr; } if (bark != null) dr += Random.NormalIntRange( 0 , bark.level() ); return dr; }
@Override public int drRoll() { int dr = 0; Barkskin bark = buff(Barkskin.class); if (belongings.armor != null) { int armDr = Random.NormalIntRange( belongings.armor.DRMin(), belongings.armor.DRMax()); if (STR() < belongings.armor.STRReq()){ armDr -= 2*(belongings.armor.STRReq() - STR()); } if (armDr > 0) dr += armDr; } if (belongings.weapon != null) { int wepDr = Random.NormalIntRange( 0 , belongings.weapon.defenseFactor( this ) ); if (STR() < ((Weapon)belongings.weapon).STRReq()){ wepDr -= 2*(((Weapon)belongings.weapon).STRReq() - STR()); } if (wepDr > 0) dr += wepDr; } if (bark != null) dr += Random.NormalIntRange( 0 , bark.level() ); return dr; }