From 279b0cd0c59d5f0705d242e4f8ca3f5d426e9690 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 30 May 2020 03:05:03 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=80=EC=9D=B8=20=EC=82=AC=EC=82=B4,=20?= =?UTF-8?q?=EC=A0=90=EB=A0=B9=EB=A5=A0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/a_bestGeneral.php | 11 +++++++++++ hwe/a_hallOfFame.php | 3 +++ hwe/func.php | 7 +++++++ hwe/sammo/General.php | 2 +- hwe/sammo/WarUnitGeneral.php | 11 +++++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) diff --git a/hwe/a_bestGeneral.php b/hwe/a_bestGeneral.php index 5f555b09..3ea858d9 100644 --- a/hwe/a_bestGeneral.php +++ b/hwe/a_bestGeneral.php @@ -91,6 +91,7 @@ $types = [ } return $v; }], + ["점 령", "int", function($v){$v['value'] = $v['occupied']; return $v; }], ["사 살", "int", function($v){$v['value'] = $v['killcrew']; return $v; }], ["살 상 률", "percent", function($v){ if($v['warnum'] < 10){ @@ -101,6 +102,16 @@ $types = [ } return $v; }], + ["대 인 사 살", "int", function($v){$v['value'] = $v['killcrew_person']; return $v; }], + ["대 인 살 상 률", "percent", function($v){ + if($v['warnum'] < 10){ + $v['value'] = 0; + } + else{ + $v['value'] = $v['killcrew_person'] / max(1, $v['deathcrew_person']); + } + return $v; + }], ["보 병 숙 련 도", "int", function($v){$v['value'] = $v['dex1']; return $v; }], ["궁 병 숙 련 도", "int", function($v){$v['value'] = $v['dex2']; return $v; }], ["기 병 숙 련 도", "int", function($v){$v['value'] = $v['dex3']; return $v; }], diff --git a/hwe/a_hallOfFame.php b/hwe/a_hallOfFame.php index 9064a62d..d9cdb043 100644 --- a/hwe/a_hallOfFame.php +++ b/hwe/a_hallOfFame.php @@ -90,8 +90,11 @@ $types = [ 'warnum'=>['전 투 횟 수', 'int'], 'killnum'=>['승 리', 'int'], 'winrate'=>['승 률', 'percent'], + 'occupied'=>['점 령', 'int'], 'killcrew'=>['사 살', 'int'], 'killrate'=>['살 상 률', 'percent'], + 'killcrew_person'=>['대 인 사 살', 'int'], + 'killrate_person'=>['대 인 살 상 률', 'percent'], 'dex1'=>['보 병 숙 련 도', 'int'], 'dex2'=>['궁 병 숙 련 도', 'int'], 'dex3'=>['기 병 숙 련 도', 'int'], diff --git a/hwe/func.php b/hwe/func.php index 31cc88fb..54dcce78 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1336,8 +1336,11 @@ function CheckHall($no) ["warnum", 'rank'], ["killnum", 'rank'], ["winrate", 'calc'], + ["occupied", 'rank'], ["killcrew", 'rank'], ["killrate", 'calc'], + ["killcrew_person", 'rank'], + ["killrate_person", 'calc'], ["dex1", 'natural'], ["dex2", 'natural'], ["dex3", 'natural'], @@ -1380,6 +1383,9 @@ function CheckHall($no) $kill = $generalObj->getRankVar('killcrew'); $death = Util::valueFit($generalObj->getRankVar('deathcrew'), 1); + $killPerson = $generalObj->getRankVar('killcrew_person'); + $deathPerson = Util::valueFit($generalObj->getRankVar('deathcrew_person'), 1); + $tt = Util::valueFit($ttw + $ttd + $ttl, 1); $tl = Util::valueFit($tlw + $tld + $tll, 1); $ts = Util::valueFit($tsw + $tsd + $tsl, 1); @@ -1393,6 +1399,7 @@ function CheckHall($no) $calcVar['betrate'] = $betWinGold / $betGold; $calcVar['winrate'] = $win / $war; $calcVar['killrate'] = $kill / $death; + $calcVar['killrate_person'] = $killPerson / $deathPerson; if ($generalObj instanceof DummyGeneral) { return; diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index 31b5bf32..5ad93842 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -46,7 +46,7 @@ class General implements iAction{ 'tsw'=>1, 'tsd'=>1, 'tsl'=>1, 'tsg'=>1, 'tsp'=>1, 'tiw'=>1, 'tid'=>1, 'til'=>1, 'tig'=>1, 'tip'=>1, 'betwin'=>1, 'betgold'=>1, 'betwingold'=>1, - 'kill_realcrew'=>1, 'death_realcrew'=>1, + 'killcrew_person'=>1, 'deathcrew_person'=>1, 'occupied'=>1, ]; diff --git a/hwe/sammo/WarUnitGeneral.php b/hwe/sammo/WarUnitGeneral.php index 42f5ea3c..b4930269 100644 --- a/hwe/sammo/WarUnitGeneral.php +++ b/hwe/sammo/WarUnitGeneral.php @@ -118,6 +118,12 @@ class WarUnitGeneral extends WarUnit{ function addWin(){ $general = $this->general; $general->increaseRankVar('killnum', 1); + + $oppose = $this->getOppose(); + if($oppose instanceof WarUnitCity){ + $general->increaseRankVar('occupied', 1); + } + $general->multiplyVarWithLimit('atmos', 1.1, null, GameConst::$maxAtmosByWar); $this->addStatExp(1); @@ -295,6 +301,11 @@ class WarUnitGeneral extends WarUnit{ $general->increaseRankVar('killcrew', $this->killed); $general->increaseRankVar('deathcrew', $this->dead); + + if($this->getOppose() instanceof WarUnitGeneral){ + $general->increaseRankVar('killcrew_person', $this->killed); + $general->increaseRankVar('deathcrew_person', $this->dead); + } $general->updateVar('rice', Util::round($general->getVar('rice'))); $general->updateVar('experience', Util::round($general->getVar('experience')));