game/_incl_data/class/priem/12.php

46 lines
1.4 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
Прием: Подлый удар 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'] = 5*$u->info['level'];
$pvr['hpSee'] = '--';
$pvr['hpNow'] = floor($btl->stats[$btl->uids[$u->info['enemy']]]['hpNow']);
$pvr['hpAll'] = $btl->stats[$btl->uids[$u->info['enemy']]]['hpAll'];
2023-01-10 16:29:32 +00:00
//Используем проверку на урон приемов
2022-06-06 21:30:34 +00:00
$pvr['hp'] = $btl->testYronPriem( $u->info['id'], $u->info['enemy'], 12, $pvr['hp'], -1, true );
$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->takeYronNow($u->info['id'],$pvr['hp']);
$btl->stats[$btl->uids[$u->info['enemy']]]['hpNow'] = $pvr['hpNow'];
mysql_query('UPDATE `stats` SET `hpNow` = "'.$btl->stats[$btl->uids[$u->info['enemy']]]['hpNow'].'" WHERE `id` = "'.$u->info['enemy'].'" LIMIT 1');
$prv['text'] = $btl->addlt(1 , 17 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL);
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],
2023-01-10 16:29:32 +00:00
'Подлый удар',
'{tm1} '.$prv['text'].' на {u2}. <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
$this->mintr($pl);
unset($pvr);
?>