2021-05-01 09:17:31 +02:00
|
|
|
import { IBladeburner } from "./IBladeburner";
|
2021-03-13 21:10:55 +01:00
|
|
|
import { Action, IActionParams } from "./Action";
|
2021-09-25 20:42:57 +02:00
|
|
|
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
|
2021-03-13 21:10:55 +01:00
|
|
|
|
|
|
|
export class Contract extends Action {
|
2021-09-05 01:09:30 +02:00
|
|
|
constructor(params: IActionParams | null = null) {
|
|
|
|
super(params);
|
|
|
|
}
|
2021-03-13 21:10:55 +01:00
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
getActionTypeSkillSuccessBonus(inst: IBladeburner): number {
|
|
|
|
return inst.skillMultipliers.successChanceContract;
|
|
|
|
}
|
2021-03-13 21:10:55 +01:00
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
toJSON(): any {
|
|
|
|
return Generic_toJSON("Contract", this);
|
|
|
|
}
|
2021-03-13 21:10:55 +01:00
|
|
|
|
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-03-13 21:10:55 +01:00
|
|
|
}
|
|
|
|
|
2021-09-05 01:09:30 +02:00
|
|
|
Reviver.constructors.Contract = Contract;
|