견고 버그 수정, 저격 상향

This commit is contained in:
2020-04-30 04:32:35 +09:00
parent efffb46281
commit 0a212af11e
8 changed files with 29 additions and 12 deletions
+4
View File
@@ -291,6 +291,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
<span class="input-group-text">명마</span>
</div>
<select class="custom-select form_general_horse">
<option value='None'>-</option>
<?php foreach(GameConst::$allItems['horse'] as $horseID=>$cnt): ?>
<option value="<?=$horseID?>"><?=getItemName($horseID)?></option>
<?php endforeach; ?>
@@ -299,6 +300,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
<span class="input-group-text">무기</span>
</div>
<select class="custom-select form_general_weap">
<option value='None'>-</option>
<?php foreach(GameConst::$allItems['weapon'] as $weaponID=>$cnt): ?>
<option value="<?=$weaponID?>"><?=getItemName($weaponID)?></option>
<?php endforeach; ?>
@@ -307,6 +309,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
<span class="input-group-text">서적</span>
</div>
<select class="custom-select form_general_book">
<option value='None'>-</option>
<?php foreach(GameConst::$allItems['book'] as $bookID=>$cnt): ?>
<option value="<?=$bookID?>"><?=getItemName($bookID)?></option>
<?php endforeach; ?>
@@ -328,6 +331,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
<span class="input-group-text">도구</span>
</div>
<select class="custom-select form_general_item">
<option value='None'>-</option>
<?php foreach(GameConst::$allItems['item'] as $itemID=>$cnt): ?>
<option value="<?=$itemID?>"><?=getItemName($itemID)?></option>
<?php endforeach; ?>
+5 -4
View File
@@ -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,
+3 -3
View File
@@ -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();
+12 -1
View File
@@ -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];
}
}
+1 -1
View File
@@ -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;
-3
View File
@@ -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,
+2
View File
@@ -264,6 +264,8 @@ class WarUnitGeneral extends WarUnit{
return false;
}
$this->activateSkill('부상');
$general->increaseVarWithLimit('injury', Util::randRangeInt(10, 80), null, 80);
$this->getLogger()->pushGeneralActionLog("전투중 <R>부상</>당했다!", ActionLogger::PLAIN);
@@ -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("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN);
$self->getLogger()->pushGeneralBattleDetailLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN);
$general->increaseVarWithLimit('atmos', 10, GameConst::$maxAtmosByWar);
$general->increaseVarWithLimit('injury', Util::randRangeInt($opposeEnv['woundMin'], $opposeEnv['woundMax']), null, 80);
$this->processConsumableItem();