숙련도에 훈련과 사기 적용

This commit is contained in:
2018-02-20 15:24:25 +09:00
committed by Hide_D
parent ae883353b3
commit dd7007461c
3 changed files with 19 additions and 15 deletions
+2 -1
View File
@@ -1080,11 +1080,12 @@ function getGenDex($general, $type) {
return $general["dex{$type}"];
}
function addGenDex($connect, $no, $type, $exp) {
function addGenDex($connect, $no, $atmos, $train, $type, $exp) {
$type = floor($type / 10) * 10;
$dexType = "dex{$type}";
if($type == 30) { $exp = round($exp * 0.90); } //귀병은 90%효율
elseif($type == 40) { $exp = round($exp * 0.90); } //차병은 90%효율
$exp = $exp * ($atmos+$train)/200; // 사기 + 훈련 / 200
$query = "update general set {$dexType}={$dexType}+{$exp} where no='$no'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");