From e4351601a7ced91bf5a2c516a38db714d43e6ecf Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 8 Jan 2024 22:28:02 +0100 Subject: send resources + adminer css --- src/Model/Unit/Merchant.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Model/Unit') 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; + } } -- cgit v1.2.3