From 635f1ae0772312cddbf840e75521bbc951b3aec9 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Wed, 21 Sep 2022 23:12:56 +0900 Subject: [PATCH] =?UTF-8?q?feat,=20game:=20=EC=B4=88=EB=B0=98=20'=EB=B0=B0?= =?UTF-8?q?=EC=8B=A0=20=EC=88=98=EC=B9=98'=201=20=EC=A6=9D=EA=B0=80,=20?= =?UTF-8?q?=EB=B0=B0=EC=8B=A0=20=ED=8C=A8=EB=84=90=ED=8B=B0=20=EC=A6=9D?= =?UTF-8?q?=EA=B0=80=20-=20184=EB=85=84=201=EC=9B=94=EB=B6=80=ED=84=B0=20?= =?UTF-8?q?=EB=B0=B0=EC=8B=A0=EC=88=98=EC=B9=98=201=20=EC=A6=9D=EA=B0=80.?= =?UTF-8?q?=20-=20=EB=B0=B0=EC=8B=A0=20=ED=8C=A8=EB=84=90=ED=8B=B0=20?= =?UTF-8?q?=EB=8B=B9=2015%,=20=EC=B5=9C=EB=8C=80=206=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/j_myBossInfo.php | 4 ++-- hwe/sammo/API/General/Join.php | 6 ++++++ hwe/sammo/Command/General/che_등용수락.php | 4 ++-- hwe/sammo/Command/General/che_하야.php | 4 ++-- hwe/sammo/Event/Action/AddGlobalBetray.php | 20 ++++++++++++++++++++ hwe/sammo/GameConstBase.php | 8 +++++++- 6 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 hwe/sammo/Event/Action/AddGlobalBetray.php diff --git a/hwe/j_myBossInfo.php b/hwe/j_myBossInfo.php index 0ee36a0c..91fda855 100644 --- a/hwe/j_myBossInfo.php +++ b/hwe/j_myBossInfo.php @@ -226,8 +226,8 @@ function do추방(General $general, int $myOfficerLevel):?string{ } else{ $betrayCnt = $general->getVar('betray'); - $general->addExperience(-$general->getVar('experience')*0.1*$betrayCnt); - $general->addDedication(-$general->getVar('dedication')*0.1*$betrayCnt); + $general->addExperience(-$general->getVar('experience')*0.15*$betrayCnt); + $general->addDedication(-$general->getVar('dedication')*0.15*$betrayCnt); $general->increaseVarWithLimit('betray', 1, null, GameConst::$maxBetrayCnt); } diff --git a/hwe/sammo/API/General/Join.php b/hwe/sammo/API/General/Join.php index 731d81bc..e266b07b 100644 --- a/hwe/sammo/API/General/Join.php +++ b/hwe/sammo/API/General/Join.php @@ -337,6 +337,11 @@ class Join extends \sammo\BaseAPI //상성 랜덤 $affinity = $rng->nextRangeInt(1, 150); + $betray = 0; + if($relYear >= 4){ + $betray += 1; + } + ########## 회원정보 테이블에 입력값을 등록한다. ########## $db->insert('general', [ 'owner' => $userID, @@ -365,6 +370,7 @@ class Join extends \sammo\BaseAPI 'lastrefresh' => $now, 'crewtype' => GameUnitConst::DEFAULT_CREWTYPE, 'makelimit' => 0, + 'betray' => $betray, 'age' => $age, 'startage' => $age, 'personal' => $character, diff --git a/hwe/sammo/Command/General/che_등용수락.php b/hwe/sammo/Command/General/che_등용수락.php index 86337059..41d408c7 100644 --- a/hwe/sammo/Command/General/che_등용수락.php +++ b/hwe/sammo/Command/General/che_등용수락.php @@ -144,9 +144,9 @@ class che_등용수락 extends Command\GeneralCommand{ } // 재야가 아니면 명성N*10% 공헌N*10%감소 - $general->setVar('experience', $general->getVar('experience') * (1 - 0.1 * $general->getVar('betray'))); + $general->setVar('experience', $general->getVar('experience') * (1 - 0.15 * $general->getVar('betray'))); $general->addExperience(0, false); - $general->setVar('dedication', $general->getVar('dedication') * (1 - 0.1 * $general->getVar('betray'))); + $general->setVar('dedication', $general->getVar('dedication') * (1 - 0.15 * $general->getVar('betray'))); $general->addDedication(0, false); $general->increaseVarWithLimit('betray', 1, null, GameConst::$maxBetrayCnt); } diff --git a/hwe/sammo/Command/General/che_하야.php b/hwe/sammo/Command/General/che_하야.php index 6fce7ba3..a0e7a1e1 100644 --- a/hwe/sammo/Command/General/che_하야.php +++ b/hwe/sammo/Command/General/che_하야.php @@ -73,9 +73,9 @@ class che_하야 extends Command\GeneralCommand{ $logger->pushGeneralActionLog("{$nationName}에서 하야했습니다. <1>$date"); $logger->pushGeneralHistoryLog("{$nationName}에서 하야"); $logger->pushGlobalActionLog("{$generalName}{$josaYi} {$nationName}에서 하야했습니다."); - $general->setVar('experience', $general->getVar('experience') * (1 - 0.1 * $general->getVar('betray'))); + $general->setVar('experience', $general->getVar('experience') * (1 - 0.15 * $general->getVar('betray'))); $general->addExperience(0, false); - $general->setVar('dedication', $general->getVar('dedication') * (1 - 0.1 * $general->getVar('betray'))); + $general->setVar('dedication', $general->getVar('dedication') * (1 - 0.15 * $general->getVar('betray'))); $general->addDedication(0, false); $general->increaseVarWithLimit('betray', 1, null, GameConst::$maxBetrayCnt); $general->setVar('permission', 'normal'); diff --git a/hwe/sammo/Event/Action/AddGlobalBetray.php b/hwe/sammo/Event/Action/AddGlobalBetray.php new file mode 100644 index 00000000..b2a1bf4c --- /dev/null +++ b/hwe/sammo/Event/Action/AddGlobalBetray.php @@ -0,0 +1,20 @@ +update('general', [ + 'betray' => $db->sqleval('betray + %i', $this->cnt), + ], 'betray <= %i', $this->ifMax); + } +} diff --git a/hwe/sammo/GameConstBase.php b/hwe/sammo/GameConstBase.php index 3f149d2c..ac1deaae 100644 --- a/hwe/sammo/GameConstBase.php +++ b/hwe/sammo/GameConstBase.php @@ -79,7 +79,7 @@ class GameConstBase /** @var int 최대 기술 레벨 */ public static $maxTechLevel = 12; /** @var int 최대 하야 패널티 수 */ - public static $maxBetrayCnt = 9; + public static $maxBetrayCnt = 6; /** @var int 최소 인구 증가량 */ public static $basePopIncreaseAmount = 5000; @@ -431,5 +431,11 @@ class GameConstBase ["NoticeToHistoryLog", "출병 제한이 풀렸습니다.", ActionLogger::EVENT_YEAR_MONTH], ["DeleteEvent"] ], + [ + "month", 2000, + ["DateRelative", "==", 4, 1], + ["AddGlobalBetray"], + ["DeleteEvent"] + ], ]; }