Skip to content

Commit

Permalink
Small tweak to tactics and build.
Browse files Browse the repository at this point in the history
  • Loading branch information
KJeff01 committed Dec 11, 2017
1 parent 8b742f2 commit a6df80c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
9 changes: 6 additions & 3 deletions multiplay/skirmish/Cobra.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const ESSENTIALS = [
"R-Struc-PowerModuleMk1",
"R-Struc-Research-Upgrade09",
"R-Struc-Power-Upgrade03a",
"R-Sys-Autorepair-General",
];
const ESSENTIALS_2 = [
"R-Vehicle-Prop-Halftracks",
Expand All @@ -46,7 +47,6 @@ const ESSENTIALS_2 = [
];
const SYSTEM_UPGRADES = [
"R-Vehicle-Prop-Hover",
"R-Sys-Autorepair-General",
"R-Struc-RprFac-Upgrade06",
"R-Struc-Factory-Upgrade09",
];
Expand Down Expand Up @@ -172,7 +172,7 @@ var subPersonalities =
"systemPriority": 30,
"alloyPriority": 10,
"useLasers": false,
"resPath": "offensive",
"resPath": "generic",
"res": [
"R-Wpn-Rocket02-MRL",
],
Expand Down Expand Up @@ -208,7 +208,10 @@ var subPersonalities =
"useLasers": false,
"resPath": "offensive",
"res": [
"R-Wpn-Mortar01Lt",
"R-Wpn-Mortar02Hvy",
"R-Wpn-Mortar-ROF02",
"R-Wpn-Mortar-Acc01",
"R-Wpn-Mortar-Damage03",
],
},
AL:
Expand Down
5 changes: 5 additions & 0 deletions multiplay/skirmish/cobra_includes/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,11 @@ function buildPhase2()
return true;
}

if (getRealPower() < 250)
{
return true;
}

if (factoryBuildOrder(2))
{
return true;
Expand Down
15 changes: 7 additions & 8 deletions multiplay/skirmish/cobra_includes/research.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,13 @@ function research()

if (!found)
{
found = evalResearch(lab, standardDefenseTech);
found = pursueResearch(lab, standardDefenseTech);
if (!found && useArti)
found = evalResearch(lab, defenseTech);
found = pursueResearch(lab, defenseTech);
if (!found)
found = evalResearch(lab, DEFENSE_UPGRADES);
found = pursueResearch(lab, DEFENSE_UPGRADES);
}

if (!found)
found = evalResearch(lab, SENSOR_TECH);

if (!found && (random(101) < subPersonalities[personality].systemPriority))
{
if (!found)
Expand All @@ -191,12 +188,14 @@ function research()
found = evalResearch(lab, LATE_EARLY_GAME_TECH);
}

if (!found && useArti)
if (!found && random(2) && useArti)
found = evalResearch(lab, artillExtra);
if (!found && useArti)
found = evalResearch(lab, artilleryTech);
if (!found)
found = evalResearch(lab, SENSOR_TECH);

if (!found && (random(101) < 40))
if (!found)
{
if (!turnOffCyborgs && countStruct(CYBORG_FACTORY) && random(2))
{
Expand Down
2 changes: 1 addition & 1 deletion multiplay/skirmish/cobra_includes/tactics.js
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ function confidenceThreshold()

points += DERR_COUNT >= countStruct(structures.derricks, getMostHarmfulPlayer()) ? 2 : -2;

if (DROID_COUNT < 90 && (countDroid(DROID_ANY, getMostHarmfulPlayer()) > DROID_COUNT + 5))
if (DROID_COUNT < 40 && (countDroid(DROID_ANY, getMostHarmfulPlayer()) > DROID_COUNT + 6))
{
points -= 3;
}
Expand Down

0 comments on commit a6df80c

Please sign in to comment.