getAvailableExpansionTraining(); $totalSlots = ($slots['settlers'] ?? 0) + ($slots['chiefs'] ?? 0); if ($totalSlots > 0): ?>
tribe - 1) * 10 + 9; $end = $session->tribe * 10; for ($i = $start; $i <= $end; $i++): $isSettler = ($i % 10 === 0); $isChief = ($i % 10 === 9 && $session->tribe != 4); if (($isSettler && $slots['settlers'] > 0) || ($isChief && $slots['chiefs'] > 0)): $unitName = $technology->getUnitName($i); $costs = $GLOBALS['u'.$i]; $maxByTech = $technology->maxUnit($i); $slotLimit = $isSettler ? $slots['settlers'] : $slots['chiefs']; $maxUnit = min($maxByTech, $slotLimit); $available = (int)($village->unitarray['u'.$i] ?? 0); // TIME WITH PALACE BONUS AND ARTEFACT $baseTime = $costs['time'] * ($bid26[$village->resarray['f'.$id]]['attri'] / 100) / SPEED; $duration = $database->getArtifactsValueInfluence($session->uid, $village->wid, 5, round($baseTime)); $totalRequired = $costs['wood'] + $costs['clay'] + $costs['iron'] + $costs['crop']; $canNpc = $session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $totalRequired; ?>
<?php echo htmlspecialchars($unitName);?> (: )
<?php echo LUMBER;?>| <?php echo CLAY;?>| <?php echo IRON;?>| <?php echo CROP;?>| <?php echo DURATION;?>getTimeFormat($duration);?> | <?php echo NPC_TRADE; ?>
()