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
+1
View File
@@ -162,6 +162,7 @@ class che_거병 extends Command\GeneralCommand{
$exp = 100; $exp = 100;
$ded = 100; $ded = 100;
$general->increaseInheritancePoint('active_action', 1);
$general->addExperience($exp); $general->addExperience($exp);
$general->addDedication($ded); $general->addDedication($ded);
$general->setVar('belong', 1); $general->setVar('belong', 1);
+1
View File
@@ -188,6 +188,7 @@ class che_건국 extends Command\GeneralCommand
refreshNationStaticInfo(); refreshNationStaticInfo();
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange(); $general->checkStatChange();
tryUniqueItemLottery($general, '건국'); tryUniqueItemLottery($general, '건국');
@@ -194,7 +194,7 @@ class che_등용수락 extends Command\GeneralCommand{
} }
$db->update('nation', $setScoutNationValues, 'nation=%i', $destNationID); $db->update('nation', $setScoutNationValues, 'nation=%i', $destNationID);
$general->increaseInheritancePoint('active_action', 1);
$general->setVar('permission', 'normal'); $general->setVar('permission', 'normal');
$general->setVar('belong', 1); $general->setVar('belong', 1);
$general->setVar('officer_level', 1); $general->setVar('officer_level', 1);
@@ -285,6 +285,7 @@ class che_랜덤임관 extends Command\GeneralCommand
$general->setAuxVar('joinedNations', $joinedNations); $general->setAuxVar('joinedNations', $joinedNations);
} }
$general->increaseInheritancePoint('active_action', 1);
$general->addExperience($exp); $general->addExperience($exp);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange(); $general->checkStatChange();
@@ -96,6 +96,7 @@ class che_모반시도 extends Command\GeneralCommand{
$lordLogger->pushGeneralHistoryLog("<D><b>{$generalName}</b></>의 모반으로 인해 <D><b>{$nationName}</b></>의 군주자리를 박탈당함"); $lordLogger->pushGeneralHistoryLog("<D><b>{$generalName}</b></>의 모반으로 인해 <D><b>{$nationName}</b></>의 군주자리를 박탈당함");
$this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->increaseInheritancePoint('active_action', 1);
$general->checkStatChange(); $general->checkStatChange();
tryRollbackInheritUniqueItem($general); tryRollbackInheritUniqueItem($general);
$general->applyDB($db); $general->applyDB($db);
+1 -1
View File
@@ -121,7 +121,7 @@ class che_방랑 extends Command\GeneralCommand{
], 'me=%i OR you=%i', $nationID, $nationID); ], 'me=%i OR you=%i', $nationID, $nationID);
refreshNationStaticInfo(); refreshNationStaticInfo();
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $this->setResultTurn(new LastTurn(static::getName(), $this->arg));
tryRollbackInheritUniqueItem($general); tryRollbackInheritUniqueItem($general);
$general->applyDB($db); $general->applyDB($db);
+1
View File
@@ -135,6 +135,7 @@ class che_선양 extends Command\GeneralCommand
$logger->pushGeneralHistoryLog("<D><b>{$nationName}</b></>의 군주자리를 <Y>{$destGeneralName}</>에게 선양"); $logger->pushGeneralHistoryLog("<D><b>{$nationName}</b></>의 군주자리를 <Y>{$destGeneralName}</>에게 선양");
$destLogger->pushGeneralHistoryLog("<D><b>{$nationName}</b></>의 군주자리를 물려 받음"); $destLogger->pushGeneralHistoryLog("<D><b>{$nationName}</b></>의 군주자리를 물려 받음");
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange(); $general->checkStatChange();
tryRollbackInheritUniqueItem($general); tryRollbackInheritUniqueItem($general);
@@ -210,6 +210,7 @@ class che_인재탐색 extends Command\GeneralCommand
$exp = 200; $exp = 200;
$ded = 300; $ded = 300;
$general->increaseInheritancePoint('active_action', Util::valueFit(sqrt(1 / $foundProp), 1));
$general->increaseVarWithLimit('gold', -$reqGold, 0); $general->increaseVarWithLimit('gold', -$reqGold, 0);
$general->increaseVarWithLimit('rice', -$reqRice, 0); $general->increaseVarWithLimit('rice', -$reqRice, 0);
$general->addExperience($exp); $general->addExperience($exp);
+1
View File
@@ -171,6 +171,7 @@ class che_임관 extends Command\GeneralCommand{
$general->setAuxVar('joinedNations', $joinedNations); $general->setAuxVar('joinedNations', $joinedNations);
} }
$general->increaseInheritancePoint('active_action', 1);
$general->addExperience($exp); $general->addExperience($exp);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange(); $general->checkStatChange();
@@ -176,6 +176,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
$general->setAuxVar('joinedNations', $joinedNations); $general->setAuxVar('joinedNations', $joinedNations);
} }
$general->increaseInheritancePoint('active_action', 1);
$general->addExperience($exp); $general->addExperience($exp);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange(); $general->checkStatChange();
+1
View File
@@ -211,6 +211,7 @@ class che_첩보 extends Command\GeneralCommand
$ded = Util::randRangeInt(1, 70); $ded = Util::randRangeInt(1, 70);
[$reqGold, $reqRice] = $this->getCost(); [$reqGold, $reqRice] = $this->getCost();
$general->increaseInheritancePoint('active_action', 0.5);//NOTE: 첩보만 예외!
$general->increaseVarWithLimit('gold', -$reqGold, 0); $general->increaseVarWithLimit('gold', -$reqGold, 0);
$general->increaseVarWithLimit('rice', -$reqRice, 0); $general->increaseVarWithLimit('rice', -$reqRice, 0);
$general->addExperience($exp); $general->addExperience($exp);
+5 -1
View File
@@ -223,9 +223,13 @@ class che_출병 extends Command\GeneralCommand
$this->destCity['term'] = 3; $this->destCity['term'] = 3;
$general->addDex($general->getCrewTypeObj(), $general->getVar('crew') / 100); $general->addDex($general->getCrewTypeObj(), $general->getVar('crew') / 100);
if($general->getVar('crew') > 500 && $general->getVar('train') * $general->getVar('atmos') > 70 * 70){
//500명 이상, 모훈출, 모사출
$general->increaseInheritancePoint('active_action', 1);
}
$this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->applyDB($db); $general->applyDB($db);
processWar($general, $this->nation, $this->destCity); processWar($general, $this->nation, $this->destCity);
+1
View File
@@ -101,6 +101,7 @@ class che_하야 extends Command\GeneralCommand{
$general->setVar('officer_city', 0); $general->setVar('officer_city', 0);
$general->setVar('belong', 0); $general->setVar('belong', 0);
$general->setVar('makelimit', 12); $general->setVar('makelimit', 12);
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg)); $this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange(); $general->checkStatChange();
+1
View File
@@ -199,6 +199,7 @@ class che_감축 extends Command\NationCommand{
$logger->pushGlobalActionLog("<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>감축</>하였습니다."); $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)); $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db); $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->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>를 변경하였습니다."); $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)); $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db); $general->applyDB($db);
return true; return true;
@@ -152,6 +152,7 @@ class che_국호변경 extends Command\NationCommand
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} 국호를 <D><b>{$newNationName}</b></>{$josaRo} 변경합니다."); $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} 변경합니다."); $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)); $this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db); $general->applyDB($db);
return true; return true;
+1
View File
@@ -162,6 +162,7 @@ class che_증축 extends Command\NationCommand{
$general->addExperience(5 * ($this->getPreReqTurn() + 1)); $general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1)); $general->addDedication(5 * ($this->getPreReqTurn() + 1));
$general->increaseInheritancePoint('active_action', 1);
$josaUl = JosaUtil::pick($destCityName, '을'); $josaUl = JosaUtil::pick($destCityName, '을');
$josaYi = JosaUtil::pick($generalName, '이'); $josaYi = JosaUtil::pick($generalName, '이');
+1
View File
@@ -218,6 +218,7 @@ class che_천도 extends Command\NationCommand
'capset' => $db->sqleval('capset + 1'), 'capset' => $db->sqleval('capset + 1'),
], 'nation=%i', $nationID); ], 'nation=%i', $nationID);
$general->increaseInheritancePoint('active_action', 1);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaRo} 천도했습니다. <1>$date</>"); $logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaRo} 천도했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaRo} <M>천도</>명령"); $logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaRo} <M>천도</>명령");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <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\refreshNationStaticInfo();
\sammo\SetNationFront($nationID); \sammo\SetNationFront($nationID);
$general->increaseInheritancePoint('active_action', 1);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaUl} 초토화했습니다. <1>$date</>"); $logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaUl} 초토화했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaUl} <M>초토화</> 명령"); $logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaUl} <M>초토화</> 명령");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>초토화</> 명령"); $logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>초토화</> 명령");
+1
View File
@@ -58,6 +58,7 @@ class General implements iAction
'lived_month' => [true, 1, '생존'], 'lived_month' => [true, 1, '생존'],
'max_belong' => [false, 10, '최대 임관년 수'], 'max_belong' => [false, 10, '최대 임관년 수'],
'max_domestic_critical' => [true, 1, '최대 연속 내정 성공'], 'max_domestic_critical' => [true, 1, '최대 연속 내정 성공'],
'active_action' => [true, 3, '능동 행동 수'],
//'snipe_combat' => [true, 10, '병종 상성 우위 횟수'], //'snipe_combat' => [true, 10, '병종 상성 우위 횟수'],
'combat' => [['rank', 'warnum'], 5, '전투 횟수'], 'combat' => [['rank', 'warnum'], 5, '전투 횟수'],
'sabotage' => [['rank', 'firenum'], 20, '계략 성공 횟수'], 'sabotage' => [['rank', 'firenum'], 20, '계략 성공 횟수'],
+5
View File
@@ -272,6 +272,7 @@ type InheritanceType =
| "lived_month" | "lived_month"
| "max_belong" | "max_belong"
| "max_domestic_critical" | "max_domestic_critical"
| "active_action"
// | "snipe_combat" // | "snipe_combat"
| "combat" | "combat"
| "sabotage" | "sabotage"
@@ -320,6 +321,10 @@ const inheritanceViewText: Record<
title: "최대 연속 내정 성공", title: "최대 연속 내정 성공",
info: "성공한 내정 중 최대 연속값입니다.", info: "성공한 내정 중 최대 연속값입니다.",
}, },
active_action: {
title: "능동 행동 수",
info: "장수 동향에 본인의 이름이 직접 나타난 수입니다.<br>일부 사령턴은 제외됩니다."
},
/* snipe_combat: { /* snipe_combat: {
title: "병종 상성 우위 횟수", title: "병종 상성 우위 횟수",
info: "유리한 상성을 가지고 전투했습니다.", info: "유리한 상성을 가지고 전투했습니다.",