game/_incl_data/class/Priem/134.php

169 lines
5.5 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();
}
/*
2023-01-10 16:29:32 +00:00
Прием: Дух Природы [8]
2022-06-06 21:30:34 +00:00
*/
$pvr = array();
2023-01-10 16:29:32 +00:00
//Действие при клике
2022-06-06 21:30:34 +00:00
if( isset($pr_momental_this)) {
$fx_moment = function( $uid, $enemy, $j_id, $yron, $profil, $inlog ) {
return round($yron);
};
}elseif( isset($pr_tested_this) ) {
$fx_priem = function( $id , $at , $uid, $j_id ) {
return $at;
};
unset( $pr_used_this );
}elseif( isset($pr_used_this) && isset($pr_moment) ) {
$fx_priem = function( $id , $at , $uid, $j_id ) {
return $at;
};
unset( $pr_used_this );
}else{
2022-12-19 18:26:14 +00:00
$pvr['hp_0'] = 30;
$pvr['hp_1'] = 50;
2022-06-06 21:30:34 +00:00
//
$pvr['hp'] = floor($pvr['hp_1']);
2023-01-10 16:29:32 +00:00
$pvr['hp'] = $this->magatack( $u->info['id'], $u->info['id'], $pvr['hp'], 'земля', 0 );
2022-06-06 21:30:34 +00:00
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];
//
$pvr['hpSee'] = 0;
$pvr['hpNow'] = floor($u->stats['hpNow']);
$pvr['hpAll'] = $u->stats['hpAll'];
$pvr['hpTr'] = $pvr['hpAll'] - $pvr['hpNow'];
$pvr['hp'] = $btl->hphe( $u->info['id'] , $pvr['hp'] );
if( $pvr['hpTr'] > 0 ) {
2023-01-10 16:29:32 +00:00
//Требуется хилл
2022-06-06 21:30:34 +00:00
if( $pvr['hpTr'] < $pvr['hp'] ) {
$pvr['hp'] = $pvr['hpTr'];
}
$pvr['hpSee'] = '+'.$pvr['hp'];
$pvr['hpNow'] += $pvr['hp'];
}
if( $pvr['hpNow'] > $pvr['hpAll'] ) {
$pvr['hpNow'] = $pvr['hpAll'];
}elseif( $pvr['hpNow'] < 0 ) {
$pvr['hpNow'] = 0;
}
//
//$btl->users[$btl->uids[$u->info['id']]]['last_hp'] = $pvr['hp'];
//
$u->stats['hpNow'] = $pvr['hpNow'];
$u->info['hpNow'] = $pvr['hpNow'];
$btl->stats[$btl->uids[$u->info['id']]]['hpNow'] = $pvr['hpNow'];
$btl->users[$btl->uids[$u->info['id']]]['hpNow'] = $pvr['hpNow'];
$btl->priemYronSave($u->info['id'],$this->ue['id'],$pvr['hp'],0);
mysql_query('UPDATE `stats` SET `hpNow` = "'.$u->stats['hpNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
//
2023-01-10 16:29:32 +00:00
//Цвет приема
2022-06-06 21:30:34 +00:00
if( $pvr['promah'] == false ) {
if( $pvr['krit'] == false ) {
$pvr['color2'] = '006699';
2023-01-10 16:29:32 +00:00
if(isset($btl->mcolor[$btl->mname['земля']])) {
$pvr['color2'] = $btl->mcolor[$btl->mname['земля']];
2022-06-06 21:30:34 +00:00
}
$pvr['color'] = '000000';
2023-01-10 16:29:32 +00:00
if(isset($btl->mncolor[$btl->mname['вода']])) {
$pvr['color'] = $btl->mncolor[$btl->mname['земля']];
2022-06-06 21:30:34 +00:00
}
}else{
$pvr['color2'] = 'FF0000';
$pvr['color'] = 'FF0000';
}
}else{
$pvr['color2'] = '909090';
$pvr['color'] = '909090';
}
//
2023-01-10 16:29:32 +00:00
$btl->priemAddLogFast( $u->info['id'], 0, "<font color^^^^#".$pvr['color2'].">Дух Природы [8]</font>",
'{tm1} '.$btl->addlt(1 , 21 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL).' на себя. <font Color=#006699><b>'.$pvr['hpSee'].'</b></font> ['.$pvr['hpNow'].'/'.$pvr['hpAll'].']',
2022-06-06 21:30:34 +00:00
1, time() );
//
$pvr['uen'] = $this->ue['id'];
$pvr['rx'] = 8;
$pvr['xx'] = 0;
$pvr['ix'] = 0;
while( $pvr['ix'] < count($btl->users) ) {
if( $btl->stats[$pvr['ix']]['hpNow'] >= 1 && $btl->users[$pvr['ix']]['team'] == $u->info['team'] && $pvr['xx'] < $pvr['rx'] && $pvr['uen'] != $btl->users[$pvr['ix']]['id'] ) {
//
$pvr['uid'] = $btl->users[$pvr['ix']]['id'];
$pvr['hp'] = floor($pvr['hp_0']);
2023-01-10 16:29:32 +00:00
$pvr['hp'] = $this->magatack( $u->info['id'], $pvr['uid'], $pvr['hp'], 'земля', 0 );
2022-06-06 21:30:34 +00:00
$pvr['promah_type'] = $pvr['hp'][3];
$pvr['promah'] = $pvr['hp'][2];
$pvr['krit'] = $pvr['hp'][1];
$pvr['hp'] = $pvr['hp'][0];
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$pvr['uid']]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$pvr['uid']]]['hpAll'];
//
//
$pvr['hpTr'] = $pvr['hpAll'] - $pvr['hpNow'];
$pvr['hp'] = $btl->hphe( $pvr['uid'] , $pvr['hp'] );
if( $pvr['hpTr'] > 0 ) {
2023-01-10 16:29:32 +00:00
//Требуется хилл
2022-06-06 21:30:34 +00:00
if( $pvr['hpTr'] < $pvr['hp'] ) {
$pvr['hp'] = $pvr['hpTr'];
}
$pvr['hpSee'] = '+'.$pvr['hp'];
$pvr['hpNow'] += $pvr['hp'];
}
if( $pvr['hpNow'] > $pvr['hpAll'] ) {
$pvr['hpNow'] = $pvr['hpAll'];
}elseif( $pvr['hpNow'] < 0 ) {
$pvr['hpNow'] = 0;
}
//
$btl->stats[$btl->uids[$pvr['uid']]]['hpNow'] = $pvr['hpNow'];
$btl->users[$btl->uids[$pvr['uid']]]['hpNow'] = $pvr['hpNow'];
mysql_query('UPDATE `stats` SET `hpNow` = "'.$btl->users[$btl->uids[$pvr['uid']]]['hpNow'].'" WHERE `id` = "'.$pvr['uid'].'" LIMIT 1');
//
2023-01-10 16:29:32 +00:00
//Цвет приема
2022-06-06 21:30:34 +00:00
if( $pvr['promah'] == false ) {
if( $pvr['krit'] == false ) {
$pvr['color2'] = '006699';
2023-01-10 16:29:32 +00:00
if(isset($btl->mcolor[$btl->mname['земля']])) {
$pvr['color2'] = $btl->mcolor[$btl->mname['земля']];
2022-06-06 21:30:34 +00:00
}
$pvr['color'] = '000000';
2023-01-10 16:29:32 +00:00
if(isset($btl->mncolor[$btl->mname['вода']])) {
$pvr['color'] = $btl->mncolor[$btl->mname['земля']];
2022-06-06 21:30:34 +00:00
}
}else{
$pvr['color2'] = 'FF0000';
$pvr['color'] = 'FF0000';
}
}else{
$pvr['color2'] = '909090';
$pvr['color'] = '909090';
}
//
2023-01-10 16:29:32 +00:00
$btl->priemAddLogFast( $u->info['id'], $pvr['uid'], "<font color^^^^#".$pvr['color2'].">Дух Природы [8]</font>",
2022-06-06 21:30:34 +00:00
'{tm1} '.$btl->addlt(1 , 19 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL).'. <font Color=#006699><b>'.$pvr['hpSee'].'</b></font> ['.$pvr['hpNow'].'/'.$pvr['hpAll'].']',
1, time() );
//
$pvr['xx']++;
}
$pvr['ix']++;
}
//
2023-01-10 16:29:32 +00:00
echo '<font color=red><b>Вы успешно использовали прием &quot;Дух Природы [8]&quot;</b></font>';
2022-06-06 21:30:34 +00:00
//$this->addEffPr($pl,$id);
$this->mintr($pl);
}
unset($pvr);
?>