<?php
##include 'sql.php';
function uron($uron){
$ur2 = floor($uron/3)+$uron;
return $ur2;
}
function rand_uron($uron){
$ur2 = round($uron/2)+$uron;
return $ur2;
}
#echo rand_uron(3).'<br>';
/*
function str_to_uron($str){
$uron = ($str*2)+(($str*2)+($str/2));
return round($uron);
}*/
/* Урон по защите*/
function uron_po_def($uron,$def){
$defense =$def*2;
$ur = ($uron) - $defense;
if($ur<1){
$ur = 1;
}elseif($ur>$uron){
$ur = $uron;
}


return $ur;
}
##echo uron_po_def(18,5);
?>