feat: '능동 행동 수' 유산 포인트 추가

- 거병, 건국, 방량, 선양, 모반
- 임관, 랜덤임관, 장수대상임관, 등용수락, 하야
- 출병(500명 이상, 훈사 7070 초과)
- 인재탐색 성공(난도에 따라 추가 보정)
- 첩보(예외, 0.5)
- 증축, 감축, 국기변경, 국호변경, 천도성공
This commit is contained in:
2021-11-16 21:38:55 +09:00
parent 375b08be87
commit 0c0283dc02
21 changed files with 63 additions and 37 deletions
+8 -7
View File
@@ -46,7 +46,7 @@ class che_감축 extends Command\NationCommand{
$this->setCity();
$this->setNation(['gold', 'rice', 'capset', 'capital']);
if(!$this->nation['capital']){
$this->fullConditionConstraints=[
ConstraintHelper::AlwaysFail('방랑상태에서는 불가능합니다.')
@@ -55,7 +55,7 @@ class che_감축 extends Command\NationCommand{
}
$this->setDestCity($this->nation['capital']);
[$reqGold, $reqRice] = $this->getCost();
$origCityLevel = CityConst::byID($this->nation['capital'])->level;
@@ -78,10 +78,10 @@ class che_감축 extends Command\NationCommand{
return "{$name}/{$reqTurn}턴(금 {$reqGold}, 쌀 {$reqRice} 회수)";
}
public function getCost():array{
$amount = $this->env['develcost'] * GameConst::$expandCityCostCoef + GameConst::$expandCityDefaultCost / 2;
return [$amount, $amount];
}
@@ -157,10 +157,10 @@ class che_감축 extends Command\NationCommand{
$nationID = $general->getNationID();
$nationName = $this->nation['name'];
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
@@ -192,13 +192,14 @@ class che_감축 extends Command\NationCommand{
'gold' => $db->sqleval('gold + %i', $reqGold),
'rice' => $db->sqleval('rice + %i', $reqRice),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaUl} 감축했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaUl} <M>감축</>");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>감축</>");
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>감축</>하였습니다.");
$logger->pushGlobalHistoryLog("<M><b>【감축】</b></><D><b>{$nationName}</b></>{$josaYiNation} <G><b>{$destCityName}</b></>{$josaUl} <M>감축</>하였습니다.");
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
@@ -146,6 +146,7 @@ class che_국기변경 extends Command\NationCommand
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} <span style='color:{$color};'><b>국기</b></span>를 변경하였습니다");
$logger->pushGlobalHistoryLog("<S><b>【국기변경】</b></><D><b>{$nationName}</b></>{$josaYiNation} <span style='color:{$color};'><b>국기</b></span>를 변경하였습니다.");
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
@@ -152,6 +152,7 @@ class che_국호변경 extends Command\NationCommand
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} 국호를 <D><b>{$newNationName}</b></>{$josaRo} 변경합니다.");
$logger->pushGlobalHistoryLog("<S><b>【국호변경】</b></><D><b>{$nationName}</b></>{$josaYiNation} 국호를 <D><b>{$newNationName}</b></>{$josaRo} 변경합니다.");
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
+8 -7
View File
@@ -51,9 +51,9 @@ class che_증축 extends Command\NationCommand{
];
return;
}
$this->setDestCity($this->nation['capital']);
[$reqGold, $reqRice] = $this->getCost();
$this->fullConditionConstraints=[
@@ -76,10 +76,10 @@ class che_증축 extends Command\NationCommand{
return "{$name}/{$reqTurn}턴(금 {$reqGold}, 쌀 {$reqRice})";
}
public function getCost():array{
$amount = $this->env['develcost'] * GameConst::$expandCityCostCoef + GameConst::$expandCityDefaultCost;
return [$amount, $amount];
}
@@ -155,13 +155,14 @@ class che_증축 extends Command\NationCommand{
$nationID = $general->getNationID();
$nationName = $this->nation['name'];
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$general->increaseInheritancePoint('active_action', 1);
$josaUl = JosaUtil::pick($destCityName, '을');
$josaYi = JosaUtil::pick($generalName, '이');
@@ -183,7 +184,7 @@ class che_증축 extends Command\NationCommand{
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaUl} 증축했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaUl} <M>증축</>");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>증축</>");
+1
View File
@@ -218,6 +218,7 @@ class che_천도 extends Command\NationCommand
'capset' => $db->sqleval('capset + 1'),
], 'nation=%i', $nationID);
$general->increaseInheritancePoint('active_action', 1);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaRo} 천도했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaRo} <M>천도</>명령");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaRo} <M>천도</> 명령");
@@ -184,6 +184,7 @@ class che_초토화 extends Command\NationCommand{
\sammo\refreshNationStaticInfo();
\sammo\SetNationFront($nationID);
$general->increaseInheritancePoint('active_action', 1);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaUl} 초토화했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaUl} <M>초토화</> 명령");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>초토화</> 명령");