Permalink
Browse files

Adjust campaign power again.

Easy and Normal have the bonus time reduced to help with too much power being given when completing a mission. The power modifiers have been changed to be more fair towards Hard and Insane difficulties.
  • Loading branch information...
KJeff01 committed Oct 28, 2017
1 parent 4bc3903 commit 922ccd2c21dd23d2087a5511568bb17720872932
Showing with 18 additions and 15 deletions.
  1. +4 −0 data/base/script/campaign/libcampaign.js
  2. +14 −15 data/base/script/rules.js
@@ -2279,6 +2279,10 @@ function camNextLevel(nextLevel)
if (__camNeedBonusTime)
{
var bonusTime = getMissionTime();
if (difficulty === EASY || difficulty === MEDIUM)
{
bonusTime = Math.floor(bonusTime * 0.75);
}
if (bonusTime > 0)
{
var bonus = 110;
View
@@ -43,31 +43,30 @@ function eventGameInit()
}
function resetPower() {
const HARD_POWER_LIMIT = 20000;
const INSANE_POWER_LIMIT = 12000;
var powerLimit = 999999;
var powerProductionRate = 100;
// set income modifier/power storage for player 0 (human)
if (difficulty == EASY)
{
setPowerModifier(150);
powerProductionRate = 115;
}
else if (difficulty == HARD)
{
setPowerModifier(65);
setPowerStorageMaximum(HARD_POWER_LIMIT);
if (playerPower(selectedPlayer) >= HARD_POWER_LIMIT)
{
setPower(HARD_POWER_LIMIT - 1, selectedPlayer);
}
powerProductionRate = 85;
powerLimit = 20000;
}
else if (difficulty == INSANE)
{
setPowerModifier(50);
setPowerStorageMaximum(INSANE_POWER_LIMIT);
if (playerPower(selectedPlayer) >= INSANE_POWER_LIMIT)
{
setPower(INSANE_POWER_LIMIT - 1, selectedPlayer);
}
powerProductionRate = 70;
powerLimit = 12000;
}
setPowerModifier(powerProductionRate);
setPowerStorageMaximum(powerLimit);
if (playerPower(selectedPlayer) >= powerLimit)
{
setPower(powerLimit - 1, selectedPlayer);
}
}

0 comments on commit 922ccd2

Please sign in to comment.