More adjustments to gang rework

This commit is contained in:
Olivier Gagnon 2021-08-15 14:09:58 -04:00
parent 5803ddc613
commit 41871de26c
16 changed files with 73 additions and 67 deletions

@ -36,6 +36,10 @@ li {
list-style-type: none; list-style-type: none;
} }
br {
@extend .noselect;
}
#entire-game-container { #entire-game-container {
background-color: transparent; background-color: transparent;
} }

@ -1865,11 +1865,6 @@ function initAugmentations() {
resetAugmentation(BladesSimulacrum); resetAugmentation(BladesSimulacrum);
} }
try {
console.log([1, 0.96, 0.94, 0.93][SourceFileFlags[11]]);
} catch(err) {
console.log(err);
}
// Update costs based on how many have been purchased // Update costs based on how many have been purchased
mult = Math.pow(CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]], Player.queuedAugmentations.length); mult = Math.pow(CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]], Player.queuedAugmentations.length);
for (var name in Augmentations) { for (var name in Augmentations) {

@ -293,7 +293,7 @@ export class Gang {
if (this.members.length < numFreeMembers) return 0; if (this.members.length < numFreeMembers) return 0;
const i = this.members.length - (numFreeMembers - 1); const i = this.members.length - (numFreeMembers - 1);
return Math.round(0.9 * Math.pow(i, 3) + Math.pow(i, 2)); return Math.pow(5, i);
} }
recruitMember(name: string): boolean { recruitMember(name: string): boolean {

@ -64,7 +64,7 @@ export class GangMember {
} }
calculateAscensionMult(points: number): number { calculateAscensionMult(points: number): number {
return Math.max(Math.pow(points/2000, 0.9), 1); return Math.max(Math.pow(points/4000, 0.7), 1);
} }
updateSkillLevels(): void { updateSkillLevels(): void {
@ -170,12 +170,12 @@ export class GangMember {
expMult(): IMults { expMult(): IMults {
return { return {
hack: (this.hack_mult-1)/10+1, hack: (this.hack_mult-1)/4+1,
str: (this.str_mult-1)/10+1, str: (this.str_mult-1)/4+1,
def: (this.def_mult-1)/10+1, def: (this.def_mult-1)/4+1,
dex: (this.dex_mult-1)/10+1, dex: (this.dex_mult-1)/4+1,
agi: (this.agi_mult-1)/10+1, agi: (this.agi_mult-1)/4+1,
cha: (this.cha_mult-1)/10+1, cha: (this.cha_mult-1)/4+1,
}; };
} }

@ -1,4 +1,5 @@
import { IMults, UpgradeType } from "./data/upgrades"; import { IMults, UpgradeType } from "./data/upgrades";
import { numeralWrapper } from "../ui/numeralFormat";
export class GangMemberUpgrade { export class GangMemberUpgrade {
name: string; name: string;
@ -17,24 +18,30 @@ export class GangMemberUpgrade {
} }
createDescription(): string { createDescription(): string {
const lines = ["Increases:"]; const lines = ["Effects:"];
if (this.mults.str != null) { if (this.mults.str != null) {
lines.push(`* Strength by ${Math.round((this.mults.str - 1) * 100)}%`); lines.push(`+${numeralWrapper.formatPercentage(this.mults.str-1, 0)} strength skill`);
lines.push(`+${numeralWrapper.formatPercentage((this.mults.str-1)/4, 2)} strength exp`);
} }
if (this.mults.def != null) { if (this.mults.def != null) {
lines.push(`* Defense by ${Math.round((this.mults.def - 1) * 100)}%`); lines.push(`+${numeralWrapper.formatPercentage(this.mults.def-1, 0)} defense skill`);
lines.push(`+${numeralWrapper.formatPercentage((this.mults.def-1)/4, 2)} defense exp`);
} }
if (this.mults.dex != null) { if (this.mults.dex != null) {
lines.push(`* Dexterity by ${Math.round((this.mults.dex - 1) * 100)}%`); lines.push(`+${numeralWrapper.formatPercentage(this.mults.dex-1, 0)} dexterity skill`);
lines.push(`+${numeralWrapper.formatPercentage((this.mults.dex-1)/4, 2)} dexterity exp`);
} }
if (this.mults.agi != null) { if (this.mults.agi != null) {
lines.push(`* Agility by ${Math.round((this.mults.agi - 1) * 100)}%`); lines.push(`+${numeralWrapper.formatPercentage(this.mults.agi-1, 0)} agility skill`);
lines.push(`+${numeralWrapper.formatPercentage((this.mults.agi-1)/4, 2)} agility exp`);
} }
if (this.mults.cha != null) { if (this.mults.cha != null) {
lines.push(`* Charisma by ${Math.round((this.mults.cha - 1) * 100)}%`); lines.push(`+${numeralWrapper.formatPercentage(this.mults.cha-1, 0)} charisma skill`);
lines.push(`+${numeralWrapper.formatPercentage((this.mults.cha-1)/4, 2)} charisma exp`);
} }
if (this.mults.hack != null) { if (this.mults.hack != null) {
lines.push(`* Hacking by ${Math.round((this.mults.hack - 1) * 100)}%`); lines.push(`+${numeralWrapper.formatPercentage(this.mults.hack-1, 0)} hacking skill`);
lines.push(`+${numeralWrapper.formatPercentage((this.mults.hack-1)/4, 2)} hacking exp`);
} }
return lines.join("<br>"); return lines.join("<br>");
} }

@ -7,7 +7,7 @@ export const GangConstants: {
} = { } = {
// Respect is divided by this to get rep gain // Respect is divided by this to get rep gain
GangRespectToReputationRatio: 25, GangRespectToReputationRatio: 25,
MaximumGangMembers: 30, MaximumGangMembers: 12,
CyclesPerTerritoryAndPowerUpdate: 100, CyclesPerTerritoryAndPowerUpdate: 100,
// Portion of upgrade multiplier that is kept after ascending // Portion of upgrade multiplier that is kept after ascending
AscensionMultiplierRatio: .15, AscensionMultiplierRatio: .15,

@ -17,7 +17,7 @@ export function BonusTime(props: IProps): React.ReactElement {
return (<> return (<>
<p className="tooltip" style={{display: "inline-block"}}> <p className="tooltip" style={{display: "inline-block"}}>
Bonus time: {convertTimeMsToTimeElapsedString(bonusMillis)} Bonus time: {convertTimeMsToTimeElapsedString(bonusMillis)}
<span className="tooltiptext"> <span className="tooltiptext noselect">
You gain bonus time while offline or when the game is inactive You gain bonus time while offline or when the game is inactive
(e.g. when the tab is throttled by the browser). Bonus time (e.g. when the tab is throttled by the browser). Bonus time
makes the Gang mechanic progress faster, up to 5x the normal makes the Gang mechanic progress faster, up to 5x the normal

@ -40,7 +40,7 @@ export function GangMemberList(props: IProps): React.ReactElement {
gang={props.gang} /> gang={props.gang} />
<br /> <br />
<input <input
className="text-input" className="text-input noselect"
placeholder="Filter gang member" placeholder="Filter gang member"
style={{margin: "5px", padding: "5px"}} style={{margin: "5px", padding: "5px"}}
value={filter} value={filter}

@ -70,8 +70,8 @@ Charisma: {formatNumber(props.member.cha, 0)} ({numeralWrapper.formatExp(props.m
</pre> </pre>
<br /> <br />
{ props.member.canAscend() && <> { props.member.canAscend() && <>
<button className="accordion-button" onClick={ascend}>Ascend</button> <button className="accordion-button noselect" onClick={ascend}>Ascend</button>
<div className="help-tip" style={{marginTop: "5px"}} onClick={openAscensionHelp}>?</div> <div className="help-tip noselect" style={{marginTop: "5px"}} onClick={openAscensionHelp}>?</div>
</>} </>}
</>); </>);
} }

@ -74,27 +74,27 @@ Dex: {props.member.dex} (x{formatNumber(props.member.dex_mult * asc.dex, 2)})<b
Agi: {props.member.agi} (x{formatNumber(props.member.agi_mult * asc.agi, 2)})<br /> Agi: {props.member.agi} (x{formatNumber(props.member.agi_mult * asc.agi, 2)})<br />
Cha: {props.member.cha} (x{formatNumber(props.member.cha_mult * asc.cha, 2)}) Cha: {props.member.cha} (x{formatNumber(props.member.cha_mult * asc.cha, 2)})
</pre> </pre>
<div className="gang-owned-upgrades-div"> <div className="gang-owned-upgrades-div noselect">
Purchased Upgrades: {props.member.upgrades.map((upg: string) => purchasedUpgrade(upg))} Purchased Upgrades: {props.member.upgrades.map((upg: string) => purchasedUpgrade(upg))}
{props.member.augmentations.map((upg: string) => purchasedUpgrade(upg))} {props.member.augmentations.map((upg: string) => purchasedUpgrade(upg))}
</div> </div>
<div style={{width: "20%", display: "inline-block"}}> <div className="noselect" style={{width: "20%", display: "inline-block"}}>
<h2>Weapons</h2> <h2>Weapons</h2>
{weaponUpgrades.map(upg => upgradeButton(upg))} {weaponUpgrades.map(upg => upgradeButton(upg))}
</div> </div>
<div style={{width: "20%", display: "inline-block"}}> <div className="noselect" style={{width: "20%", display: "inline-block"}}>
<h2>Armor</h2> <h2>Armor</h2>
{armorUpgrades.map(upg => upgradeButton(upg))} {armorUpgrades.map(upg => upgradeButton(upg))}
</div> </div>
<div style={{width: "20%", display: "inline-block"}}> <div className="noselect" style={{width: "20%", display: "inline-block"}}>
<h2>Vehicles</h2> <h2>Vehicles</h2>
{vehicleUpgrades.map(upg => upgradeButton(upg))} {vehicleUpgrades.map(upg => upgradeButton(upg))}
</div> </div>
<div style={{width: "20%", display: "inline-block"}}> <div className="noselect" style={{width: "20%", display: "inline-block"}}>
<h2>Rootkits</h2> <h2>Rootkits</h2>
{rootkitUpgrades.map(upg => upgradeButton(upg, true))} {rootkitUpgrades.map(upg => upgradeButton(upg, true))}
</div> </div>
<div style={{width: "20%", display: "inline-block"}}> <div className="noselect" style={{width: "20%", display: "inline-block"}}>
<h2>Augmentations</h2> <h2>Augmentations</h2>
{augUpgrades.map(upg => upgradeButton(upg, true))} {augUpgrades.map(upg => upgradeButton(upg, true))}
</div> </div>
@ -127,13 +127,13 @@ export function GangMemberUpgradePopup(props: IProps): React.ReactElement {
return (<> return (<>
<input <input
className="text-input" className="text-input noselect"
value={filter} value={filter}
placeholder="Filter gang member" placeholder="Filter gang member"
onChange={event => setFilter(event.target.value)} /> onChange={event => setFilter(event.target.value)} />
<p className="tooltip" style={{marginLeft: '6px', display: 'inline-block'}}> <p className="tooltip" style={{marginLeft: '6px', display: 'inline-block'}}>
Discount: -{numeralWrapper.formatPercentage(1 - 1 / props.gang.getDiscount())} Discount: -{numeralWrapper.formatPercentage(1 - 1 / props.gang.getDiscount())}
<span className="tooltiptext"> <span className="tooltiptext noselect">
You get a discount on equipment and upgrades based on your You get a discount on equipment and upgrades based on your
gang's respect and power. More respect and power leads to more gang's respect and power. More respect and power leads to more
discounts. discounts.

@ -14,7 +14,7 @@ interface IProps {
export function ManagementSubpage(props: IProps): React.ReactElement { export function ManagementSubpage(props: IProps): React.ReactElement {
return (<div style={{display: 'block'}}> return (<div style={{display: 'block'}}>
<p style={{width: "70%"}}> <p className="noselect" style={{width: "70%"}}>
This page is used to manage your gang members and get an overview of This page is used to manage your gang members and get an overview of
your gang's stats. your gang's stats.
<br /> <br />

@ -50,11 +50,11 @@ export function RecruitPopup(props: IRecruitPopupProps): React.ReactElement {
} }
return (<> return (<>
<p>Enter a name for your new Gang member:</p><br /> <p className="noselect">Enter a name for your new Gang member:</p><br />
<input autoFocus <input autoFocus
onKeyUp={onKeyUp} onKeyUp={onKeyUp}
onChange={onChange} onChange={onChange}
className="text-input" className="text-input noselect"
type="text" type="text"
placeholder="unique name" /> placeholder="unique name" />
<a className="std-button" onClick={recruit}>Recruit Gang Member</a> <a className="std-button" onClick={recruit}>Recruit Gang Member</a>

@ -14,5 +14,5 @@ export function TaskDescription(props: IProps): React.ReactElement {
const task = GangMemberTasks[props.member.task]; const task = GangMemberTasks[props.member.task];
const desc = task ? task.desc: GangMemberTasks["Unassigned"].desc; const desc = task ? task.desc: GangMemberTasks["Unassigned"].desc;
return (<p className="inline" dangerouslySetInnerHTML={{__html: desc}} />); return (<p className="inline noselect" dangerouslySetInnerHTML={{__html: desc}} />);
} }

@ -37,7 +37,7 @@ export function TaskSelector(props: IProps): React.ReactElement {
return (<> return (<>
<select <select
onChange={onChange} onChange={onChange}
className="dropdown" className="dropdown noselect"
value={currentTask}> value={currentTask}>
<option key={0} value={"---"}>---</option> <option key={0} value={"---"}>---</option>
{tasks.map((task: string, i: number) => <option key={i+1} value={task}>{task}</option>)} {tasks.map((task: string, i: number) => <option key={i+1} value={task}>{task}</option>)}

@ -47,7 +47,7 @@ export function TerritorySubpage(props: IProps): React.ReactElement {
const gangNames = Object.keys(AllGangs).filter(g => g != props.gang.facName); const gangNames = Object.keys(AllGangs).filter(g => g != props.gang.facName);
return (<div style={{width: '70%'}}> return (<div style={{width: '70%'}}>
<p> <p className="noselect">
This page shows how much territory your Gang controls. This This page shows how much territory your Gang controls. This
statistic is listed as a percentage, which represents how much of statistic is listed as a percentage, which represents how much of
the total territory you control. the total territory you control.
@ -83,7 +83,7 @@ export function TerritorySubpage(props: IProps): React.ReactElement {
onChange={(event)=> props.gang.territoryWarfareEngaged = event.target.checked}/> onChange={(event)=> props.gang.territoryWarfareEngaged = event.target.checked}/>
<label <label
htmlFor="warfare" htmlFor="warfare"
className="tooltip" className="tooltip noselect"
style={{color: "white", display: 'inline-block'}}> style={{color: "white", display: 'inline-block'}}>
Engage in Territory Warfare Engage in Territory Warfare
<span className="tooltiptext" style={{display: "inline-block"}}> <span className="tooltiptext" style={{display: "inline-block"}}>
@ -97,7 +97,7 @@ export function TerritorySubpage(props: IProps): React.ReactElement {
Territory Clash Chance: {numeralWrapper.formatPercentage(props.gang.territoryClashChance, 3)} Territory Clash Chance: {numeralWrapper.formatPercentage(props.gang.territoryClashChance, 3)}
</p> </p>
<div <div
className="help-tip" className="help-tip noselect"
style={{display: "inline-block"}} style={{display: "inline-block"}}
onClick={openWarfareHelp}>?</div> onClick={openWarfareHelp}>?</div>
<br /> <br />
@ -108,7 +108,7 @@ export function TerritorySubpage(props: IProps): React.ReactElement {
type="checkbox" type="checkbox"
style={{display: "inline-block", margin: "2px"}} style={{display: "inline-block", margin: "2px"}}
onChange={(event)=> props.gang.notifyMemberDeath = event.target.checked}/> onChange={(event)=> props.gang.notifyMemberDeath = event.target.checked}/>
<label htmlFor="warfare" className="tooltip" style={{color: "white", display: 'inline-block'}}> <label htmlFor="warfare" className="tooltip noselect" style={{color: "white", display: 'inline-block'}}>
Notify about Gang Member Deaths Notify about Gang Member Deaths
<span className="tooltiptext" style={{display: "inline-block"}}> <span className="tooltiptext" style={{display: "inline-block"}}>
If this is enabled, then you will receive a pop-up notifying you If this is enabled, then you will receive a pop-up notifying you

@ -35,83 +35,83 @@ if (htmlWebpackPlugin.options.googleAnalytics.trackingId) { %>
<ul id="mainmenu" class="mainmenu noscrollbar"> <ul id="mainmenu" class="mainmenu noscrollbar">
<!-- Hacking dropdown --> <!-- Hacking dropdown -->
<li id="hacking-menu-header-li"> <li id="hacking-menu-header-li">
<button id="hacking-menu-header" class="mainmenu-accordion-header"> Hacking </button> <button id="hacking-menu-header" class="mainmenu-accordion-header noselect"> Hacking </button>
</li> </li>
<li id="terminal-tab" class="mainmenu-accordion-panel"> <li id="terminal-tab" class="mainmenu-accordion-panel noselect">
<button id="terminal-menu-link"> Terminal </button> <button id="terminal-menu-link"> Terminal </button>
</li> </li>
<li id="create-script-tab" class="mainmenu-accordion-panel"> <li id="create-script-tab" class="mainmenu-accordion-panel noselect">
<button id="create-script-menu-link"> Create Script </button> <button id="create-script-menu-link"> Create Script </button>
</li> </li>
<li id="active-scripts-tab" class="mainmenu-accordion-panel"> <li id="active-scripts-tab" class="mainmenu-accordion-panel noselect">
<button id="active-scripts-menu-link"> Active Scripts </button> <button id="active-scripts-menu-link"> Active Scripts </button>
</li> </li>
<li id="create-program-tab" class="mainmenu-accordion-panel"> <li id="create-program-tab" class="mainmenu-accordion-panel noselect">
<button id="create-program-menu-link"> Create Program </button> <button id="create-program-menu-link"> Create Program </button>
<span id="create-program-notification" class="notification-off"> </span> <span id="create-program-notification" class="notification-off"> </span>
</li> </li>
<!-- Character dropdown --> <!-- Character dropdown -->
<li id="character-menu-header-li"> <li id="character-menu-header-li">
<button id="character-menu-header" class="mainmenu-accordion-header"> Character </button> <button id="character-menu-header" class="mainmenu-accordion-header noselect"> Character </button>
</li> </li>
<li id="stats-tab" class="mainmenu-accordion-panel"> <li id="stats-tab" class="mainmenu-accordion-panel noselect">
<button id="stats-menu-link"> Stats </button> <button id="stats-menu-link"> Stats </button>
</li> </li>
<li id="factions-tab" class="mainmenu-accordion-panel"> <li id="factions-tab" class="mainmenu-accordion-panel noselect">
<button id="factions-menu-link"> Factions </button> <button id="factions-menu-link"> Factions </button>
<span id="factions-notification" class="notification-off"> </span> <span id="factions-notification" class="notification-off"> </span>
</li> </li>
<li id="augmentations-tab" class="mainmenu-accordion-panel"> <li id="augmentations-tab" class="mainmenu-accordion-panel noselect">
<button id="augmentations-menu-link" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"> Augmentations </button> <button id="augmentations-menu-link" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"> Augmentations </button>
<span id="augmentations-notification" class="notification-off"> </span> <span id="augmentations-notification" class="notification-off"> </span>
</li> </li>
<li id="hacknet-nodes-tab" class="mainmenu-accordion-panel"> <li id="hacknet-nodes-tab" class="mainmenu-accordion-panel noselect">
<button id="hacknet-nodes-menu-link"> Hacknet </button> <button id="hacknet-nodes-menu-link"> Hacknet </button>
</li> </li>
<li id="sleeves-tab" class="mainmenu-accordion-panel"> <li id="sleeves-tab" class="mainmenu-accordion-panel noselect">
<button id="sleeves-menu-link"> Sleeves </button> <button id="sleeves-menu-link"> Sleeves </button>
</li> </li>
<!-- World dropdown --> <!-- World dropdown -->
<li id="world-menu-header-li"> <li id="world-menu-header-li">
<button id="world-menu-header" class="mainmenu-accordion-header">World</button> <button id="world-menu-header" class="mainmenu-accordion-header noselect">World</button>
</li> </li>
<li id="city-tab" class="mainmenu-accordion-panel"> <li id="city-tab" class="mainmenu-accordion-panel noselect">
<button id="city-menu-link"> City </button> <button id="city-menu-link"> City </button>
</li> </li>
<li id="travel-tab" class="mainmenu-accordion-panel"> <li id="travel-tab" class="mainmenu-accordion-panel noselect">
<button id="travel-menu-link"> Travel </button> <button id="travel-menu-link"> Travel </button>
</li> </li>
<li id="job-tab" class="mainmenu-accordion-panel"> <li id="job-tab" class="mainmenu-accordion-panel noselect">
<button id="job-menu-link"> Job </button> <button id="job-menu-link"> Job </button>
</li> </li>
<li id="stock-market-tab" class="mainmenu-accordion-panel"> <li id="stock-market-tab" class="mainmenu-accordion-panel noselect">
<button id="stock-market-menu-link"> Stock Market </button> <button id="stock-market-menu-link"> Stock Market </button>
</li> </li>
<li id="bladeburner-tab" class="mainmenu-accordion-panel"> <li id="bladeburner-tab" class="mainmenu-accordion-panel noselect">
<button id="bladeburner-menu-link"> Bladeburner </button> <button id="bladeburner-menu-link"> Bladeburner </button>
</li> </li>
<li id="corporation-tab" class="mainmenu-accordion-panel"> <li id="corporation-tab" class="mainmenu-accordion-panel noselect">
<button id="corporation-menu-link"> Corp </button> <button id="corporation-menu-link"> Corp </button>
</li> </li>
<li id="gang-tab" class="mainmenu-accordion-panel"> <li id="gang-tab" class="mainmenu-accordion-panel noselect">
<button id="gang-menu-link"> Gang </button> <button id="gang-menu-link"> Gang </button>
</li> </li>
<li id="help-menu-header-li"> <li id="help-menu-header-li">
<button id="help-menu-header" class="mainmenu-accordion-header"> Help </button> <button id="help-menu-header" class="mainmenu-accordion-header noselect"> Help </button>
</li> </li>
<li id="milestones-tab" class="mainmenu-accordion-panel"> <li id="milestones-tab" class="mainmenu-accordion-panel noselect">
<button id="milestones-menu-link"> Milestones </button> <button id="milestones-menu-link"> Milestones </button>
</li> </li>
<li id="tutorial-tab" class="mainmenu-accordion-panel"> <li id="tutorial-tab" class="mainmenu-accordion-panel noselect">
<button id="tutorial-menu-link"> Tutorial </button> <button id="tutorial-menu-link"> Tutorial </button>
</li> </li>
<li id="options-tab" class="mainmenu-accordion-panel"> <li id="options-tab" class="mainmenu-accordion-panel noselect">
<button id="options-menu-link"> Options </button> <button id="options-menu-link"> Options </button>
</li> </li>
<li id="dev-tab" class="mainmenu-accordion-panel"> <li id="dev-tab" class="mainmenu-accordion-panel noselect">
<button id="dev-menu-link"> Dev </button> <button id="dev-menu-link"> Dev </button>
</li> </li>
</ul> </ul>
@ -379,7 +379,7 @@ if (htmlWebpackPlugin.options.googleAnalytics.trackingId) { %>
<div id="character-overview-text"> <div id="character-overview-text">
<!-- ReactJS Component --> <!-- ReactJS Component -->
</div> </div>
<div class="character-quick-options"> <div class="character-quick-options noselect">
<button id="character-overview-save-button" class="character-overview-btn">Save Game</button> <button id="character-overview-save-button" class="character-overview-btn">Save Game</button>
<button id="character-overview-options-button" class="character-overview-btn">Options</button> <button id="character-overview-options-button" class="character-overview-btn">Options</button>
</div> </div>