V0.2.0: Lightly buffed new ring of accuracy, removed old ring of accuracy implementation (it was giving both its old and new effect, oops)

This commit is contained in:
Evan Debenham 2014-09-10 17:29:00 -04:00
parent ed86176362
commit fb5735b2c7
2 changed files with 3 additions and 13 deletions

View File

@ -254,20 +254,10 @@ public class Hero extends Char {
@Override
public int attackSkill( Char target ) {
int bonus = 0;
for (Buff buff : buffs( RingOfAccuracy.Accuracy.class )) {
bonus += ((RingOfAccuracy.Accuracy)buff).level;
}
float accuracy = (bonus == 0) ? 1 : (float)Math.pow( 1.4, bonus );
if (usingRanged && Level.distance( pos, target.pos ) == 1) {
accuracy *= 0.5f;
}
if (belongings.weapon != null) {
return (int)(attackSkill * accuracy * belongings.weapon.acuracyFactor( this ));
return (int)(attackSkill * belongings.weapon.acuracyFactor( this ));
} else {
return (int)(attackSkill * accuracy);
return (int)(attackSkill);
}
}

View File

@ -386,7 +386,7 @@ public abstract class Mob extends Char {
penalty += ((RingOfAccuracy.Accuracy) buff).level;
}
if (penalty != 0)
defenseSkill *= Math.pow(0.8, penalty);
defenseSkill *= Math.pow(0.75, penalty);
return defenseSkill;
} else
return 0;