2023-03-31 18:42:06 +00:00
|
|
|
|
<?php
|
2022-06-06 21:30:34 +00:00
|
|
|
|
if(!defined('GAME'))
|
|
|
|
|
{
|
|
|
|
|
die();
|
|
|
|
|
}
|
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['id'] == 214)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//Божественная аура
|
|
|
|
|
$re = $this->addPriem($u->info['id'],$pl['id'],-1,0,77,3,$u->info['id'],1,'божественнаяаура',7,1);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}elseif($pl['id']>=175 && $pl['id']<=179)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//Силовое поле
|
|
|
|
|
$re = $this->addPriem($u->info['id'],$pl['id'],-1,0,77,-2,$u->info['id'],1,'силовоеполе',7,1);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}elseif($pl['id']==24)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//Медитация
|
|
|
|
|
//Восстанавливаем 10% маны
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$rg = round($btl->stats[$btl->uids[$u->info['id']]]['mpAll']/10);
|
|
|
|
|
$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'];
|
|
|
|
|
}
|
|
|
|
|
$u->info['mpNow'] = $btl->stats[$btl->uids[$u->info['id']]]['mpNow'];
|
|
|
|
|
$u->stats['mpNow'] = $btl->stats[$btl->uids[$u->info['id']]]['mpNow'];
|
|
|
|
|
$btl->users[$btl->uids[$u->info['id']]]['mpNow'] = $btl->stats[$btl->uids[$u->info['id']]]['mpNow'];
|
|
|
|
|
mysql_query('UPDATE `stats` SET `mpNow` = "'.$btl->stats[$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+1),'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} заклинание "<b>'.$pl['name'].'</b>" и восстановил магические силы. <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);
|
|
|
|
|
}elseif($pl['id']==154){
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//Магический луч [4]
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$hpmin = 40;
|
|
|
|
|
}elseif($pl['id']==155){
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//Магический луч [7]
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$hpmin = 55;
|
|
|
|
|
}elseif($pl['id']==156){
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//Магический луч [8]
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$hpmin = 60;
|
|
|
|
|
}elseif($pl['id']==157){
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//Магический луч [9]
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$hpmin = 65;
|
|
|
|
|
}elseif($pl['id']==158){
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//Магический луч [10]
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$hpmin = 70;
|
|
|
|
|
}elseif($pl['id']==159){
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//Магический луч [11]
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$hpmin = 75;
|
|
|
|
|
}elseif($pl['id']==160){
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//Силовой луч [7]
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$hpmin = $u->stats['s5'];
|
|
|
|
|
}elseif($pl['id']>=194 && $pl['id']<=197)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//магический барьер
|
|
|
|
|
$re = $this->addPriem($u->info['id'],$pl['id'],-1,0,77,-2,$u->info['id'],1,'магичческийбарьер',7,1);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}elseif($pl['id']==206)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//магический барьер
|
|
|
|
|
$re = $this->addPriem($u->info['id'],$pl['id'],-1,0,77,-2,$u->info['id'],1,'магичческийбарьер',7,1);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}elseif($pl['id']==207)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//магический барьер
|
|
|
|
|
$re = $this->addPriem($u->info['id'],$pl['id'],-1,0,77,-2,$u->info['id'],1,'магичческийбарьер',7,1);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}elseif($pl['id']==208)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//магический барьер
|
|
|
|
|
$re = $this->addPriem($u->info['id'],$pl['id'],-1,0,77,-2,$u->info['id'],1,'магичческийбарьер',7,1);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}elseif($pl['id']==209)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//магический барьер
|
|
|
|
|
$re = $this->addPriem($u->info['id'],$pl['id'],-1,0,77,-2,$u->info['id'],1,'магичческийбарьер',7,1);
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}elseif($pl['id']==210)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
//магический барьер
|
|
|
|
|
$re = $this->addPriem($u->info['id'],$pl['id'],-1,0,77,-2,$u->info['id'],1,'магичческийбарьер',7,1);
|
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,7,$pl,$eff);
|
|
|
|
|
}else{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$cup = true; //не удалось использовать прием
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|