2022-06-06 21:30:34 +00:00
|
|
|
|
<?
|
|
|
|
|
if(!defined('GAME')) {
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
/*
|
2023-01-10 16:29:32 +00:00
|
|
|
|
Прием: Собрать зубы
|
|
|
|
|
Игрок восстанавливает 2-5НР
|
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
|
|
|
|
|
|
|
|
|
$pvr['hp'] = rand(2,5);
|
|
|
|
|
$pvr['hpSee'] = '--';
|
|
|
|
|
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u->info['id']]]['hpNow']);
|
|
|
|
|
$pvr['hpAll'] = $btl->stats[$btl->uids[$u->info['id']]]['hpAll'];
|
|
|
|
|
|
|
|
|
|
$pvr['hp'] = $btl->hphe( $u->info['id'] , $pvr['hp'] , true );
|
|
|
|
|
|
|
|
|
|
$pvr['hpTr'] = $pvr['hpAll'] - $pvr['hpNow'];
|
|
|
|
|
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->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'],
|
2023-01-10 16:29:32 +00:00
|
|
|
|
'Собрать Зубы',
|
2022-06-06 21:30:34 +00:00
|
|
|
|
'{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)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
unset($pvr);
|
|
|
|
|
?>
|