Browse Source

Corrected guard calculation to match OH3.

DjWarmonger 11 years ago
parent
commit
2aa53e9568
2 changed files with 7 additions and 7 deletions
  1. 6 6
      config/rmg.json
  2. 1 1
      lib/rmg/CRmgTemplateZone.cpp

+ 6 - 6
config/rmg.json

@@ -70,12 +70,12 @@
 		},
 		"connections" :
 		[
-			{ "a" : "1", "b" : "3", "guard" : 1000 },
-			{ "a" : "1", "b" : "5", "guard" : 4000 },
-			{ "a" : "2", "b" : "4", "guard" : 1000 },
-			{ "a" : "2", "b" : "5", "guard" : 4000 },
-			{ "a" : "3", "b" : "5", "guard" : 2000 },
-			{ "a" : "4", "b" : "5", "guard" : 2000 }
+			{ "a" : "1", "b" : "3", "guard" : 2000 },
+			{ "a" : "1", "b" : "5", "guard" : 8000 },
+			{ "a" : "2", "b" : "4", "guard" : 2000 },
+			{ "a" : "2", "b" : "5", "guard" : 8000 },
+			{ "a" : "3", "b" : "5", "guard" : 4000 },
+			{ "a" : "4", "b" : "5", "guard" : 4000 }
 		]
 	},
 	"Golden Ring" :

+ 1 - 1
lib/rmg/CRmgTemplateZone.cpp

@@ -409,7 +409,7 @@ void CRmgTemplateZone::addMonster(CMapGenerator* gen, int3 &pos, si32 strength)
 	{
 		creId = VLC->creh->pickRandomMonster(gen->rand);
 		auto cre = VLC->creh->creatures[creId];
-		amount = strength / cre->AIValue;
+		amount = std::ceil((float)strength / cre->fightValue);
 		if (amount >= cre->ammMin && amount <= 100)
 			break;
 	}