From 2aa53e9568c893ae9b8555771f0dbefd3a3f393f Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Mon, 2 Jun 2014 11:15:31 +0200 Subject: [PATCH] Corrected guard calculation to match OH3. --- config/rmg.json | 12 ++++++------ lib/rmg/CRmgTemplateZone.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/rmg.json b/config/rmg.json index 0ac7bf064..99e318f85 100644 --- a/config/rmg.json +++ b/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" : diff --git a/lib/rmg/CRmgTemplateZone.cpp b/lib/rmg/CRmgTemplateZone.cpp index 01f2e09b8..137224ba2 100644 --- a/lib/rmg/CRmgTemplateZone.cpp +++ b/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; }