diff --git a/GameEngine/Data/hero_full.php b/GameEngine/Data/hero_full.php index 6dd1ac58..4347438a 100755 --- a/GameEngine/Data/hero_full.php +++ b/GameEngine/Data/hero_full.php @@ -14,7 +14,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); + 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, 495000); //ROMAN UNITS diff --git a/Templates/Build/1.tpl b/Templates/Build/1.tpl index 7dcd2a7b..356c29a9 100644 --- a/Templates/Build/1.tpl +++ b/Templates/Build/1.tpl @@ -1,10 +1,27 @@ resarray[$field] ?? 0); $buildingType = $village->resarray[$field . 't'] ?? 0; @@ -14,7 +31,7 @@ $currentProd = $bid1[$currentLevel]['prod'] * SPEED; $isMax = $building->isMax($buildingType, $id); $maxLevel = ($village->capital == 1) ? 20 : 10; -// calculează nivelul următor luând în calcul queue-urile +// calculates the next level taking into account queues $nextLevelRaw = $currentLevel + 1 + $loopsame + $doublebuild + $master; $nextLevel = min($nextLevelRaw, $maxLevel); $nextProd = $bid1[$nextLevel]['prod'] * SPEED; diff --git a/Templates/Build/10.tpl b/Templates/Build/10.tpl index c7e6188b..f1d4494d 100644 --- a/Templates/Build/10.tpl +++ b/Templates/Build/10.tpl @@ -1,6 +1,23 @@ resarray[$field] ?? 0); $hasBlacksmith = $building->getTypeLevel(12) > 0; diff --git a/Templates/Build/12_upgrades.tpl b/Templates/Build/12_upgrades.tpl index 335218fd..000d8bc9 100644 --- a/Templates/Build/12_upgrades.tpl +++ b/Templates/Build/12_upgrades.tpl @@ -1,6 +1,23 @@ getABTech($village->wid); $ABups = $technology->getABUpgrades('b'); @@ -26,7 +43,7 @@ $end = $session->tribe * 10 - 2; $unitName = $technology->getUnitName($i); $current = (int)$abdata['b'.$j]; - // câte upgrade-uri sunt deja în coadă pentru unitatea asta + //how many upgrades are already in the queue for this unit $ups = 0; foreach ($ABups as $up) { if (in_array('b'.$j, $up)) $ups++; @@ -64,7 +81,7 @@ $end = $session->tribe * 10 - 2; $village->awood || $next['clay'] > $village->aclay || $next['iron'] > $village->airon || $next['crop'] > $village->acrop) { if ($village->getProd('crop') > 0 || $village->acrop > $next['crop']) { $time = $technology->calculateAvaliable(12, $next); @@ -124,7 +141,7 @@ $end = $session->tribe * 10 - 2; tribe - 1) * 10 + $ABUnit; $unitName = $technology->getUnitName($unit); $date = $generator->procMtime($black['timestamp']); diff --git a/Templates/Build/13.tpl b/Templates/Build/13.tpl index 02d873d8..b0581f66 100644 --- a/Templates/Build/13.tpl +++ b/Templates/Build/13.tpl @@ -1,6 +1,23 @@ resarray[$field]) ? (int)$village->resarray[$field] : 0; diff --git a/Templates/Build/13_upgrades.tpl b/Templates/Build/13_upgrades.tpl index 10d8f995..b4b981de 100644 --- a/Templates/Build/13_upgrades.tpl +++ b/Templates/Build/13_upgrades.tpl @@ -1,6 +1,23 @@ getABTech($village->wid); $ABups = $technology->getABUpgrades('a'); @@ -26,7 +43,7 @@ $end = $session->tribe * 10 - 2; $unitName = $technology->getUnitName($i); $current = (int)$abdata['a'.$j]; - // câte upgrade-uri sunt deja în coadă pentru unitatea asta + // how many upgrades are already in the queue for this unit $ups = 0; foreach ($ABups as $up) { if (in_array('a'.$j, $up)) $ups++; diff --git a/Templates/Build/14.tpl b/Templates/Build/14.tpl index b41ce62b..e34745d0 100644 --- a/Templates/Build/14.tpl +++ b/Templates/Build/14.tpl @@ -1,6 +1,23 @@ unitarray = $database->getUnit($village->wid, false); diff --git a/Templates/Build/16_99.tpl b/Templates/Build/16_99.tpl index 0e317ce9..af45f15b 100644 --- a/Templates/Build/16_99.tpl +++ b/Templates/Build/16_99.tpl @@ -1,6 +1,23 @@ goldclub) { include 'Templates/Build/16.tpl'; diff --git a/Templates/Build/16_incomming.tpl b/Templates/Build/16_incomming.tpl index 2eac8816..52b356f4 100644 --- a/Templates/Build/16_incomming.tpl +++ b/Templates/Build/16_incomming.tpl @@ -1,6 +1,23 @@ goldclub); diff --git a/Templates/Build/16_troops.tpl b/Templates/Build/16_troops.tpl index ee811cf3..de6d9f94 100644 --- a/Templates/Build/16_troops.tpl +++ b/Templates/Build/16_troops.tpl @@ -1,6 +1,23 @@ tribe; $start = ($tribe - 1) * 10 + 1; diff --git a/Templates/Build/16_walking.tpl b/Templates/Build/16_walking.tpl index 506948c6..1082fed1 100644 --- a/Templates/Build/16_walking.tpl +++ b/Templates/Build/16_walking.tpl @@ -1,6 +1,23 @@ getMovement(3, $village->wid, 0); ?> diff --git a/Templates/Build/17.tpl b/Templates/Build/17.tpl index 7f844490..285d5c43 100644 --- a/Templates/Build/17.tpl +++ b/Templates/Build/17.tpl @@ -1,5 +1,24 @@ merchantAvail(); diff --git a/Templates/Build/17_1.tpl b/Templates/Build/17_1.tpl index c2b9fb4f..b744ba27 100644 --- a/Templates/Build/17_1.tpl +++ b/Templates/Build/17_1.tpl @@ -1,5 +1,24 @@ '.NOT_ENOUGH_RESOURCES.'

