From 11bd204bd0fd656166f7a04584c923945d51e5d2 Mon Sep 17 00:00:00 2001 From: 1brucben <1benjbruce@gmail.com> Date: Thu, 24 Apr 2025 03:56:58 +0200 Subject: [PATCH] fix nuke bug, boost attack speed for large attacks --- src/core/configuration/DefaultConfig.ts | 4 ++-- src/core/execution/FakeHumanExecution.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index 029426be7..1a329642b 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -491,7 +491,7 @@ export class DefaultConfig implements Config { (defender.isTraitor() ? this.traitorDefenseDebuff() : 1), defenderTroopLoss: defenderdensity, tilesPerTickUsed: within( - 3.2 * defenderdensity ** 0.5 * adjustedRatio ** 0.7 * speed, + 2.8 * defenderdensity ** 0.5 * adjustedRatio ** 0.8 * speed, 8, 1000, ), @@ -682,7 +682,7 @@ export class DefaultConfig implements Config { // Humans can be population, soldiers attacking, soldiers in boat etc. nukeDeathFactor(humans: number, tilesOwned: number): number { - return humans / Math.max(2, tilesOwned); + return (2 * humans) / Math.max(1, tilesOwned); } structureMinDist(): number { diff --git a/src/core/execution/FakeHumanExecution.ts b/src/core/execution/FakeHumanExecution.ts index 440604b59..66d36d728 100644 --- a/src/core/execution/FakeHumanExecution.ts +++ b/src/core/execution/FakeHumanExecution.ts @@ -47,7 +47,7 @@ export class FakeHumanExecution implements Execution { private portTargetRatio: number = 0.0003; // desired ports per tile private cityTargetRatio: number = 0.0006; // desired cities per tile private defensePostSpacing: number = 40; // minimum distance between defense posts - private defensePostTargetRatio: number = 0.001; // desired defense posts per tile + private defensePostTargetRatio: number = 0.0005; // desired defense posts per tile private lastDefensePostTick: number = -9999; constructor(