public static int Calc_Damage(DefenseTypes defense, DamageTypes damage) { int sum = 1; int[] dmg = damage.Get_Damages(); int[] def = defense.Defences.Get_Damages(); for (int i = 0; i < dmg.Length; i++) { int temp = dmg[i] - Dmg_Reduction(def[i]); sum += (temp > 0) ? temp : 0; } return(sum); }