summaryrefslogtreecommitdiff
path: root/src/Model/Unit
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/Unit')
-rw-r--r--src/Model/Unit/Merchant.php8
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;
+ }
}