public float GetStabilityReduction(Creature creature, Item weapon)
{
var count = weapon != null ? weapon.Info.KnockCount + 1 : creature.RaceData.KnockCount + 1;
var speed = weapon != null ? (AttackSpeed)weapon.Data.AttackSpeed : (AttackSpeed)creature.RaceData.AttackSpeed;
// All values have been taken from the weapons data, the values in
// comments were estimates, mainly based on logs.
switch (count)
{
default:
case 1:
return 105;
case 2:
switch (speed)
{
default:
case AttackSpeed.VerySlow: return 67; // 70
case AttackSpeed.Slow: return 65; // 68
case AttackSpeed.Normal: return 65; // 68
case AttackSpeed.Fast: return 65; // 68
case AttackSpeed.VeryFast: return 65;
}
case 3:
switch (speed)
{
default:
case AttackSpeed.VerySlow: return 55; // 60
case AttackSpeed.Slow: return 52; // 56
case AttackSpeed.Normal: return 50; // 53
case AttackSpeed.Fast: return 49; // 50
case AttackSpeed.VeryFast: return 48;
}
case 4:
switch (speed)
{
default:
case AttackSpeed.VerySlow: return 42;
case AttackSpeed.Slow: return 40;
case AttackSpeed.Normal: return 39;
case AttackSpeed.Fast: return 36;
case AttackSpeed.VeryFast: return 37;
}
case 5:
switch (speed)
{
default:
case AttackSpeed.VerySlow: return 36;
case AttackSpeed.Slow: return 33;
case AttackSpeed.Normal: return 31.5f;
case AttackSpeed.Fast: return 30; // 40
case AttackSpeed.VeryFast: return 29.5f; // 35
}
}
}