summaryrefslogtreecommitdiff
path: root/src/Model/Building.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/Building.php')
-rw-r--r--src/Model/Building.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Model/Building.php b/src/Model/Building.php
index eb166f9..78d1aa5 100644
--- a/src/Model/Building.php
+++ b/src/Model/Building.php
@@ -69,7 +69,7 @@ class Building
*/
public function getResourceRequirements(): array
{
- return $this->getResourceRequirementsForLevel($this->level);
+ return $this->getResourceRequirementsForLevel($this->level + 1);
}
/**
@@ -77,10 +77,8 @@ class Building
*/
public function getResourceRequirementsForLevel(int $level): array
{
- $level += 1;
-
return array_map(
- fn ($resourceRequirement) => ceil(log($level * 2) * $resourceRequirement * 64 * $level),
+ fn ($resourceRequirement) => ceil(log($level * 2) * $resourceRequirement * $_ENV['BASE_BUILDING_RESOURCE_REQUIREMENT_FACTOR'] * $level),
$this->resourceRequirements
);
}