From ce2d97a7e75eab016e2f01f05abf03445f66ba15 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 26 Jul 2018 15:39:34 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EC=A0=84=ED=88=AC=20=ED=9A=8C=ED=94=BC=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=94=94=EB=B2=84=EA=B9=85=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/process_war.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hwe/process_war.php b/hwe/process_war.php index 7b4556f6..cf9dca76 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -298,7 +298,8 @@ function processWar($general, $city) { //회피 $ratio = rand() % 100; // 0 ~ 99 $ratio2 = $generalCrewType->avoid; //회피율 - $ratio2 = Util::round($ratio2 * $general['train'] / 100); //훈련 반영 + $ratio2 = Util::round($ratio2 * $general['train'] / 100); //훈련 반영 + LogText('avoid0', [date("Ymd_His"), $generalCrewType->id, $general, $ratio2]); //특기보정 : 궁병 if($general['special2'] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 @@ -1066,7 +1067,8 @@ function processWar($general, $city) { //회피 $ratio = rand() % 100; // 0 ~ 99 $ratio2 = $generalCrewType->avoid; //회피율 - $ratio2 = Util::round($ratio2 * $general['train'] / 100); //훈련 반영 + $ratio2 = Util::round($ratio2 * $general['train'] / 100); //훈련 반영 + LogText('avoid1', [date("Ymd_His"), $generalCrewType->id, $general, $ratio2]); //특기보정 : 돌격, 궁병 if($oppose['special2'] == 60) { $ratio2 -= 100; } if($general['special2'] == 51) { $ratio2 += 20; } @@ -1089,7 +1091,8 @@ function processWar($general, $city) { //회피 $ratio = rand() % 100; // 0 ~ 99 $ratio2 = $opposeCrewType->avoid; //회피율 - $ratio2 = Util::round($ratio2 * $oppose['train'] / 100); //훈련 반영 + $ratio2 = Util::round($ratio2 * $oppose['train'] / 100); //훈련 반영 + LogText('avoid2', [date("Ymd_His"), $opposeCrewType->id, $oppose, $ratio2]); // 특기보정 : 돌격, 궁병 if($general['special2'] == 60) { $ratio2 -= 100; } if($oppose['special2'] == 51) { $ratio2 += 20; } From f8eedaa3ea20009c1bbdc1fe4bc14ce2108d1566 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 26 Jul 2018 15:40:46 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=EC=A0=84=ED=88=AC=20=EB=94=94=EB=B2=84?= =?UTF-8?q?=EA=B7=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/process_war.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hwe/process_war.php b/hwe/process_war.php index cf9dca76..0b6ec839 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -299,7 +299,7 @@ function processWar($general, $city) { $ratio = rand() % 100; // 0 ~ 99 $ratio2 = $generalCrewType->avoid; //회피율 $ratio2 = Util::round($ratio2 * $general['train'] / 100); //훈련 반영 - LogText('avoid0', [date("Ymd_His"), $generalCrewType->id, $general, $ratio2]); + LogText('avoid0', [date("Ymd_His"), $generalCrewType->id, $general['train'], $ratio2]); //특기보정 : 궁병 if($general['special2'] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 @@ -1068,7 +1068,7 @@ function processWar($general, $city) { $ratio = rand() % 100; // 0 ~ 99 $ratio2 = $generalCrewType->avoid; //회피율 $ratio2 = Util::round($ratio2 * $general['train'] / 100); //훈련 반영 - LogText('avoid1', [date("Ymd_His"), $generalCrewType->id, $general, $ratio2]); + LogText('avoid1', [date("Ymd_His"), $generalCrewType->id, $general['train'], $ratio2]); //특기보정 : 돌격, 궁병 if($oppose['special2'] == 60) { $ratio2 -= 100; } if($general['special2'] == 51) { $ratio2 += 20; } @@ -1092,7 +1092,7 @@ function processWar($general, $city) { $ratio = rand() % 100; // 0 ~ 99 $ratio2 = $opposeCrewType->avoid; //회피율 $ratio2 = Util::round($ratio2 * $oppose['train'] / 100); //훈련 반영 - LogText('avoid2', [date("Ymd_His"), $opposeCrewType->id, $oppose, $ratio2]); + LogText('avoid2', [date("Ymd_His"), $opposeCrewType->id, $oppose['train'], $ratio2]); // 특기보정 : 돌격, 궁병 if($general['special2'] == 60) { $ratio2 -= 100; } if($oppose['special2'] == 51) { $ratio2 += 20; } From 0dae71a644249bb6d4ec1ad7471293f730f02f01 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 26 Jul 2018 17:13:27 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=ED=9A=8C=ED=94=BC=20=EB=94=94=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/lib.php | 2 +- hwe/process_war.php | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hwe/lib.php b/hwe/lib.php index 3fa6a8de..455f1b9b 100644 --- a/hwe/lib.php +++ b/hwe/lib.php @@ -54,7 +54,7 @@ function MessageBox($str) function LogText($prefix, $variable) { - $text = sprintf('%s : %s'."\n", $prefix, var_export($variable, true)); + $text = sprintf('%s : %s'."\r\n", $prefix, var_export($variable, true)); file_put_contents(ROOT.'/d_log/dbg_logs.txt', $text, FILE_APPEND); } diff --git a/hwe/process_war.php b/hwe/process_war.php index 0b6ec839..08f2f647 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -299,12 +299,13 @@ function processWar($general, $city) { $ratio = rand() % 100; // 0 ~ 99 $ratio2 = $generalCrewType->avoid; //회피율 $ratio2 = Util::round($ratio2 * $general['train'] / 100); //훈련 반영 - LogText('avoid0', [date("Ymd_His"), $generalCrewType->id, $general['train'], $ratio2]); //특기보정 : 궁병 if($general['special2'] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 if($general['item'] == 26 || $general['item'] == 25) { $ratio2 += 20; } + LogText('avoid0', [date("Ymd_His"), $generalCrewType->id, $general['train'], $ratio2]); if($ratio < $ratio2 && $avoid == 1) { + LogText('avoid0', true); $batlog[] = "회피했다!"; $myCrew /= 5; // 20%만 소모 $avoid = 0; @@ -1068,12 +1069,12 @@ function processWar($general, $city) { $ratio = rand() % 100; // 0 ~ 99 $ratio2 = $generalCrewType->avoid; //회피율 $ratio2 = Util::round($ratio2 * $general['train'] / 100); //훈련 반영 - LogText('avoid1', [date("Ymd_His"), $generalCrewType->id, $general['train'], $ratio2]); //특기보정 : 돌격, 궁병 if($oppose['special2'] == 60) { $ratio2 -= 100; } if($general['special2'] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 if($general['item'] == 26 || $general['item'] == 25) { $ratio2 += 20; } + LogText('avoid1', [date("Ymd_His"), $generalCrewType->id, $general['train'], $ratio2]); if($ratio < $ratio2 && $myAvoid == 1) { // 특기보정 : 격노 if($oppose['special2'] == 74 && rand() % 100 < 50) { @@ -1082,6 +1083,7 @@ function processWar($general, $city) { $myCrew = CriticalScore2($myCrew); $opAvoid = 0; } else { + LogText('avoid1', true); $batlog[] = "회피했다!"; $oppbatlog[] = "●상대가 회피했다!"; $myCrew /= 5; // 20%만 소모 @@ -1092,12 +1094,12 @@ function processWar($general, $city) { $ratio = rand() % 100; // 0 ~ 99 $ratio2 = $opposeCrewType->avoid; //회피율 $ratio2 = Util::round($ratio2 * $oppose['train'] / 100); //훈련 반영 - LogText('avoid2', [date("Ymd_His"), $opposeCrewType->id, $oppose['train'], $ratio2]); // 특기보정 : 돌격, 궁병 if($general['special2'] == 60) { $ratio2 -= 100; } if($oppose['special2'] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 if($oppose['item'] == 26 || $oppose['item'] == 25) { $ratio2 += 20; } + LogText('avoid2', [date("Ymd_His"), $opposeCrewType->id, $oppose['train'], $ratio2]); if($ratio < $ratio2 && $opAvoid == 1) { // 특기보정 : 격노 if($general['special2'] == 74 && rand() % 100 < 33) { @@ -1112,6 +1114,7 @@ function processWar($general, $city) { $opCrew = CriticalScore2($opCrew); $myAvoid = 0; } else { + LogText('avoid2', true); $oppbatlog[] = "회피했다!"; $batlog[] = "●상대가 회피했다!"; $opCrew /= 5; // 20%만 소모