mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 10:42:51 +02:00
BUGFIX: Wrong success range of Bladeburner general action (#1552)
This commit is contained in:
@@ -4,6 +4,7 @@ import type { ActionIdentifier } from "../Types";
|
||||
|
||||
import { BladeActionType, BladeGeneralActionName } from "@enums";
|
||||
import { ActionClass, ActionParams } from "./Action";
|
||||
import { clampNumber } from "../../utils/helpers/clampNumber";
|
||||
|
||||
type GeneralActionParams = ActionParams & {
|
||||
name: BladeGeneralActionName;
|
||||
@@ -28,8 +29,9 @@ export class GeneralAction extends ActionClass {
|
||||
getSuccessChance(__bladeburner: Bladeburner, __person: Person): number {
|
||||
return 1;
|
||||
}
|
||||
|
||||
getSuccessRange(bladeburner: Bladeburner, person: Person): [minChance: number, maxChance: number] {
|
||||
const chance = this.getSuccessChance(bladeburner, person);
|
||||
const chance = clampNumber(this.getSuccessChance(bladeburner, person), 0, 1);
|
||||
return [chance, chance];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user