Commits

Anonymous committed 8698c64

De-intensify the intensity.

Comments (1)

Files changed (1)

HamOntFire.Core/MapGenerator.cs

 
         private static byte GetIntensity(short units)
         {
-            // Intensity is calculated linearly so that 1 Unit = 50 intensity, and 20 (or greater) Units = 120 intensity
+            // Intensity is calculated linearly so that 1 Unit = 10 intensity, and 20 (or greater) Units = 50 intensity
             // Remember Grade 9 math class!  y = Intensity; x = Nbr of Units
+            //  Calculate m
+            //      m = delta y / delta x
+            //      m = (20 - 1) / (50 - 20)
+            //      m = 0.633
+            //
+            //  Calculate b
             //      y = mx + b
-            //      y = (3.684)x + 46.316
-            double y = (3.684*units) + 46.316;
-            if (y > 120)
-                return 120;
+            //      1 = (0.633)(10) + b
+            //      b = 5.33
+            //
+            //      y = mx + b
+            //      y = (0.633)x + 5.33
+            double y = (0.633 * units) + 5.33;
+            if (y > 50)
+                return 50;
             return Convert.ToByte(y);
         }
     }