Compare commits

...
84 Commits
Author SHA1 Message Date
Hide_D b4f110dbd5 fix: InheritancePointManager 버그 수정 2025-11-01 17:37:37 +00:00
Hide_D cde6d86e1b feat: 턴 당기기, 턴 미루기 사령턴 2025-11-01 16:59:50 +00:00
Hide_D 1492666d3a fix: 가변턴이고 yearPulled조건일 때 개시 턴을 180년에 맞춰야함 2025-10-30 11:40:15 +00:00
Hide_D de2ee02b3b fix: 가변턴 자동턴 설정 문제 2025-10-30 09:38:39 +00:00
Hide_D 4f65f6870b misc: 이벤트 클랙시에서 항상 상인 등장 2025-10-29 17:48:20 +00:00
Hide_D 7801e5fd81 fix: varTurn60에 밀리초 없음 2025-10-29 17:44:12 +00:00
Hide_D b7c7d6ffce feat: -60 turnterm 가변턴 2025-10-29 17:24:25 +00:00
Hide_D d5b2d4e1f2 dep: datefns 2025-10-29 16:55:42 +00:00
Hide_D d1e5c2105e fix: VarTurn60 CutDay 2025-10-29 16:25:27 +00:00
Hide_D acd73fc63e feat: addTurn, subTurn, cutTurn에서 VarTurn60 버전 호환 2025-10-29 16:01:23 +00:00
Hide_D 76ea61f751 feat: VarTurn60::cutDay() 2025-10-29 15:40:20 +00:00
Hide_D 8dc5231118 refac: turnterm이 varturn 인 경우 대응 준비 2025-10-29 15:15:05 +00:00
Hide_D 45fa74573a feat: VarTurn60 2025-10-29 15:13:57 +00:00
Hide_D 6fe156eb7c fix: composer uninstall 누락 2025-10-29 13:00:46 +00:00
Hide_D 663ddbe76a fix: inheritance_result 작성 문제 2025-10-28 20:24:25 +00:00
Hide_D 30297454f7 refac: inheritance_result로 데이터 이관 2025-10-28 20:15:05 +00:00
Hide_D bc602722bf feat: schema에 inheritance_result 추가
- storage에 의미없이 쌓이는 데이터 이관
2025-10-28 20:09:30 +00:00
Hide_D be8f147216 dep: brandonwamboldt/utilphp 제거 2025-10-28 19:56:02 +00:00
Hide_D b9495fb64a refac: 턴 데몬 전체를 async로 변경경 2025-10-07 20:05:55 +09:00
Hide_D 07b217b290 fix: 서버 오픈 핸들러를 00초에 맞추도록 변경경 2025-10-07 19:54:24 +09:00
Hide_D 42fac46062 refac: brandonwamboldt/utilphp 의존 코드 수정
- 실제 의존성 제거는 이후에에
2025-10-07 19:26:22 +09:00
Hide_D 24bc8985d0 __filename 2025-10-04 11:39:35 +00:00
Hide_D 76a2d5ff63 daemon typescript 버전 추가 2025-10-04 11:29:03 +00:00
Hide_D 148f32f78b fix: execute engine updated 2025-10-04 11:04:36 +00:00
Hide_D 62f5b6597e proc.php 일부 수정
- api.php 미사용 경로 대비
2025-10-04 10:59:56 +00:00
Hide_D 7e810b0279 LogText 끄기 2025-09-07 06:01:04 +00:00
Hide_D 2336b29b65 fix: ?? 2025-08-30 06:15:25 +00:00
Hide_D 185c0e16a0 fix: AI 일부 key 접근 문제 수정 2025-08-30 06:11:37 +00:00
Hide_D 656baeb9ee fix: 토너먼트 분노 공격 확률 오류 수정 (#263)
Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/263
2025-08-23 10:08:13 +09:00
류화영 3e06304dc7 fix: 토너먼트 분노 공격 확률 오류 수정 2025-08-23 09:23:00 +09:00
Hide_D 4bb940c8c5 fix: ?? 연산자 우선순위 2025-08-20 12:59:40 +00:00
Hide_D 2b376b6aab fix: logError 버그 수정 2025-07-06 06:15:18 +00:00
Hide_D 04df26ff83 misc: 군웅할거 손견 국명 손책으로 변경
- 서버 시작 시점에서 손견은 맞으나, 땅따 시작점에는 손책임
2025-06-28 12:37:16 +00:00
Hide_D aca4240b92 game: 강서유서 월드로 명칭 변경 2025-06-26 18:37:42 +00:00
Hide_D faf26fa8a2 game: 강서유서 소설 월드(비세력) 수정 2025-06-26 18:36:19 +00:00
Hide_D 030ab1e7ea game: 군웅축록 연도 수정 2025-06-26 18:25:14 +00:00
Hide_D 7f2c1d4782 game: 역사모드4-2 황제 원술
- 제작자: 강서유서
- 유비가 서주를 가지고 있어야 원술을 치지 않나?
2025-06-26 18:23:36 +00:00
Hide_D 9132138a99 game: 군웅축록 외교 2025-06-26 17:54:32 +00:00
Hide_D 84875d60bd game: 역사모드2-2 반동탁연합 결성(정사)
- 제작자: 강서유서
2025-06-26 17:51:39 +00:00
Hide_D 3cbaf76626 game: 역사모드3-2 군웅축록
- 제작자: 강서유서
2025-06-26 17:26:26 +00:00
Hide_D f4846d0d66 game: 무한대흥 NPC 능력치 감소 2025-06-25 15:07:52 +00:00
Hide_D f183dcc72b frontend: 기술 제한 표기 수정 2025-06-25 14:16:19 +00:00
Hide_D 63cc5d8e88 game: 무한대흥 초기 성수 3천 2025-06-25 13:58:47 +00:00
Hide_D f858c32fdf feat: 점령 후 일반 도시 성벽 수치 조정 가능 2025-06-25 13:58:29 +00:00
Hide_D 60eb127d71 game: 천지비급 상인 등장 2025-06-25 13:54:47 +00:00
Hide_D ede33f3a37 game: ban 메시지 빈도 감소 2025-06-25 13:53:36 +00:00
Hide_D ffd53a2390 game: 무한대흥 스탯 2025-06-25 13:20:21 +00:00
Hide_D 2591fbde67 game: 무한대흥 시나리오 2025-06-25 13:12:41 +00:00
Hide_D 922d3f1938 feat: 기술 등급 제한 수치 유연화 2025-06-25 13:12:32 +00:00
Hide_D 64522ba8a6 fix: ChangeCity에서 _max 키 입력 가능하게 2025-06-25 13:09:24 +00:00
Hide_D 7b1eedb574 feat: ChangeCity에 최대 내정 수치도 연산자로 바꿀 수 있도록 2025-06-25 12:31:29 +00:00
Hide_D 7ec6ca605f run_daemon timeout 2025-05-28 13:55:30 +00:00
Hide_D 5a5c613814 game: 랜임 확률 보정 완화
- 강국의 디버프 감소소
2025-03-05 17:35:08 +00:00
Hide_D 1a3ef20a35 fix: 다병종 밸런스 누락분 수정정 2025-02-08 13:54:01 +00:00
Hide_D fba966177d fix: 고급모드 연구턴 커맨드 창 넘치는 문제 2025-01-25 19:52:28 +00:00
Hide_D 62c72dfdbe fix: 척사 버그 수정 2025-01-24 15:26:56 +09:00
Hide_D 1ae1ff9b72 refac,fix: reqTech, reqRegions, reqCities 간이 호출 추가 2025-01-24 15:23:13 +09:00
Hide_D c1e12c2737 fix: 버그 수정 2025-01-24 15:19:23 +09:00
Hide_D de09a66d6f fix: 병종 연구 커맨드에서 금쌀 검새 안하는 문제 해결 2025-01-24 10:07:56 +09:00
Hide_D 3c2012da46 fix: 사령턴에서 불가능한 턴이 별도 강조가 없는 문제 수정 2025-01-23 17:32:36 +00:00
Hide_D d55be54320 fix: 연구커맨드 검사 조건 2025-01-23 17:27:20 +00:00
Hide_D dcbefa1a96 fix: 연구 커맨드에 금쌀 표기 없음 2025-01-23 17:20:10 +00:00
Hide_D be8f1fff96 fix: 버그 수정 2025-01-23 17:17:37 +00:00
Hide_D 6117dbdcc0 fix: 이벤트 다병종 화시병 위치 2025-01-23 17:14:35 +00:00
Hide_D 0a39ba1023 fix: NPC AI가 현재 병종 기술등급을 고려하지 않는 문제 수정
- 아직 사용하지 않는 징병 페이지 요구 기술 항목도 수정
2025-01-23 17:13:11 +00:00
Hide_D dae5f65baa fix: 특성초토화시에만 did_특성초토화 증가 2025-01-23 17:08:50 +00:00
Hide_D 080bb30103 fix: 버그수정2 2025-01-22 19:42:43 +00:00
Hide_D 9e647c7ce5 fix: 도시 규모조건 징병 불가 2025-01-22 19:41:20 +00:00
Hide_D 73606b0fb4 feat: 초토화시 내부 카운트 추가 2025-01-22 18:54:23 +00:00
Hide_D e62eb36cc2 feat: event 연구 커맨드 추가 2025-01-22 18:53:08 +00:00
Hide_D 6b81f744d4 feat: event용 연구 추가 2025-01-22 18:41:24 +00:00
Hide_D 1a9b3b78cb fix: 화륜차 조건 추가 2025-01-22 18:40:59 +00:00
Hide_D c3cbf956d0 fix: 병종 조건에서 같은 키가 여러개인 경우 대비 2025-01-22 18:40:49 +00:00
Hide_D 91188c555d fix: 커맨드의 aux값값 2025-01-22 18:16:37 +00:00
Hide_D 913028dd6c fix: 병종 특성관련 발생 버그 수정 2025-01-22 18:08:18 +00:00
Hide_D dfb3f6478d game(wip): 다병종 시나리오에 병종 지정 2025-01-22 17:56:17 +00:00
Hide_D 6afc6221d3 feat: 특정 등급 이상 도시 보유 조건 추가 2025-01-22 17:48:49 +00:00
Hide_D 7b5a02487e misc: ReqCitiesWithCityLevel 설명 보완 2025-01-22 17:36:17 +00:00
Hide_D 533b79762e game(wip): 다병종 깃수 준비 2025-01-22 17:29:58 +00:00
Hide_D 53b7dbfdd0 feat: 병종 징병 조건 추가
- 군주 및 수뇌
- 군주 및 수뇌 아님
- 도시의 규모 요구
- 특정 Nation Aux 값 요구
2025-01-22 17:17:30 +00:00
Hide_D fd14c5403b feat: NationAuxKey Enum 2025-01-22 16:57:23 +00:00
Hide_D dc476e73a1 feat: 병종 검사에서 $nation['aux']를 정식 입력 2025-01-22 16:54:27 +00:00
Hide_D e60150705e refac: Constraint의 generalObj destGeneralObj로 General 객체 입력 2025-01-22 16:53:39 +00:00
Hide_D 2869ba5c42 feat,refac: GameUnitConstraint 개념 추가
- GameUnitDetail의 요구 기술, 지역, 도시, 연도를 GameUnitConstraint로 통합
- GameUnitConstraint는 조건 검사, 설명 제공
- 병종 정의를 GameUnitConstraint 이용 재정의
- test 함수에 General 객체 요구,
- test 함수의 ownCities에 단순 도시 외 도시 정보 추가
- 변경된 값에 맞게 호출 함수 변경
2025-01-22 16:26:15 +00:00
150 changed files with 8182 additions and 1912 deletions
-1
View File
@@ -12,7 +12,6 @@
}
},
"require": {
"brandonwamboldt/utilphp": "^1.1",
"sergeytsalkov/meekrodb": "^2.5",
"league/plates": "^3.5",
"vlucas/valitron": "^1.4",
Generated
+2 -52
View File
@@ -4,58 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "deed9afdc95bc42f84784df67d295223",
"content-hash": "7edae9b6be35e66ffd0d180f5fac6679",
"packages": [
{
"name": "brandonwamboldt/utilphp",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/brandonwamboldt/utilphp.git",
"reference": "36c32efc4f0679c05163464a550f45c8d83fe683"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/brandonwamboldt/utilphp/zipball/36c32efc4f0679c05163464a550f45c8d83fe683",
"reference": "36c32efc4f0679c05163464a550f45c8d83fe683",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"satooshi/php-coveralls": "dev-master"
},
"type": "library",
"autoload": {
"psr-0": {
"utilphp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Brandon Wamboldt",
"email": "brandon.wamboldt@gmail.com"
}
],
"description": "util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects",
"homepage": "https://github.com/brandonwamboldt/utilphp",
"keywords": [
"collection",
"helpers",
"php",
"utility"
],
"support": {
"issues": "https://github.com/brandonwamboldt/utilphp/issues",
"source": "https://github.com/brandonwamboldt/utilphp/tree/master"
},
"time": "2015-02-02T17:56:14+00:00"
},
{
"name": "brick/math",
"version": "0.12.1",
@@ -5721,5 +5671,5 @@
"platform-overrides": {
"php": "8.3"
},
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
}
+4 -1
View File
@@ -99,7 +99,10 @@ function logError(string $err, string $errstr, string $errpath, array $trace)
$err = str_replace(ROOT, '{ROOT}', $err);
$errstr = str_replace(ROOT, '{ROOT}', $errstr);
$errpath = str_replace(ROOT, '{ROOT}', $errpath);
$trace = array_map(function (string $text) {
$trace = array_map(function (string|array $text) {
if (is_array($text)) {
$text = Json::encode($text);
}
return str_replace(ROOT, '{ROOT}', $text);
}, $trace);
+1 -1
View File
@@ -31,7 +31,7 @@ $queryMap = [
];
if ($reqQueryType === null || !key_exists($reqQueryType, $queryMap)) {
$reqQueryType = Util::array_first_key($queryMap);
$reqQueryType = array_key_first($queryMap);
}
//로그인 검사
+48 -4
View File
@@ -923,6 +923,13 @@ function banner()
function addTurn($date, int $turnterm, int $turn = 1, bool $withFraction = true)
{
if($turnterm < 0){
if($turnterm == -60){
return VarTurn60::fromDatetime(new \DateTimeImmutable(($date)))->addTurn($turn )->toDateStr($withFraction);
}
throw new \Exception("InvalidTurnTerm".$turnterm);
}
$date = new \DateTime($date);
$target = $turnterm * $turn;
$date->add(new \DateInterval("PT{$target}M"));
@@ -934,6 +941,13 @@ function addTurn($date, int $turnterm, int $turn = 1, bool $withFraction = true)
function subTurn($date, int $turnterm, int $turn = 1, bool $withFraction = true)
{
if($turnterm < 0){
if($turnterm == -60){
return VarTurn60::fromDatetime(new \DateTimeImmutable(($date)))->addTurn($turn * -1)->toDateStr($withFraction);
}
throw new \Exception("InvalidTurnTerm".$turnterm);
}
$date = new \DateTime($date);
$target = $turnterm * $turn;
$date->sub(new \DateInterval("PT{$target}M"));
@@ -945,6 +959,14 @@ function subTurn($date, int $turnterm, int $turn = 1, bool $withFraction = true)
function cutTurn($date, int $turnterm, bool $withFraction = true)
{
if($turnterm < 0){
if($turnterm == -60){
[$baseDate, ] = VarTurn60::fromDatetime(new \DateTimeImmutable(($date)))->cutTurn($withFraction);
return $baseDate;
}
throw new \Exception("InvalidTurnTerm".$turnterm);
}
$date = new \DateTime($date);
$baseDate = new \DateTime($date->format('Y-m-d'));
@@ -963,6 +985,8 @@ function cutTurn($date, int $turnterm, bool $withFraction = true)
function cutDay($date, int $turnterm, bool $withFraction = true)
{
assert($turnterm > 0);
$date = new \DateTime($date);
$baseDate = new \DateTime($date->format('Y-m-d'));
@@ -1106,6 +1130,7 @@ function CheckOverhead()
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
[$turnterm, $refreshLimit] = $gameStor->getValuesAsArray(['turnterm', 'refreshLimit']);
$turnterm = abs($turnterm);
$nextRefreshLimit = Util::round(pow($turnterm, 0.6) * 3) * GameConst::$refreshLimitCoef;
@@ -1153,7 +1178,7 @@ function timeover(): bool
list($turnterm, $turntime) = $gameStor->getValuesAsArray(['turnterm', 'turntime']);
$diff = (new \DateTime())->getTimestamp() - (new \DateTime($turntime))->getTimestamp();
$t = min($turnterm, 5);
$t = min(abs($turnterm), 5);
$term = $diff;
if ($term >= $t || $term < 0) {
@@ -1175,6 +1200,12 @@ function checkDelay()
// 1턴이상 갱신 없었으면 서버 지연
$term = $gameStor->turnterm;
if($term < 0){
//가변 턴에는 수행 안함!
return;
}
if ($term >= 20) {
$threshold = 1;
} else if ($term >= 10) {
@@ -1254,10 +1285,14 @@ function turnDate($curtime)
$admin = $gameStor->getValues(['startyear', 'starttime', 'turnterm', 'year', 'month']);
$turn = $admin['starttime'];
$curturn = cutTurn($curtime, $admin['turnterm']);
$term = $admin['turnterm'];
$num = intdiv((strtotime($curturn) - strtotime($turn)), $term * 60);
if($term == -60){
$num = VarTurn60::calcTurnDiff(new \DateTimeImmutable($turn), new \DateTimeImmutable($curtime));
}
else{
$curturn = cutTurn($curtime, $admin['turnterm']);
$num = intdiv((strtotime($curturn) - strtotime($turn)), $term * 60);
}
$date = $admin['startyear'] * 12;
$date += $num;
@@ -2208,6 +2243,10 @@ function getRandTurn(RandUtil $rng, $term, ?\DateTimeInterface $baseDateTime = n
throw new MustNotBeReachedException();
}
if($term == -60){
[, $term] = VarTurn60::fromDatetime($baseDateTime)->cutTurn();
}
$randSecond = $rng->nextRangeInt(0, 60 * $term - 1);
$randFraction = $rng->nextRangeInt(0, 999999) / 1000000; //6자리 소수
@@ -2223,6 +2262,11 @@ function getRandTurn2(RandUtil $rng, $term, ?\DateTimeInterface $baseDateTime =
} else {
throw new MustNotBeReachedException();
}
if($term == -60){
[, $term] = VarTurn60::fromDatetime($baseDateTime)->cutTurn();
}
$randSecond = $rng->nextRangeInt(0, 60 * $term - 1);
$randFraction = $rng->nextRangeInt(0, 999999) / 1000000; //6자리 소수
+1 -1
View File
@@ -686,7 +686,7 @@ function TechLimit($startYear, $year, $tech) : bool {
$relYear = $year - $startYear;
$relMaxTech = Util::valueFit(
floor($relYear / 5) + 1,
floor($relYear / GameConst::$techLevelIncYear) + GameConst::$initialAllowedTechLevel,
1,
GameConst::$maxTechLevel
);
+1 -1
View File
@@ -559,7 +559,7 @@ function checkStatistic()
$nationHist = '';
foreach (GameConst::$availableNationType as $nationType) {
if (!Util::array_get($nationHists[$nationType])) {
if (!($nationHists[$nationType] ?? null)) {
$nationHists[$nationType] = '-';
}
$nationHist .= getNationType($nationType) . "({$nationHists[$nationType]}), ";
+8 -3
View File
@@ -138,7 +138,7 @@ function JSCitiesBasedOnDistance(int $cityNo, int $maxDistance = 1): array{
$distanceList = searchDistance($cityNo, $maxDistance, true);
$result = [];
for ($dist = 1; $dist <= $maxDistance; $dist++) {
$result[$dist] = Util::array_get($distanceList[$dist], []);
$result[$dist] = $distanceList[$dist] ?? [];
}
return $result;
}
@@ -152,7 +152,7 @@ function printCitiesBasedOnDistance(int $cityNo, int $maxDistance = 1): string
for ($dist = 1; $dist <= $maxDistance; $dist++) {
$cityList = array_map(function ($cityID) {
return CityConst::byID($cityID)->name;
}, Util::array_get($distanceList[$dist], []));
}, $distanceList[$dist] ?? []);
$cityStr = join(', ', $cityList);
@@ -181,7 +181,12 @@ function info($type = 0)
$admin = $gameStor->getValues(['year', 'month', 'turnterm', 'maxgeneral']);
$termtype = "{$admin['turnterm']}분 턴";
$turnTermText = $admin['turnterm'].'분';
if($admin['turnterm'] < 0){
$turnTermText = "가변 {$admin['turnterm']}분";
}
$termtype = "{$turnTermText}분 턴";
$gencount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc < 2');
$npccount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc >= 2');
+10 -4
View File
@@ -10,6 +10,7 @@ use sammo\Enums\InheritanceKey;
* @return int 토너먼트 초 단위
*/
function calcTournamentTerm(int $turnTerm): int{
$turnTerm = abs($turnTerm);
return Util::valueFit($turnTerm, 5, 120);
}
@@ -138,6 +139,7 @@ function processTournament()
function getTournamentTermText(int $turnTerm)
{
$turnTerm = abs($turnTerm);
$term = calcTournamentTerm($turnTerm);
if ($term % 60 === 0) {
@@ -342,7 +344,7 @@ function startBetting($type)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
[$year, $month, $startyear, $turnterm] = $gameStor->getValuesAsArray(['year', 'month', 'startyear', 'turnterm']);
[$year, $month, $startyear] = $gameStor->getValuesAsArray(['year', 'month', 'startyear']);
pushGlobalHistoryLog([
"<S>◆</>{$year}{$month}월:<B><b>【대회】</b></>우승자를 예상하는 <C>내기</>가 진행중입니다! 호사가의 참여를 기다립니다!"
], $year, $month);
@@ -1153,21 +1155,25 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type)
];
//막판 분노
$factor1 = 1.0;
$factor2 = 1.0;
$ratio = rand() % 300;
if ($e1 / 5 > $energy1 && $damage1 > $damage2 && $gen1[$tp] >= $ratio) {
$damage2 *= Util::round((rand() % 301 + 200) / 100); // 200 ~ 500%
$factor2 = Util::round((rand() % 301 + 200) / 100); // 200 ~ 500%
$critical1 = 1;
$str = Util::choiceRandom($crticialSkillMap[$tnmt_type]);
$log[] = "<S>●</> <Y>{$gen1['name']}</>의 분노의 <M>{$str}</> 공격!";
}
$ratio = rand() % 300;
if ($e2 / 5 > $energy2 && $damage2 > $damage1 && $gen2[$tp] >= $ratio) {
$damage1 *= Util::round((rand() % 301 + 200) / 100); // 200 ~ 500%
$factor1 = Util::round((rand() % 301 + 200) / 100); // 200 ~ 500%
$critical2 = 1;
$str = Util::choiceRandom($crticialSkillMap[$tnmt_type]);
$log[] = "<S>●</> <Y>{$gen2['name']}</>의 분노의 <M>{$str}</> 공격!";
}
$damage1 *= $factor1;
$damage2 *= $factor2;
//1합 승부
if ($phase == 1) {
+1
View File
@@ -54,6 +54,7 @@ if ($session->userGrade < 5 && !$allowReset) {
<label for="turnterm" class="col-sm-3 col-form-label">턴 시간(분)</label>
<div class="col-sm-9">
<div id="turnterm" class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<input type="radio" class="btn-check" name="turnterm" id="turnterm_var60" value="-60" checked><label for="turnterm_var60" class="btn btn-secondary">가변60</label>
<input type="radio" class="btn-check" name="turnterm" id="turnterm_120" value="120"><label for="turnterm_120" class="btn btn-secondary">120</label>
<input type="radio" class="btn-check" name="turnterm" id="turnterm_60" value="60" checked><label for="turnterm_60" class="btn btn-secondary">60</label>
<input type="radio" class="btn-check" name="turnterm" id="turnterm_30" value="30"><label for="turnterm_30" class="btn btn-secondary">30</label>
+1
View File
@@ -36,6 +36,7 @@ list(
$turnterm,
$npcmode
) = $gameStor->getValuesAsArray(['maxgeneral', 'turnterm', 'npcmode']);
$turnterm = abs($turnterm);
if($npcmode!=1){
Json::die([
+1 -1
View File
@@ -144,7 +144,7 @@ function do도시임명(General $general, int $cityID, int $targetOfficerLevel):
return '올바르지 않은 도시입니다';
}
if ($general->getVar(GeneralColumn::officer_level) >= 4 && $myPenalty[PenaltyKey::NoChiefChange->value] ?? false) {
if ($general->getVar(GeneralColumn::officer_level) >= 4 && ($myPenalty[PenaltyKey::NoChiefChange->value] ?? false)) {
return '수뇌인 장수를 변경할 수 없는 상태입니다.';
}
+1 -1
View File
@@ -41,7 +41,7 @@ $penaltyInfo = array_merge($memberPenalty['any'] ?? [], $memberPenalty[DB::prefi
$penalty = [];
foreach($penaltyInfo as $penaltyKey => $penaltyValue){
if($penaltyValue['expire'] ?? 0 > TimeUtil::now()){
if(($penaltyValue['expire'] ?? 0) > TimeUtil::now()){
$penalty[$penaltyKey] = $penaltyValue['value'];
}
}
+1 -1
View File
@@ -121,7 +121,7 @@ $builder->setOwner($userID);
$builder->setOwnerName($userNick);
$builder->setKillturn(5);
$builder->setNPCType(0);
$builder->setAuxVar('next_change', TimeUtil::nowAddMinutes(12 * $env['turnterm']));
$builder->setAuxVar('next_change', TimeUtil::nowAddMinutes(12 * abs($env['turnterm'])));
$builder->fillRemainSpecAsZero($env);
$builder->build($env);
$generalID = $builder->getGeneralID();
+2 -2
View File
@@ -60,7 +60,7 @@ $me->setAuxVar('use_auto_nation_turn', $use_auto_nation_turn);
$me->setVar('tnmt', $tnmt);
if ($me->getNPCType() == 1 && $detachNPC) {
$turnterm = $gameStor->turnterm;
$turnterm = abs($gameStor->turnterm);
if ($turnterm < 10) {
$targetKillTurn = 30 / $turnterm;
@@ -88,7 +88,7 @@ $penaltyInfo = array_merge($memberPenalty['any'] ?? [], $memberPenalty[DB::prefi
$penalty = [];
foreach ($penaltyInfo as $penaltyKey => $penaltyValue) {
if ($penaltyValue['expire'] ?? 0 > TimeUtil::now()) {
if (($penaltyValue['expire'] ?? 0) > TimeUtil::now()) {
$penalty[$penaltyKey] = $penaltyValue['value'];
}
}
+1
View File
@@ -39,6 +39,7 @@ list(
$npcmode,
$turnterm
) = $gameStor->getValuesAsArray(['year', 'month', 'maxgeneral', 'npcmode', 'turnterm']);
$turnterm = abs($turnterm);
if($npcmode!=2){
Json::die([
+3 -2
View File
@@ -51,8 +51,9 @@ function MessageBox($str)
function LogText($prefix, $variable)
{
$text = sprintf('%s : %s'."\r\n", $prefix, TVarDumper::dump($variable));
file_put_contents(ROOT.'/d_log/'.UniqueConst::$serverName.'_dbg_logs.txt', $text, FILE_APPEND);
return;
//$text = sprintf('%s : %s'."\r\n", $prefix, TVarDumper::dump($variable));
//file_put_contents(ROOT.'/d_log/'.UniqueConst::$serverName.'_dbg_logs.txt', $text, FILE_APPEND);
}
function prepareDir(string $dirPath, bool $forceCreate=true):bool{
+9 -1
View File
@@ -8,4 +8,12 @@ $session = Session::getInstance()->setReadOnly();
$db = DB::db();
TurnExecutionHelper::executeAllCommand();
$updated = false;
$locked = false;
$lastExecuted = TurnExecutionHelper::executeAllCommand($updated, $locked);
Json::die([
'result' => true,
'updated' => $updated,
'locked' => $locked,
'lastExecuted' => $lastExecuted,
]);
+3 -3
View File
@@ -526,7 +526,7 @@ function DeleteConflict($nation)
function getConquerNation($city): int
{
$conflict = Json::decode($city['conflict']);
return Util::array_first_key($conflict);
return array_key_first($conflict);
}
function ConquerCity(array $admin, General $general, array $city, array $defenderCityGeneralList)
@@ -785,8 +785,8 @@ function ConquerCity(array $admin, General $general, array $city, array $defende
'officer_set' => 0,
];
if ($city['level'] > 3) {
$query['def'] = 1000;
$query['wall'] = 1000;
$query['def'] = GameConst::$defaultCityWall;
$query['wall'] = GameConst::$defaultCityWall;
} else {
$query['def'] = $db->sqleval('def_max/2');
$query['wall'] = $db->sqleval('wall_max/2');
+15 -6
View File
@@ -28,6 +28,7 @@ use sammo\UniqueConst;
use sammo\UserLogger;
use sammo\Util;
use sammo\Validator;
use sammo\VarTurn60;
use sammo\WebUtil;
use function sammo\addTurn;
@@ -99,7 +100,7 @@ class Join extends \sammo\BaseAPI
}
$gameID = UniqueConst::$serverID;
$alreadyJoined = $db->queryFirstField('SELECT count(*) FROM `storage` WHERE `namespace` = %s AND `key` LIKE %s', 'inheritance_result', "{$gameID}_{$userID}_%");
$alreadyJoined = $db->queryFirstField('SELECT COUNT(*) FROM `inheritance_result` WHERE `server_id` = %s AND `owner` = %i', $gameID, $userID);
if ($alreadyJoined) {
//이미 받았음
return 0;
@@ -157,7 +158,7 @@ class Join extends \sammo\BaseAPI
$penalty = [];
foreach($penaltyInfo as $penaltyKey => $penaltyValue){
if($penaltyValue['expire'] ?? 0 > TimeUtil::now()){
if(($penaltyValue['expire'] ?? 0) > TimeUtil::now()){
$penalty[$penaltyKey] = $penaltyValue['value'];
}
}
@@ -355,20 +356,28 @@ class Join extends \sammo\BaseAPI
}
if ($inheritTurntimeZone !== null) {
$inheritTurntime = $inheritTurntimeZone * $admin['turnterm'];
$inheritTurntime += $rng->nextRangeInt(0, Util::clamp($admin['turnterm'] - 1, 0));
$turnterm = abs($admin['turnterm']);
$inheritTurntime = $inheritTurntimeZone * $turnterm;
$inheritTurntime += $rng->nextRangeInt(0, Util::clamp($turnterm - 1, 0));
$userLogger->push(sprintf("턴 시간 %02d:%02d 로 지정", intdiv($inheritTurntime, 60), $inheritTurntime % 60), "inheritPoint");
$inheritTurntime += $rng->nextRangeInt(0, 999999) / 1000000;
$turntime = new \DateTimeImmutable(cutTurn($admin['turntime'], $admin['turnterm']));
$turntime = new \DateTimeImmutable(cutTurn($admin['turntime'], $turnterm));
$turntime = $turntime->add(TimeUtil::secondsToDateInterval($inheritTurntime));
$turntime = TimeUtil::format($turntime, true);
} else {
$turntime = getRandTurn($rng, $admin['turnterm'], new \DateTimeImmutable($admin['turntime']));
$turntime = getRandTurn($rng, abs($admin['turnterm']), new \DateTimeImmutable($admin['turntime']));
}
if ($admin['turnterm'] == -60){
$baseObj = VarTurn60::fromDatetime(new \DateTimeImmutable($admin['turntime']));
$userTurnObj = VarTurn60::fromDatetime(new \DateTimeImmutable($turntime));
if($baseObj->turnIdx != $userTurnObj->turnIdx){
$turntime = $userTurnObj->addTurn(-1)->toDateStr();
}
}
$now = TimeUtil::now(true);
if ($now >= $turntime) {
@@ -62,7 +62,7 @@ class ResetTurnTime extends \sammo\BaseAPI
}
$gameStor = KVStorage::getStorage($db, 'game_env');
$turnTerm = $gameStor->getValue('turnterm');
$turnTerm = abs($gameStor->getValue('turnterm'));
$currTurnTime = new DateTimeImmutable($general->getTurnTime());
+1 -1
View File
@@ -46,7 +46,7 @@ abstract class AbsFromUserPool extends AbsGeneralPool{
$gameStor = KVStorage::getStorage($db, 'game_env');
$result = [];
$validUntil = TimeUtil::nowAddMinutes(2 * $gameStor->turnterm);
$validUntil = TimeUtil::nowAddMinutes(2 * abs($gameStor->turnterm));
while(count($result) < $pickCnt){
$cand = $rng->choiceUsingWeightPair($pool);
$poolID = $cand['id'];
@@ -15,7 +15,7 @@ class che_척사_오악진형도 extends \sammo\BaseItem{
public function getWarPowerMultiplier(WarUnit $unit):array{
$opposeCrewType = $unit->getOppose()->getCrewType();
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
if($opposeCrewType->reqCities() || $opposeCrewType->reqRegions()){
return [1.15, 0.85];
}
return [1, 1];
@@ -33,7 +33,7 @@ class event_전투특기_공성 extends \sammo\BaseItem{
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_SIEGE;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
@@ -28,7 +28,7 @@ class event_전투특기_궁병 extends \sammo\BaseItem{
if($statName === 'warAvoidRatio'){
return $value + 0.2;
}
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_ARCHER;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
@@ -28,7 +28,7 @@ class event_전투특기_귀병 extends \sammo\BaseItem{
if($statName === 'warMagicSuccessProb'){
return $value + 0.2;
}
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_WIZARD;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
@@ -32,7 +32,7 @@ class event_전투특기_기병 extends \sammo\BaseItem{
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_CAVALRY;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
@@ -33,7 +33,7 @@ class event_전투특기_보병 extends \sammo\BaseItem{
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_FOOTMAN;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
@@ -17,7 +17,7 @@ class event_전투특기_척사 extends \sammo\BaseItem{
public function getWarPowerMultiplier(WarUnit $unit):array{
$opposeCrewType = $unit->getOppose()->getCrewType();
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
if($opposeCrewType->reqCities() || $opposeCrewType->reqRegions()){
return [1.2, 0.8];
}
return [1, 1];
@@ -0,0 +1,68 @@
<?php
namespace sammo\ActionScenarioEffect;
use \sammo\iAction;
use sammo\Util;
use sammo\WarUnit;
use sammo\WarUnitCity;
use sammo\WarUnitTrigger\che_전멸시페이즈증가;
use sammo\WarUnitTriggerCaller;
class event_MoreEffect implements iAction
{
use \sammo\DefaultAction;
public function getWarPowerMultiplier(WarUnit $unit): array
{
if ($unit->isAttacker()) {
return [1.4, 0.7143];
}
return [1, 1];
}
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux = null): float
{
$scoreMap = [
'상업' => 2,
'농업' => 2,
'치안' => 2,
'기술' => 2,
'성벽' => 2,
'수비' => 2,
'인구' => 2,
'민심' => 2,
];
if ($turnType == 'changeDefenceTrain') {
return 0;
}
if ($varType === 'score' && key_exists($turnType, $scoreMap)) {
$multiplier = $scoreMap[$turnType];
$value *= $multiplier;
return $value;
}
return $value;
}
public function onCalcNationalIncome(string $type, $amount){
if($type == 'gold'){
return $amount * 2;
}
if($type == 'rice'){
return $amount * 2;
}
if($type == 'pop' && $amount > 0){
return $amount * 2;
}
return $amount;
}
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
{
return new WarUnitTriggerCaller(
new che_전멸시페이즈증가($unit),
);
}
}
@@ -35,7 +35,7 @@ class che_event_공성 extends \sammo\BaseSpecial{
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_SIEGE;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
@@ -31,7 +31,7 @@ class che_event_궁병 extends \sammo\BaseSpecial{
if($statName === 'warAvoidRatio'){
return $value + 0.2;
}
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_ARCHER;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
@@ -30,7 +30,7 @@ class che_event_귀병 extends \sammo\BaseSpecial{
if($statName === 'warMagicSuccessProb'){
return $value + 0.2;
}
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_WIZARD;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
@@ -35,7 +35,7 @@ class che_event_기병 extends \sammo\BaseSpecial{
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_CAVALRY;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
@@ -35,7 +35,7 @@ class che_event_보병 extends \sammo\BaseSpecial{
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_FOOTMAN;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
@@ -21,7 +21,7 @@ class che_event_척사 extends \sammo\BaseSpecial{
public function getWarPowerMultiplier(WarUnit $unit):array{
$opposeCrewType = $unit->getOppose()->getCrewType();
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
if($opposeCrewType->reqCities() || $opposeCrewType->reqRegions()){
return [1.2, 0.8];
}
return [1, 1];
+1 -1
View File
@@ -35,7 +35,7 @@ class che_공성 extends \sammo\BaseSpecial{
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_SIEGE;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
+1 -1
View File
@@ -31,7 +31,7 @@ class che_궁병 extends \sammo\BaseSpecial{
if($statName === 'warAvoidRatio'){
return $value + 0.2;
}
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_ARCHER;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
+1 -1
View File
@@ -30,7 +30,7 @@ class che_귀병 extends \sammo\BaseSpecial{
if($statName === 'warMagicSuccessProb'){
return $value + 0.2;
}
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_WIZARD;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
+1 -1
View File
@@ -35,7 +35,7 @@ class che_기병 extends \sammo\BaseSpecial{
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_CAVALRY;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
+1 -1
View File
@@ -35,7 +35,7 @@ class che_보병 extends \sammo\BaseSpecial{
}
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if(\sammo\Util::starts_with($statName, 'dex')){
if(str_starts_with($statName, 'dex')){
$myArmType = 'dex'.GameUnitConst::T_FOOTMAN;
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
if($aux['isAttacker'] && $opposeArmType === $statName){
+1 -1
View File
@@ -21,7 +21,7 @@ class che_척사 extends \sammo\BaseSpecial{
public function getWarPowerMultiplier(WarUnit $unit):array{
$opposeCrewType = $unit->getOppose()->getCrewType();
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
if($opposeCrewType->reqCities() || $opposeCrewType->reqRegions()){
return [1.2, 0.8];
}
return [1, 1];
+4 -4
View File
@@ -164,7 +164,7 @@ abstract class Auction
if ($date === null) {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$turnTerm = $gameStor->getValue('turnterm');
$turnTerm = abs($gameStor->getValue('turnterm'));
$date = $this->info->closeDate->add(TimeUtil::secondsToDateInterval(
max(static::MIN_EXTENSION_MINUTES_PER_BID, $turnTerm * static::COEFF_EXTENSION_MINUTES_PER_BID) * 60
));
@@ -324,7 +324,7 @@ abstract class Auction
}
$gameStor = KVStorage::getStorage($db, 'game_env');
$turnTerm = $gameStor->getValue('turnterm');
$turnTerm = abs($gameStor->getValue('turnterm'));
if ($this->info->detail->availableLatestBidCloseDate !== null) {
$extendedCloseDate = $now->add(TimeUtil::secondsToDateInterval(
@@ -437,7 +437,7 @@ abstract class Auction
$general->increaseVar($resType->value, -$morePoint);
$gameStor = KVStorage::getStorage($db, 'game_env');
$turnTerm = $gameStor->getValue('turnterm');
$turnTerm = abs($gameStor->getValue('turnterm'));
$extendedCloseDate = $now->add(TimeUtil::secondsToDateInterval(
max(static::MIN_EXTENSION_MINUTES_PER_BID, $turnTerm * static::COEFF_EXTENSION_MINUTES_PER_BID) * 60
));
@@ -471,7 +471,7 @@ abstract class Auction
if ($highestBid->aux->tryExtendCloseDate) {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$turnTerm = $gameStor->getValue('turnterm');
$turnTerm = abs($gameStor->getValue('turnterm'));
//연장 요청이 있었다.
$extendedCloseDate = $this->info->closeDate->add(TimeUtil::secondsToDateInterval(
+8 -2
View File
@@ -58,7 +58,7 @@ abstract class AuctionBasicResource extends Auction
$now = new \DateTimeImmutable();
$gameStor = KVStorage::getStorage($db, 'game_env');
$turnTerm = $gameStor->getValue('turnterm');
$turnTerm = abs($gameStor->getValue('turnterm'));
$closeDate = $now->add(TimeUtil::secondsToDateInterval($closeTurnCnt * $turnTerm * 60));
$openResult = static::openAuction(new AuctionInfo(
@@ -246,7 +246,13 @@ abstract class AuctionBasicResource extends Auction
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$turnTerm = $gameStor->getValue('turnterm');
$date = (new DateTimeImmutable())->add(TimeUtil::secondsToDateInterval($turnTerm * 60));
if($turnTerm == -60){
$date = VarTurn60::fromDatetime(new \DateTimeImmutable())->addTurn(1)->toDateStr();
}
else{
$date = (new DateTimeImmutable())->add(TimeUtil::secondsToDateInterval($turnTerm * 60));
}
$this->shrinkCloseDate($date);
}
+3 -2
View File
@@ -75,6 +75,7 @@ class AuctionUniqueItem extends Auction
$now = new DateTimeImmutable();
[$turnTerm, $year, $month] = $gameStor->getValuesAsArray(['turnterm', 'year', 'month']);
$turnTerm = abs($turnTerm);
$closeDate = $now->add(TimeUtil::secondsToDateInterval(
max(static::MIN_AUCTION_CLOSE_MINUTES, $turnTerm * static::COEFF_AUCTION_CLOSE_MINUTES) * 60
@@ -266,7 +267,7 @@ class AuctionUniqueItem extends Auction
}
if ($availableEquipUniqueCnt <= 0) {
$turnTerm = $gameStor->getValue('turnterm');
$turnTerm = abs($gameStor->getValue('turnterm'));
//제한에 걸렸다면 자동 연장
$extendedCloseDate = $this->info->closeDate->add(TimeUtil::secondsToDateInterval(
max(static::MIN_EXTENSION_MINUTES_BY_EXTENSION_QUERY, $turnTerm * static::COEFF_EXTENSION_MINUTES_LIMIT_UNIQUE_CNT) * 60
@@ -314,7 +315,7 @@ class AuctionUniqueItem extends Auction
if (!$availableItemTypes) {
if ($isExtendCloseDateRequired) {
$turnTerm = $gameStor->getValue('turnterm');
$turnTerm = abs($gameStor->getValue('turnterm'));
//동일 부위 제한에 걸렸다면 자동 연장
$extendedCloseDate = $this->info->closeDate->add(TimeUtil::secondsToDateInterval(
max(static::MIN_EXTENSION_MINUTES_LIMIT_BY_BID, $turnTerm * static::COEFF_EXTENSION_MINUTES_LIMIT_BY_BID) * 60
+14 -7
View File
@@ -5,6 +5,7 @@ use \sammo\{
Util, JosaUtil, DB,
General, GameConst,
ActionLogger,
Json,
LastTurn,
NotInheritedMethodException,
RandUtil
@@ -118,6 +119,7 @@ abstract class BaseCommand{
$nationID = $this->generalObj->getNationID();
if($nationID == 0){
$this->nation = $this->generalObj->getStaticNation();
$this->nation['aux'] = [];
return;
}
@@ -138,7 +140,8 @@ abstract class BaseCommand{
'gold'=>0,
'rice'=>2000,
'tech'=>0,
'gennum'=>1
'gennum'=>1,
'aux'=>'{}',
];
if($this->nation && $this->nation['nation'] === $nationID){
@@ -170,6 +173,10 @@ abstract class BaseCommand{
else{
$this->nation = $nation;
}
if(is_string($this->nation['aux'] ?? null)){
$this->nation['aux'] = Json::decode($this->nation['aux']);
}
}
protected function setDestGeneral(General $destGeneralObj){
@@ -312,12 +319,12 @@ abstract class BaseCommand{
$this->generalObj->unpackAux();
$constraintInput = [
'general'=>$this->generalObj->getRaw(),
'general'=>$this->generalObj,
'city'=>$this->city,
'nation'=>$this->nation,
'cmd_arg'=>$this->arg,
'destGeneral'=>$this->destGeneralObj?$this->destGeneralObj->getRaw():null,
'destGeneral'=>$this->destGeneralObj??null,
'destCity'=>$this->destCity,
'destNation'=>$this->destNation,
];
@@ -346,12 +353,12 @@ abstract class BaseCommand{
$this->generalObj->unpackAux();
$constraintInput = [
'general'=>$this->generalObj->getRaw(),
'general'=>$this->generalObj,
'city'=>$this->city,
'nation'=>$this->nation,
'cmd_arg'=>$this->arg,
'destGeneral'=>$this->destGeneralObj?$this->destGeneralObj->getRaw():null,
'destGeneral'=>$this->destGeneralObj??null,
'destCity'=>$this->destCity,
'destNation'=>$this->destNation,
];
@@ -384,12 +391,12 @@ abstract class BaseCommand{
$this->generalObj->unpackAux();
$constraintInput = [
'general'=>$this->generalObj->getRaw(),
'general'=>$this->generalObj,
'city'=>$this->city,
'nation'=>$this->nation,
'cmd_arg'=>$this->arg,
'destGeneral'=>$this->destGeneralObj?$this->destGeneralObj->getRaw():null,
'destGeneral'=>$this->destGeneralObj??null,
'destCity'=>$this->destCity,
'destNation'=>$this->destNation,
];
+1 -1
View File
@@ -183,7 +183,7 @@ class che_건국 extends Command\GeneralCommand
$general->addExperience($exp);
$general->addDedication($ded);
$aux = Json::decode($this->nation['aux']) ?? [];
$aux = $this->nation['aux'];
$aux['can_국기변경'] = 1;
$db->update('city', [
@@ -181,7 +181,7 @@ class che_랜덤임관 extends Command\GeneralCommand
if ($notIn) {
$rawGeneralsCnt = $db->query(
"SELECT g.`nation`, n.`gennum`, n.name, SUM((ra.value + 1000)/(rb.value + 1000)*(CASE WHEN g.`npc` < 2 THEN 1.2 ELSE 1 END)*(CASE WHEN g.`leadership` >= 40 THEN g.`leadership` ELSE 0 END)) AS warpower, SUM(SQRT(g.intel * g.strength) * 2 + g.leadership / 2)/5 AS develpower
"SELECT g.`nation`, n.`gennum`, n.name, SUM((ra.value + 50000)/(rb.value + 50000)*(CASE WHEN g.`npc` < 2 THEN 1.15 ELSE 1 END)*(CASE WHEN g.`leadership` >= 40 THEN g.`leadership` ELSE 0 END)) AS warpower, SUM(SQRT(g.intel * g.strength) * 2 + g.leadership / 2)/5 AS develpower
FROM general AS g
LEFT JOIN `rank_data` AS ra ON g.`no` = ra.general_id AND ra.`type` = 'killcrew_person'
LEFT JOIN `rank_data` AS rb ON g.`no` = rb.general_id AND rb.`type` = 'deathcrew_person'
@@ -193,7 +193,7 @@ class che_랜덤임관 extends Command\GeneralCommand
);
} else {
$rawGeneralsCnt = $db->query(
"SELECT g.`nation`, n.`gennum`, n.name, SUM((ra.value + 100)/(rb.value + 100)*(CASE WHEN g.`npc` < 2 THEN 1.2 ELSE 1 END)*(CASE WHEN g.`leadership` >= 40 THEN g.`leadership` ELSE 0 END)) AS warpower, SUM(SQRT(g.intel * g.strength) * 2 + g.leadership / 2)/5 AS develpower
"SELECT g.`nation`, n.`gennum`, n.name, SUM((ra.value + 50000)/(rb.value + 50000)*(CASE WHEN g.`npc` < 2 THEN 1.15 ELSE 1 END)*(CASE WHEN g.`leadership` >= 40 THEN g.`leadership` ELSE 0 END)) AS warpower, SUM(SQRT(g.intel * g.strength) * 2 + g.leadership / 2)/5 AS develpower
FROM general AS g
LEFT JOIN `rank_data` AS ra ON g.`no` = ra.general_id AND ra.`type` = 'killcrew_person'
LEFT JOIN `rank_data` AS rb ON g.`no` = rb.general_id AND rb.`type` = 'deathcrew_person'
@@ -208,7 +208,7 @@ class che_랜덤임관 extends Command\GeneralCommand
foreach ($rawGeneralsCnt as $nation) {
$calcCnt = $nation['warpower'] + $nation['develpower'];
if ($general->getNPCType() < 2 && Util::starts_with($nation['name'], 'ⓤ')) {
if ($general->getNPCType() < 2 && str_starts_with($nation['name'], 'ⓤ')) {
$calcCnt *= 100;
}
@@ -194,7 +194,7 @@ class che_무작위건국 extends Command\GeneralCommand
$general->addExperience($exp);
$general->addDedication($ded);
$aux = Json::decode($this->nation['aux']) ?? [];
$aux = $this->nation['aux'];
$aux['can_국기변경'] = 1;
$aux['can_무작위수도이전'] = 1;
+13 -14
View File
@@ -79,7 +79,7 @@ class che_징병 extends Command\GeneralCommand
protected function init()
{
$this->setCity();
$this->setNation(['tech']);
$this->setNation(['tech', 'aux']);
$this->minConditionConstraints = [
ConstraintHelper::NotBeNeutral(),
@@ -256,8 +256,11 @@ class che_징병 extends Command\GeneralCommand
$ownCities = [];
$ownRegions = [];
foreach (DB::db()->query('SELECT city, region from city where nation = %i', $general->getNationID()) as $city) {
$ownCities[$city['city']] = 1;
foreach (DB::db()->query('SELECT city, region, secu, level from city where nation = %i', $general->getNationID()) as $city) {
$ownCities[$city['city']] = [
'secu' => $city['secu'],
'level' => $city['level'],
];
$ownRegions[$city['region']] = 1;
}
@@ -273,23 +276,19 @@ class che_징병 extends Command\GeneralCommand
'values' => [],
];
$crewTypes = [];
foreach (GameUnitConst::byType($armType) as $unit) {
$crewObj = new \stdClass;
$crewObj->id = $unit->id;
$crewObj->reqTech = $unit->reqTech;
$crewObj->reqYear = $unit->reqYear;
/** @var ?\sammo\GameUnitConstraints\ReqTech */
$reqTechObj = $unit->reqConstraints['ReqTech'] ?? null;
$crewObj->reqTech = $reqTechObj ? $reqTechObj->reqTech : 0;
/*
if ($unit->reqTech == 0) {
$crewObj->bgcolor = 'green';
} else {
$crewObj->bgcolor = 'limegreen';
}
*/
/** @var ?\sammo\GameUnitConstraint\ReqMinRelYear */
$reqMinRelYearObj = $unit->reqConstraints['reqMinRelYear'] ?? null;
$crewObj->reqYear = $reqMinRelYearObj ? $reqMinRelYearObj->reqMinRelYear : 0;
$crewObj->notAvailable = !$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech);
$crewObj->notAvailable = !$unit->isValid($general, $ownCities, $ownRegions, $relativeYear, $tech, $this->nation['aux']);
$crewObj->baseRice = $general->onCalcDomestic($this->getName(), 'rice', $unit->riceWithTech($tech), ['armType' => $unit->armType]);
$crewObj->baseCost = $general->onCalcDomestic($this->getName(), 'cost', $unit->costWithTech($tech), ['armType' => $unit->armType]);
+1 -1
View File
@@ -164,7 +164,7 @@ class che_출병 extends Command\GeneralCommand
$currDist = 999;
$minDist = Util::array_first_key($distanceList);
$minDist = array_key_first($distanceList);
do {
//1: 최단 거리 도시 중 공격 대상이 있는가 확인
//2: 최단 거리 + 1 도시 중 공격 대상이 있는가 확인
+1 -1
View File
@@ -180,7 +180,7 @@ class cr_건국 extends Command\GeneralCommand
$general->addExperience($exp);
$general->addDedication($ded);
$aux = Json::decode($this->nation['aux']) ?? [];
$aux = $this->nation['aux'];
$aux['can_국기변경'] = 1;
$db->update('city', [
@@ -122,7 +122,7 @@ class che_국기변경 extends Command\NationCommand
$josaYi = JosaUtil::pick($generalName, '이');
$josaYiNation = JosaUtil::pick($nationName, '이');
$aux = Json::decode($this->nation['aux']);
$aux = $this->nation['aux'];
$aux["can_{$actionName}"] = 0;
$db->update('nation', [
@@ -140,7 +140,7 @@ class che_국호변경 extends Command\NationCommand
$josaYi = JosaUtil::pick($generalName, '이');
$josaYiNation = JosaUtil::pick($nationName, '이');
$aux = Json::decode($this->nation['aux']);
$aux = $this->nation['aux'];
$aux["can_{$actionName}"] = 0;
$db->update('nation', [
@@ -119,7 +119,7 @@ class che_무작위수도이전 extends Command\NationCommand
$josaYi = JosaUtil::pick($generalName, '이');
$josaYiNation = JosaUtil::pick($nationName, '이');
$aux = Json::decode($this->nation['aux']);
$aux = $this->nation['aux'];
$aux["can_무작위수도이전"] -= 1;
$db->update('city', [
@@ -200,7 +200,7 @@ class che_불가침제의 extends Command\NationCommand
$now = new \DateTime($date);
$validUntil = new \DateTime($date);
$validMinutes = max(30, $env['turnterm'] * 3);
$validMinutes = max(30, abs($env['turnterm']) * 3);
$validUntil->add(new \DateInterval("PT{$validMinutes}M"));
$josaWa = JosaUtil::pick($nationName, '와');
@@ -149,7 +149,7 @@ class che_불가침파기제의 extends Command\NationCommand{
$now = new \DateTime($date);
$validUntil = new \DateTime($date);
$validMinutes = max(30, $env['turnterm']*3);
$validMinutes = max(30, abs($env['turnterm'])*3);
$validUntil->add(new \DateInterval("PT{$validMinutes}M"));
$msg = new DiplomaticMessage(
@@ -147,7 +147,7 @@ class che_종전제의 extends Command\NationCommand{
$now = new \DateTime($date);
$validUntil = new \DateTime($date);
$validMinutes = max(30, $env['turnterm']*3);
$validMinutes = max(30, abs($env['turnterm'])*3);
$validUntil->add(new \DateInterval("PT{$validMinutes}M"));
$msg = new DiplomaticMessage(
+9 -1
View File
@@ -13,12 +13,14 @@ use \sammo\{
Message,
CityConst,
CityInitialDetail,
Json,
StaticEventHandler
};
use \sammo\Constraint\Constraint;
use \sammo\Constraint\ConstraintHelper;
use sammo\Enums\InheritanceKey;
use sammo\Enums\NationAuxKey;
use sammo\Event\Action;
class che_초토화 extends Command\NationCommand{
@@ -52,7 +54,7 @@ class che_초토화 extends Command\NationCommand{
$env = $this->env;
$this->setCity();
$this->setNation(['surlimit', 'gold', 'rice', 'capital']);
$this->setNation(['surlimit', 'gold', 'rice', 'capital', 'aux']);
$this->minConditionConstraints=[
ConstraintHelper::OccupiedCity(),
@@ -157,6 +159,11 @@ class che_초토화 extends Command\NationCommand{
$josaYiNation = JosaUtil::pick($nationName, '이');
$amount = $this->calcReturnAmount($destCity);
$aux = $this->nation['aux'];
if($destCity['level'] >= 8){
$aux[NationAuxKey::did_특성초토화->value] = ($aux[NationAuxKey::did_특성초토화->value] ?? 0) + 1;
}
$db->update('general', [
'experience'=>$db->sqleval('experience * 0.9')
@@ -184,6 +191,7 @@ class che_초토화 extends Command\NationCommand{
'gold' => $db->sqleval('gold + %i', $amount),
'rice' => $db->sqleval('rice + %i', $amount),
'surlimit' => $db->sqleval('surlimit + %i', $this->getPostReqTurn()),
'aux' => Json::encode($aux),
], 'nation=%i', $nationID);
\sammo\refreshNationStaticInfo();
@@ -0,0 +1,204 @@
<?php
namespace sammo\Command\Nation;
use \sammo\DB;
use \sammo\Util;
use \sammo\JosaUtil;
use \sammo\General;
use \sammo\DummyGeneral;
use \sammo\ActionLogger;
use \sammo\GameConst;
use \sammo\LastTurn;
use \sammo\GameUnitConst;
use \sammo\Command;
use \sammo\Constraint\Constraint;
use \sammo\Constraint\ConstraintHelper;
use sammo\Enums\GeneralQueryMode;
use sammo\StaticEventHandler;
use function sammo\pullGeneralCommand;
use function sammo\pushGeneralCommand;
class che_행동지시 extends Command\NationCommand
{
static protected $actionName = '행동 지시';
static public $reqArg = true;
protected function argTest(): bool
{
if ($this->arg === null) {
return false;
}
if (!key_exists('isPull', $this->arg)) {
return false;
}
if (!key_exists('amount', $this->arg)) {
return false;
}
if (!key_exists('destGeneralID', $this->arg)) {
return false;
}
$isPull = $this->arg['isPull'];
$amount = $this->arg['amount'];
$destGeneralID = $this->arg['destGeneralID'];
if (!is_numeric($amount)) {
return false;
}
if ($amount <= 0) {
return false;
}
if (!is_bool($isPull)) {
return false;
}
if (!is_int($destGeneralID)) {
return false;
}
if ($destGeneralID <= 0) {
return false;
}
$amount = Util::clamp($amount, 1, 5);
$this->arg = [
'isPull' => $isPull,
'amount' => $amount,
'destGeneralID' => $destGeneralID
];
return true;
}
protected function init()
{
$general = $this->generalObj;
$this->setCity();
$this->setNation();
$this->minConditionConstraints = [
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::SuppliedCity(),
];
}
protected function initWithArg()
{
$destGeneral = General::createObjFromDB($this->arg['destGeneralID']);
$this->setDestGeneral($destGeneral);
if($this->arg['destGeneralID'] == $this->getGeneral()->getID()){
$this->fullConditionConstraints=[
ConstraintHelper::AlwaysFail('본인입니다')
];
return;
}
$this->fullConditionConstraints = [
ConstraintHelper::NotBeNeutral(),
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::SuppliedCity(),
ConstraintHelper::ExistsDestGeneral(),
ConstraintHelper::FriendlyDestGeneral()
];
}
public function getCost(): array
{
return [0, 0];
}
public function getPreReqTurn(): int
{
return 0;
}
public function getPostReqTurn(): int
{
return 0;
}
public function getBrief(): string
{
$isPull = $this->arg['isPull'];
$amount = $this->arg['amount'];
$actSpecificName = $isPull ? '당기기' : '미루기';
$destGeneral = $this->destGeneralObj;
return "{$destGeneral->getName()}{$amount}{$actSpecificName}";
}
public function run(\Sammo\RandUtil $rng): bool
{
if (!$this->hasFullConditionMet()) {
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$db = DB::db();
$general = $this->generalObj;
$date = $general->getTurnTime($general::TURNTIME_HM);
$isPull = $this->arg['isPull'];
$amount = $this->arg['amount'];
$destGeneral = $this->destGeneralObj;
if($isPull){
pullGeneralCommand($destGeneral->getID(), $amount);
}
else{
pushGeneralCommand($destGeneral->getID(), $amount);
}
$logger = $general->getLogger();
$actDestText = $isPull ? '당겼습니다.' : '미루었습니다.';
$actText = $isPull ? '당기도록' : '미루도록';
$destGeneral->getLogger()->pushGeneralActionLog("<Y>{$general->getName()}</>의 지시로 <C>{$amount}</>턴을 {$actDestText}", ActionLogger::PLAIN);
$logger->pushGeneralActionLog("<Y>{$destGeneral->getName()}</>에게 <C>{$amount}</>턴을 {$actText} 지시했습니다. <1>$date</>");
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
$general->applyDB($db);
$destGeneral->applyDB($db);
return true;
}
public function exportJSVars(): array
{
$db = DB::db();
$nationID = $this->getNationID();
$troops = Util::convertArrayToDict($db->query('SELECT * FROM troop WHERE nation=%i', $nationID), 'troop_leader');
$destRawGenerals = Util::convertArrayToDict($db->queryAllLists('SELECT no,name,officer_level,npc,gold,rice,leadership,strength,intel,city,crew,train,atmos,troop FROM general WHERE nation = %i ORDER BY npc,binary(name)', $nationID), 0);
if($destRawGenerals){
foreach ($db->queryAllLists(
'SELECT general_id, brief FROM general_turn WHERE general_id IN %li AND turn_idx = 0',
array_keys($destRawGenerals)
) as [$generalID, $brief]) {
if (!key_exists($generalID, $destRawGenerals)) {
continue;
}
$destRawGenerals[$generalID][] = $brief;
}
}
return [
'procRes' => [
'troops' => $troops,
'generals' => array_values($destRawGenerals),
'generalsKey' => ['no', 'name', 'officerLevel', 'npc', 'gold', 'rice', 'leadership', 'strength', 'intel', 'cityID', 'crew', 'train', 'atmos', 'troopID', 'turn0Brief'],
'cities' => \sammo\JSOptionsForCities(),
'amountGuide' => [1, 2, 3, 4, 5],
'minAmount' => 1,
'maxAmount' => 5,
]
];
}
}
@@ -0,0 +1,108 @@
<?php
namespace sammo\Command\Nation;
use \sammo\Command;
use sammo\Constraint\ConstraintHelper;
use sammo\DB;
use sammo\Enums\InheritanceKey;
use sammo\Enums\NationAuxKey;
use \sammo\Util;
use \sammo\JosaUtil;
use sammo\Json;
use sammo\LastTurn;
use sammo\StaticEventHandler;
use sammo\GameConst;
class event_극병연구 extends Command\NationCommand{
static protected $actionName = '극병 연구';
static protected $auxType = NationAuxKey::can_극병사용;
protected function argTest():bool{
return true;
}
protected function init(){
$this->setCity();
$this->setNation(['gold','rice','aux']);
$this->fullConditionConstraints=[];
$name = static::$actionName;
[$reqGold, $reqRice] = $this->getCost();
$this->minConditionConstraints = [
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
];
$this->fullConditionConstraints = $this->minConditionConstraints;
}
public function getCommandDetailTitle():string{
$name = $this->getName();
[$reqGold, $reqRice] = $this->getCost();
$reqTurn = $this->getPreReqTurn()+1;
$reqGoldD5 = number_format($reqGold / 10000);
$reqRiceD5 = number_format($reqRice / 10000);
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
}
public function getPreReqTurn():int{
return 23;
}
public function getPostReqTurn():int{
return 0;
}
public function getCost():array{
return [100000, 100000];
}
public function run(\Sammo\RandUtil $rng):bool{
if(!$this->hasFullConditionMet()){
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$db = DB::db();
$general = $this->generalObj;
$nationID = $general->getNationID();
$actionName = static::$actionName;
$aux = $this->nation['aux'];
$aux[static::$auxType->value] = 1;
[$reqGold, $reqRice] = $this->getCost();
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$generalName = $general->getName();
$josaYi = JosaUtil::pick($generalName, '이');
$db->update('nation', [
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
'aux' => Json::encode($aux),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
}
}
@@ -0,0 +1,107 @@
<?php
namespace sammo\Command\Nation;
use \sammo\Command;
use sammo\Constraint\ConstraintHelper;
use sammo\DB;
use sammo\Enums\InheritanceKey;
use sammo\Enums\NationAuxKey;
use \sammo\Util;
use \sammo\JosaUtil;
use sammo\Json;
use sammo\LastTurn;
use sammo\StaticEventHandler;
use sammo\GameConst;
class event_대검병연구 extends Command\NationCommand{
static protected $actionName = '대검병 연구';
static protected $auxType = NationAuxKey::can_대검병사용;
protected function argTest():bool{
return true;
}
protected function init(){
$this->setCity();
$this->setNation(['gold','rice','aux']);
$this->fullConditionConstraints=[];
$name = static::$actionName;
[$reqGold, $reqRice] = $this->getCost();
$this->minConditionConstraints = [
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
];
$this->fullConditionConstraints = $this->minConditionConstraints;
}
public function getCommandDetailTitle():string{
$name = $this->getName();
[$reqGold, $reqRice] = $this->getCost();
$reqTurn = $this->getPreReqTurn()+1;
$reqGoldD5 = number_format($reqGold / 10000);
$reqRiceD5 = number_format($reqRice / 10000);
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
}
public function getPreReqTurn():int{
return 11;
}
public function getPostReqTurn():int{
return 0;
}
public function getCost():array{
return [50000, 50000];
}
public function run(\Sammo\RandUtil $rng):bool{
if(!$this->hasFullConditionMet()){
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$db = DB::db();
$general = $this->generalObj;
$nationID = $general->getNationID();
$actionName = static::$actionName;
$aux = $this->nation['aux'];
$aux[static::$auxType->value] = 1;
[$reqGold, $reqRice] = $this->getCost();
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$generalName = $general->getName();
$josaYi = JosaUtil::pick($generalName, '이');
$db->update('nation', [
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
'aux' => Json::encode($aux),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
}
}
@@ -0,0 +1,107 @@
<?php
namespace sammo\Command\Nation;
use \sammo\Command;
use sammo\Constraint\ConstraintHelper;
use sammo\DB;
use sammo\Enums\InheritanceKey;
use sammo\Enums\NationAuxKey;
use \sammo\Util;
use \sammo\JosaUtil;
use sammo\Json;
use sammo\LastTurn;
use sammo\StaticEventHandler;
use sammo\GameConst;
class event_무희연구 extends Command\NationCommand{
static protected $actionName = '무희 연구';
static protected $auxType = NationAuxKey::can_무희사용;
protected function argTest():bool{
return true;
}
protected function init(){
$this->setCity();
$this->setNation(['gold','rice','aux']);
$this->fullConditionConstraints=[];
$name = static::$actionName;
[$reqGold, $reqRice] = $this->getCost();
$this->minConditionConstraints = [
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
];
$this->fullConditionConstraints = $this->minConditionConstraints;
}
public function getCommandDetailTitle():string{
$name = $this->getName();
[$reqGold, $reqRice] = $this->getCost();
$reqTurn = $this->getPreReqTurn()+1;
$reqGoldD5 = number_format($reqGold / 10000);
$reqRiceD5 = number_format($reqRice / 10000);
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
}
public function getPreReqTurn():int{
return 23;
}
public function getPostReqTurn():int{
return 0;
}
public function getCost():array{
return [100000, 100000];
}
public function run(\Sammo\RandUtil $rng):bool{
if(!$this->hasFullConditionMet()){
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$db = DB::db();
$general = $this->generalObj;
$nationID = $general->getNationID();
$actionName = static::$actionName;
$aux = $this->nation['aux'];
$aux[static::$auxType->value] = 1;
[$reqGold, $reqRice] = $this->getCost();
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$generalName = $general->getName();
$josaYi = JosaUtil::pick($generalName, '이');
$db->update('nation', [
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
'aux' => Json::encode($aux),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
}
}
@@ -0,0 +1,107 @@
<?php
namespace sammo\Command\Nation;
use \sammo\Command;
use sammo\Constraint\ConstraintHelper;
use sammo\DB;
use sammo\Enums\InheritanceKey;
use sammo\Enums\NationAuxKey;
use \sammo\Util;
use \sammo\JosaUtil;
use sammo\Json;
use sammo\LastTurn;
use sammo\StaticEventHandler;
use sammo\GameConst;
class event_산저병연구 extends Command\NationCommand{
static protected $actionName = '산저병 연구';
static protected $auxType = NationAuxKey::can_산저병사용;
protected function argTest():bool{
return true;
}
protected function init(){
$this->setCity();
$this->setNation(['gold','rice','aux']);
$this->fullConditionConstraints=[];
$name = static::$actionName;
[$reqGold, $reqRice] = $this->getCost();
$this->minConditionConstraints = [
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
];
$this->fullConditionConstraints = $this->minConditionConstraints;
}
public function getCommandDetailTitle():string{
$name = $this->getName();
[$reqGold, $reqRice] = $this->getCost();
$reqTurn = $this->getPreReqTurn()+1;
$reqGoldD5 = number_format($reqGold / 10000);
$reqRiceD5 = number_format($reqRice / 10000);
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
}
public function getPreReqTurn():int{
return 11;
}
public function getPostReqTurn():int{
return 0;
}
public function getCost():array{
return [50000, 50000];
}
public function run(\Sammo\RandUtil $rng):bool{
if(!$this->hasFullConditionMet()){
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$db = DB::db();
$general = $this->generalObj;
$nationID = $general->getNationID();
$actionName = static::$actionName;
$aux = $this->nation['aux'];
$aux[static::$auxType->value] = 1;
[$reqGold, $reqRice] = $this->getCost();
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$generalName = $general->getName();
$josaYi = JosaUtil::pick($generalName, '이');
$db->update('nation', [
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
'aux' => Json::encode($aux),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
}
}
@@ -0,0 +1,107 @@
<?php
namespace sammo\Command\Nation;
use \sammo\Command;
use sammo\Constraint\ConstraintHelper;
use sammo\DB;
use sammo\Enums\InheritanceKey;
use sammo\Enums\NationAuxKey;
use \sammo\Util;
use \sammo\JosaUtil;
use sammo\Json;
use sammo\LastTurn;
use sammo\StaticEventHandler;
use sammo\GameConst;
class event_상병연구 extends Command\NationCommand{
static protected $actionName = '상병 연구';
static protected $auxType = NationAuxKey::can_상병사용;
protected function argTest():bool{
return true;
}
protected function init(){
$this->setCity();
$this->setNation(['gold','rice','aux']);
$this->fullConditionConstraints=[];
$name = static::$actionName;
[$reqGold, $reqRice] = $this->getCost();
$this->minConditionConstraints = [
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
];
$this->fullConditionConstraints = $this->minConditionConstraints;
}
public function getCommandDetailTitle():string{
$name = $this->getName();
[$reqGold, $reqRice] = $this->getCost();
$reqTurn = $this->getPreReqTurn()+1;
$reqGoldD5 = number_format($reqGold / 10000);
$reqRiceD5 = number_format($reqRice / 10000);
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
}
public function getPreReqTurn():int{
return 23;
}
public function getPostReqTurn():int{
return 0;
}
public function getCost():array{
return [100000, 100000];
}
public function run(\Sammo\RandUtil $rng):bool{
if(!$this->hasFullConditionMet()){
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$db = DB::db();
$general = $this->generalObj;
$nationID = $general->getNationID();
$actionName = static::$actionName;
$aux = $this->nation['aux'];
$aux[static::$auxType->value] = 1;
[$reqGold, $reqRice] = $this->getCost();
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$generalName = $general->getName();
$josaYi = JosaUtil::pick($generalName, '이');
$db->update('nation', [
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
'aux' => Json::encode($aux),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
}
}
@@ -0,0 +1,107 @@
<?php
namespace sammo\Command\Nation;
use \sammo\Command;
use sammo\Constraint\ConstraintHelper;
use sammo\DB;
use sammo\Enums\InheritanceKey;
use sammo\Enums\NationAuxKey;
use \sammo\Util;
use \sammo\JosaUtil;
use sammo\Json;
use sammo\LastTurn;
use sammo\StaticEventHandler;
use sammo\GameConst;
class event_원융노병연구 extends Command\NationCommand{
static protected $actionName = '원융노병 연구';
static protected $auxType = NationAuxKey::can_원융노병사용;
protected function argTest():bool{
return true;
}
protected function init(){
$this->setCity();
$this->setNation(['gold','rice','aux']);
$this->fullConditionConstraints=[];
$name = static::$actionName;
[$reqGold, $reqRice] = $this->getCost();
$this->minConditionConstraints = [
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
];
$this->fullConditionConstraints = $this->minConditionConstraints;
}
public function getCommandDetailTitle():string{
$name = $this->getName();
[$reqGold, $reqRice] = $this->getCost();
$reqTurn = $this->getPreReqTurn()+1;
$reqGoldD5 = number_format($reqGold / 10000);
$reqRiceD5 = number_format($reqRice / 10000);
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
}
public function getPreReqTurn():int{
return 23;
}
public function getPostReqTurn():int{
return 0;
}
public function getCost():array{
return [100000, 100000];
}
public function run(\Sammo\RandUtil $rng):bool{
if(!$this->hasFullConditionMet()){
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$db = DB::db();
$general = $this->generalObj;
$nationID = $general->getNationID();
$actionName = static::$actionName;
$aux = $this->nation['aux'];
$aux[static::$auxType->value] = 1;
[$reqGold, $reqRice] = $this->getCost();
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$generalName = $general->getName();
$josaYi = JosaUtil::pick($generalName, '이');
$db->update('nation', [
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
'aux' => Json::encode($aux),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
}
}
@@ -0,0 +1,107 @@
<?php
namespace sammo\Command\Nation;
use \sammo\Command;
use sammo\Constraint\ConstraintHelper;
use sammo\DB;
use sammo\Enums\InheritanceKey;
use sammo\Enums\NationAuxKey;
use \sammo\Util;
use \sammo\JosaUtil;
use sammo\Json;
use sammo\LastTurn;
use sammo\StaticEventHandler;
use sammo\GameConst;
class event_음귀병연구 extends Command\NationCommand{
static protected $actionName = '음귀병 연구';
static protected $auxType = NationAuxKey::can_음귀병사용;
protected function argTest():bool{
return true;
}
protected function init(){
$this->setCity();
$this->setNation(['gold','rice','aux']);
$this->fullConditionConstraints=[];
$name = static::$actionName;
[$reqGold, $reqRice] = $this->getCost();
$this->minConditionConstraints = [
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
];
$this->fullConditionConstraints = $this->minConditionConstraints;
}
public function getCommandDetailTitle():string{
$name = $this->getName();
[$reqGold, $reqRice] = $this->getCost();
$reqTurn = $this->getPreReqTurn()+1;
$reqGoldD5 = number_format($reqGold / 10000);
$reqRiceD5 = number_format($reqRice / 10000);
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
}
public function getPreReqTurn():int{
return 11;
}
public function getPostReqTurn():int{
return 0;
}
public function getCost():array{
return [50000, 50000];
}
public function run(\Sammo\RandUtil $rng):bool{
if(!$this->hasFullConditionMet()){
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$db = DB::db();
$general = $this->generalObj;
$nationID = $general->getNationID();
$actionName = static::$actionName;
$aux = $this->nation['aux'];
$aux[static::$auxType->value] = 1;
[$reqGold, $reqRice] = $this->getCost();
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$generalName = $general->getName();
$josaYi = JosaUtil::pick($generalName, '이');
$db->update('nation', [
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
'aux' => Json::encode($aux),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
}
}
@@ -0,0 +1,107 @@
<?php
namespace sammo\Command\Nation;
use \sammo\Command;
use sammo\Constraint\ConstraintHelper;
use sammo\DB;
use sammo\Enums\InheritanceKey;
use sammo\Enums\NationAuxKey;
use \sammo\Util;
use \sammo\JosaUtil;
use sammo\Json;
use sammo\LastTurn;
use sammo\StaticEventHandler;
use sammo\GameConst;
class event_화륜차연구 extends Command\NationCommand{
static protected $actionName = '화륜차 연구';
static protected $auxType = NationAuxKey::can_화륜차사용;
protected function argTest():bool{
return true;
}
protected function init(){
$this->setCity();
$this->setNation(['gold','rice','aux']);
$this->fullConditionConstraints=[];
$name = static::$actionName;
[$reqGold, $reqRice] = $this->getCost();
$this->minConditionConstraints = [
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
];
$this->fullConditionConstraints = $this->minConditionConstraints;
}
public function getCommandDetailTitle():string{
$name = $this->getName();
[$reqGold, $reqRice] = $this->getCost();
$reqTurn = $this->getPreReqTurn()+1;
$reqGoldD5 = number_format($reqGold / 10000);
$reqRiceD5 = number_format($reqRice / 10000);
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
}
public function getPreReqTurn():int{
return 23;
}
public function getPostReqTurn():int{
return 0;
}
public function getCost():array{
return [100000, 100000];
}
public function run(\Sammo\RandUtil $rng):bool{
if(!$this->hasFullConditionMet()){
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$db = DB::db();
$general = $this->generalObj;
$nationID = $general->getNationID();
$actionName = static::$actionName;
$aux = $this->nation['aux'];
$aux[static::$auxType->value] = 1;
[$reqGold, $reqRice] = $this->getCost();
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$generalName = $general->getName();
$josaYi = JosaUtil::pick($generalName, '이');
$db->update('nation', [
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
'aux' => Json::encode($aux),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
}
}
@@ -0,0 +1,107 @@
<?php
namespace sammo\Command\Nation;
use \sammo\Command;
use sammo\Constraint\ConstraintHelper;
use sammo\DB;
use sammo\Enums\InheritanceKey;
use sammo\Enums\NationAuxKey;
use \sammo\Util;
use \sammo\JosaUtil;
use sammo\Json;
use sammo\LastTurn;
use sammo\StaticEventHandler;
use sammo\GameConst;
class event_화시병연구 extends Command\NationCommand{
static protected $actionName = '화시병 연구';
static protected $auxType = NationAuxKey::can_화시병사용;
protected function argTest():bool{
return true;
}
protected function init(){
$this->setCity();
$this->setNation(['gold','rice','aux']);
$this->fullConditionConstraints=[];
$name = static::$actionName;
[$reqGold, $reqRice] = $this->getCost();
$this->minConditionConstraints = [
ConstraintHelper::OccupiedCity(),
ConstraintHelper::BeChief(),
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
];
$this->fullConditionConstraints = $this->minConditionConstraints;
}
public function getCommandDetailTitle():string{
$name = $this->getName();
[$reqGold, $reqRice] = $this->getCost();
$reqTurn = $this->getPreReqTurn()+1;
$reqGoldD5 = number_format($reqGold / 10000);
$reqRiceD5 = number_format($reqRice / 10000);
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
}
public function getPreReqTurn():int{
return 11;
}
public function getPostReqTurn():int{
return 0;
}
public function getCost():array{
return [50000, 50000];
}
public function run(\Sammo\RandUtil $rng):bool{
if(!$this->hasFullConditionMet()){
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
}
$db = DB::db();
$general = $this->generalObj;
$nationID = $general->getNationID();
$actionName = static::$actionName;
$aux = $this->nation['aux'];
$aux[static::$auxType->value] = 1;
[$reqGold, $reqRice] = $this->getCost();
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$generalName = $general->getName();
$josaYi = JosaUtil::pick($generalName, '이');
$db->update('nation', [
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
'aux' => Json::encode($aux),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
}
}
+1 -1
View File
@@ -50,7 +50,7 @@ class AllowJoinDestNation extends Constraint{
return false;
}
if(($this->general['npc']??2 < 2) && \str_starts_with($this->destNation['name'], 'ⓤ')){
if((($this->general['npc']??2) < 2) && \str_starts_with($this->destNation['name'], 'ⓤ')){
$this->reason = "유저장은 태수국에 임관할 수 없습니다.";
return false;
}
@@ -6,9 +6,10 @@ use \sammo\GameUnitConst;
use \sammo\DB;
use \sammo\KVStorage;
use \sammo\CityConst;
use sammo\Json;
class AvailableRecruitCrewType extends Constraint{
const REQ_VALUES = Constraint::REQ_NATION|Constraint::REQ_INT_ARG;
const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_NATION|Constraint::REQ_INT_ARG;
public function checkInputValues(bool $throwExeception=true):bool{
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
@@ -47,13 +48,22 @@ class AvailableRecruitCrewType extends Constraint{
$ownCities = [];
$ownRegions = [];
foreach($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i', $nationID) as $ownCity){
$ownCities[$ownCity] = 1;
$ownRegions[CityConst::byId($ownCity)->region] = 1;
foreach($db->query('SELECT city, region, secu, level FROM city WHERE nation = %i', $nationID) as $ownCity){
$ownCityID = $ownCity['city'];
$ownCities[$ownCityID] = [
'secu'=>$ownCity['secu'],
'level'=>$ownCity['level'],
];
$ownRegions[CityConst::byId($ownCityID)->region] = 1;
}
$nationAux = $this->nation['aux'] ?? null;
if($nationAux === null){
$nationAux = Json::decode($db->queryFirstField('SELECT aux FROM nation WHERE id = %i', $nationID) ?? "{}");
}
$crewType = GameUnitConst::byID($this->arg);
if($crewType->isValid($ownCities, $ownRegions, $year - $startyear, $tech)){
if($crewType->isValid($this->generalObj, $ownCities, $ownRegions, $year - $startyear, $tech, $nationAux)){
return true;
}
+12 -4
View File
@@ -2,6 +2,8 @@
namespace sammo\Constraint;
use sammo\General;
abstract class Constraint
{
private function __construct()
@@ -24,6 +26,8 @@ abstract class Constraint
const REQ_VALUES = 0;
/** @var ?General */
protected $generalObj = null;
protected $general = null;
protected $city = null;
protected $nation = null;
@@ -33,6 +37,8 @@ abstract class Constraint
protected $cmd_arg = null;
/** @var ?General */
protected $destGeneralObj = null;
protected $destGeneral = null;
protected $destCity = null;
protected $destNation = null;
@@ -48,9 +54,10 @@ abstract class Constraint
return static::REQ_VALUES;
}
public function setGeneral(array $general)
public function setGeneral(General $general)
{
$this->general = $general;
$this->generalObj = $general;
$this->general = $general->getRaw();
$this->tested = false;
$this->reason = null;
}
@@ -85,9 +92,10 @@ abstract class Constraint
$this->reason = null;
}
public function setDestGeneral(array $general)
public function setDestGeneral(General $general)
{
$this->destGeneral = $general;
$this->destGeneralObj = $general;
$this->destGeneral = $general->getRaw();
$this->tested = false;
$this->reason = null;
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace sammo\Enums;
// Nation['aux'] 에서 지정될 수 있는 키
enum NationAuxKey: string
{
case can_국기변경 = 'can_국기변경';
case can_국호변경 = 'can_국호변경';
case did_특성초토화 = 'did_특성초토화';
// 이벤트
case can_무작위수도이전 = 'can_무작위수도이전';
case can_대검병사용 = 'can_대검병사용';
case can_극병사용 = 'can_극병사용';
case can_화시병사용 = 'can_화시병사용';
case can_원융노병사용 = 'can_원융노병사용';
case can_산저병사용 = 'can_산저병사용';
case can_상병사용 = 'can_상병사용';
case can_음귀병사용 = 'can_음귀병사용';
case can_무희사용 = 'can_무희사용';
case can_화륜차사용 = 'can_화륜차사용';
}
+17
View File
@@ -14,6 +14,13 @@ class ChangeCity extends \sammo\Event\Action{
'def'=>true,
'wall'=>true,
'trade'=>true,
'pop_max'=>true,
'agri_max'=>true,
'comm_max'=>true,
'secu_max'=>true,
'def_max'=>true,
'wall_max'=>true,
];
const REGEXP_PERCENT = '/^(\d+(\.\d+)?)%$/';// 123.5% [1]=float
const REGEXP_MATH = '/^([\+\-\/\*])(\d+(\.\d+)?)$/'; //+30 [1]=기호, [2]=float
@@ -120,6 +127,16 @@ class ChangeCity extends \sammo\Event\Action{
return DB::db()->sqleval('ROUND(%b * %d, 0)', $keyMax, $value/100);
}
if(str_ends_with($key, '_max') && preg_match(self::REGEXP_MATH, $value, $matches)){
//key가 아예 최대치에 대한 값이면 연산은 결과값이 0보다만 높게.
$op = $matches[1];
$value = $matches[2];
if($op == '/' && $value == 0){
throw new \InvalidArgumentException('0으로 나눌 수 없습니다.');
}
return DB::db()->sqleval('greatest(0, ROUND(%b '.$op.' %i, 0))', $key, $value);
}
if(preg_match(self::REGEXP_MATH, $value, $matches)){
$op = $matches[1];
$value = $matches[2];
+1 -1
View File
@@ -120,7 +120,7 @@ class RaiseInvader extends \sammo\Event\Action
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->setValue('isunited', 1);
$turnterm = $gameStor->turnterm;
$turnterm = abs($gameStor->turnterm);
$generalCnt = $db->queryFirstField('SELECT count(*) FROM general');
if ($npcEachCount < 0) {
+1 -1
View File
@@ -134,7 +134,7 @@ class UpdateNationLevel extends \sammo\Event\Action
if ($levelDiff) {
//유니크 아이템 하나 돌리자
$targetKillTurn = $env['killturn'];
$targetKillTurn -= 24 * 60 / $env['turnterm'];
$targetKillTurn -= 24 * 60 / abs($env['turnterm']);
$nationGenIDList = $db->queryFirstColumn(
'SELECT no FROM general WHERE nation = %i AND killturn >= %i AND npc < 2',
$nation['nation'],
+9
View File
@@ -94,6 +94,11 @@ class GameConstBase
/** @var int 최대 레벨 */
public static $maxLevel = 255;
/** @var int 기술등급 허용 증가 단위 년 */
public static $techLevelIncYear = 5;
/** @var int 초기 기술등급 */
public static $initialAllowedTechLevel = 1;
/** @var int 최소 인구 증가량 */
public static $basePopIncreaseAmount = 5000;
/** @var int 증축시 인구 증가량 */
@@ -109,6 +114,9 @@ class GameConstBase
/** @var int 징병 허용 최소 인구 */
public static $minAvailableRecruitPop = 30000;
/** @var int 점령 후 일반 도시 성벽 */
public static $defaultCityWall = 1000;
/** @var int 초기 제한시 장수 제한 */
public static $initialNationGenLimit = 10;
@@ -376,6 +384,7 @@ class GameConstBase
'che_포상',
'che_몰수',
'che_부대탈퇴지시',
'che_행동지시',
],
'외교' => [
'che_물자원조',
+333 -401
View File
@@ -1,6 +1,13 @@
<?php
namespace sammo;
use sammo\GameUnitConstraint\Impossible;
use sammo\GameUnitConstraint\ReqTech;
use sammo\GameUnitConstraint\ReqCities;
use sammo\GameUnitConstraint\ReqRegions;
use sammo\GameUnitConstraint\ReqMinRelYear;
class GameUnitConstBase{
protected function __construct(){
@@ -21,8 +28,6 @@ class GameUnitConstBase{
protected static $constID = [];
protected static $constName = [];
protected static $constCity = [];
protected static $constRegion = [];
protected static $constType = [];
protected static $typeData = [
@@ -33,319 +38,322 @@ class GameUnitConstBase{
self::T_SIEGE => '차병',
];
protected static $_buildData = [
[
1000, self::T_CASTLE, '성벽',
100, 100, 7, 0, 0, 99, 9,
999999, null, null, 999999,
[],//성벽은 공격할 수 없다.
[self::T_FOOTMAN=>1.2],
['성벽입니다.','생성할 수 없습니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1100, self::T_FOOTMAN, '보병',
100, 150, 7, 10, 0, 9, 9,
0, null, null, 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['표준적인 보병입니다.','보병은 방어특화이며,','상대가 회피하기 어렵습니다.'],
null, ['che_방어력증가5p'], null
],
[
1101, self::T_FOOTMAN, '청주병',
100, 200, 7, 10, 0, 10, 11,
1000, null, ['중원'], 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['저렴하고 튼튼합니다.'],
null, ['che_방어력증가5p'], null
],
[
1102, self::T_FOOTMAN, '수병',
150, 150, 7, 10, 0, 11, 10,
1000, null, ['오월'], 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['저렴하고 강력합니다.'],
null, ['che_방어력증가5p'], null
],
[
1103, self::T_FOOTMAN, '자객병',
100, 150, 8, 20, 0, 10, 10,
2000, ['저'], null, 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['은밀하고 날쌥니다.'],
null, ['che_방어력증가5p'], null
],
[
1104, self::T_FOOTMAN, '근위병',
150, 200, 7, 10, 0, 12, 12,
3000, ['낙양'], null, 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['최강의 보병입니다.'],
null, ['che_방어력증가5p'], null
],
[
1105, self::T_FOOTMAN, '등갑병',
100, 225, 7, 5, 0, 13, 10,
1000, null, ['남중'], 0,
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['등갑을 두른 보병입니다.'],
null, ['che_방어력증가5p'], null
],
[
1106, self::T_FOOTMAN, '백이병',
175, 175, 7, 5, 0, 13, 11,
3000, ['성도'], null, 0,
[self::T_ARCHER=>1.1, self::T_CAVALRY=>0.9, self::T_SIEGE=>1.1],
[self::T_ARCHER=>0.9, self::T_CAVALRY=>1.1, self::T_SIEGE=>0.9],
['정예 보병입니다. 불리한 싸움도 버텨냅니다.'],
null, ['che_방어력증가5p'], null
],
[
1200, self::T_ARCHER, '궁병',
100, 100, 7, 10, 0, 10, 10,
0, null, null, 0,
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['표준적인 궁병입니다.','궁병은 선제사격을 하는 병종입니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1201, self::T_ARCHER, '궁기병',
100, 100, 8, 20, 0, 11, 12,
1000, null, ['동이'], 0,
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.9, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.1, self::T_SIEGE=>0.8],
['말을 타고 잘 피합니다. 특히 다른 궁병보다 보병에게 조금 더 강합니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1202, self::T_ARCHER, '연노병',
150, 100, 8, 10, 0, 12, 11,
1000, null, ['서촉'], 0,
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['화살을 연사합니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1203, self::T_ARCHER, '강궁병',
150, 150, 7, 10, 0, 13, 13,
3000, ['양양'], null, 0,
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['강건한 궁병입니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1204, self::T_ARCHER, '석궁병',
200, 100, 7, 10, 0, 13, 13,
3000, ['건업'], null, 0,
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['강력한 화살을 쏩니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1300, self::T_CAVALRY, '기병',
150, 100, 7, 5, 0, 11, 11,
0, null, null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['표준적인 기병입니다.','기병은 공격특화입니다.'],
null, ['che_기병병종전투'], null
],
[
1301, self::T_CAVALRY, '백마병',
200, 100, 7, 5, 0, 12, 13,
1000, null, ['하북'], 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['백마의 위용을 보여줍니다.'],
null, ['che_기병병종전투'], null
],
[
1302, self::T_CAVALRY, '중장기병',
150, 150, 7, 5, 0, 13, 12,
1000, null, ['서북'], 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['갑주를 두른 기병입니다.'],
null, ['che_기병병종전투'], null
],
[
1303, self::T_CAVALRY, '돌격기병',
200, 100, 8, 5, 0, 13, 11,
2000, ['흉노'], null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['저돌적으로 공격합니다.'],
null, ['che_기병병종전투'], null
],
[
1304, self::T_CAVALRY, '철기병',
100, 250, 7, 5, 0, 11, 13,
2000, ['강'], null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['철갑을 두른 기병입니다.'],
null, ['che_기병병종전투'], null
],
[
1305, self::T_CAVALRY, '수렵기병',
150, 100, 8, 15, 0, 12, 12,
2000, ['산월'], null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['날쎄고 빠른 기병입니다.'],
null, ['che_기병병종전투'], null
],
[
1306, self::T_CAVALRY, '맹수병',
250, 175, 6, 0, 0, 16, 16,
2000, ['남만'], null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['어느 누구보다 강력합니다.'],
null, ['che_기병병종전투'], null
],
[
1307, self::T_CAVALRY, '호표기병',
200, 150, 7, 5, 0, 14, 14,
3000, ['허창'], null, 0,
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['정예 기병입니다.'],
null, ['che_기병병종전투'], null
],
[
1400, self::T_WIZARD, '귀병',
80, 80, 7, 5, 0.5, 9, 9,
0, null, null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['계략을 사용하는 병종입니다.'],
null, null, null
],
[
1401, self::T_WIZARD, '신귀병',
80, 80, 7, 20, 0.6, 10, 10,
1000, null, ['초'], 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['신출귀몰한 귀병입니다.'],
null, null, null
],
[
1402, self::T_WIZARD, '백귀병',
80, 130, 7, 5, 0.6, 9, 11,
2000, ['오환'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['저렴하고 튼튼합니다.'],
null, null, null
],
[
1403, self::T_WIZARD, '흑귀병',
130, 80, 7, 5, 0.6, 11, 9,
2000, ['왜'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['저렴하고 강력합니다.'],
null, null, null
],
[
1404, self::T_WIZARD, '악귀병',
130, 130, 7, 0, 0.6, 12, 12,
3000, ['장안'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['백병전에도 능숙합니다.'],
null, null, null
],
[
1405, self::T_WIZARD, '남귀병',
60, 60, 7, 10, 0.8, 8, 8,
1000, null, null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['전투를 포기하고 계략에 몰두합니다.'],
null, null, null
],
[
1406, self::T_WIZARD, '황귀병',
110, 110, 7, 0, 0.8, 13, 10,
3000, ['낙양'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['고도로 훈련된 귀병입니다.'],
null, null, null
],
[
1407, self::T_WIZARD, '천귀병',
80, 130, 7, 15, 0.6, 11, 12,
3000, ['성도'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['갑주를 두른 귀병입니다.'],
null, null, null
],
[
1408, self::T_WIZARD, '마귀병',
130, 80, 7, 15, 0.6, 12, 11,
3000, ['업'], null, 0,
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['날카로운 무기를 가진 귀병입니다.'],
null, null, null
],
[
1500, self::T_SIEGE, '정란',
100, 100, 6, 0, 0, 14, 5,
0, null, null, 3,
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.8, 1106=>1.112],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067],
['높은 구조물 위에서 공격합니다. 첫 공격은 성벽을 향합니다.'],
['che_성벽부상무효'], ['che_선제사격시도', 'che_선제사격발동'], ['che_성벽선제']
],
[
1501, self::T_SIEGE, '충차',
150, 100, 6, 0, 0, 18, 5,
1000, null, null, 3,
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>2.4],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
['엄청난 위력으로 성벽을 부수어버립니다.'],
['che_성벽부상무효'], null, null
],
[
1502, self::T_SIEGE, '벽력거',
150, 100, 6, 5, 0, 20, 5,
3000, ['업'], null, 0,
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.8, 1106=>1.112],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067],
['상대에게 돌덩이를 날립니다. 첫 공격은 성벽을 향합니다.'],
['che_성벽부상무효'], ['che_선제사격시도', 'che_선제사격발동'], ['che_성벽선제']
],
[
1503, self::T_SIEGE, '목우',
50, 200, 5, 0, 0, 15, 5,
3000, ['성도'], null, 0,
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, self::T_CASTLE=>1.8],
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, 1106=>1],
['상대를 저지하는 특수병기입니다.'],
['che_성벽부상무효'], ['che_저지시도', 'che_저지발동'], null
]
];
protected static function getBuildData(): array {
return [
[
1000, self::T_CASTLE, '성벽',
100, 100, 7, 0, 0, 99, 9,
[new Impossible()],
[], // 성벽은 공격할 수 없다.
[self::T_FOOTMAN=>1.2],
['성벽입니다.','생성할 수 없습니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1100, self::T_FOOTMAN, '보병',
100, 150, 7, 10, 0, 9, 9,
[],
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['표준적인 보병입니다.','보병은 방어특화이며,','상대가 회피하기 어렵습니다.'],
null, ['che_방어력증가5p'], null
],
[
1101, self::T_FOOTMAN, '청주병',
100, 200, 7, 10, 0, 10, 11,
[new ReqTech(1000), new ReqRegions('중원')],
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['저렴하고 튼튼합니다.'],
null, ['che_방어력증가5p'], null
],
[
1102, self::T_FOOTMAN, '수병',
150, 150, 7, 10, 0, 11, 10,
[new ReqTech(1000), new ReqRegions('오월')],
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['저렴하고 강력합니다.'],
null, ['che_방어력증가5p'], null
],
[
1103, self::T_FOOTMAN, '자객병',
100, 150, 8, 20, 0, 10, 10,
[new ReqTech(2000), new ReqCities('저')],
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['은밀하고 날쌥니다.'],
null, ['che_방어력증가5p'], null
],
[
1104, self::T_FOOTMAN, '근위병',
150, 200, 7, 10, 0, 12, 12,
[new ReqTech(3000), new ReqCities('낙양')],
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['최강의 보병입니다.'],
null, ['che_방어력증가5p'], null
],
[
1105, self::T_FOOTMAN, '등갑병',
100, 225, 7, 5, 0, 13, 10,
[new ReqTech(1000), new ReqRegions('남중')],
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
['등갑을 두른 보병입니다.'],
null, ['che_방어력증가5p'], null
],
[
1106, self::T_FOOTMAN, '백이병',
175, 175, 7, 5, 0, 13, 11,
[new ReqTech(3000), new ReqCities('성도')],
[self::T_ARCHER=>1.1, self::T_CAVALRY=>0.9, self::T_SIEGE=>1.1],
[self::T_ARCHER=>0.9, self::T_CAVALRY=>1.1, self::T_SIEGE=>0.9],
['정예 보병입니다. 불리한 싸움도 버텨냅니다.'],
null, ['che_방어력증가5p'], null
],
[
1200, self::T_ARCHER, '궁병',
100, 100, 7, 10, 0, 10, 10,
[],
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['표준적인 궁병입니다.','궁병은 선제사격을 하는 병종입니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1201, self::T_ARCHER, '궁기병',
100, 100, 8, 20, 0, 11, 12,
[new ReqTech(1000), new ReqRegions('동이')],
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.9, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.1, self::T_SIEGE=>0.8],
['말을 타고 잘 피합니다. 특히 다른 궁병보다 보병에게 조금 더 강합니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1202, self::T_ARCHER, '연노병',
150, 100, 8, 10, 0, 12, 11,
[new ReqTech(1000), new ReqRegions('서촉')],
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['화살을 연사합니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1203, self::T_ARCHER, '강궁병',
150, 150, 7, 10, 0, 13, 13,
[new ReqTech(3000), new ReqCities('양양')],
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['강건한 궁병입니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1204, self::T_ARCHER, '석궁병',
200, 100, 7, 10, 0, 13, 13,
[new ReqTech(3000), new ReqCities('건업')],
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
['강력한 화살을 쏩니다.'],
null, ['che_선제사격시도', 'che_선제사격발동'], null
],
[
1300, self::T_CAVALRY, '기병',
150, 100, 7, 5, 0, 11, 11,
[],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['표준적인 기병입니다.','기병은 공격특화입니다.'],
null, ['che_기병병종전투'], null
],
[
1301, self::T_CAVALRY, '백마병',
200, 100, 7, 5, 0, 12, 13,
[new ReqTech(1000), new ReqRegions('하북')],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['백마의 위용을 보여줍니다.'],
null, ['che_기병병종전투'], null
],
[
1302, self::T_CAVALRY, '중장기병',
150, 150, 7, 5, 0, 13, 12,
[new ReqTech(1000), new ReqRegions('서북')],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['갑주를 두른 기병입니다.'],
null, ['che_기병병종전투'], null
],
[
1303, self::T_CAVALRY, '돌격기병',
200, 100, 8, 5, 0, 13, 11,
[new ReqTech(2000), new ReqCities('흉노')],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['저돌적으로 공격합니다.'],
null, ['che_기병병종전투'], null
],
[
1304, self::T_CAVALRY, '철기병',
100, 250, 7, 5, 0, 11, 13,
[new ReqTech(2000), new ReqCities('강')],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['철갑을 두른 기병입니다.'],
null, ['che_기병병종전투'], null
],
[
1305, self::T_CAVALRY, '수렵기병',
150, 100, 8, 15, 0, 12, 12,
[new ReqTech(2000), new ReqCities('산월')],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['날쎄고 빠른 기병입니다.'],
null, ['che_기병병종전투'], null
],
[
1306, self::T_CAVALRY, '맹수병',
250, 175, 6, 0, 0, 16, 16,
[new ReqTech(2000), new ReqCities('남만')],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['어느 누구보다 강력합니다.'],
null, ['che_기병병종전투'], null
],
[
1307, self::T_CAVALRY, '호표기병',
200, 150, 7, 5, 0, 14, 14,
[new ReqTech(3000), new ReqCities('허창')],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
['정예 기병입니다.'],
null, ['che_기병병종전투'], null
],
[
1400, self::T_WIZARD, '귀병',
80, 80, 7, 5, 0.5, 9, 9,
[],
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['계략을 사용하는 병종입니다.'],
null, null, null
],
[
1401, self::T_WIZARD, '신귀병',
80, 80, 7, 20, 0.6, 10, 10,
[new ReqTech(1000), new ReqRegions('초')],
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['신출귀몰한 귀병입니다.'],
null, null, null
],
[
1402, self::T_WIZARD, '백귀병',
80, 130, 7, 5, 0.6, 9, 11,
[new ReqTech(2000), new ReqCities('오환')],
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['저렴하고 튼튼합니다.'],
null, null, null
],
[
1403, self::T_WIZARD, '흑귀병',
130, 80, 7, 5, 0.6, 11, 9,
[new ReqTech(2000), new ReqCities('왜')],
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['저렴하고 강력합니다.'],
null, null, null
],
[
1404, self::T_WIZARD, '악귀병',
130, 130, 7, 0, 0.6, 12, 12,
[new ReqTech(3000), new ReqCities('장안')],
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['백병전에도 능숙합니다.'],
null, null, null
],
[
1405, self::T_WIZARD, '남귀병',
60, 60, 7, 10, 0.8, 8, 8,
[new ReqTech(1000)],
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['전투를 포기하고 계략에 몰두합니다.'],
null, null, null
],
[
1406, self::T_WIZARD, '황귀병',
110, 110, 7, 0, 0.8, 13, 10,
[new ReqTech(3000), new ReqCities('낙양')],
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['고도로 훈련된 귀병입니다.'],
null, null, null
],
[
1407, self::T_WIZARD, '천귀병',
80, 130, 7, 15, 0.6, 11, 12,
[new ReqTech(3000), new ReqCities('성도')],
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['갑주를 두른 귀병입니다.'],
null, null, null
],
[
1408, self::T_WIZARD, '마귀병',
130, 80, 7, 15, 0.6, 12, 11,
[new ReqTech(3000), new ReqCities('업')],
[self::T_SIEGE=>1.2],
[self::T_SIEGE=>0.8],
['날카로운 무기를 가진 귀병입니다.'],
null, null, null
],
[
1500, self::T_SIEGE, '정란',
100, 100, 6, 0, 0, 14, 5,
[new ReqMinRelYear(3)],
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.8, 1106=>1.112],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067],
['높은 구조물 위에서 공격합니다. 첫 공격은 성벽을 향합니다.'],
['che_성벽부상무효'], ['che_선제사격시도', 'che_선제사격발동'], ['che_성벽선제']
],
[
1501, self::T_SIEGE, '충차',
150, 100, 6, 0, 0, 18, 5,
[new ReqTech(1000), new ReqMinRelYear(3)],
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>2.4],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
['엄청난 위력으로 성벽을 부수어버립니다.'],
['che_성벽부상무효'], null, null
],
[
1502, self::T_SIEGE, '벽력거',
150, 100, 6, 5, 0, 20, 5,
[new ReqTech(3000), new ReqCities('업')],
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.8, 1106=>1.112],
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067],
['상대에게 돌덩이를 날립니다. 첫 공격은 성벽을 향합니다.'],
['che_성벽부상무효'], ['che_선제사격시도', 'che_선제사격발동'], ['che_성벽선제']
],
[
1503, self::T_SIEGE, '목우',
50, 200, 5, 0, 0, 15, 5,
[new ReqTech(3000), new ReqCities('성도')],
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, self::T_CASTLE=>1.8],
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, 1106=>1],
['상대를 저지하는 특수병기입니다.'],
['che_성벽부상무효'], ['che_저지시도', 'che_저지발동'], null
]
];
}
public static function addGameUnit(GameUnitDetail $unitType){
static::_generate();
@@ -357,22 +365,6 @@ class GameUnitConstBase{
static::$constType[$unitType->armType] = [];
}
static::$constType[$unitType->armType][] = $unitType;
foreach($unitType->reqCities as $reqCity){
if(!key_exists($reqCity, static::$constCity)){
static::$constCity[$reqCity] = [];
}
static::$constCity[$reqCity][] = $unitType;
}
if($unitType->reqRegions){
foreach($unitType->reqRegions as $reqRegion){
if(!key_exists($reqRegion, static::$constRegion)){
static::$constRegion[$reqRegion] = [];
}
static::$constRegion[$reqRegion][] = $unitType;
}
}
}
/**
@@ -400,22 +392,6 @@ class GameUnitConstBase{
return static::$constName[$name]??null;
}
/**
* @return \sammo\GameUnitDetail[]
*/
public static function byCity(int $city): array{
static::_generate();
return static::$constCity[$city]??[];
}
/**
* @return \sammo\GameUnitDetail[]
*/
public static function byRegion(int $region): array{
static::_generate();
return static::$constRegion[$region]??[];
}
/**
* @return \sammo\GameUnitDetail[]
@@ -435,17 +411,17 @@ class GameUnitConstBase{
protected static function _generate(){
if(static::$constID || static::$constName || static::$constCity || static::$constRegion || static::$constType){
if(static::$constID || static::$constName || static::$constType){
return;
}
$constID = [];
$constName = [];
$constCity = [];
$constRegion = [];
$constType = [];
foreach(static::$_buildData as $rawUnit){
$buildData = static::getBuildData();
foreach($buildData as $rawUnit){
[
$id,
$armType,
@@ -457,10 +433,7 @@ class GameUnitConstBase{
$magicCoef,
$cost,
$rice,
$reqTech,
$reqCities,
$reqRegions,
$reqYear,
$reqConstraints,
$attackCoef,
$defenceCoef,
$info,
@@ -469,26 +442,9 @@ class GameUnitConstBase{
$iActionList,
] = $rawUnit;
if($reqYear > 0){
$info[] = "{$reqYear}년 경과 후 사용 가능";
}
if($reqTech > 0){
$info[] = "기술력 {$reqTech} 이상 필요";
}
if($reqCities !== null){
$reqCities = array_map(function($reqCity) use (&$info){
$info[] = "{$reqCity} 소유시 가능";
return CityConst::byName($reqCity)->id;
}, $reqCities);
}
if($reqRegions !== null){
$reqRegions = array_map(function($reqRegion) use (&$info){
$info[] = "{$reqRegion} 지역 소유시 가능";
return CityConst::$regionMap[$reqRegion];
}, $reqRegions);
foreach($reqConstraints as $constraint){
/** @var \sammo\GameUnitConstraint\BaseGameUnitConstraint $constraint */
$info[] = $constraint->getInfo();
}
$unit = new GameUnitDetail(
@@ -502,16 +458,13 @@ class GameUnitConstBase{
$magicCoef,
$cost,
$rice,
$reqTech,
$reqCities,
$reqRegions,
$reqYear,
$reqConstraints,
$attackCoef,
$defenceCoef,
$info,
$initSkillTrigger,
$phaseSkillTrigger,
$iActionList,
$iActionList
);
$constID[$id] = $unit;
@@ -521,31 +474,10 @@ class GameUnitConstBase{
}
$constType[$armType][$id] = $unit;
if($unit->reqCities){
foreach($unit->reqCities as $reqCity){
if(!key_exists($reqCity, $constCity)){
$constCity[$reqCity] = [];
}
$constCity[$reqCity][$id] = $unit;
}
}
if($unit->reqRegions){
foreach($unit->reqRegions as $reqRegion){
if(!key_exists($reqRegion, $constRegion)){
$constRegion[$reqRegion] = [];
}
$constRegion[$reqRegion][$id] = $unit;
}
}
}
static::$constID = $constID;
static::$constName = $constName;
static::$constCity = $constCity;
static::$constRegion = $constRegion;
static::$constType = $constType;
static::_generateOptional();
@@ -0,0 +1,11 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\General;
abstract class BaseGameUnitConstraint {
public abstract function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool;
public abstract function getInfo(): string;
}
@@ -0,0 +1,18 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\General;
class Impossible extends BaseGameUnitConstraint {
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
return false;
}
public function getInfo(): string
{
return "불가능";
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\General;
class ReqChief extends BaseGameUnitConstraint
{
public function __construct()
{
}
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
if($general->getVar('officer_level') >= 5){
return true;
}
return false;
}
public function getInfo(): string
{
return "군주 및 수뇌부만 가능";
}
}
@@ -0,0 +1,42 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\CityConst;
use sammo\General;
class ReqCities extends BaseGameUnitConstraint
{
public readonly array $reqCities;
public function __construct(...$reqCities)
{
$dstReqCities = [];
if (count($reqCities) == 0) {
$this->reqCities = [];
return;
}
foreach ($reqCities as $city) {
$dstReqCities[CityConst::byName($city)->id] = $city;
}
$this->reqCities = $dstReqCities;
}
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
foreach ($this->reqCities as $cityID => $cityName) {
if (key_exists($cityID, $ownCities)) {
return true;
}
}
return false;
}
public function getInfo(): string
{
$cityNameText = implode(', ', $this->reqCities);
return "{$cityNameText} 소유시 가능";
}
}
@@ -0,0 +1,51 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\CityConst;
use sammo\General;
use function sammo\getCityLevelList;
class ReqCitiesWithCityLevel extends BaseGameUnitConstraint
{
public readonly array $reqCities;
public function __construct(
public readonly int $reqCityLevel,
...$reqCities)
{
$dstReqCities = [];
if (count($reqCities) == 0) {
$this->reqCities = [];
return;
}
foreach ($reqCities as $city) {
$dstReqCities[CityConst::byName($city)->id] = $city;
}
$this->reqCities = $dstReqCities;
}
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
foreach ($this->reqCities as $cityID => $cityName) {
if (!key_exists($cityID, $ownCities)) {
continue;
}
if($ownCities[$cityID]['level'] >= $this->reqCityLevel) {
return true;
}
}
return false;
}
public function getInfo(): string
{
$cityLevelText = getCityLevelList()[$this->reqCityLevel];
$cityNameText = implode(', ', $this->reqCities);
return "{$cityNameText} {$cityLevelText}성 소유시 가능";
}
}
@@ -0,0 +1,39 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\General;
use function sammo\getCityLevelList;
class ReqHighLevelCities extends BaseGameUnitConstraint
{
public readonly array $reqCities;
public function __construct(
public readonly int $reqCityLevel,
public readonly int $reqCityCount
) {}
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
$cnt = 0;
foreach ($ownCities as $cityItem) {
if ($cityItem['level'] >= $this->reqCityLevel) {
$cnt++;
}
}
if($cnt >= $this->reqCityCount) {
return true;
}
return false;
}
public function getInfo(): string
{
$cityLevelText = getCityLevelList()[$this->reqCityLevel];
return "{$cityLevelText}{$this->reqCityCount}개 이상 소유시 가능";
}
}
@@ -0,0 +1,22 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\General;
class ReqMinRelYear extends BaseGameUnitConstraint {
public function __construct(public readonly int $reqMinRelYear)
{
}
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
return $relativeYear >= $this->reqMinRelYear;
}
public function getInfo(): string
{
return "{$this->reqMinRelYear}년 경과 후 사용 가능";
}
}
@@ -0,0 +1,122 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\CityConst;
use sammo\Enums\NationAuxKey;
use sammo\General;
class ReqNationAux extends BaseGameUnitConstraint
{
const AVAILABLE_CMP = [
'==' => true,
'!=' => true,
'<' => true,
'>' => true,
'<=' => true,
'>=' => true,
];
public function __construct(
public readonly NationAuxKey $reqNationAuxKey,
public readonly string $cmp,
public readonly int|float $value
) {
if (!array_key_exists($cmp, self::AVAILABLE_CMP)) {
throw new \InvalidArgumentException('올바르지 않은 비교연산자입니다');
}
}
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
$lhs = $nationAux[$this->reqNationAuxKey->value] ?? 0;
$rhs = $this->value;
$value = false;
switch ($this->cmp) {
case '==':
$value = ($lhs == $rhs);
break;
case '!=':
$value = ($lhs != $rhs);
break;
case '<=':
$value = ($lhs <= $rhs);
break;
case '>=':
$value = ($lhs >= $rhs);
break;
case '<':
$value = ($lhs < $rhs);
break;
case '>':
$value = ($lhs > $rhs);
break;
}
return $value;
}
public function getInfo(): string
{
//Enum별 특수한 경우
switch ($this->reqNationAuxKey) {
case NationAuxKey::can_대검병사용:
if ($this->cmp == "==" && $this->value == 1) return "대검병 연구 시 가능";
break;
case NationAuxKey::can_극병사용:
if ($this->cmp == "==" && $this->value == 1) return "극병 연구 시 가능";
break;
case NationAuxKey::can_화시병사용:
if ($this->cmp == "==" && $this->value == 1) return "화시병 연구 시 가능";
break;
case NationAuxKey::can_원융노병사용:
if ($this->cmp == "==" && $this->value == 1) return "원융노병 연구 시 가능";
break;
case NationAuxKey::can_산저병사용:
if ($this->cmp == "==" && $this->value == 1) return "산저병 연구 시 가능";
break;
case NationAuxKey::can_상병사용:
if ($this->cmp == "==" && $this->value == 1) return "상병 연구 시 가능";
break;
case NationAuxKey::can_음귀병사용:
if ($this->cmp == "==" && $this->value == 1) return "음귀병 연구 시 가능";
break;
case NationAuxKey::can_무희사용:
if ($this->cmp == "==" && $this->value == 1) return "무희 연구 시 가능";
break;
case NationAuxKey::can_화륜차사용:
if ($this->cmp == "==" && $this->value == 1) return "화륜차 연구 시 가능";
break;
case NationAuxKey::did_특성초토화:
if ($this->cmp == ">=" && $this->value == 1) return "특성 초토화 시 가능";
break;
}
//범용
switch ($this->cmp) {
case '==': {
if ($this->value == 0) {
return "{$this->reqNationAuxKey->value} 없을 때";
}
if ($this->value == 1) {
return "{$this->reqNationAuxKey->value} 있을 때";
}
return "{$this->reqNationAuxKey->value} = {$this->value} 일 때";
};
case '!=': {
if ($this->value == 0) {
return "{$this->reqNationAuxKey->value} 없을 때";
}
if ($this->value == 1) {
return "{$this->reqNationAuxKey->value} 있을 때";
}
return "{$this->reqNationAuxKey->value} != {$this->value} 일 때";
};
default:
return "{$this->reqNationAuxKey->value} {$this->cmp} {$this->value} 일 때";
}
}
}
@@ -0,0 +1,26 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\General;
class ReqNotChief extends BaseGameUnitConstraint
{
public function __construct()
{
}
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
if($general->getVar('officer_level') < 5){
return true;
}
return false;
}
public function getInfo(): string
{
return "군주 및 수뇌부는 불가";
}
}
@@ -0,0 +1,43 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\CityConst;
use sammo\General;
class ReqRegions extends BaseGameUnitConstraint
{
public readonly array $reqRegions;
public function __construct(...$reqRegions)
{
$dstReqRegions = [];
if (count($reqRegions) == 0) {
$this->reqRegions = [];
return;
}
foreach ($reqRegions as $region) {
$dstReqRegions[CityConst::$regionMap[$region]] = $region;
}
$this->reqRegions = $dstReqRegions;
}
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
foreach ($this->reqRegions as $regionID => $regionText) {
if (key_exists($regionID, $ownRegions)) {
return true;
}
}
return false;
}
public function getInfo(): string
{
$regionNameText = implode(', ', $this->reqRegions);
return "{$regionNameText} 지역 소유시 가능";
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace sammo\GameUnitConstraint;
use sammo\General;
use sammo\KVStorage;
class ReqTech extends BaseGameUnitConstraint {
public function __construct(public readonly int $reqTech)
{
}
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
{
if ($tech < $this->reqTech) {
return false;
}
return true;
}
public function getInfo(): string
{
return "기술력 {$this->reqTech} 이상 필요";
}
}
+46 -46
View File
@@ -2,6 +2,8 @@
namespace sammo;
use sammo\GameUnitConstraint\BaseGameUnitConstraint;
class GameUnitDetail implements iAction
{
use DefaultAction;
@@ -16,17 +18,14 @@ class GameUnitDetail implements iAction
public $magicCoef;
public $cost;
public $rice;
public $reqTech;
public $reqCities;
public $reqRegions;
public $reqYear;
public $attackCoef;
public $defenceCoef;
public $info;
public $initSkillTrigger;
public $phaseSkillTrigger;
/** @var iAction[]|null iActionList */
public $iActionList;
public array $reqConstraints;
public function __construct(
int $id,
@@ -39,13 +38,10 @@ class GameUnitDetail implements iAction
float $magicCoef,
int $cost,
int $rice,
int $reqTech,
?array $reqCities,
?array $reqRegions,
int $reqYear,
array $reqConstraints,
array $attackCoef,
array $defenceCoef,
array $info,
public readonly array $info,
?array $initSkillTrigger,
?array $phaseSkillTrigger,
?array $iActionList,
@@ -60,13 +56,18 @@ class GameUnitDetail implements iAction
$this->magicCoef = $magicCoef;
$this->cost = $cost;
$this->rice = $rice;
$this->reqTech = $reqTech;
$this->reqCities = $reqCities;
$this->reqRegions = $reqRegions;
$this->reqYear = $reqYear;
$this->reqConstraints = [];
foreach($reqConstraints as $constraint){
$className = Util::getClassNameFromObj($constraint);
if(!key_exists($className, $this->reqConstraints)){
$this->reqConstraints[$className] = $constraint;
}
else{
$this->reqConstraints[] = $constraint;
}
}
$this->attackCoef = $attackCoef;
$this->defenceCoef = $defenceCoef;
$this->info = $info;
$this->initSkillTrigger = $initSkillTrigger;
$this->phaseSkillTrigger = $phaseSkillTrigger;
$this->iActionList = [];
@@ -79,6 +80,33 @@ class GameUnitDetail implements iAction
}
}
public function reqTech(): int {
$reqTechObj = $this->reqConstraints['ReqTech'] ?? null;
if($reqTechObj === null){
return 0;
}
return $reqTechObj->reqTech;
}
public function reqRegions(): ?array {
$reqRegionsObj = $this->reqConstraints['ReqRegions'] ?? null;
if($reqRegionsObj === null){
return null;
}
return $reqRegionsObj->reqRegions;
}
public function reqCities(): ?array {
$reqCitiesObj = $this->reqConstraints['ReqCities'] ?? null;
if($reqCitiesObj === null){
return null;
}
return $reqCitiesObj->reqCities;
}
public function getInfo(): string
{
return join("\n<br>", $this->info);
@@ -193,41 +221,13 @@ class GameUnitDetail implements iAction
return $defaultWar;
}
public function isValid($ownCities, $ownRegions, $relativeYear, $tech)
public function isValid(General $general, $ownCities, $ownRegions, $relativeYear, $tech, $nationAux)
{
//음수 없음
$relativeYear = max(0, $relativeYear);
if ($relativeYear < $this->reqYear) {
return false;
}
if ($tech < $this->reqTech) {
return false;
}
if ($this->reqCities !== null) {
$valid = false;
foreach ($this->reqCities as $reqCity) {
if (\key_exists($reqCity, $ownCities)) {
$valid = true;
break;
}
}
if (!$valid) {
return false;
}
}
if ($this->reqRegions !== null) {
$valid = false;
foreach ($this->reqRegions as $reqRegion) {
if (\key_exists($reqRegion, $ownRegions)) {
$valid = true;
break;
}
}
if (!$valid) {
foreach($this->reqConstraints as $constraint){
if(!$constraint->test($general, $ownCities, $ownRegions, $relativeYear, $tech, $nationAux)){
return false;
}
}
+7
View File
@@ -283,6 +283,7 @@ class General extends GeneralBase implements iAction
}
$recwar = new \DateTimeImmutable($this->getVar('recent_war'));
$turnNow = new \DateTimeImmutable($this->getVar('turntime'));
$secDiff = TimeUtil::DateIntervalToSeconds($recwar->diff($turnNow));
if ($secDiff <= 0) {
@@ -290,6 +291,12 @@ class General extends GeneralBase implements iAction
return 0;
}
if($turnTerm == -60){
$turnDiff = VarTurn60::calcTurnDiff($recwar, $turnNow);
$this->calcCache[$cacheKey] = $turnDiff;
return $turnDiff;
}
$result = intdiv(Util::toInt($secDiff), 60 * $turnTerm);
$this->calcCache[$cacheKey] = $result;
return $result;
+28 -15
View File
@@ -1980,7 +1980,7 @@ class GeneralAI
$db = DB::db();
$nationStor = KVStorage::getStorage($db, $general->getNationID(), 'nation_env');
$turnTerm = $this->env['turnterm'];
$turnTerm = abs($this->env['turnterm']);
//천도를 한턴 넣었다면 계속 넣는다.
if ($lastTurn->getCommand() === '천도' && $lastTurn->getArg()['destCityID'] != $this->nation['capital']) {
@@ -2084,7 +2084,7 @@ class GeneralAI
}
}
$finalCityID = Util::array_first_key($cityScoreList);
$finalCityID = array_key_first($cityScoreList);
$dist = $distanceList[$capital][$finalCityID];
$targetCityID = $finalCityID;
if ($dist > 1) {
@@ -2558,8 +2558,11 @@ class GeneralAI
$cities = [];
$regions = [];
foreach ($db->queryAllLists('SELECT city, region FROM city WHERE nation = %i', $nationID) as [$cityID, $regionID]) {
$cities[$cityID] = true;
foreach ($db->queryAllLists('SELECT city, region, secu, level FROM city WHERE nation = %i', $nationID) as [$cityID, $regionID, $secu, $level]) {
$cities[$cityID] = [
'secu' => $secu,
'level' => $level,
];
$regions[$regionID] = true;
}
$relYear = Util::valueFit($env['year'] - $env['startyear'], 0);
@@ -2567,7 +2570,7 @@ class GeneralAI
$types = [];
foreach (GameUnitConst::byType($armType) as $crewtype) {
if ($crewtype->isValid($cities, $regions, $relYear, $tech)) {
if ($crewtype->isValid($general, $cities, $regions, $relYear, $tech, $this->nation['aux'])) {
$score = $crewtype->pickScore($tech);
$types[$crewtype->id] = $score;
}
@@ -2581,12 +2584,16 @@ class GeneralAI
if ($this->generalPolicy->can고급병종) {
$currCrewType = $general->getCrewTypeObj();
if ($currCrewType->isValid($cities, $regions, $relYear, $tech)) {
if ($currCrewType->reqTech >= 2000) {
$type = $currCrewType->id;
} else if ($currCrewType->armType != $armType && $currCrewType->reqTech >= 1000) {
//굳이 뽑은 이유가 있겠지
$type = $currCrewType->id;
if ($currCrewType->isValid($general, $cities, $regions, $relYear, $tech, $this->nation['aux'])) {
$reqTechObj = $currCrewType->reqConstraints['ReqTech'] ?? null;
if($reqTechObj){
$reqTech = $reqTechObj->reqTech;
if ($reqTech >= 2000) {
$type = $currCrewType->id;
} else if ($currCrewType->armType != $armType && $reqTech >= 1000) {
//굳이 뽑은 이유가 있겠지
$type = $currCrewType->id;
}
}
}
}
@@ -3122,8 +3129,14 @@ class GeneralAI
$db = DB::db();
$dupLord = $db->queryFirstField('SELECT COUNT(*) FROM general WHERE officer_level = 12 AND city = %i', $this->general->getCityID());
if($dupLord <= 1 && !in_array($this->general->getRawCity()['level'], [5, 6])) {
return null;
if($dupLord <= 1) {
if ($this->general->getRawCity() === null) {
$rawCity = $db->queryFirstRow('SELECT * FROM city WHERE city = %i', $this->general->getCityID());
$this->general->setRawCity($rawCity);
}
if (!in_array($this->general->getRawCity()['level'], [5, 6])) {
return null;
}
}
$general = $this->general;
@@ -3702,7 +3715,7 @@ class GeneralAI
$this->updateInstance();
//특별 메세지 있는 경우 출력
$term = $this->env['turnterm'];
$term = abs($this->env['turnterm']);
if ($general->getVar('npcmsg') && $this->rng->nextBool(GameConst::$npcMessageFreqByDay * $term / (60 * 24))) {
$src = new MessageTarget(
$general->getID(),
@@ -3972,7 +3985,7 @@ class GeneralAI
$userChiefCnt = 0;
$minUserKillturn = $this->env['killturn'] - Util::toInt(240 / $this->env['turnterm']);
$minUserKillturn = $this->env['killturn'] - Util::toInt(240 / abs($this->env['turnterm']));
$minNPCKillturn = 36;
foreach (Util::range($minChiefLevel, 12) as $chiefLevel) {
+10 -2
View File
@@ -334,11 +334,19 @@ class InheritancePointManager
$inheritStor->setValue($key, [$point, $aux]);
}
$oldInheritStor = KVStorage::getStorage(DB::db(), "inheritance_result");
$db = DB::db();
$serverID = UniqueConst::$serverID;
$year = $gameStor->year;
$month = $gameStor->month;
$oldInheritStor->setValue("{$serverID}_{$ownerID}_{$general->getID()}_{$year}_{$month}", $inheritStor->getAll(true));
$db->insert('inheritance_result', [
'server_id'=>$serverID,
'owner'=>$ownerID,
'general_id'=>$general->getID(),
'year'=>$year,
'month'=>$month,
'value'=>Json::encode($inheritStor->getAll(true))
]);
}
+11 -2
View File
@@ -245,7 +245,16 @@ class ResetHelper{
true
);
if($sync == 0) {
if($turnterm == -60){
[$starttime, $yearPulled, $month] = VarTurn60::fromDatetime(new \DateTimeImmutable($turntime))->cutDay();
if($yearPulled){
$year = $startyear-1;
}
else{
$year = $startyear;
}
}
else if($sync == 0) {
// 현재 시간을 1월로 맞춤
$starttime = cutTurn($turntime, $turnterm);
$month = 1;
@@ -261,7 +270,7 @@ class ResetHelper{
}
}
$killturn = 4800 / $turnterm;
$killturn = 4800 / abs($turnterm);
if($npcmode == 1) { $killturn = intdiv($killturn, 3); }
$develcost = ($year - $startyear + 10) * 2;
+12 -10
View File
@@ -14,12 +14,23 @@ final class ServerTool
if ((120 % $turnterm) != 0) {
return 'invalid minute';
}
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['turntime', 'turnterm', 'year', 'startyear', 'month', 'isunited']);
$oldunit = $admin['turnterm'] * 60;
$unit = $turnterm * 60;
if($unit == $oldunit){
return null;
}
if($oldunit < 0 || $unit < 0){
return 'variable_turnterm';
}
$reqGameLock = $admin['isunited'] != 2 && !$ignoreLock;
$locked = false;
@@ -40,15 +51,6 @@ final class ServerTool
$locked = tryLock();
}
$oldunit = $admin['turnterm'] * 60;
$unit = $turnterm * 60;
if($unit == $oldunit){
if($locked){
unlock();
}
return null;
}
$unitDiff = $unit / $oldunit;
+1 -1
View File
@@ -62,7 +62,7 @@ abstract class TriggerCaller{
return $this;
}
$lastKey = Util::array_last_key($this->triggerListByPriority);
$lastKey = array_key_last($this->triggerListByPriority);
if($lastKey < $priority){
$this->triggerListByPriority[$priority] = [$uniqueID=>$trigger];
return $this;
+16 -14
View File
@@ -219,11 +219,20 @@ class TurnExecutionHelper
$nextTurnTimeBase = $general->getAuxVar('nextTurnTimeBase');
if($nextTurnTimeBase !== null){
$turntime = cutTurn($turntime, $gameStor->turnterm);
$turntimeObj = new \DateTimeImmutable($turntime);
$turntimeObj = $turntimeObj->add(TimeUtil::secondsToDateInterval($nextTurnTimeBase));
$turntime = TimeUtil::format($turntimeObj, true);
$general->setAuxVar('nextTurnTimeBase', null);
if($gameStor->turnterm == -60){
[$turntime, $nextTurnterm] = VarTurn60::fromDatetime(new \DateTimeImmutable($turntime))->cutTurn();
$turntimeObj = new \DateTimeImmutable($turntime);
$turntimeObj = $turntimeObj->add(TimeUtil::secondsToDateInterval($nextTurnTimeBase * $nextTurnterm / 60));
$turntime = TimeUtil::format($turntimeObj, true);
$general->setAuxVar('nextTurnTimeBase', null);
}
else {
$turntime = cutTurn($turntime, $gameStor->turnterm);
$turntimeObj = new \DateTimeImmutable($turntime);
$turntimeObj = $turntimeObj->add(TimeUtil::secondsToDateInterval($nextTurnTimeBase));
$turntime = TimeUtil::format($turntimeObj, true);
$general->setAuxVar('nextTurnTimeBase', null);
}
}
$general->setVar('turntime', $turntime);
@@ -355,7 +364,7 @@ class TurnExecutionHelper
if (($autorun_user['limit_minutes'] ?? false) && $general->getNPCType() < 2 && $hasReservedTurn) {
$autorun_limit = Util::joinYearMonth($year, $month);
$autorun_limit += intdiv($autorun_user['limit_minutes'], $turnterm);
$autorun_limit += intdiv($autorun_user['limit_minutes'], abs($turnterm));
$general->setAuxVar('autorun_limit', $autorun_limit);
}
@@ -422,7 +431,7 @@ class TurnExecutionHelper
$date = TimeUtil::now(true);
// 최종 처리 월턴의 다음 월턴시간 구함
$lastExecuted = $gameStor->turntime;
//$lastExecuted = $gameStor->turntime;
$prevTurn = cutTurn($gameStor->turntime, $gameStor->turnterm);
$nextTurn = addTurn($prevTurn, $gameStor->turnterm);
@@ -455,9 +464,6 @@ class TurnExecutionHelper
$gameStor->turntime = $currentTurn;
}
unlock();
if($lastExecuted !== $currentTurn){
$executed = true;
}
return $gameStor->turntime;
}
@@ -516,10 +522,6 @@ class TurnExecutionHelper
$gameStor->resetCache();
unlock();
if($lastExecuted !== $currentTurn){
$executed = true;
}
return $turntime;
}
}
+191
View File
@@ -0,0 +1,191 @@
<?php
namespace sammo;
class VarTurn60
{
const MonthAdjustOffset = 2;
static array $min30ToTurn = [
[0, 0, 120], //00:00 2
[0, 30, 120], //00:30
[0, 60, 120], //01:00
[0, 90, 120], //01:30
[1, 0, 120], //02:00 3
[1, 30, 120], //02:30
[1, 60, 120], //03:00
[1, 90, 120], //03:30
[2, 0, 120], //04:00 4
[2, 30, 120], //04:30
[2, 60, 120], //05:00
[2, 90, 120], //05:30
[3, 0, 60], //06:00 5
[3, 30, 60], //06:30
[4, 0, 60], //07:00 6
[4, 30, 60], //07:30
[5, 0, 60], //08:00 7
[5, 30, 60], //08:30
[6, 0, 60], //09:00 8
[6, 30, 60], //09:30
[7, 0, 60], //10:00 9
[7, 30, 60], //10:30
[8, 0, 60], //11:00 10
[8, 30, 60], //11:30
[9, 0, 60], //12:00 11
[9, 30, 60], //12:30
[10, 0, 60], //13:00 0(12)
[10, 30, 60], //13:30
[11, 0, 60], //14:00 1(13)
[11, 30, 60], //14:30
[12, 0, 60], //15:00 2(14)
[12, 30, 60], //15:30
[13, 0, 60], //16:00 3(15)
[13, 30, 60], //16:30
[14, 0, 60], //17:00 4(16)
[14, 30, 60], //17:30
[15, 0, 60], //18:00 5(17)
[15, 30, 60], //18:30
[16, 0, 30], //19:00 6(18)
[17, 0, 30], //19:30 7(19)
[18, 0, 30], //20:00 8(20)
[19, 0, 30], //20:30 9(21)
[20, 0, 30], //21:00 10(22)
[21, 0, 30], //21:30 11(23)
[22, 0, 60], //22:00 0
[22, 30, 60], //22:30
[23, 0, 60], //23:00 1
[23, 30, 60], //23:30
//[24, 0, 60], //24:00 2
];
static array $turnToHM = [
[0, 0, 120], //0
[2, 0, 120], //1
[4, 0, 120], //2
[6, 0, 60], //3
[7, 0, 60], //4
[8, 0, 60], //5
[9, 0, 60], //6
[10, 0, 60], //7
[11, 0, 60], //8
[12, 0, 60], //9
[13, 0, 60], //10
[14, 0, 60], //11
[15, 0, 60], //12
[16, 0, 60], //13
[17, 0, 60], //14
[18, 0, 60], //15
[19, 0, 30], //16
[19, 30, 30],//17
[20, 0, 30], //18
[20, 30, 30],//19
[21, 0, 30], //20
[21, 30, 30],//21
[22, 0, 60], //22
[23, 0, 60], //23
//[24, 0, 60], //24(?)
];
function __construct(
public \DateTimeImmutable $baseDay,
public int $turnIdx, //0~23
public float $secOffset, ///turnTerm에 따라 최대치가 30*60, 60*60, 120*60 가변
)
{
}
static function fromDatetime(\DateTimeInterface $date): self {
$baseDay = new \DateTimeImmutable($date->format('Y-m-d'));
$totalSec = $date->getTimestamp() - $baseDay->getTimestamp();
$min30 = intdiv($totalSec, 60 * 30);
assert($min30 < 48);
[$turnIdx, $minOffset, ] = static::$min30ToTurn[$min30];
$secOffset = $totalSec - 60 * 30 * $min30 + $minOffset * 60;
return new static($baseDay, $turnIdx, $secOffset);
}
/// $b - $a 의 턴차
static function calcTurnDiff(\DateTimeInterface $a, \DateTimeInterface $b): int{
$aObj = static::fromDatetime($a);
$bObj = static::fromDatetime($b);
$resDays = $aObj->baseDay->diff($bObj->baseDay)->days; //놀랍게도 절대값
if($aObj->baseDay > $bObj->baseDay){
$resDays *= -1;
}
$res = $resDays * 24 + $bObj->turnIdx - $aObj->turnIdx;
return $res;
}
function cutTurn($withFraction = true): array{
[$hour, $minOffset, $turnTerm] = static::$turnToHM[$this->turnIdx];
$date = $this->baseDay->add(TimeUtil::secondsToDateInterval(($hour * 60 + $minOffset) * 60));
return [TimeUtil::format($date, $withFraction), $turnTerm];
}
function toDateStr($withFraction = true): string{
[$hour, $minOffset, ] = static::$turnToHM[$this->turnIdx];
$date = $this->baseDay->add(TimeUtil::secondsToDateInterval(($hour * 60 + $minOffset) * 60 + $this->secOffset));
return TimeUtil::format($date, $withFraction);
}
function cutDay($withFraction = true): array{
//고정 시간 기준 cutDay()의 이식
//상수 테이블이 이미 13:00에 1월이 되도록 맞춰져 있음.
//다만 20:00인 경우 8월이 아니라 9월이 됨 ^^;
$newMonth = ($this->turnIdx + static::MonthAdjustOffset) % 12 + 1;
$yearPulled = $newMonth > 3;
$obj = $yearPulled ? $this->addTurn(12): $this;
[$date, ] = $obj->addTurn(-($newMonth - 1))->cutTurn($withFraction);
return [$date, $yearPulled, $newMonth];
}
function addTurn(int $moreTurn): self{
$dayDiff = intdiv($moreTurn, 24);
$moreTurn %= 24;
$nextTurnIdx = $this->turnIdx + $moreTurn;
if($nextTurnIdx < 0){
$dayDiff -= 1;
$nextTurnIdx += 24;
}
else if($nextTurnIdx >= 24){
$dayDiff += 1;
$nextTurnIdx -= 24;
}
[, , $oldTurnTerm] = static::$turnToHM[$this->turnIdx];
[, , $nextTurnTerm] = static::$turnToHM[$nextTurnIdx];
$nextSecOffset = $this->secOffset;
if($oldTurnTerm != $nextTurnTerm){
$nextSecOffset *= $nextTurnTerm;
$nextSecOffset /= $oldTurnTerm;
}
if($dayDiff == 0){
return new static($this->baseDay, $nextTurnIdx, $nextSecOffset);
}
if($dayDiff > 0){
$nextBaseDay = $this->baseDay->add(new \DateInterval("P{$dayDiff}D"));
}
else{
$dayAbsDiff = abs($dayDiff);
$nextBaseDay = $this->baseDay->sub(new \DateInterval("P{$dayAbsDiff}D"));
}
return new static($nextBaseDay, $nextTurnIdx, $nextSecOffset);
}
}
+974
View File
@@ -0,0 +1,974 @@
{
"title":"【역사모드2-2】 반동탁연합 결성(정사)",
"startYear":187,
"life":1,
"fiction":0,
"const":{
"defaultMaxGeneral":600
},
"nation":[
["동탁", "#A9A9A9", 12000, 80000, "천자를 등에 업은 동탁", 2000, "명가", 5, ["낙양", "호로", "사수", "함곡", "장안", "홍농", "사곡", "안정"]],
["조조", "#0000FF", 10000, 40000, "동탁의거의 조조", 1000, "법가", 1, ["진류"]],
["유대", "#800000", 10000, 10000, "연주자사 유대, 유요의 형", 1000, "병가", 3, ["복양"]],
["공손찬", "#FF00FF", 10000, 10000, "백마의 공손찬", 1000, "병가", 1, ["북평"]],
["장양", "#7B68EE", 10000, 10000, "병주자사 장양", 1000, "병가", 3, ["진양"]],
["유언", "#483D8B", 10000, 30000, "익주목 유언", 1000, "유가", 4, ["성도", "자동", "면죽"]],
["원술", "#FFC0CB", 15000, 40000, "후장군 원술", 1000, "병가", 2, ["완"]],
["도겸", "#00FF00", 10000, 10000, "서주목 도겸", 1000, "유가", 4, ["서주", "하비.광릉"]],
["진온", "#808000", 10000, 10000, "양주자사 진온", 1000, "유가", 3, ["수춘", "합비"]],
["마등", "#808000", 10000, 10000, "서량태수 마등", 1000, "병가", 1, ["서량"]],
["공손도", "#A0522D", 10000, 10000, "요동의 왕 공손도", 1000, "덕가", 1, ["안평"]],
["한복", "#A0522D", 10000, 10000, "기주자사 한복", 1000, "병가", 3, ["업"]],
["유표", "#E0FFFF", 10000, 10000, "형주자사 유표", 1000, "유가", 3, ["양양", "장판", "강하"]],
["장로", "#20B2AA", 10000, 10000, "사실 이때 없는 애지만 장로", 1000, "오두미도", 1, ["한중"]],
["왕광", "#483D8B", 10000, 10000, "하내태수 왕광", 1000, "유가", 1, ["하내"]],
["유우", "#6495ED", 10000, 10000, "유주자사 유우", 1000, "유가", 5, ["계", "역경"]],
["원소", "#FFFF00", 10000, 10000, "발해태수 원소", 1000, "병가", 1, ["남피"]],
["사섭", "#800000", 10000, 10000, "교주자사 사섭", 1000, "유가", 3, ["교지", "남해"]],
["공융", "#800080", 10000, 10000, "북해태수 공융", 1000, "유가", 1, ["북해"]],
["한수", "#FFFFFF", 10000, 10000, "서량의 모반자 한수", 1000, "병가", 1, ["천수"]],
["공주", "#800080", 10000, 10000, "예주 자사 공주", 1000, "유가", 3, ["초"]],
["유총", "#7B68EE", 10000, 10000, "진민왕 유총", 1000, "덕가", 6, ["여남"]]
],
"diplomacy":[
[1,2,1,36],
[1,3,1,36],
[1,5,1,36],
[1,6,1,36],
[1,7,1,36],
[1,8,1,36],
[1,9,1,36],
[1,10,1,36],
[1,11,1,36],
[1,12,1,36],
[1,13,1,36],
[1,14,1,36],
[1,15,1,36],
[1,16,1,36],
[1,17,1,36],
[1,18,1,36],
[1,19,1,36],
[1,20,1,36],
[1,21,1,36],
[1,22,1,36],
[2,3,7,24],
[2,5,7,24],
[2,6,7,24],
[2,7,7,24],
[2,8,7,24],
[2,9,7,24],
[2,10,7,24],
[2,11,7,24],
[2,12,7,24],
[2,13,7,24],
[2,14,7,24],
[2,15,7,24],
[2,16,7,24],
[2,17,7,24],
[2,18,7,24],
[2,19,7,24],
[2,20,7,24],
[2,21,7,24],
[2,22,7,24],
[3,5,7,24],
[3,6,7,24],
[3,7,7,24],
[3,8,7,24],
[3,9,7,24],
[3,10,7,24],
[3,11,7,24],
[3,12,7,24],
[3,13,7,24],
[3,14,7,24],
[3,15,7,24],
[3,16,7,24],
[3,17,7,24],
[3,18,7,24],
[3,19,7,24],
[3,20,7,24],
[3,21,7,24],
[3,22,7,24],
[5,6,7,24],
[5,7,7,24],
[5,8,7,24],
[5,9,7,24],
[5,10,7,24],
[5,11,7,24],
[5,12,7,24],
[5,13,7,24],
[5,14,7,24],
[5,15,7,24],
[5,16,7,24],
[5,17,7,24],
[5,18,7,24],
[5,19,7,24],
[5,20,7,24],
[5,21,7,24],
[5,22,7,24],
[6,7,7,24],
[6,8,7,24],
[6,9,7,24],
[6,10,7,24],
[6,11,7,24],
[6,12,7,24],
[6,13,7,24],
[6,14,7,24],
[6,15,7,24],
[6,16,7,24],
[6,17,7,24],
[6,18,7,24],
[6,19,7,24],
[6,20,7,24],
[6,21,7,24],
[6,22,7,24],
[7,8,7,24],
[7,9,7,24],
[7,10,7,24],
[7,11,7,24],
[7,12,7,24],
[7,13,7,24],
[7,14,7,24],
[7,15,7,24],
[7,16,7,24],
[7,17,7,24],
[7,18,7,24],
[7,19,7,24],
[7,20,7,24],
[7,21,7,24],
[7,22,7,24],
[8,9,7,24],
[8,10,7,24],
[8,11,7,24],
[8,12,7,24],
[8,13,7,24],
[8,14,7,24],
[8,15,7,24],
[8,16,7,24],
[8,17,7,24],
[8,18,7,24],
[8,19,7,24],
[8,20,7,24],
[8,21,7,24],
[8,22,7,24],
[9,10,7,24],
[9,11,7,24],
[9,12,7,24],
[9,13,7,24],
[9,14,7,24],
[9,15,7,24],
[9,16,7,24],
[9,17,7,24],
[9,18,7,24],
[9,19,7,24],
[9,20,7,24],
[9,21,7,24],
[9,22,7,24],
[10,11,7,24],
[10,12,7,24],
[10,13,7,24],
[10,14,7,24],
[10,15,7,24],
[10,16,7,24],
[10,17,7,24],
[10,18,7,24],
[10,19,7,24],
[10,20,7,24],
[10,21,7,24],
[10,22,7,24],
[11,12,7,24],
[11,13,7,24],
[11,14,7,24],
[11,15,7,24],
[11,16,7,24],
[11,17,7,24],
[11,18,7,24],
[11,19,7,24],
[11,20,7,24],
[11,21,7,24],
[11,22,7,24],
[12,13,7,24],
[12,14,7,24],
[12,15,7,24],
[12,16,7,24],
[12,17,7,24],
[12,18,7,24],
[12,19,7,24],
[12,20,7,24],
[12,21,7,24],
[12,22,7,24],
[13,14,7,24],
[13,15,7,24],
[13,16,7,24],
[13,17,7,24],
[13,18,7,24],
[13,19,7,24],
[13,20,7,24],
[13,21,7,24],
[13,22,7,24],
[14,15,7,24],
[14,16,7,24],
[14,17,7,24],
[14,18,7,24],
[14,19,7,24],
[14,20,7,24],
[14,21,7,24],
[14,22,7,24],
[15,16,7,24],
[15,17,7,24],
[15,18,7,24],
[15,19,7,24],
[15,20,7,24],
[15,21,7,24],
[15,22,7,24],
[16,17,7,24],
[16,18,7,24],
[16,19,7,24],
[16,20,7,24],
[16,21,7,24],
[16,22,7,24],
[17,18,7,24],
[17,19,7,24],
[17,20,7,24],
[17,21,7,24],
[17,22,7,24],
[18,19,7,24],
[18,20,7,24],
[18,21,7,24],
[18,22,7,24],
[19,20,7,24],
[19,21,7,24],
[19,22,7,24],
[20,21,7,24],
[20,22,7,24],
[21,22,7,24]
],
"general":[
[0, "아회남", null, 0, null, 65, 74, 26, 0, 190, 225, null, null],
[0, "이적", null, 0, null, 29, 24, 84, 0, 162, 273, null, null],
[0, "윤상", null, 0, null, 51, 44, 62, 0, 194, 260, null, null],
[0, "윤묵", null, 0, null, 26, 15, 66, 0, 183, 239, null, null],
[0, "우금1", null, 0, null, 83, 78, 74, 0, 159, 221, null, null],
[0, "위관", null, 0, null, 69, 46, 79, 0, 220, 291, null, null],
[0, "원윤", null, 7, "완", 15, 14, 39, 1, 150, 199, null, null],
[0, "원희", null, 17, "남피", 66, 51, 63, 1, 176, 207, null, null],
[0, "염행", null, 20, "천수", 76, 84, 66, 1, 159, 215, null, null],
[0, "염유", null, 0, "계", 71, 57, 71, 0, 168, 227, null, null],
[0, "원술", null, 7, "완", 44, 65, 65, 12, 155, 199, null, null, "흥 마궁수 주제에 어딜 앞에 나서느냐! 썩 꺼져라!"],
[0, "원상", null, 0, null, 63, 75, 42, 0, 179, 207, null, null],
[0, "원소", null, 17, "남피", 81, 69, 70, 12, 154, 202, null, null, "안량과 문추만 이곳에 있엇어도…"],
[0, "염상", null, 0, null, 30, 27, 71, 0, 158, 199, null, null],
[0, "원담", null, 17, "남피", 60, 69, 30, 1, 173, 205, null, null],
[0, "염포", null, 14, "한중", 29, 25, 82, 11, 167, 231, null, null],
[0, "왕위", null, 0, null, 60, 70, 62, 0, 163, 222, null, null],
[0, "왕윤", null, 1, "장안", 26, 6, 68, 1, 137, 192, null, null],
[0, "왕항", null, 0, null, 76, 60, 61, 0, 184, 254, null, null],
[0, "왕찬", null, 0, null, 15, 3, 79, 0, 177, 217, null, null],
[0, "왕수", null, 19, "북해", 54, 27, 77, 11, 168, 218, null, null],
[0, "왕숙", null, 0, null, 36, 22, 76, 0, 195, 256, null, null],
[0, "왕준", null, 0, null, 81, 73, 77, 0, 206, 286, null, null],
[0, "왕쌍", null, 0, null, 67, 88, 19, 0, 195, 228, null, null],
[0, "왕창", null, 0, null, 74, 64, 79, 0, 188, 259, null, null],
[0, "왕평", null, 0, null, 83, 79, 76, 0, 192, 248, null, null],
[0, "왕보", null, 0, null, 62, 41, 79, 0, 171, 219, null, null],
[0, "왕문", null, 0, null, 65, 64, 31, 0, 162, 205, null, null],
[0, "왕릉", null, 0, null, 74, 64, 71, 0, 172, 251, null, null],
[0, "왕루", null, 0, null, 28, 30, 79, 0, 173, 211, null, null],
[0, "왕랑", null, 8, "서주", 47, 35, 79, 1, 167, 228, null, null],
[0, "온회", null, 0, null, 62, 36, 74, 0, 178, 228, null, null],
[0, "하안", null, 0, null, 15, 30, 72, 0, 190, 249, null, null],
[0, "괴월", null, 13, "양양", 47, 27, 82, 11, 157, 214, null, null],
[0, "괴량", null, 13, "양양", 68, 33, 88, 1, 155, 204, null, null],
[0, "가화", null, 0, null, 49, 65, 41, 0, 176, 222, null, null],
[0, "가규", null, 0, null, 78, 61, 84, 0, 177, 231, null, null],
[0, "하의", null, 0, null, 56, 69, 36, 0, 161, 195, null, null],
[0, "화흠", null, 1, "낙양", 33, 33, 82, 1, 157, 231, null, null],
[0, "가후", null, 1, "안정", 88, 48, 97, 1, 147, 223, null, null],
[0, "곽가", null, 0, null, 88, 15, 96, 0, 170, 207, null, null],
[0, "악환", null, 0, null, 65, 82, 42, 0, 196, 251, null, null],
[0, "곽사", null, 1, "안정", 64, 76, 13, 1, 146, 197, null, null],
[0, "악취", null, 0, null, 53, 66, 61, 0, 157, 195, null, null],
[0, "곽준", null, 0, null, 73, 66, 73, 0, 178, 217, null, null],
[0, "학소", null, 0, null, 86, 79, 78, 0, 185, 229, null, null],
[0, "악진", null, 2, "진류", 80, 84, 56, 1, 159, 218, null, null],
[0, "곽도", null, 17, "남피", 52, 50, 82, 1, 157, 205, null, null],
[0, "학맹", null, 0, null, 62, 67, 42, 0, 156, 300, null, null],
[0, "곽유지", null, 0, null, 28, 9, 69, 0, 190, 259, null, null],
[0, "곽익", null, 0, null, 73, 69, 69, 0, 207, 270, null, null],
[0, "곽회", null, 0, null, 87, 78, 81, 0, 187, 255, null, null],
[0, "하후위", null, 0, null, 71, 73, 49, 0, 204, 253, null, null],
[0, "하후연", null, 2, "진류", 90, 91, 68, 1, 162, 219, null, null],
[0, "하후은", null, 0, null, 63, 72, 53, 0, 180, 208, null, null],
[0, "하후화", null, 0, null, 48, 51, 71, 0, 207, 265, null, null],
[0, "하후혜", null, 0, null, 50, 44, 76, 0, 206, 242, null, null],
[0, "하후현", null, 0, null, 54, 39, 76, 0, 208, 254, null, null],
[0, "하후상", null, 0, null, 79, 72, 75, 0, 181, 225, null, null],
[0, "하후덕", null, 0, null, 69, 73, 32, 0, 178, 218, null, null],
[0, "하후돈", null, 2, "진류", 92, 90, 63, 1, 156, 220, null, null],
[0, "하후패", null, 0, null, 79, 84, 77, 0, 202, 262, null, null],
[0, "하후무", null, 0, null, 20, 7, 4, 0, 201, 259, null, null],
[0, "가충", null, 0, null, 54, 31, 89, 0, 217, 282, null, null],
[0, "하진", null, 0, null, 39, 40, 6, 0, 135, 189, null, null],
[0, "화웅", null, 1, "호로", 88, 92, 61, 1, 155, 190, null, null],
[0, "한윤", null, 7, "완", 26, 29, 65, 1, 155, 197, null, null],
[0, "관우", null, 0, "진류", 97, 97, 79, 0, 162, 219, null, null, "술이 식기 전에 돌아오겠소"],
[0, "환계", null, 7, "완", 25, 26, 68, 1, 156, 221, null, null],
[0, "관해", null, 0, null, 70, 82, 10, 0, 160, 193, null, null],
[0, "관구검", null, 0, null, 78, 74, 55, 0, 202, 255, null, null],
[0, "한현", null, 0, null, 22, 33, 62, 0, 163, 220, null, null],
[0, "한호", null, 15, "하내", 69, 72, 84, 11, 164, 224, null, null],
[0, "관흥", null, 0, null, 76, 86, 67, 0, 199, 234, null, null],
[0, "관색", null, 0, null, 74, 88, 56, 0, 200, 239, null, null],
[0, "한수", null, 20, "천수", 81, 75, 82, 12, 142, 215, null, null],
[0, "한숭", null, 0, null, 25, 15, 71, 0, 154, 210, null, null],
[0, "관정", null, 4, "북평", 36, 52, 73, 11, 158, 199, null, null],
[0, "한섬", null, 0, null, 69, 66, 36, 0, 159, 196, null, null],
[0, "감택", null, 0, null, 43, 49, 83, 0, 182, 243, null, null],
[0, "한충", null, 0, null, 64, 67, 18, 0, 151, 184, null, null],
[0, "한당", null, 7, "완", 76, 85, 61, 1, 156, 227, null, null],
[0, "한덕", null, 0, null, 63, 76, 25, 0, 171, 228, null, null],
[0, "감녕", null, 0, null, 93, 94, 76, 0, 174, 219, null, null],
[0, "한복", null, 12, "업", 28, 3, 27, 12, 149, 193, null, null],
[0, "관평", null, 0, null, 80, 82, 72, 0, 186, 219, null, null],
[0, "간옹", null, 0, "진류", 20, 32, 75, 0, 164, 225, null, null],
[0, "안량", null, 17, "남피", 88, 94, 21, 1, 160, 200, null, null],
[0, "위연", null, 0, null, 85, 92, 72, 0, 175, 234, null, null],
[0, "국의", null, 12, "업", 82, 78, 51, 1, 146, 197, null, null],
[0, "희지재", null, 0, null, 63, 7, 88, 0, 157, 196, null, null],
[0, "위속", null, 0, null, 67, 78, 31, 0, 156, 200, null, null],
[0, "위유", null, 16, "계", 46, 29, 74, 11, 151, 193, null, null],
[0, "우금2", null, 0, null, 72, 79, 38, 0, 173, 226, null, null],
[0, "우보", null, 1, "천수", 38, 60, 21, 1, 159, 192, null, null],
[0, "강유", null, 0, null, 92, 89, 90, 0, 202, 264, null, null],
[0, "공지", null, 0, null, 43, 53, 62, 0, 178, 197, null, null],
[0, "교유", null, 0, null, 64, 69, 38, 0, 143, 195, null, null],
[0, "공도", null, 0, null, 59, 70, 23, 0, 164, 200, null, null],
[0, "허공", null, 0, null, 44, 66, 64, 0, 155, 200, null, null],
[0, "허정", null, 21, "초", 23, 5, 68, 11, 152, 222, null, null],
[0, "허저", null, 0, null, 74, 96, 36, 0, 169, 226, null, null],
[0, "허유", null, 17, "남피", 36, 21, 80, 1, 155, 204, null, null],
[0, "기령", null, 7, "완", 78, 83, 51, 1, 155, 199, null, null],
[0, "김의", null, 0, null, 32, 38, 65, 0, 177, 218, null, null],
[0, "김배삼결", null, 0, null, 64, 76, 19, 0, 192, 225, null, null],
[0, "김선", null, 1, "장안", 52, 68, 13, 1, 155, 220, null, null],
[0, "우번", null, 0, null, 43, 46, 86, 0, 164, 233, null, null],
[0, "형도영", null, 0, null, 69, 80, 41, 0, 174, 208, null, null],
[0, "엄안", null, 6, "자동", 82, 83, 72, 1, 151, 222, null, null],
[0, "곽마", null, 0, null, 68, 71, 40, 0, 239, 281, null, null],
[0, "엄준", null, 0, null, 28, 2, 71, 0, 169, 246, null, null],
[0, "엄정", null, 0, null, 50, 55, 39, 0, 151, 189, null, null],
[0, "엄백호", null, 0, null, 67, 70, 23, 0, 142, 198, null, null, "이 몸은 동오의 덕왕 엄백호라고 하오!"],
[0, "엄여", null, 0, null, 61, 78, 44, 0, 145, 196, null, null],
[0, "오의", null, 0, null, 79, 73, 70, 0, 165, 237, null, null],
[0, "황개", null, 7, "완", 80, 83, 70, 1, 154, 218, null, null],
[0, "고간", null, 0, null, 74, 56, 48, 0, 168, 206, null, null],
[0, "황권", null, 0, null, 75, 59, 82, 0, 167, 240, null, null],
[0, "고유", null, 0, null, 57, 43, 72, 0, 174, 263, null, null],
[0, "고순", null, 0, null, 85, 86, 60, 0, 162, 198, null, null],
[0, "고상", null, 0, null, 68, 68, 53, 0, 194, 252, null, null],
[0, "고승", null, 0, null, 67, 73, 41, 0, 145, 184, null, null],
[0, "후성", null, 0, null, 74, 75, 68, 0, 158, 199, null, null],
[0, "후선", null, 20, "천수", 63, 66, 34, 1, 175, 228, null, null],
[0, "황조", null, 13, "강하", 74, 66, 55, 1, 148, 208, null, null],
[0, "공손월", null, 4, "북평", 74, 72, 47, 1, 160, 192, null, null],
[0, "공손연", null, 0, null, 65, 70, 60, 0, 205, 238, null, null],
[0, "공손공", null, 11, "안평", 39, 17, 69, 1, 174, 240, null, null],
[0, "공손강", null, 11, "안평", 72, 66, 65, 1, 172, 211, null, null],
[0, "공손찬", null, 4, "북평", 84, 83, 75, 12, 152, 199, null, null],
[0, "공손속", null, 4, "북평", 63, 68, 57, 1, 176, 199, null, null],
[0, "공손도", null, 11, "안평", 67, 71, 66, 12, 154, 204, null, null],
[0, "공손범", null, 4, "북평", 73, 69, 66, 1, 158, 199, null, null],
[0, "황충", null, 0, null, 90, 93, 65, 0, 154, 220, null, null],
[0, "고정", null, 0, null, 55, 63, 43, 0, 190, 251, null, null],
[0, "고패", null, 0, null, 66, 61, 69, 0, 170, 212, null, null],
[0, "황보숭", null, 1, "홍농", 92, 61, 73, 1, 132, 195, null, null],
[0, "공융", null, 19, "북해", 30, 5, 73, 12, 153, 208, null, null],
[0, "고람", null, 17, "남피", 76, 82, 68, 1, 159, 201, null, null],
[0, "오경", null, 0, null, 69, 66, 52, 0, 151, 211, null, null],
[0, "호거아", null, 1, "사곡", 70, 82, 41, 1, 164, 206, null, null],
[0, "호진", null, 1, "호로", 65, 74, 12, 1, 148, 190, null, null],
[0, "올돌골", null, 0, null, 79, 86, 1, 0, 186, 225, null, null],
[0, "호반", null, 0, null, 55, 55, 59, 0, 179, 233, null, null],
[0, "오반", null, 0, null, 74, 71, 59, 0, 171, 234, null, null],
[0, "고옹", null, 0, null, 43, 18, 80, 0, 168, 243, null, null],
[0, "오란", null, 6, "성도", 68, 80, 35, 1, 170, 218, null, null],
[0, "채화", null, 13, "장판", 39, 50, 1, 1, 166, 208, null, null],
[0, "채중", null, 13, "장판", 40, 54, 2, 1, 168, 208, null, null],
[0, "채모", null, 13, "양양", 70, 70, 77, 1, 160, 215, null, null],
[0, "착융", null, 0, null, 60, 69, 38, 0, 161, 195, null, null],
[0, "사마의", null, 0, "하내", 98, 63, 98, 0, 179, 251, null, null],
[0, "사마염", null, 0, null, 69, 59, 77, 0, 238, 290, null, null],
[0, "사마사", null, 0, null, 79, 64, 88, 0, 208, 255, null, null],
[0, "사마소", null, 0, null, 76, 57, 87, 0, 211, 265, null, null],
[0, "사마부", null, 0, "하내", 70, 37, 77, 0, 180, 272, null, null],
[0, "사마랑", null, 1, "낙양", 20, 21, 72, 1, 171, 217, null, null],
[0, "사마가", null, 0, null, 66, 84, 25, 0, 167, 222, null, null],
[0, "주흔", null, 9, "수춘", 65, 62, 73, 11, 159, 196, null, null],
[0, "주앙", null, 17, "남피", 74, 65, 65, 1, 162, 195, null, null],
[0, "주지", null, 0, null, 65, 85, 41, 0, 233, 295, null, null],
[0, "주창", null, 0, "여남", 68, 84, 42, 0, 164, 219, null, null],
[0, "주태유평", null, 0, null, 84, 91, 48, 0, 171, 225, null, null],
[0, "주방", null, 0, null, 52, 41, 80, 0, 200, 240, null, null],
[0, "주유", null, 0, null, 95, 71, 96, 0, 175, 210, null, null],
[0, "주환", null, 0, null, 84, 82, 77, 0, 177, 238, null, null],
[0, "주거", null, 0, null, 77, 57, 72, 0, 190, 246, null, null],
[0, "축융", null, 0, null, 74, 85, 29, 0, 182, 230, null, null],
[0, "주준", null, 1, "낙양", 89, 65, 70, 1, 149, 195, null, null],
[0, "주연", null, 0, null, 79, 69, 71, 0, 182, 249, null, null],
[0, "주치", null, 0, null, 71, 56, 72, 0, 156, 224, null, null],
[0, "주포", null, 0, null, 68, 73, 34, 0, 191, 225, null, null],
[0, "주령", null, 0, null, 71, 73, 67, 0, 170, 236, null, null],
[0, "순욱", null, 0, null, 62, 14, 95, 0, 163, 212, null, null],
[0, "순우경", null, 17, "남피", 72, 66, 29, 1, 146, 200, null, null],
[0, "순심", null, 0, null, 34, 25, 78, 0, 164, 208, null, null],
[0, "순유", null, 0, "낙양", 73, 26, 94, 0, 157, 214, null, null],
[0, "장완", null, 0, null, 78, 34, 84, 0, 188, 246, null, null],
[0, "종회", null, 0, null, 82, 51, 91, 0, 225, 264, null, null],
[0, "장간", null, 0, null, 19, 6, 66, 0, 175, 208, null, null],
[0, "장의거", null, 17, "남피", 71, 58, 59, 1, 159, 205, null, null],
[0, "장흠", null, 0, null, 78, 84, 54, 0, 159, 208, null, null],
[0, "장제3", null, 0, null, 48, 43, 85, 0, 188, 249, null, null],
[0, "초주", null, 0, null, 16, 3, 67, 0, 201, 270, null, null],
[0, "초촉", null, 0, null, 65, 76, 33, 0, 159, 208, null, null],
[0, "상총", null, 0, null, 76, 61, 77, 0, 195, 240, null, null],
[0, "종요", null, 0, null, 70, 24, 77, 0, 151, 230, null, null],
[0, "상랑", null, 0, null, 28, 18, 74, 0, 167, 247, null, null],
[0, "서영", null, 1, "사수", 80, 76, 62, 1, 147, 192, null, null],
[0, "제갈각", null, 0, null, 72, 47, 90, 0, 203, 253, null, null],
[0, "제갈근", null, 0, null, 75, 34, 81, 0, 174, 241, null, null],
[0, "제갈균", null, 0, null, 29, 25, 52, 0, 185, 252, null, null],
[0, "제갈탄", null, 0, null, 72, 72, 76, 0, 206, 258, null, null],
[0, "제갈량", null, 0, null, 98, 38, 100, 0, 184, 234, null, null],
[0, "서황", null, 0, null, 91, 90, 78, 0, 165, 228, null, null],
[0, "서서", null, 0, null, 87, 64, 93, 0, 160, 300, null, null],
[0, "서성", null, 0, null, 86, 81, 78, 0, 178, 232, null, null],
[0, "서막", null, 0, null, 55, 32, 68, 0, 171, 249, null, null],
[0, "신의", null, 0, null, 55, 59, 60, 0, 190, 252, null, null],
[0, "신탐", null, 0, null, 56, 62, 54, 0, 188, 254, null, null],
[0, "심배", null, 12, "업", 80, 60, 83, 1, 156, 204, null, null],
[0, "신비", null, 0, null, 39, 24, 79, 0, 171, 240, null, null],
[0, "신평", null, 17, "남피", 69, 43, 77, 1, 165, 204, null, null],
[0, "진복", null, 0, null, 31, 7, 73, 0, 160, 226, null, null],
[0, "진랑", null, 0, null, 58, 70, 35, 0, 192, 234, null, null],
[0, "휴고", null, 0, null, 63, 71, 38, 0, 151, 199, null, null],
[0, "추단", null, 0, null, 61, 64, 34, 0, 144, 193, null, null],
[0, "성의", null, 20, "천수", 74, 72, 41, 1, 168, 211, null, null],
[0, "성공영", null, 20, "천수", 73, 71, 80, 11, 171, 220, null, null],
[0, "설종", null, 0, null, 34, 16, 73, 0, 187, 243, null, null],
[0, "선경", null, 4, "북평", 71, 68, 43, 1, 156, 199, null, null],
[0, "전종", null, 0, null, 78, 72, 75, 0, 183, 249, null, null],
[0, "조예", null, 0, null, 72, 52, 82, 0, 205, 239, null, null],
[0, "조휴", null, 0, null, 74, 75, 62, 0, 174, 228, null, null],
[0, "송헌", null, 0, null, 68, 77, 38, 0, 157, 200, null, null],
[0, "조앙", null, 2, "진류", 74, 67, 69, 1, 161, 197, null, null],
[0, "조홍 자렴", null, 2, "진류", 79, 81, 44, 1, 169, 232, null, null, "좌절감이 사나이를 키우는 것이다!"],
[0, "조순", null, 2, "진류", 75, 71, 63, 1, 170, 210, null, null],
[0, "조창", null, 0, null, 82, 90, 40, 0, 190, 223, null, null],
[0, "조식", null, 0, null, 33, 22, 81, 0, 192, 232, null, null],
[0, "조진", null, 0, null, 81, 74, 70, 0, 185, 231, null, null],
[0, "조인", null, 2, "진류", 89, 86, 62, 1, 168, 223, null, null],
[0, "조성", null, 0, null, 54, 74, 38, 0, 163, 198, null, null],
[0, "조조", null, 2, "진류", 99, 72, 91, 12, 151, 220, null, null, "내가 천하 사람들을 저버릴지언정, 천하 사람들이 나를 저버리게 하지는 않을 것이다."],
[0, "조충", null, 0, null, 31, 21, 85, 0, 196, 207, null, null],
[0, "장패", null, 0, null, 78, 75, 53, 0, 165, 231, null, null],
[0, "조비", null, 0, null, 70, 71, 83, 0, 187, 226, null, null],
[0, "조표", null, 8, "서주", 66, 69, 32, 1, 151, 196, null, null],
[0, "저수", null, 12, "업", 78, 35, 90, 11, 156, 201, null, null],
[0, "소비", null, 0, null, 69, 63, 66, 0, 172, 221, null, null],
[0, "조무", null, 7, "완", 70, 71, 66, 1, 155, 193, null, null],
[0, "손환", null, 0, null, 82, 73, 76, 0, 166, 228, null, null],
[0, "손견", null, 7, "완", 94, 90, 79, 11, 156, 192, null, null, "내가 옥새를 가지고 있다면 나는 칼과 화살을 맞아 죽을 것이다."],
[0, "손건", null, 0, null, 34, 33, 79, 0, 165, 215, null, null],
[0, "손권", null, 0, null, 79, 67, 80, 0, 182, 252, null, null],
[0, "손교", null, 0, null, 77, 72, 67, 0, 181, 219, null, null],
[0, "손책", null, 0, null, 96, 92, 74, 0, 175, 200, null, null],
[0, "손소", null, 0, null, 80, 79, 76, 0, 188, 241, null, null],
[0, "손정", null, 7, "완", 66, 53, 73, 1, 160, 206, null, null],
[0, "손중", null, 0, null, 62, 71, 36, 0, 154, 184, null, null],
[0, "손등", null, 0, null, 62, 37, 79, 0, 209, 241, null, null],
[0, "손유", null, 0, null, 77, 70, 68, 0, 177, 215, null, null],
[0, "손익", null, 0, null, 67, 78, 27, 0, 184, 204, null, null],
[0, "손례", null, 0, null, 78, 81, 67, 0, 180, 250, null, null],
[0, "태사자", null, 0, "안평", 90, 93, 69, 0, 166, 206, null, null],
[0, "대래동주", null, 0, null, 51, 53, 54, 0, 195, 249, null, null],
[0, "대릉", null, 0, null, 70, 75, 39, 0, 199, 258, null, null],
[0, "타사대왕", null, 0, null, 62, 59, 70, 0, 186, 225, null, null],
[0, "담웅", null, 0, null, 58, 73, 14, 0, 188, 221, null, null],
[0, "장윤", null, 13, "양양", 72, 67, 42, 1, 163, 208, null, null],
[0, "조운", null, 0, "진양", 96, 96, 77, 0, 168, 229, null, null],
[0, "장위", null, 14, "한중", 74, 66, 45, 1, 172, 228, null, null, "쌀 다섯 말만 가지고 오시오~ 모두 고쳐드리리다."],
[0, "장영", null, 0, null, 75, 74, 41, 0, 154, 195, null, null],
[0, "장연", null, 0, "진양", 76, 81, 57, 0, 153, 210, null, null],
[0, "장횡", null, 0, null, 59, 70, 23, 0, 178, 211, null, null],
[0, "장온", null, 0, null, 32, 10, 72, 0, 193, 231, null, null],
[0, "장개", null, 8, "하비", 34, 66, 8, 1, 155, 194, null, null],
[0, "장각", null, 0, null, 87, 25, 86, 0, 140, 184, null, null],
[0, "장기", null, 0, null, 74, 35, 76, 0, 170, 223, null, null],
[0, "장의", null, 0, null, 79, 72, 75, 0, 153, 215, null, null],
[0, "장훈", null, 7, "완", 72, 68, 41, 1, 156, 206, null, null],
[0, "장굉", null, 0, null, 24, 22, 86, 0, 153, 212, null, null],
[0, "장합", null, 12, "업", 89, 89, 73, 1, 167, 231, null, null],
[0, "조홍", null, 0, null, 66, 72, 28, 0, 156, 184, null, null],
[0, "장제1", null, 1, "장안", 70, 66, 55, 1, 144, 196, null, null],
[0, "장수", null, 1, "함곡", 80, 73, 64, 1, 154, 207, null, null],
[0, "장소 자포", null, 0, null, 33, 3, 84, 0, 156, 236, null, null],
[0, "장송", null, 0, null, 25, 6, 88, 0, 170, 212, null, null],
[0, "장임", null, 6, "성도", 84, 84, 78, 1, 169, 214, null, null],
[0, "장제", null, 0, null, 67, 43, 80, 0, 236, 280, null, null],
[0, "장막", null, 2, "진류", 52, 53, 71, 1, 155, 195, null, null],
[0, "조범", null, 0, null, 28, 21, 32, 0, 168, 218, null, null],
[0, "장비", null, 0, "진류", 94, 98, 30, 0, 165, 221, null, null],
[0, "장포", null, 0, null, 78, 87, 48, 0, 198, 219, null, null],
[0, "장보", null, 0, null, 83, 71, 81, 0, 148, 184, null, null],
[0, "장만성", null, 0, null, 75, 81, 45, 0, 143, 184, null, null],
[0, "장양", null, 5, "진양", 72, 70, 66, 12, 151, 195, null, null],
[0, "장익", null, 0, null, 75, 74, 76, 0, 188, 264, null, null],
[0, "장료", null, 1, "사곡", 95, 92, 78, 1, 169, 222, null, null],
[0, "장량", null, 0, null, 78, 80, 74, 0, 153, 184, null, null],
[0, "조루", null, 0, null, 70, 43, 68, 0, 183, 219, null, null],
[0, "장로", null, 14, "한중", 51, 26, 74, 12, 163, 216, null, null],
[0, "진횡", null, 0, null, 64, 63, 26, 0, 161, 195, null, null],
[0, "진응", null, 0, null, 62, 72, 45, 0, 172, 208, null, null],
[0, "진기", null, 0, null, 58, 65, 43, 0, 165, 198, null, null],
[0, "진궁", null, 2, "진류", 84, 55, 89, 11, 154, 198, null, null],
[0, "진교", null, 0, null, 61, 27, 77, 0, 175, 237, null, null],
[0, "진군", null, 0, null, 32, 14, 75, 0, 167, 236, null, null],
[0, "진규", null, 8, "서주", 30, 4, 82, 11, 132, 206, null, null],
[0, "진식", null, 0, null, 70, 71, 25, 0, 191, 230, null, null],
[0, "진진", null, 0, null, 46, 46, 69, 0, 170, 235, null, null],
[0, "진태", null, 0, null, 84, 77, 86, 0, 210, 260, null, null],
[0, "진등", null, 8, "하비", 79, 64, 81, 1, 169, 208, null, null],
[0, "진도", null, 0, null, 76, 71, 67, 0, 171, 237, null, null],
[0, "진무", null, 0, null, 76, 87, 43, 0, 176, 215, null, null],
[0, "진란", null, 0, null, 66, 69, 40, 0, 157, 204, null, null],
[0, "진림", null, 0, null, 25, 9, 75, 0, 160, 217, null, null],
[0, "정욱", null, 0, null, 70, 49, 90, 0, 141, 220, null, null],
[0, "정원지", null, 0, null, 69, 74, 17, 0, 145, 184, null, null],
[0, "정은", null, 0, null, 69, 73, 40, 0, 184, 220, null, null],
[0, "정원", null, 0, null, 70, 76, 35, 0, 137, 189, null, null],
[0, "정보", null, 7, "완", 84, 79, 79, 1, 151, 216, null, null],
[0, "정봉승연", null, 0, null, 81, 80, 75, 0, 190, 271, null, null],
[0, "전위", null, 0, null, 72, 95, 35, 0, 160, 197, null, null],
[0, "전해", null, 4, "북평", 68, 65, 58, 1, 154, 199, null, null],
[0, "전주", null, 0, null, 66, 66, 73, 0, 169, 214, null, null],
[0, "전풍", null, 12, "업", 72, 29, 93, 1, 162, 200, null, null],
[0, "전예", null, 0, null, 80, 72, 80, 0, 171, 252, null, null],
[0, "동윤", null, 0, null, 47, 28, 79, 0, 192, 246, null, null],
[0, "동화", null, 0, null, 57, 34, 75, 0, 168, 219, null, null],
[0, "등애", null, 0, null, 93, 87, 89, 0, 197, 264, null, null],
[0, "도겸", null, 8, "서주", 51, 27, 64, 12, 132, 194, null, null],
[0, "등현", null, 0, null, 61, 73, 45, 0, 188, 248, null, null],
[0, "등지", null, 0, null, 73, 52, 81, 0, 178, 251, null, null],
[0, "동습", null, 0, null, 72, 85, 50, 0, 169, 215, null, null],
[0, "동승", null, 1, "낙양", 56, 53, 65, 1, 154, 200, null, null],
[0, "동소", null, 0, null, 34, 25, 80, 0, 156, 236, null, null],
[0, "동탁", null, 1, "낙양", 85, 87, 73, 12, 139, 192, null, null, "크하하, 천하는 이제 나의 것이다!"],
[0, "동도나", null, 0, null, 68, 73, 31, 0, 189, 225, null, null],
[0, "동민", null, 1, "장안", 49, 60, 25, 1, 149, 192, null, null],
[0, "등무", null, 0, null, 61, 75, 29, 0, 147, 184, null, null],
[0, "두기", null, 0, null, 66, 32, 75, 0, 163, 224, null, null],
[0, "두예", null, 0, null, 84, 30, 85, 0, 222, 284, null, null],
[0, "배원소", null, 0, null, 49, 65, 25, 0, 169, 200, null, null],
[0, "마완", null, 0, null, 71, 74, 16, 0, 170, 211, null, null],
[0, "마휴", null, 0, null, 68, 73, 48, 0, 178, 212, null, null],
[0, "파재", null, 0, null, 74, 74, 55, 0, 145, 184, null, null],
[0, "마준", null, 0, null, 38, 52, 31, 0, 196, 230, null, null],
[0, "마속", null, 0, null, 61, 67, 87, 0, 190, 228, null, null],
[0, "마대", null, 0, null, 79, 85, 62, 0, 183, 246, null, null],
[0, "마충", null, 0, null, 78, 72, 68, 0, 187, 249, null, null],
[0, "마초", null, 0, null, 93, 97, 44, 0, 176, 222, null, null],
[0, "마철", null, 0, null, 70, 62, 58, 0, 179, 212, null, null],
[0, "마등", null, 10, "서량", 82, 80, 52, 12, 149, 212, null, null],
[0, "마량", null, 0, null, 53, 23, 88, 0, 187, 222, null, null],
[0, "반준", null, 0, null, 61, 18, 83, 0, 174, 239, null, null],
[0, "반장", null, 0, null, 76, 80, 74, 0, 177, 234, null, null],
[0, "번조", null, 1, "안정", 66, 73, 31, 1, 149, 192, null, null],
[0, "번능", null, 0, null, 69, 61, 36, 0, 158, 195, null, null],
[0, "반봉", null, 12, "업", 56, 77, 4, 1, 155, 190, null, null],
[0, "비의", null, 0, null, 77, 30, 83, 0, 193, 253, null, null],
[0, "비연", null, 0, null, 60, 66, 21, 0, 196, 238, null, null],
[0, "비시", null, 0, null, 18, 28, 65, 0, 176, 240, null, null],
[0, "미축", null, 8, "하비", 33, 29, 78, 1, 165, 220, null, null],
[0, "미방", null, 8, "광릉", 54, 61, 32, 1, 169, 226, null, null],
[0, "비요", null, 0, null, 70, 66, 73, 0, 192, 228, null, null],
[0, "무안국", null, 19, "북해", 70, 83, 34, 1, 156, 193, null, null],
[0, "풍습", null, 0, null, 72, 71, 39, 0, 182, 222, null, null],
[0, "부사인", null, 0, null, 46, 63, 37, 0, 182, 225, null, null],
[0, "부첨", null, 0, null, 73, 85, 76, 0, 216, 263, null, null],
[0, "부손", null, 0, null, 29, 13, 70, 0, 162, 230, null, null],
[0, "문앙", null, 0, null, 76, 93, 65, 0, 238, 291, null, null],
[0, "문흠", null, 0, null, 74, 83, 43, 0, 200, 258, null, null],
[0, "문추", null, 17, "남피", 89, 93, 47, 1, 169, 200, null, null],
[0, "문빙", null, 0, null, 80, 82, 69, 0, 178, 237, null, null],
[0, "변희", null, 0, null, 56, 70, 62, 0, 169, 200, null, null],
[0, "망아장", null, 0, null, 45, 79, 3, 0, 191, 225, null, null],
[0, "봉기", null, 17, "남피", 43, 21, 84, 11, 153, 202, null, null],
[0, "방희", null, 0, null, 60, 38, 69, 0, 152, 192, null, null],
[0, "법정", null, 0, null, 82, 47, 94, 0, 176, 220, null, null],
[0, "방통", null, 0, null, 85, 34, 97, 0, 178, 213, null, null],
[0, "방덕", null, 10, "서량", 89, 94, 75, 11, 170, 219, null, null],
[0, "포륭", null, 0, null, 58, 76, 49, 0, 174, 208, null, null],
[0, "목순", null, 0, null, 52, 77, 11, 0, 157, 190, null, null],
[0, "목록대왕", null, 0, null, 65, 71, 39, 0, 184, 225, null, null],
[0, "보즐", null, 0, null, 72, 51, 84, 0, 177, 247, null, null],
[0, "만총", null, 0, null, 84, 64, 82, 0, 170, 242, null, null],
[0, "모개", null, 0, null, 63, 39, 60, 0, 161, 216, null, null],
[0, "맹획", null, 0, null, 87, 87, 42, 0, 186, 245, null, null],
[0, "맹달", null, 0, null, 75, 73, 75, 0, 172, 228, null, null],
[0, "맹우", null, 0, null, 50, 68, 22, 0, 190, 243, null, null],
[0, "유섭", null, 7, "완", 62, 79, 24, 1, 158, 190, null, null],
[0, "양부2", null, 0, null, 62, 68, 68, 0, 167, 212, null, null],
[0, "옹개", null, 0, null, 73, 75, 57, 0, 188, 225, null, null],
[0, "양의", null, 0, null, 68, 40, 82, 0, 190, 235, null, null],
[0, "양호", null, 0, null, 90, 64, 84, 0, 221, 278, null, null],
[0, "양홍", null, 7, "완", 33, 15, 77, 1, 152, 199, null, null],
[0, "양앙", null, 0, null, 68, 72, 38, 0, 172, 215, null, null],
[0, "양추1", null, 0, null, 52, 65, 40, 0, 159, 199, null, null],
[0, "양수", null, 0, null, 25, 4, 83, 0, 175, 219, null, null],
[0, "양추2", null, 0, null, 67, 64, 60, 0, 172, 238, null, null],
[0, "양송", null, 0, null, 1, 5, 28, 0, 167, 215, null, null],
[0, "양임", null, 14, "한중", 70, 78, 56, 1, 170, 215, null, null],
[0, "양조", null, 0, null, 53, 61, 36, 0, 223, 286, null, null],
[0, "양백", null, 14, "한중", 44, 45, 19, 1, 171, 214, null, null],
[0, "양부1", null, 0, null, 67, 50, 83, 0, 178, 239, null, null],
[0, "양봉1", null, 0, null, 66, 65, 31, 0, 153, 197, null, null],
[0, "양봉2", null, 0, null, 54, 62, 53, 0, 191, 252, null, null],
[0, "뇌동", null, 0, null, 69, 78, 51, 0, 172, 218, null, null],
[0, "뇌박", null, 0, null, 62, 70, 36, 0, 157, 206, null, null],
[0, "이이", null, 0, null, 63, 77, 19, 0, 187, 222, null, null],
[0, "이회", null, 0, null, 79, 65, 79, 0, 175, 231, null, null],
[0, "이각", null, 1, "낙양", 69, 72, 24, 1, 148, 198, null, null],
[0, "육항", null, 0, null, 91, 63, 87, 0, 226, 274, null, null],
[0, "육적", null, 0, null, 20, 7, 72, 0, 187, 219, null, null],
[0, "육손", null, 0, null, 94, 69, 95, 0, 183, 245, null, null],
[0, "이엄", null, 0, null, 83, 84, 76, 0, 172, 234, null, null],
[0, "이유", null, 1, "낙양", 61, 26, 93, 11, 150, 192, null, null, "장안으로 천도를 하는것이 어떻겠습니까?"],
[0, "이숙", null, 1, "낙양", 46, 69, 61, 1, 156, 192, null, null],
[0, "이통", null, 0, "여남", 73, 83, 62, 0, 168, 209, null, null],
[0, "이전", null, 0, null, 78, 77, 79, 0, 181, 216, null, null],
[0, "이풍", null, 0, null, 69, 74, 50, 0, 158, 199, null, null],
[0, "유언", null, 6, "성도", 53, 38, 80, 12, 132, 194, null, null],
[0, "유괴", null, 6, "성도", 71, 73, 67, 1, 165, 214, null, null],
[0, "유기", null, 13, "양양", 52, 12, 63, 1, 174, 210, null, null],
[0, "유우", null, 16, "계", 55, 33, 70, 12, 145, 193, null, null],
[0, "유훈", null, 0, null, 47, 63, 35, 0, 163, 216, null, null],
[0, "유현", null, 0, null, 54, 66, 51, 0, 188, 252, null, null],
[0, "유순", null, 0, null, 63, 46, 41, 0, 172, 255, null, null],
[0, "유장", null, 6, "성도", 31, 5, 34, 1, 162, 219, null, null],
[0, "유심", null, 0, null, 60, 62, 70, 0, 238, 264, null, null],
[0, "유선", null, 0, null, 3, 5, 9, 0, 208, 270, null, null],
[0, "유종", null, 0, null, 24, 22, 65, 0, 195, 220, null, null],
[0, "유도", null, 0, null, 25, 23, 26, 0, 168, 214, null, null],
[0, "유파", null, 0, null, 29, 22, 75, 0, 186, 222, null, null],
[0, "유반", null, 0, null, 69, 76, 47, 0, 168, 210, null, null],
[0, "유비", null, 0, "진류", 81, 77, 80, 0, 161, 223, null, null],
[0, "유표1", null, 13, "양양", 48, 31, 72, 12, 142, 208, null, null, "강하 팔준에서 제일가는 이 유표에게로 오시오!"],
[0, "유복", null, 0, null, 64, 49, 74, 0, 164, 208, null, null],
[0, "유벽", null, 0, null, 70, 72, 47, 0, 145, 201, null, null],
[0, "유봉", null, 0, null, 75, 79, 44, 0, 188, 220, null, null],
[0, "유엽", null, 0, null, 56, 32, 92, 0, 176, 235, null, null],
[0, "유요", null, 0, null, 62, 67, 46, 0, 156, 198, null, null],
[0, "여위황", null, 0, null, 58, 63, 29, 0, 159, 200, null, null],
[0, "요화", null, 0, null, 73, 76, 69, 0, 168, 264, null, null],
[0, "양흥", null, 10, "서량", 61, 65, 19, 1, 169, 211, null, null],
[0, "양습", null, 0, null, 73, 40, 74, 0, 168, 230, null, null],
[0, "양서", null, 0, null, 56, 62, 66, 0, 198, 260, null, null],
[0, "능조", null, 0, null, 75, 81, 42, 0, 168, 203, null, null],
[0, "능통", null, 0, null, 77, 89, 60, 0, 189, 217, null, null],
[0, "여개", null, 0, null, 53, 30, 67, 0, 194, 227, null, null],
[0, "여건", null, 0, null, 57, 70, 62, 0, 173, 238, null, null],
[0, "여광", null, 0, null, 56, 70, 13, 0, 162, 207, null, null],
[0, "여상", null, 0, null, 54, 71, 12, 0, 164, 207, null, null],
[0, "여대", null, 0, null, 75, 71, 70, 0, 161, 256, null, null],
[0, "여범", null, 0, null, 73, 63, 75, 0, 169, 228, null, null],
[0, "여포", null, 1, "사수", 97, 100, 26, 1, 156, 198, null, null],
[0, "여몽", null, 0, null, 82, 81, 20, 0, 178, 219, null, null],
[0, "윤직", null, 0, null, 46, 42, 73, 0, 196, 237, null, null],
[0, "냉포", null, 0, null, 71, 82, 61, 0, 176, 214, null, null],
[0, "진취", null, 0, null, 56, 63, 45, 0, 174, 208, null, null],
[0, "노숙", null, 0, null, 84, 56, 92, 0, 172, 217, null, null],
[0, "노식", null, 0, null, 86, 63, 82, 0, 139, 192, null, null],
[0, "범강", null, 0, null, 49, 50, 36, 0, 174, 222, null, null],
[0, "장달", null, 0, null, 43, 56, 34, 0, 175, 222, null, null],
[0, "규람", null, 0, null, 55, 70, 58, 0, 165, 204, null, null],
[0, "대원", null, 0, null, 38, 32, 68, 0, 166, 204, null, null],
[0, "왕기", null, 0, null, 77, 72, 86, 0, 190, 261, null, null],
[0, "왕상", null, 0, null, 23, 19, 68, 0, 180, 268, null, null],
[0, "왕돈", null, 0, null, 60, 66, 46, 0, 198, 256, null, null],
[0, "악침", null, 0, null, 73, 75, 43, 0, 196, 257, null, null],
[0, "하제", null, 0, null, 83, 70, 82, 0, 171, 227, null, null],
[0, "환범", null, 0, null, 40, 11, 78, 0, 199, 249, null, null],
[0, "견초", null, 0, null, 72, 79, 73, 0, 168, 244, null, null],
[0, "고당륭", null, 0, null, 35, 24, 76, 0, 190, 244, null, null],
[0, "오찬", null, 0, null, 68, 41, 78, 0, 181, 245, null, null],
[0, "호질", null, 0, null, 73, 46, 74, 0, 192, 250, null, null],
[0, "오질", null, 0, null, 16, 29, 68, 0, 177, 230, null, null],
[0, "호준", null, 0, null, 79, 76, 62, 0, 200, 256, null, null],
[0, "고담", null, 0, null, 53, 23, 77, 0, 203, 244, null, null],
[0, "최림", null, 0, null, 32, 22, 66, 0, 187, 244, null, null],
[0, "사마망", null, 0, null, 78, 58, 83, 0, 205, 271, null, null],
[0, "주이", null, 0, null, 70, 73, 61, 0, 201, 257, null, null],
[0, "전단", null, 0, null, 67, 64, 39, 0, 204, 261, null, null],
[0, "조우", null, 0, null, 50, 43, 37, 0, 199, 278, null, null],
[0, "조상", null, 0, null, 39, 33, 30, 0, 207, 249, null, null],
[0, "조방", null, 0, null, 20, 14, 27, 0, 232, 274, null, null],
[0, "태사향", null, 0, null, 57, 66, 48, 0, 189, 246, null, null],
[0, "장휴", null, 0, null, 63, 27, 74, 0, 204, 244, null, null],
[0, "장호", null, 0, null, 75, 74, 51, 0, 195, 240, null, null],
[0, "조광", null, 0, null, 67, 71, 53, 0, 210, 263, null, null],
[0, "장집", null, 0, null, 76, 29, 80, 0, 196, 254, null, null],
[0, "장승", null, 0, null, 77, 70, 75, 0, 178, 244, null, null],
[0, "장소", null, 0, null, 23, 56, 31, 0, 202, 264, null, null],
[0, "조통", null, 0, null, 68, 67, 61, 0, 209, 260, null, null],
[0, "진표", null, 0, null, 66, 42, 74, 0, 207, 237, null, null],
[0, "정무", null, 0, null, 56, 35, 75, 0, 201, 265, null, null],
[0, "정봉", null, 0, null, 66, 66, 53, 0, 198, 266, null, null],
[0, "전만", null, 0, null, 51, 73, 39, 0, 181, 235, null, null],
[0, "마균", null, 0, null, 22, 17, 71, 0, 200, 259, null, null],
[0, "방회", null, 0, null, 69, 75, 49, 0, 205, 272, null, null],
[0, "서구", null, 0, null, 69, 42, 70, 0, 149, 208, null, null],
[0, "육개", null, 0, null, 65, 61, 79, 0, 198, 269, null, null],
[0, "유찬", null, 0, null, 78, 81, 64, 0, 172, 255, null, null],
[0, "유소", null, 0, null, 68, 53, 74, 0, 195, 264, null, null],
[0, "요립", null, 0, null, 32, 15, 76, 0, 181, 250, null, null],
[0, "여거", null, 0, null, 78, 69, 71, 0, 196, 256, null, null],
[0, "제갈첨", null, 0, null, 70, 57, 76, 0, 227, 263, null, null],
[0, "손휴", null, 0, null, 57, 42, 78, 0, 235, 264, null, null],
[0, "극정", null, 0, null, 42, 23, 68, 0, 208, 278, null, null],
[0, "호분", null, 0, null, 71, 76, 50, 0, 222, 288, null, null],
[0, "손량", null, 0, null, 32, 26, 70, 0, 243, 260, null, null],
[0, "마막", null, 0, null, 34, 12, 44, 0, 221, 266, null, null],
[0, "손호", null, 0, null, 41, 73, 71, 0, 242, 284, null, null],
[0, "조모", null, 0, null, 54, 61, 59, 0, 241, 260, null, null],
[0, "조환", null, 0, null, 30, 28, 30, 0, 246, 302, null, null],
[0, "사마유", null, 0, null, 71, 68, 75, 0, 248, 283, null, null],
[0, "제갈상", null, 0, null, 64, 79, 62, 0, 246, 263, null, null],
[0, "손화", null, 0, null, 31, 39, 68, 0, 224, 253, null, null],
[0, "염우", null, 0, null, 52, 61, 51, 0, 209, 264, null, null],
[0, "왕경", null, 0, null, 67, 63, 71, 0, 206, 260, null, null],
[0, "왕혼", null, 0, null, 74, 71, 63, 0, 223, 297, null, null],
[0, "곽혁", null, 0, null, 33, 29, 70, 0, 187, 225, null, null],
[0, "가범", null, 0, null, 60, 62, 73, 0, 202, 237, null, null],
[0, "서질", null, 0, null, 68, 83, 24, 0, 207, 253, null, null],
[0, "손준", null, 0, null, 64, 70, 65, 0, 219, 256, null, null],
[0, "손침", null, 0, null, 58, 55, 65, 0, 231, 258, null, null],
[0, "우사", null, 0, null, 61, 34, 74, 0, 217, 273, null, null],
[0, "진건", null, 0, null, 72, 71, 65, 0, 214, 292, null, null],
[0, "동궐", null, 0, null, 65, 59, 76, 0, 204, 271, null, null],
[0, "당자", null, 0, null, 61, 71, 50, 0, 196, 265, null, null],
[0, "등충", null, 0, null, 76, 86, 69, 0, 230, 264, null, null],
[0, "황숭", null, 0, null, 67, 63, 72, 0, 208, 263, null, null],
[0, "화핵", null, 0, null, 20, 24, 71, 0, 217, 278, null, null],
[0, "허의", null, 0, null, 51, 74, 15, 0, 213, 263, null, null],
[0, "송겸", null, 0, null, 66, 78, 42, 0, 175, 227, null, null],
[0, "호제", null, 0, null, 57, 39, 68, 0, 207, 264, null, null],
[0, "나헌", null, 0, null, 85, 70, 77, 0, 218, 270, null, null],
[0, "아들노숙", null, 0, null, 73, 53, 74, 0, 217, 272, null, null],
[0, "구성", null, 0, null, 63, 70, 38, 0, 157, 187, null, null],
[0, "어부라", null, 0, null, 72, 68, 21, 0, 150, 195, null, null],
[0, "아하소과", null, 0, null, 61, 76, 13, 0, 204, 253, null, null],
[0, "가비능", null, 0, null, 77, 69, 52, 0, 172, 235, null, null],
[0, "구력거", null, 0, null, 80, 68, 56, 0, 152, 193, null, null],
[0, "강단", null, 0, null, 65, 83, 48, 0, 168, 234, null, null],
[0, "황란", null, 0, null, 63, 75, 44, 0, 200, 264, null, null],
[0, "호주천", null, 0, null, 70, 71, 40, 0, 169, 230, null, null],
[0, "종리목", null, 0, null, 80, 72, 73, 0, 214, 269, null, null],
[0, "제갈교", null, 0, null, 62, 27, 75, 0, 204, 228, null, null],
[0, "답돈", null, 0, null, 84, 82, 61, 0, 158, 207, null, null],
[0, "반임", null, 0, null, 66, 79, 38, 0, 168, 225, null, null],
[0, "보도근", null, 0, null, 64, 73, 50, 0, 170, 233, null, null],
[0, "미당대왕", null, 0, null, 59, 69, 21, 0, 202, 260, null, null],
[0, "유표(흉노)", null, 0, null, 73, 74, 48, 0, 173, 252, null, null],
[0, "루반", null, 0, null, 65, 76, 39, 0, 178, 207, null, null],
[0, "손관", null, 0, null, 72, 78, 51, 0, 166, 217, null, null],
[0, "곽석", null, 0, null, 59, 71, 48, 0, 158, 187, null, null],
[0, "주조", null, 0, null, 63, 68, 26, 0, 152, 187, null, null],
[0, "장거", null, 0, null, 79, 75, 56, 0, 150, 188, null, null],
[0, "장순", null, 0, null, 73, 81, 60, 0, 152, 188, null, null],
[0, "해니", null, 0, null, 62, 78, 35, 0, 191, 233, null, null],
[0, "토안", null, 0, null, 53, 82, 30, 0, 191, 233, null, null],
[0, "유주", null, 0, null, 67, 78, 42, 0, 172, 233, null, null],
[0, "비잔", null, 0, null, 60, 71, 51, 0, 181, 216, null, null],
[0, "월길", null, 0, null, 81, 88, 26, 0, 190, 227, null, null],
[0, "아단", null, 0, null, 72, 65, 78, 0, 186, 259, null, null],
[0, "철리길", null, 0, null, 77, 70, 52, 0, 179, 259, null, null],
[0, "주삭", null, 0, null, 54, 60, 50, 0, 174, 253, null, null],
[0, "왕이", null, 0, null, 87, 59, 77, 0, 171, 230, null, null],
[0, "왕원희", null, 0, null, 53, 37, 73, 0, 217, 268, null, null],
[0, "곽씨", null, 0, null, 42, 4, 55, 0, 184, 235, null, null],
[0, "하후씨", null, 0, null, 34, 13, 42, 0, 188, 243, null, null],
[0, "하후령녀", null, 0, null, 22, 33, 60, 0, 207, 257, null, null],
[0, "하씨", null, 0, null, 51, 14, 67, 0, 150, 189, null, null],
[0, "관은병", null, 0, null, 87, 84, 75, 0, 204, 271, null, null],
[0, "감씨", null, 0, null, 14, 10, 44, 0, 175, 210, null, null],
[0, "황월영", null, 0, null, 62, 33, 90, 0, 186, 235, null, null],
[0, "채염", null, 0, null, 53, 14, 80, 0, 168, 224, null, null],
[0, "채씨", null, 0, null, 38, 7, 70, 0, 159, 212, null, null],
[0, "소교", null, 0, null, 40, 3, 70, 0, 178, 212, null, null],
[0, "서씨", null, 0, null, 48, 16, 80, 0, 183, 232, null, null],
[0, "신헌영", null, 0, null, 48, 28, 84, 0, 191, 269, null, null],
[0, "견씨", null, 0, null, 42, 18, 74, 0, 182, 221, null, null],
[0, "추씨", null, 1, "낙양", 4, 9, 66, 1, 165, 200, null, null],
[0, "조절", null, 0, null, 32, 33, 79, 0, 190, 260, null, null],
[0, "손씨", null, 0, null, 32, 14, 55, 0, 188, 250, null, null],
[0, "손상향", null, 0, null, 77, 82, 55, 0, 193, 222, null, null],
[0, "손노육", null, 0, null, 52, 10, 66, 0, 204, 253, null, null],
[0, "손노반", null, 0, null, 17, 15, 80, 0, 202, 258, null, null],
[0, "대교", null, 0, null, 33, 30, 66, 0, 177, 215, null, null],
[0, "장씨", null, 0, null, 55, 35, 66, 0, 207, 237, null, null],
[0, "장춘화", null, 0, null, 66, 29, 77, 0, 179, 234, null, null],
[0, "초선", null, 0, null, 42, 18, 81, 0, 176, 230, null, null],
[0, "번씨", null, 0, null, 6, 12, 50, 0, 183, 225, null, null],
[0, "미씨", null, 0, null, 13, 6, 72, 0, 176, 208, null, null],
[0, "변씨", null, 0, null, 30, 23, 55, 0, 160, 230, null, null],
[0, "보련사", null, 0, null, 45, 30, 77, 0, 198, 248, null, null],
[0, "유씨", null, 0, null, 8, 8, 44, 0, 164, 215, null, null],
[0, "화만", null, 0, null, 85, 92, 40, 0, 191, 233, null, null],
[0, "포삼낭", null, 0, null, 87, 83, 36, 0, 191, 240, null, null],
[0, "성렴", null, 1, "사수", 66, 72, 43, 1, 168, 199, null, null],
[0, "위월", null, 0, null, 68, 76, 39, 0, 170, 199, null, null],
[0, "진의록", null, 0, null, 46, 43, 17, 0, 168, 199, null, null],
[0, "채옹", null, 1, "장안", 27, 16, 81, 1, 133, 192, null, null],
[0, "지양군", null, 1, "낙양", 13, 8, 55, 1, 103, 192, null, null],
[0, "위소", null, 0, null, 21, 23, 65, 0, 204, 273, null, null],
[0, "위강", null, 0, null, 58, 35, 56, 0, 168, 213, null, null],
[0, "원요", null, 0, null, 28, 41, 50, 0, 177, 206, null, null],
[0, "왕기2", null, 0, null, 69, 67, 61, 0, 217, 281, null, null],
[0, "원환", null, 0, null, 30, 17, 72, 0, 165, 225, null, null],
[0, "우전", null, 0, null, 64, 76, 40, 0, 204, 258, null, null],
[0, "왕광", null, 15, "하내", 33, 65, 55, 12, 150, 190, null, null],
[0, "왕업", null, 0, null, 33, 6, 66, 0, 220, 280, null, null],
[0, "왕융", null, 0, null, 40, 57, 68, 0, 234, 305, null, null],
[0, "왕충", null, 0, null, 46, 39, 57, 0, 152, 214, null, null],
[0, "위풍", null, 0, null, 52, 23, 72, 0, 182, 219, null, null],
[0, "구건", null, 0, null, 39, 52, 65, 0, 239, 272, null, null],
[0, "구본", null, 0, null, 50, 41, 67, 0, 232, 269, null, null],
[0, "동백", null, 1, "장안", 12, 7, 52, 1, 173, 192, null, null],
[0, "마운", null, 0, null, 78, 88, 53, 0, 183, 225, null, null],
[0, "사섭", null, 18, "교지", 53, 31, 76, 12, 137, 226, null, null],
[0, "사지", null, 18, "교지", 58, 51, 52, 1, 163, 227, null, null],
[0, "사휘", null, 18, "남해", 69, 64, 44, 1, 165, 227, null, null],
[0, "사일", null, 18, "남해", 48, 36, 67, 1, 153, 230, null, null],
[0, "사광", null, 18, "교지", 58, 45, 64, 1, 175, 235, null, null],
[0, "후음", null, 0, null, 76, 72, 45, 0, 184, 219, null, null],
[0, "공주", null, 21, "초", 26, 16, 68, 12, 151, 191, null, null],
[0, "고담륭", null, 0, null, 35, 24, 76, 0, 190, 251, null, null],
[0, "국연", null, 0, null, 50, 19, 77, 0, 160, 219, null, null],
[0, "오언", null, 0, null, 74, 72, 77, 0, 235, 297, null, null],
[0, "오강", null, 0, null, 48, 38, 65, 0, 216, 275, null, null],
[0, "최염", null, 0, null, 18, 55, 77, 0, 162, 216, null, null],
[0, "좌혁", null, 0, null, 62, 66, 51, 0, 232, 280, null, null],
[0, "차주", null, 0, null, 49, 49, 40, 0, 164, 199, null, null],
[0, "주태", null, 0, null, 71, 64, 71, 0, 207, 261, null, null],
[0, "북궁백옥", null, 0, null, 66, 72, 49, 0, 146, 187, null, null],
[0, "변장", null, 0, null, 69, 56, 47, 0, 133, 187, null, null],
[0, "순의", null, 0, null, 16, 13, 72, 0, 207, 274, null, null],
[0, "서진순욱", null, 0, null, 8, 19, 77, 0, 225, 289, null, null],
[0, "사마준", null, 0, null, 85, 82, 80, 0, 232, 286, null, null],
[0, "종육", null, 0, null, 32, 12, 71, 0, 223, 263, null, null],
[0, "초이", null, 0, null, 62, 69, 63, 0, 219, 266, null, null],
[0, "제갈정", null, 0, null, 58, 63, 66, 0, 246, 300, null, null],
[0, "보협", null, 0, null, 62, 49, 53, 0, 216, 264, null, null],
[0, "복양흥", null, 0, null, 32, 70, 65, 0, 224, 264, null, null],
[0, "보천", null, 0, null, 71, 60, 71, 0, 222, 272, null, null],
[0, "유대연주", null, 3, "복양", 53, 32, 55, 12, 148, 192, null, null],
[0, "유대", null, 0, null, 63, 58, 30, 0, 155, 202, null, null],
[0, "유승", null, 0, null, 45, 65, 33, 0, 215, 258, null, null],
[0, "여영기", null, 0, null, 79, 88, 37, 0, 182, 198, null, null],
[0, "독발수기능", null, 0, null, 89, 93, 77, 0, 232, 279, null, null],
[0, "진수", null, 0, null, 12, 22, 68, 0, 233, 297, null, null],
[0, "마륭", null, 0, null, 84, 75, 76, 0, 231, 296, null, null],
[0, "도황", null, 0, null, 76, 68, 72, 0, 232, 290, null, null],
[0, "진온", null, 9, "수춘", 60, 38, 48, 12, 167, 192, null, null],
[0, "교모", null, 3, "복양", 54, 45, 69, 11, 137, 190, null, null],
[0, "교국로", null, 0, null, 38, 17, 55, 0, 150, 220, null, null],
[0, "포신", null, 2, "진류", 77, 67, 81, 1, 152, 192, null, null],
[0, "포훈", null, 0, null, 41, 35, 75, 0, 180, 226, null, null],
[0, "포도", null, 2, "진류", 57, 70, 43, 1, 159, 190, null, null],
[0, "위자", null, 2, "진류", 58, 38, 62, 1, 150, 190, null, null],
[0, "유화", null, 16, "계", 21, 16, 59, 1, 165, 216, null, null],
[0, "이이자", null, 0, null, 32, 18, 48, 0, 157, 199, null, null],
[0, "선우보", null, 16, "계", 74, 69, 65, 1, 161, 229, null, null],
[0, "원유", null, 3, "복양", 57, 39, 73, 1, 150, 193, null, null],
[0, "사마휘", null, 0, null, 21, 8, 92, 0, 173, 208, "은둔", null, "좋지~좋아"],
[0, "화타", null, 0, null, 8, 7, 68, 0, 173, 207, "은둔", "의술"],
[0, "관로", null, 0, null, 13, 9, 72, 0, 200, 233, "은둔", null],
[0, "예형", null, 0, null, 13, 4, 90, 0, 173, 199, null, null],
[0, "원혁", null, 0, null, 18, 18, 18, 0, 180, 246, null, null],
[0, "헌제", null, 1, "낙양", 23, 17, 66, 1, 184, 234, null, null, "한 황실은 이대로 끝나는 것인가…"],
[0, "황완", null, 1, "낙양", 40, 34, 71, 1, 141, 192, null, null],
[0, "마일제", null, 1, "낙양", 43, 25, 70, 1, 130, 194, null, null],
[0, "유총", null, 22, "여남", 82, 45, 60, 12, 151, 197, null, null],
[0, "낙준", null, 0, null, 51, 37, 66, 0, 152, 197, null, null],
[0, "낙통", null, 0, null, 76, 57, 73, 0, 193, 228, null, null],
[0, "이리", null, 1, "홍농", 65, 72, 38, 1, 171, 198, null, null],
[0, "허소", null, 0, null, 46, 13, 78, 0, 150, 195, null, null, "자네는 치세의 능신, 난세의 간옹이 되겠군."],
[0, "허사", null, 0, null, 24, 20, 60, 0, 163, 199, null, null],
[0, "장초", null, 0, null, 61, 32, 60, 0, 168, 196, null, null],
[0, "양표", null, 1, "낙양", 24, 20, 60, 1, 142, 225, null, null],
[0, "왕필", null, 0, null, 53, 44, 59, 0, 170, 228, null, null],
[0, "사환", null, 2, "진류", 70, 71, 45, 1, 173, 209, null, null],
[0, "정비", null, 0, null, 34, 30, 57, 0, 158, 214, null, null],
[0, "두씨", null, 1, "낙양", 26, 41, 52, 1, 172, 236, null, null],
[0, "누규", null, 13, "양양", 58, 40, 87, 1, 143, 212, null, null],
[0, "단외", null, 1, "장안", 55, 48, 55, 1, 148, 209, null, null],
[0, "원사", null, 0, null, 65, 43, 78, 0, 159, 210, null, null],
[0, "사의관", null, 0, null, 22, 12, 67, 0, 168, 199, null, null],
[0, "송건", null, 0, null, 66, 77, 40, 0, 164, 214, null, null],
[0, "곽원", null, 17, "업", 66, 73, 36, 1, 162, 205, null, null],
[0, "소유", null, 0, null, 51, 59, 48, 0, 167, 210, null, null],
[0, "주한", null, 0, null, 49, 51, 26, 0, 162, 204, null, null],
[0, "뇌서", null, 0, null, 68, 65, 34, 0, 170, 212, null, null],
[0, "장홍", null, 0, "복양", 72, 81, 65, 0, 164, 196, null, null],
[0, "유위대", null, 4, "북평", 53, 44, 62, 1, 152, 199, null, null],
[0, "문칙", null, 4, "계", 59, 53, 32, 1, 164, 199, null, null],
[0, "습진", null, 0, null, 64, 68, 51, 0, 189, 221, null, null],
[0, "습정", null, 0, null, 49, 29, 70, 0, 181, 229, null, null]
],
"general_ex":[],
"cities":[
],
"history":[
"<C>●</>190년 1월:<L><b>【역사모드2-2】</b></>반동탁연합 결성(정사)",
"<C>●</>190년 1월:<G><b>【연합】</b></>동탁을 토벌하기 위해 18로 제후가 뭉쳤다."
],
"initialEvents":[
[
true,
["ChangeCity", "free", {
"pop":"70%",
"agri":"70%",
"comm":"70%",
"secu":"70%",
"trust":80
}],
["ChangeCity", "occupied", {
"pop":"70%",
"agri":"70%",
"comm":"70%",
"secu":"70%",
"trust":80,
"def":"70%",
"wall":"70%"
}]
]
],
"events":[
[
"destroy_nation", 1000,
["and",
["Date", ">=", 183, 1],
["RemainNation", "==", 1]
],
["BlockScoutAction"],
["DeleteEvent"]
]
]
}
+1 -1
View File
@@ -31,7 +31,7 @@
["여포", "#A9A9A9", 100000, 100000, "조조의 본거지를 빼앗은 당대 최고의 맹장 여포", 1000, "병가", 2, [
"복양"
]],
["손", "#FF0000", 100000, 100000, "손견의 뒤를 이은 소패왕 손책", 1000, "병가", 2, [
["손", "#FF0000", 100000, 100000, "손견의 뒤를 이은 소패왕 손책", 1000, "병가", 2, [
"여강"
]],
["공손찬", "#FF00FF", 100000, 100000, "북평 태수 공손찬", 1000, "병가", 3, [

Some files were not shown because too many files have changed in this diff Show More