game/_incl_data/class/magic/esfer.php
2022-06-07 00:30:34 +03:00

40 lines
1.0 KiB
PHP

<?
if(!defined('GAME'))
{
die();
}
if( $itm['magic_inci'] == 'esfer' ) {
$pvr = array();
//Äåéñòâèå ïðè êëèêå
if( $u->stats['hpNow'] < 1 ) {
$u->error = '<font color=red><b>Âû ïîãëèáëè è íå ìîæåòå âîñïîëüçîâàòüñÿ ñâèòêîì...</b></font>';
}elseif( isset($btl->info['id']) ) {
if( $btl->info['noinc'] > 0 ) {
$u->error = '<font color=red><b>Áîé áûë èçîëèðîâàí ðàíåå</b></font>';
}else{
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],
'',
'{tm1} {u1} èçîëèðîâàë áîé îò âíåøíåãî ôèçè÷åñêîãî ìèðà... ',
($btl->hodID)
);
$u->error = '<font color=red><b>Ìåðöàþùàÿ ñôåðà îòäåëèëà âñåõ âàñ îò îñòàëüíîãî ìèðà... </b></font>';
mysql_query('UPDATE `battle` SET `noinc` = 1 WHERE `id` = '.$btl->info['id'].' LIMIT 1');
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
}
}else{
$u->error = '<font color=red><b>Ñâèòîê âîçìîæíî èñïîëüçîâàòü òîëüêî â áîþ</b></font>';
}
//Îòíèìàåì òàêòèêè
//$this->mintr($pl);
unset($pvr);
}
?>