Hero($id,1);
$heroAliveIndex = -1;
if ($hero !== false) {
foreach ($hero as $hid => $h) {
if (!$h['dead']) { $heroAliveIndex = $hid; break; }
}
}
?>
|
getUnitName($huid)."\" title=\"".$technology->getUnitName($huid)."\" />";
}
?>
|
| Hero # |
|
|
|
|
|
getUnitName($h['unit'])."\" title=\"".$technology->getUnitName($h['unit'])."\" /> ".$technology->getUnitName($h['unit']); ?> |
|
' title="">
(kill living hero first)'; } ?>
|
| | |
| | |
| | |
| % | |
| % | |
| /Day | |
'all', 1 => 'lumber', 2 => 'clay', 3 => 'iron', 4 => 'crop'];
$hResAmount = ($hResType >= 1 && $hResType <= 4)
? (int) round($hResPoints * $hPerOne * SPEED)
: (int) round($hResPoints * $hPerAll * SPEED);
?>
| /h () | |
$count_level_exp) $h['points'] = $count_level_exp;
// 2. procent XP - protejat pentru level 100
$level = (int)$h['level'];
if ($level >= $hMaxLevel || !isset($hero_levels[$level+1])) {
$expPct = 100;
} else {
$curr = $hero_levels[$level] ?? 0;
$next = $hero_levels[$level+1] ?? $curr;
$den = $next - $curr;
$expPct = ($den > 0 && $h['experience'] < $next)
? (int)(($h['experience'] - $curr) * 100 / $den)
: 100;
}
$expPct = max(0, min(100, $expPct));
?>
| Experience: % |
|
| % |
|
|
Hero could not be killed. ';
elseif(isset($_GET['kc'])) echo 'Hero has been killed.
';
elseif(isset($_GET['rc'])) echo 'Hero has been revived.
';
elseif(isset($_GET['re'])) echo 'Cannot revive – another hero lives.
';
elseif(isset($_GET['ac'])) echo 'New hero added.
';
elseif(isset($_GET['cs'])) echo 'Hero information saved.
';
elseif(isset($_GET['ce'])) echo 'Edit failed.
';
?>