diff --git a/hwe/func.php b/hwe/func.php index 4a3d7812..ef0c2a97 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -2706,6 +2706,19 @@ function CharExperience($exp, $personal) { return $exp; } +function getCharExpMultiplier($personal):float{ + static $table = [ + 0 => 1.1, + 1 => 1.1, + 4 => 0.9, + 5 => 0.9, + 6 => 1.1, + 7 => 0.9, + 10 => 0.9 + ]; + return $table[$personal] ?? 1; +} + function CharDedication($ded, $personal) { switch($personal) { case 10: @@ -2716,6 +2729,13 @@ function CharDedication($ded, $personal) { return $ded; } +function getCharDedMultiplier($personal):float{ + static $table = [ + 10 => 0.9 + ]; + return $table[$personal] ?? 1; +} + function CharAtmos($atmos, $personal) { switch($personal) { case 2: case 4: diff --git a/src/sammo/Util.php b/src/sammo/Util.php index a914e38f..47aa294d 100644 --- a/src/sammo/Util.php +++ b/src/sammo/Util.php @@ -12,6 +12,14 @@ class Util extends \utilphp\util return intval(round($value)); } + /** + * int 값으로 강제로 설정하는 부동소수점 반올림 + * @param int|float $value + */ + public static function setRound(&$value) : void{ + $value = static::round($value); + } + private static function _parseReq($value, string $type) { if (is_array($value)) {