From fa00b957378a393f8edbfc98ef111d35d18ecb09 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 24 Sep 2023 13:40:25 +0200 Subject: initial commit --- src/Model/Building/ResourceGenerator.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/Model/Building/ResourceGenerator.php (limited to 'src/Model/Building/ResourceGenerator.php') diff --git a/src/Model/Building/ResourceGenerator.php b/src/Model/Building/ResourceGenerator.php new file mode 100644 index 0000000..5f1a6bb --- /dev/null +++ b/src/Model/Building/ResourceGenerator.php @@ -0,0 +1,22 @@ +unitType, $this->villageId); + + return (int)ceil( + log( + ($this->level * $amountResiding) + 1 + ) * $_ENV['BASE_RESOURCE_GENERATION_FACTOR'] + ); + } +} -- cgit v1.2.3