From 286939dc2c68fe71cc7f3c8bcbeda80f5e76678f Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 18 Aug 2018 14:02:53 +0900 Subject: [PATCH] =?UTF-8?q?CriticalScore2,=20getCrew=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/process_war.ng.php | 15 --------------- hwe/sammo/WarUnit.php | 22 ++++++++++++---------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/hwe/process_war.ng.php b/hwe/process_war.ng.php index bdaafb21..c4713ebe 100644 --- a/hwe/process_war.ng.php +++ b/hwe/process_war.ng.php @@ -200,21 +200,6 @@ function processWar_NG( } - -function CriticalScore2($score) { - return Util::round($score * Util::randRange(1.3, 2.0)); -} - -//0 0 : 100 100 이면 최고 무한대 차이 -//30 30 : 100 100 이면 최고 3.3배 차이 -//60 60 : 100 100 이면 최고 1.6배 차이 -function getCrew($crew, $youatmos, $mytrain) { - $ratio = $youatmos / $mytrain; - $crew = $crew * $ratio; - - return $crew; -} - function getCrewtypeRice($crewtype, $tech) { $cost = $crewtype->rice / 10; return $cost * getTechCost($tech); diff --git a/hwe/sammo/WarUnit.php b/hwe/sammo/WarUnit.php index de7ecea0..aac822e3 100644 --- a/hwe/sammo/WarUnit.php +++ b/hwe/sammo/WarUnit.php @@ -114,16 +114,14 @@ class WarUnit{ $warPower = rand(90, 100); } - $warPower = getCrew( - $warPower, - CharAtmos( - $this->getComputedAtmos(), - $this->getCharacter() - ), - CharTrain( - $oppose->getComputedTrain(), - $oppose->getCharacter() - ) + $warPower *= CharAtmos( + $this->getComputedAtmos(), + $this->getCharacter() + ); + + $warPower /= CharTrain( + $oppose->getComputedTrain(), + $oppose->getCharacter() ); $genDexAtt = getGenDex($this->getRaw(), $this->getCrewType()->id); @@ -225,6 +223,10 @@ class WarUnit{ } + function criticalDamage():float{ + //전특, 병종에 따라 필살 데미지가 달라질지도 모르므로 static 함수는 아닌 것으로 + return Util::randRange(1.3, 2.0); + } } \ No newline at end of file