From 82875448c485d26375ed6dea4e64e940f6e10f74 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 8 Jan 2024 15:10:10 +0100 Subject: gemini --- src/Model/Building/ClayPit.php | 7 ++++++- src/Model/Building/Embassy.php | 7 ++++++- src/Model/Building/Farm.php | 9 +++++++-- src/Model/Building/IronMine.php | 7 ++++++- src/Model/Building/Marketplace.php | 7 ++++++- src/Model/Building/Storage.php | 7 ++++++- src/Model/Building/TownHall.php | 7 ++++++- src/Model/Building/WoodCutter.php | 7 ++++++- 8 files changed, 49 insertions(+), 9 deletions(-) (limited to 'src/Model/Building') diff --git a/src/Model/Building/ClayPit.php b/src/Model/Building/ClayPit.php index b4905eb..dfead72 100644 --- a/src/Model/Building/ClayPit.php +++ b/src/Model/Building/ClayPit.php @@ -8,7 +8,12 @@ class ClayPit extends ResourceGenerator public int $buildTimeFactor = 1; public int $maxLevel = 25; - public array $resourceRequirements = [ + public array $resourceRequirementsBase = [ + 'wood' => 100, + 'clay' => 200, + 'iron' => 100, + ]; + public array $resourceRequirementsFactor = [ 'wood' => 1.0, 'clay' => 2.0, 'iron' => 1.0, diff --git a/src/Model/Building/Embassy.php b/src/Model/Building/Embassy.php index 3be1f7f..a8a1ec4 100644 --- a/src/Model/Building/Embassy.php +++ b/src/Model/Building/Embassy.php @@ -9,7 +9,12 @@ class Embassy extends Building public int $buildTimeFactor = 1; public int $maxLevel = 25; - public array $resourceRequirements = [ + public array $resourceRequirementsBase = [ + 'wood' => 2500, + 'clay' => 2500, + 'iron' => 3000, + ]; + public array $resourceRequirementsFactor = [ 'wood' => 25.0, 'clay' => 25.0, 'iron' => 30.0, diff --git a/src/Model/Building/Farm.php b/src/Model/Building/Farm.php index 222d8cd..1a69c89 100644 --- a/src/Model/Building/Farm.php +++ b/src/Model/Building/Farm.php @@ -11,7 +11,12 @@ class Farm extends ResourceGenerator public int $buildTimeFactor = 1; public int $maxLevel = 25; - public array $resourceRequirements = [ + public array $resourceRequirementsBase = [ + 'wood' => 100, + 'clay' => 100, + 'iron' => 100, + ]; + public array $resourceRequirementsFactor = [ 'wood' => 1.0, 'clay' => 1.0, 'iron' => 1.0, @@ -22,7 +27,7 @@ class Farm extends ResourceGenerator public function getResourceIncrementor(): int { $populationDemand = array_reduce( - Village::getUnits($this->villageId, Village::FETCH_UNIT_RESIDENCE), + Village::getUnits($this->villageId, Village::FETCH_UNIT_RESIDENCE, Village::RETURN_UNIT_EXISTING), function ($carry, Unit $unit) { return $carry + $unit->getPopulationDemand(); } diff --git a/src/Model/Building/IronMine.php b/src/Model/Building/IronMine.php index d240e3a..8e70ee0 100644 --- a/src/Model/Building/IronMine.php +++ b/src/Model/Building/IronMine.php @@ -8,7 +8,12 @@ class IronMine extends ResourceGenerator public int $buildTimeFactor = 1; public int $maxLevel = 25; - public array $resourceRequirements = [ + public array $resourceRequirementsBase = [ + 'wood' => 100, + 'clay' => 100, + 'iron' => 200, + ]; + public array $resourceRequirementsFactor = [ 'wood' => 1.0, 'clay' => 1.0, 'iron' => 2.0, diff --git a/src/Model/Building/Marketplace.php b/src/Model/Building/Marketplace.php index 714de0d..2d87379 100644 --- a/src/Model/Building/Marketplace.php +++ b/src/Model/Building/Marketplace.php @@ -9,7 +9,12 @@ class Marketplace extends Building public int $buildTimeFactor = 1; public int $maxLevel = 25; - public array $resourceRequirements = [ + public array $resourceRequirementsBase = [ + 'wood' => 1000, + 'clay' => 1000, + 'iron' => 800, + ]; + public array $resourceRequirementsFactor = [ 'wood' => 10.0, 'clay' => 10.0, 'iron' => 8.0, diff --git a/src/Model/Building/Storage.php b/src/Model/Building/Storage.php index de2df92..d75b80d 100644 --- a/src/Model/Building/Storage.php +++ b/src/Model/Building/Storage.php @@ -10,7 +10,12 @@ class Storage extends Building public int $buildTimeFactor = 1; public int $maxLevel = 25; - public array $resourceRequirements = [ + public array $resourceRequirementsBase = [ + 'wood' => 250, + 'clay' => 250, + 'iron' => 250, + ]; + public array $resourceRequirementsFactor = [ 'wood' => 1.0, 'clay' => 1.0, 'iron' => 1.0, diff --git a/src/Model/Building/TownHall.php b/src/Model/Building/TownHall.php index 608f083..33fd105 100644 --- a/src/Model/Building/TownHall.php +++ b/src/Model/Building/TownHall.php @@ -9,7 +9,12 @@ class TownHall extends Building public int $buildTimeFactor = 1; public int $maxLevel = 25; - public array $resourceRequirements = [ + public array $resourceRequirementsBase = [ + 'wood' => 250, + 'clay' => 250, + 'iron' => 250, + ]; + public array $resourceRequirementsFactor = [ 'wood' => 1.0, 'clay' => 1.0, 'iron' => 1.0, diff --git a/src/Model/Building/WoodCutter.php b/src/Model/Building/WoodCutter.php index 726cdbc..6e1ce8c 100644 --- a/src/Model/Building/WoodCutter.php +++ b/src/Model/Building/WoodCutter.php @@ -8,7 +8,12 @@ class WoodCutter extends ResourceGenerator public int $buildTimeFactor = 1; public int $maxLevel = 25; - public array $resourceRequirements = [ + public array $resourceRequirementsBase = [ + 'wood' => 200, + 'clay' => 100, + 'iron' => 100, + ]; + public array $resourceRequirementsFactor = [ 'wood' => 2.0, 'clay' => 1.0, 'iron' => 1.0, -- cgit v1.2.3