diff --git a/hwe/a_npcList.php b/hwe/a_npcList.php index 4dc57359..eb986125 100644 --- a/hwe/a_npcList.php +++ b/hwe/a_npcList.php @@ -73,11 +73,6 @@ $sortType = [ 8 => ['dedication', false], ]; -foreach($generalList as &$general){ - $general['nationName'] = $nationName[$general['nation']]; - $general['coloredName'] = getColoredName($general['name'], $general['npc']); -} - [$sortKey, $isAsc] = $sortType[$type]; if($isAsc){ @@ -108,15 +103,11 @@ else{ 계급 - Lv - + / diff --git a/hwe/battle_simulator.php b/hwe/battle_simulator.php index 01562b90..6392663e 100644 --- a/hwe/battle_simulator.php +++ b/hwe/battle_simulator.php @@ -378,7 +378,7 @@ var defaultSpecialDomestic = '';
보병숙련
- [$dexAmount, $color, $name]): ?> @@ -386,7 +386,7 @@ var defaultSpecialDomestic = '';
궁병숙련
- [$dexAmount, $color, $name]): ?> @@ -394,7 +394,7 @@ var defaultSpecialDomestic = '';
기병숙련
- [$dexAmount, $color, $name]): ?> @@ -404,7 +404,7 @@ var defaultSpecialDomestic = '';
귀병숙련
- [$dexAmount, $color, $name]): ?> @@ -412,7 +412,7 @@ var defaultSpecialDomestic = '';
차병숙련
- [$dexAmount, $color, $name]): ?> diff --git a/hwe/func_gamerule.php b/hwe/func_gamerule.php index 75a984bc..7f68161c 100644 --- a/hwe/func_gamerule.php +++ b/hwe/func_gamerule.php @@ -34,41 +34,6 @@ function getCityLevelList():array{ ]; } -function getGenDex($general, $type) { - //XXX: 지금은 동작하지만.. 병종 구성이 보궁기귀차 에서 바뀌면... - $ntype = GameUnitConst::byId($type)->armType * 10; - return $general["dex{$ntype}"]??0; -} - -function addGenDex($no, $atmos, $train, $type, $exp) { - //XXX: 지금은 동작하지만.. 병종 구성이 보궁기귀차 에서 바뀌면... - $db = DB::db(); - - $armType = GameUnitConst::byId($type)->armType; - if($armType == GameUnitConst::T_CASTLE){ - $armType = GameUnitConst::T_SIEGE; - } - - if($armType < 0){ - return; - } - - $ntype = $armType*10; - $dexType = "dex{$ntype}"; - if($armType == GameUnitConst::T_WIZARD) { - $exp = Util::round($exp * 0.90); - } - else if($armType == GameUnitConst::T_SIEGE) { - $exp = Util::round($exp * 0.90); - } - $exp = Util::round($exp * ($atmos + $train) / 200); // 사기 + 훈련 / 200 - - $db->update('general', [ - $dexType=>$db->sqleval('%b + %i', $dexType, $exp) - ], 'no=%i', $no); -} - - //한국가의 전체 전방 설정 function SetNationFront($nationNo) { if(!$nationNo) { return; } diff --git a/hwe/js/battle_simulator.js b/hwe/js/battle_simulator.js index 0d9196a4..c2feaa7b 100644 --- a/hwe/js/battle_simulator.js +++ b/hwe/js/battle_simulator.js @@ -176,11 +176,11 @@ jQuery(function($){ setVal('.form_atmos', data.atmos); setVal('.form_train', data.train); - setVal('.form_dex0', data.dex1); - setVal('.form_dex10', data.dex2); - setVal('.form_dex20', data.dex3); - setVal('.form_dex30', data.dex4); - setVal('.form_dex40', data.dex5); + setVal('.form_dex1', data.dex1); + setVal('.form_dex2', data.dex2); + setVal('.form_dex3', data.dex3); + setVal('.form_dex4', data.dex4); + setVal('.form_dex5', data.dex5); setVal('.form_defence_train', data.defence_train); if(!setGeneralNo($general, data.no)){ diff --git a/hwe/sammo/General.php b/hwe/sammo/General.php index d1c7b2bf..ae85060f 100644 --- a/hwe/sammo/General.php +++ b/hwe/sammo/General.php @@ -422,6 +422,16 @@ class General implements iAction{ return $this->getStatValue('intel', $withInjury, $withIActionObj, $withStatAdjust, $useFloor); } + function getDex(GameUnitDetail $crewType){ + $armType = $crewType->armType; + + if($armType == GameUnitConst::T_CASTLE){ + $armType = GameUnitConst::T_SIEGE; + } + + return $this->getVar("dex{$armType}"); + } + function addDex(GameUnitDetail $crewType, float $exp, bool $affectTrainAtmos=false){ $armType = $crewType->armType; diff --git a/hwe/sammo/WarUnit.php b/hwe/sammo/WarUnit.php index 8f7f6e4e..08bbdde9 100644 --- a/hwe/sammo/WarUnit.php +++ b/hwe/sammo/WarUnit.php @@ -238,14 +238,14 @@ class WarUnit{ $warPower /= $oppose->getComputedTrain(); if($this instanceof WarUnitGeneral){ - $genDexAtt = getGenDex($this->getRaw(), $this->getCrewType()->id); + $genDexAtt = $general->getDex($this->getCrewType()); } else{ $genDexAtt = ($this->cityRate - 60) * 7200; } if($this instanceof WarUnitGeneral){ - $oppDexDef = getGenDex($oppose->getRaw(), $this->getCrewType()->id); + $oppDexDef = $opposeGeneral->getDex($this->getCrewType()); } else{ $oppDexDef = ($this->cityRate - 60) * 7200;