diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-01-08 22:28:02 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-01-08 22:28:02 +0100 |
commit | e4351601a7ced91bf5a2c516a38db714d43e6ecf (patch) | |
tree | 045b0fb41621aab160cca3b24fd4184e1d8db9c2 /src/Model/Unit/Merchant.php | |
parent | 82875448c485d26375ed6dea4e64e940f6e10f74 (diff) |
send resources + adminer css
Diffstat (limited to 'src/Model/Unit/Merchant.php')
-rw-r--r-- | src/Model/Unit/Merchant.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Model/Unit/Merchant.php b/src/Model/Unit/Merchant.php index 8958d27..be0b25e 100644 --- a/src/Model/Unit/Merchant.php +++ b/src/Model/Unit/Merchant.php @@ -3,6 +3,7 @@ namespace App\Model\Unit; use App\Model\Unit; +use App\Model\Village; class Merchant extends Unit { @@ -22,4 +23,11 @@ class Merchant extends Unit 'iron' => 2.0, 'food' => 2.0, ]; + + public static function getResourceCapabilities(Village|int $village): int + { + $marketplace = Village::getBuilding($village->id ?? $village, 'Marketplace'); + + return $marketplace->level * 100; + } } |