Deleted sex from users table.
This commit is contained in:
@@ -596,46 +596,112 @@ class fbattle
|
||||
$bmfkrit1 = 0; //модификаторы
|
||||
// fixme что-то сделать с этой хернёй. рассчёт модификаторов работает не так!
|
||||
if ($this->user['sila'] >= 25) $bmfud += 1;
|
||||
if ($this->user['sila'] >= 50) $bmfud += 2; if ($this->user['sila'] >= 50) $bmfauv += 25; if ($this->user['sila'] >= 50) $bmfakrit += 25;
|
||||
if ($this->user['sila'] >= 75) $bmfud += 3; if ($this->user['sila'] >= 75) $bmfauv += 30; if ($this->user['sila'] >= 75) $bmfakrit += 30;
|
||||
if ($this->user['sila'] >= 100) $bmfud += 5; if ($this->user['sila'] >= 100) $bmfauv += 40; if ($this->user['sila'] >= 100) $bmfakrit += 40;
|
||||
if ($this->user['sila'] >= 125) $bmfud += 11; if ($this->user['sila'] >= 125) $bmfauv += 50; if ($this->user['sila'] >= 125) $bmfakrit += 50;
|
||||
if ($this->user['lovk'] >= 25) $bmfauv += 25; if ($this->user['lovk'] >= 25) $bmfakrit += 15;
|
||||
if ($this->user['lovk'] >= 50) $bmfuv += 25; if ($this->user['lovk'] >= 50) $bmfauv += 25; if ($this->user['lovk'] >= 50) $bmfakrit += 10;
|
||||
if ($this->user['lovk'] >= 75) $bmfuv += 40; if ($this->user['lovk'] >= 75) $bmfauv += 30; if ($this->user['lovk'] >= 75) $bmfakrit += 20;
|
||||
if ($this->user['lovk'] >= 100) $bmfuv += 50; if ($this->user['lovk'] >= 100) $bmfauv += 40; if ($this->user['lovk'] >= 100) $bmfakrit += 30;
|
||||
if ($this->user['lovk'] >= 125) $bmfuv += 65; if ($this->user['lovk'] >= 125) $bmfauv += 55; if ($this->user['lovk'] >= 125) $bmfakrit += 45;
|
||||
if ($this->user['sila'] >= 50) $bmfud += 2;
|
||||
if ($this->user['sila'] >= 50) $bmfauv += 25;
|
||||
if ($this->user['sila'] >= 50) $bmfakrit += 25;
|
||||
if ($this->user['sila'] >= 75) $bmfud += 3;
|
||||
if ($this->user['sila'] >= 75) $bmfauv += 30;
|
||||
if ($this->user['sila'] >= 75) $bmfakrit += 30;
|
||||
if ($this->user['sila'] >= 100) $bmfud += 5;
|
||||
if ($this->user['sila'] >= 100) $bmfauv += 40;
|
||||
if ($this->user['sila'] >= 100) $bmfakrit += 40;
|
||||
if ($this->user['sila'] >= 125) $bmfud += 11;
|
||||
if ($this->user['sila'] >= 125) $bmfauv += 50;
|
||||
if ($this->user['sila'] >= 125) $bmfakrit += 50;
|
||||
if ($this->user['lovk'] >= 25) $bmfauv += 25;
|
||||
if ($this->user['lovk'] >= 25) $bmfakrit += 15;
|
||||
if ($this->user['lovk'] >= 50) $bmfuv += 25;
|
||||
if ($this->user['lovk'] >= 50) $bmfauv += 25;
|
||||
if ($this->user['lovk'] >= 50) $bmfakrit += 10;
|
||||
if ($this->user['lovk'] >= 75) $bmfuv += 40;
|
||||
if ($this->user['lovk'] >= 75) $bmfauv += 30;
|
||||
if ($this->user['lovk'] >= 75) $bmfakrit += 20;
|
||||
if ($this->user['lovk'] >= 100) $bmfuv += 50;
|
||||
if ($this->user['lovk'] >= 100) $bmfauv += 40;
|
||||
if ($this->user['lovk'] >= 100) $bmfakrit += 30;
|
||||
if ($this->user['lovk'] >= 125) $bmfuv += 65;
|
||||
if ($this->user['lovk'] >= 125) $bmfauv += 55;
|
||||
if ($this->user['lovk'] >= 125) $bmfakrit += 45;
|
||||
if ($this->user['inta'] >= 25) $bmfauv += 15;
|
||||
if ($this->user['inta'] >= 50) $bmfkrit += 20; if ($this->user['inta'] >= 50) $bmfauv += 25; if ($this->user['inta'] >= 50) $bmfakrit += 25;
|
||||
if ($this->user['inta'] >= 75) $bmfkrit += 30; if ($this->user['inta'] >= 75) $bmfauv += 30; if ($this->user['inta'] >= 75) $bmfakrit += 30;
|
||||
if ($this->user['inta'] >= 100) $bmfkrit += 40; if ($this->user['inta'] >= 100) $bmfauv += 40; if ($this->user['inta'] >= 100) $bmfakrit += 40;
|
||||
if ($this->user['inta'] >= 125) $bmfkrit += 55; if ($this->user['inta'] >= 125) $bmfauv += 55; if ($this->user['inta'] >= 125) $bmfakrit += 55;
|
||||
if ($this->user['inta'] >= 50) $bmfkrit += 20;
|
||||
if ($this->user['inta'] >= 50) $bmfauv += 25;
|
||||
if ($this->user['inta'] >= 50) $bmfakrit += 25;
|
||||
if ($this->user['inta'] >= 75) $bmfkrit += 30;
|
||||
if ($this->user['inta'] >= 75) $bmfauv += 30;
|
||||
if ($this->user['inta'] >= 75) $bmfakrit += 30;
|
||||
if ($this->user['inta'] >= 100) $bmfkrit += 40;
|
||||
if ($this->user['inta'] >= 100) $bmfauv += 40;
|
||||
if ($this->user['inta'] >= 100) $bmfakrit += 40;
|
||||
if ($this->user['inta'] >= 125) $bmfkrit += 55;
|
||||
if ($this->user['inta'] >= 125) $bmfauv += 55;
|
||||
if ($this->user['inta'] >= 125) $bmfakrit += 55;
|
||||
if ($this->user['vinos'] >= 25) $bmfbron += 2;
|
||||
if ($this->user['vinos'] >= 50) $bmfauv += 25; if ($this->user['vinos'] >= 50) $bmfbron += 2; if ($this->user['vinos'] >= 50) $bmfakrit += 25;
|
||||
if ($this->user['vinos'] >= 75) $bmfauv += 30; if ($this->user['vinos'] >= 75) $bmfbron += 3; if ($this->user['vinos'] >= 75) $bmfakrit += 30;
|
||||
if ($this->user['vinos'] >= 100) $bmfauv += 40; if ($this->user['vinos'] >= 100) $bmfbron += 5; if ($this->user['vinos'] >= 100) $bmfakrit += 40;
|
||||
if ($this->user['vinos'] >= 125) $bmfauv += 55; if ($this->user['vinos'] >= 125) $bmfbron += 8; if ($this->user['vinos'] >= 125) $bmfakrit += 55;
|
||||
if ($this->user['vinos'] >= 50) $bmfauv += 25;
|
||||
if ($this->user['vinos'] >= 50) $bmfbron += 2;
|
||||
if ($this->user['vinos'] >= 50) $bmfakrit += 25;
|
||||
if ($this->user['vinos'] >= 75) $bmfauv += 30;
|
||||
if ($this->user['vinos'] >= 75) $bmfbron += 3;
|
||||
if ($this->user['vinos'] >= 75) $bmfakrit += 30;
|
||||
if ($this->user['vinos'] >= 100) $bmfauv += 40;
|
||||
if ($this->user['vinos'] >= 100) $bmfbron += 5;
|
||||
if ($this->user['vinos'] >= 100) $bmfakrit += 40;
|
||||
if ($this->user['vinos'] >= 125) $bmfauv += 55;
|
||||
if ($this->user['vinos'] >= 125) $bmfbron += 8;
|
||||
if ($this->user['vinos'] >= 125) $bmfakrit += 55;
|
||||
|
||||
if ($this->enemyhar['sila'] >= 25) $bmfud += 1;
|
||||
if ($this->enemyhar['sila'] >= 50) $bmfud += 2; if ($this->enemyhar['sila'] >= 50) $bmfauv += 25; if ($this->enemyhar['sila'] >= 50) $bmfakrit += 25;
|
||||
if ($this->enemyhar['sila'] >= 75) $bmfud += 3; if ($this->enemyhar['sila'] >= 75) $bmfauv += 30; if ($this->enemyhar['sila'] >= 75) $bmfakrit += 30;
|
||||
if ($this->enemyhar['sila'] >= 100) $bmfud += 5; if ($this->enemyhar['sila'] >= 100) $bmfauv += 40; if ($this->enemyhar['sila'] >= 100) $bmfakrit += 40;
|
||||
if ($this->enemyhar['sila'] >= 125) $bmfud += 11; if ($this->enemyhar['sila'] >= 125) $bmfauv += 65; if ($this->enemyhar['sila'] >= 125) $bmfakrit += 65;
|
||||
if ($this->enemyhar['lovk'] >= 25) $bmfauv += 25; if ($this->enemyhar['lovk'] >= 25) $bmfakrit += 15;
|
||||
if ($this->enemyhar['lovk'] >= 50) $bmfuv += 25; if ($this->enemyhar['lovk'] >= 50) $bmfauv += 25; if ($this->enemyhar['lovk'] >= 50) $bmfakrit += 10;
|
||||
if ($this->enemyhar['lovk'] >= 75) $bmfuv += 40; if ($this->enemyhar['lovk'] >= 75) $bmfauv += 30; if ($this->enemyhar['lovk'] >= 75) $bmfakrit += 20;
|
||||
if ($this->enemyhar['lovk'] >= 100) $bmfuv += 50; if ($this->enemyhar['lovk'] >= 100) $bmfauv += 40; if ($this->enemyhar['lovk'] >= 100) $bmfakrit += 30;
|
||||
if ($this->enemyhar['lovk'] >= 125) $bmfuv += 65; if ($this->enemyhar['lovk'] >= 125) $bmfauv += 55; if ($this->enemyhar['lovk'] >= 125) $bmfakrit += 45;
|
||||
if ($this->enemyhar['sila'] >= 50) $bmfud += 2;
|
||||
if ($this->enemyhar['sila'] >= 50) $bmfauv += 25;
|
||||
if ($this->enemyhar['sila'] >= 50) $bmfakrit += 25;
|
||||
if ($this->enemyhar['sila'] >= 75) $bmfud += 3;
|
||||
if ($this->enemyhar['sila'] >= 75) $bmfauv += 30;
|
||||
if ($this->enemyhar['sila'] >= 75) $bmfakrit += 30;
|
||||
if ($this->enemyhar['sila'] >= 100) $bmfud += 5;
|
||||
if ($this->enemyhar['sila'] >= 100) $bmfauv += 40;
|
||||
if ($this->enemyhar['sila'] >= 100) $bmfakrit += 40;
|
||||
if ($this->enemyhar['sila'] >= 125) $bmfud += 11;
|
||||
if ($this->enemyhar['sila'] >= 125) $bmfauv += 65;
|
||||
if ($this->enemyhar['sila'] >= 125) $bmfakrit += 65;
|
||||
if ($this->enemyhar['lovk'] >= 25) $bmfauv += 25;
|
||||
if ($this->enemyhar['lovk'] >= 25) $bmfakrit += 15;
|
||||
if ($this->enemyhar['lovk'] >= 50) $bmfuv += 25;
|
||||
if ($this->enemyhar['lovk'] >= 50) $bmfauv += 25;
|
||||
if ($this->enemyhar['lovk'] >= 50) $bmfakrit += 10;
|
||||
if ($this->enemyhar['lovk'] >= 75) $bmfuv += 40;
|
||||
if ($this->enemyhar['lovk'] >= 75) $bmfauv += 30;
|
||||
if ($this->enemyhar['lovk'] >= 75) $bmfakrit += 20;
|
||||
if ($this->enemyhar['lovk'] >= 100) $bmfuv += 50;
|
||||
if ($this->enemyhar['lovk'] >= 100) $bmfauv += 40;
|
||||
if ($this->enemyhar['lovk'] >= 100) $bmfakrit += 30;
|
||||
if ($this->enemyhar['lovk'] >= 125) $bmfuv += 65;
|
||||
if ($this->enemyhar['lovk'] >= 125) $bmfauv += 55;
|
||||
if ($this->enemyhar['lovk'] >= 125) $bmfakrit += 45;
|
||||
if ($this->enemyhar['inta'] >= 25) $bmfauv += 15;
|
||||
if ($this->enemyhar['inta'] >= 50) $bmfkrit += 20; if ($this->enemyhar['inta'] >= 50) $bmfauv += 25; if ($this->enemyhar['inta'] >= 50) $bmfakrit += 25;
|
||||
if ($this->enemyhar['inta'] >= 75) $bmfkrit += 30; if ($this->enemyhar['inta'] >= 75) $bmfauv += 30; if ($this->enemyhar['inta'] >= 75) $bmfakrit += 30;
|
||||
if ($this->enemyhar['inta'] >= 100) $bmfkrit += 40; if ($this->enemyhar['inta'] >= 100) $bmfauv += 40; if ($this->enemyhar['inta'] >= 100) $bmfakrit += 40;
|
||||
if ($this->enemyhar['inta'] >= 125) $bmfkrit += 55; if ($this->enemyhar['inta'] >= 125) $bmfauv += 55; if ($this->enemyhar['inta'] >= 125) $bmfakrit += 55;
|
||||
if ($this->enemyhar['inta'] >= 50) $bmfkrit += 20;
|
||||
if ($this->enemyhar['inta'] >= 50) $bmfauv += 25;
|
||||
if ($this->enemyhar['inta'] >= 50) $bmfakrit += 25;
|
||||
if ($this->enemyhar['inta'] >= 75) $bmfkrit += 30;
|
||||
if ($this->enemyhar['inta'] >= 75) $bmfauv += 30;
|
||||
if ($this->enemyhar['inta'] >= 75) $bmfakrit += 30;
|
||||
if ($this->enemyhar['inta'] >= 100) $bmfkrit += 40;
|
||||
if ($this->enemyhar['inta'] >= 100) $bmfauv += 40;
|
||||
if ($this->enemyhar['inta'] >= 100) $bmfakrit += 40;
|
||||
if ($this->enemyhar['inta'] >= 125) $bmfkrit += 55;
|
||||
if ($this->enemyhar['inta'] >= 125) $bmfauv += 55;
|
||||
if ($this->enemyhar['inta'] >= 125) $bmfakrit += 55;
|
||||
if ($this->enemyhar['vinos'] >= 25) $bmfbron += 2;
|
||||
if ($this->enemyhar['vinos'] >= 50) $bmfauv += 25; if ($this->enemyhar['vinos'] >= 50) $bmfbron += 2; if ($this->enemyhar['vinos'] >= 50) $bmfakrit += 25;
|
||||
if ($this->enemyhar['vinos'] >= 75) $bmfauv += 30; if ($this->enemyhar['vinos'] >= 75) $bmfbron += 3; if ($this->enemyhar['vinos'] >= 75) $bmfakrit += 30;
|
||||
if ($this->enemyhar['vinos'] >= 100) $bmfauv += 40; if ($this->enemyhar['vinos'] >= 100) $bmfbron += 5; if ($this->enemyhar['vinos'] >= 100) $bmfakrit += 40;
|
||||
if ($this->enemyhar['vinos'] >= 125) $bmfauv += 55; if ($this->enemyhar['vinos'] >= 125) $bmfbron += 8; if ($this->enemyhar['vinos'] >= 125) $bmfakrit += 55;
|
||||
if ($this->enemyhar['vinos'] >= 50) $bmfauv += 25;
|
||||
if ($this->enemyhar['vinos'] >= 50) $bmfbron += 2;
|
||||
if ($this->enemyhar['vinos'] >= 50) $bmfakrit += 25;
|
||||
if ($this->enemyhar['vinos'] >= 75) $bmfauv += 30;
|
||||
if ($this->enemyhar['vinos'] >= 75) $bmfbron += 3;
|
||||
if ($this->enemyhar['vinos'] >= 75) $bmfakrit += 30;
|
||||
if ($this->enemyhar['vinos'] >= 100) $bmfauv += 40;
|
||||
if ($this->enemyhar['vinos'] >= 100) $bmfbron += 5;
|
||||
if ($this->enemyhar['vinos'] >= 100) $bmfakrit += 40;
|
||||
if ($this->enemyhar['vinos'] >= 125) $bmfauv += 55;
|
||||
if ($this->enemyhar['vinos'] >= 125) $bmfbron += 8;
|
||||
if ($this->enemyhar['vinos'] >= 125) $bmfakrit += 55;
|
||||
|
||||
//*************
|
||||
|
||||
@@ -764,12 +830,24 @@ class fbattle
|
||||
{
|
||||
$wep = db::c()->query('SELECT `otdel` FROM `inventory` WHERE `id` = ?i', $idwep)->fetch_assoc();
|
||||
switch ($wep['otdel']) {
|
||||
case 1: return "noj"; break;
|
||||
case 11: return "topor"; break;
|
||||
case 12: return "dubina"; break;
|
||||
case 13: return "mech"; break;
|
||||
case 14: return "priklad"; break; //???
|
||||
default: return "kulak"; break;
|
||||
case 1:
|
||||
return "noj";
|
||||
break;
|
||||
case 11:
|
||||
return "topor";
|
||||
break;
|
||||
case 12:
|
||||
return "dubina";
|
||||
break;
|
||||
case 13:
|
||||
return "mech";
|
||||
break;
|
||||
case 14:
|
||||
return "priklad";
|
||||
break; //???
|
||||
default:
|
||||
return "kulak";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -780,7 +858,7 @@ class fbattle
|
||||
*/
|
||||
function get_chanse($persent)
|
||||
{
|
||||
if (rand(1, 100) <= $persent ) {
|
||||
if (rand(1, 100) <= $persent) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -1041,11 +1119,11 @@ class fbattle
|
||||
foreach ($this->battle as $k => $v) {
|
||||
if ($k > _BOTSEPARATOR_) {
|
||||
$bots = mysql_fetch_array(mysql_query('SELECT * FROM `bots` WHERE `id` = ' . $k . ' LIMIT 1;'));
|
||||
$us = mysql_fetch_array(mysql_query('SELECT `hp`, `maxhp`, `sex`,`id`,`battle` FROM `users` WHERE `id` = ' . $bots['prototype'] . ' LIMIT 1;'));
|
||||
$us = mysql_fetch_array(mysql_query('SELECT `hp`, `maxhp`, `id`,`battle` FROM `users` WHERE `id` = ' . $bots['prototype'] . ' LIMIT 1;'));
|
||||
$us['hp'] = $bots['hp'];
|
||||
$us['battle'] = $bots['battle'];
|
||||
} else {
|
||||
$us = mysql_fetch_array(mysql_query('SELECT `hp`, `maxhp`, `sex`,`id`,`battle` FROM `users` WHERE `id` = ' . $k . ' LIMIT 1;'));
|
||||
$us = mysql_fetch_array(mysql_query('SELECT `hp`, `maxhp`, `id`,`battle` FROM `users` WHERE `id` = ' . $k . ' LIMIT 1;'));
|
||||
}
|
||||
if ($us && (int)$us['hp'] <= 0) {
|
||||
//$battle_data = mysql_fetch_array(mysql_query ('SELECT * FROM `battle` WHERE `id` = '.$this->user['battle'].' LIMIT 1;'));
|
||||
@@ -1054,11 +1132,9 @@ class fbattle
|
||||
//$war=array_keys($war);
|
||||
// if(in_array($k,$war)) {
|
||||
unset($this->battle[$k]);
|
||||
if ($us['sex'] == 1) {
|
||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick5($k, 'b') . ' проиграл бой!<BR>');
|
||||
} else {
|
||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick5($k, 'b') . ' проиграла бой!<BR>');
|
||||
}
|
||||
|
||||
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick5($k, 'b') . ' проиграл бой!<BR>');
|
||||
|
||||
mysql_query('UPDATE `users` SET `hp` = 0, `fullhptime` = ' . time() . ' WHERE `id` = \'' . $k . '\' LIMIT 1;');
|
||||
foreach ($this->battle as $kak => $vav) {
|
||||
unset($this->battle[$kak][$k]);
|
||||
@@ -1952,7 +2028,7 @@ class fbattle
|
||||
$mfit = 1.5;
|
||||
}
|
||||
|
||||
$pls = count($this->t1) + count($this->t2);
|
||||
$pls = count($this->t1) + count($this->t2);
|
||||
if ($pls > 2) {
|
||||
$mfbot = $bot_active == true ? 0.3 : 1;
|
||||
$mfbot2 = $bot_def == true ? 0.7 : 1;
|
||||
|
||||
Reference in New Issue
Block a user