Lizard: 100 HP, 10 AP, 4 attack cost, 40 AC, 1-4 damage, 120 BC, 5 DR
My character: 37 HP, 10 AP, 3 attack cost, 132 AC, 19-24 damage, 31 BC, 1 DR
Since the AC-to-BC difference is almost equal, the two actors land hits about equally often. Each hit of mine does around 16.5 damage, so the lizard dies in about 6 hits. Each hit from the lizard does around 1.5 damage, so it would likely take over 20 hits for my character to die. My character also gets more attacks per turn, so it's a pretty straightforward win.
The game appears to be assigning a difficulty of "Very hard" to this match-up due to a bug in CombatController::getAverageDamagePerHit. In particular, DR is taken into account after scaling damage based on the chance of hitting, effectively applying DR to misses.
There are a couple other errors of note in the same function:
- DR is applied to the average damage, which doesn't account for scenarios where the low end of the damage range would be negative
- Critical hits are added to the average damage as if they happen in addition to a normal hit, rather than replacing a normal hit (effectively increasing the critical multiplier by 100%)
Code: Select all
private static float getAverageDamagePerHit(Actor attacker, Actor target) {
Range scaledDamage = new Range(attacker.getDamagePotential());
scaledDamage.subtract(target.getDamageResistance(), false);
float result = scaledDamage.averagef();
if (hasCriticalAttack(attacker, target)) {
result += (float) attacker.getEffectiveCriticalChance() * result * (attacker.getCriticalMultiplier() - 1) / 100;
}
result = (float) (getAttackHitChance(attacker, target)) * result / 100;
return result;
}
- Delay applying hit chance until the end, since a miss does 0 damage no matter what
- Apply DR to the damage potential before taking the average to let the Range util class handle underflow
- Subtract 1 from the crit multiplier to avoid overcounting crit damage