bitburner-src/src/Bladeburner/Contract.ts

25 lines
710 B
TypeScript
Raw Normal View History

2021-05-01 09:17:31 +02:00
import { IBladeburner } from "./IBladeburner";
import { Action, IActionParams } from "./Action";
2021-09-25 20:42:57 +02:00
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
export class Contract extends Action {
2021-09-05 01:09:30 +02:00
constructor(params: IActionParams | null = null) {
super(params);
}
2021-09-05 01:09:30 +02:00
getActionTypeSkillSuccessBonus(inst: IBladeburner): number {
return inst.skillMultipliers.successChanceContract;
}
2021-09-05 01:09:30 +02:00
toJSON(): any {
return Generic_toJSON("Contract", this);
}
2021-09-05 01:09:30 +02:00
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
static fromJSON(value: any): Contract {
return Generic_fromJSON(Contract, value.data);
}
}
2021-09-05 01:09:30 +02:00
Reviver.constructors.Contract = Contract;