'; elseif (isset($_GET['e2'])) echo '

'.INVALID_OFFER.'

'; elseif (isset($_GET['e3'])) echo '

'.NOT_ENOUGH_MERCHANTS.'

'; diff --git a/Templates/Build/17_2.tpl b/Templates/Build/17_2.tpl index 42786bb9..192d7989 100644 --- a/Templates/Build/17_2.tpl +++ b/Templates/Build/17_2.tpl @@ -1,5 +1,24 @@ gold <= 2) { @@ -26,7 +45,7 @@ $totalRes = $awood + $aclay + $airon + $acrop; $maxstore = max(0, (int)$village->maxstore); $maxcrop = max(0, (int)$village->maxcrop); -// valori prefill din GET +// PREFILL VALUE FROM GET $r = []; for ($i = 1; $i <= 4; $i++) { $r[$i] = isset($_GET['r'.$i])? max(0, (int)$_GET['r'.$i]) : ''; diff --git a/Templates/Build/17_4.tpl b/Templates/Build/17_4.tpl index 4f3cfd60..82a76648 100644 --- a/Templates/Build/17_4.tpl +++ b/Templates/Build/17_4.tpl @@ -1,5 +1,24 @@ goldclub == 1 && count($database->getProfileVillages($session->uid)) > 1)) { diff --git a/Templates/Build/17_create.tpl b/Templates/Build/17_create.tpl index 40d487ab..41a6df26 100644 --- a/Templates/Build/17_create.tpl +++ b/Templates/Build/17_create.tpl @@ -1,5 +1,24 @@ villages?? []; diff --git a/Templates/Build/17_edit.tpl b/Templates/Build/17_edit.tpl index 01f26d58..bd329d72 100644 --- a/Templates/Build/17_edit.tpl +++ b/Templates/Build/17_edit.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/18_create.tpl b/Templates/Build/18_create.tpl index 0209eb73..dbd80440 100644 --- a/Templates/Build/18_create.tpl +++ b/Templates/Build/18_create.tpl @@ -1,5 +1,24 @@ access == BANNED; diff --git a/Templates/Build/19.tpl b/Templates/Build/19.tpl index 4e7b55e4..806fe9b8 100644 --- a/Templates/Build/19.tpl +++ b/Templates/Build/19.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/19_train.tpl b/Templates/Build/19_train.tpl index cecb6e2d..fc769ce3 100644 --- a/Templates/Build/19_train.tpl +++ b/Templates/Build/19_train.tpl @@ -1,12 +1,31 @@ tribe; $units = ($tribe !== 4) ? range(($tribe-1)*10+1, ($tribe-1)*10+4) : range(31, 40); foreach ($units as $i) { - // skip unități invalide + // SKIP INVALID UNITS if ($tribe !== 4 && ($i == 4 || $i == 23 || $i == 24)) continue; if (!($technology->getTech($i) || $i % 10 == 1)) continue; diff --git a/Templates/Build/2.tpl b/Templates/Build/2.tpl index 579425ab..1e575c21 100644 --- a/Templates/Build/2.tpl +++ b/Templates/Build/2.tpl @@ -1,10 +1,27 @@ resarray[$field] ?? 0); $buildingType = $village->resarray[$field . 't'] ?? 0; diff --git a/Templates/Build/20.tpl b/Templates/Build/20.tpl index b38d9f1d..3d3d6375 100644 --- a/Templates/Build/20.tpl +++ b/Templates/Build/20.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/20_train.tpl b/Templates/Build/20_train.tpl index c1992ec6..57ec6e81 100644 --- a/Templates/Build/20_train.tpl +++ b/Templates/Build/20_train.tpl @@ -1,5 +1,24 @@ tribe; diff --git a/Templates/Build/21.tpl b/Templates/Build/21.tpl index 3e7569fb..73bb0a3e 100644 --- a/Templates/Build/21.tpl +++ b/Templates/Build/21.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/22.tpl b/Templates/Build/22.tpl index 3404e6b1..5620beed 100644 --- a/Templates/Build/22.tpl +++ b/Templates/Build/22.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/22_1.tpl b/Templates/Build/22_1.tpl index 83346b6c..0f56484a 100644 --- a/Templates/Build/22_1.tpl +++ b/Templates/Build/22_1.tpl @@ -1,5 +1,24 @@ grabAcademyRes(); diff --git a/Templates/Build/22_2.tpl b/Templates/Build/22_2.tpl index b343413d..a31f3efe 100644 --- a/Templates/Build/22_2.tpl +++ b/Templates/Build/22_2.tpl @@ -1,5 +1,24 @@ grabAcademyRes(); diff --git a/Templates/Build/22_3.tpl b/Templates/Build/22_3.tpl index b94e95c6..8448f88e 100644 --- a/Templates/Build/22_3.tpl +++ b/Templates/Build/22_3.tpl @@ -1,5 +1,24 @@ grabAcademyRes(); diff --git a/Templates/Build/22_4.tpl b/Templates/Build/22_4.tpl index c2c31eaa..9078c3a1 100644 --- a/Templates/Build/22_4.tpl +++ b/Templates/Build/22_4.tpl @@ -1,5 +1,24 @@ grabAcademyRes(); diff --git a/Templates/Build/22_5.tpl b/Templates/Build/22_5.tpl index f8cd54cd..541fbf7c 100644 --- a/Templates/Build/22_5.tpl +++ b/Templates/Build/22_5.tpl @@ -1,5 +1,24 @@ grabAcademyRes(); diff --git a/Templates/Build/23.tpl b/Templates/Build/23.tpl index 3d218c4c..0d5634bd 100644 --- a/Templates/Build/23.tpl +++ b/Templates/Build/23.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; ?> diff --git a/Templates/Build/24_1.tpl b/Templates/Build/24_1.tpl index 81e15ac2..83aa3221 100644 --- a/Templates/Build/24_1.tpl +++ b/Templates/Build/24_1.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/24_2.tpl b/Templates/Build/24_2.tpl index 5bd78b9e..97c41c7b 100644 --- a/Templates/Build/24_2.tpl +++ b/Templates/Build/24_2.tpl @@ -1,5 +1,24 @@ getVillageField($village->wid, 'celebration'); diff --git a/Templates/Build/25.tpl b/Templates/Build/25.tpl index 94eb9210..4cedfbc0 100644 --- a/Templates/Build/25.tpl +++ b/Templates/Build/25.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/25_2.tpl b/Templates/Build/25_2.tpl index 9e311d41..cc2895b6 100644 --- a/Templates/Build/25_2.tpl +++ b/Templates/Build/25_2.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/25_3.tpl b/Templates/Build/25_3.tpl index 09ee3cff..4981e323 100644 --- a/Templates/Build/25_3.tpl +++ b/Templates/Build/25_3.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/25_4.tpl b/Templates/Build/25_4.tpl index dcf30cfc..21531824 100644 --- a/Templates/Build/25_4.tpl +++ b/Templates/Build/25_4.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/25_create.tpl b/Templates/Build/25_create.tpl index 1b742b5e..5379fd7a 100644 --- a/Templates/Build/25_create.tpl +++ b/Templates/Build/25_create.tpl @@ -1,5 +1,24 @@ diff --git a/Templates/Build/25_progress.tpl b/Templates/Build/25_progress.tpl index d5bc893e..13aded21 100644 --- a/Templates/Build/25_progress.tpl +++ b/Templates/Build/25_progress.tpl @@ -1,5 +1,24 @@ getTrainingList(4); diff --git a/Templates/Build/25_train.tpl b/Templates/Build/25_train.tpl index 41152b1a..fb6384c2 100644 --- a/Templates/Build/25_train.tpl +++ b/Templates/Build/25_train.tpl @@ -1,10 +1,27 @@ getAvailableExpansionTraining(); +$slots = $database->getAvailableExpansionTraining(); - if ($slots['settlers'] + $slots['chiefs']>0) { ?> +if ($slots['settlers'] + $slots['chiefs']>0) { ?>
diff --git a/Templates/Build/26.tpl b/Templates/Build/26.tpl index 5d0da182..ff6ef064 100644 --- a/Templates/Build/26.tpl +++ b/Templates/Build/26.tpl @@ -1,15 +1,34 @@ 5){ $_SESSION['time_p'] = ''; $_SESSION['error_p'] = ''; } -// --- LOGICA SCHIMBARE CAPITALA --- +// --- CHANGE CAPITAL LOGIC --- if($_POST && $_GET['action'] == 'change_capital' && !$village->capital){ $pass = $_POST['pass']; $query = mysqli_query($database->dblink, 'SELECT password FROM `'.TB_PREFIX.'users` WHERE `id` = '.(int)$session->uid); $data = mysqli_fetch_assoc($query); - // 1. Verifică parola + // 1. CHECK PASSWORD if(password_verify($pass, $data['password'])){ $query1 = mysqli_query($database->dblink, 'SELECT wref FROM `'.TB_PREFIX.'vdata` WHERE `owner` = '.(int)$session->uid.' AND `capital` = 1'); $data1 = mysqli_fetch_assoc($query1); @@ -17,25 +36,25 @@ if($_POST && $_GET['action'] == 'change_capital' && !$village->capital){ $newWid = (int)$village->wid; if($oldWid != $newWid){ - // ia datele ambelor sate + // TAKE BOTH VILLAGE DATA $query2 = mysqli_query($database->dblink, 'SELECT * FROM `'.TB_PREFIX.'fdata` WHERE `vref` = '.$oldWid); $data2 = mysqli_fetch_assoc($query2); $query3 = mysqli_query($database->dblink, 'SELECT * FROM `'.TB_PREFIX.'fdata` WHERE `vref` = '.$newWid); $data3 = mysqli_fetch_assoc($query3); - // 1. taie resursele vechii capitale la nivel 10 + // 1. REMOVE RESOURCE OLD CAPITAL TO LEVEL 10 for($i = 1; $i <= 18; ++$i){ if($data2['f'.$i] > 10){ mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'` = 10 WHERE `vref` = '.$oldWid); } } - // 2. șterge Zidarul din vechea capitală + // 2. DELETE STONEMANSON LODGE FROM OLD CAPITAL for($i = 19; $i <= 40; ++$i){ if($data2['f'.$i.'t'] == 34){ mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'t` = 0, `f'.$i.'` = 0 WHERE `vref` = '.$oldWid); } } - // 3. FIX: șterge clădirile specifice capitalei din NOUA capitală + // 3. DELETE CAPITAL-SPECIFIC BUILDINGS FROM THE NEW CAPITAL $capitalOnly = [29,30,38,39,42]; for($i = 19; $i <= 40; ++$i){ if(in_array((int)$data3['f'.$i.'t'], $capitalOnly)){ @@ -46,7 +65,7 @@ if($_POST && $_GET['action'] == 'change_capital' && !$village->capital){ $database->changeCapital($oldWid, 0); $database->changeCapital($newWid); - // 4. FIX BUG-UL TĂU: recount populație instant + // 4. RECOUNT POPULATION if(!isset($automation)){ include_once("GameEngine/Automation.php"); } diff --git a/Templates/Build/26_2.tpl b/Templates/Build/26_2.tpl index e013091c..bec84bc7 100644 --- a/Templates/Build/26_2.tpl +++ b/Templates/Build/26_2.tpl @@ -1,17 +1,36 @@ resarray['f'.$id]; $isNatar = (int)$database->getVillageField($village->wid, 'natar') === 1; -// ia datele o singură dată +// TAKE DATA ONCE $cpVillage = $isNatar ? 0 : (int)$database->getVillageField($village->wid, 'cp'); $cpTotal = (int)$database->getVSumField($session->uid, 'cp'); $villages = $database->getProfileVillages($session->uid); $totalVillages = count($villages); -// calcul pentru următorul sat - fără variable variables +// calculation for the next village - without variables $cpMode = CP; // 0 = normal, 1 = speed $cpArrayName = 'cp' . $cpMode; $cpArray = $GLOBALS[$cpArrayName] ?? []; diff --git a/Templates/Build/26_3.tpl b/Templates/Build/26_3.tpl index 88d80dc1..a31df8f7 100644 --- a/Templates/Build/26_3.tpl +++ b/Templates/Build/26_3.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/26_4.tpl b/Templates/Build/26_4.tpl index 7581b169..9dc231a4 100644 --- a/Templates/Build/26_4.tpl +++ b/Templates/Build/26_4.tpl @@ -1,16 +1,35 @@ resarray['f'.$id]; -// ia toate 3 sloturile o singură dată +// TAKE ALL SLOTS ONE TIME $slots = [ (int)$database->getVillageField($village->wid, 'exp1'), (int)$database->getVillageField($village->wid, 'exp2'), (int)$database->getVillageField($village->wid, 'exp3'), ]; -$slots = array_filter($slots); // elimină 0 +$slots = array_filter($slots); // REMOVE 0 ?>

