game/_incl_data/class/priem/281.php

120 lines
3.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
Прием: Жертва Воде
Маг теряет 10% НР на протяжении 5 ходов, но заклятия стоят на 50% дешевле
2022-06-06 21:30:34 +00:00
*/
$pvr = array();
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 ) {
2023-01-10 16:29:32 +00:00
// -- начало приема
2022-06-06 21:30:34 +00:00
global $u, $btl;
2023-01-10 16:29:32 +00:00
$prv['color2'] = $btl->mcolor[$btl->mname['вода']];
2022-06-06 21:30:34 +00:00
//
2023-01-10 16:29:32 +00:00
//Параметры приема
2022-06-06 21:30:34 +00:00
$pvr['used'] = 0;
//
$uid1 = $btl->atacks[$id]['uid1'];
$uid2 = $btl->atacks[$id]['uid2'];
if( $uid == $uid2 ) {
$a = 1;
$b = 2;
2023-11-05 02:46:07 +00:00
$u1 = $uid1;
$u2 = $uid2;
2022-06-06 21:30:34 +00:00
}elseif( $uid == $uid1 ) {
$a = 2;
$b = 1;
2023-11-05 02:46:07 +00:00
$u1 = $uid2;
$u2 = $uid1;
2022-06-06 21:30:34 +00:00
}
if( isset($at['p'][$a]['priems']['kill'][$uid][$j_id]) ) {
//mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'" WHERE `id` = "'.$btl->stats[$btl->uids[$uid]]['u_priem'][$j_id][3].'" AND `uid` = "'.$uid.'" LIMIT 1');
unset($btl->stats[$btl->uids[$uid]]['u_priem'][$j_id]);
}
//
2023-01-10 16:29:32 +00:00
// -- конец приема
2022-06-06 21:30:34 +00:00
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 );
//}elseif( isset($pr_used_this) && !isset($btl->info['id']) ) {
}elseif( isset($pr_used_this) ) {
$fx_priem = function( $id , $at , $uid, $j_id ) {
2023-01-10 16:29:32 +00:00
// -- начало приема
2022-06-06 21:30:34 +00:00
global $u, $btl;
2023-01-10 16:29:32 +00:00
$prv['color2'] = $btl->mcolor[$btl->mname['вода']];
2022-06-06 21:30:34 +00:00
//
2023-01-10 16:29:32 +00:00
//Параметры приема
2022-06-06 21:30:34 +00:00
$pvr['used'] = 0;
//
$uid1 = $btl->atacks[$id]['uid1'];
$uid2 = $btl->atacks[$id]['uid2'];
if( $uid == $uid2 ) {
$a = 1;
$b = 2;
2023-11-05 02:46:07 +00:00
$u1 = $uid1;
$u2 = $uid2;
2022-06-06 21:30:34 +00:00
}elseif( $uid == $uid1 ) {
$a = 2;
$b = 1;
2023-11-05 02:46:07 +00:00
$u1 = $uid2;
$u2 = $uid1;
2022-06-06 21:30:34 +00:00
}
if( $a > 0 ) {
$pvr['hp'] = floor($btl->stats[$btl->uids[$u2]]['hpAll']/50);
if( $pvr['hp'] < 0 ) {
$pvr['hp'] = 0;
}
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u2]]['hpNow']);
$pvr['hpAll'] = floor($btl->stats[$btl->uids[$u2]]['hpAll']);
$pvr['hpNow'] -= $pvr['hp'];
//
2023-01-10 16:29:32 +00:00
//Используем проверку на урон приемов
2022-06-06 21:30:34 +00:00
$pvr['hp'] = $btl->testYronPriem( $u1, $u2, 12, $pvr['hp'], 7, true );
//
if( $pvr['hpNow'] < 0 ) {
$pvr['hpNow'] = 0;
}elseif( $pvr['hpNow'] > $pvr['hpAll'] ) {
$pvr['hpNow'] = $pvr['hpAll'];
}
if( $pvr['hp'] > 0 ) {
$pvr['hpSee'] = '-'.$pvr['hp'];
}
$btl->stats[$btl->uids[$u2]]['hpNow'] = $pvr['hpNow'];
mysql_query('UPDATE `stats` SET `hpNow` = "'.$btl->stats[$btl->uids[$u2]]['hpNow'].'" WHERE `id` = "'.$u2.'" LIMIT 1');
$btl->priemAddLog( $id, $a, $b, $u2, $u1,
2023-01-10 16:29:32 +00:00
"Жертва Воде",
"{tm1} {u1} утратил здоровье от эффекта &quot;{pr}&quot;. <font color^^^^#006699><b>".$pvr['hpSee']."</b></font> [".$pvr['hpNow']."/".$pvr['hpAll']."] ",
2022-06-06 21:30:34 +00:00
($btl->hodID + 1) );
}
2023-01-10 16:29:32 +00:00
// -- конец приема
2022-06-06 21:30:34 +00:00
return $at;
};
unset( $pr_used_this );
}else{
2023-01-10 16:29:32 +00:00
$prv['color2'] = $btl->mcolor[$btl->mname['вода']];
//Действие при клике
2022-06-06 21:30:34 +00:00
$this->addEffPr($pl,$id);
$prv['text'] = '{tm1} '.$btl->addlt(1 , 21 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL).'.';
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['id'],
2023-01-10 16:29:32 +00:00
'<font color^^^^#'.$prv['color2'].'>Жертва Воде</font>',
2022-06-06 21:30:34 +00:00
$prv['text'],
($btl->hodID + 1)
);
}
unset($pvr);
?>