57 lines
1.8 KiB
PHP
57 lines
1.8 KiB
PHP
<?
|
|
if(!defined('GAME')) {
|
|
die();
|
|
}
|
|
/*
|
|
Ïðèåì: Âîëÿ ê ïîáåäå 5*(ëâë) + 7 ÍÐ , ýôôåêò óâåëè÷åí íà 25% , åñëè ÍÐ íèæå 33%
|
|
Èãðîê âîññòàíàâëèâàåò 2-5ÍÐ
|
|
*/
|
|
$pvr = array();
|
|
//Äåéñòâèå ïðè êëèêå
|
|
|
|
$pvr['hp'] = round( (5 * $btl->users[$btl->uids[$u->info['id']]]['level']) + 7 );
|
|
if( floor($btl->stats[$btl->uids[$u->info['id']]]['hpNow']) < round($btl->stats[$btl->uids[$u->info['id']]]['hpAll']*0.33) ) {
|
|
$pvr['hp'] += round($pvr['hp']*0.25);
|
|
}
|
|
$pvr['hp'] = $btl->hphe( $u->info['id'] , $pvr['hp'] , true );
|
|
$pvr['hpSee'] = '--';
|
|
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u->info['id']]]['hpNow']);
|
|
$pvr['hpAll'] = $btl->stats[$btl->uids[$u->info['id']]]['hpAll'];
|
|
|
|
$pvr['hpTr'] = $pvr['hpAll'] - $pvr['hpNow'];
|
|
if( $pvr['hpTr'] > 0 ) {
|
|
//Òðåáóåòñÿ õèëë
|
|
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->info['hpNow'] = $pvr['hpNow'];
|
|
$u->stats['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 `last_hp` = "'.$btl->users[$btl->uids[$u->info['id']]]['last_hp'].'",`hpNow` = "'.$u->info['hpNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|
|
|
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],
|
|
'Âîëÿ ê ïîáåäå',
|
|
'{tm1} '.$btl->addlt(1 , 17 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL).' <font Color=#006699><b>'.$pvr['hpSee'].'</b></font> ['.$pvr['hpNow'].'/'.$pvr['hpAll'].']',
|
|
($btl->hodID)
|
|
);
|
|
|
|
//Îòíèìàåì òàêòèêè
|
|
$this->mintr($pl);
|
|
|
|
unset($pvr);
|
|
?>
|