using System; public class Program { public static void Main() { //Console.WriteLine("Unmodified Damage Total,Viral?,Corrosive?,Magnetic?"); //Sets output header Console.WriteLine("Avg damage to Infested, to Corpus, and to Grineer SP"); Random rnd = new Random(); //RNG generator double damageSlash = 875; //unmodded slash proc dps double damageOther = 1250; //unmodded other damaging proc dps - heat, electric, toxin, gas int[] supportTypes = new int[3]; //array to track viral, corrosive, and magnetic int[] rolls = new int[5]; //array to track rolls made int roll; //construction variable to store roll from RNG bool nonUniqueRoll = false; //construction variable to check if duplicate proc double damageTotalSlash; //output variable of total slash damage this run double damageTotalOther; //output variable of total other damage thus run double damage; //output variable of total damage before modifiers double[] damageFactions = new double[4]; //array of all damage calculated against factions (Infested multiplied by viral, Corpus by half mag and half viral, Grineer multiplied by 0.06 or 0.23 with corrosive or 1.0 for slash, then viral mult) //The 0.06 or 0.24 for grineer is assuming an armor value of 4700, reduced to 940 by 10-stack corrosive. This is a ballpark figure to estimate usefullness on steel path. damageFactions[0] = 0; damageFactions[1] = 0; damageFactions[2] = 0; double runs = 0; for (int j = 0; j < 1000000; j++) { runs++; for (int k = 0; k < 5; k++) //reset all constructors and outputs { rolls[k] = 13; } supportTypes[0] = 0; supportTypes[1] = 0; supportTypes[2] = 0; damage = 0; damageTotalSlash = 0; damageTotalOther = 0; for (int i = 0; i < 5; i++) { do //roll a new roll. Check if it's unique so far. Repeat if not. { roll = rnd.Next(13); nonUniqueRoll = false; for (int l = 0; l < i; l++) { if (roll == rolls[l]) { nonUniqueRoll = true; } } } while (nonUniqueRoll); rolls[i] = roll; //apply new roll } for (int m = 0; m < 5; m++) { if (rolls[m] == 0) //sum slash damage { damage += damageSlash; damageTotalSlash += damageSlash; } else if (rolls[m] < 5) //sum other damaging procs { damage += damageOther; damageTotalOther += damageOther; } else if (rolls[m] < 8) //update array with support procs { supportTypes[rolls[m]-5] = 1; } } /*for (int m = 0; m < 5; m++) //Test module - outputs the rolls to check for irregularities. { Console.Write("{0},",rolls[m]); }*/ //Console.WriteLine("{0},{1},{2},{3}",damage,supportTypes[0],supportTypes[1],supportTypes[2]); damageFactions[0] += damage * (1 + 3.25*supportTypes[0]); //Increase total damage dealt to Infested damageFactions[1] += damage * (1 + 1.625*(supportTypes[0] + supportTypes[2])); //Increase total damage dealt to Corpus damageFactions[2] += (damageTotalSlash + damageTotalOther*(0.06 + 0.18*supportTypes[1])) * (1 + 3.25*supportTypes[0]); } Console.WriteLine("{0},{1},{2},{3}",damageFactions[0]/runs,damageFactions[1]/runs,damageFactions[2]/runs,runs); } }