game/_incl_data/class/priems/fire.php

550 lines
18 KiB
PHP
Raw Normal View History

2023-03-31 18:42:06 +00:00
<?php
2022-06-06 21:30:34 +00:00
if(!defined('GAME'))
{
die();
}
$krituetli=true;
$dopyrn = 0;
if(isset($hod))
{
if($pr['id']==29)
{
2023-01-10 16:29:32 +00:00
//Знак огня
2022-06-06 21:30:34 +00:00
$minmp = $u->info['level'];
}elseif($pr['id']==33)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [6]
2022-06-06 21:30:34 +00:00
$krituetli=false;
$hpmin = 8;
}elseif($pr['id']==56)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [7]
2022-06-06 21:30:34 +00:00
$krituetli=false;
$hpmin = 10;
}elseif($pr['id']==57)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [8]
2022-06-06 21:30:34 +00:00
$krituetli=false;
$hpmin = 12;
}elseif($pr['id']==58)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [9]
2022-06-06 21:30:34 +00:00
$krituetli=false;
$hpmin = 14;
}elseif($pr['id']==59)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [10]
2022-06-06 21:30:34 +00:00
$krituetli=false;
$hpmin = 17;
}elseif($pr['id']==60)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [11]
2022-06-06 21:30:34 +00:00
$krituetli=false;
$hpmin = 20;
}
if($hpmin>0)
{
$re = $this->magicAtack($ue,$hpmin,1,$pr,$eff,1,0,0,0,$krituetli);
}
if(isset($minmp))
{
2023-01-10 16:29:32 +00:00
//отнимаем МР у кастера
2022-06-06 21:30:34 +00:00
if($this->minMana($eff['user_use'],$minmp,1)==false)
{
2023-01-10 16:29:32 +00:00
//снимаем эффект, мана закончилась
2022-06-06 21:30:34 +00:00
$btl->delPriem($eff,$btl->users[$btl->uids[$eff['uid']]],2);
}
}
}else{
2023-01-10 16:29:32 +00:00
$uen = $u->info['enemy']; //на кого используем прием
2022-06-06 21:30:34 +00:00
if(isset($_POST['useon']))
{
$ue = $this->ue;
if(isset($ue['id']))
{
$uen = $ue['id'];
}else{
$uen = 0;
}
}
if($pl['priem']['id'] == 245) {
2023-01-10 16:29:32 +00:00
//Огненный щит
2022-06-06 21:30:34 +00:00
/*$hp = 6*$u1['level'];
if($hp > 0) {
$this->users[$this->uids[$u2['id']]]['last_hp'] = -$hp;
$this->stats[$this->uids[$u2['id']]]['hpNow'] -= $hp;
$s2['hpNow'] = $this->stats[$this->uids[$u2['id']]]['hpNow'];
$p2['hpNow'] = $this->stats[$this->uids[$u2['id']]]['hpNow'];
$this->users[$this->uids[$u2['id']]]['hpNow'] = $this->stats[$this->uids[$u2['id']]]['hpNow'];
mysql_query('UPDATE `stats` SET `hpNow` = "'.$this->stats[$this->uids[$u2['id']]]['hpNow'].'",`last_hp` = "'.$this->users[$this->uids[$u2['id']]]['last_hp'].'" WHERE `id` = "'.$u2['id'].'" LIMIT 1');
$this->stats[$this->uids[$u2['uid']]] = $u->getStats($u2['uid'],0);
$hp = -$hp;
}else{
$hp = '--';
}
2023-01-10 16:29:32 +00:00
$mas1['text'] = '{tm1} {u2} утратил здоровье от приема &quot;<b>'.$pl['name'].'</b>&quot;. <b><font color=#006699>'.$hp.'</font></b> ['.floor($this->stats[$this->uids[$u2['id']]]['hpNow']).'/'.$this->stats[$this->uids[$u2['id']]]['hpAll'].']';
2022-06-06 21:30:34 +00:00
*/
$mp = round($yrn/2);
if($mp < 0) {
$mp = 0;
}
if($mp == 0) {
$mp = '--';
}else{
$mp = '+'.$mp;
}
$this->stats[$this->uids[$u1['id']]]['mpNow'] += $mp;
$this->users[$this->uids[$u1['id']]]['mpNow'] = $this->stats[$this->uids[$u1['id']]]['mpNow'];
if($u->info['id'] == $this->users[$this->uids[$u1['id']]]['id']) {
$u->info['mpNow'] = $this->stats[$this->uids[$u1['id']]]['mpNow'];
$u->stats['mpNow'] = $this->stats[$this->uids[$u1['id']]]['mpNow'];
}
mysql_query('UPDATE `stats` SET `mpNow` = "'.$this->stats[$this->uids[$u1['id']]]['mpNow'].'" WHERE `id` = "'.$this->info[$this->uids[$u1['id']]]['id'].'" LIMIT 1');
2023-01-10 16:29:32 +00:00
$mas1['text'] = '{tm1} {u1} использовал заклинание &quot;<b>'.$pl['name'].'</b>&quot; и восстановил магические силы. <b><font color=#006699>'.$mp.'</font></b> ['.floor($this->stats[$this->uids[$u1['id']]]['mpNow']).'/'.$this->stats[$this->uids[$u1['id']]]['mpAll'].'] (Мана)';
2022-06-06 21:30:34 +00:00
}elseif($pl['id']==244)
{
2023-01-10 16:29:32 +00:00
//Пылающая Смерть
2022-06-06 21:30:34 +00:00
$ptst = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`v2`,`hod`,`user_use` FROM `eff_users` WHERE `user_use` = "'.$u->info['id'].'" AND `uid` = "'.$ue['id'].'" AND `delete` = "0" AND `v1` = "priem" AND (`v2` = 58 OR `v2` = 57 OR `v2` = 56 OR `v2` = 33 OR `v2` = 60 OR `v2` = 59) LIMIT 1'));
if(!isset($ptst['id'])) {
2023-01-10 16:29:32 +00:00
echo '<font color=red><b>Цель &quot;'.$ue['login'].'&quot; не подвержена действию &quot;Пожирающее Пламя&quot;</b></font>';
2022-06-06 21:30:34 +00:00
$cup = true;
}elseif($btl->stats[$btl->uids[$ue['id']]]['hpNow'] > floor($btl->stats[$btl->uids[$ue['id']]]['hpAll']/3)) {
2023-01-10 16:29:32 +00:00
echo '<font color=red><b>Цель &quot;'.$ue['login'].'&quot; имеет сильшком большой уровень жизни</b></font>';
2022-06-06 21:30:34 +00:00
$cup = true;
}else{
$yn = 8;
if($ptst['v2'] == 33) { //6
$yn = 8;
}elseif($ptst['v2'] == 56) { //7
$yn = 10;
}elseif($ptst['v2'] == 57) { //8
$yn = 12;
}elseif($ptst['v2'] == 58) { //9
$yn = 14;
}elseif($ptst['v2'] == 59) { //10
$yn = 17;
}elseif($ptst['v2'] == 60) { //11
$yn = 20;
}
$yn = ($yn*$ptst['hod']);
//$yn = $this->testPower($btl->stats[$btl->uids[$u->info['id']]],$btl->stats[$btl->uids[$ue['id']]],$yn,1,2);
$yn = floor($yn*1.18);
2023-01-10 16:29:32 +00:00
//заносим в лог боя
2022-06-06 21:30:34 +00:00
$this->magicAtack($ue,$yn,1,$pl,$eff,0,0,0,0,false);
//$krituetli = true;
//$hpmin = $yn;
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$ue['sex'].'||t2='.$ue['team'].'||login2='.$ue['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'",`uid` = "0" WHERE `id` = "'.$ptst['id'].'" LIMIT 1');
2023-01-10 16:29:32 +00:00
//$re = $this->addPriem($ue['id'],242,'add_notactic=1|add_nousepriem=1',0,77,2,$u->info['id'],2,'шокирующийудар');
2022-06-06 21:30:34 +00:00
2023-01-10 16:29:32 +00:00
$mas1['text'] = '{tm1} Закончилось действие приема &quot;<b>'.$ptst['name'].'</b>&quot; для {u2}.';
2022-06-06 21:30:34 +00:00
$btl->pr_not_use[$ptst['id']] = 1;
$btl->add_log($mas1);
2023-01-10 16:29:32 +00:00
echo '<font color=red><b>Вы высвободили энергию заклятия &quot;'.$ptst['name'].'&quot;</b></font>';
2022-06-06 21:30:34 +00:00
}
}elseif($pl['id']==243)
{
2023-01-10 16:29:32 +00:00
//Пылающий Взрыв
2022-06-06 21:30:34 +00:00
$ptst = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`v2`,`hod`,`user_use` FROM `eff_users` WHERE `user_use` = "'.$u->info['id'].'" AND `uid` = "'.$ue['id'].'" AND `delete` = "0" AND `v1` = "priem" AND (`v2` = 58 OR `v2` = 57 OR `v2` = 56 OR `v2` = 33 OR `v2` = 60 OR `v2` = 59) LIMIT 1'));
if(!isset($ptst['id'])) {
2023-01-10 16:29:32 +00:00
echo '<font color=red><b>Цель &quot;'.$ue['login'].'&quot; не подвержена действию &quot;Пожирающее Пламя&quot;</b></font>';
2022-06-06 21:30:34 +00:00
$cup = true;
}else{
$yn = 8;
if($ptst['v2'] == 33) { //6
$yn = 8;
}elseif($ptst['v2'] == 56) { //7
$yn = 10;
}elseif($ptst['v2'] == 57) { //8
$yn = 12;
}elseif($ptst['v2'] == 58) { //9
$yn = 14;
}elseif($ptst['v2'] == 59) { //10
$yn = 17;
}elseif($ptst['v2'] == 60) { //11
$yn = 20;
}
$yn = ($yn*$ptst['hod']);
//$yn = $this->testPower($btl->stats[$btl->uids[$u->info['id']]],$btl->stats[$btl->uids[$ue['id']]],$yn,1,2);
$yn = floor($yn*0.27);
2023-01-10 16:29:32 +00:00
//заносим в лог боя
2022-06-06 21:30:34 +00:00
$rx = 4;
$xx = 0;
$ix = 0;
while($ix<count($btl->users))
{
if($btl->stats[$ix]['hpNow']>0 && $btl->users[$ix]['team']!=$u->info['team'] && $xx<$rx && $uen!=$btl->users[$ix]['id'])
{
$this->magicAtack($btl->users[$ix],$yn,1,$pl,$eff,0,0,0,0,false);
$xx++;
}
$ix++;
}
$this->magicAtack($ue,$yn,1,$pl,$eff,0,0,0,0,false);
//$krituetli = true;
//$hpmin = $yn;
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$ue['sex'].'||t2='.$ue['team'].'||login2='.$ue['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'",`uid` = "0" WHERE `id` = "'.$ptst['id'].'" LIMIT 1');
2023-01-10 16:29:32 +00:00
//$re = $this->addPriem($ue['id'],242,'add_notactic=1|add_nousepriem=1',0,77,2,$u->info['id'],2,'шокирующийудар');
2022-06-06 21:30:34 +00:00
2023-01-10 16:29:32 +00:00
$mas1['text'] = '{tm1} Закончилось действие приема &quot;<b>'.$ptst['name'].'</b>&quot; для {u2}.';
2022-06-06 21:30:34 +00:00
$btl->pr_not_use[$ptst['id']] = 1;
$btl->add_log($mas1);
2023-01-10 16:29:32 +00:00
echo '<font color=red><b>Вы высвободили энергию заклятия &quot;'.$ptst['name'].'&quot;</b></font>';
2022-06-06 21:30:34 +00:00
}
}elseif($pl['id']==241)
{
2023-01-10 16:29:32 +00:00
//Пылающий Ужас
2022-06-06 21:30:34 +00:00
$ptst = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`v2`,`hod`,`user_use` FROM `eff_users` WHERE `user_use` = "'.$u->info['id'].'" AND `uid` = "'.$ue['id'].'" AND `delete` = "0" AND `v1` = "priem" AND (`v2` = 58 OR `v2` = 57 OR `v2` = 56 OR `v2` = 33 OR `v2` = 60 OR `v2` = 59) LIMIT 1'));
if(!isset($ptst['id'])) {
2023-01-10 16:29:32 +00:00
echo '<font color=red><b>Цель &quot;'.$ue['login'].'&quot; не подвержена действию &quot;Пожирающее Пламя&quot;</b></font>';
2022-06-06 21:30:34 +00:00
$cup = true;
}else{
$yn = 8;
if($ptst['v2'] == 33) { //6
$yn = 8;
}elseif($ptst['v2'] == 56) { //7
$yn = 10;
}elseif($ptst['v2'] == 57) { //8
$yn = 12;
}elseif($ptst['v2'] == 58) { //9
$yn = 14;
}elseif($ptst['v2'] == 59) { //10
$yn = 17;
}elseif($ptst['v2'] == 60) { //11
$yn = 20;
}
$yn = ($yn*$ptst['hod']);
//$yn = $this->testPower($btl->stats[$btl->uids[$u->info['id']]],$btl->stats[$btl->uids[$ue['id']]],$yn,1,2);
$yn = round($yn/2);
2023-01-10 16:29:32 +00:00
//заносим в лог боя
2022-06-06 21:30:34 +00:00
$krituetli = true;
$hpmin = $yn;
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$ue['sex'].'||t2='.$ue['team'].'||login2='.$ue['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'",`uid` = "0" WHERE `id` = "'.$ptst['id'].'" LIMIT 1');
2023-01-10 16:29:32 +00:00
$re = $this->addPriem($ue['id'],242,'add_notactic=1|add_nousepriem=1',0,77,2,$u->info['id'],2,'шокирующийудар');
2022-06-06 21:30:34 +00:00
2023-01-10 16:29:32 +00:00
$mas1['text'] = '{tm1} Закончилось действие приема &quot;<b>'.$ptst['name'].'</b>&quot; для {u2}.';
2022-06-06 21:30:34 +00:00
$btl->pr_not_use[$ptst['id']] = 1;
$btl->add_log($mas1);
2023-01-10 16:29:32 +00:00
echo '<font color=red><b>Вы высвободили энергию заклятия &quot;'.$ptst['name'].'&quot;</b></font>';
2022-06-06 21:30:34 +00:00
}
}elseif($pl['id']==15)
{
2023-01-10 16:29:32 +00:00
//испепеление [4]
2022-06-06 21:30:34 +00:00
$hpmin = 21;
}elseif($pl['id']==16)
{
2023-01-10 16:29:32 +00:00
//испепеление [5]
2022-06-06 21:30:34 +00:00
$hpmin = 25;
}elseif($pl['id']==29)
{
2023-01-10 16:29:32 +00:00
//Знак огня
$re = $this->addPriem($u->info['id'],$pl['id'],-1,0,77,-2,$u->info['id'],1,'знакогня',1,1);
2022-06-06 21:30:34 +00:00
}elseif($pl['id']==33)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [6]
$re = $this->addPriem($uen,$pl['id'],'',0,77,5,$u->info['id'],1,'пожирающеепламя',1,1);
2022-06-06 21:30:34 +00:00
if($re==false)
{
2023-01-10 16:29:32 +00:00
echo '[Er::Пожирающее Пламя[xX]]';
2022-06-06 21:30:34 +00:00
}
}elseif($pl['id']==34)
{
2023-01-10 16:29:32 +00:00
//Вспышка [8]
2022-06-06 21:30:34 +00:00
$hpmin = 33;
2023-01-10 16:29:32 +00:00
//каждая вспышка +5% мощности
2022-06-06 21:30:34 +00:00
$pwx = mysql_fetch_array(mysql_query('SELECT `id`,`x` FROM `eff_users` WHERE `uid` = "'.$ue['id'].'" AND `v1` = "priem" AND `v2` = "26" AND `delete` = "0" LIMIT 25'));
$pwx = $pwx['x'];
if($pwx>0)
{
$hpmin += round($hpmin/100*($pwx*5));
}
unset($pwx);
}elseif($pl['id']==67)
{
2023-01-10 16:29:32 +00:00
//Вспышка [9]
2022-06-06 21:30:34 +00:00
$hpmin = 39;
2023-01-10 16:29:32 +00:00
//каждая вспышка +5% мощности
2022-06-06 21:30:34 +00:00
$pwx = mysql_fetch_array(mysql_query('SELECT `id`,`x` FROM `eff_users` WHERE `uid` = "'.$ue['id'].'" AND `v1` = "priem" AND `v2` = "26" AND `delete` = "0" LIMIT 25'));
$pwx = $pwx['x'];
if($pwx>0)
{
$hpmin += round($hpmin/100*($pwx*5));
}
unset($pwx);
}elseif($pl['id']==68)
{
2023-01-10 16:29:32 +00:00
//Вспышка [10]
2022-06-06 21:30:34 +00:00
$hpmin = 47;
2023-01-10 16:29:32 +00:00
//каждая вспышка +5% мощности
2022-06-06 21:30:34 +00:00
$pwx = mysql_fetch_array(mysql_query('SELECT `id`,`x` FROM `eff_users` WHERE `uid` = "'.$ue['id'].'" AND `v1` = "priem" AND `v2` = "26" AND `delete` = "0" LIMIT 25'));
$pwx = $pwx['x'];
if($pwx>0)
{
$hpmin += round($hpmin/100*($pwx*5));
}
unset($pwx);
}elseif($pl['id']==69)
{
2023-01-10 16:29:32 +00:00
//Вспышка [11]
2022-06-06 21:30:34 +00:00
$hpmin = 57;
2023-01-10 16:29:32 +00:00
//каждая вспышка +5% мощности
2022-06-06 21:30:34 +00:00
$pwx = mysql_fetch_array(mysql_query('SELECT `id`,`x` FROM `eff_users` WHERE `uid` = "'.$ue['id'].'" AND `v1` = "priem" AND `v2` = "26" AND `delete` = "0" LIMIT 25'));
$pwx = $pwx['x'];
if($pwx>0)
{
$hpmin += round($hpmin/100*($pwx*5));
}
unset($pwx);
}elseif($pl['id']==35)
{
2023-01-10 16:29:32 +00:00
//Тепло Жизни [7]
2022-06-06 21:30:34 +00:00
$hpadd = rand(37,42);
}elseif($pl['id']==50)
{
2023-01-10 16:29:32 +00:00
//испепеление [6]
2022-06-06 21:30:34 +00:00
$hpmin = 30;
}elseif($pl['id']==51)
{
2023-01-10 16:29:32 +00:00
//испепеление [7]
2022-06-06 21:30:34 +00:00
$hpmin = 36;
}elseif($pl['id']==52)
{
2023-01-10 16:29:32 +00:00
//испепеление [8]
2022-06-06 21:30:34 +00:00
$hpmin = 44;
}elseif($pl['id']==53)
{
2023-01-10 16:29:32 +00:00
//испепеление [9]
2022-06-06 21:30:34 +00:00
$hpmin = 52;
}elseif($pl['id']==54)
{
2023-01-10 16:29:32 +00:00
//испепеление [10]
2022-06-06 21:30:34 +00:00
$hpmin = 63;
}elseif($pl['id']==55)
{
2023-01-10 16:29:32 +00:00
//испепеление [11]
2022-06-06 21:30:34 +00:00
$hpmin = 76;
}elseif($pl['id']==56)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [7]
$re = $this->addPriem($uen,$pl['id'],'',0,77,5,$u->info['id'],1,'пожирающеепламя',1,1);
2022-06-06 21:30:34 +00:00
if($re==false)
{
2023-01-10 16:29:32 +00:00
echo '[Er::Пожирающее Пламя[xX]]';
2022-06-06 21:30:34 +00:00
}
}elseif($pl['id']==57)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [8]
$re = $this->addPriem($uen,$pl['id'],'',0,77,5,$u->info['id'],1,'пожирающеепламя2',1,1);
2022-06-06 21:30:34 +00:00
if($re==false)
{
2023-01-10 16:29:32 +00:00
echo '[Er::Пожирающее Пламя[xX]]';
2022-06-06 21:30:34 +00:00
}
}elseif($pl['id']==58)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [9]
$re = $this->addPriem($uen,$pl['id'],'',0,77,5,$u->info['id'],1,'пожирающеепламя',1,1);
2022-06-06 21:30:34 +00:00
if($re==false)
{
2023-01-10 16:29:32 +00:00
echo '[Er::Пожирающее Пламя[xX]]';
2022-06-06 21:30:34 +00:00
}
}elseif($pl['id']==59)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [10]
$re = $this->addPriem($uen,$pl['id'],'',0,77,5,$u->info['id'],1,'пожирающеепламя',1,1);
2022-06-06 21:30:34 +00:00
if($re==false)
{
2023-01-10 16:29:32 +00:00
echo '[Er::Пожирающее Пламя[xX]]';
2022-06-06 21:30:34 +00:00
}
}elseif($pl['id']==60)
{
2023-01-10 16:29:32 +00:00
//Пожирающее пламя [11]
$re = $this->addPriem($uen,$pl['id'],'',0,77,5,$u->info['id'],1,'пожирающеепламя',1,1);
2022-06-06 21:30:34 +00:00
if($re==false)
{
2023-01-10 16:29:32 +00:00
echo '[Er::Пожирающее Пламя[xX]]';
2022-06-06 21:30:34 +00:00
}
}elseif($pl['id']==61)
{
2023-01-10 16:29:32 +00:00
//Тепло Жизни [6]
2022-06-06 21:30:34 +00:00
$krituetli=true;
$hpadd = rand(44,51);
if($ue['id'] == $u->info['id']) {
$dopyrn = $hpadd;
}
}elseif($pl['id']==62)
{
2023-01-10 16:29:32 +00:00
//Тепло Жизни [7]
2022-06-06 21:30:34 +00:00
$krituetli=true;
$hpadd = rand(53,61);
if($ue['id'] == $u->info['id']) {
$dopyrn = $hpadd;
}
}elseif($pl['id']==63)
{
2023-01-10 16:29:32 +00:00
//Тепло Жизни [8]
2022-06-06 21:30:34 +00:00
$krituetli=true;
$hpadd = rand(64,73);
if($ue['id'] == $u->info['id']) {
$dopyrn = $hpadd;
}
}elseif($pl['id']==64)
{
2023-01-10 16:29:32 +00:00
//Тепло Жизни [9]
2022-06-06 21:30:34 +00:00
$krituetli=true;
$hpadd = rand(77,88);
if($ue['id'] == $u->info['id']) {
$dopyrn = $hpadd;
}
}elseif($pl['id']==65)
{
2023-01-10 16:29:32 +00:00
//Тепло Жизни [10]
2022-06-06 21:30:34 +00:00
$krituetli=true;
$hpadd = rand(92,105);
if($ue['id'] == $u->info['id']) {
$dopyrn = $hpadd;
}
}elseif($pl['id']==66)
{
2023-01-10 16:29:32 +00:00
//Тепло Жизни [11]
2022-06-06 21:30:34 +00:00
$krituetli=true;
$hpadd = rand(111,127);
if($ue['id'] == $u->info['id']) {
$dopyrn = $hpadd;
}
}elseif($pl['id']==161 || $pl['id']==162 || $pl['id']==163)
{
2023-01-10 16:29:32 +00:00
//Язык пламени [8]
2022-06-06 21:30:34 +00:00
$hpmin = round($btl->stats[$btl->uids[$ue['id']]]['hpAll']*0.03);
if($hpmin<0)
{
$hpmin = 0;
}
$hpmxx = array(
161 => 204,
162 => 244,
163 => 293
);
2023-01-10 16:29:32 +00:00
//каждая Цель огня +2% мощности
2022-06-06 21:30:34 +00:00
$pwi = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `uid` = "'.$ue['id'].'" AND `v1` = "priem" AND `v2` = "26" AND `delete` = "0" LIMIT 25'));
$pwx = (int)(0+$pwi['x']);
if($pwx>0)
{
$hpmin += round($btl->stats[$btl->uids[$ue['id']]]['hpAll']/100*($pwx*2));
}
if($hpmin>$hpmxx[$pl['id']])
{
$hpmin = $hpmxx[$pl['id']];
}
2023-01-10 16:29:32 +00:00
//Удаляем цели
2022-06-06 21:30:34 +00:00
$pwi['priem'] = mysql_fetch_array(mysql_query('SELECT * FROM `priems` WHERE `id` = "26" LIMIT 1'));
if(isset($pwi['id']))
{
$btl->delPriem($pwi,$btl->users[$btl->uids[$ue['id']]],2);
}
$this->magicAtack($ue,$hpmin,1,$pl,$eff,2,$hpmxx[$pl['id']]);
unset($pwx,$pwi,$hpmin,$hpmxx);
}elseif($pl['id']==165)
{
2023-01-10 16:29:32 +00:00
//Скрытое пламя
2022-06-06 21:30:34 +00:00
$upd = $this->rezadEff($u->info['id'],'wis_fire');
if($upd==false)
{
$cup = true;
}
unset($upd);
}elseif($pl['id']==186)
{
if(round($u->stats['hpAll']/10) < floor($btl->stats[$btl->uids[$u->info['id']]]['mpNow']))
{
$this->magicAtack($btl->users[$btl->uids[$u->info['id']]],round($u->stats['hpAll']/10),1,$pl,$eff,1,0,0,1);
2023-01-10 16:29:32 +00:00
//Восстанавливаем 20% маны
2022-06-06 21:30:34 +00:00
$rg = round($btl->stats[$btl->uids[$u->info['id']]]['mpAll']/5);
$btl->stats[$btl->uids[$u->info['id']]]['mpNow'] += $rg;
if($btl->stats[$btl->uids[$u->info['id']]]['mpNow']>$btl->stats[$btl->uids[$u->info['id']]]['mpAll'])
{
$rg -= floor($btl->stats[$btl->uids[$u->info['id']]]['mpNow']-$btl->stats[$btl->uids[$u->info['id']]]['mpAll']);
$btl->stats[$btl->uids[$u->info['id']]]['mpNow'] = $btl->stats[$btl->uids[$u->info['id']]]['mpAll'];
}
$btl->users[$btl->uids[$u->info['id']]]['mpNow'] = $btl->stats[$btl->uids[$u->info['id']]]['mpNow'];
mysql_query('UPDATE `stats` SET `mpNow` = "'.$btl->users[$btl->uids[$u->info['id']]]['mpNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
2023-01-10 16:29:32 +00:00
//заносим в лог боя
2022-06-06 21:30:34 +00:00
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
if($rg>0)
{
$rg = '+'.$rg;
}else{
$rg = '--';
}
2023-01-10 16:29:32 +00:00
$mas1['text'] = '{tm1} {u1} {1x16x0} заклинание &quot;<b>'.$pl['name'].'</b>&quot; и восстановил магические силы. <b><font color=#006699>'.$rg.'</font></b> ['.floor($btl->stats[$btl->uids[$u->info['id']]]['mpNow']).'/'.$btl->stats[$btl->uids[$u->info['id']]]['mpAll'].'] (Мана)';
2022-06-06 21:30:34 +00:00
$btl->add_log($mas1);
}else{
$cup = true;
}
}
/////
2023-01-10 16:29:32 +00:00
//добавляем НР к цели
2022-06-06 21:30:34 +00:00
if($hpadd>0)
{
if($uen>0 && $btl->stats[$btl->uids[$uen]]['hpNow']>0)
{
$this->magicRegen($ue,$hpadd,1,$pl,$eff,0,0,$krituetli,$dopyrn);
}else{
2023-01-10 16:29:32 +00:00
$cup = true; //не удалось использовать прием
2022-06-06 21:30:34 +00:00
}
}
2023-01-10 16:29:32 +00:00
//отнимаем НР у противника
2022-06-06 21:30:34 +00:00
if($hpmin>0)
{
if($uen>0 && $btl->stats[$btl->uids[$uen]]['hpNow']>0)
{
$this->magicAtack($ue,$hpmin,1,$pl,$eff,0,0,0,0,$krituetli);
}else{
2023-01-10 16:29:32 +00:00
$cup = true; //не удалось использовать прием
2022-06-06 21:30:34 +00:00
}
}
}
?>