Skip to content
Snippets Groups Projects
Commit 16637d45 authored by svornost's avatar svornost
Browse files

Authority report fixes

parent 8d5279fc
No related branches found
No related tags found
No related merge requests found
...@@ -97,7 +97,7 @@ App.SecExp.authorityReport = function() { ...@@ -97,7 +97,7 @@ App.SecExp.authorityReport = function() {
const activeUnits = App.SecExp.battle.activeUnits(); const activeUnits = App.SecExp.battle.activeUnits();
if (activeUnits >= 4) { if (activeUnits >= 4) {
t = `Your military is `; r.push(`Your military is`);
if (activeUnits >= 9) { if (activeUnits >= 9) {
r.push(`massive; commanding so many troops greatly`); r.push(`massive; commanding so many troops greatly`);
} else if (activeUnits >= 7) { } else if (activeUnits >= 7) {
...@@ -105,7 +105,7 @@ App.SecExp.authorityReport = function() { ...@@ -105,7 +105,7 @@ App.SecExp.authorityReport = function() {
} else if (activeUnits >= 4) { } else if (activeUnits >= 4) {
r.push(`at a decent size; commanding a small army`); r.push(`at a decent size; commanding a small army`);
} }
r.push(t += ` increases your authority.`); r.push(`increases your authority.`);
authGrowth += (12 * activeUnits); authGrowth += (12 * activeUnits);
} }
...@@ -163,35 +163,35 @@ App.SecExp.authorityReport = function() { ...@@ -163,35 +163,35 @@ App.SecExp.authorityReport = function() {
if (V.SecExp.settings.rebellion.enabled === 1) { if (V.SecExp.settings.rebellion.enabled === 1) {
const authorityEffects = function(group) { const authorityEffects = function(group) {
let t, bonus; let text, bonus;
if (V.SecExp.core.authority <= 3000) { if (V.SecExp.core.authority <= 3000) {
t = `Your very low authority allows ${group} to think too freely.`; text = `Your very low authority allows ${group} to think too freely.`;
bonus = 30; bonus = 30;
} else if (V.SecExp.core.authority <= 6000) { } else if (V.SecExp.core.authority <= 6000) {
t = `Your low authority allows ${group} to think too freely.`; text = `Your low authority allows ${group} to think too freely.`;
bonus = 25; bonus = 25;
} else if (V.SecExp.core.authority <= 9000) { } else if (V.SecExp.core.authority <= 9000) {
t = `Your moderate authority allows ${group} to think a bit too freely.`; text = `Your moderate authority allows ${group} to think a bit too freely.`;
bonus = 20; bonus = 20;
} else if (V.SecExp.core.authority <= 12000) { } else if (V.SecExp.core.authority <= 12000) {
t = `Your good authority does not allow ${group} to think too freely.`; text = `Your good authority does not allow ${group} to think too freely.`;
bonus = 15; bonus = 15;
} else if (V.SecExp.core.authority <= 15000) { } else if (V.SecExp.core.authority <= 15000) {
t = `Your high authority does not allow ${group} to think too freely.`; text = `Your high authority does not allow ${group} to think too freely.`;
bonus = 10; bonus = 10;
} else if (V.SecExp.core.authority <= 18000) { } else if (V.SecExp.core.authority <= 18000) {
t = `Your very high authority does not allow ${group} to think too freely.`; text = `Your very high authority does not allow ${group} to think too freely.`;
bonus = 5; bonus = 5;
} else { } else {
t = `Your absolute authority does not allow ${group} to have a single free thought.`; text = `Your absolute authority does not allow ${group} to have a single free thought.`;
bonus = 1; bonus = 1;
} }
return {text: t, bonus: bonus}; return {text, bonus};
}; };
let slave, citizen; let slave, citizen;
const CSratio = V.ACitizens / V.ASlaves; const CSratio = V.ACitizens / V.ASlaves;
t = `<br><br> <strong>Slaves security analysis:</strong> `; r.push(`<br><br><strong>Slaves security analysis:</strong>`);
r.push(t + authorityEffects('slaves').text); slave = authorityEffects('slaves').bonus; r.push(t + authorityEffects('slaves').text); slave = authorityEffects('slaves').bonus;
if (CSratio <= 0.4) { if (CSratio <= 0.4) {
r.push(`There are a lot more slaves than citizens, making some doubt their masters are strong enough to stop them.`); r.push(`There are a lot more slaves than citizens, making some doubt their masters are strong enough to stop them.`);
...@@ -250,8 +250,8 @@ App.SecExp.authorityReport = function() { ...@@ -250,8 +250,8 @@ App.SecExp.authorityReport = function() {
slave += 5; slave += 5;
} }
t = `<br><br><strong>Citizens security analysis:</strong>`; r.push(`<br><br><strong>Citizens security analysis:</strong>`);
r.push(t + authorityEffects('your citizens').text); citizen = authorityEffects('your citizens').bonus; r.push(authorityEffects('your citizens').text); citizen = authorityEffects('your citizens').bonus;
if (V.SecExp.core.crimeLow >= 90) { if (V.SecExp.core.crimeLow >= 90) {
r.push(`The very high crime level of the arcology breeds extreme discontent between your citizens.`); r.push(`The very high crime level of the arcology breeds extreme discontent between your citizens.`);
citizen += 30; citizen += 30;
...@@ -339,7 +339,7 @@ App.SecExp.authorityReport = function() { ...@@ -339,7 +339,7 @@ App.SecExp.authorityReport = function() {
} }
t = `<br><br>`; t = `<br><br>`;
const {HeU, heU, hisU, himU, himselfU} = getNonlocalPronouns(V.seeDicks); const {HeU, heU, hisU, himU, himselfU} = getNonlocalPronouns(V.seeDicks).appendSuffix("U");
switch (miniEvent) { switch (miniEvent) {
case 1: case 1:
if (rand === 0) { if (rand === 0) {
...@@ -432,8 +432,8 @@ App.SecExp.authorityReport = function() { ...@@ -432,8 +432,8 @@ App.SecExp.authorityReport = function() {
} }
V.SecExp.rebellions.tension = Math.clamp(V.SecExp.rebellions.tension, 0, 100); V.SecExp.rebellions.tension = Math.clamp(V.SecExp.rebellions.tension, 0, 100);
} else if (V.SecExp.rebellions.tension > 0) { // otherwise SecExp.rebellions.tension decays } else if (V.SecExp.rebellions.tension > 0) { // otherwise SecExp.rebellions.tension decays
r.push(`<br><br><strong>SecExp.rebellions.tension</strong>:`); r.push(`<br><br><strong>Tension</strong>:`);
if (V.SecExp.buildings.riotCenter.upgrades.freeMedia >= 1) { if (V.SecExp.buildings.riotCenter && V.SecExp.buildings.riotCenter.upgrades.freeMedia >= 1) {
r.push(`The guaranteed free media access you offer does wonders to lower tensions in the arcology.`); r.push(`The guaranteed free media access you offer does wonders to lower tensions in the arcology.`);
V.SecExp.rebellions.tension = Math.trunc(Math.clamp(V.SecExp.rebellions.tension - V.SecExp.buildings.riotCenter.upgrades.freeMedia / 2, 0, 100)); V.SecExp.rebellions.tension = Math.trunc(Math.clamp(V.SecExp.rebellions.tension - V.SecExp.buildings.riotCenter.upgrades.freeMedia / 2, 0, 100));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment