mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-09 12:51:01 +00:00
Add level 120 for hero
Add level 120 for hero
This commit is contained in:
@@ -195,7 +195,7 @@ function go_url(url){ location=url; return false; }
|
||||
<div class="body" style="font-size:12px;line-height:1.8;">
|
||||
<?php
|
||||
// punctele nefolosite, nu suma statisticilor calculate (era gresit)
|
||||
$eMaxLevel = isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 119;
|
||||
$eMaxLevel = isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 120;
|
||||
$eUsed = (int)$hero['attack'] + (int)$hero['defence'] + (int)$hero['attackbonus']
|
||||
+ (int)$hero['defencebonus'] + (int)$hero['regeneration'] + (int)($hero['resources'] ?? 0);
|
||||
$eTotal = 5 + ($hero['level'] * 5);
|
||||
@@ -227,7 +227,7 @@ function go_url(url){ location=url; return false; }
|
||||
<div class="body">
|
||||
<?php if($isMax):?>
|
||||
<div style="text-align:center;padding:8px;background:#fef3c7;border:1px solid #fde68a;border-radius:6px;color:#92400e;font-size:12px;margin-bottom:10px;">
|
||||
⚠ Hero is at the maximum level (<?php echo isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 119; ?>) — no more points can be added.
|
||||
⚠ Hero is at the maximum level (<?php echo isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 120; ?>) — no more points can be added.
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<table class="stat-table">
|
||||
|
||||
@@ -150,7 +150,7 @@ if ($hero !== false) {
|
||||
+ (int)$h['defencebonus'] + (int)$h['regeneration'] + (int)($h['resources'] ?? 0);
|
||||
|
||||
// totalul de puncte vine din tabelul de niveluri: 5 initiale + 5 per nivel
|
||||
$hMaxLevel = isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 119;
|
||||
$hMaxLevel = isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 120;
|
||||
$hMaxPoints = 5 + ($hMaxLevel * 5);
|
||||
$count_level_exp = max(0, $hMaxPoints - $used);
|
||||
if ($h['points'] > $count_level_exp) $h['points'] = $count_level_exp;
|
||||
|
||||
@@ -56,7 +56,7 @@ if (isset($_POST['id'], $_POST['hid'])) {
|
||||
$hunit = (int)($_POST['hunit'] ?? 0);
|
||||
// plafonul vine din tabelul de niveluri (ultimul index e santinela), ca sa
|
||||
// urmeze automat extinderea facuta pentru al 6-lea atribut
|
||||
$hMaxLevel = isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 119;
|
||||
$hMaxLevel = isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 120;
|
||||
$hlvl = max(0, min($hMaxLevel, (int)($_POST['hlvl'] ?? 0)));
|
||||
$exp = (int)($_POST['exp'] ?? 0);
|
||||
$hhealth = (float)($_POST['hhealth'] ?? 100);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$hero_levels = array(0 => 0, 100, 300, 600, 1000, 1500, 2100, 2800, 3600, 4500, 5500, 6600, 7800, 9100, 10500, 12000, 13600, 15300, 17100, 19000, 21000, 23100, 25300, 27600, 30000, 32500, 35100, 37800, 40600, 43500, 46500, 49600, 52800, 56100, 59500, 63000, 66600, 70300, 74100, 78000, 82000, 86100, 90300, 94600, 99000, 103500, 108100, 112800, 117600, 122500, 127500, 132600, 137800, 143100, 148500, 154000, 159600, 165300, 171100, 177000, 183000, 189100, 195300, 201600, 208000, 214500, 221100, 227800, 234600, 241500, 248500, 255600, 262800, 270100, 277500, 285000, 292600, 300300, 308100, 316000, 324000, 332100, 340300, 348600, 357000, 365500, 374100, 382800, 391600, 400500, 409500, 418600, 427800, 437100, 446500, 456000, 465600, 475300, 485100, 495000, 505000, 515100, 525300, 535600, 546000, 556500, 567100, 577800, 588600, 599500, 610500, 621600, 632800, 644100, 655500, 667000, 678600, 690300, 702100, 714000, 714000);
|
||||
$hero_levels = array(0 => 0, 100, 300, 600, 1000, 1500, 2100, 2800, 3600, 4500, 5500, 6600, 7800, 9100, 10500, 12000, 13600, 15300, 17100, 19000, 21000, 23100, 25300, 27600, 30000, 32500, 35100, 37800, 40600, 43500, 46500, 49600, 52800, 56100, 59500, 63000, 66600, 70300, 74100, 78000, 82000, 86100, 90300, 94600, 99000, 103500, 108100, 112800, 117600, 122500, 127500, 132600, 137800, 143100, 148500, 154000, 159600, 165300, 171100, 177000, 183000, 189100, 195300, 201600, 208000, 214500, 221100, 227800, 234600, 241500, 248500, 255600, 262800, 270100, 277500, 285000, 292600, 300300, 308100, 316000, 324000, 332100, 340300, 348600, 357000, 365500, 374100, 382800, 391600, 400500, 409500, 418600, 427800, 437100, 446500, 456000, 465600, 475300, 485100, 495000, 505000, 515100, 525300, 535600, 546000, 556500, 567100, 577800, 588600, 599500, 610500, 621600, 632800, 644100, 655500, 667000, 678600, 690300, 702100, 714000, 726000, 726000);
|
||||
|
||||
|
||||
//ROMAN UNITS
|
||||
|
||||
Reference in New Issue
Block a user