improve AttackExecution perf

This commit is contained in:
evanpelle
2024-09-01 19:18:38 -07:00
parent 804bc8746d
commit c1dc6217a5
5 changed files with 66 additions and 75 deletions
+2 -2
View File
@@ -48,9 +48,9 @@ export class DefaultConfig implements Config {
attackTilesPerTick(attacker: Player, defender: Player | TerraNullius, numAdjacentTilesWithEnemy: number): number {
if (defender.isPlayer()) {
return within(attacker.numTilesOwned() / defender.numTilesOwned() * 2, .01, .5) * numAdjacentTilesWithEnemy * 2
return within(attacker.numTilesOwned() / defender.numTilesOwned() * 2, .01, .5) * numAdjacentTilesWithEnemy * 2 / 25
} else {
return numAdjacentTilesWithEnemy * 2
return numAdjacentTilesWithEnemy * 2 / 25
}
}