Squashed commit of the following:
commit3ef363a01eAuthor: hide_d <hided62@gmail.com> Date: Mon Sep 6 02:30:00 2021 +0900 fix: 은퇴 시 숙련 포인트를 지나치게 많이 받는 문제 수정 commit9e68bc90c2Author: hide_d <hided62@gmail.com> Date: Mon Sep 6 02:17:56 2021 +0900 재야에서 도시보기 warning commitd2590607c2Author: hide_d <hided62@gmail.com> Date: Sun Sep 5 23:05:06 2021 +0900 fix: div 0 commit2bce6e4f02Author: hide_d <hided62@gmail.com> Date: Sun Sep 5 23:02:52 2021 +0900 warning 메시지 수정 commite64812da72Author: hide_d <hided62@gmail.com> Date: Sat Sep 4 03:42:09 2021 +0900 fix: m장, 의병장 숙련이 설정되지 않는 버그 수정 commit7cd40fca03Author: hide_d <hided62@gmail.com> Date: Sat Aug 21 16:04:03 2021 +0900 fix: 모병/징병에서 조건 검사부 통솔 계산값 commitd1568a3b2cAuthor: hide_d <hided62@gmail.com> Date: Sat Aug 21 02:50:54 2021 +0900 허보에 수몰이 같이 들어간 버그 수정 commite7dcc84afcAuthor: hide_d <hided62@gmail.com> Date: Thu Aug 19 14:51:50 2021 +0900 REAMDME.md 버전 수정 commit8eaa940d4eAuthor: hide_d <hided62@gmail.com> Date: Wed Aug 18 20:40:37 2021 +0900 Revert "fix: 7.2에서 오동작 버그 수정" This reverts commit9997675b1d. commit9997675b1dAuthor: hide_d <hided62@gmail.com> Date: Wed Aug 18 20:32:47 2021 +0900 fix: 7.2에서 오동작 버그 수정 commit9ef566f11fAuthor: hide_d <hided62@gmail.com> Date: Wed Aug 18 20:26:31 2021 +0900 fix: 아이템중 WarActivateSkill 관련 중첩 해제 버그 수정
This commit is contained in:
@@ -20,9 +20,9 @@
|
|||||||
* `git`
|
* `git`
|
||||||
* `curl`
|
* `curl`
|
||||||
|
|
||||||
Linux는 Ubuntu 18.04, 20.04, Windows는 Windows 10에서 XAMPP, WSL2를 사용한 환경에서 테스트되었습니다.
|
Linux는 Ubuntu 18.04, 20.04, Windows는 WSL2를 사용한 환경에서 테스트되었습니다.
|
||||||
|
|
||||||
Docker를 이용한 설치는 테스트버전만 제공됩니다.
|
Docker를 이용한 설치도 제공하고 있습니다.
|
||||||
|
|
||||||
## Docker를 이용한 설치
|
## Docker를 이용한 설치
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,11 @@ $db = DB::db();
|
|||||||
increaseRefresh("현재도시", 1);
|
increaseRefresh("현재도시", 1);
|
||||||
|
|
||||||
$me = $db->queryFirstRow('SELECT no,nation,officer_level,city from general where owner=%i', $userID);
|
$me = $db->queryFirstRow('SELECT no,nation,officer_level,city from general where owner=%i', $userID);
|
||||||
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation']);
|
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation'])??[
|
||||||
|
'nation'=>0,
|
||||||
|
'level'=>0,
|
||||||
|
'spy'=>''
|
||||||
|
];
|
||||||
|
|
||||||
$templates = new \League\Plates\Engine('templates');
|
$templates = new \League\Plates\Engine('templates');
|
||||||
|
|
||||||
@@ -375,7 +379,7 @@ $genTotal = 0;
|
|||||||
|
|
||||||
|
|
||||||
foreach($generalsFormat as $general){
|
foreach($generalsFormat as $general){
|
||||||
if($general['nation'] == 0){
|
if(!$general['nation'] || !$myNation['nation']){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if($general['nation'] != $myNation['nation']){
|
if($general['nation'] != $myNation['nation']){
|
||||||
|
|||||||
@@ -1150,10 +1150,17 @@ function checkEmperior()
|
|||||||
LogHistory();
|
LogHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetInheritanceUser(int $userID){
|
function resetInheritanceUser(int $userID, bool $isRebirth=false){
|
||||||
|
$rebirthDegraded = [
|
||||||
|
'dex'=>0.5,
|
||||||
|
];
|
||||||
|
|
||||||
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$userID}");
|
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$userID}");
|
||||||
$totalPoint = 0;
|
$totalPoint = 0;
|
||||||
foreach($inheritStor->getAll() as [$value,]){
|
foreach($inheritStor->getAll() as $key=>[$value,]){
|
||||||
|
if(key_exists($key, $rebirthDegraded)){
|
||||||
|
$value *= $rebirthDegraded[$key];
|
||||||
|
}
|
||||||
$totalPoint += $value;
|
$totalPoint += $value;
|
||||||
}
|
}
|
||||||
$totalPoint = Util::toInt($totalPoint);
|
$totalPoint = Util::toInt($totalPoint);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
|
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
use \sammo\GeneralTrigger;
|
use \sammo\GeneralTrigger;
|
||||||
@@ -10,7 +12,8 @@ use sammo\BaseWarUnitTrigger;
|
|||||||
use sammo\WarUnitTrigger\che_부상무효;
|
use sammo\WarUnitTrigger\che_부상무효;
|
||||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||||
|
|
||||||
class che_부적_태현청생부 extends \sammo\BaseItem{
|
class che_부적_태현청생부 extends \sammo\BaseItem
|
||||||
|
{
|
||||||
|
|
||||||
protected $id = 9;
|
protected $id = 9;
|
||||||
protected $rawName = '태현청생부';
|
protected $rawName = '태현청생부';
|
||||||
@@ -19,16 +22,18 @@ class che_부적_태현청생부 extends \sammo\BaseItem{
|
|||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $consumable = false;
|
protected $consumable = false;
|
||||||
|
|
||||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattleInitSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller
|
||||||
|
{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE),
|
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 303),
|
||||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '저격불가')
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 303, false, '저격불가')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller
|
||||||
|
{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '저격불가')
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 303, false, '저격불가')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,7 @@ class event_전투특기_반계 extends \sammo\BaseItem{
|
|||||||
|
|
||||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '계략약화'),
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*401, false, '계략약화'),
|
||||||
new che_반계시도($unit),
|
new che_반계시도($unit),
|
||||||
new che_반계발동($unit)
|
new che_반계발동($unit)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ class che_event_견고 extends \sammo\BaseSpecial{
|
|||||||
|
|
||||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE),
|
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
||||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '저격불가')
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*402, false, '저격불가')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '필살불가', '계략약화', '저격불가')
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*402, false, '필살불가', '계략약화', '저격불가')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo\ActionSpecialDomestic;
|
namespace sammo\ActionSpecialDomestic;
|
||||||
|
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
use \sammo\SpecialityHelper;
|
use \sammo\SpecialityHelper;
|
||||||
@@ -10,7 +12,8 @@ use \sammo\WarUnitTrigger\WarActivateSkills;
|
|||||||
use \sammo\WarUnitTrigger\che_반계시도;
|
use \sammo\WarUnitTrigger\che_반계시도;
|
||||||
use \sammo\WarUnitTrigger\che_반계발동;
|
use \sammo\WarUnitTrigger\che_반계발동;
|
||||||
|
|
||||||
class che_event_반계 extends \sammo\BaseSpecial{
|
class che_event_반계 extends \sammo\BaseSpecial
|
||||||
|
{
|
||||||
|
|
||||||
protected $id = 45;
|
protected $id = 45;
|
||||||
protected $name = '반계';
|
protected $name = '반계';
|
||||||
@@ -22,16 +25,18 @@ class che_event_반계 extends \sammo\BaseSpecial{
|
|||||||
SpecialityHelper::STAT_INTEL,
|
SpecialityHelper::STAT_INTEL,
|
||||||
];
|
];
|
||||||
|
|
||||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
public function onCalcStat(General $general, string $statName, $value, $aux = null)
|
||||||
if($statName === 'warMagicSuccessDamage' && $aux === '반목'){
|
{
|
||||||
|
if ($statName === 'warMagicSuccessDamage' && $aux === '반목') {
|
||||||
return $value + 0.9;
|
return $value + 0.9;
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller
|
||||||
|
{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '계략약화'),
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 403, false, '계략약화'),
|
||||||
new che_반계시도($unit),
|
new che_반계시도($unit),
|
||||||
new che_반계발동($unit)
|
new che_반계발동($unit)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace sammo\ActionSpecialWar;
|
namespace sammo\ActionSpecialWar;
|
||||||
|
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
use \sammo\SpecialityHelper;
|
use \sammo\SpecialityHelper;
|
||||||
@@ -9,7 +11,8 @@ use sammo\BaseWarUnitTrigger;
|
|||||||
use sammo\WarUnitTrigger\che_부상무효;
|
use sammo\WarUnitTrigger\che_부상무효;
|
||||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||||
|
|
||||||
class che_견고 extends \sammo\BaseSpecial{
|
class che_견고 extends \sammo\BaseSpecial
|
||||||
|
{
|
||||||
|
|
||||||
protected $id = 62;
|
protected $id = 62;
|
||||||
protected $name = '견고';
|
protected $name = '견고';
|
||||||
@@ -21,20 +24,23 @@ class che_견고 extends \sammo\BaseSpecial{
|
|||||||
SpecialityHelper::STAT_STRENGTH
|
SpecialityHelper::STAT_STRENGTH
|
||||||
];
|
];
|
||||||
|
|
||||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattleInitSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller
|
||||||
|
{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE),
|
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 404),
|
||||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '저격불가')
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 404, false, '저격불가')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller
|
||||||
|
{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '필살불가', '계략약화', '저격불가')
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 404, false, '필살불가', '계략약화', '저격불가')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
public function getWarPowerMultiplier(WarUnit $unit): array
|
||||||
|
{
|
||||||
return [1, 0.9];
|
return [1, 0.9];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ class che_반계 extends \sammo\BaseSpecial{
|
|||||||
|
|
||||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '계략약화'),
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 406, false, '계략약화'),
|
||||||
new che_반계시도($unit),
|
new che_반계시도($unit),
|
||||||
new che_반계발동($unit)
|
new che_반계발동($unit)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -184,12 +184,6 @@ class che_허보 extends Command\NationCommand
|
|||||||
);
|
);
|
||||||
$destNationLogger->flush();
|
$destNationLogger->flush();
|
||||||
|
|
||||||
|
|
||||||
$db->update('city', [
|
|
||||||
'def' => $db->sqleval('def * 0.2'),
|
|
||||||
'wall' => $db->sqleval('wall * 0.2'),
|
|
||||||
], 'city=%i', $destCityID);
|
|
||||||
|
|
||||||
$josaYiNation = JosaUtil::pick($nationName, '이');
|
$josaYiNation = JosaUtil::pick($nationName, '이');
|
||||||
|
|
||||||
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>에 <M>허보</>를 발동");
|
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>에 <M>허보</>를 발동");
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ class ReqGeneralCrewMargin extends Constraint{
|
|||||||
$reqCrewType = GameUnitConst::byID($this->arg);
|
$reqCrewType = GameUnitConst::byID($this->arg);
|
||||||
|
|
||||||
//XXX: 왜 General -> obj -> General 변환을 하고 있나?
|
//XXX: 왜 General -> obj -> General 변환을 하고 있나?
|
||||||
$generalObj = new General($this->general, null, null, null, null, null, false);
|
//FIXME: RankVar, city에 따라 통솔이 바뀐다면 이 부분에 문제가 발생.
|
||||||
|
$generalObj = new General($this->general, null, null, null, null, null, true);
|
||||||
|
|
||||||
if($reqCrewType->id != $generalObj->getCrewTypeObj()->id){
|
if($reqCrewType->id != $generalObj->getCrewTypeObj()->id){
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -611,7 +611,7 @@ class General implements iAction{
|
|||||||
$ownerID = $this->getVar('owner');
|
$ownerID = $this->getVar('owner');
|
||||||
if($ownerID){
|
if($ownerID){
|
||||||
$this->mergeTotalInheritancePoint();
|
$this->mergeTotalInheritancePoint();
|
||||||
resetInheritanceUser($ownerID);
|
resetInheritanceUser($ownerID, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->multiplyVarWithLimit('leadership', 0.85, 10);
|
$this->multiplyVarWithLimit('leadership', 0.85, 10);
|
||||||
|
|||||||
@@ -2794,7 +2794,7 @@ class GeneralAI
|
|||||||
if($genRes < $reqRes * 1.5){
|
if($genRes < $reqRes * 1.5){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!Util::randBool(($genRes / $reqRes)-0.5)){
|
if($reqRes > 0 && !Util::randBool(($genRes / $reqRes)-0.5)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$amount = $genRes - $reqRes;
|
$amount = $genRes - $reqRes;
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ class GeneralBuilder{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->dex1 === null){
|
if(!$this->dex1 && in_array('dex_t', $avgGen)){
|
||||||
$dexTotal = $avgGen['dex_t'];
|
$dexTotal = $avgGen['dex_t'];
|
||||||
if ($pickType == '무') {
|
if ($pickType == '무') {
|
||||||
$dexVal = Util::choiceRandom([
|
$dexVal = Util::choiceRandom([
|
||||||
@@ -636,7 +636,6 @@ class GeneralBuilder{
|
|||||||
$this->cityID = $cityObj['id'];
|
$this->cityID = $cityObj['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$experience = $this->experience?:$age * 100;
|
$experience = $this->experience?:$age * 100;
|
||||||
$dedication = $this->dedication?:$age * 100;
|
$dedication = $this->dedication?:$age * 100;
|
||||||
$officerLevel = $this->officerLevel;
|
$officerLevel = $this->officerLevel;
|
||||||
|
|||||||
Reference in New Issue
Block a user