mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 17:53:55 +01:00
Make Stanek hacknet cost percentage better.
This commit is contained in:
parent
b86ff7d405
commit
e3e6b449d4
@ -61,7 +61,7 @@ export function Effect(tpe: FragmentType): string {
|
||||
return "+x% hacknet production";
|
||||
}
|
||||
case FragmentType.HacknetCost: {
|
||||
return "x% cheaper hacknet cost";
|
||||
return "-x% cheaper hacknet cost";
|
||||
}
|
||||
case FragmentType.Rep: {
|
||||
return "+x% reputation from factions and companies";
|
||||
|
@ -54,8 +54,12 @@ export function FragmentInspector(props: IProps): React.ReactElement {
|
||||
if ([FragmentType.Booster, FragmentType.None, FragmentType.Delete].includes(f.type)) {
|
||||
charge = "N/A";
|
||||
effect = `${f.power}x adjacent fragment power`;
|
||||
} else {
|
||||
} else if (Effect(f.type).includes("+x%")) {
|
||||
effect = Effect(f.type).replace(/-*x%/, numeralWrapper.formatPercentage(props.gift.effect(props.fragment) - 1));
|
||||
} else if (Effect(f.type).includes("-x%")) {
|
||||
const effectAmt = props.gift.effect(props.fragment);
|
||||
const perc = numeralWrapper.formatPercentage(1 - 1 / effectAmt);
|
||||
effect = Effect(f.type).replace(/-x%/, perc);
|
||||
}
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user