Browse Source

Fix typo: Absoolute -> Absolute

Ivan Savenko 10 months ago
parent
commit
40aa49acff

+ 1 - 1
AI/Nullkiller/AIGateway.cpp

@@ -548,7 +548,7 @@ std::optional<BattleAction> AIGateway::makeSurrenderRetreatDecision(const Battle
 	double fightRatio = ourStrength / (double)battleState.getEnemyStrength();
 
 	// if we have no towns - things are already bad, so retreat is not an option.
-	if(cb->getTownsInfo().size() && ourStrength < nullkiller->settings->getRetreatThresholdAbsoolute() && fightRatio < nullkiller->settings->getRetreatThresholdRelative() && battleState.canFlee)
+	if(cb->getTownsInfo().size() && ourStrength < nullkiller->settings->getRetreatThresholdAbsolute() && fightRatio < nullkiller->settings->getRetreatThresholdRelative() && battleState.canFlee)
 	{
 		return BattleAction::makeRetreat(battleState.ourSide);
 	}

+ 2 - 2
AI/Nullkiller/Engine/Settings.cpp

@@ -30,7 +30,7 @@ namespace NKAI
 		scoutHeroTurnDistanceLimit(5),
 		maxGoldPressure(0.3f),
 		retreatThresholdRelative(0.3),
-		retreatThresholdAbsoolute(10000),
+		retreatThresholdAbsolute(10000),
 		safeAttackRatio(1.1),
 		maxpass(10),
 		pathfinderBucketsCount(1),
@@ -52,7 +52,7 @@ namespace NKAI
 		pathfinderBucketSize = node["pathfinderBucketSize"].Integer();
 		maxGoldPressure = node["maxGoldPressure"].Float();
 		retreatThresholdRelative = node["retreatThresholdRelative"].Float();
-		retreatThresholdAbsoolute = node["retreatThresholdAbsoolute"].Float();
+		retreatThresholdAbsolute = node["retreatThresholdAbsolute"].Float();
 		safeAttackRatio = node["safeAttackRatio"].Float();
 		allowObjectGraph = node["allowObjectGraph"].Bool();
 		openMap = node["openMap"].Bool();

+ 2 - 2
AI/Nullkiller/Engine/Settings.h

@@ -29,7 +29,7 @@ namespace NKAI
 		int pathfinderBucketSize;
 		float maxGoldPressure;
 		float retreatThresholdRelative;
-		float retreatThresholdAbsoolute;
+		float retreatThresholdAbsolute;
 		float safeAttackRatio;
 		bool allowObjectGraph;
 		bool useTroopsFromGarrisons;
@@ -42,7 +42,7 @@ namespace NKAI
 		int getMaxPass() const { return maxpass; }
 		float getMaxGoldPressure() const { return maxGoldPressure; }
 		float getRetreatThresholdRelative() const { return retreatThresholdRelative; }
-		float getRetreatThresholdAbsoolute() const { return retreatThresholdAbsoolute; }
+		float getRetreatThresholdAbsolute() const { return retreatThresholdAbsolute; }
 		float getSafeAttackRatio() const { return safeAttackRatio; }
 		int getMaxRoamingHeroes() const { return maxRoamingHeroes; }
 		int getMainHeroTurnDistanceLimit() const { return mainHeroTurnDistanceLimit; }

+ 5 - 5
config/ai/nkai/nkai-settings.json

@@ -11,7 +11,7 @@
 		"pathfinderBucketsCount" : 1, // old value: 3,
 		"pathfinderBucketSize" : 32, // old value: 7,
 		"retreatThresholdRelative" : 0.3,
-		"retreatThresholdAbsoolute" : 10000,
+		"retreatThresholdAbsolute" : 10000,
 		"safeAttackRatio" : 1.1,
 		"useFuzzy" : false
 	},
@@ -28,7 +28,7 @@
 		"pathfinderBucketsCount" : 1, // old value: 3,
 		"pathfinderBucketSize" : 32, // old value: 7,
 		"retreatThresholdRelative" : 0.3,
-		"retreatThresholdAbsoolute" : 10000,
+		"retreatThresholdAbsolute" : 10000,
 		"safeAttackRatio" : 1.1,
 		"useFuzzy" : false
 	},
@@ -45,7 +45,7 @@
 		"pathfinderBucketsCount" : 1, // old value: 3,
 		"pathfinderBucketSize" : 32, // old value: 7,
 		"retreatThresholdRelative" : 0.3,
-		"retreatThresholdAbsoolute" : 10000,
+		"retreatThresholdAbsolute" : 10000,
 		"safeAttackRatio" : 1.1,
 		"useFuzzy" : false
 	},
@@ -62,7 +62,7 @@
 		"pathfinderBucketsCount" : 1, // old value: 3,
 		"pathfinderBucketSize" : 32, // old value: 7,
 		"retreatThresholdRelative" : 0.3,
-		"retreatThresholdAbsoolute" : 10000,
+		"retreatThresholdAbsolute" : 10000,
 		"safeAttackRatio" : 1.1,
 		"useFuzzy" : false
 	},
@@ -79,7 +79,7 @@
 		"pathfinderBucketsCount" : 1, // old value: 3,
 		"pathfinderBucketSize" : 32, // old value: 7,
 		"retreatThresholdRelative" : 0.3,
-		"retreatThresholdAbsoolute" : 10000,
+		"retreatThresholdAbsolute" : 10000,
 		"safeAttackRatio" : 1.1,
 		"useFuzzy" : false
 	}