Added Incite Violence bladeburner action

This commit is contained in:
Olivier Gagnon 2021-10-14 23:01:04 -04:00
parent 3fddb3c9f2
commit e6a4456d81
7 changed files with 54 additions and 19 deletions

32
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -185,6 +185,8 @@ export class Bladeburner implements IBladeburner {
case ActionTypes["Diplomacy"]: case ActionTypes["Diplomacy"]:
case ActionTypes["Hyperbolic Regeneration Chamber"]: case ActionTypes["Hyperbolic Regeneration Chamber"]:
this.actionTimeToComplete = 60; this.actionTimeToComplete = 60;
case ActionTypes["Incite Violence"]:
this.actionTimeToComplete = 600;
break; break;
default: default:
throw new Error("Invalid Action Type in startAction(Bladeburner,player, ): " + actionId.type); throw new Error("Invalid Action Type in startAction(Bladeburner,player, ): " + actionId.type);
@ -339,6 +341,10 @@ export class Bladeburner implements IBladeburner {
action.type = ActionTypes["Hyperbolic Regeneration Chamber"]; action.type = ActionTypes["Hyperbolic Regeneration Chamber"];
action.name = "Hyperbolic Regeneration Chamber"; action.name = "Hyperbolic Regeneration Chamber";
break; break;
case "stir trouble":
action.type = ActionTypes["Incite Violence"];
action.name = "Incite Violence";
break;
default: default:
return null; return null;
} }
@ -1167,6 +1173,8 @@ export class Bladeburner implements IBladeburner {
return GeneralActions["Diplomacy"]; return GeneralActions["Diplomacy"];
case ActionTypes["Hyperbolic Regeneration Chamber"]: case ActionTypes["Hyperbolic Regeneration Chamber"]:
return GeneralActions["Hyperbolic Regeneration Chamber"]; return GeneralActions["Hyperbolic Regeneration Chamber"];
case ActionTypes["stir trouble"]:
return GeneralActions["Incite Violence"];
default: default:
return null; return null;
} }
@ -1493,6 +1501,19 @@ export class Bladeburner implements IBladeburner {
} }
break; break;
} }
case ActionTypes["Incite Violence"]: {
for (const contract of Object.keys(this.contracts)) {
const growthF = Growths[contract];
if (!growthF) throw new Error("trying to generate count for action that doesn't exist? " + contract);
this.contracts[contract].count += (60 * 30 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;
}
for (const operation of Object.keys(this.operations)) {
const growthF = Growths[operation];
if (!growthF) throw new Error("trying to generate count for action that doesn't exist? " + operation);
this.operations[operation].count += (60 * 30 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;
}
break;
}
default: default:
console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`); console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);
break; break;
@ -1960,6 +1981,7 @@ export class Bladeburner implements IBladeburner {
"Field Analysis", "Field Analysis",
"Diplomacy", "Diplomacy",
"Hyperbolic Regeneration Chamber", "Hyperbolic Regeneration Chamber",
"Incite Violence",
]; ];
if (gen.includes(res.type)) { if (gen.includes(res.type)) {
res.type = "General"; res.type = "General";
@ -2085,6 +2107,8 @@ export class Bladeburner implements IBladeburner {
case ActionTypes["Diplomacy"]: case ActionTypes["Diplomacy"]:
case ActionTypes["Hyperbolic Regeneration Chamber"]: case ActionTypes["Hyperbolic Regeneration Chamber"]:
return 60; return 60;
case ActionTypes["Incite Violence"]:
return 600;
default: default:
workerScript.log("bladeburner.getActionTime", errorLogText); workerScript.log("bladeburner.getActionTime", errorLogText);
return -1; return -1;
@ -2121,6 +2145,7 @@ export class Bladeburner implements IBladeburner {
case ActionTypes["FieldAnalysis"]: case ActionTypes["FieldAnalysis"]:
case ActionTypes["Diplomacy"]: case ActionTypes["Diplomacy"]:
case ActionTypes["Hyperbolic Regeneration Chamber"]: case ActionTypes["Hyperbolic Regeneration Chamber"]:
case ActionTypes["Incite Violence"]:
return [1, 1]; return [1, 1];
case ActionTypes["Recruitment"]: { case ActionTypes["Recruitment"]: {
const recChance = this.getRecruitmentSuccessChance(player); const recChance = this.getRecruitmentSuccessChance(player);
@ -2163,6 +2188,7 @@ export class Bladeburner implements IBladeburner {
case ActionTypes["FieldAnalysis"]: case ActionTypes["FieldAnalysis"]:
case ActionTypes["Diplomacy"]: case ActionTypes["Diplomacy"]:
case ActionTypes["Hyperbolic Regeneration Chamber"]: case ActionTypes["Hyperbolic Regeneration Chamber"]:
case ActionTypes["Incite Violence"]:
return Infinity; return Infinity;
default: default:
workerScript.log("bladeburner.getActionCountRemaining", errorLogText); workerScript.log("bladeburner.getActionCountRemaining", errorLogText);

@ -30,4 +30,8 @@ export const GeneralActions: IMap<Action> = {};
GeneralActions[actionName] = new Action({ GeneralActions[actionName] = new Action({
name: actionName, name: actionName,
}); });
actionName = "Incite Violence";
GeneralActions[actionName] = new Action({
name: actionName,
});
})(); })();

@ -62,4 +62,7 @@ export const GeneralActions: {
</> </>
), ),
}, },
"Incite Violence": {
desc: <>Purposefully stir trouble in the synthoid community in order to gain a political edge.</>,
},
}; };

@ -38,6 +38,8 @@ export function GeneralActionElem(props: IProps): React.ReactElement {
case "Diplomacy": case "Diplomacy":
case "Hyperbolic Regeneration Chamber": case "Hyperbolic Regeneration Chamber":
return 60; return 60;
case "Incite Violence":
return 600;
case "Recruitment": case "Recruitment":
return props.bladeburner.getRecruitmentTime(props.player); return props.bladeburner.getRecruitmentTime(props.player);
} }