From 42926d4f4b604ae7b08aa0934460291517f8c09d Mon Sep 17 00:00:00 2001 From: KJeff01 Date: Tue, 20 Oct 2020 14:06:25 -0500 Subject: [PATCH] Tweaks. --- multiplay/skirmish/Cobra.js | 6 ++- multiplay/skirmish/cobra_includes/adaption.js | 2 +- multiplay/skirmish/cobra_includes/build.js | 32 ++++++--------- multiplay/skirmish/cobra_includes/research.js | 8 ++-- multiplay/skirmish/cobra_includes/tactics.js | 39 ++++++++++++------- .../skirmish/cobra_rulesets/CobraStandard.js | 1 + 6 files changed, 45 insertions(+), 43 deletions(-) diff --git a/multiplay/skirmish/Cobra.js b/multiplay/skirmish/Cobra.js index 6c32b4b..78a51c6 100644 --- a/multiplay/skirmish/Cobra.js +++ b/multiplay/skirmish/Cobra.js @@ -48,26 +48,27 @@ const ESSENTIALS = [ "R-Struc-Research-Upgrade01", "R-Vehicle-Prop-Halftracks", "R-Vehicle-Body05", + "R-Wpn-MG-Damage03", ]; const ESSENTIALS_2 = [ "R-Vehicle-Metals02", "R-Cyborg-Metals02", "R-Struc-RprFac-Upgrade01", + "R-Wpn-MG3Mk1", "R-Sys-Autorepair-General", "R-Struc-Research-Upgrade09", "R-Struc-Power-Upgrade03a", "R-Struc-Factory-Upgrade09", ]; const ESSENTIALS_3 = [ - "R-Sys-Sensor-Upgrade01", "R-Vehicle-Prop-Hover", + "R-Sys-Sensor-Upgrade01", ]; const SYSTEM_UPGRADES = [ "R-Sys-MobileRepairTurretHvy", "R-Vehicle-Prop-Tracks", "R-Struc-RprFac-Upgrade06", "R-Sys-Sensor-Upgrade03", - "R-Sys-Resistance-Circuits", ]; const FLAMER = [ "R-Wpn-Flame2", @@ -79,6 +80,7 @@ const SENSOR_TECH = [ "R-Sys-Sensor-WSTower", "R-Sys-Sensor-UpLink", "R-Wpn-LasSat", + "R-Sys-Resistance-Circuits", ]; const DEFENSE_UPGRADES = [ "R-Struc-Materials09", diff --git a/multiplay/skirmish/cobra_includes/adaption.js b/multiplay/skirmish/cobra_includes/adaption.js index 775bd35..8ac682b 100644 --- a/multiplay/skirmish/cobra_includes/adaption.js +++ b/multiplay/skirmish/cobra_includes/adaption.js @@ -21,7 +21,7 @@ function switchOffMG() function useLasersForCyborgControl() { - return getResearch("R-Struc-Research-Upgrade08").done; + return getResearch("R-Struc-Research-Upgrade07").done; } function playerCyborgRatio(player) diff --git a/multiplay/skirmish/cobra_includes/build.js b/multiplay/skirmish/cobra_includes/build.js index ea35182..5939080 100644 --- a/multiplay/skirmish/cobra_includes/build.js +++ b/multiplay/skirmish/cobra_includes/build.js @@ -328,7 +328,7 @@ function lookForOil() //Ok, most oils are already owned so go ahead and defend all derricks from now one forceDerrickBuildDefense = true; } - if (!highOilMap() && forceDerrickBuildDefense) + if (mapOilLevel() !== "NTW" && forceDerrickBuildDefense) { protectUnguardedDerricks(); } @@ -612,7 +612,7 @@ function buildBaseStructures() { var haveAllies = (alliancesType === ALLIANCES_TEAMS) && (playerAlliance(true).length > 0); - if (getRealPower() < 500 && countAndBuild(structures.gen, 5)) + if (getRealPower() < 550 && countAndBuild(structures.gen, 5)) { return true; //a little fail-safe } @@ -620,33 +620,23 @@ function buildBaseStructures() { return true; } - if (haveAllies) + if (!researchComplete && countAndBuild(structures.lab, haveAllies ? 3 : 5)) { - if (!researchComplete && countAndBuild(structures.lab, 3)) - { - return true; - } - if (countAndBuild(FACTORY, 3)) - { - return true; - } + return true; } - else + if (countAndBuild(structures.gen, 1)) { - if (!researchComplete && countAndBuild(structures.lab, 5)) - { - return true; - } - if (countAndBuild(FACTORY, 3)) - { - return true; - } + return true; //a little fail-safe + } + if (countAndBuild(FACTORY, 3)) + { + return true; } if (countAndBuild(structures.hq, 1)) { return true; } - if (GOOD_POWER_LEVEL && countAndBuild(CYBORG_FACTORY, 3)) + if (countAndBuild(CYBORG_FACTORY, 3)) { return true; } diff --git a/multiplay/skirmish/cobra_includes/research.js b/multiplay/skirmish/cobra_includes/research.js index f00bd5a..ee72e66 100644 --- a/multiplay/skirmish/cobra_includes/research.js +++ b/multiplay/skirmish/cobra_includes/research.js @@ -158,9 +158,9 @@ function research() { antiCyborgChance = 35; } - if (antiCyborgChance > 0 && antiCyborgChance < 8) + if (antiCyborgChance > 0 && antiCyborgChance < 10) { - antiCyborgChance = 8; //just in case... + antiCyborgChance = 10; //just in case... } for (var i = 0, a = labList.length; i < a; ++i) @@ -374,9 +374,9 @@ function research() } } - if (!found && random(100) < 35) + if (!found && random(100) < 33) found = evalResearch(lab, weaponTech); - if (!found && !turnOffCyborgs && getResearch("R-Struc-Research-Upgrade04").done && random(100) < 15) + if (!found && !turnOffCyborgs && getResearch("R-Struc-Research-Upgrade04").done && random(100) < 20) found = evalResearch(lab, cyborgWeaps); if (!found && random(100) < 60) found = evalResearch(lab, extraTech); diff --git a/multiplay/skirmish/cobra_includes/tactics.js b/multiplay/skirmish/cobra_includes/tactics.js index 2bca693..bd498bd 100644 --- a/multiplay/skirmish/cobra_includes/tactics.js +++ b/multiplay/skirmish/cobra_includes/tactics.js @@ -371,7 +371,7 @@ function recycleForHover() { return; } - if (highOilMap() && (!startAttacking || (gameTime < 900000) || (countDroid(DROID_ANY, me) < 100))) + if (highOilMap() && (!startAttacking || (gameTime < 900000) || (countDroid(DROID_ANY, me) < 75))) { return; //wait } @@ -573,7 +573,7 @@ function enemyUnitsInBase() var high = highOilMap(); if (!startAttacking && - ((gameTime > high ? 600000 : 300000) || (enemyUnits.length > high ? 20 : 8)) && + ((gameTime > high ? 900000 : 300000) && (enemyUnits.length > high ? 20 : 8)) && enemyUnits[0].droidType !== DROID_CONSTRUCT && enemyUnits[0].droidType !== DROID_SENSOR) { @@ -626,13 +626,11 @@ function donateSomePower() //Have Cobra sit and wait and build up a small army before starting attack tactics. function haveEnoughUnitsForFirstAttack() { - var highOil = highOilMap(); - if (!startAttacking) { var amountOfAttackers = groupSize(attackGroup) + groupSize(artilleryGroup) + groupSize(vtolGroup); // These amounts of units will build up in base if unprovoked - startAttacking = amountOfAttackers >= (highOil ? 120 : 20); + startAttacking = amountOfAttackers >= (highOilMap() ? 120 : 20); } return startAttacking; @@ -658,19 +656,30 @@ function baseShuffleDefensePattern() {x1: area.x2 - 20, x2: area.x2, y1: area.y1, y2: area.y2,}, {x1: area.x1, x2: area.x2, y1: area.y2 - 20, y2: area.y2,}, ]; + var sector = quad[random(quad.length)]; + var x = sector.x1 + random(sector.x2); + var y = sector.y1 + random(sector.y2); + + if (x <= 2) + { + x = 2; + } + else if (x >= mapWidth - 2) + { + x = mapWidth - 2; + } + if (y <= 2) + { + y = 2; + } + else if (y >= mapHeight - 2) + { + y = mapHeight - 2; + } // Given that the base area has an additional 20 tiles of territory around the furthest base structure in a rectangel/square // we can safely tell units to go into this territory zone to keep trucks from being obstructed, maybe. for (var i = 0, len = attackers.length; i < len; ++i) { - var sector = quad[random(quad.length)]; - var x = sector.x1 + random(sector.x2); - var y = sector.y1 + random(sector.y2); - - if (x <= 2) { x = 2; } - else if (x >= mapWidth - 2) { x = mapWidth - 2; } - if (y <= 2) { y = 2; } - else if (y >= mapHeight - 2) { y = mapHeight - 2; } - orderDroidLoc(attackers[i], DORDER_SCOUT, x, y); } @@ -712,7 +721,7 @@ function shouldCobraAttack() { return true; } - else + else if (!startAttacking) { if (highOilMap()) { diff --git a/multiplay/skirmish/cobra_rulesets/CobraStandard.js b/multiplay/skirmish/cobra_rulesets/CobraStandard.js index c8fb189..3ecb12c 100644 --- a/multiplay/skirmish/cobra_rulesets/CobraStandard.js +++ b/multiplay/skirmish/cobra_rulesets/CobraStandard.js @@ -82,6 +82,7 @@ const weaponStats = // Extra things to research on this path, even if they don't lead to any new stuff extras: [ "R-Wpn-MG-Damage08", + "R-Wpn-MG-ROF03", ], }, flamers: