summaryrefslogtreecommitdiff
path: root/src/Model/Building
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/Building')
-rw-r--r--src/Model/Building/ClayPit.php7
-rw-r--r--src/Model/Building/Embassy.php7
-rw-r--r--src/Model/Building/Farm.php9
-rw-r--r--src/Model/Building/IronMine.php7
-rw-r--r--src/Model/Building/Marketplace.php7
-rw-r--r--src/Model/Building/Storage.php7
-rw-r--r--src/Model/Building/TownHall.php7
-rw-r--r--src/Model/Building/WoodCutter.php7
8 files changed, 49 insertions, 9 deletions
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,