feat: '능동 행동 수' 유산 포인트 추가
- 거병, 건국, 방량, 선양, 모반 - 임관, 랜덤임관, 장수대상임관, 등용수락, 하야 - 출병(500명 이상, 훈사 7070 초과) - 인재탐색 성공(난도에 따라 추가 보정) - 첩보(예외, 0.5) - 증축, 감축, 국기변경, 국호변경, 천도성공
This commit is contained in:
@@ -162,6 +162,7 @@ class che_거병 extends Command\GeneralCommand{
|
||||
$exp = 100;
|
||||
$ded = 100;
|
||||
|
||||
$general->increaseInheritancePoint('active_action', 1);
|
||||
$general->addExperience($exp);
|
||||
$general->addDedication($ded);
|
||||
$general->setVar('belong', 1);
|
||||
|
||||
@@ -188,6 +188,7 @@ class che_건국 extends Command\GeneralCommand
|
||||
|
||||
refreshNationStaticInfo();
|
||||
|
||||
$general->increaseInheritancePoint('active_action', 1);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryUniqueItemLottery($general, '건국');
|
||||
|
||||
@@ -100,7 +100,7 @@ class che_등용수락 extends Command\GeneralCommand{
|
||||
public function getCost():array{
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ class che_등용수락 extends Command\GeneralCommand{
|
||||
}
|
||||
|
||||
$isTroopLeader = ($generalID == $general->getVar('troop'));
|
||||
|
||||
|
||||
$destGeneral->addExperience(100);
|
||||
$destGeneral->addDedication(100);
|
||||
|
||||
@@ -188,13 +188,13 @@ class che_등용수락 extends Command\GeneralCommand{
|
||||
$destLogger->pushGeneralHistoryLog("<Y>{$generalName}</> 등용에 성공");
|
||||
|
||||
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} <D><b>{$destNationName}</b></>{$josaRo} <S>망명</>하였습니다.");
|
||||
|
||||
|
||||
if($nationID != 0){
|
||||
$db->update('nation', $setOriginalNationValues, 'nation=%i', $nationID);
|
||||
}
|
||||
$db->update('nation', $setScoutNationValues, 'nation=%i', $destNationID);
|
||||
|
||||
|
||||
$general->increaseInheritancePoint('active_action', 1);
|
||||
$general->setVar('permission', 'normal');
|
||||
$general->setVar('belong', 1);
|
||||
$general->setVar('officer_level', 1);
|
||||
|
||||
@@ -285,6 +285,7 @@ class che_랜덤임관 extends Command\GeneralCommand
|
||||
$general->setAuxVar('joinedNations', $joinedNations);
|
||||
}
|
||||
|
||||
$general->increaseInheritancePoint('active_action', 1);
|
||||
$general->addExperience($exp);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
|
||||
@@ -96,6 +96,7 @@ class che_모반시도 extends Command\GeneralCommand{
|
||||
$lordLogger->pushGeneralHistoryLog("<D><b>{$generalName}</b></>의 모반으로 인해 <D><b>{$nationName}</b></>의 군주자리를 박탈당함");
|
||||
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->increaseInheritancePoint('active_action', 1);
|
||||
$general->checkStatChange();
|
||||
tryRollbackInheritUniqueItem($general);
|
||||
$general->applyDB($db);
|
||||
|
||||
@@ -121,7 +121,7 @@ class che_방랑 extends Command\GeneralCommand{
|
||||
], 'me=%i OR you=%i', $nationID, $nationID);
|
||||
|
||||
refreshNationStaticInfo();
|
||||
|
||||
$general->increaseInheritancePoint('active_action', 1);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
tryRollbackInheritUniqueItem($general);
|
||||
$general->applyDB($db);
|
||||
|
||||
@@ -135,6 +135,7 @@ class che_선양 extends Command\GeneralCommand
|
||||
$logger->pushGeneralHistoryLog("<D><b>{$nationName}</b></>의 군주자리를 <Y>{$destGeneralName}</>에게 선양");
|
||||
$destLogger->pushGeneralHistoryLog("<D><b>{$nationName}</b></>의 군주자리를 물려 받음");
|
||||
|
||||
$general->increaseInheritancePoint('active_action', 1);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryRollbackInheritUniqueItem($general);
|
||||
|
||||
@@ -160,7 +160,7 @@ class che_인재탐색 extends Command\GeneralCommand
|
||||
|
||||
$exp = 100 * (sqrt(1 / $foundProp) + 1);
|
||||
$ded = 150 * (sqrt(1 / $foundProp) + 1);
|
||||
|
||||
|
||||
$scoutType = "발견";
|
||||
|
||||
$age = Util::randRangeInt(20, 25);
|
||||
@@ -172,7 +172,7 @@ class che_인재탐색 extends Command\GeneralCommand
|
||||
avg(dex1+dex2+dex3+dex4) as dex_t, avg(age) as age, avg(dex5) as dex5
|
||||
from general where npc < 4'
|
||||
);
|
||||
|
||||
|
||||
$pickTypeList = ['무' => 6, '지' => 6, '무지' => 3];
|
||||
|
||||
$pickedNPC = pickGeneralFromPool($db, 0, 1)[0];
|
||||
@@ -210,6 +210,7 @@ class che_인재탐색 extends Command\GeneralCommand
|
||||
$exp = 200;
|
||||
$ded = 300;
|
||||
|
||||
$general->increaseInheritancePoint('active_action', Util::valueFit(sqrt(1 / $foundProp), 1));
|
||||
$general->increaseVarWithLimit('gold', -$reqGold, 0);
|
||||
$general->increaseVarWithLimit('rice', -$reqRice, 0);
|
||||
$general->addExperience($exp);
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace sammo\Command\General;
|
||||
|
||||
use \sammo\{
|
||||
DB, Util, JosaUtil,
|
||||
General,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst, GameUnitConst,
|
||||
LastTurn,
|
||||
@@ -46,7 +46,7 @@ class che_임관 extends Command\GeneralCommand{
|
||||
$this->arg = [
|
||||
'destNationID' => $destNationID
|
||||
];
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class che_임관 extends Command\GeneralCommand{
|
||||
ConstraintHelper::BeNeutral(),
|
||||
ConstraintHelper::AllowJoinAction()
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
@@ -99,7 +99,7 @@ class che_임관 extends Command\GeneralCommand{
|
||||
public function getCost():array{
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ class che_임관 extends Command\GeneralCommand{
|
||||
$general->setVar('officer_level', 1);
|
||||
$general->setVar('officer_city', 0);
|
||||
$general->setVar('belong', 1);
|
||||
|
||||
|
||||
if($this->destGeneralObj !== null){
|
||||
$general->setVar('city', $this->destGeneralObj->getCityID());
|
||||
}
|
||||
@@ -171,6 +171,7 @@ class che_임관 extends Command\GeneralCommand{
|
||||
$general->setAuxVar('joinedNations', $joinedNations);
|
||||
}
|
||||
|
||||
$general->increaseInheritancePoint('active_action', 1);
|
||||
$general->addExperience($exp);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
@@ -221,17 +222,17 @@ class che_임관 extends Command\GeneralCommand{
|
||||
}
|
||||
}
|
||||
unset($nation);
|
||||
ob_start();
|
||||
ob_start();
|
||||
?>
|
||||
국가에 임관합니다.<br>
|
||||
이미 임관/등용되었던 국가는 다시 임관할 수 없습니다.<br>
|
||||
바로 군주의 위치로 이동합니다.<br>
|
||||
임관할 국가를 목록에서 선택하세요.<br>
|
||||
임관할 국가를 목록에서 선택하세요.<br>
|
||||
<select class='formInput' name="destNationID" id="destNationID" size='1' style='color:white;background-color:black;'>
|
||||
<?php foreach($nationList as $nation): ?>
|
||||
<?php if(key_exists($nation['nation'], $hiddenItems)){ continue; } ?>
|
||||
<option
|
||||
value='<?=$nation['nation']?>'
|
||||
<option
|
||||
value='<?=$nation['nation']?>'
|
||||
style='<?=$nation['availableJoin']?'':'background-color:red;'?>'
|
||||
>【<?=$nation['name']?> 】</option>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace sammo\Command\General;
|
||||
|
||||
use \sammo\{
|
||||
DB, Util, JosaUtil,
|
||||
General,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst, GameUnitConst,
|
||||
LastTurn,
|
||||
@@ -73,7 +73,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
|
||||
ConstraintHelper::BeNeutral(),
|
||||
ConstraintHelper::AllowJoinAction()
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
@@ -105,7 +105,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
|
||||
public function getCost():array{
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
|
||||
$general->setVar('officer_level', 1);
|
||||
$general->setVar('officer_city', 0);
|
||||
$general->setVar('belong', 1);
|
||||
|
||||
|
||||
if($this->destGeneralObj !== null){
|
||||
$general->setVar('city', $this->destGeneralObj->getCityID());
|
||||
}
|
||||
@@ -176,6 +176,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
|
||||
$general->setAuxVar('joinedNations', $joinedNations);
|
||||
}
|
||||
|
||||
$general->increaseInheritancePoint('active_action', 1);
|
||||
$general->addExperience($exp);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
@@ -229,12 +230,12 @@ class che_장수대상임관 extends Command\GeneralCommand{
|
||||
}
|
||||
}
|
||||
unset($nation);
|
||||
ob_start();
|
||||
ob_start();
|
||||
?>
|
||||
장수를 따라 임관합니다.<br>
|
||||
이미 임관/등용되었던 국가는 다시 임관할 수 없습니다.<br>
|
||||
바로 군주의 위치로 이동합니다.<br>
|
||||
임관할 국가를 목록에서 선택하세요.<br>
|
||||
임관할 국가를 목록에서 선택하세요.<br>
|
||||
<select class='formInput' name="destGeneralID" id="destGeneralID" size='1' style='color:white;background-color:black;'>
|
||||
<?php foreach($generalList as $targetGeneral): ?>
|
||||
<?php if(key_exists($targetGeneral['nation'], $hiddenItems)){ continue; } ?>
|
||||
|
||||
@@ -211,6 +211,7 @@ class che_첩보 extends Command\GeneralCommand
|
||||
$ded = Util::randRangeInt(1, 70);
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$general->increaseInheritancePoint('active_action', 0.5);//NOTE: 첩보만 예외!
|
||||
$general->increaseVarWithLimit('gold', -$reqGold, 0);
|
||||
$general->increaseVarWithLimit('rice', -$reqRice, 0);
|
||||
$general->addExperience($exp);
|
||||
|
||||
@@ -223,9 +223,13 @@ class che_출병 extends Command\GeneralCommand
|
||||
$this->destCity['term'] = 3;
|
||||
|
||||
$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));
|
||||
|
||||
$general->applyDB($db);
|
||||
|
||||
processWar($general, $this->nation, $this->destCity);
|
||||
|
||||
@@ -101,6 +101,7 @@ class che_하야 extends Command\GeneralCommand{
|
||||
$general->setVar('officer_city', 0);
|
||||
$general->setVar('belong', 0);
|
||||
$general->setVar('makelimit', 12);
|
||||
$general->increaseInheritancePoint('active_action', 1);
|
||||
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>증축</>");
|
||||
|
||||
@@ -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>초토화</> 명령");
|
||||
|
||||
@@ -58,6 +58,7 @@ class General implements iAction
|
||||
'lived_month' => [true, 1, '생존'],
|
||||
'max_belong' => [false, 10, '최대 임관년 수'],
|
||||
'max_domestic_critical' => [true, 1, '최대 연속 내정 성공'],
|
||||
'active_action' => [true, 3, '능동 행동 수'],
|
||||
//'snipe_combat' => [true, 10, '병종 상성 우위 횟수'],
|
||||
'combat' => [['rank', 'warnum'], 5, '전투 횟수'],
|
||||
'sabotage' => [['rank', 'firenum'], 20, '계략 성공 횟수'],
|
||||
|
||||
@@ -272,6 +272,7 @@ type InheritanceType =
|
||||
| "lived_month"
|
||||
| "max_belong"
|
||||
| "max_domestic_critical"
|
||||
| "active_action"
|
||||
// | "snipe_combat"
|
||||
| "combat"
|
||||
| "sabotage"
|
||||
@@ -320,6 +321,10 @@ const inheritanceViewText: Record<
|
||||
title: "최대 연속 내정 성공",
|
||||
info: "성공한 내정 중 최대 연속값입니다.",
|
||||
},
|
||||
active_action: {
|
||||
title: "능동 행동 수",
|
||||
info: "장수 동향에 본인의 이름이 직접 나타난 수입니다.<br>일부 사령턴은 제외됩니다."
|
||||
},
|
||||
/* snipe_combat: {
|
||||
title: "병종 상성 우위 횟수",
|
||||
info: "유리한 상성을 가지고 전투했습니다.",
|
||||
|
||||
Reference in New Issue
Block a user