Quick games: Add rare "floating flowers" map type
authorWuzzy <Wuzzy2@mail.ru>
Wed, 15 May 2019 19:43:53 +0200
changeset 14983 da7eb3414e02
parent 14982 575dbd7b5f43
child 14984 2d5f1dc637da
Quick games: Add rare "floating flowers" map type
QTfrontend/game.cpp
--- a/QTfrontend/game.cpp	Wed May 15 17:47:56 2019 +0200
+++ b/QTfrontend/game.cpp	Wed May 15 19:43:53 2019 +0200
@@ -177,12 +177,15 @@
             r = 0;
         else
             r = 1;
-    } else if(r < 7500) { // 22.5%
+    } else if(r < 7490) { // 22.4%
         // Perlin
         if(exp <= 7)
             r = 1;
         else
             r = 2;
+    } else if(r < 7500 && exp >= 5) { // 0.1%
+        // Floating Flowers (just for fun)
+        r = 5;
     } else if(r < 8750) { // 12.5%
         // Image map
         r = 3;
@@ -257,6 +260,16 @@
             HWProto::addStringToBuffer(teamscfg, "e$feature_size "+QString::number(rand()%20+1));
             break;
         }
+        // Floating Flowers
+        // (actually empty map; this forces the engine to generate fallback structures to have
+        // something for hogs to stand on)
+        case 5: {
+            minhogs = 4;
+            maxhogs = 8;
+            HWProto::addStringToBuffer(teamscfg, "e$mapgen 3");
+            HWProto::addStringToBuffer(teamscfg, "e$feature_size "+QString::number(rand()%4+3));
+            break;
+        }
     }
 
     // Theme