Skip to content

Commit

Permalink
Give Cobra AI access to the EMP mortar on Insane difficulty.
Browse files Browse the repository at this point in the history
  • Loading branch information
KJeff01 committed Sep 21, 2019
1 parent 7263e53 commit 21253f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion data/mp/multiplay/skirmish/Cobra.json
Expand Up @@ -5,6 +5,6 @@
"tip": "Designed for team battles",
"easy_tip": "Gets ~ 25% less power from each oil derrick\nBasic decision making is slower",
"hard_tip": "Uses the Heavy Plasma Launcher",
"insane_tip": "Gets ~ 100% more power from each oil derrick\nUses the Heavy Plasma Launcher\nStarts with defensive structures and oil derricks"
"insane_tip": "Gets ~ 100% more power from each oil derrick\nUses the Heavy Plasma Launcher and EMP Mortar\nStarts with defensive structures and oil derricks"
}
}
13 changes: 8 additions & 5 deletions data/mp/multiplay/skirmish/cobra_includes/production.js
Expand Up @@ -130,16 +130,19 @@ function choosePersonalityWeapon(type)

if (type === "TANK")
{
const PLASMA_LAUNCHER = "PlasmaHeavy";
weaps = chooseRandomWeapon();
weaponList = shuffleWeaponList(chooseWeaponType(weaps));

//on hard difficulty and above.
if (componentAvailable("tracked01") && (random(100) <= 1))
//randomly choose an unbalanced and overpowered weapon if on hard or insane difficulty.
if (difficulty >= HARD && componentAvailable("tracked01") && (random(100) <= 2))
{
if((difficulty === HARD) || (difficulty === INSANE))
if (difficulty >= INSANE && random(100) <= 50)
{
weaponList.push(PLASMA_LAUNCHER);
weaponList.push("MortarEMP");
}
else
{
weaponList.push("PlasmaHeavy");
}
}

Expand Down

0 comments on commit 21253f4

Please sign in to comment.