2023-03-31 18:42:06 +00:00
|
|
|
|
<?php
|
2022-06-06 21:30:34 +00:00
|
|
|
|
if(!defined('GAME'))
|
|
|
|
|
{
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($e['bm_a1']=='itm286' && $end > 0)
|
|
|
|
|
{
|
|
|
|
|
$hpmin = $this->atacks[$end]['uid_'.$uid1.'_t1']+$this->atacks[$end]['uid_'.$uid1.'_t4']+$this->atacks[$end]['uid_'.$uid1.'_t5'];
|
|
|
|
|
if(rand(0,10000)<3500 && $hpmin > 0)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//наносим урон магическим кольцом
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$hpmin = rand(5,8);
|
|
|
|
|
$hpmin += round($this->stats[$this->uids[$uid1]]['mg1']*1.35);
|
2022-12-19 20:16:24 +00:00
|
|
|
|
//$hpmin = $priem->testPower($this->stats[$this->uids[$uid1]],$this->stats[$this->uids[$uid2]],$hpmin,1,2);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
//
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$hpmin = $priem->magatack($uid1,$uid2,$hpmin,'огонь',false);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$hpmin = $hpmin[0];
|
|
|
|
|
//
|
|
|
|
|
$hpmin = floor(1+$hpmin);
|
|
|
|
|
if($hpmin < 0) { $hpmin = 0; }
|
|
|
|
|
$hp2 = $this->stats[$this->uids[$uid2]]['hpNow'];
|
|
|
|
|
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//расчет урона стихий
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
|
|
|
|
$hp2 -= $hpmin;
|
|
|
|
|
if($hp2<0)
|
|
|
|
|
{
|
|
|
|
|
$hp2 = 0;
|
|
|
|
|
}elseif($hp2>$this->stats[$this->uids[$uid2]]['hpNow'])
|
|
|
|
|
{
|
|
|
|
|
$hp2 = $this->stats[$this->uids[$uid2]]['hpNow'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->takeExp($u->info['id'],$hpmin,$uid1,$uid2);
|
|
|
|
|
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//отнимаем НР
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$this->users[$this->uids[$uid2]]['hpNow'] = $hp2;
|
|
|
|
|
$this->stats[$this->uids[$uid2]]['hpNow'] = $hp2;
|
|
|
|
|
mysql_query('UPDATE `stats` SET `hpNow` = '.$hp2.' WHERE `id` = "'.$uid2.'" LIMIT 1');
|
|
|
|
|
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//заносим в лог боя
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$vLog = 'time1='.time().'||s1='.$this->users[$this->uids[$uid1]]['sex'].'||t1='.$this->users[$this->uids[$uid1]]['team'].'||login1='.$this->users[$this->uids[$uid1]]['login'].'||s2='.$this->users[$this->uids[$uid2]]['sex'].'||t2='.$this->users[$this->uids[$uid2]]['team'].'||login2='.$this->users[$this->uids[$uid2]]['login'].'';
|
|
|
|
|
$mas1 = array('time'=>time(),'battle'=>$this->info['id'],'id_hod'=>($this->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
|
|
|
|
|
if($hpmin>0)
|
|
|
|
|
{
|
|
|
|
|
$hpmin = '-'.$hpmin;
|
|
|
|
|
}else{
|
|
|
|
|
$hpmin = '--';
|
|
|
|
|
}
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$mas1['text'] = '{tm1} {u2} получил повреждение от магического предмета "<b>'.$itm['name'].'</b>". <b title=Тип урона: огненный ><font color=#A00000>'.$hpmin.'</font></b> ['.ceil($hp2).'/'.$this->stats[$this->uids[$uid2]]['hpAll'].']';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$this->add_log($mas1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|