mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 15:43:49 +01:00
Update codebase for stanek
This commit is contained in:
parent
4c33ad444b
commit
c2b4a5b52a
2
.github/PULL_REQUEST_TEMPLATE
vendored
2
.github/PULL_REQUEST_TEMPLATE
vendored
@ -1,5 +1,7 @@
|
||||
# DELETE THIS AFTER READING
|
||||
|
||||
# READ CONTRIBUTING.md
|
||||
|
||||
# PR title
|
||||
|
||||
Formatted as such:
|
||||
|
1550
package-lock.json
generated
1550
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +0,0 @@
|
||||
import { StanekConstants } from "../data/Constants";
|
||||
|
||||
export function CalculateCharge(ram: number): number {
|
||||
return ram * Math.pow(1 + Math.log2(ram) * StanekConstants.RAMBonus, 0.7);
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
import { shuffle } from "lodash";
|
||||
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
|
||||
|
||||
export function CalculateEffect(avgCharge: number, numCharge: number, power: number, boost: number): number {
|
||||
export function CalculateEffect(highestCharge: number, numCharge: number, power: number, boost: number): number {
|
||||
return (
|
||||
1 +
|
||||
(Math.log(avgCharge + 1) / (Math.log(1.8) * 100)) *
|
||||
(Math.log(highestCharge + 1) / 60) *
|
||||
Math.pow((numCharge + 1) / 5, 0.07) *
|
||||
power *
|
||||
boost *
|
||||
|
@ -58,8 +58,8 @@ export function NetscriptStanek(
|
||||
//Charge the fragment
|
||||
const time = staneksGift.inBonus() ? 200 : 1000;
|
||||
return netscriptDelay(time, workerScript).then(function () {
|
||||
const charge = staneksGift.charge(player, fragment, workerScript.scriptRef.threads);
|
||||
_ctx.log(() => `Charged fragment for ${charge} charge.`);
|
||||
staneksGift.charge(player, fragment, workerScript.scriptRef.threads);
|
||||
_ctx.log(() => `Charged fragment with ${_ctx.workerScript.scriptRef.threads} threads.`);
|
||||
return Promise.resolve();
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user