diff options
Diffstat (limited to 'src/Model/Building/PostOffice.php')
-rw-r--r-- | src/Model/Building/PostOffice.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Model/Building/PostOffice.php b/src/Model/Building/PostOffice.php new file mode 100644 index 0000000..5765a0f --- /dev/null +++ b/src/Model/Building/PostOffice.php @@ -0,0 +1,32 @@ +<?php + +namespace App\Model\Building; + +use App\Model\Building; +use App\Model\Unit\MailCarrier; +use App\Model\Village; + +class PostOffice extends Building +{ + public string $unitType = 'MailCarrier'; + public int $buildTimeFactor = 5; + public int $maxLevel = 25; + + public array $resourceRequirementsBase = [ + 'wood' => 1000, + 'clay' => 1000, + 'iron' => 800, + ]; + public array $resourceRequirementsFactor = [ + 'wood' => 10.0, + 'clay' => 10.0, + 'iron' => 8.0, + ]; + + public static function getResourceCapabilities(Village $village): int + { + $mailCarriers = Village::getUnit($village, 'MailCarrier', Village::FETCH_UNIT_RESIDENCE, Village::RETURN_UNIT_EXISTING); + + return MailCarrier::getResourceCapabilities($village) * $mailCarriers->amount; + } +} |