@@ -41,7 +60,7 @@ $slots = array_filter($slots); // elimină 0 getCoor($wid); $villageData = $database->getVillage($wid); // conține name, owner, pop, created $ownerName = $database->getUserField($villageData['owner'], 'username', 0); diff --git a/Templates/Build/26_create.tpl b/Templates/Build/26_create.tpl index fb85476a..a86d5ccf 100644 --- a/Templates/Build/26_create.tpl +++ b/Templates/Build/26_create.tpl @@ -1,10 +1,29 @@ getUnitName($unitId); -$costs = $GLOBALS['u'.$unitId]; // $u20 din config +$costs = $GLOBALS['u'.$unitId]; $maxTrain = $technology->maxUnit($unitId); $available = (int)($village->unitarray['u'.$unitId]?? 0); $trainTime = $generator->getTimeFormat(round($costs['time'] / SPEED)); diff --git a/Templates/Build/26_menu.tpl b/Templates/Build/26_menu.tpl index b391769f..55fa9782 100644 --- a/Templates/Build/26_menu.tpl +++ b/Templates/Build/26_menu.tpl @@ -1,5 +1,24 @@ getTrainingList(4); // unit 4 = pentru chief? păstrez ID-ul tău +$trainList = $technology->getTrainingList(4); // UNIT 4 = FOR CHIEFTAIN if (!empty($trainList)): $trainCount = 0; $nextFinished = ''; @@ -20,7 +39,7 @@ if (!empty($trainList)): $trainCount++; $isFirst = ($trainCount === 1); - // timp rămas + // REMAINING TIME $remaining = max(0, (int)$train['timestamp'] - time()); $duration = $isFirst? $remaining : (int)$train['eachtime'] * (int)$train['amt']; diff --git a/Templates/Build/26_train.tpl b/Templates/Build/26_train.tpl index c0c20d4f..822a1eaf 100644 --- a/Templates/Build/26_train.tpl +++ b/Templates/Build/26_train.tpl @@ -1,5 +1,24 @@ getAvailableExpansionTraining(); @@ -35,7 +54,7 @@ if ($totalSlots > 0): ?> $maxUnit = min($maxByTech, $slotLimit); $available = (int)($village->unitarray['u'.$i] ?? 0); - // timp cu bonus palat și artefacte + // 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)); diff --git a/Templates/Build/27.tpl b/Templates/Build/27.tpl index 05d9caf5..9a40c633 100644 --- a/Templates/Build/27.tpl +++ b/Templates/Build/27.tpl @@ -1,3 +1,26 @@ + +
diff --git a/Templates/Build/27_1.tpl b/Templates/Build/27_1.tpl index a46c9d0e..a8df4a69 100644 --- a/Templates/Build/27_1.tpl +++ b/Templates/Build/27_1.tpl @@ -1,4 +1,25 @@ getOwnArtefactsInfo($session->uid ?? 0); @@ -67,7 +88,7 @@ if(count($artifacts) == 0) { foreach($artifacts as $artifact){ $coordinates = $database->getCoor($artifact['vref']); $distance = $database->getDistance($village->coor['x'], $village->coor['y'], $coordinates['x'], $coordinates['y']); - // cheia unică previne suprascrierea când 2 artefacte sunt la aceeași distanță + // unique key prevents overwriting when 2 artifacts are at the same distance $rows[$distance.'_'.$artifact['id']] = ['dist' => $distance, 'data' => $artifact]; } diff --git a/Templates/Build/27_2.tpl b/Templates/Build/27_2.tpl index 0bcfdb92..543e069a 100644 --- a/Templates/Build/27_2.tpl +++ b/Templates/Build/27_2.tpl @@ -1,3 +1,26 @@ + +
diff --git a/Templates/Build/27_3.tpl b/Templates/Build/27_3.tpl index 1e698510..eaaeae12 100644 --- a/Templates/Build/27_3.tpl +++ b/Templates/Build/27_3.tpl @@ -1,3 +1,26 @@ + +
diff --git a/Templates/Build/27_menu.tpl b/Templates/Build/27_menu.tpl index c7187486..c98212b2 100644 --- a/Templates/Build/27_menu.tpl +++ b/Templates/Build/27_menu.tpl @@ -1,3 +1,26 @@ + +
> diff --git a/Templates/Build/27_show.tpl b/Templates/Build/27_show.tpl index e24168ef..dc9062c0 100644 --- a/Templates/Build/27_show.tpl +++ b/Templates/Build/27_show.tpl @@ -1,4 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/29_train.tpl b/Templates/Build/29_train.tpl index becba47c..de1a930f 100644 --- a/Templates/Build/29_train.tpl +++ b/Templates/Build/29_train.tpl @@ -1,5 +1,24 @@ tribe - 1) * 10 + 1; diff --git a/Templates/Build/3.tpl b/Templates/Build/3.tpl index 5c78523b..f496cf6b 100644 --- a/Templates/Build/3.tpl +++ b/Templates/Build/3.tpl @@ -1,10 +1,27 @@ resarray[$field] ?? 0); $buildingType = $village->resarray[$field . 't'] ?? 0; diff --git a/Templates/Build/30.tpl b/Templates/Build/30.tpl index 37219fe6..55d36edd 100644 --- a/Templates/Build/30.tpl +++ b/Templates/Build/30.tpl @@ -1,5 +1,24 @@ resarray['f'.$id]; diff --git a/Templates/Build/30_train.tpl b/Templates/Build/30_train.tpl index e50c0525..cdaadfd4 100644 --- a/Templates/Build/30_train.tpl +++ b/Templates/Build/30_train.tpl @@ -1,5 +1,24 @@ tribe - 1) * 10 + 3; diff --git a/Templates/Build/31.tpl b/Templates/Build/31.tpl index 2807c942..f66d045c 100644 --- a/Templates/Build/31.tpl +++ b/Templates/Build/31.tpl @@ -1,5 +1,24 @@ diff --git a/Templates/Build/35.tpl b/Templates/Build/35.tpl index bfeda7dd..dee41e1c 100644 --- a/Templates/Build/35.tpl +++ b/Templates/Build/35.tpl @@ -1,7 +1,23 @@ | -| Dzoki < dzoki.travian@gmail.com > | -| Copyright: TravianX Project All rights reserved | -\*-------------------------------------------------------*/ +################################################################################# +## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## +## --------------------------------------------------------------------------- ## +## Filename : HEROSMANSION ## +## Type : BUILDING TEMPLATE ## +## --------------------------------------------------------------------------- ## +## Refactored by : Shadow ## +## Redesign by : Shadow ## +## --------------------------------------------------------------------------- ## +## Contact : cata7007@gmail.com ## +## Project : TravianZ ## +## Test Server : https://travianz.org ## +## GitHub : https://github.com/Shadowss/TravianZ ## +## --------------------------------------------------------------------------- ## +## License : TravianZ Project ## +## Copyright : TravianZ (c) 2010-2026. All rights reserved. ## +## --------------------------------------------------------------------------- ## +################################################################################# $hero_info = $units->Hero($session->uid); $heroes = $units->Hero($session->uid, 1); @@ -118,4 +129,4 @@ } include ("upgrade.tpl"); ?> -
+
\ No newline at end of file diff --git a/Templates/Build/37_hero.tpl b/Templates/Build/37_hero.tpl index d5e8721d..b484948d 100644 --- a/Templates/Build/37_hero.tpl +++ b/Templates/Build/37_hero.tpl @@ -1,13 +1,23 @@ | -| Dzoki < dzoki.travian@gmail.com > | -| Reworked by: Esfomeado < vps1992@live.com.pt > | -| Copyright: TravianX Project All rights reserved | -\*-------------------------------------------------------*/ +################################################################################# +## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## +## --------------------------------------------------------------------------- ## +## Filename : HEROSMANSION VIEW PAGE ## +## Type : BUILDING TEMPLATE ## +## --------------------------------------------------------------------------- ## +## Refactored by : Shadow ## +## Redesign by : Shadow ## +## --------------------------------------------------------------------------- ## +## Contact : cata7007@gmail.com ## +## Project : TravianZ ## +## Test Server : https://travianz.org ## +## GitHub : https://github.com/Shadowss/TravianZ ## +## --------------------------------------------------------------------------- ## +## License : TravianZ Project ## +## Copyright : TravianZ (c) 2010-2026. All rights reserved. ## +## --------------------------------------------------------------------------- ## +################################################################################# include_once("GameEngine/Data/hero_full.php"); global $database; @@ -95,21 +105,33 @@ if (isset($_POST['name']) && !empty($_POST['name'])) { - - - : - % - <?php echo ($hero_info['experience'] - $hero_levels[$hero_info['level']]) / ($hero_levels[$hero_info['level']+1] - $hero_levels[$hero_info['level']])*100 ?>% + + $expCurrent && $curLevel < 100){ + $percent = ($curExp - $expCurrent) / ($expNext - $expCurrent) * 100; + $percent = max(0, min(100, $percent)); + ?> + : + % + <?php echo (int)$percent; ?>% - + - : - 100% + : + 100% 100% - + - + + ?> \ No newline at end of file diff --git a/Templates/Build/37_land.tpl b/Templates/Build/37_land.tpl index de96d69d..b8afacac 100644 --- a/Templates/Build/37_land.tpl +++ b/Templates/Build/37_land.tpl @@ -1,6 +1,23 @@ -getOasis($village->wid); if(isset($_GET['gid']) && $_GET['gid'] == 37 && isset($_GET['del']) && $database->getOasisField($_GET['del'], 'owner') == $session->uid){ diff --git a/Templates/Build/37_revive.tpl b/Templates/Build/37_revive.tpl index a346c53f..8414f5a7 100644 --- a/Templates/Build/37_revive.tpl +++ b/Templates/Build/37_revive.tpl @@ -1,3 +1,27 @@ + + + @@ -6,13 +30,6 @@ | -| Dzoki < dzoki.travian@gmail.com > | -| Copyright: TravianX Project All rights reserved | -\*-------------------------------------------------------*/ // check if there is a hero in revive already $reviving = $training = false; diff --git a/Templates/Build/37_train.tpl b/Templates/Build/37_train.tpl index e582ae30..5730c134 100644 --- a/Templates/Build/37_train.tpl +++ b/Templates/Build/37_train.tpl @@ -1,18 +1,22 @@ echo $output; } ?> -
+ \ No newline at end of file diff --git a/Templates/Build/38.tpl b/Templates/Build/38.tpl index 601c45a8..7e21453e 100644 --- a/Templates/Build/38.tpl +++ b/Templates/Build/38.tpl @@ -1,5 +1,24 @@ resarray[$field] ?? 0); $buildingType = $village->resarray[$field . 't'] ?? 0; diff --git a/Templates/Build/41.tpl b/Templates/Build/41.tpl index 02af1ecc..7d611467 100644 --- a/Templates/Build/41.tpl +++ b/Templates/Build/41.tpl @@ -1,5 +1,24 @@ resarray[$field . 't'] ?? 0; $currentBonus = $currentLevel > 0 ? $bid5[$currentLevel]['attri'] : 0; $isMax = $building->isMax($buildingType, $id); -$maxLevel = 5; // sawmill e max 5 +$maxLevel = 5; // sawmill is max level 5 $nextLevelRaw = $currentLevel + 1 + $loopsame + $doublebuild + $master; $nextLevel = min($nextLevelRaw, $maxLevel); diff --git a/Templates/Build/6.tpl b/Templates/Build/6.tpl index c1414c93..e1051809 100644 --- a/Templates/Build/6.tpl +++ b/Templates/Build/6.tpl @@ -1,6 +1,23 @@ getArtifactsSumByKind($session->uid, $village->wid, 6); $GreatGranaryWarehouseBuildable = $artifactsSum['small'] > 0 || $artifactsSum['great'] > 0; diff --git a/Templates/Build/index.php b/Templates/Build/index.php index 9fcb4aed..f764a082 100644 --- a/Templates/Build/index.php +++ b/Templates/Build/index.php @@ -1,11 +1,22 @@ isCurrent($id) || $building->isLoop($id)) ? 1 : 0; diff --git a/Templates/Build/upgrade.tpl b/Templates/Build/upgrade.tpl index 706ad185..57eab871 100644 --- a/Templates/Build/upgrade.tpl +++ b/Templates/Build/upgrade.tpl @@ -1,5 +1,24 @@ resarray['f'.$id.'t']; diff --git a/Templates/Build/ww.tpl b/Templates/Build/ww.tpl index 3a407a0f..bccfd51b 100644 --- a/Templates/Build/ww.tpl +++ b/Templates/Build/ww.tpl @@ -1,5 +1,24 @@ isCurrent($id) || $building->isLoop($id)) ? 1 : 0; diff --git a/Templates/Build/wwupgrade.tpl b/Templates/Build/wwupgrade.tpl index 5b1b4734..acba4a62 100644 --- a/Templates/Build/wwupgrade.tpl +++ b/Templates/Build/wwupgrade.tpl @@ -1,5 +1,24 @@ resarray['f'.$id.'t'];