|
@@ -45,7 +45,7 @@ class friend
|
|
|
|
|
|
class gain_policy
|
|
|
{
|
|
|
- const max_amount = 10;
|
|
|
+ const max_amount = 5;
|
|
|
|
|
|
private $strength;
|
|
|
private $total_amount;
|
|
@@ -74,19 +74,19 @@ class gain_policy
|
|
|
private function scale()
|
|
|
{
|
|
|
if($this->strength == 5) {
|
|
|
- $start = 0.8;
|
|
|
+ $start = 0.4;
|
|
|
$end = 1.0;
|
|
|
}
|
|
|
elseif ($this->strength == 4) {
|
|
|
- $start = 0.6;
|
|
|
+ $start = 0.3;
|
|
|
$end = 0.8;
|
|
|
}
|
|
|
elseif ($this->strength == 3) {
|
|
|
- $start = 0.4;
|
|
|
+ $start = 0.2;
|
|
|
$end = 0.6;
|
|
|
}
|
|
|
elseif ($this->strength == 2) {
|
|
|
- $start = 0.2;
|
|
|
+ $start = 0.1;
|
|
|
$end = 0.4;
|
|
|
}
|
|
|
elseif ($this->strength == 1) {
|
|
@@ -98,7 +98,7 @@ class gain_policy
|
|
|
}
|
|
|
|
|
|
$start = intval($start * 100 + 0.5);
|
|
|
- $end = intval($end * 100 + 0.5);
|
|
|
+ $end = intval($end * 100 + 0.5);
|
|
|
|
|
|
$ret = mt_rand($start,$end);
|
|
|
return $ret / 100;
|