diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-10-04 11:32:04 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-10-04 11:32:04 +0200 |
commit | 94a3dd52da3ae180af37c6fd0e8c24b3562da388 (patch) | |
tree | acced055660bfd65ca3e955ea26d412457ba4507 /src/Model/Building.php | |
parent | fa00b957378a393f8edbfc98ef111d35d18ecb09 (diff) |
initial commit 2
Diffstat (limited to 'src/Model/Building.php')
-rw-r--r-- | src/Model/Building.php | 6 |
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 ); } |