public static void Main()
double smithingSkill = 0,
bool hasSmithingPerk = false;
DamageCalculator damageCalculator =
new DamageCalculator(smithingSkill, smithingEnchant, smithingPotion,
weaponSkill, perkEffect, itemEffect, potionEffect,
seekerOfMight, hasSmithingPerk);
damageCalculator.RunCalculations(baseDamage, arrowDamage);
public class DamageCalculator
private double smithingSkill;
private double smithingEnchant;
private double smithingPotion;
private double weaponSkill;
private double perkEffect;
private double itemEffect;
private double potionEffect;
private double seekerOfMight;
private bool hasSmithingPerk;
public DamageCalculator(double smithingSkill, double smithingEnchant, double smithingPotion,
double weaponSkill, double perkEffect, double itemEffect,
double potionEffect, double seekerOfMight, bool hasSmithingPerk)
this.smithingSkill = smithingSkill;
this.smithingEnchant = smithingEnchant;
this.smithingPotion = smithingPotion;
this.weaponSkill = weaponSkill;
this.perkEffect = perkEffect;
this.itemEffect = itemEffect;
this.potionEffect = potionEffect;
this.seekerOfMight = seekerOfMight;
this.hasSmithingPerk = hasSmithingPerk;
public void RunCalculations(int baseDamage, int arrowDamage)
double displayedWeaponDamage = Math.Floor(
(baseDamage + GetSmithingQuality())
Console.Write(displayedWeaponDamage);
private double GetSmithingQuality()
if (smithingSkill < 14) { return 0; }
* (1 + (hasSmithingPerk ? 1 : 0))
double qualityLevel = Math.Floor((effectiveSkill + 38) * 3 / 103);
double smithingQuality = 3.6 * qualityLevel - 1.6;
return Math.Ceiling(smithingQuality/2);