Increase rep gains 2

This commit is contained in:
Olivier Gagnon 2021-11-17 10:59:15 -05:00
parent 022cd7b68d
commit ae9ad4430e
6 changed files with 8 additions and 8 deletions

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[];
width(): number;
height(): number;
charge(fragment: ActiveFragment, threads: number): void;
charge(player: IPlayer, fragment: ActiveFragment, threads: number): void;
process(p: IPlayer, n: number): void;
effect(fragment: ActiveFragment): number;
canPlace(x: number, y: number, rotation: number, fragment: Fragment): boolean;

@ -5,7 +5,6 @@ import { IStaneksGift } from "./IStaneksGift";
import { IPlayer } from "../PersonObjects/IPlayer";
import { Factions } from "../Faction/Factions";
import { CalculateEffect } from "./formulas/effect";
import { CalculateCharge } from "./formulas/charge";
import { StaneksGiftEvents } from "./StaneksGiftEvents";
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
import { CONSTANTS } from "../Constants";
@ -29,11 +28,12 @@ export class StaneksGift implements IStaneksGift {
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.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 {

@ -41,7 +41,7 @@ export function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, hel
if (workerScript.env.stopFlag) {
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.`);
return Promise.resolve();
});

@ -753,7 +753,7 @@ export function SidebarRoot(props: IProps): React.ReactElement {
<Typography color={props.page !== Page.Options ? "secondary" : "primary"}>Options</Typography>
</ListItemText>
</ListItem>
{process.env.NODE_ENV === "development" && (
{true && (
<ListItem
classes={{ root: classes.listitem }}
button