Advertisement
Alsadius

BattleTech Random Loot Generator

Nov 20th, 2012
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 24.33 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6.  
  7. class Program
  8. {
  9.     public static Random die = new Random();
  10.     static void Main()
  11.     {
  12.         Console.WriteLine("Generate how many items?");
  13.         int n = int.Parse(Console.ReadLine());
  14.         Console.WriteLine();
  15.         for (int i = 0; i < n; i++)
  16.         {
  17.             makeSalvage();
  18.             Console.WriteLine();
  19.         }
  20.         Console.WriteLine("Press any key to exit");
  21.         Console.ReadLine();
  22.     }
  23.     static void makeSalvage()
  24.     {
  25.         int roll = roll2();
  26.         if (roll == 2)
  27.         {
  28.             support();//APCs, VTOLs, etc
  29.         }
  30.         else if (roll <= 4)
  31.         {
  32.             equipment();//armour, jump jets, heat sinks, electronics
  33.         }
  34.         else if (roll == 5)
  35.         {
  36.             Console.WriteLine(ballistic());
  37.         }
  38.         else if (roll == 6)
  39.         {
  40.             Console.WriteLine(missile());
  41.         }
  42.         else if (roll == 7)
  43.         {
  44.             ammo();
  45.         }
  46.         else if (roll == 8)
  47.         {
  48.             energy();
  49.         }
  50.         else if (roll == 9)
  51.         {
  52.             parts();
  53.         }
  54.         else if (roll == 10)
  55.         {
  56.             internals();
  57.         }
  58.         else
  59.         {
  60.             vehicle();//Tanks, Mechs, Fighters, and for the very lucky, a DropShip
  61.         }        
  62.     }
  63.     static int roll1()
  64.     {
  65.         return die.Next(1, 7);
  66.     }
  67.     static int roll2()
  68.     {
  69.         int sum = new int();
  70.         sum = (die.Next(1, 7) + die.Next(1, 7));
  71.         return sum;
  72.     }
  73.     static string weightClass()
  74.     {
  75.         int roll = roll1();
  76.         if (roll == 1)//determine class
  77.         {
  78.             return "light";
  79.         }
  80.         else if (roll == 2)
  81.         {
  82.             return "light";
  83.         }
  84.         else if (roll == 3)
  85.         {
  86.             return "medium";
  87.         }
  88.         else if (roll == 4)
  89.         {
  90.             return "medium";
  91.         }
  92.         else if (roll == 5)
  93.         {
  94.             return "heavy";
  95.         }
  96.         else
  97.         {
  98.             return "assault";
  99.         }
  100.     }
  101.     static int weight(string weight)
  102.     {
  103.         int[] light = { 0, 20, 20, 25, 30, 30, 35 };
  104.         int[] medium = { 0, 40, 40, 45, 45, 50, 55 };
  105.         int[] heavy = { 0, 60, 60, 65, 65, 70, 75 };
  106.         int[] assault = { 0, 80, 80, 85, 90, 95, 100 };
  107.         int roll = roll1();
  108.         if (weight == "light")
  109.         {
  110.             return light[roll];
  111.         }
  112.         else if (weight == "medium")
  113.         {
  114.             return medium[roll];
  115.         }
  116.         else if (weight == "heavy")
  117.         {
  118.             return heavy[roll];
  119.         }
  120.         else
  121.         {
  122.             return assault[roll];
  123.         }
  124.  
  125.     }
  126.     static void vehicle()
  127.     {
  128.         int roll = roll2();
  129.         string[] type = { "null", "ERROR", "plane", "plane", "plane", "tank", "tank", "tank", "tank", "tank", "Mech", "Mech", "DropShip" };
  130.         Console.WriteLine("A random " + weightClass() + "-class " + type[roll] + condition());
  131.     }
  132.     static string condition()//condition of random units
  133.     {
  134.         int roll = roll2();
  135.         string[] condition = { "null", "ERROR", ", with 1 internal structure and all destructible parts destroyed", ", with half its usual IS and all destructible parts destroyed", ", with 1 random destructible location destroyed, and all other locations having no armour and taken 1 crit", ", with 1 random destructible location destroyed, 1 random location having no armour and taken 1 crit, and all other locations having half armour", ", with 2 random locations having no armour and taken 1 crit, and all other locations having half armour", ", with 1 random location having no armour and taken 1 crit, and all other locations having half armour", " that has taken 50 damage", " that has taken 20 damage", " that has taken 10 damage", " with no ammunition", " in pristine condition" };
  136.         return condition[roll];
  137.     }
  138.     static void support()
  139.     {
  140.         int roll = roll2();
  141.         string[] support = { "null", "ERROR", "MASH", "Jeep", "Exoskeleton", "Truck(Armed)", "Truck(Unarmed)", "APC(Unarmed)", "APC(Armed)", "Scout VTOL", "Combat VTOL", "Headquarters", "Maintenance Bay" };
  142.         Console.WriteLine(support[roll]);
  143.     }
  144.     static void internals()
  145.     {
  146.         int roll = roll2();
  147.         if (roll == 2)
  148.         {
  149.             Console.WriteLine("Life Support");
  150.         }
  151.         else if (roll == 3)
  152.         {
  153.             Console.WriteLine("Life Support");
  154.         }
  155.         else if (roll == 4)
  156.         {
  157.             Console.WriteLine("Cockpit");
  158.         }
  159.         else if (roll == 5)
  160.         {
  161.             Console.WriteLine("Sensors for a " + weight(weightClass()) + "-ton mech");
  162.         }
  163.         else if (roll == 6)
  164.         {
  165.             actuators();
  166.         }
  167.         else if (roll == 7)
  168.         {
  169.             actuators();
  170.         }
  171.         else if (roll == 8)
  172.         {
  173.             actuators();
  174.         }
  175.         else if (roll == 9)
  176.         {
  177.             gyros();
  178.         }
  179.         else if (roll == 10)
  180.         {
  181.             engines();
  182.         }
  183.         else if (roll == 11)
  184.         {
  185.             engines();
  186.         }
  187.         else
  188.         {
  189.             engines();
  190.         }
  191.     }
  192.     static void actuators()
  193.     {
  194.         int roll = roll1();
  195.         int tons = weight(weightClass());
  196.         string[] type = { "null", "Upper Arm", "Lower Arm", "Hand", "Upper Leg", "Lower Leg", "Foot" };
  197.         Console.WriteLine(type[roll]+" actuator for a "+tons+"-ton Mech");
  198.     }
  199.     static void gyros()
  200.     {
  201.         int tons = roll1();
  202.         int roll = roll1();
  203.         string type = "";
  204.         float[] weight = { 0, 1, 2, 2, 3, 3, 4 };
  205.  
  206.         //gyro type(IS T2)    
  207.         roll = roll1();
  208.         if (roll == 5)
  209.         {
  210.             type = "XL";
  211.         }
  212.         else if (roll == 6)
  213.         {
  214.             roll = roll1();
  215.             if (roll >= 3)
  216.             {
  217.                 type = "Compact";
  218.             }
  219.             else
  220.             {
  221.                 type = "Heavy-Duty";
  222.             }
  223.         }
  224.         else
  225.         {
  226.             type = "Standard";
  227.         }
  228.  
  229.         //print results
  230.         Console.WriteLine("IS T1: "+weight[tons]+"-ton standard gyro");
  231.         if (type == "XL")
  232.         {
  233.             Console.WriteLine("IS T2: " + weight[tons] / 2 + "-ton XL gyro");
  234.         }
  235.         else if (type == "Standard")
  236.         {
  237.             Console.WriteLine("IS T2: " + weight[tons] + "-ton standard gyro");
  238.         }
  239.         else
  240.         {
  241.             Console.WriteLine("IS T2: " + weight[tons] * 2 + "-ton " + type + " gyro");
  242.         }
  243.         Console.WriteLine("Clan: " + weight[tons] + "-ton standard gyro");
  244.     }
  245.     static void engines()
  246.     {
  247.         int roll = roll1();
  248.         string weight = weightClass();
  249.         Console.WriteLine("IS T1: Standard engine with rating equal to a random "+weight+"-class Mech");
  250.         if (roll >= 2)
  251.         {
  252.             Console.WriteLine("IS T2: Standard engine with rating equal to a random " + weight + "-class Mech");
  253.             Console.WriteLine("Clan: Standard engine with rating equal to a random " + weight + "-class Mech");
  254.         }
  255.         else if (roll == 3)
  256.         {
  257.             Console.WriteLine("IS T2: Light engine with rating equal to a random " + weight + "-class Mech");
  258.             Console.WriteLine("Clan: XL engine with rating equal to a random " + weight + "-class Mech");
  259.         }
  260.         else if (roll == 4)
  261.         {
  262.             Console.WriteLine("IS T2: Light engine with rating equal to a random " + weight + "-class Mech");
  263.             Console.WriteLine("Clan: XL engine with rating equal to a random " + weight + "-class Mech");
  264.         }
  265.         else
  266.         {
  267.             Console.WriteLine("IS T2: XL engine with rating equal to a random " + weight + "-class Mech");
  268.             Console.WriteLine("Clan: XL engine with rating equal to a random " + weight + "-class Mech");
  269.         }
  270.     }
  271.     static void parts()
  272.     {
  273.         string[] part = { "null", "ERROR", "Right Leg", "Turret", "Right Leg", "Right Torso", "Right Arm", "Head", "Left Arm", "Left Torso", "Left Leg", "Turret", "Left Leg" };
  274.         int roll = roll2();
  275.         int tons = weight(weightClass());
  276.         int turretTons = 0;//using 1d6 d6, to give a reasonable spread of weights
  277.         int turretTemp = roll1(); //the first 1d6, determining how many d6 are rolled to produce the actual result
  278.         for (int i=1; i <= turretTemp; i++)
  279.         {
  280.             turretTons += roll1();
  281.         }
  282.         if (part[roll] == "Turret")
  283.         {
  284.             Console.WriteLine("Turret with a capacity of "+turretTons+" tons");
  285.         }
  286.         else
  287.         {
  288.             Console.WriteLine(part[roll]+" for a "+tons+"-ton Mech.");
  289.         }
  290.     }
  291.     static void ammo()//still need to include alternate missile/AC ammos
  292.     {
  293.         int tons = roll1(); //tons of the ammo - bombs assumed to be 200kg
  294.         int roll = roll2();
  295.         int type = roll1(); //type for arty/bomb ammo
  296.         int type2 = roll2(); //type for Narc ammo
  297.         string[] bombsT1 = { "null", "HE", "HE", "HE", "Cluster", "Cluster", "Cluster" };
  298.         string[] bombsT2 = { "null", "HE", "HE", "Laser-Guided", "Cluster", "Cluster", "Rocket" };
  299.         string[] narcIS = { "null", "ERROR", "Nemesis iNarc", "Nemesis iNarc", "Explosive iNarc", "Homing iNarc", "Homing iNarc", "Homing Narc", "Homing Narc", "Explosive Narc", "Haywire iNarc", "ECM iNarc", "ECM iNarc" };
  300.         string[] narcClan = { "null", "ERROR", "Explosive", "Explosive", "Explosive", "Homing", "Homing", "Homing", "Homing", "Explosive", "Explosive", "Explosive", "Explosive" };
  301.         string[] artyType = { "null", "Sniper", "Sniper", "Thumper", "Thumper", "Long Tom", "Long Tom" };
  302.         string[] arty = { "null", "ERROR", "Smoke", "Flare", "HE", "HE", "HE", "Homing/Copperhead", "Homing/Copperhead", "Cluster", "Cluster", "Flechette", "Thunder" };
  303.         string[] arrowFancy = { "null", "Air Defence", "Air Defence", "Inferno", "Inferno", "Laser-Inhibiting", "Laser-Inhibiting" };
  304.         string[] arrowThunder = { "null", "-FASCAM", "-FASCAM", "-FASCAM", "-FASCAM", "-Vibrabomb", "-Active" };
  305.         string[] acFancy = { "null", "ERROR", "AP", "AP", "Flechette", "Standard", "Standard", "Standard", "Standard", "Standard", "Precision", "Precision", "Precision" };
  306.         string[] srmFancy = { "null", "ERROR", "Inferno", "Inferno", "Inferno", "Standard", "Standard", "Standard", "Standard", "Narc", "Artemis", "Artemis", "Fragmentation" };
  307.         string[] lrmFancy = { "null", "ERROR", "Semi-Guided", "Swarm", "Thunder", "Standard", "Standard", "Standard", "Standard", "Artemis", "Narc", "Flare", "Fragmentation" };
  308.         string[] lrmThunder = { "null", "ERROR", "-Vibrabomb", "-Vibrabomb", "-Augmented", "", "", "", "", "", "-Inferno", "-Active", "-Active" };
  309.         string[] mml = { "null", "SRM", "SRM", "SRM", "LRM", "LRM", "LRM" };
  310.         string[] atm = { "null", "ER", "ER", "Standard", "Standard", "HE", "HE" };
  311.         string ball = ballistic();
  312.         string miss = missile();
  313.         //add fancy ammo types to ballistic/missile rolls
  314.         if (ball.IndexOf("Standard AC") >= 0)//indexOf returns -1 if not found, so nonnegative result means the string exists
  315.         {
  316.             ball += " (";
  317.             ball += acFancy[type2];
  318.             ball += " ammo for IS T2)";
  319.         }
  320.         if (miss.IndexOf("/LRM") >= 0)
  321.         {
  322.             miss += " (";
  323.             miss += lrmFancy[type2];
  324.             if (type2 == 4)//Multiple Thunder types
  325.             {
  326.                 miss += lrmThunder[type2];
  327.             }
  328.             miss += " LRM ammo)";
  329.         }
  330.         if (miss.IndexOf("/SRM") >= 0)
  331.         {
  332.             miss += " (";
  333.             miss += srmFancy[type2];
  334.             miss += " SRM ammo)";
  335.         }
  336.         if (miss.IndexOf("MML") >= 0)
  337.         {
  338.             miss += " (";
  339.             miss += mml[type];
  340.             miss += " MML ammo)";
  341.         }
  342.         if (miss.IndexOf("ATM") >= 0)
  343.         {
  344.             miss += " (";
  345.             miss += atm[type];
  346.             miss += " ATM ammo)";
  347.         }
  348.  
  349.         //divvy ammos
  350.         if (roll == 2)
  351.         {
  352.             Console.WriteLine(tons + " tons of ammo for a " + ball.Substring(0, 1+ball.IndexOf(")"))); //Returns the IS T1 portion only
  353.             Console.WriteLine(tons + " tons of ammo for an AMS (IS T2)");
  354.             Console.WriteLine(tons + " tons of ammo for an AMS (Clan)");
  355.         }
  356.         else if (roll == 3)
  357.         {
  358.             Console.WriteLine(tons + " tons of ammo for a " + ball.Substring(0, 1+ball.IndexOf(")"))); //Returns the IS T1 portion only
  359.             Console.WriteLine(tons + " tons of " + narcIS[type2] + " ammo");
  360.             Console.WriteLine(tons + " tons of " + narcClan[type2] + " Narc ammo");
  361.         }
  362.         else if (roll <= 6)
  363.         {
  364.             Console.WriteLine(tons + " tons of ammo for a " + ball);
  365.         }
  366.         else if (roll <= 9)
  367.         {
  368.             Console.WriteLine(tons + " tons of ammo for a " + miss);
  369.         }
  370.         else if (roll == 10)
  371.         {
  372.             Console.WriteLine(tons + " tons of ammo for a " + miss.Substring(0, 1+miss.IndexOf(")"))); //Returns the IS T1 portion only            
  373.             Console.WriteLine(tons + " tons of " + artyType[type] + " " + arty[type2] + " ammo");
  374.             Console.WriteLine(tons + " tons of " + artyType[type] + " " + arty[type2] + " ammo");
  375.         }
  376.         else if (roll == 11)
  377.         {
  378.             Console.WriteLine(tons + " tons of ammo for a " + miss.Substring(0, 1+miss.IndexOf(")"))); //Returns the IS T1 portion only  
  379.             if (type2 == 11)//Arty gets Flechette on 11, but IS Arrow IV gets three possible rare ammos, and Clan just takes Cluster
  380.             {
  381.                 Console.WriteLine(tons + " tons of " + arrowFancy[type] + " Arrow IV ammo");
  382.                 Console.WriteLine(tons + " tons of Cluster Arrow IV ammo");
  383.             }
  384.             else if (type2 == 12)//IS Arrow IV has 3 types of Thunder ammo
  385.             {
  386.                 Console.WriteLine(tons + " tons of Arrow IV Thunder" + arrowThunder[type] + " ammo");
  387.                 Console.WriteLine(tons + " tons of Arrow IV Thunder-FASCAM ammo");
  388.             }
  389.             else
  390.             {
  391.                 Console.WriteLine(tons + " tons of Arrow IV " + arty[type2] + " ammo");
  392.                 Console.WriteLine(tons + " tons of Arrow IV " + arty[type2] + " ammo");
  393.             }
  394.         }
  395.         else
  396.         {
  397.             Console.WriteLine(tons * 5 + " " + bombsT1[type] + " bombs(IS T1)");
  398.             Console.WriteLine(tons * 5 + " " + bombsT2[type] + " bombs(IS T2)");
  399.             Console.WriteLine(tons * 5 + " " + bombsT1[type] + " bombs(Clan)");
  400.         }
  401.     }
  402.     static string ballistic()//missile/ballistic paths return a string instead of outputting directly, to avoid redundancy in the Ammunition section
  403.     { //formatting for the return will be "[name] (IS T1)/[name] (IS T2)/[name] (Clan)"
  404.         int roll = roll2();
  405.         int type = roll1();
  406.         string[] isSmall = { "null", "Standard", "Standard", "Rotary", "Rotary", "LBX", "Ultra" };
  407.         string[] isLarge = { "null", "Standard", "Standard", "Standard", "LBX", "LBX", "Ultra" };
  408.         string[] clan = { "null", "LBX", "LBX", "LBX", "Ultra", "Ultra", "Ultra" };
  409.         string[] size = { "null", "Light", "Standard", "Standard", "Standard", "Standard", "Heavy" };//IS Gauss, all MG
  410.         int[] hag = { 0, 20, 20, 30, 30, 40, 40 };
  411.         if (roll <= 3)
  412.         {
  413.             return ("Machine Gun(IS T1)/" + size[type] + " Machine Gun(IS T2)/" + size[type] + " Machine Gun(Clan)");
  414.         }
  415.         else if (roll == 4)
  416.         {
  417.             return ("AC-2(IS T1)/" + isSmall[type] + " AC-2(IS T2)/" + clan[type] + " AC-2(Clan)");
  418.         }
  419.         else if (roll == 5)
  420.         {
  421.             return ("AC-2(IS T1)/" + isSmall[type] + " AC-5(IS T2)/" + clan[type] + " AC-5(Clan)");
  422.         }
  423.         else if (roll == 6)
  424.         {
  425.             return ("AC-5(IS T1)/" + isSmall[type] + " AC-5(IS T2)/" + clan[type] + " AC-5(Clan)");
  426.         }
  427.         else if (roll == 7)
  428.         {
  429.             return ("AC-5(IS T1)/" + size[type] + " Gauss Rifle(IS T2)/Gauss Rifle(Clan)");
  430.         }
  431.         else if (roll <= 9)
  432.         {
  433.             return ("AC-10(IS T1)/" + isLarge[type] + " AC-10(IS T2)/" + clan[type] + " AC-10(Clan)");
  434.         }
  435.         else
  436.         {
  437.             return ("AC-20(IS T1)/" + isLarge[type] + " AC-20(IS T2)/" + clan[type] + " AC-20(Clan)");
  438.         }
  439.     }
  440.     static string missile()
  441.     {
  442.         int roll = roll2();
  443.         int type = roll1();
  444.         int[] lrm = { 0, 5, 10, 10, 15, 15, 20 };
  445.         int[] srm = { 0, 2, 2, 4, 4, 6, 6 };
  446.         int[] rocket = { 0, 10, 10, 15, 15, 20, 20 };
  447.         int[] mrm = { 0, 10, 20, 20, 30, 30, 40 };
  448.         int[] mml = { 0, 3, 5, 5, 7, 7, 9 };
  449.         int[] atm = { 0, 3, 6, 6, 9, 9, 12 };
  450.         if (roll == 2)
  451.         {
  452.             return ("SR Torpedo-" + srm[type] + "(IS T1)/SR Torpedo-" + srm[type] + "(IS T2)/SR Torpedo-" + srm[type] + "(Clan)");
  453.         }
  454.         else if (roll <= 4)
  455.         {
  456.             return ("SRM-" + srm[type] + "(IS T1)/MML-" + mml[type] + "(IS T2)/ATM-" + atm[type] + "(Clan)");
  457.         }
  458.         else if (roll == 5)
  459.         {
  460.             return ("SRM-" + srm[type] + "(IS T1)/MRM-" + mrm[type] + "(IS T2)/ATM-" + atm[type] + "(Clan)");
  461.         }
  462.         else if (roll == 6)
  463.         {
  464.             return ("SRM-" + srm[type] + "(IS T1)/SRM-" + srm[type] + "(IS T2)/SRM-" + srm[type] + "(Clan)");
  465.         }
  466.         else if (roll == 7)
  467.         {
  468.             return ("SRM-" + srm[type] + "(IS T1)/Streak SRM-" + srm[type] + "(IS T2)/Streak SRM-" + srm[type] + "(Clan)");
  469.         }
  470.         else if (roll <= 9)
  471.         {
  472.             return ("LRM-" + lrm[type] + "(IS T1)/LRM-" + lrm[type] + "(IS T2)/LRM-" + lrm[type] + "(Clan)");
  473.         }
  474.         else if (roll <= 11)
  475.         {
  476.             return ("LRM-" + lrm[type] + "(IS T1)/Rocket Launcher-" + rocket[type] + "(IS T2)/LRM-" + lrm[type] + "(Clan)");
  477.         }
  478.         else
  479.         {
  480.             return ("LR Torpedo-" + lrm[type] + "(IS T1)/LR Torpedo-" + lrm[type] + "(IS T2)/LR Torpedo-" + lrm[type] + "(Clan)");
  481.         }        
  482.     }
  483.     static void energy()
  484.     {
  485.         string[] lasersIS = { "null", "Standard", "Standard", "Standard", "Pulse", "ER", "ER" };
  486.         string[] lasersClan = { "null", "Heavy", "Pulse", "Pulse", "Pulse", "ER", "ER" };
  487.         string[] PPC = { "null", "Standard", "Standard", "Snub-Nose", "Light", "Heavy", "ER" };
  488.         int roll = roll2();
  489.         int type = roll1();
  490.         if (roll <= 3)
  491.         {
  492.             Console.WriteLine("Flamer");
  493.         }
  494.         else if (roll == 4)
  495.         {
  496.             Console.WriteLine("Small Laser(IS T1)");
  497.             Console.WriteLine(lasersIS[type]+" Small Laser(IS T2)");
  498.             Console.WriteLine(lasersClan[type]+" Micro Laser(Clan)");
  499.         }
  500.         else if (roll == 5)
  501.         {
  502.             Console.WriteLine("Small Laser(IS T1)");
  503.             Console.WriteLine(lasersIS[type] + " Small Laser(IS T2)");
  504.             Console.WriteLine(lasersClan[type] + " Small Laser(Clan)");
  505.         }
  506.         else if (roll == 6)
  507.         {
  508.             Console.WriteLine("PPC(IS T1)");
  509.             Console.WriteLine(PPC[type] + " PPC(IS T2)");
  510.             Console.WriteLine("ER PPC(Clan)");
  511.         }
  512.         else if (roll <= 9)
  513.         {
  514.             Console.WriteLine("Medium Laser(IS T1)");
  515.             Console.WriteLine(lasersIS[type] + " Medium Laser(IS T2)");
  516.             Console.WriteLine(lasersClan[type] + " Medium Laser(Clan)");
  517.         }
  518.         else
  519.         {
  520.             Console.WriteLine("Large Laser(IS T1)");
  521.             Console.WriteLine(lasersIS[type] + " Large Laser(IS T2)");
  522.             Console.WriteLine(lasersClan[type] + " Large Laser(Clan)");
  523.         }
  524.     }
  525.     static void equipment()
  526.     {
  527.         int roll = roll2();
  528.         int type = roll1();
  529.         int grade = roll1();//Used for determining standard/fancy equipment
  530.         int grade2 = roll2();//Used for armour
  531.         int tons = roll1();//Used for armour
  532.         float[] jumpJets = { 0, 0.5F, 0.5F, 1, 1, 1, 2 };//"F" converts to float - note that standard/improved are covered by "grade", so no string[]
  533.         string[] aPod = { "null", "A-Pod", "A-Pod", "A-Pod", "A-Pod", "B-Pod", "B-Pod" };
  534.         string[] ams = { "null", "AMS", "AMS", "AMS", "AMS", "Laser AMS", "Laser AMS" };//Clan only
  535.         string[] electronics = { "null", "ERROR", "Narc", "Narc", "Narc", "Artemis IV", "Artemis IV", "Beagle Probe", "Guardian ECM", "Targeting Computer", "Targeting Computer", "Targeting Computer" };
  536.         string[] c3 = { "null", " Slave", " Slave", " Slave", " Slave", " Master", "i" };//IS only
  537.         string[] narc = { "null", "Narc", "Narc", "Narc", "Narc", "Narc-Improved", "Narc-Improved" };//IS only
  538.         string[] hs = { "null", "Single", "Single", "Single", "Double", "Double", "Double" };//IS only
  539.         string[] armorIS = { "null", "ERROR", "Light Ferro Fibre", "Light Ferro Fibre", "Heavy Ferro Fibre", "Ferro Fibre", "Ferro Fibre", "Standard", "Standard", "Standard", "Standard", "Stealth", "Stealth" };
  540.         string[] armorClan = { "null", "ERROR", "Ferro Fibre", "Ferro Fibre", "Ferro Fibre", "Ferro Fibre", "Ferro Fibre", "Standard", "Standard", "Standard", "Standard", "Standard", "Standard" };
  541.         double tcTons = 0;//using 1d6 d6, to give a reasonable spread of weights - actual TC weight will be the minimum needed to fire 1d6d6 tons of weapons
  542.         for (int i = 1; i <= grade; i++)//grade is the first 1d6, determining how many d6 are rolled to produce the actual result
  543.         {
  544.             tcTons += roll1();
  545.         }        
  546.         if (roll == 2)
  547.         {
  548.             Console.WriteLine("IS T1: Heat Sink");
  549.             Console.WriteLine("IS T2: " + aPod[grade]);
  550.             Console.WriteLine("Clan: " + aPod[grade]);
  551.         }
  552.         else if (roll == 3)
  553.         {
  554.             Console.WriteLine("IS T1: Heat Sink");
  555.             Console.WriteLine("IS T2: AMS");
  556.             Console.WriteLine("Clan: " + ams[grade]);
  557.         }
  558.         else if (roll <= 5)
  559.         {
  560.             Console.WriteLine("IS T1: Heat Sink");
  561.             Console.WriteLine("IS T2: " + hs[grade] + " Heat Sink");
  562.             Console.WriteLine("Clan: Double Heat Sink");
  563.         }
  564.         else if (roll <= 7)
  565.         {
  566.             Console.WriteLine("IS T1: " + tons + " tons of armour");
  567.             Console.WriteLine("IS T2: " + tons + " tons of " + armorIS[grade2] + " armour");
  568.             Console.WriteLine("Clan: " + tons + " tons of " + armorClan[grade2] + " armour");
  569.         }
  570.         else if (roll <= 9)
  571.         {
  572.             Console.WriteLine("IS T1: " + tons + " tons of armour");
  573.             if (grade2 >= 10)
  574.             {
  575.                 Console.WriteLine("IS T2: C3" + c3[grade]);
  576.                 Console.WriteLine("Clan: " + Math.Ceiling(tcTons / 5) + "-ton Targeting Computer");
  577.             }
  578.             else if (grade2 == 9)
  579.             {
  580.                 Console.WriteLine("IS T2: " + Math.Ceiling(tcTons / 4) + "-ton Targeting Computer");
  581.                 Console.WriteLine("Clan: " + Math.Ceiling(tcTons / 5) + "-ton Targeting Computer");
  582.             }
  583.             else if (grade2 <= 4)
  584.             {
  585.                 Console.WriteLine("IS T2: " + narc[grade]);
  586.                 Console.WriteLine("Clan: " + electronics[grade2]);
  587.             }
  588.             else
  589.             {
  590.                 Console.WriteLine("IS T2: " + electronics[grade2]);
  591.                 Console.WriteLine("Clan: " + electronics[grade2]);
  592.             }
  593.         }
  594.         else if (roll <= 11)
  595.         {
  596.             Console.WriteLine("IS T1: A " + jumpJets[type] + "-ton jump jet");
  597.             if (grade >= 5)
  598.             {
  599.                 Console.WriteLine("IS T2: A " + jumpJets[type] * 2 + "-ton improved jump jet");
  600.             }
  601.             else
  602.             {
  603.                 Console.WriteLine("IS T2: A " + jumpJets[type] + "-ton jump jet");
  604.             }
  605.             Console.WriteLine("Clan: A " + jumpJets[type] + "-ton jump jet");
  606.         }
  607.         else
  608.         {
  609.             Console.WriteLine("IS T1: A " + jumpJets[type] + "-ton jump jet");
  610.             Console.WriteLine("IS T2: TAG");
  611.             Console.WriteLine("Clan: TAG");
  612.         }
  613.     }
  614. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement