From 0a212af11e4c934c6c43443f3fcedd20055e087a Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 30 Apr 2020 04:32:35 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EA=B3=A0=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95,=20=EC=A0=80=EA=B2=A9=20=EC=83=81=ED=96=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/battle_simulator.php | 4 ++++ hwe/j_simulate_battle.php | 9 +++++---- hwe/process_war.php | 6 +++--- hwe/sammo/ActionSpecialWar/che_견고.php | 13 ++++++++++++- hwe/sammo/ActionSpecialWar/che_저격.php | 2 +- hwe/sammo/Command/Nation/che_증축.php | 3 --- hwe/sammo/WarUnitGeneral.php | 2 ++ hwe/sammo/WarUnitTrigger/che_저격발동.php | 2 ++ 8 files changed, 29 insertions(+), 12 deletions(-) diff --git a/hwe/battle_simulator.php b/hwe/battle_simulator.php index 6392663e..113ba8d4 100644 --- a/hwe/battle_simulator.php +++ b/hwe/battle_simulator.php @@ -291,6 +291,7 @@ var defaultSpecialDomestic = ''; 명마 + $cnt): ?> @@ -307,6 +309,7 @@ var defaultSpecialDomestic = ''; 서적 + $cnt): ?> diff --git a/hwe/j_simulate_battle.php b/hwe/j_simulate_battle.php index 0274549c..18900cb3 100644 --- a/hwe/j_simulate_battle.php +++ b/hwe/j_simulate_battle.php @@ -117,10 +117,10 @@ $generalCheck = [ ['personal', array_merge(GameConst::$availablePersonality, GameConst::$optionalPersonality)], ['special2', array_merge(GameConst::$availableSpecialWar, GameConst::$optionalSpecialWar)], ['crewtype', array_keys(GameUnitConst::all())], - ['horse', array_keys(GameConst::$allItems['horse'])], - ['weapon', array_keys(GameConst::$allItems['weapon'])], - ['book', array_keys(GameConst::$allItems['book'])], - ['item', array_keys(GameConst::$allItems['item'])], + ['horse', array_merge(array_keys(GameConst::$allItems['horse']), ['None'])], + ['weapon', array_merge(array_keys(GameConst::$allItems['weapon']), ['None'])], + ['book', array_merge(array_keys(GameConst::$allItems['book']), ['None'])], + ['item', array_merge(array_keys(GameConst::$allItems['item']), ['None'])], ] ]; @@ -371,6 +371,7 @@ $attackerActivatedSkills = []; $defendersActivatedSkills = []; foreach(Util::range($repeatCnt) as $repeatIdx){ + /** @var WarUnit $attacker */ [$attacker, $city, $battleResult, $conquerCity, $attackerRice, $defenderRice] = simulateBattle( $rawAttacker, $rawAttackerCity, $rawAttackerNation, $rawDefenderList, $rawDefenderCity, $rawDefenderNation, diff --git a/hwe/process_war.php b/hwe/process_war.php index 2d3f0d2f..68230cdf 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -424,9 +424,6 @@ function processWar_NG( } - $attacker->finishBattle(); - $defender->finishBattle(); - if($currPhase == $attacker->getMaxPhase()){ //마지막 페이즈의 전투 마무리 $attacker->logBattleResult(); @@ -435,6 +432,9 @@ function processWar_NG( $attacker->tryWound(); $defender->tryWound(); } + + $attacker->finishBattle(); + $defender->finishBattle(); if($defender instanceof WarUnitCity){ $newConflict = $defender->addConflict(); diff --git a/hwe/sammo/ActionSpecialWar/che_견고.php b/hwe/sammo/ActionSpecialWar/che_견고.php index 2b85253b..4ee73eab 100644 --- a/hwe/sammo/ActionSpecialWar/che_견고.php +++ b/hwe/sammo/ActionSpecialWar/che_견고.php @@ -6,13 +6,14 @@ use \sammo\SpecialityHelper; use \sammo\WarUnit; use sammo\WarUnitTriggerCaller; use sammo\BaseWarUnitTrigger; +use sammo\WarUnitTrigger\che_부상무효; use sammo\WarUnitTrigger\WarActivateSkills; class che_견고 extends \sammo\BaseSpecial{ protected $id = 62; protected $name = '견고'; - protected $info = '[전투] 상대 필살 불가, 상대 계략 시도시 성공 확률 -10%p'; + protected $info = '[전투] 상대 필살, 격노, 위압, 저격 불가, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -5%'; static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeight = 1; @@ -20,9 +21,19 @@ class che_견고 extends \sammo\BaseSpecial{ SpecialityHelper::STAT_STRENGTH ]; + public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ + return new WarUnitTriggerCaller( + new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE) + ); + } + public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ return new WarUnitTriggerCaller( new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '필살불가', '위압불가', '격노불가', '계략약화') ); } + + public function getWarPowerMultiplier(WarUnit $unit):array{ + return [1, 0.95]; + } } \ No newline at end of file diff --git a/hwe/sammo/ActionSpecialWar/che_저격.php b/hwe/sammo/ActionSpecialWar/che_저격.php index 96d523c8..d0944ee1 100644 --- a/hwe/sammo/ActionSpecialWar/che_저격.php +++ b/hwe/sammo/ActionSpecialWar/che_저격.php @@ -12,7 +12,7 @@ class che_저격 extends \sammo\BaseSpecial{ protected $id = 70; protected $name = '저격'; - protected $info = '[전투] 전투 개시 시 1/3 확률로 저격 발동'; + protected $info = '[전투] 전투 개시 시 1/3 확률로 저격 발동, 성공 시 사기+10'; static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeight = 1; diff --git a/hwe/sammo/Command/Nation/che_증축.php b/hwe/sammo/Command/Nation/che_증축.php index 684ee547..e4b964f6 100644 --- a/hwe/sammo/Command/Nation/che_증축.php +++ b/hwe/sammo/Command/Nation/che_증축.php @@ -96,7 +96,6 @@ class che_증축 extends Command\NationCommand{ $lastTurn = $this->getLastTurn(); $commandName = $this->getName(); if($lastTurn->getCommand() != $commandName || $lastTurn->getArg() !== $this->arg){ - \sammo\LogText('증축', '여기서 걸려?'); $this->setResultTurn(new LastTurn( $commandName, $this->arg, @@ -108,7 +107,6 @@ class che_증축 extends Command\NationCommand{ if($lastTurn->getSeq() < $this->nation['capset']){ //NOTE: 최근에 천도, 증축이 일어났으면 리셋됨 - \sammo\LogText('증축', '으으음?'.$this->nation['capset'].','.$lastTurn->getSeq()); $this->setResultTurn(new LastTurn( $commandName, $this->arg, @@ -119,7 +117,6 @@ class che_증축 extends Command\NationCommand{ } if($lastTurn->getTerm() < $this->getPreReqTurn()){ - \sammo\LogText('증축', '잘된다는데?'); $this->setResultTurn(new LastTurn( $commandName, $this->arg, diff --git a/hwe/sammo/WarUnitGeneral.php b/hwe/sammo/WarUnitGeneral.php index 9196a6e5..319321b0 100644 --- a/hwe/sammo/WarUnitGeneral.php +++ b/hwe/sammo/WarUnitGeneral.php @@ -264,6 +264,8 @@ class WarUnitGeneral extends WarUnit{ return false; } + $this->activateSkill('부상'); + $general->increaseVarWithLimit('injury', Util::randRangeInt(10, 80), null, 80); $this->getLogger()->pushGeneralActionLog("전투중 부상당했다!", ActionLogger::PLAIN); diff --git a/hwe/sammo/WarUnitTrigger/che_저격발동.php b/hwe/sammo/WarUnitTrigger/che_저격발동.php index a1c0eed0..b21b3d88 100644 --- a/hwe/sammo/WarUnitTrigger/che_저격발동.php +++ b/hwe/sammo/WarUnitTrigger/che_저격발동.php @@ -8,6 +8,7 @@ use sammo\GameUnitDetail; use sammo\Util; use sammo\ObjectTrigger; use sammo\ActionLogger; +use sammo\GameConst; class che_저격발동 extends BaseWarUnitTrigger{ protected $priority = ObjectTrigger::PRIORITY_POST + 100; @@ -29,6 +30,7 @@ class che_저격발동 extends BaseWarUnitTrigger{ $self->getLogger()->pushGeneralActionLog("상대에게 저격당했다!", ActionLogger::PLAIN); $self->getLogger()->pushGeneralBattleDetailLog("상대에게 저격당했다!", ActionLogger::PLAIN); + $general->increaseVarWithLimit('atmos', 10, GameConst::$maxAtmosByWar); $general->increaseVarWithLimit('injury', Util::randRangeInt($opposeEnv['woundMin'], $opposeEnv['woundMax']), null, 80); $this->processConsumableItem();