Функция повышения статов и модификаторов. Отладка 6.

This commit is contained in:
lopar 2018-12-11 23:03:48 +02:00
parent 7c0796bc7a
commit 9e7e70db41

685
main.php
View File

@ -1850,372 +1850,359 @@ if (input::get('edit')) {
<img src=i/up.gif onclick="location.href='?edit=1&ups=mudra'">
<?php endif; ?>
<br>
<br>
<small style="color: darkgreen;">Возможных увеличений: <?= $user['stats'] ?></small>
<br>
<?
$mf = countmf();
if ($_SESSION['modif'] == 1) {
$item_mf = mysql_fetch_array(mysql_query('SELECT `id` FROM `inventory` WHERE `owner` = "' . $user['id'] . '" AND `dressed` = "1" AND `add_proc_mf` > 0'));
$item_damage = mysql_fetch_array(mysql_query('SELECT `id` FROM `inventory` WHERE `owner` = "' . $user['id'] . '" AND `dressed` = "1" AND `add_proc_uron` > 0'));
$item_bron = mysql_fetch_array(mysql_query('SELECT `id` FROM `inventory` WHERE `owner` = "' . $user['id'] . '" AND `dressed` = "1" AND `add_proc_bron` > 0'));
$item_mf = mysql_fetch_array(mysql_query('SELECT `id` FROM `inventory` WHERE `owner` = "' . $user['id'] . '" AND `dressed` = "1" AND `add_proc_mf` > 0'));
$item_damage = mysql_fetch_array(mysql_query('SELECT `id` FROM `inventory` WHERE `owner` = "' . $user['id'] . '" AND `dressed` = "1" AND `add_proc_uron` > 0'));
$item_bron = mysql_fetch_array(mysql_query('SELECT `id` FROM `inventory` WHERE `owner` = "' . $user['id'] . '" AND `dressed` = "1" AND `add_proc_bron` > 0'));
if (isset($item_mf['id'])) {
$max_mf = max_mf();
$add_mf = sum_mf($user['id']);
if ($max_mf == 'fkrit') {
$var_mf = round(($mf['fkrit'] / 100) * $add_mf);
$mf['fkrit'] += $var_mf;
} elseif ($max_mf == 'fakrit') {
$var_mf = round(($mf['fakrit'] / 100) * $add_mf);
$mf['fakrit'] += $var_mf;
} elseif ($max_mf == 'fuvorot') {
$var_mf = round(($mf['fuvorot'] / 100) * $add_mf);
$mf['fuvorot'] += $var_mf;
} elseif ($max_mf == 'fauvorot') {
$var_mf = round(($mf['fauvorot'] / 100) * $add_mf);
$mf['fauvorot'] += $var_mf;
}
}
if (isset($item_damage['id'])) {
$add_dmg = sum_dmg($user['id']);
$min_dmg = round(($mf['minu'] / 100) * $add_dmg);
$max_dmg = round(($mf['maxu'] / 100) * $add_dmg);
if (isset($item_mf['id'])) {
$max_mf = max_mf();
$add_mf = sum_mf($user['id']);
if ($max_mf == 'fkrit') {
$var_mf = round(($mf['fkrit'] / 100) * $add_mf);
$mf['fkrit'] += $var_mf;
} elseif ($max_mf == 'fakrit') {
$var_mf = round(($mf['fakrit'] / 100) * $add_mf);
$mf['fakrit'] += $var_mf;
} elseif ($max_mf == 'fuvorot') {
$var_mf = round(($mf['fuvorot'] / 100) * $add_mf);
$mf['fuvorot'] += $var_mf;
} elseif ($max_mf == 'fauvorot') {
$var_mf = round(($mf['fauvorot'] / 100) * $add_mf);
$mf['fauvorot'] += $var_mf;
}
}
if (isset($item_damage['id'])) {
$add_dmg = sum_dmg($user['id']);
$min_dmg = round(($mf['minu'] / 100) * $add_dmg);
$max_dmg = round(($mf['maxu'] / 100) * $add_dmg);
}
if (isset($item_bron['id'])) {
$add_bron = sum_bron($user['id']);
$var_brons = bron_ads($mf['bron1'], $mf['bron2'], $mf['bron3'], $mf['bron4'], $add_bron);
} else {
$var_brons = array('a1' => 0, 'a2' => 0, 'a3' => 0, 'a4' => 0);
}
?>
<SPAN title='Усредненный по всем типам повреждений для вашего урона, без учета брони и защиты противника.'>Урон: <b><?= $mf['minu'] + $min_dmg ?>
- <?= $mf['maxu'] + $max_dmg ?></b> <? if (isset($item_damage['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_dmg . '%)</span>';
} ?></span><br>
<SPAN title='Мф. крит. удара позволяет нанести критический удар, наносящий дополнительные повреждения даже сквозь блок.'>Мф. крит. удара: <?= $mf['fkrit'] ?> <? if (isset($item_mf['id']) && $max_mf == 'fkrit') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>';
} ?></span><br>
<SPAN title='Мф. против крит. удара снижает вероятность получения крит. удара'>Мф. против крит. удара: <?= $mf['fakrit'] ?> <? if (isset($item_mf['id']) && $max_mf == 'fakrit') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>';
} ?></span><br>
<SPAN title='Мф. увертывания позволяет вам уклониться от атаки противника, полностью игнорируя ее.'>Мф. увертывания: <?= $mf['fuvorot'] ?> <? if (isset($item_mf['id']) && $max_mf == 'fuvorot') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>';
} ?></span><br>
<SPAN title='Мф. против увертывания снижает шансы противника уклониться от вашей атаки'>Мф. против увертывания: <?= $mf['fauvorot'] ?> <? if (isset($item_mf['id']) && $max_mf == 'fauvorot') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>';
} ?></span><br>
</span>
<? } ?>
<script>DrawBar('Мастерство', 'oryj', <?if ($_SESSION['oryj'] == 1) {
echo "1";
} else {
echo "6";
}?>, '', '');</script>
<?
if ($_SESSION['oryj'] == 1) {
?>
<div class="container" bit=1>
<b>Владение оружием:</b><br>
ножами и
кастетами: <?= $user['noj'] ?><?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Ножами', '', 1, '', '', '', '?ups=21&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
<BR>
мечами: <?= $user['mec'] ?><?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Мечами', '', 1, '', '', '', '?ups=22&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
<BR>
дубинами,
булавами: <?= $user['dubina'] ?><?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Дубинами', '', 1, '', '', '', '?ups=23&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
<BR>
топорами и
секирами: <?= $user['topor'] ?><?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Топорами', '', 1, '', '', '', '?ups=24&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
<BR>
<?
if ($user['level'] > 3) { ?>
<b>Владение магией:</b><br>
<!-- Стихия огня: <?= $user['mfire'] ?><?= ($user['master']) ? "<a href='?up=25&s4i=" . ($user['sid']) . "&edit=1'> <img src=i/up.gif></a>" : "" ?><BR>
Стихия воды: <?= $user['mwater'] ?><?= ($user['master']) ? "<a href='?up=26&s4i=" . ($user['sid']) . "&edit=1'> <img src=i/up.gif></a>" : "" ?><BR>
Стихия воздуха: <?= $user['mair'] ?><?= ($user['master']) ? "<a href='?up=27&s4i=" . ($user['sid']) . "&edit=1'> <img src=i/up.gif></a>" : "" ?><BR>
Стихия земли: <?= $user['mearth'] ?><?= ($user['master']) ? "<a href='?up=28&s4i=" . ($user['sid']) . "&edit=1'> <img src=i/up.gif></a>" : "" ?><BR>-->
Серая магия: <?= $user['mgray'] ?><?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Серой Магией', '', 1, '', '', '', '?ups=210&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
<BR>
Магия Тьмы: <?= $user['mdark'] ?><?= ($user['master']) ? " <img src=i/up.gif onclick=\"stats('Увеличить Мастерство Владения Магией Тьмы', '', 1, '', '', '', '?ups=211&edit=1&s4i=" . ($user['sid']) . "');\">" : "" ?>
<BR> <?
} ?>
<FONT COLOR="#333399">Возможных увеличений: <?= $user['master'] ?></font>
</div>
<?
if (isset($item_bron['id'])) {
$add_bron = sum_bron($user['id']);
$var_brons = bron_ads($mf['bron1'], $mf['bron2'], $mf['bron3'], $mf['bron4'], $add_bron);
} else {
$var_brons = array('a1' => 0, 'a2' => 0, 'a3' => 0, 'a4' => 0);
}
?>
<script>DrawBar('Броня', 'bron', <?if ($_SESSION['bron'] == 1) {
echo "1";
} else {
echo "6";
}?>, '', '');</script>
<SPAN title='Усредненный по всем типам повреждений для вашего урона, без учета брони и защиты противника.'>Урон: <b><?= $mf['minu'] + $min_dmg ?>
- <?= $mf['maxu'] + $max_dmg ?></b> <? if (isset($item_damage['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_dmg . '%)</span>';
} ?></span><br>
<SPAN title='Мф. крит. удара позволяет нанести критический удар, наносящий дополнительные повреждения даже сквозь блок.'>Мф. крит. удара: <?= $mf['fkrit'] ?> <? if (isset($item_mf['id']) && $max_mf == 'fkrit') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>';
} ?></span><br>
<SPAN title='Мф. против крит. удара снижает вероятность получения крит. удара'>Мф. против крит. удара: <?= $mf['fakrit'] ?> <? if (isset($item_mf['id']) && $max_mf == 'fakrit') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>';
} ?></span><br>
<SPAN title='Мф. увертывания позволяет вам уклониться от атаки противника, полностью игнорируя ее.'>Мф. увертывания: <?= $mf['fuvorot'] ?> <? if (isset($item_mf['id']) && $max_mf == 'fuvorot') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>';
} ?></span><br>
<SPAN title='Мф. против увертывания снижает шансы противника уклониться от вашей атаки'>Мф. против увертывания: <?= $mf['fauvorot'] ?> <? if (isset($item_mf['id']) && $max_mf == 'fauvorot') {
echo '<span style=\'color: Green;\'>(' . $add_mf . '%)</span>';
} ?></span><br>
<div class="container" bit=1>
<b>Владение оружием:</b>
<br>Кинжалами: <?= $user['noj'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=noj'">
<?php endif; ?>
<br>Мечами: <?= $user['mec'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=mec'">
<?php endif; ?>
<br>Дубинами: <?= $user['dubina'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=dubina'">
<?php endif; ?>
<br>Топорами: <?= $user['topor'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=topor'">
<?php endif; ?>
<br>
<b>Владение магией:</b>
<br>Магия огня: <?= $user['mfire'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=mfire'">
<?php endif; ?>
<br>Магия воды: <?= $user['mwater'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=mwater'">
<?php endif; ?>
<br>Магия воздуха: <?= $user['mair'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=mair'">
<?php endif; ?>
<br>Магия земли: <?= $user['mearth'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=mearth'">
<?php endif; ?>
<br>Магия света: <?= $user['mlight'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=mlight'">
<?php endif; ?>
<br>Магия серости: <?= $user['mgray'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=mgray'">
<?php endif; ?>
<br>Магия тьмы: <?= $user['mdark'] ?>
<?php if (!empty($user['stats'])): ?>
<img src=i/up.gif onclick="location.href='?edit=1&upm=mdark'">
<?php endif; ?>
<br>
<small style="color: darkgreen;">Возможных увеличений: <?= $user['master'] ?></small>
<br>
</div>
Броня головы: <?= $mf['bron1'] + $var_brons['a1'] ?><? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>';
} ?><BR>
Броня корпуса: <?= $mf['bron2'] + $var_brons['a2'] ?><? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>';
} ?><BR>
Броня пояса: <?= $mf['bron3'] + $var_brons['a3'] ?><? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>';
} ?><BR>
Броня ног: <?= $mf['bron4'] + $var_brons['a4'] ?><? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>';
} ?><BR>
<? if ($_SESSION['bron'] == 1) { ?>
Броня головы: <?= $mf['bron1'] + $var_brons['a1'] ?><? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>';
} ?><BR>
Броня корпуса: <?= $mf['bron2'] + $var_brons['a2'] ?><? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>';
} ?><BR>
Броня пояса: <?= $mf['bron3'] + $var_brons['a3'] ?><? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>';
} ?><BR>
Броня ног: <?= $mf['bron4'] + $var_brons['a4'] ?><? if (isset($item_bron['id'])) {
echo '<span style=\'color: Green;\'>(' . $add_bron . '%)</span>';
} ?><BR>
<? } ?>
<?
if (($user['sila'] >= 25 || $user['lovk'] >= 25 || $user['inta'] >= 25 || $user['vinos'] >= 25 || $user['intel'] >= 25) && $user['level'] == 25) {
?>
<script>DrawBar('Бонусы', 'bonus', <?if ($_SESSION['bonus'] == 1) {
echo "1";
} else {
echo "6";
}?>, '', '');</script>
<?
if ($_SESSION['bonus'] == 1) {
if ($user['sila'] >= 25) {
$sila['fauvorot'] = 10;
$sila['fakrit'] = 10;
}
if ($user['sila'] >= 50) {
$sila['fauvorot'] = 20;
$sila['fakrit'] = 25;
}
if ($user['sila'] >= 75) {
$sila['fauvorot'] = 30;
$sila['fakrit'] = 40;
}
if ($user['sila'] >= 100) {
$sila['fauvorot'] = 40;
$sila['fakrit'] = 50;
$sila['uminu'] = 2;
$sila['umaxu'] = 2;
}
if ($user['sila'] >= 125) {
$sila['fauvorot'] = 60;
$sila['fakrit'] = 75;
$sila['uminu'] = 5;
$sila['umaxu'] = 5;
}
if ($user['sila'] >= 150) {
$sila['fauvorot'] = 90;
$sila['fakrit'] = 110;
$sila['uminu'] = 8;
$sila['umaxu'] = 8;
}
if ($user['sila'] >= 175) {
$sila['fauvorot'] = 120;
$sila['fakrit'] = 150;
$sila['uminu'] = 12;
$sila['umaxu'] = 12;
}
if ($user['sila'] >= 200) {
$sila['fauvorot'] = 150;
$sila['fakrit'] = 200;
$sila['uminu'] = 15;
$sila['umaxu'] = 15;
}
if ($user['lovk'] >= 25) {
$lovk['fuvorot'] = 10;
$lovk['fauvorot'] = 10;
$lovk['fakrit'] = 20;
}
if ($user['lovk'] >= 50) {
$lovk['fuvorot'] = 20;
$lovk['fauvorot'] = 25;
$lovk['fakrit'] = 40;
}
if ($user['lovk'] >= 75) {
$lovk['fuvorot'] = 30;
$lovk['fauvorot'] = 30;
$lovk['fakrit'] = 60;
}
if ($user['lovk'] >= 100) {
$lovk['fuvorot'] = 40;
$lovk['fauvorot'] = 40;
$lovk['fakrit'] = 75;
$lovk['uminu'] = 5;
$lovk['umaxu'] = 5;
}
if ($user['lovk'] >= 125) {
$lovk['fuvorot'] = 40;
$lovk['fauvorot'] = 70;
$lovk['fakrit'] = 90;
$lovk['uminu'] = 6;
$lovk['umaxu'] = 6;
}
if ($user['lovk'] >= 150) {
$lovk['fuvorot'] = 40;
$lovk['fauvorot'] = 150;
$lovk['fakrit'] = 120;
$lovk['uminu'] = 8;
$lovk['umaxu'] = 8;
}
if ($user['lovk'] >= 175) {
$lovk['fuvorot'] = 40;
$lovk['fauvorot'] = 200;
$lovk['fakrit'] = 140;
$lovk['uminu'] = 10;
$lovk['umaxu'] = 10;
}
if ($user['lovk'] >= 200) {
$lovk['fuvorot'] = 40;
$lovk['fauvorot'] = 250;
$lovk['fakrit'] = 160;
$lovk['uminu'] = 15;
$lovk['umaxu'] = 15;
}
if ($user['inta'] >= 25) {
$inta['fkrit'] = 10;
$inta['fauvorot'] = 10;
$inta['fakrit'] = 15;
}
if ($user['inta'] >= 50) {
$inta['fkrit'] = 25;
$inta['fauvorot'] = 25;
$inta['fakrit'] = 25;
}
if ($user['inta'] >= 75) {
$inta['fkrit'] = 60;
$inta['fauvorot'] = 30;
$inta['fakrit'] = 30;
}
if ($user['inta'] >= 100) {
$inta['fkrit'] = 40;
$inta['fauvorot'] = 40;
$inta['fakrit'] = 75;
}
if ($user['inta'] >= 125) {
$inta['fkrit'] = 40;
$inta['fauvorot'] = 50;
$inta['fakrit'] = 100;
$inta['uminu'] = 1;
$inta['umaxu'] = 1;
}
if ($user['inta'] >= 150) {
$inta['fkrit'] = 60;
$inta['fauvorot'] = 40;
$inta['fakrit'] = 130;
$inta['uminu'] = 5;
$inta['umaxu'] = 5;
}
if ($user['inta'] >= 175) {
$inta['fkrit'] = 40;
$inta['fauvorot'] = 80;
$inta['fakrit'] = 170;
$inta['uminu'] = 10;
$inta['umaxu'] = 10;
}
if ($user['inta'] >= 200) {
$inta['fkrit'] = 40;
$inta['fauvorot'] = 120;
$inta['fakrit'] = 200;
$inta['uminu'] = 15;
$inta['umaxu'] = 15;
}
if ($user['vinos'] >= 25) {
$vinos['fkrit'] = 10;
$vinos['fauvorot'] = 10;
$vinos['fakrit'] = 15;
}
if ($user['vinos'] >= 50) {
$vinos['fkrit'] = 25;
$vinos['fauvorot'] = 25;
$vinos['fakrit'] = 25;
}
if ($user['vinos'] >= 75) {
$vinos['fkrit'] = 60;
$vinos['fauvorot'] = 30;
$vinos['fakrit'] = 30;
}
if ($user['vinos'] >= 100) {
$vinos['fkrit'] = 40;
$vinos['fauvorot'] = 40;
$vinos['fakrit'] = 75;
}
if ($user['vinos'] >= 125) {
$vinos['fkrit'] = 40;
$vinos['fauvorot'] = 50;
$vinos['fakrit'] = 100;
$vinos['uminu'] = 1;
$vinos['umaxu'] = 1;
}
if ($user['vinos'] >= 150) {
$vinos['fkrit'] = 60;
$vinos['fauvorot'] = 40;
$vinos['fakrit'] = 130;
$vinos['uminu'] = 5;
$vinos['umaxu'] = 5;
}
if ($user['vinos'] >= 175) {
$vinos['fkrit'] = 40;
$vinos['fauvorot'] = 80;
$vinos['fakrit'] = 170;
$vinos['uminu'] = 10;
$vinos['umaxu'] = 10;
}
if ($user['vinos'] >= 200) {
$vinos['fkrit'] = 40;
$vinos['fauvorot'] = 120;
$vinos['fakrit'] = 200;
$vinos['uminu'] = 15;
$vinos['umaxu'] = 15;
}
if ($user['vinos'] >= $user['sila'] && $user['vinos'] >= $user['lovk'] && $user['vinos'] >= $user['inta']) {
$i_uminu = $vinos['uminu'];
$i_fkrit = $vinos['fkrit'];
$i_fauvorot = $vinos['fauvorot'];
$i_fakrit = $vinos['fakrit'];
}
if ($user['inta'] >= $user['sila'] && $user['inta'] >= $user['lovk'] && $user['inta'] >= $user['vinos']) {
$i_uminu = $inta['uminu'];
$i_fkrit = $inta['fkrit'];
$i_fauvorot = $inta['fauvorot'];
$i_fakrit = $inta['fakrit'];
}
if ($user['lovk'] >= $user['sila'] && $user['lovk'] >= $user['inta'] && $user['lovk'] >= $user['vinos']) {
$i_uminu = $lovk['uminu'];
$i_fkrit = $lovk['fkrit'];
$i_fauvorot = $lovk['fauvorot'];
$i_fakrit = $lovk['fakrit'];
}
if ($user['sila'] >= $user['lovk'] && $user['sila'] >= $user['inta'] && $user['sila'] >= $user['vinos']) {
$i_uminu = $sila['uminu'];
$i_fkrit = $sila['fkrit'];
$i_fauvorot = $sila['fauvorot'];
$i_fakrit = $sila['fakrit'];
}
if ($i_fkrit > 0) {
echo "Мф. крит: +" . $i_fkrit . "<br />";
}
if ($i_fakrit > 0) {
echo "Мф. анти крит: +" . $i_fakrit . "<br />";
}
if ($i_fauvorot > 0) {
echo "Мф. анти уворот: +" . $i_fauvorot . "<br />";
}
if ($i_uminu > 0) {
echo "Урон: +" . $i_uminu;
}
if ($user['sila'] >= 25) {
$sila['fauvorot'] = 10;
$sila['fakrit'] = 10;
}
if ($user['sila'] >= 50) {
$sila['fauvorot'] = 20;
$sila['fakrit'] = 25;
}
if ($user['sila'] >= 75) {
$sila['fauvorot'] = 30;
$sila['fakrit'] = 40;
}
if ($user['sila'] >= 100) {
$sila['fauvorot'] = 40;
$sila['fakrit'] = 50;
$sila['uminu'] = 2;
$sila['umaxu'] = 2;
}
if ($user['sila'] >= 125) {
$sila['fauvorot'] = 60;
$sila['fakrit'] = 75;
$sila['uminu'] = 5;
$sila['umaxu'] = 5;
}
if ($user['sila'] >= 150) {
$sila['fauvorot'] = 90;
$sila['fakrit'] = 110;
$sila['uminu'] = 8;
$sila['umaxu'] = 8;
}
if ($user['sila'] >= 175) {
$sila['fauvorot'] = 120;
$sila['fakrit'] = 150;
$sila['uminu'] = 12;
$sila['umaxu'] = 12;
}
if ($user['sila'] >= 200) {
$sila['fauvorot'] = 150;
$sila['fakrit'] = 200;
$sila['uminu'] = 15;
$sila['umaxu'] = 15;
}
if ($user['lovk'] >= 25) {
$lovk['fuvorot'] = 10;
$lovk['fauvorot'] = 10;
$lovk['fakrit'] = 20;
}
if ($user['lovk'] >= 50) {
$lovk['fuvorot'] = 20;
$lovk['fauvorot'] = 25;
$lovk['fakrit'] = 40;
}
if ($user['lovk'] >= 75) {
$lovk['fuvorot'] = 30;
$lovk['fauvorot'] = 30;
$lovk['fakrit'] = 60;
}
if ($user['lovk'] >= 100) {
$lovk['fuvorot'] = 40;
$lovk['fauvorot'] = 40;
$lovk['fakrit'] = 75;
$lovk['uminu'] = 5;
$lovk['umaxu'] = 5;
}
if ($user['lovk'] >= 125) {
$lovk['fuvorot'] = 40;
$lovk['fauvorot'] = 70;
$lovk['fakrit'] = 90;
$lovk['uminu'] = 6;
$lovk['umaxu'] = 6;
}
if ($user['lovk'] >= 150) {
$lovk['fuvorot'] = 40;
$lovk['fauvorot'] = 150;
$lovk['fakrit'] = 120;
$lovk['uminu'] = 8;
$lovk['umaxu'] = 8;
}
if ($user['lovk'] >= 175) {
$lovk['fuvorot'] = 40;
$lovk['fauvorot'] = 200;
$lovk['fakrit'] = 140;
$lovk['uminu'] = 10;
$lovk['umaxu'] = 10;
}
if ($user['lovk'] >= 200) {
$lovk['fuvorot'] = 40;
$lovk['fauvorot'] = 250;
$lovk['fakrit'] = 160;
$lovk['uminu'] = 15;
$lovk['umaxu'] = 15;
}
if ($user['inta'] >= 25) {
$inta['fkrit'] = 10;
$inta['fauvorot'] = 10;
$inta['fakrit'] = 15;
}
if ($user['inta'] >= 50) {
$inta['fkrit'] = 25;
$inta['fauvorot'] = 25;
$inta['fakrit'] = 25;
}
if ($user['inta'] >= 75) {
$inta['fkrit'] = 60;
$inta['fauvorot'] = 30;
$inta['fakrit'] = 30;
}
if ($user['inta'] >= 100) {
$inta['fkrit'] = 40;
$inta['fauvorot'] = 40;
$inta['fakrit'] = 75;
}
if ($user['inta'] >= 125) {
$inta['fkrit'] = 40;
$inta['fauvorot'] = 50;
$inta['fakrit'] = 100;
$inta['uminu'] = 1;
$inta['umaxu'] = 1;
}
if ($user['inta'] >= 150) {
$inta['fkrit'] = 60;
$inta['fauvorot'] = 40;
$inta['fakrit'] = 130;
$inta['uminu'] = 5;
$inta['umaxu'] = 5;
}
if ($user['inta'] >= 175) {
$inta['fkrit'] = 40;
$inta['fauvorot'] = 80;
$inta['fakrit'] = 170;
$inta['uminu'] = 10;
$inta['umaxu'] = 10;
}
if ($user['inta'] >= 200) {
$inta['fkrit'] = 40;
$inta['fauvorot'] = 120;
$inta['fakrit'] = 200;
$inta['uminu'] = 15;
$inta['umaxu'] = 15;
}
if ($user['vinos'] >= 25) {
$vinos['fkrit'] = 10;
$vinos['fauvorot'] = 10;
$vinos['fakrit'] = 15;
}
if ($user['vinos'] >= 50) {
$vinos['fkrit'] = 25;
$vinos['fauvorot'] = 25;
$vinos['fakrit'] = 25;
}
if ($user['vinos'] >= 75) {
$vinos['fkrit'] = 60;
$vinos['fauvorot'] = 30;
$vinos['fakrit'] = 30;
}
if ($user['vinos'] >= 100) {
$vinos['fkrit'] = 40;
$vinos['fauvorot'] = 40;
$vinos['fakrit'] = 75;
}
if ($user['vinos'] >= 125) {
$vinos['fkrit'] = 40;
$vinos['fauvorot'] = 50;
$vinos['fakrit'] = 100;
$vinos['uminu'] = 1;
$vinos['umaxu'] = 1;
}
if ($user['vinos'] >= 150) {
$vinos['fkrit'] = 60;
$vinos['fauvorot'] = 40;
$vinos['fakrit'] = 130;
$vinos['uminu'] = 5;
$vinos['umaxu'] = 5;
}
if ($user['vinos'] >= 175) {
$vinos['fkrit'] = 40;
$vinos['fauvorot'] = 80;
$vinos['fakrit'] = 170;
$vinos['uminu'] = 10;
$vinos['umaxu'] = 10;
}
if ($user['vinos'] >= 200) {
$vinos['fkrit'] = 40;
$vinos['fauvorot'] = 120;
$vinos['fakrit'] = 200;
$vinos['uminu'] = 15;
$vinos['umaxu'] = 15;
}
if ($user['vinos'] >= $user['sila'] && $user['vinos'] >= $user['lovk'] && $user['vinos'] >= $user['inta']) {
$i_uminu = $vinos['uminu'];
$i_fkrit = $vinos['fkrit'];
$i_fauvorot = $vinos['fauvorot'];
$i_fakrit = $vinos['fakrit'];
}
if ($user['inta'] >= $user['sila'] && $user['inta'] >= $user['lovk'] && $user['inta'] >= $user['vinos']) {
$i_uminu = $inta['uminu'];
$i_fkrit = $inta['fkrit'];
$i_fauvorot = $inta['fauvorot'];
$i_fakrit = $inta['fakrit'];
}
if ($user['lovk'] >= $user['sila'] && $user['lovk'] >= $user['inta'] && $user['lovk'] >= $user['vinos']) {
$i_uminu = $lovk['uminu'];
$i_fkrit = $lovk['fkrit'];
$i_fauvorot = $lovk['fauvorot'];
$i_fakrit = $lovk['fakrit'];
}
if ($user['sila'] >= $user['lovk'] && $user['sila'] >= $user['inta'] && $user['sila'] >= $user['vinos']) {
$i_uminu = $sila['uminu'];
$i_fkrit = $sila['fkrit'];
$i_fauvorot = $sila['fauvorot'];
$i_fakrit = $sila['fakrit'];
}
if ($i_fkrit > 0) {
echo "Мф. крит: +" . $i_fkrit . "<br />";
}
if ($i_fakrit > 0) {
echo "Мф. анти крит: +" . $i_fakrit . "<br />";
}
if ($i_fauvorot > 0) {
echo "Мф. анти уворот: +" . $i_fauvorot . "<br />";
}
if ($i_uminu > 0) {
echo "Урон: +" . $i_uminu;
}
}
?>