09-11-2019, 10:16 AM
(This post was last modified: 09-11-2019, 10:20 AM by Kriegstofu.)
found another tidbit of information, this time about damage absorption depending on shield resistance (shield hit on your back)
This is useful for Zwei/Jugg using a 2h with a shield or RGs with 2 Shields when being used on cav with a swing from left to right while on horse (as your back moves to your front)
the important part here is
which means the higher your shields resistance is, the higher your backs total armor rating is
this only counts for projectiles, not for melee hits
This is useful for Zwei/Jugg using a 2h with a shield or RGs with 2 Shields when being used on cav with a swing from left to right while on horse (as your back moves to your front)
Code:
armor = appropriate_armor_value_for_hit_location
if hit_shield_on_back:
armor += shield_resistance + 10
soak_factor = armor * module.ini_soak_factor_for_damage_type
reduction_factor = armor * module.ini_reduction_factor_for_damage_type
if item_flags & itp_extra_penetration:
soak_factor *= module.ini_extra_penetration_soak_factor
reduction_factor *= module.ini_extra_penetration_reduction_factor
randomized_soak = (random.random() * 0.55 + 0.45) * soak_factor
randomized_damage = (random.random() * 0.1 + 0.9) * raw_damage
soaked_damage = randomized_damage - randomized_soak
if (soaked_damage < 0.0):
soaked_damage = 0.0
randomized_reduction = math.exp((random.random() * 0.55 + 0.45) * reduction_factor * 0.014)
reduced_damage = (1.0 - 1.0 / randomized_reduction) * soaked_damage
if (reduction_factor < 0.00001):
reduced_damage = 0.0
damage_difference = round(reduced_damage + randomized_soak)
effective_damage = randomized_damage - damage_difference
if hit_bone == head:
effective_damage *= 1.2
if item_is_ranged:
effective_damage *= 1.75
elif hit_bone == calf or hit_bone == thigh:
effective_damage *= 0.9
effective_damage = clamp(effective_damage, 0.0, 500.0)
Code:
if hit_shield_on_back:
armor += shield_resistance + 10
this only counts for projectiles, not for melee hits