v0.6.5: bugfixes:
- fixed stone converting 100% of evasion to armor - fixed shields applying full defence when hero has inadequate str
This commit is contained in:
committed by
Evan Debenham
parent
f8052e9f9e
commit
de18dc085c
@@ -336,13 +336,19 @@ public class Hero extends Char {
|
||||
Barkskin bark = buff(Barkskin.class);
|
||||
|
||||
if (belongings.armor != null) {
|
||||
dr += Random.NormalIntRange( belongings.armor.DRMin(), belongings.armor.DRMax());
|
||||
int armDr = Random.NormalIntRange( belongings.armor.DRMin(), belongings.armor.DRMax());
|
||||
if (STR() < belongings.armor.STRReq()){
|
||||
dr -= 2*(belongings.armor.STRReq() - STR());
|
||||
dr = Math.max(dr, 0);
|
||||
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 (belongings.weapon != null) dr += Random.NormalIntRange( 0 , belongings.weapon.defenseFactor( this ) );
|
||||
if (bark != null) dr += Random.NormalIntRange( 0 , bark.level() );
|
||||
|
||||
return dr;
|
||||
|
||||
+3
-2
@@ -31,7 +31,6 @@ public class Stone extends Armor.Glyph {
|
||||
|
||||
@Override
|
||||
public int proc(Armor armor, Char attacker, Char defender, int damage) {
|
||||
//no proc effect, see armor.DrMin and the end of hero.getCloser
|
||||
|
||||
testing = true;
|
||||
float evasion = defender.defenseSkill(attacker);
|
||||
@@ -45,7 +44,9 @@ public class Stone extends Armor.Glyph {
|
||||
hitChance = 1f - (evasion/accuracy)/2f;
|
||||
}
|
||||
|
||||
//FIXME this is probably very OP, needs balancing
|
||||
//60% of dodge chance is applied as damage reduction
|
||||
hitChance = (2f + 3f*hitChance)/5f;
|
||||
|
||||
damage = (int)Math.ceil(damage * hitChance);
|
||||
|
||||
return damage;
|
||||
|
||||
Reference in New Issue
Block a user