mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 15:43:49 +01:00
wtf
This commit is contained in:
parent
d91d7c564e
commit
3edbfd6916
@ -148,7 +148,15 @@ export class Corporation {
|
||||
const totalDividends = (this.dividendPercentage / 100) * cycleProfit;
|
||||
const dividendsPerShare = totalDividends / this.totalShares;
|
||||
const dividends = this.numShares * dividendsPerShare * (1 - this.dividendTaxPercentage / 100);
|
||||
return Math.pow(dividends, BitNodeMultipliers.CorporationSoftCap);
|
||||
let upgrades = -0.15;
|
||||
if (this.unlockUpgrades[5] === 1) {
|
||||
upgrades += 0.05;
|
||||
}
|
||||
if (this.unlockUpgrades[6] === 1) {
|
||||
upgrades += 0.1;
|
||||
}
|
||||
console.log(upgrades);
|
||||
return Math.pow(dividends, BitNodeMultipliers.CorporationSoftCap + upgrades);
|
||||
}
|
||||
|
||||
determineValuation(): number {
|
||||
|
@ -53,14 +53,14 @@ export const CorporationUnlockUpgrades: IMap<CorporationUnlockUpgrade> = {
|
||||
],
|
||||
"5": [
|
||||
5,
|
||||
500e9,
|
||||
500e12,
|
||||
"Shady Accounting",
|
||||
"Utilize unscrupulous accounting practices and pay off government officials to save money " +
|
||||
"on taxes. This reduces the dividend tax rate by 5%.",
|
||||
],
|
||||
"6": [
|
||||
6,
|
||||
2e12,
|
||||
2e15,
|
||||
"Government Partnership",
|
||||
"Help national governments further their agendas in exchange for lowered taxes. " +
|
||||
"This reduces the dividend tax rate by 10%",
|
||||
|
@ -1294,9 +1294,9 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
// Return player's money
|
||||
workerScript.log(
|
||||
"getServerMoneyAvailable",
|
||||
`returned player's money: ${numeralWrapper.formatMoney(Player.money.toNumber())}`,
|
||||
`returned player's money: ${numeralWrapper.formatMoney(Player.money)}`,
|
||||
);
|
||||
return Player.money.toNumber();
|
||||
return Player.money;
|
||||
}
|
||||
workerScript.log(
|
||||
"getServerMoneyAvailable",
|
||||
@ -1522,7 +1522,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (Player.money.lt(cost)) {
|
||||
if (Player.money < cost) {
|
||||
workerScript.log(
|
||||
"purchaseServer",
|
||||
`Not enough money to purchase server. Need ${numeralWrapper.formatMoney(cost)}`,
|
||||
@ -2126,7 +2126,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
company_rep_mult: Player.company_rep_mult,
|
||||
faction_rep_mult: Player.faction_rep_mult,
|
||||
numPeopleKilled: Player.numPeopleKilled,
|
||||
money: Player.money.toNumber(),
|
||||
money: Player.money,
|
||||
city: Player.city,
|
||||
location: Player.location,
|
||||
companyName: Player.companyName,
|
||||
|
Loading…
Reference in New Issue
Block a user