tribe; $start = ($tribe - 1) * 10 + 4 - ($tribe == 3 ? 1 : 0) + ($tribe == 2 ? 1 : 0); $end = $tribe * 10 - 4; $success = 0; $horseTrough = $building->getTypeLevel(41); for ($i = $start; $i <= $end; $i++) { if (!$technology->getTech($i)) continue; $unitData = ${'u'.$i}; $name = $technology->getUnitName($i); $maxTrain = $technology->maxUnit($i); $maxPlus = $technology->maxUnitPlus($i); $available = (int)($village->unitarray['u'.$i] ?? 0); $pop = (int)$unitData['pop'] - (isset($unitData['drinking']) && $unitData['drinking'] <= $horseTrough? 1 : 0); $baseTime = $unitData['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100); if ($horseTrough >= 1) $baseTime *= (1 / $bid41[$horseTrough]['attri']); $dur = $database->getArtifactsValueInfluence($session->uid, $village->wid, 5, round($baseTime / SPEED)); $timeFormatted = $generator->getTimeFormat($dur); $total_required = (int)($unitData['wood'] + $unitData['clay'] + $unitData['iron'] + $unitData['crop']); $showNpc = $session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required; $success++; ?>
<?php echo htmlspecialchars($name);?> (: )
Wood| Clay| Iron| Crop| Crop consumption| Duration |NPC trade
()