mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-02-17 02:22:23 +01:00
allbuild commit /usr/bin/git
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -191,7 +191,7 @@ export class Gang implements IGang {
|
||||
}
|
||||
|
||||
// Then process territory
|
||||
const gangs = GangConstants.Names.filter((g) => AllGangs[g].territory > 0);
|
||||
const gangs = GangConstants.Names.filter((g) => AllGangs[g].territory > 0 || g === gangName);
|
||||
if (gangs.length > 1) {
|
||||
for (let i = 0; i < gangs.length; ++i) {
|
||||
const others = gangs.filter((e) => {
|
||||
@ -225,9 +225,9 @@ export class Gang implements IGang {
|
||||
if (AllGangs[otherGang].territory <= 0) return;
|
||||
const territoryGain = calculateTerritoryGain(thisGang, otherGang);
|
||||
AllGangs[thisGang].territory += territoryGain;
|
||||
if (AllGangs[thisGang].territory > 1) AllGangs[thisGang].territory = 1;
|
||||
if (AllGangs[thisGang].territory > 0.999) AllGangs[thisGang].territory = 1;
|
||||
AllGangs[otherGang].territory -= territoryGain;
|
||||
if (AllGangs[thisGang].territory < 0) AllGangs[thisGang].territory = 0;
|
||||
if (AllGangs[thisGang].territory < 0.001) AllGangs[thisGang].territory = 0;
|
||||
if (thisGang === gangName) {
|
||||
this.clash(true); // Player won
|
||||
AllGangs[otherGang].power *= 1 / 1.01;
|
||||
@ -240,9 +240,9 @@ export class Gang implements IGang {
|
||||
if (AllGangs[thisGang].territory <= 0) return;
|
||||
const territoryGain = calculateTerritoryGain(otherGang, thisGang);
|
||||
AllGangs[thisGang].territory -= territoryGain;
|
||||
if (AllGangs[otherGang].territory < 0) AllGangs[otherGang].territory = 0;
|
||||
if (AllGangs[otherGang].territory < 0.001) AllGangs[otherGang].territory = 0;
|
||||
AllGangs[otherGang].territory += territoryGain;
|
||||
if (AllGangs[otherGang].territory > 1) AllGangs[otherGang].territory = 1;
|
||||
if (AllGangs[otherGang].territory > 0.999) AllGangs[otherGang].territory = 1;
|
||||
if (thisGang === gangName) {
|
||||
this.clash(false); // Player lost
|
||||
} else if (otherGang === gangName) {
|
||||
|
@ -215,6 +215,8 @@ export const RamCosts: IMap<any> = {
|
||||
getPlayer: RamCostConstants.ScriptSingularityFn1RamCost / 4,
|
||||
mv: 0,
|
||||
getOwnedSourceFiles: RamCostConstants.ScriptGetOwnedSourceFiles,
|
||||
tail: 0,
|
||||
toast: 0,
|
||||
|
||||
// Singularity Functions
|
||||
universityCourse: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),
|
||||
|
Reference in New Issue
Block a user