mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:40:46 +00:00
easier to take nuclear land if most of the land are nuclear (#241)
- **Revert "Change BorderTiles from Array to Set (#230)"** - **easier to take nuclear land if most of the land are nuclear**
This commit is contained in:
@@ -163,7 +163,7 @@ export interface Config {
|
||||
tradeShipSpawnRate(): number;
|
||||
defensePostRange(): number;
|
||||
defensePostDefenseBonus(): number;
|
||||
falloutDefenseModifier(): number;
|
||||
falloutDefenseModifier(percentOfFallout: number): number;
|
||||
difficultyModifier(difficulty: Difficulty): number;
|
||||
// 0-1
|
||||
traitorDefenseDebuff(): number;
|
||||
|
||||
@@ -126,8 +126,10 @@ export class DefaultConfig implements Config {
|
||||
return 250_000;
|
||||
}
|
||||
|
||||
falloutDefenseModifier(): number {
|
||||
return 5;
|
||||
falloutDefenseModifier(falloutRatio: number): number {
|
||||
// falloutRatio is between 0 and 1
|
||||
// So defense modifier is between [5, 2.5]
|
||||
return 5 - falloutRatio * 2;
|
||||
}
|
||||
|
||||
defensePostRange(): number {
|
||||
@@ -374,8 +376,9 @@ export class DefaultConfig implements Config {
|
||||
}
|
||||
|
||||
if (gm.hasFallout(tileToConquer)) {
|
||||
mag *= this.falloutDefenseModifier();
|
||||
speed *= this.falloutDefenseModifier();
|
||||
const falloutRatio = gm.numTilesWithFallout() / gm.numLandTiles();
|
||||
mag *= this.falloutDefenseModifier(falloutRatio);
|
||||
speed *= this.falloutDefenseModifier(falloutRatio);
|
||||
}
|
||||
|
||||
if (attacker.isPlayer() && defender.isPlayer()) {
|
||||
|
||||
Reference in New Issue
Block a user