mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
Increase rep gains 2
This commit is contained in:
parent
022cd7b68d
commit
ae9ad4430e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -7,7 +7,7 @@ export interface IStaneksGift {
|
|||||||
fragments: ActiveFragment[];
|
fragments: ActiveFragment[];
|
||||||
width(): number;
|
width(): number;
|
||||||
height(): number;
|
height(): number;
|
||||||
charge(fragment: ActiveFragment, threads: number): void;
|
charge(player: IPlayer, fragment: ActiveFragment, threads: number): void;
|
||||||
process(p: IPlayer, n: number): void;
|
process(p: IPlayer, n: number): void;
|
||||||
effect(fragment: ActiveFragment): number;
|
effect(fragment: ActiveFragment): number;
|
||||||
canPlace(x: number, y: number, rotation: number, fragment: Fragment): boolean;
|
canPlace(x: number, y: number, rotation: number, fragment: Fragment): boolean;
|
||||||
|
@ -5,7 +5,6 @@ import { IStaneksGift } from "./IStaneksGift";
|
|||||||
import { IPlayer } from "../PersonObjects/IPlayer";
|
import { IPlayer } from "../PersonObjects/IPlayer";
|
||||||
import { Factions } from "../Faction/Factions";
|
import { Factions } from "../Faction/Factions";
|
||||||
import { CalculateEffect } from "./formulas/effect";
|
import { CalculateEffect } from "./formulas/effect";
|
||||||
import { CalculateCharge } from "./formulas/charge";
|
|
||||||
import { StaneksGiftEvents } from "./StaneksGiftEvents";
|
import { StaneksGiftEvents } from "./StaneksGiftEvents";
|
||||||
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
|
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
|
||||||
import { CONSTANTS } from "../Constants";
|
import { CONSTANTS } from "../Constants";
|
||||||
@ -29,11 +28,12 @@ export class StaneksGift implements IStaneksGift {
|
|||||||
return Math.floor(this.baseSize() / 2 + 0.6);
|
return Math.floor(this.baseSize() / 2 + 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
charge(af: ActiveFragment, threads: number): void {
|
charge(player: IPlayer, af: ActiveFragment, threads: number): void {
|
||||||
af.avgCharge = (af.numCharge * af.avgCharge + threads) / (af.numCharge + 1);
|
af.avgCharge = (af.numCharge * af.avgCharge + threads) / (af.numCharge + 1);
|
||||||
af.numCharge++;
|
af.numCharge++;
|
||||||
|
|
||||||
Factions["Church of the Machine God"].playerReputation += Math.pow(threads, 0.95);
|
const cotmg = Factions["Church of the Machine God"];
|
||||||
|
cotmg.playerReputation += (player.faction_rep_mult * (Math.pow(threads, 0.95) * (cotmg.favor + 100))) / 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
inBonus(): boolean {
|
inBonus(): boolean {
|
||||||
|
@ -41,7 +41,7 @@ export function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, hel
|
|||||||
if (workerScript.env.stopFlag) {
|
if (workerScript.env.stopFlag) {
|
||||||
return Promise.reject(workerScript);
|
return Promise.reject(workerScript);
|
||||||
}
|
}
|
||||||
const charge = staneksGift.charge(fragment, workerScript.scriptRef.threads);
|
const charge = staneksGift.charge(player, fragment, workerScript.scriptRef.threads);
|
||||||
workerScript.log("stanek.charge", `Charged fragment for ${charge} charge.`);
|
workerScript.log("stanek.charge", `Charged fragment for ${charge} charge.`);
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
});
|
});
|
||||||
|
@ -753,7 +753,7 @@ export function SidebarRoot(props: IProps): React.ReactElement {
|
|||||||
<Typography color={props.page !== Page.Options ? "secondary" : "primary"}>Options</Typography>
|
<Typography color={props.page !== Page.Options ? "secondary" : "primary"}>Options</Typography>
|
||||||
</ListItemText>
|
</ListItemText>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
{process.env.NODE_ENV === "development" && (
|
{true && (
|
||||||
<ListItem
|
<ListItem
|
||||||
classes={{ root: classes.listitem }}
|
classes={{ root: classes.listitem }}
|
||||||
button
|
button
|
||||||
|
Loading…
Reference in New Issue
Block a user