Compare commits

..
52 Commits
Author SHA1 Message Date
Hide_D 6282445f7d feat: 토너먼트 베팅에서 모든 NPC가 10원씩 베팅함
- 추가로 베팅 공지
2021-11-16 23:12:32 +09:00
Hide_D bf244533f7 game: 국력, 랜임 계산식에서 유저장 전투력 계수를 NPC의 1.5로 설정 2021-11-16 22:40:47 +09:00
Hide_D 5ebfaf24ee feat: 토너먼트 비중을 강제로 조정 2021-11-16 22:18:29 +09:00
Hide_D 0c0283dc02 feat: '능동 행동 수' 유산 포인트 추가
- 거병, 건국, 방량, 선양, 모반
- 임관, 랜덤임관, 장수대상임관, 등용수락, 하야
- 출병(500명 이상, 훈사 7070 초과)
- 인재탐색 성공(난도에 따라 추가 보정)
- 첩보(예외, 0.5)
- 증축, 감축, 국기변경, 국호변경, 천도성공
2021-11-16 21:38:55 +09:00
Hide_D 375b08be87 feat: NPC정책 최대 포상량 지정 2021-11-16 20:45:16 +09:00
Hide_D cbc8f94b0a game: 국고가 2000 밑으로 가더라도 무조건 물자조달만 하지는 않게 수정정 2021-11-16 20:01:50 +09:00
Hide_D bdac8d163d game: 전특 요구 포인트 감소, 버프 요구 포인트 감소 2021-11-16 19:37:16 +09:00
Hide_D 1f61f37841 fix: 토큰 갱신 시 UserID가 잘못된 버그 수정정 2021-11-14 22:55:37 +09:00
Hide_D 51d523ae72 game: 국력 계산식에 랜덤임관 계산식 일부를 반영 2021-11-14 18:45:28 +09:00
Hide_D 3f9e4962e6 fix: 서버 정지로 의심되는 opcache_reset 해제
- 현재 validate timestamp를 켜서 사용하도록 유도
2021-11-14 13:31:30 +09:00
Hide_D f8fc4fe56b misc: 미활용 함수/상수 제거 2021-11-14 13:20:19 +09:00
Hide_D fb64b7e412 feat: NPC 거병, 이동 로직 대폭 개선
- 근처에 세울 도시를 보고 거병
- 원하는 도시를 정하고 그 도시를 향해 이동
2021-11-14 05:06:39 +09:00
Hide_D 3209cfbc45 fix: warning 제거거 2021-11-14 04:15:04 +09:00
Hide_D 8a99476136 game: 랜덤임관 평가 기준 변경
- 전투 기준을 총 전투 대신 대인 전투로
- 내정 능력에 무력, 지력 비율 반영영
2021-11-14 02:51:40 +09:00
Hide_D eb80f8d111 feat: 자율행동 표기를 휴식(자율행동)으로 변경 2021-11-14 02:47:53 +09:00
Hide_D afde3ce54d game: 랜덤임관 가중치 변경 2021-11-14 02:39:09 +09:00
Hide_D c4b61fec17 game: 작위 보상에도 최대 보유 유니크 수 적용 2021-11-14 00:50:09 +09:00
Hide_D 0b74abf300 game: 랜덤임관 로직에 전투력과 내정능력을 적극적으로 반영영 2021-11-14 00:46:46 +09:00
Hide_D e6c3c9f1d4 fix: 자율턴에서 '월' 표기 빠짐 2021-11-13 16:48:49 +09:00
Hide_D 4e7560b4ed feat: 자율행동 휴식을 명시적으로 자율행동으로 표기 2021-11-13 16:37:47 +09:00
Hide_D 542491b278 feat: 자율턴 한계 표기 2021-11-13 16:33:11 +09:00
Hide_D d36439355d fix: 자율행동턴 시간 제한이 동작하지 않던 버그 수정 2021-11-13 16:05:03 +09:00
Hide_D 4a80815b39 game: 기간별 최대 유니크 획득 수 변경경 2021-11-13 02:25:52 +09:00
Hide_D 6dc57f2566 fix: 자동로그인 과정 버그 수정정 2021-11-11 00:37:29 +09:00
Hide_D 07e8511ce1 game: snipe_combat 제거거 2021-11-08 23:31:56 +09:00
Hide_D 8e927831f5 fix: dummySession 인자 수정정 2021-11-08 23:27:37 +09:00
Hide_D 2c533d2ab3 dep: package update 2021-11-08 16:10:01 +09:00
Hide_D 38208750e7 game: 수비자는 전멸 시 증가하는 사기량을 50%만 적용 2021-11-08 15:20:23 +09:00
Hide_D df14d7c306 game: 반계 효과 유니크 시도 확률 반감 2021-11-08 15:16:15 +09:00
Hide_D b3612db7d2 game: 피장파장 턴을 60턴 기준으로 변경(72턴 동일) 2021-11-08 15:11:24 +09:00
Hide_D 8d90da659e game: 피장파장 딜레이를 최소 72턴으로로 2021-11-08 15:10:45 +09:00
Hide_D f8ddbc0622 game: 종횡가 전략 딜레이를 1/2에서 3/4으로로 2021-11-08 15:08:21 +09:00
Hide_D 673b7054aa 자동 로그인 (#196)
자동 로그인 구현

- login_token 테이블
- reqNonce -> loginByToken
- sha512(token + nonce)

Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/196
Co-authored-by: hide_d <hided62@gmail.com>
Co-committed-by: hide_d <hided62@gmail.com>
2021-11-08 04:23:07 +09:00
Hide_D 1472cbf257 game: 장비매매 시 도구 유니크 덮어지지 않게 2021-10-29 02:21:53 +09:00
Hide_D d806935c58 fix: 작위 보상이 군주인 경우 반영이 안되는 버그 수정 2021-10-27 02:04:10 +09:00
Hide_D 6b56eb79e1 fix: 403 페이지 redirect 버그 수정 2021-10-27 01:29:19 +09:00
Hide_D d2aea16744 balance: 초기 +5%, -2% 추가가 2021-10-16 21:50:41 +09:00
Hide_D bb800f032e balance: 쌍무쌍 적용 불가, 무쌍 중반 이후 대폭 너프프 2021-10-16 21:22:28 +09:00
Hide_D 64b9f9443e fix: 랜덤 임관 비중 계산식에서 u장 포함 2021-10-14 02:01:12 +09:00
Hide_D fd2d3a0e06 fix: 창 닫기가 필요한 창은 window.open으로 열어야함 2021-10-14 01:12:21 +09:00
Hide_D 08d678bdb8 fix: CreateManyNPC에서 npcCount가 0이면 fillCnt가 무시 2021-10-14 00:37:08 +09:00
Hide_D 418007e572 balance: 초반 NPC 생성 시 모든 국가를 채울 수 있을 정도로는 제공 2021-10-14 00:36:06 +09:00
Hide_D 4a1bccdf75 balance: 탈취량을 도시 내정치에 기반하도록 변경 2021-10-14 00:16:44 +09:00
Hide_D 00c0b59e9d balance: 랜임 시 의병장, 집합장 카운트는 제외 2021-10-13 02:05:04 +09:00
Hide_D ac82c8ff0b fix(misc): 상대가 치료시 '붉게' 표기 2021-10-13 02:01:41 +09:00
Hide_D f4bef8a090 fix: 인탐, 의병에서 숙련도가 지정되지 않는 버그 수정 2021-10-13 01:56:06 +09:00
Hide_D d8a1055bff fix: DummyGeneral에 유산 관련 포인트 함수가 누락된 부분 수정 2021-10-12 02:25:24 +09:00
Hide_D d672ce4d80 fix: set_error_handler를 못잡는 문제 해결
기타 소소한 버그
- 피장파장 입력시 warning을 계속 일으키는 버그(동작 문제는 없음)
- 토너먼트에서 승리,패배,무승부 외에 MustNotBeReachedException이 throw되지 않음(동작 문제는 없음)
2021-10-12 01:43:54 +09:00
Hide_D 43ec361d03 dep: update phan 2021-10-12 01:36:02 +09:00
Hide_D c3c99c5f76 fix: 공격자 전투력 판정 문제 수정 2021-10-12 01:31:16 +09:00
Hide_D eb1e1421ab fix(misc): phan 2021-10-12 01:30:37 +09:00
Hide_D e8a1d87919 Merge pull request 'balance: 무쌍 너프, NPC 출병 금지 불가' (#195) from balance_210923 into devel
Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/195
2021-10-10 13:30:01 +09:00
999 changed files with 11315 additions and 25066 deletions
+36 -30
View File
@@ -15,20 +15,34 @@ return [
// Note that the **only** effect of choosing `'5.6'` is to infer
// that functions removed in php 7.0 exist.
// (See `backward_compatibility_checks` for additional options)
"target_php_version" => '7.4',
"target_php_version" => '8.0',
'backward_compatibility_checks ' => true,
'minimum_severity'=>\Phan\Issue::SEVERITY_CRITICAL,
'minimum_severity' => \Phan\Issue::SEVERITY_NORMAL,
'file_list' => [
'f_config/config.php',
'hwe/_119_b.php',
'hwe/_119.php',
'hwe/a_bestGeneral.php',
'hwe/a_emperior.php',
'hwe/_admin1.php',
'hwe/_admin1_submit.php',
'hwe/_admin2.php',
'hwe/_admin2_submit.php',
'hwe/_admin4.php',
'hwe/_admin4_submit.php',
'hwe/_admin5.php',
'hwe/_admin5_submit.php',
'hwe/_admin7.php',
'hwe/_admin8.php',
'hwe/_admin_force_rehall.php',
'hwe/a_emperior_detail.php',
'hwe/a_emperior.php',
'hwe/a_genList.php',
'hwe/a_hallOfFame.php',
'hwe/a_history.php',
'hwe/a_kingdomList.php',
'hwe/a_npcList.php',
'hwe/api.php',
'hwe/a_status.php',
'hwe/a_traffic.php',
'hwe/a_vote.php',
@@ -41,13 +55,11 @@ return [
'hwe/b_dipcenter.php',
'hwe/b_diplomacy.php',
'hwe/b_genList.php',
'hwe/v_inheritPoint.php',
'hwe/b_myBossInfo.php',
'hwe/b_myCityInfo.php',
'hwe/b_myGenInfo.php',
'hwe/b_myKingdomInfo.php',
'hwe/b_myPage.php',
'hwe/b_npc_control.php',
'hwe/b_processing.php',
'hwe/b_tournament.php',
'hwe/b_troop.php',
@@ -55,7 +67,6 @@ return [
'hwe/c_dipcenter.php',
'hwe/c_tournament.php',
'hwe/c_vote.php',
'hwe/func.php',
'hwe/func_auction.php',
'hwe/func_command.php',
'hwe/func_converter.php',
@@ -64,16 +75,15 @@ return [
'hwe/func_legacy.php',
'hwe/func_map.php',
'hwe/func_message.php',
'hwe/func.php',
'hwe/func_process.php',
'hwe/func_string.php',
'hwe/func_template.php',
'hwe/func_time_event.php',
'hwe/func_tournament.php',
'hwe/index.php',
'hwe/install.php',
'hwe/install_db.php',
'hwe/join.php',
'hwe/join_post.php',
'hwe/install.php',
'hwe/j_adjust_icon.php',
'hwe/j_autoreset.php',
'hwe/j_basic_info.php',
@@ -92,8 +102,8 @@ return [
'hwe/j_general_log_old.php',
'hwe/j_general_set_permission.php',
'hwe/j_general_turn.php',
'hwe/j_getChiefTurn.php',
'hwe/j_get_basic_general_list.php',
'hwe/j_getChiefTurn.php',
'hwe/j_get_city_list.php',
'hwe/j_get_general_list.php',
'hwe/j_get_nation_general_list.php',
@@ -101,11 +111,12 @@ return [
'hwe/j_get_select_npc_token.php',
'hwe/j_get_select_pool.php',
'hwe/j_image_upload.php',
'hwe/j_install.php',
'hwe/j_install_db.php',
'hwe/j_install.php',
'hwe/j_load_scenarios.php',
'hwe/j_map.php',
'hwe/j_map_history.php',
'hwe/j_map.php',
'hwe/j_map_recent.php',
'hwe/j_msg_contact_list.php',
'hwe/j_msg_decide_opt.php',
'hwe/j_msg_delete.php',
@@ -123,26 +134,20 @@ return [
'hwe/j_set_npc_control.php',
'hwe/j_simulate_battle.php',
'hwe/j_troop.php',
'hwe/j_update_picked_general.php',
'hwe/j_vacation.php',
'hwe/lib.php',
'hwe/process_war.php',
'hwe/proc.php',
'hwe/readme.php',
'hwe/recent_map.php',
'hwe/select_general_from_pool.php',
'hwe/select_npc.php',
'hwe/t_board.php',
'hwe/t_diplomacy.php',
'hwe/_119.php',
'hwe/_119_b.php',
'hwe/_admin1.php',
'hwe/_admin1_submit.php',
'hwe/_admin2.php',
'hwe/_admin2_submit.php',
'hwe/_admin4.php',
'hwe/_admin4_submit.php',
'hwe/_admin5.php',
'hwe/_admin5_submit.php',
'hwe/_admin7.php',
'hwe/_admin8.php',
'hwe/_admin_force_rehall.php',
'hwe/v_board.php',
'hwe/v_inheritPoint.php',
'hwe/v_join.php',
'hwe/v_NPCControl.php',
],
// A list of directories that should be parsed for class and
@@ -153,9 +158,9 @@ return [
// Thus, both first-party and third-party code being used by
// your application should be included in this list.
'directory_list' => [
'hwe/d_setting',
'hwe/sammo',
'd_setting',
'hwe/d_setting',
'hwe/sammo',
'd_setting',
'src/sammo',
'src/kakao',
'vendor'
@@ -179,6 +184,7 @@ return [
'suppress_issue_types' => [
'PhanUnreferencedUseNormal',
'PhanTypeArraySuspiciousNullable',
],
// A list of plugin files to execute.
@@ -195,4 +201,4 @@ return [
'PregRegexCheckerPlugin',
'PrintfCheckerPlugin',
],
];
];
+2 -2
View File
@@ -5,7 +5,7 @@
<title>닫혀 있습니다.</title>
<script>
setTimeout(function(){
window.location = window.location+'/../';
window.location.href = '../';
}, 5000);
</script>
<style>
@@ -13,7 +13,7 @@
background-color:black;
color:yellow;
}
</style>
</head>
<body>
+2 -3
View File
@@ -8,7 +8,7 @@
],
"config": {
"platform": {
"php": "7.4"
"php": "8.0"
}
},
"require": {
@@ -16,7 +16,6 @@
"sergeytsalkov/meekrodb": "^2.3",
"league/plates": "^3.3",
"guzzlehttp/guzzle": "^6.3",
"scssphp/scssphp": "^1.0",
"monolog/monolog": "^1.23",
"firephp/firephp-core": "^0.4.0",
"vlucas/valitron": "^1.4",
@@ -51,5 +50,5 @@
"f_config/config.php"
]
}
}
Generated
+221 -228
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "317938cff7b30806f4e385a70f4943fc",
"content-hash": "94cfbcb22b9f475e421ad5009391006f",
"packages": [
{
"name": "brandonwamboldt/utilphp",
@@ -122,16 +122,16 @@
},
{
"name": "composer/semver",
"version": "3.2.5",
"version": "3.2.6",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9"
"reference": "83e511e247de329283478496f7a1e114c9517506"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9",
"url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506",
"reference": "83e511e247de329283478496f7a1e114c9517506",
"shasum": ""
},
"require": {
@@ -183,7 +183,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.2.5"
"source": "https://github.com/composer/semver/tree/3.2.6"
},
"funding": [
{
@@ -199,7 +199,7 @@
"type": "tidelift"
}
],
"time": "2021-05-24T12:41:47+00:00"
"time": "2021-10-25T11:34:17+00:00"
},
{
"name": "composer/xdebug-handler",
@@ -267,34 +267,30 @@
},
{
"name": "doctrine/inflector",
"version": "2.0.3",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
"reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210"
"reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210",
"reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
"reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^7.0",
"phpstan/phpstan": "^0.11",
"phpstan/phpstan-phpunit": "^0.11",
"phpstan/phpstan-strict-rules": "^0.11",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
"doctrine/coding-standard": "^8.2",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"vimeo/psalm": "^4.10"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Inflector\\": "lib/Doctrine/Inflector"
@@ -342,7 +338,7 @@
],
"support": {
"issues": "https://github.com/doctrine/inflector/issues",
"source": "https://github.com/doctrine/inflector/tree/2.0.x"
"source": "https://github.com/doctrine/inflector/tree/2.0.4"
},
"funding": [
{
@@ -358,7 +354,7 @@
"type": "tidelift"
}
],
"time": "2020-05-29T15:13:26+00:00"
"time": "2021-10-22T20:16:43+00:00"
},
{
"name": "erusev/parsedown",
@@ -674,16 +670,16 @@
},
{
"name": "guzzlehttp/promises",
"version": "1.4.1",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"shasum": ""
},
"require": {
@@ -695,7 +691,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
"dev-master": "1.5-dev"
}
},
"autoload": {
@@ -711,10 +707,25 @@
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
}
],
"description": "Guzzle promises library",
@@ -723,22 +734,36 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.4.1"
"source": "https://github.com/guzzle/promises/tree/1.5.1"
},
"time": "2021-03-07T09:25:29+00:00"
"funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
"type": "tidelift"
}
],
"time": "2021-10-22T20:56:57+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "1.8.2",
"version": "1.8.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
"shasum": ""
},
"require": {
@@ -775,13 +800,34 @@
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "George Mponos",
"email": "gmponos@gmail.com",
"homepage": "https://github.com/gmponos"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com",
"homepage": "https://github.com/sagikazarmark"
},
{
"name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
}
],
@@ -798,22 +844,36 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/1.8.2"
"source": "https://github.com/guzzle/psr7/tree/1.8.3"
},
"time": "2021-04-26T09:17:50+00:00"
"funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
"type": "tidelift"
}
],
"time": "2021-10-05T13:56:00+00:00"
},
{
"name": "illuminate/bus",
"version": "v8.61.0",
"version": "v8.69.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/bus.git",
"reference": "808097c0dfd893309bd77b00139586c516b965c9"
"reference": "be400399687b97d5558a224e970060fd5d5f2735"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/bus/zipball/808097c0dfd893309bd77b00139586c516b965c9",
"reference": "808097c0dfd893309bd77b00139586c516b965c9",
"url": "https://api.github.com/repos/illuminate/bus/zipball/be400399687b97d5558a224e970060fd5d5f2735",
"reference": "be400399687b97d5558a224e970060fd5d5f2735",
"shasum": ""
},
"require": {
@@ -853,20 +913,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-08-10T16:49:48+00:00"
"time": "2021-10-21T19:19:36+00:00"
},
{
"name": "illuminate/collections",
"version": "v8.61.0",
"version": "v8.69.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/collections.git",
"reference": "18fa841df912ec56849351dd6ca8928e8a98b69d"
"reference": "05f286ec5fd2dd286e8384577047efc375c8954c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/collections/zipball/18fa841df912ec56849351dd6ca8928e8a98b69d",
"reference": "18fa841df912ec56849351dd6ca8928e8a98b69d",
"url": "https://api.github.com/repos/illuminate/collections/zipball/05f286ec5fd2dd286e8384577047efc375c8954c",
"reference": "05f286ec5fd2dd286e8384577047efc375c8954c",
"shasum": ""
},
"require": {
@@ -907,20 +967,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-09-08T12:48:16+00:00"
"time": "2021-10-22T18:01:46+00:00"
},
{
"name": "illuminate/container",
"version": "v8.61.0",
"version": "v8.69.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/container.git",
"reference": "862b64ea4ab56e307a1676104a1b93295d347ad0"
"reference": "ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/container/zipball/862b64ea4ab56e307a1676104a1b93295d347ad0",
"reference": "862b64ea4ab56e307a1676104a1b93295d347ad0",
"url": "https://api.github.com/repos/illuminate/container/zipball/ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d",
"reference": "ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d",
"shasum": ""
},
"require": {
@@ -958,20 +1018,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-09-09T13:55:23+00:00"
"time": "2021-09-15T14:32:50+00:00"
},
{
"name": "illuminate/contracts",
"version": "v8.61.0",
"version": "v8.69.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/contracts.git",
"reference": "ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913"
"reference": "e76f4bce73a2a1656add24bd5210ebc4b8af49c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913",
"reference": "ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/e76f4bce73a2a1656add24bd5210ebc4b8af49c0",
"reference": "e76f4bce73a2a1656add24bd5210ebc4b8af49c0",
"shasum": ""
},
"require": {
@@ -1006,20 +1066,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-09-08T12:09:40+00:00"
"time": "2021-10-22T18:01:46+00:00"
},
{
"name": "illuminate/database",
"version": "v8.61.0",
"version": "v8.69.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/database.git",
"reference": "acc11d6839ddb3b694bc6585177fa5141b70c693"
"reference": "43c7ffb6299ae55b000b286cf1278afd268ef29f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/database/zipball/acc11d6839ddb3b694bc6585177fa5141b70c693",
"reference": "acc11d6839ddb3b694bc6585177fa5141b70c693",
"url": "https://api.github.com/repos/illuminate/database/zipball/43c7ffb6299ae55b000b286cf1278afd268ef29f",
"reference": "43c7ffb6299ae55b000b286cf1278afd268ef29f",
"shasum": ""
},
"require": {
@@ -1033,7 +1093,7 @@
"symfony/console": "^5.1.4"
},
"suggest": {
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6|^3.0).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.2).",
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
"illuminate/console": "Required to use the database commands (^8.0).",
"illuminate/events": "Required to use the observers with Eloquent (^8.0).",
@@ -1074,20 +1134,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-09-13T18:43:43+00:00"
"time": "2021-10-29T19:46:53+00:00"
},
{
"name": "illuminate/events",
"version": "v8.61.0",
"version": "v8.69.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/events.git",
"reference": "7def78033f29cd0c0383513b27c291d233a7f90e"
"reference": "b7f06cafb6c09581617f2ca05d69e9b159e5a35d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/events/zipball/7def78033f29cd0c0383513b27c291d233a7f90e",
"reference": "7def78033f29cd0c0383513b27c291d233a7f90e",
"url": "https://api.github.com/repos/illuminate/events/zipball/b7f06cafb6c09581617f2ca05d69e9b159e5a35d",
"reference": "b7f06cafb6c09581617f2ca05d69e9b159e5a35d",
"shasum": ""
},
"require": {
@@ -1129,11 +1189,11 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-08-16T21:45:47+00:00"
"time": "2021-09-15T14:32:50+00:00"
},
{
"name": "illuminate/macroable",
"version": "v8.61.0",
"version": "v8.69.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/macroable.git",
@@ -1179,7 +1239,7 @@
},
{
"name": "illuminate/pipeline",
"version": "v8.61.0",
"version": "v8.69.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/pipeline.git",
@@ -1227,16 +1287,16 @@
},
{
"name": "illuminate/support",
"version": "v8.61.0",
"version": "v8.69.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/support.git",
"reference": "b0a21c41163381dd9a5abbd68fe85ed7b4247d30"
"reference": "a8851b7001530d3c11626a81449ed9b63dd10db7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/support/zipball/b0a21c41163381dd9a5abbd68fe85ed7b4247d30",
"reference": "b0a21c41163381dd9a5abbd68fe85ed7b4247d30",
"url": "https://api.github.com/repos/illuminate/support/zipball/a8851b7001530d3c11626a81449ed9b63dd10db7",
"reference": "a8851b7001530d3c11626a81449ed9b63dd10db7",
"shasum": ""
},
"require": {
@@ -1246,7 +1306,7 @@
"illuminate/collections": "^8.0",
"illuminate/contracts": "^8.0",
"illuminate/macroable": "^8.0",
"nesbot/carbon": "^2.31",
"nesbot/carbon": "^2.53.1",
"php": "^7.3|^8.0",
"voku/portable-ascii": "^1.4.8"
},
@@ -1255,8 +1315,8 @@
},
"suggest": {
"illuminate/filesystem": "Required to use the composer class (^8.0).",
"league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0).",
"ramsey/uuid": "Required to use Str::uuid() (^4.0).",
"league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0.2).",
"ramsey/uuid": "Required to use Str::uuid() (^4.2.2).",
"symfony/process": "Required to use the composer class (^5.1.4).",
"symfony/var-dumper": "Required to use the dd function (^5.1.4).",
"vlucas/phpdotenv": "Required to use the Env class and env helper (^5.2)."
@@ -1291,7 +1351,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-09-13T18:43:43+00:00"
"time": "2021-10-29T13:34:03+00:00"
},
{
"name": "league/plates",
@@ -1490,16 +1550,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.53.1",
"version": "2.54.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "f4655858a784988f880c1b8c7feabbf02dfdf045"
"reference": "eed83939f1aed3eee517d03a33f5ec587ac529b5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f4655858a784988f880c1b8c7feabbf02dfdf045",
"reference": "f4655858a784988f880c1b8c7feabbf02dfdf045",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/eed83939f1aed3eee517d03a33f5ec587ac529b5",
"reference": "eed83939f1aed3eee517d03a33f5ec587ac529b5",
"shasum": ""
},
"require": {
@@ -1510,6 +1570,7 @@
"symfony/translation": "^3.4 || ^4.0 || ^5.0"
},
"require-dev": {
"doctrine/dbal": "^2.0 || ^3.0",
"doctrine/orm": "^2.7",
"friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0",
@@ -1580,7 +1641,7 @@
"type": "tidelift"
}
],
"time": "2021-09-06T09:29:23+00:00"
"time": "2021-11-01T21:22:20+00:00"
},
{
"name": "netresearch/jsonmapper",
@@ -1773,20 +1834,20 @@
},
{
"name": "nette/utils",
"version": "v3.2.2",
"version": "v3.2.5",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c"
"reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/967cfc4f9a1acd5f1058d76715a424c53343c20c",
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c",
"url": "https://api.github.com/repos/nette/utils/zipball/9cd80396ca58d7969ab44fc7afcf03624dfa526e",
"reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e",
"shasum": ""
},
"require": {
"php": ">=7.2 <8.1"
"php": ">=7.2 <8.2"
},
"conflict": {
"nette/di": "<3.0.6"
@@ -1852,9 +1913,9 @@
],
"support": {
"issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v3.2.2"
"source": "https://github.com/nette/utils/tree/v3.2.5"
},
"time": "2021-03-03T22:53:25+00:00"
"time": "2021-09-20T10:50:11+00:00"
},
{
"name": "pguardiario/phpuri",
@@ -1886,16 +1947,16 @@
},
{
"name": "phan/phan",
"version": "5.0.0",
"version": "5.2.1",
"source": {
"type": "git",
"url": "https://github.com/phan/phan.git",
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90"
"reference": "d724bbb8fc3ba89179868bb5220ecdf6a9c1636b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phan/phan/zipball/f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
"url": "https://api.github.com/repos/phan/phan/zipball/d724bbb8fc3ba89179868bb5220ecdf6a9c1636b",
"reference": "d724bbb8fc3ba89179868bb5220ecdf6a9c1636b",
"shasum": ""
},
"require": {
@@ -1912,7 +1973,7 @@
"symfony/console": "^3.2|^4.0|^5.0",
"symfony/polyfill-mbstring": "^1.11.0",
"symfony/polyfill-php80": "^1.20.0",
"tysonandre/var_representation_polyfill": "^0.0.2"
"tysonandre/var_representation_polyfill": "^0.0.2|^0.1.0"
},
"require-dev": {
"phpunit/phpunit": "^8.5.0"
@@ -1959,9 +2020,9 @@
],
"support": {
"issues": "https://github.com/phan/phan/issues",
"source": "https://github.com/phan/phan/tree/5.0.0"
"source": "https://github.com/phan/phan/tree/5.2.1"
},
"time": "2021-08-01T18:17:28+00:00"
"time": "2021-09-15T00:08:40+00:00"
},
{
"name": "php-extended/php-system",
@@ -2110,16 +2171,16 @@
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.2.2",
"version": "5.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"shasum": ""
},
"require": {
@@ -2130,7 +2191,8 @@
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"mockery/mockery": "~1.3.2"
"mockery/mockery": "~1.3.2",
"psalm/phar": "^4.8"
},
"type": "library",
"extra": {
@@ -2160,22 +2222,22 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
},
"time": "2020-09-03T19:13:55+00:00"
"time": "2021-10-19T17:43:47+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.4.0",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"shasum": ""
},
"require": {
@@ -2183,7 +2245,8 @@
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"ext-tokenizer": "*"
"ext-tokenizer": "*",
"psalm/phar": "^4.8"
},
"type": "library",
"extra": {
@@ -2209,26 +2272,26 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1"
},
"time": "2020-09-17T18:55:26+00:00"
"time": "2021-10-02T14:08:47+00:00"
},
{
"name": "psr/container",
"version": "1.1.1",
"version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": ""
},
"require": {
"php": ">=7.2.0"
"php": ">=7.4.0"
},
"type": "library",
"autoload": {
@@ -2257,9 +2320,9 @@
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.1"
"source": "https://github.com/php-fig/container/tree/1.1.2"
},
"time": "2021-03-05T17:36:06+00:00"
"time": "2021-11-05T16:50:12+00:00"
},
{
"name": "psr/http-message",
@@ -2461,23 +2524,23 @@
},
{
"name": "sabre/event",
"version": "5.1.2",
"version": "5.1.4",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/event.git",
"reference": "c120bec57c17b6251a496efc82b732418b49d50a"
"reference": "d7da22897125d34d7eddf7977758191c06a74497"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/event/zipball/c120bec57c17b6251a496efc82b732418b49d50a",
"reference": "c120bec57c17b6251a496efc82b732418b49d50a",
"url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497",
"reference": "d7da22897125d34d7eddf7977758191c06a74497",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.16.1",
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
@@ -2523,80 +2586,7 @@
"issues": "https://github.com/sabre-io/event/issues",
"source": "https://github.com/fruux/sabre-event"
},
"time": "2020-10-03T11:02:22+00:00"
},
{
"name": "scssphp/scssphp",
"version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/scssphp/scssphp.git",
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/b83594e2323c5d6e80785df3f91b9d1d32aad530",
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-json": "*",
"php": ">=5.6.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4",
"sass/sass-spec": "*",
"squizlabs/php_codesniffer": "~3.5",
"symfony/phpunit-bridge": "^5.1",
"twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.0",
"zurb/foundation": "~6.5"
},
"suggest": {
"ext-iconv": "Can be used as fallback when ext-mbstring is not available",
"ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
},
"bin": [
"bin/pscss"
],
"type": "library",
"autoload": {
"psr-4": {
"ScssPhp\\ScssPhp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Anthon Pang",
"email": "apang@softwaredevelopment.ca",
"homepage": "https://github.com/robocoder"
},
{
"name": "Cédric Morin",
"email": "cedric@yterium.com",
"homepage": "https://github.com/Cerdic"
}
],
"description": "scssphp is a compiler for SCSS written in PHP.",
"homepage": "http://scssphp.github.io/scssphp/",
"keywords": [
"css",
"less",
"sass",
"scss",
"stylesheet"
],
"support": {
"issues": "https://github.com/scssphp/scssphp/issues",
"source": "https://github.com/scssphp/scssphp/tree/v1.6.0"
},
"time": "2021-07-02T16:28:10+00:00"
"time": "2021-11-04T06:51:17+00:00"
},
{
"name": "sergeytsalkov/meekrodb",
@@ -2648,16 +2638,16 @@
},
{
"name": "symfony/console",
"version": "v5.3.6",
"version": "v5.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2"
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
"url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
"shasum": ""
},
"require": {
@@ -2727,7 +2717,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.3.6"
"source": "https://github.com/symfony/console/tree/v5.3.10"
},
"funding": [
{
@@ -2743,7 +2733,7 @@
"type": "tidelift"
}
],
"time": "2021-07-27T19:10:22+00:00"
"time": "2021-10-26T09:30:15+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -2814,16 +2804,16 @@
},
{
"name": "symfony/lock",
"version": "v4.4.27",
"version": "v4.4.33",
"source": {
"type": "git",
"url": "https://github.com/symfony/lock.git",
"reference": "6ca476d4ac992802f2a4043929f68f1818449486"
"reference": "567d29b1bc6e3937652054dafc069151d17824a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/lock/zipball/6ca476d4ac992802f2a4043929f68f1818449486",
"reference": "6ca476d4ac992802f2a4043929f68f1818449486",
"url": "https://api.github.com/repos/symfony/lock/zipball/567d29b1bc6e3937652054dafc069151d17824a9",
"reference": "567d29b1bc6e3937652054dafc069151d17824a9",
"shasum": ""
},
"require": {
@@ -2872,7 +2862,7 @@
"semaphore"
],
"support": {
"source": "https://github.com/symfony/lock/tree/v4.4.27"
"source": "https://github.com/symfony/lock/tree/v4.4.33"
},
"funding": [
{
@@ -2888,7 +2878,7 @@
"type": "tidelift"
}
],
"time": "2021-07-23T15:41:52+00:00"
"time": "2021-10-05T20:27:01+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -3620,16 +3610,16 @@
},
{
"name": "symfony/string",
"version": "v5.3.3",
"version": "v5.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1"
"reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
"url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c",
"reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c",
"shasum": ""
},
"require": {
@@ -3683,7 +3673,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.3.3"
"source": "https://github.com/symfony/string/tree/v5.3.10"
},
"funding": [
{
@@ -3699,20 +3689,20 @@
"type": "tidelift"
}
],
"time": "2021-06-27T11:44:38+00:00"
"time": "2021-10-27T18:21:46+00:00"
},
{
"name": "symfony/translation",
"version": "v5.3.7",
"version": "v5.3.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6"
"reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6",
"reference": "4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6",
"url": "https://api.github.com/repos/symfony/translation/zipball/6ef197aea2ac8b9cd63e0da7522b3771714035aa",
"reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa",
"shasum": ""
},
"require": {
@@ -3778,7 +3768,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/translation/tree/v5.3.7"
"source": "https://github.com/symfony/translation/tree/v5.3.10"
},
"funding": [
{
@@ -3794,7 +3784,7 @@
"type": "tidelift"
}
],
"time": "2021-08-26T08:22:53+00:00"
"time": "2021-10-10T06:43:24+00:00"
},
{
"name": "symfony/translation-contracts",
@@ -3876,16 +3866,16 @@
},
{
"name": "tysonandre/var_representation_polyfill",
"version": "0.0.2",
"version": "0.1.1",
"source": {
"type": "git",
"url": "https://github.com/TysonAndre/var_representation_polyfill.git",
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33"
"reference": "0a942e74e18af5514749895507bc6ca7ab96399a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/3f17999ee1f257319ddc6721dd26ebbc5d175f33",
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33",
"url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/0a942e74e18af5514749895507bc6ca7ab96399a",
"reference": "0a942e74e18af5514749895507bc6ca7ab96399a",
"shasum": ""
},
"require": {
@@ -3896,6 +3886,9 @@
"phan/phan": "^4.0",
"phpunit/phpunit": "^8.5.0"
},
"suggest": {
"ext-var_representation": "*"
},
"type": "library",
"autoload": {
"psr-4": {
@@ -3914,16 +3907,16 @@
"name": "Tyson Andre"
}
],
"description": "Polyfill for var_representation",
"description": "Polyfill for var_representation: convert a variable to a string in a way that fixes the shortcomings of var_export",
"keywords": [
"var_export",
"var_representation"
],
"support": {
"issues": "https://github.com/TysonAndre/var_representation_polyfill/issues",
"source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.0.2"
"source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.1"
},
"time": "2021-06-26T18:55:02+00:00"
"time": "2021-08-16T00:12:50+00:00"
},
{
"name": "vlucas/valitron",
@@ -4181,7 +4174,7 @@
"platform": [],
"platform-dev": [],
"platform-overrides": {
"php": "7.4"
"php": "8.0"
},
"plugin-api-version": "2.0.0"
}
+41 -16
View File
@@ -15,35 +15,35 @@ ini_set("session.gc_maxlifetime", '604800'); // seconds
function getFriendlyErrorType($type)
{
switch ($type) {
case E_ERROR: // 1 //
case E_ERROR: // 1 //
return 'E_ERROR';
case E_WARNING: // 2 //
case E_WARNING: // 2 //
return 'E_WARNING';
case E_PARSE: // 4 //
case E_PARSE: // 4 //
return 'E_PARSE';
case E_NOTICE: // 8 //
case E_NOTICE: // 8 //
return 'E_NOTICE';
case E_CORE_ERROR: // 16 //
case E_CORE_ERROR: // 16 //
return 'E_CORE_ERROR';
case E_CORE_WARNING: // 32 //
case E_CORE_WARNING: // 32 //
return 'E_CORE_WARNING';
case E_COMPILE_ERROR: // 64 //
case E_COMPILE_ERROR: // 64 //
return 'E_COMPILE_ERROR';
case E_COMPILE_WARNING: // 128 //
case E_COMPILE_WARNING: // 128 //
return 'E_COMPILE_WARNING';
case E_USER_ERROR: // 256 //
case E_USER_ERROR: // 256 //
return 'E_USER_ERROR';
case E_USER_WARNING: // 512 //
case E_USER_WARNING: // 512 //
return 'E_USER_WARNING';
case E_USER_NOTICE: // 1024 //
case E_USER_NOTICE: // 1024 //
return 'E_USER_NOTICE';
case E_STRICT: // 2048 //
case E_STRICT: // 2048 //
return 'E_STRICT';
case E_RECOVERABLE_ERROR: // 4096 //
case E_RECOVERABLE_ERROR: // 4096 //
return 'E_RECOVERABLE_ERROR';
case E_DEPRECATED: // 8192 //
case E_DEPRECATED: // 8192 //
return 'E_DEPRECATED';
case E_USER_DEPRECATED: // 16384 //
case E_USER_DEPRECATED: // 16384 //
return 'E_USER_DEPRECATED';
}
return "{$type}";
@@ -134,7 +134,7 @@ function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, in
getExceptionTraceAsString($e)
);
}
set_error_handler("\sammo\logErrorByCustomHandler");
set_error_handler("\\sammo\\logErrorByCustomHandler");
function logExceptionByCustomHandler(\Throwable $e)
@@ -151,3 +151,28 @@ function logExceptionByCustomHandler(\Throwable $e)
throw $e;
}
set_exception_handler('\\sammo\\logExceptionByCustomHandler');
function getAPIExecutorClass($path){
static $basePath = __NAMESPACE__.'\\API\\';
if(is_string($path)){
}
else if(is_array($path)){
$path = join('\\', $path);
}
else{
throw new \InvalidArgumentException("{$path}는 올바른 API 지시자가 아님");
}
$classPath = str_replace('/', '\\', $basePath.$path);
if(class_exists($classPath)){
return $classPath;
}
throw new \InvalidArgumentException("{$path}는 올바른 API 경로가 아님");
}
function buildAPIExecutorClass($type, string $rootPath, array $args):\sammo\BaseAPI{
$class = getAPIExecutorClass($type);
return new $class($rootPath, $args);
}
+17 -2
View File
@@ -58,7 +58,7 @@ CREATE TABLE `member_log` (
INDEX `action` (`member_no`, `action_type`, `date`),
INDEX `member` (`member_no`, `date`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
ENGINE=Aria DEFAULT CHARSET=utf8mb4;
###################
# KV storage
@@ -72,4 +72,19 @@ CREATE TABLE if not exists `storage` (
UNIQUE INDEX `key` (`namespace`, `key`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=MyISAM
ENGINE=Aria;
CREATE TABLE `login_token` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`user_id` INT(11) NOT NULL,
`base_token` VARCHAR(20) NOT NULL COLLATE 'utf8mb4_general_ci',
`reg_ip` VARCHAR(40) NOT NULL COLLATE 'utf8mb4_general_ci',
`reg_date` DATETIME NOT NULL,
`expire_date` DATETIME NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `by_token` (`base_token`),
INDEX `by_date` (`user_id`, `expire_date`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=Aria
;
+1
View File
@@ -342,6 +342,7 @@ switch ($btn) {
}
break;
case "랜덤턴":
$turnterm = $gameStor->turnterm;
foreach ($genlist as $generalID) {
$turntime = getRandTurn($turnterm);
$db->update('general', [
+16 -16
View File
@@ -1,22 +1,22 @@
<div class="buttonPlate bg1">
<div>
<a href="a_status.php" target="_blank"><button class="toolbarButton">세력도</button></a>
<a href="a_kingdomList.php" target="_blank"><button class="toolbarButton">세력일람</button></a>
<a href="a_genList.php" target="_blank"><button class="toolbarButton">장수일람</button></a>
<a href="a_bestGeneral.php" target="_blank"><button class="toolbarButton">명장일람</button></a>
<a href="a_history.php" target="_blank"><button class="toolbarButton">연감</button></a>
<a href="a_hallOfFame.php" target="_blank"><button class="toolbarButton">명예의전당</button></a>
<a href="a_emperior.php" target="_blank"><button class="toolbarButton">왕조일람</button></a>
<a href="a_traffic.php" target="_blank"><button class="toolbarButton">접속량정보</button></a>
<a href="a_status.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">세력도</button></a>
<a href="a_kingdomList.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">세력일람</button></a>
<a href="a_genList.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">장수일람</button></a>
<a href="a_bestGeneral.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">명장일람</button></a>
<a href="a_history.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">연감</button></a>
<a href="a_hallOfFame.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">명예의전당</button></a>
<a href="a_emperior.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">왕조일람</button></a>
<a href="a_traffic.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">접속량정보</button></a>
</div>
<div>
<a href="/bbs/board" target="_blank"><button class="toolbarButton2">삼모게시판</button></a>
<a href="/bbs/tip" target="_blank"><button class="toolbarButton">팁/강좌</button></a>
<a href="/bbs/news" target="_blank"><button class="toolbarButton">삼국 일보</button></a>
<a href="/bbs/history2" target="_blank"><button class="toolbarButton">개인 열전</button></a>
<a href="/bbs/history3" target="_blank"><button class="toolbarButton">국가 열전</button></a>
<a href="/bbs/patch" target="_blank"><button class="toolbarButton">패치 내역</button></a>
<a href="../i_other/help.php" target="_blank"><button class="toolbarButton">튜토리얼</button></a>
<a href="<?=$site?>" target="_blank"><button class="toolbarButton"><?=$call?></button></a>
<a href="/bbs/board" target="_blank"><button type="button" class="toolbarButton2">삼모게시판</button></a>
<a href="/bbs/tip" target="_blank"><button type="button" class="toolbarButton">팁/강좌</button></a>
<a href="/bbs/news" target="_blank"><button type="button" class="toolbarButton">삼국 일보</button></a>
<a href="/bbs/history2" target="_blank"><button type="button" class="toolbarButton">개인 열전</button></a>
<a href="/bbs/history3" target="_blank"><button type="button" class="toolbarButton">국가 열전</button></a>
<a href="/bbs/patch" target="_blank"><button type="button" class="toolbarButton">패치 내역</button></a>
<a href="battle_simulator.php" target="_blank"><button type="button" class="toolbarButton">전투 시뮬레이터</button></a>
<a href="<?=$site?>" target="_blank" class="open-window"><button type="button" class="toolbarButton"><?=$call?></button></a>
</div>
</div>
+44 -20
View File
@@ -1348,17 +1348,29 @@ function triggerTournament()
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['tournament', 'tnmt_trig']);
[$tournament, $tnmt_trig, $tnmt_pattern] = $gameStor->getValuesAsArray(['tournament', 'tnmt_trig', 'tnmt_pattern']);
//현재 토너먼트 없고, 자동개시 걸려있을때, 40%확률
if ($admin['tournament'] == 0 && $admin['tnmt_trig'] > 0 && rand() % 100 < 40) {
$type = rand() % 5; // 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전
//전력전 40%, 통, 일, 설 각 20%
if ($type > 3) {
$type = 0;
}
startTournament($admin['tnmt_trig'], $type);
if($tournament != 0){
return;
}
if($tnmt_trig == 0){
return;
}
if(!Util::randBool(0.4)){
return;
}
if(!$tnmt_pattern){
// 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전
//전력전 40%, 통, 일, 설 각 20%
$tnmt_pattern = [0, 0, 1, 2, 3];
shuffle($tnmt_pattern);
}
$tnmt_type = array_pop($tnmt_pattern);
$gameStor->setValue('tnmt_pattern', $tnmt_pattern);
startTournament($tnmt_trig, $tnmt_type);
}
function CheckHall($no)
@@ -1840,21 +1852,26 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
return false;
}
$inheritUnique = $general->getAuxVar('inheritUniqueTrial');
if ($acquireType != '설문조사' && $inheritUnique && count($inheritUnique)) {
LogText("유니크 준비?? {$general->getID()}", $inheritUnique);
$trialResult = tryInheritUniqueItem($general, $acquireType);
if ($trialResult) {
return true;
$itemTypeCnt = count(GameConst::$allItems);
[$startYear, $year] = $gameStor->getValuesAsArray(['startyear', 'year']);
$relYear = $year - $startYear;
$maxTrialCountByYear = 1;
foreach(GameConst::$maxUniqueItemLimit as $tmpVals){
[$targetYear, $targetTrialCnt] = $tmpVals;
if($relYear < $targetYear){
break;
}
$maxTrialCountByYear = $targetTrialCnt;
}
$itemTypeCnt = count(GameConst::$allItems);
$trialCnt = $itemTypeCnt;
$trialCnt = Util::valueFit($itemTypeCnt, null, $maxTrialCountByYear);
$maxCnt = $itemTypeCnt;
foreach ($general->getItems() as $item) {
if (!$item->isBuyable()) {
$trialCnt -= 1;
$maxCnt -= 1;
}
}
@@ -1866,10 +1883,17 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
$userLogger = new UserLogger($general->getVar('owner'));
$userLogger->push(sprintf("유니크를 얻을 공간이 없어 %d 포인트 반환", GameConst::$inheritItemRandomPoint), "inheritPoint");
}
tryRollbackInheritUniqueItem($general);
return false;
}
$inheritUnique = $general->getAuxVar('inheritUniqueTrial');
if ($acquireType != '설문조사' && $inheritUnique && count($inheritUnique)) {
$trialResult = tryInheritUniqueItem($general, $acquireType);
if ($trialResult) {
return true;
}
}
$scenario = $gameStor->scenario;
$genCount = $db->queryFirstField('SELECT count(*) FROM general WHERE npc<2');
@@ -1899,7 +1923,7 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
$prob = 1;
}
foreach (Util::range($trialCnt) as $_idx) {
foreach (Util::range($maxCnt) as $_idx) {
if (Util::randBool($prob)) {
$result = true;
break;
@@ -1907,10 +1931,10 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
$prob *= $moreProb;
}
if (!$result) {
LogText("{$general->getName()}, {$general->getID()} 유니크 실패 {$trialCnt}", $prob);
LogText("{$general->getName()}, {$general->getID()} 유니크 실패 {$maxCnt}", $prob);
return false;
}
LogText("{$general->getName()}, {$general->getID()} 유니크 성공 {$trialCnt}", $prob);
LogText("{$general->getName()}, {$general->getID()} 유니크 성공 {$maxCnt}", $prob);
return giveRandomUniqueItem($general, $acquireType);
}
-25
View File
@@ -357,31 +357,6 @@ function buildNationCommandClass(?string $type, General $generalObj, array $env,
return new $class($generalObj, $env, $lastTurn, $arg);
}
function getAPIExecutorClass($path){
static $basePath = __NAMESPACE__.'\\API\\';
if(is_string($path)){
}
else if(is_array($path)){
$path = join('\\', $path);
}
else{
throw new \InvalidArgumentException("{$path}는 올바른 API 지시자가 아님");
}
$classPath = str_replace('/', '\\', $basePath.$path);
if(class_exists($classPath)){
return $classPath;
}
throw new \InvalidArgumentException("{$path}는 올바른 API 경로가 아님");
}
function buildAPIExecutorClass($type, string $rootPath, array $args):\sammo\BaseAPI{
$class = getAPIExecutorClass($type);
return new $class($rootPath, $args);
}
function getWarUnitTriggerClass(string $type){
static $basePath = __NAMESPACE__.'\\WarUnitTrigger\\';
$classPath = ($basePath.$type);
+63 -44
View File
@@ -167,14 +167,15 @@ function checkSupply()
}
}
function updateGeneralNumber(){
function updateGeneralNumber()
{
$db = DB::db();
foreach($db->queryAllLists('SELECT nation, count(*) FROM general WHERE npc != 5 GROUP BY nation') as [$nationID, $gennum]){
if($nationID === 0){
foreach ($db->queryAllLists('SELECT nation, count(*) FROM general WHERE npc != 5 GROUP BY nation') as [$nationID, $gennum]) {
if ($nationID === 0) {
continue;
}
$db->update('nation', [
'gennum'=>$gennum
'gennum' => $gennum
], 'nation=%i', $nationID);
}
refreshNationStaticInfo();
@@ -370,7 +371,11 @@ function postUpdateMonthly()
sum(pop)*sum(pop+agri+comm+secu+wall+def)/sum(pop_max+agri_max+comm_max+secu_max+wall_max+def_max)/100
) from city where nation=A.nation and supply=1
))
+(select sum(leadership+strength+intel) from general where nation=A.nation)
+(select SUM((ra.value + 1000)/(rb.value + 1000)*(CASE WHEN g.`npc` < 2 THEN 1.5 ELSE 1 END)*(CASE WHEN g.`leadership` >= 40 THEN g.`leadership` ELSE 0 END)*2 + (SQRT(g.intel * g.strength) * 2 + g.leadership / 2)/2)
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\'
WHERE g.nation = A.nation)
+(select round(sum(dex1+dex2+dex3+dex4+dex5)/1000) from general where nation=A.nation)
+(select round(sum(experience+dedication)/100) from general where nation=A.nation)
+(select round(avg(connect)) from general where nation=A.nation)
@@ -386,7 +391,7 @@ function postUpdateMonthly()
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$genNum[$nationID] = $nation['gennum'];
$powerValues = $maxPowerValues[$nationID]??[];
$powerValues = $maxPowerValues[$nationID] ?? [];
//약간의 랜덤치 부여 (95% ~ 105%)
@@ -405,7 +410,7 @@ function postUpdateMonthly()
}
// 전쟁기한 세팅
foreach($db->query('SELECT me, you, dead, term FROM diplomacy WHERE state = 0') as $dip) {
foreach ($db->query('SELECT me, you, dead, term FROM diplomacy WHERE state = 0') as $dip) {
$genCount = $genNum[$dip['me']];
// 25% 참여율일때 두당 10턴에 4000명 소모한다고 계산
// 4000 / 10 * 0.25 = 100
@@ -420,7 +425,7 @@ function postUpdateMonthly()
}
//개전국 로그
foreach($db->query('SELECT me, you FROM diplomacy WHERE state = 1 AND term <= 1 AND me < you') as $dip){
foreach ($db->query('SELECT me, you FROM diplomacy WHERE state = 1 AND term <= 1 AND me < you') as $dip) {
$nation1 = getNationStaticInfo($dip['me']);
$name1 = $nation1['name'];
$nation2 = getNationStaticInfo($dip['you']);
@@ -432,14 +437,13 @@ function postUpdateMonthly()
}
//휴전국 로그
$stopWarList = [];
foreach($db->queryAllLists('SELECT me,you FROM diplomacy WHERE state=0 AND term <= 1 ORDER BY me desc, you desc') as [$me, $you]){
if($me < $you){
foreach ($db->queryAllLists('SELECT me,you FROM diplomacy WHERE state=0 AND term <= 1 ORDER BY me desc, you desc') as [$me, $you]) {
if ($me < $you) {
$key = "{$me}_{$you}";
}
else{
} else {
$key = "{$you}_{$me}";
}
if(!key_exists($key, $stopWarList)){
if (!key_exists($key, $stopWarList)) {
$stopWarList[$key] = true;
continue;
}
@@ -455,8 +459,8 @@ function postUpdateMonthly()
$globalLogger->pushGlobalHistoryLog("<R><b>【휴전】</b></><D><b>$name1</b></>{$josaWa} <D><b>$name2</b></>{$josaYi} <S>휴전</>합니다.");
$db->update('diplomacy', [
'state'=>2,
'term'=>0,
'state' => 2,
'term' => 0,
], '(me=%i AND you=%i) OR (you=%i AND me=%i)', $me, $you, $me, $you);
}
@@ -464,17 +468,17 @@ function postUpdateMonthly()
//사상자 초기화, 외교 기한-1
$db->update('diplomacy', [
'dead'=>$db->sqleval('if(state!=0, 0, dead)'),
'term'=>$db->sqleval('greatest(0, term-1)'),
'dead' => $db->sqleval('if(state!=0, 0, dead)'),
'term' => $db->sqleval('greatest(0, term-1)'),
], true);
//불가침 끝나면 통상으로
$db->update('diplomacy', [
'state'=>2,
'state' => 2,
], 'state = 7 AND term = 0');
//선포 끝나면 교전으로
$db->update('diplomacy', [
'state'=>0,
'term'=>6,
'state' => 0,
'term' => 6,
], 'state = 1 AND term = 0');
//초반이후 방랑군 자동 해체
@@ -567,8 +571,8 @@ function updateNationState()
$updateVals = [
'level' => $nationlevel,
'gold'=>$db->sqleval('gold + %i', $nationlevel*1000),
'rice'=>$db->sqleval('rice + %i', $nationlevel*1000),
'gold' => $db->sqleval('gold + %i', $nationlevel * 1000),
'rice' => $db->sqleval('rice + %i', $nationlevel * 1000),
];
switch ($nationlevel) {
@@ -624,14 +628,25 @@ function updateNationState()
$targetKillTurn
);
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong', 'npc', 'aux'], 2);
$chiefObj = null;
$chiefID = null;
$uniqueLotteryWeightList = [];
[$startYear, $year] = $gameStor->getValuesAsArray(['startyear', 'year']);
$relYear = $year - $startYear;
$maxTrialCountByYear = 1;
foreach (GameConst::$maxUniqueItemLimit as $tmpVals) {
[$targetYear, $targetTrialCnt] = $tmpVals;
if ($relYear < $targetYear) {
break;
}
$maxTrialCountByYear = $targetTrialCnt;
}
foreach ($nationGenList as $nationGen) {
if ($nationGen->getVar('officer_level') == 12) {
$chiefObj = $nationGen;
$chiefID = $nationGen->getID();
}
$trialCnt = count(GameConst::$allItems);
$trialCnt = min($maxTrialCountByYear, count(GameConst::$allItems));
foreach ($nationGen->getItems() as $item) {
if (!$item->isBuyable()) {
@@ -670,8 +685,10 @@ function updateNationState()
$winnerObj->applyDB($db);
}
if($chiefObj){
if ($chiefID) {
$chiefObj = General::createGeneralObjFromDB($chiefID, ['belong', 'npc', 'aux'], 2);
$chiefObj->increaseInheritancePoint('unifier', 250 * $levelDiff);
$chiefObj->applyDB($db);
}
}
}
@@ -699,9 +716,9 @@ function updateNationState()
$nation['nation']
);
$npcObj->setAffinity(999)->setStat(10, 10, 10)
->setSpecialSingle('척사')->setEgo('che_은둔')
->setKillturn(70)->setGoldRice(0, 0)
->setNPCType(5)->fillRemainSpecAsZero($admin);
->setSpecialSingle('척사')->setEgo('che_은둔')
->setKillturn(70)->setGoldRice(0, 0)
->setNPCType(5)->fillRemainSpecAsZero($admin);
$npcObj->build($admin);
$npcID = $npcObj->getGeneralID();
@@ -990,9 +1007,9 @@ function checkEmperior()
$nationLogger = new ActionLogger(0, $nationID, $admin['year'], $admin['month']);
$nationLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaYi} 전토를 통일");
foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){
if($genObj->getNationID() == $nationID){
if($genObj->getVar('officer_level') > 4){
foreach (General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj) {
if ($genObj->getNationID() == $nationID) {
if ($genObj->getVar('officer_level') > 4) {
$genObj->increaseInheritancePoint('unifier', 2000);
};
}
@@ -1008,7 +1025,7 @@ function checkEmperior()
[$totalPop, $totalMaxPop] = $db->queryFirstList('SELECT SUM(pop), SUM(pop_max) FROM city');
$pop = "{$totalPop} / {$totalMaxPop}";
$poprate = round($totalPop / $totalMaxPop * 100, 2). " %";
$poprate = round($totalPop / $totalMaxPop * 100, 2) . " %";
$chiefs = Util::convertArrayToDict(
$db->query(
@@ -1150,29 +1167,30 @@ function checkEmperior()
LogHistory();
}
function resetInheritanceUser(int $userID, bool $isRebirth=false):float{
function resetInheritanceUser(int $userID, bool $isRebirth = false): float
{
$rebirthDegraded = [
'dex'=>0.5,
'dex' => 0.5,
];
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$userID}");
$totalPoint = 0;
$allPoints = $inheritStor->getAll();
if(!$allPoints || count($allPoints) == 0){
if (!$allPoints || count($allPoints) == 0) {
//비었으므로 리셋 안함
return 0;
}
if(count($allPoints) == 1 && key_exists('previous', $allPoints)){
if (count($allPoints) == 1 && key_exists('previous', $allPoints)) {
//이미 리셋되었으므로 리셋 안함
return $allPoints['previous'][0];
}
$userLogger = new UserLogger($userID);
$previousPoint = ($allPoints['previous']??[0,0])[0];
$previousPoint = ($allPoints['previous'] ?? [0, 0])[0];
foreach($allPoints as $key=>[$value,]){
if($isRebirth && key_exists($key, $rebirthDegraded)){
foreach ($allPoints as $key => [$value,]) {
if ($isRebirth && key_exists($key, $rebirthDegraded)) {
$value *= $rebirthDegraded[$key];
}
$keyText = General::INHERITANCE_KEY[$key][2];
@@ -1188,13 +1206,14 @@ function resetInheritanceUser(int $userID, bool $isRebirth=false):float{
return $totalPoint;
}
function updateMaxDomesticCritical(General $general, $score){
$maxDomesticCritical = $general->getAuxVar('max_domestic_critical')??0;
function updateMaxDomesticCritical(General $general, $score)
{
$maxDomesticCritical = $general->getAuxVar('max_domestic_critical') ?? 0;
$maxDomesticCritical += $score / 2;
$general->setAuxVar('max_domestic_critical', $maxDomesticCritical);
$oldMaxDomesticCritical = $general->getInheritancePoint('max_domestic_critical');
if($maxDomesticCritical > $oldMaxDomesticCritical){
if ($maxDomesticCritical > $oldMaxDomesticCritical) {
$general->setInheritancePoint('max_domestic_critical', $maxDomesticCritical);
}
}
}
+14 -25
View File
@@ -77,12 +77,6 @@ function pushProcessLog($log) {
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_processlog.txt", $log);
}
function pushStepLog($log) {
$date = date('Y_m_d');
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_steplog.txt", $log);
}
function pushLockLog($log) {
$date = date('Y_m_d');
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_locklog.txt", $log);
@@ -105,15 +99,15 @@ function formatHistoryToHTML(array $history, ?string $type=null):string{
$result = [];
if($type){
foreach($history as $seq=>$item){
$result[] = "<div class='log_{$type}' id='log_{$type}_{$seq}' data-seq='{$seq}'>".ConvertLog($item).'</div>';
$result[] = "<div class='log_{$type}' id='log_{$type}_{$seq}' data-seq='{$seq}'>".ConvertLog($item).'</div>';
}
}
else{
foreach($history as $seq=>$item){
$result[] = '<div>'.ConvertLog($item).'</div>';
$result[] = '<div>'.ConvertLog($item).'</div>';
}
}
return join('', $result);
}
@@ -242,7 +236,7 @@ function pushGeneralHistoryLog(int $generalID, ?array $history, $year=null, $mon
return;
}
$db = DB::db();
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
@@ -278,7 +272,7 @@ function pushNationHistoryLog(int $nationID, ?array $history, ?int $year=null, ?
return;
}
$db = DB::db();
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
@@ -304,7 +298,7 @@ function pushGlobalHistoryLog(?array $history, $year=null, $month=null) {
return;
}
$db = DB::db();
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
@@ -325,8 +319,8 @@ function getGlobalHistoryLogWithDate(int $year, int $month):array {
$db = DB::db();
$texts = $db->queryFirstColumn(
'SELECT `text` from world_history where nation_id = 0 AND year = %i and month = %i order by id desc',
$year,
'SELECT `text` from world_history where nation_id = 0 AND year = %i and month = %i order by id desc',
$year,
$month
);
@@ -342,7 +336,7 @@ function pushGlobalActionLog(?array $history, ?int $year=null, ?int $month=null)
return;
}
$db = DB::db();
if($year === null || $month === null){
$gameStor = KVStorage::getStorage($db, 'game_env');
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
@@ -366,8 +360,8 @@ function getGlobalActionLogWithDate(int $year, int $month):array {
$db = DB::db();
$texts = $db->queryFirstColumn(
'SELECT `text` from general_record where general_id = 0 AND log_type = "history" AND year = %i and month = %i order by id desc',
$year,
'SELECT `text` from general_record where general_id = 0 AND log_type = "history" AND year = %i and month = %i order by id desc',
$year,
$month
);
@@ -378,8 +372,6 @@ function getGlobalActionLogWithDate(int $year, int $month):array {
}
function LogHistory($isFirst=0) {
if(STEP_LOG) pushStepLog(TimeUtil::now().', LogHistory Start');
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$obj = $gameStor->getValues(['startyear', 'year', 'month']);
@@ -401,16 +393,16 @@ function LogHistory($isFirst=0) {
if($map['month'] == 0){
$map['month'] = 12;
$map['year'] -= 1;
}
}
}
$year = $map['year'];
$month = $map['month'];
$globalHistory = getGlobalHistoryLogWithDate($year, $month);
$globalAction = getGlobalActionLogWithDate($year, $month);
$nations = getAllNationStaticInfo();
$nations[0] = getNationStaticInfo(0);
@@ -426,8 +418,6 @@ function LogHistory($isFirst=0) {
return -($lhs['power']<=>$rhs['power']);
});
if(STEP_LOG) pushStepLog(TimeUtil::now().', contents collected');
$db->insert('ng_history', [
'server_id' => UniqueConst::$serverID,
'year' => $year,
@@ -438,6 +428,5 @@ function LogHistory($isFirst=0) {
'nations' => Json::encode($nations),
]);
if(STEP_LOG) pushStepLog(TimeUtil::now().', LogHistory Finish');
return true;
}
+130 -88
View File
@@ -8,8 +8,7 @@ function processTournament() {
$admin = $gameStor->getValues(['tournament', 'phase', 'tnmt_type', 'tnmt_auto', 'tnmt_time']);
$now = new \DateTime();
$admin['now'] = $now->format('Y-m-d H:i:s');
$admin['offset'] = $now->getTimestamp() - (new \DateTime($admin['tnmt_time']))->getTimestamp();
$offset = $now->getTimestamp() - (new \DateTime($admin['tnmt_time']))->getTimestamp();
//수동일땐 무시
if($admin['tnmt_auto'] == 0) { return; }
@@ -18,99 +17,102 @@ function processTournament() {
$tnmt = $admin['tournament'];
$phase = $admin['phase'];
if($offset < 0){
return;
}
//현시간이 스탬프 지나친경우
if($admin['offset'] >= 0) {
switch($admin['tnmt_auto']) {
case 1: $unit = 720; break;
case 2: $unit = 420; break;
case 3: $unit = 180; break;
case 4: $unit = 60; break;
case 5: $unit = 30; break;
case 6: $unit = 15; break;
case 7: $unit = 5; break;
default: throw new MustNotBeReachedException();
switch($admin['tnmt_auto']) {
case 1: $unit = 720; break;
case 2: $unit = 420; break;
case 3: $unit = 180; break;
case 4: $unit = 60; break;
case 5: $unit = 30; break;
case 6: $unit = 15; break;
case 7: $unit = 5; break;
default: throw new MustNotBeReachedException();
}
//업데이트 횟수
$iter = intdiv($offset, $unit) + 1;
for($i=0; $i < $iter; $i++) {
switch($tnmt) {
case 1: //신청 마감
fillLowGenAll();
$tnmt = 2; $phase = 0;
break;
case 2: //예선중
qualify($type, $tnmt, $phase); $phase++;
if($phase >= 56) { $tnmt = 3; $phase = 0; }
break;
case 3: //추첨중
selectionAll($type, $tnmt, $phase); $phase+=8;
if($phase >= 32) { $tnmt = 4; $phase = 0; }
break;
case 4: //본선중
finallySingle($type, $tnmt, $phase); $phase++;
if($phase >= 6) { $tnmt = 5; $phase = 0; }
break;
case 5: //배정중
final16set();
$tnmt = 6; $phase = 0;
startBetting();
break;
case 6: //베팅중
$tnmt = 7; $phase = 0;
break;
case 7: //16강중
finalFight($type, $tnmt, $phase, 16); $phase++;
if($phase >= 8) { $tnmt = 8; $phase = 0; }
break;
case 8: //8강중
finalFight($type, $tnmt, $phase, 8); $phase++;
if($phase >= 4) { $tnmt = 9; $phase = 0; }
break;
case 9: //4강중
finalFight($type, $tnmt, $phase, 4); $phase++;
if($phase >= 2) { $tnmt = 10; $phase = 0; }
break;
case 10: //결승중
finalFight($type, $tnmt, $phase, 2);
$tnmt = 0; $phase = 0;
setGift($type, $tnmt, $phase);
$i = $iter;
break;
}
//업데이트 횟수
$iter = intdiv($admin['offset'], $unit) + 1;
//베팅은 무조건 60페이즈후 진행(최대 1시간)
if($tnmt == 6) {
$betTerm = $unit * 60;
if($betTerm > 3600) { $betTerm = 3600; }
//처리 초 더한 날짜
$dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i + $betTerm);
$gameStor->tournament = $tnmt;
$gameStor->phase = $phase;
$gameStor->tnmt_time = $dt;
return;
}
for($i=0; $i < $iter; $i++) {
switch($tnmt) {
case 1: //신청 마감
fillLowGenAll();
$tnmt = 2; $phase = 0;
break;
case 2: //예선중
qualify($type, $tnmt, $phase); $phase++;
if($phase >= 56) { $tnmt = 3; $phase = 0; }
break;
case 3: //추첨중
selectionAll($type, $tnmt, $phase); $phase+=8;
if($phase >= 32) { $tnmt = 4; $phase = 0; }
break;
case 4: //본선중
finallySingle($type, $tnmt, $phase); $phase++;
if($phase >= 6) { $tnmt = 5; $phase = 0; }
break;
case 5: //배정중
final16set();
$tnmt = 6; $phase = 0;
break;
case 6: //베팅중
$tnmt = 7; $phase = 0;
break;
case 7: //16강중
finalFight($type, $tnmt, $phase, 16); $phase++;
if($phase >= 8) { $tnmt = 8; $phase = 0; }
break;
case 8: //8강중
finalFight($type, $tnmt, $phase, 8); $phase++;
if($phase >= 4) { $tnmt = 9; $phase = 0; }
break;
case 9: //4강중
finalFight($type, $tnmt, $phase, 4); $phase++;
if($phase >= 2) { $tnmt = 10; $phase = 0; }
break;
case 10: //결승중
finalFight($type, $tnmt, $phase, 2);
$tnmt = 0; $phase = 0;
setGift($type, $tnmt, $phase);
$i = $iter;
break;
}
//베팅은 무조건 60페이즈후 진행(최대 1시간)
if($tnmt == 6) {
$betTerm = $unit * 60;
if($betTerm > 3600) { $betTerm = 3600; }
//처리 초 더한 날짜
$dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i + $betTerm);
if($admin['tnmt_auto'] == 1) {
//처리 초 더한 날짜
$dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i);
$hr = substr($dt, 11, 2);
//지정시간대 넘어가면 중단 20~24시
if($hr < 20) {
$dt = substr($dt, 0, 11)."20:00:00";
$gameStor->tournament = $tnmt;
$gameStor->phase = $phase;
$gameStor->tnmt_time = $dt;
return;
}
if($admin['tnmt_auto'] == 1) {
//처리 초 더한 날짜
$dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i);
$hr = substr($dt, 11, 2);
//지정시간대 넘어가면 중단 20~24시
if($hr < 20) {
$dt = substr($dt, 0, 11)."20:00:00";
$gameStor->tournament = $tnmt;
$gameStor->phase = $phase;
$gameStor->tnmt_time = $dt;
return;
}
}
}
$second = $unit * $iter;
$gameStor->tournament = $tnmt;
$gameStor->phase = $phase;
$gameStor->tnmt_time = (new \DateTimeImmutable($admin['tnmt_time']))->add(new \DateInterval("PT{$second}S"))->format('Y-m-d H:i:s');
}
$second = $unit * $iter;
$gameStor->tournament = $tnmt;
$gameStor->phase = $phase;
$gameStor->tnmt_time = (new \DateTimeImmutable($admin['tnmt_time']))->add(new \DateInterval("PT{$second}S"))->format('Y-m-d H:i:s');
}
function getTournamentTerm() {
@@ -296,11 +298,51 @@ function startTournament($auto, $type) {
['설전','책사'],
][$type];
$history[] = "<S>◆</>{$admin['year']}{$admin['month']}월:{$openerText}<C>{$typeText}</> 대회가 개최됩니다! 천하의 <span class='ev_highlight'>{$genTypeText}</span>들을 모집하고 있습니다!";
$history[] = "<S>◆</>{$admin['year']}{$admin['month']}월:<B><b>【대회】</b></>{$openerText}<C>{$typeText}</> 대회가 개최됩니다! 천하의 <span class='ev_highlight'>{$genTypeText}</span>들을 모집하고 있습니다!";
pushGlobalHistoryLog($history, $admin['year'], $admin['month']);
}
function startBetting(){
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
pushGlobalHistoryLog([
"<S>◆</>{$year}{$month}월:<B><b>【대회】</b></>우승자를 예상하는 <C>내기</>가 진행중입니다! 호사가의 참여를 기다립니다!"
], $year, $month);
$betGold = 10;
$npcList = $db->queryFirstColumn('SELECT no FROM general WHERE npc >= 2 AND gold >= (500 + %i)', $betGold);
$npcBet = [];
$betSum = [
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
];
foreach($npcList as $npcID){
$target = Util::randRangeInt(0, 15);
$betSum[$target] += $betGold;
$npcBet[] = [$npcID, $target];
}
$db->update('general', [
'gold'=>$db->sqleval('gold - %i', $betGold),
], 'no IN %li', $npcList);
foreach($npcBet as [$npcID, $betTarget]){
$targetKey = "bet{$betTarget}";
$db->update('betting', [
"bet{$betTarget}"=>$db->sqleval('%b + %i', $targetKey, $betGold),
], 'general_id = %i', $npcID);
}
foreach($betSum as $betTarget=>$betSumGold){
$targetKey = "bet{$betTarget}";
$db->update('betting', [
"bet{$betTarget}"=>$db->sqleval('%b + %i', $targetKey, $betSumGold),
], 'general_id = 0');
}
}
function fillLowGenAll() {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
@@ -785,8 +827,8 @@ function setGift($tnmt_type, $tnmt, $phase) {
$josaYiWinner = JosaUtil::pick($winner['name'], '이');
$josaYiRunnerUp = JosaUtil::pick($runnerUp['name'], '이');
$winnerLogger->pushGlobalHistoryLog("<C>{$tp}</> 대회에서 <Y>{$winner['name']}</>{$josaYiWinner} <C>우승</>, <Y>{$runnerUp['name']}</>{$josaYiRunnerUp} <C>준우승</>을 차지하여 천하에 이름을 떨칩니다!", ActionLogger::EVENT_YEAR_MONTH);
$winnerLogger->pushGlobalHistoryLog("<C>{$tp}</> 대회의 <S>우승자</>에게는 <C>{$winnerRewardText}</>, <S>준우승자</>에겐 <C>{$runnerUpRewardText}</>의 <S>상금</>과 약간의 <S>명성</>이 주어집니다!", ActionLogger::EVENT_YEAR_MONTH);
$winnerLogger->pushGlobalHistoryLog("<B><b>【대회】</b></><C>{$tp}</> 대회에서 <Y>{$winner['name']}</>{$josaYiWinner} <C>우승</>, <Y>{$runnerUp['name']}</>{$josaYiRunnerUp} <C>준우승</>을 차지하여 천하에 이름을 떨칩니다!", ActionLogger::EVENT_YEAR_MONTH);
$winnerLogger->pushGlobalHistoryLog("<B><b>【대회】</b></><C>{$tp}</> 대회의 <S>우승자</>에게는 <C>{$winnerRewardText}</>, <S>준우승자</>에겐 <C>{$runnerUpRewardText}</>의 <S>상금</>과 약간의 <S>명성</>이 주어집니다!", ActionLogger::EVENT_YEAR_MONTH);
$generalObjList = General::createGeneralObjListFromDB(array_keys($resultHelper));
@@ -1132,7 +1174,7 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
$gen1resKey = 'd';
$gen2resKey = 'd';
break;
default: new MustNotBeReachedException();
default: throw new MustNotBeReachedException();
}
$db->update('rank_data', [
+5 -2
View File
@@ -21,9 +21,11 @@ foreach($rawTurn as [$turn_idx, $action, $arg, $brief]){
];
}
[$turnTerm, $year, $month, $lastExecute] = $gameStor->getValuesAsArray(['turnterm', 'year', 'month', 'turntime']);
$turnTime = $db->queryFirstField('SELECT turntime FROM general WHERE no=%i', $generalID);
[$turnTime, $rawGeneralAux] = $db->queryFirstList('SELECT turntime, aux FROM general WHERE no=%i', $generalID);
$generalAux = Json::decode($rawGeneralAux??'{}');
if(cutTurn($turnTime, $turnTerm) > cutTurn($lastExecute, $turnTerm)){
//이미 이번달에 실행된 턴이다.
@@ -42,5 +44,6 @@ Json::die([
'year'=>$year,
'month'=>$month,
'date'=>TimeUtil::now(true),
'turn'=>$commandList
'turn'=>$commandList,
'autorun_limit'=> $generalAux['autorun_limit']??null,
]);
+1 -5
View File
@@ -20,10 +20,6 @@ $loader->addClassMap((function () {
//디버그용 매크로
ini_set("session.cache_expire", 10080); // minutes
// 각종 변수
define('STEP_LOG', true);
define('PROCESS_LOG', true);
ob_start();
// 에러 메세지 출력
@@ -69,6 +65,6 @@ function prepareDir(string $dirPath, bool $forceCreate=true):bool{
}
return mkdir($dirPath);
}
return mkdir($dirPath, 0777, true);
}
+31 -29
View File
@@ -19,7 +19,7 @@ function processWar(General $attackerGeneral, array $rawAttackerNation, array $r
'rice'=>10000,
'type'=>GameConst::$neutralNationType,
'tech'=>0,
'gennum'=>1
'gennum'=>1
];
}
else{
@@ -89,7 +89,7 @@ function processWar(General $attackerGeneral, array $rawAttackerNation, array $r
$rice *= getTechCost($rawDefenderNation['tech']);
$rice *= $cityRate / 100 - 0.2;
Util::setRound($rice);
$updateDefenderNation['rice'] = max(0, $rawDefenderNation['rice'] - $rice);
}
else if($conquerCity){
@@ -169,7 +169,7 @@ function processWar(General $attackerGeneral, array $rawAttackerNation, array $r
if(!$conquerCity){
return;
}
ConquerCity([
'startyear'=>$startYear,
'year'=>$year,
@@ -207,7 +207,7 @@ function extractBattleOrder(General $general){
function processWar_NG(
WarUnitGeneral $attacker,
callable $getNextDefender,
callable $getNextDefender,
WarUnitCity $city,
int $relYear
):bool{
@@ -216,7 +216,7 @@ function processWar_NG(
$logger = $attacker->getLogger();
//$attacker->useBattleInitItem();
$date = $attacker->getGeneral()->getTurnTime(General::TURNTIME_HM);
$attackerNationUpdate = [];
@@ -224,7 +224,7 @@ function processWar_NG(
$defender = ($getNextDefender)(null, true);
$conquerCity = false;
$josaRo = JosaUtil::pick($city->getName(), '로');
$josaYi = JosaUtil::pick($attacker->getName(), '이');
@@ -234,7 +234,7 @@ function processWar_NG(
for($currPhase = 0; $currPhase < $attacker->getMaxPhase(); $currPhase+=1){
if($defender === null){
$defender = $city;
if($city->getNationVar('rice') <= 0 && $city->getVar('supply')){
//병량 패퇴
$attacker->setOppose($defender);
@@ -261,15 +261,17 @@ function processWar_NG(
$attacker->addTrain(1);
$defender->addTrain(1);
$attackerCrewTypeCoef = $attacker->getCrewType()->getAttackCoef($defender->getCrewType()) * $defender->getCrewType()->getDefenceCoef($attacker->getCrewType());
$defenderCrewTypeCoef = $defender->getCrewType()->getAttackCoef($attacker->getCrewType()) * $attacker->getCrewType()->getDefenceCoef($defender->getCrewType());
/*
if($attackerCrewTypeCoef > $defenderCrewTypeCoef && $attacker instanceof WarUnitGeneral){
$attacker->getGeneral()->increaseInheritancePoint('snipe_combat', 1);
}
if($defenderCrewTypeCoef > $attackerCrewTypeCoef && $defender instanceof WarUnitGeneral){
$defender->getGeneral()->increaseInheritancePoint('snipe_combat', 1);
}
*/
$attackerName = $attacker->getName();
$attackerCrewTypeName = $attacker->getCrewTypeName();
@@ -315,7 +317,7 @@ function processWar_NG(
$battleCaller->merge($defender->getGeneral()->getBattlePhaseSkillTriggerList($defender));
$battleCaller->fire([], [$attacker, $defender]);
$deadDefender = $attacker->calcDamage();
$deadAttacker = $defender->calcDamage();
@@ -339,7 +341,7 @@ function processWar_NG(
}
$deadAttacker = min(ceil($deadAttacker), $attackerHP);
$deadDefender = min(ceil($deadDefender), $defenderHP);
$deadDefender = min(ceil($deadDefender), $defenderHP);
$attacker->decreaseHP($deadAttacker);
$defender->decreaseHP($deadDefender);
@@ -353,12 +355,12 @@ function processWar_NG(
$attacker->getLogger()->pushGeneralBattleDetailLog(
"$phaseNickname : <Y1>【{$attacker->getName()}】</> <C>{$attacker->getHP()} (-$deadAttacker)</> VS <C>{$defender->getHP()} (-$deadDefender)</> <Y1>【{$defender->getName()}】</>"
);
$defender->getLogger()->pushGeneralBattleDetailLog(
"$phaseNickname : <Y1>【{$defender->getName()}】</> <C>{$defender->getHP()} (-$deadDefender)</> VS <C>{$attacker->getHP()} (-$deadAttacker)</> <Y1>【{$attacker->getName()}】</>"
);
}
$attacker->addPhase();
$defender->addPhase();
@@ -369,7 +371,7 @@ function processWar_NG(
$attacker->addLose();
$defender->addWin();
$attacker->tryWound();
$defender->tryWound();
@@ -404,7 +406,7 @@ function processWar_NG(
}
$josaYi = JosaUtil::pick($defender->getCrewTypeName(), '이');
if($noRice){
$logger->pushGlobalActionLog("<Y>{$defender->getName()}</>의 {$defender->getCrewTypeName()}{$josaYi} 패퇴했습니다.");
$attacker->getLogger()->pushGeneralActionLog("<Y>{$defender->getName()}</>의 {$defender->getCrewTypeName()}{$josaYi} 패퇴했습니다.", ActionLogger::PLAIN);
@@ -426,9 +428,9 @@ function processWar_NG(
if($defender !== null && !($defender instanceof WarUnitGeneral)){
throw new \RuntimeException('다음 수비자를 받아오는데 실패');
}
}
}
if($currPhase == $attacker->getMaxPhase()){
@@ -442,7 +444,7 @@ function processWar_NG(
$attacker->finishBattle();
$defender->finishBattle();
if($defender instanceof WarUnitCity){
$newConflict = $defender->addConflict();
if($newConflict){
@@ -501,7 +503,7 @@ function ConquerCity(array $admin, General $general, array $city) {
$defenderNationID = $city['nation'];
$defenderStaticNation = getNationStaticInfo($defenderNationID);
$defenderNationName = $defenderStaticNation['name'];
$defenderNationLogger = new ActionLogger(0, $defenderNationID, $year, $month);
if($defenderNationID) {
@@ -535,7 +537,7 @@ function ConquerCity(array $admin, General $general, array $city) {
$defenderNationID,
12
), null, $city, $loseNation, $year, $month, false);
$josaUl = JosaUtil::pick($defenderNationName, '을');
$attackerLogger->pushNationalHistoryLog("<D><b>{$defenderNationName}</b></>{$josaUl} 정복");
$attackerLogger->flush();
@@ -585,19 +587,19 @@ function ConquerCity(array $admin, General $general, array $city) {
// 승전국 보상
$loseNationGold = Util::valueFit($loseNation['gold'] - GameConst::$basegold, 0);
$loseNationRice = Util::valueFit($loseNation['rice'] - GameConst::$baserice, 0);
$loseNationGold += $loseGeneralGold;
$loseNationRice += $loseGeneralRice;
$loseNationGold = intdiv($loseNationGold, 2);
$loseNationRice = intdiv($loseNationRice, 2);
// 기본량 제외 금쌀50% + 장수들 분실 금쌀50% 흡수
$db->update('nation', [
'gold'=>$db->sqleval('gold + %i', $loseNationGold),
'rice'=>$db->sqleval('rice + %i', $loseNationRice),
], 'nation=%i', $attackerNationID);
//아국 수뇌부에게 로그 전달
$loseNationGoldText = number_format($loseNationGold);
$loseNationRiceText = number_format($loseNationRice);
@@ -622,7 +624,7 @@ function ConquerCity(array $admin, General $general, array $city) {
'officer_level'=>1,
'officer_city'=>0,
], 'officer_city = %i',$cityID);
//수도였으면 긴급 천도
if($defenderNationID && $defenderStaticNation['capital'] == $cityID) {
$minCity = findNextCapital($cityID, $defenderNationID);
@@ -686,7 +688,7 @@ function ConquerCity(array $admin, General $general, array $city) {
$conquerNationLogger->pushNationalHistoryLog("<D><b>{$attackerNationName}</b></>에서 <G><b>{$city['name']}</b></>{$josaUl} <S>양도</> 받음");
$attackerLogger->pushNationalHistoryLog("<G><b>{$city['name']}</b></>{$josaUl} <D><b>{$conquerNationName}</b></>에 <Y>양도</>");
}
$query = [
'supply'=>1,
'term'=>0,
@@ -704,7 +706,7 @@ function ConquerCity(array $admin, General $general, array $city) {
$query['def'] = $db->sqleval('def_max/2');
$query['wall'] = $db->sqleval('wall_max/2');
}
$db->update('city', $query, 'city=%i', $cityID);
//전방설정
@@ -726,8 +728,8 @@ function findNextCapital(int $capitalID, int $nationID):int{
$cities = [];
foreach(
DB::db()->query(
'SELECT city, pop FROM city WHERE nation=%i and city!=%i',
$nationID,
'SELECT city, pop FROM city WHERE nation=%i and city!=%i',
$nationID,
$capitalID
) as $row
){
@@ -737,7 +739,7 @@ function findNextCapital(int $capitalID, int $nationID):int{
foreach($distList as $dist=>$distSubList){
$maxCityPop = 0;
$minCity = 0;
foreach($distSubList as $cityID){
if(!key_exists($cityID, $cities)){
continue;
@@ -17,6 +17,7 @@ class BuySpecificUnique extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$availableItems = [];
foreach (GameConst::$allItems as $items) {
foreach ($items as $itemKey => $amount) {
if ($amount == 0) {
@@ -62,10 +62,10 @@ class ResetTurnTime extends \sammo\BaseAPI
$userLogger = new UserLogger($userID);
if($afterTurn >= 0){
$userLogger->push(sprintf("{$reqPoint} 포인트로 턴 시간을 바꾼 결과 %02d:%02d 뒤로 밀림", intdiv($afterTurn, 60), $afterTurn%60), "inheritPoint");
$userLogger->push(sprintf("{$reqPoint} 포인트로 턴 시간을 바꾼 결과 %02d:%02d 뒤로 밀림", intdiv(Util::toInt($afterTurn), 60), $afterTurn%60), "inheritPoint");
}
else{
$userLogger->push(sprintf("{$reqPoint} 포인트로 턴 시간을 바꾼 결과 %02d:%02d 앞으로 당김", intdiv(-$afterTurn, 60), (-$afterTurn)%60), "inheritPoint");
$userLogger->push(sprintf("{$reqPoint} 포인트로 턴 시간을 바꾼 결과 %02d:%02d 앞으로 당김", intdiv(Util::toInt(-$afterTurn), 60), (-$afterTurn)%60), "inheritPoint");
}
$userLogger->flush();
@@ -15,7 +15,7 @@ class che_반계_백우선 extends \sammo\BaseItem{
protected $id = 45;
protected $rawName = '백우선';
protected $name = '백우선(반계)';
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림';
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 20% 확률로 되돌림';
protected $cost = 200;
protected $consumable = false;
@@ -29,7 +29,7 @@ class che_반계_백우선 extends \sammo\BaseItem{
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller(
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM +BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*301),
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM +BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*301, 0.2),
new che_반계발동($unit)
);
}
@@ -15,7 +15,7 @@ class che_반계_파초선 extends \sammo\BaseItem{
protected $id = 45;
protected $rawName = '파초선';
protected $name = '파초선(반계)';
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림';
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 20% 확률로 되돌림';
protected $cost = 200;
protected $consumable = false;
@@ -29,7 +29,7 @@ class che_반계_파초선 extends \sammo\BaseItem{
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller(
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM +BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*302),
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM +BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*302, 0.2),
new che_반계발동($unit)
);
}
@@ -16,12 +16,12 @@ class che_서적_07_사마법 extends \sammo\BaseStatItem{
public function __construct()
{
parent::__construct();
$this->info .= "<br>[전투] 상대의 계략을 20% 확률로 되돌림";
$this->info .= "<br>[전투] 상대의 계략을 10% 확률로 되돌림";
}
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller(
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*207, 0.2),
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*207, 0.1),
new che_반계발동($unit)
);
}
@@ -16,12 +16,12 @@ class che_서적_12_산해경 extends \sammo\BaseStatItem{
public function __construct()
{
parent::__construct();
$this->info .= "<br>[전투] 상대의 계략을 20% 확률로 되돌림";
$this->info .= "<br>[전투] 상대의 계략을 10% 확률로 되돌림";
}
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller(
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM, 0.2),
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM, 0.1),
new che_반계발동($unit)
);
}
@@ -11,25 +11,29 @@ class event_전투특기_무쌍 extends \sammo\BaseItem{
protected $id = 61;
protected $rawName = '비급';
protected $name = '비급(무쌍)';
protected $info = '[전투] 대미지 +10%, 피해 -5%, 공격 시 필살 확률 +10%p, <br>승리 수만큼 대미지 0.20%씩 추가 상승(최대50%)<br>승리 수만큼 피해 0.05%씩 감소(최대20%)';
protected $info = '[전투] 대미지 +5%, 피해 -2%, 공격 시 필살 확률 +10%p, <br>승리 수의 로그 비례로 대미지 상승(10회 ⇒ +5%, 40회 ⇒ +15%)<br>승리 수의 로그 비례로 피해 감소(10회 ⇒ -2%, 40회 ⇒ -6%)';
protected $cost = 100;
protected $buyable = true;
protected $consumable = false;
protected $reqSecu = 3000;
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'warCriticalRatio' && $aux['isAttacker']??false){
if($statName === 'warCriticalRatio' && ($aux['isAttacker']??false)){
return $value += 0.1;
}
return $value;
}
public function getWarPowerMultiplier(WarUnit $unit):array{
$attackMultiplier = 1.1;
$defenceMultiplier = 0.95;
$generalWarSpecial = $unit->getGeneral()->getSpecialWar();
if($generalWarSpecial !== null && $generalWarSpecial->getName() == '무쌍'){
return [1, 1];
}
$attackMultiplier = 1.05;
$defenceMultiplier = 0.98;
$killnum = $unit->getGeneral()->getRankVar('killnum');
$attackMultiplier += Util::valueFit($killnum * 0.01 * 0.2, null, 0.5);
$defenceMultiplier -= Util::valueFit($killnum * 0.01 * 0.05, null, 0.2);
$attackMultiplier += log(max(1, $killnum / 5), 2) / 20;
$defenceMultiplier -= log(max(1, $killnum / 5), 2) / 50;
return [$attackMultiplier, $defenceMultiplier];
}
}
+3 -3
View File
@@ -21,7 +21,7 @@ class che_종횡가 extends \sammo\BaseNation{
if($varType == 'score') return $value * 0.9;
if($varType == 'cost') return $value * 1.2;
}
return $value;
}
@@ -29,13 +29,13 @@ class che_종횡가 extends \sammo\BaseNation{
if($type == 'gold'){
return $amount * 0.9;
}
return $amount;
}
public function onCalcStrategic(string $turnType, string $varType, $value){
if($varType == 'delay'){
return Util::round($value / 2);
return Util::round($value * 3 / 4);
}
if($varType == 'globalDelay'){
return Util::round($value / 2);
@@ -10,7 +10,7 @@ class che_event_무쌍 extends \sammo\BaseSpecial{
protected $id = 61;
protected $name = '무쌍';
protected $info = '[전투] 대미지 +10%, 피해 -5%, 공격 시 필살 확률 +10%p, <br>승리 수만큼 대미지 0.20%씩 추가 상승(최대40%)<br>승리 수만큼 피해 0.05%씩 감소(최대30%)';
protected $info = '[전투] 대미지 +5%, 피해 -2%, 공격 시 필살 확률 +10%p, <br>승리 수의 로그 비례로 대미지 상승(10회 ⇒ +5%, 40회 ⇒ +15%)<br>승리 수의 로그 비례로 피해 감소(10회 ⇒ -2%, 40회 ⇒ -6%)';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1;
@@ -19,18 +19,22 @@ class che_event_무쌍 extends \sammo\BaseSpecial{
];
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'warCriticalRatio' && $aux['isAttacker']??false){
if($statName === 'warCriticalRatio' && ($aux['isAttacker']??false)){
return $value += 0.1;
}
return $value;
}
public function getWarPowerMultiplier(WarUnit $unit):array{
$attackMultiplier = 1.1;
$defenceMultiplier = 1;
$generalWarSpecial = $unit->getGeneral()->getSpecialWar();
if($generalWarSpecial !== null && $generalWarSpecial->getName() == '무쌍'){
return [1, 1];
}
$attackMultiplier = 1.05;
$defenceMultiplier = 0.98;
$killnum = $unit->getGeneral()->getRankVar('killnum');
$attackMultiplier += Util::valueFit($killnum * 0.01 * 0.2, null, 0.4);
$defenceMultiplier -= Util::valueFit($killnum * 0.01 * 0.05, null, 0.3);
$attackMultiplier += log(max(1, $killnum / 5), 2) / 20;
$defenceMultiplier -= log(max(1, $killnum / 5), 2) / 50;
return [$attackMultiplier, $defenceMultiplier];
}
}
+6 -6
View File
@@ -10,7 +10,7 @@ class che_무쌍 extends \sammo\BaseSpecial{
protected $id = 61;
protected $name = '무쌍';
protected $info = '[전투] 대미지 +10%, 피해 -5%, 공격 시 필살 확률 +10%p, <br>승리 수만큼 대미지 0.20%씩 추가 상승(최대50%)<br>승리 수만큼 피해 0.05%씩 감소(최대20%)';
protected $info = '[전투] 대미지 +5%, 피해 -2%, 공격 시 필살 확률 +10%p, <br>승리 수의 로그 비례로 대미지 상승(10회 ⇒ +5%, 40회 ⇒ +15%)<br>승리 수의 로그 비례로 피해 감소(10회 ⇒ -2%, 40회 ⇒ -6%)';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1;
@@ -19,18 +19,18 @@ class che_무쌍 extends \sammo\BaseSpecial{
];
public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'warCriticalRatio' && $aux['isAttacker']??false){
if($statName === 'warCriticalRatio' && ($aux['isAttacker']??false)){
return $value += 0.1;
}
return $value;
}
public function getWarPowerMultiplier(WarUnit $unit):array{
$attackMultiplier = 1.1;
$defenceMultiplier = 0.95;
$attackMultiplier = 1.05;
$defenceMultiplier = 0.98;
$killnum = $unit->getGeneral()->getRankVar('killnum');
$attackMultiplier += Util::valueFit($killnum * 0.01 * 0.2, null, 0.5);
$defenceMultiplier -= Util::valueFit($killnum * 0.01 * 0.05, null, 0.2);
$attackMultiplier += log(max(1, $killnum / 5), 2) / 20;
$defenceMultiplier -= log(max(1, $killnum / 5), 2) / 50;
return [$attackMultiplier, $defenceMultiplier];
}
}
+2
View File
@@ -137,6 +137,7 @@ class AutorunNationPolicy {
public $reqNPCDevelRice = 500;
public $minimumResourceActionAmount = 1000;
public $maximumResourceActionAmount = 10000;
public $minNPCWarLeadership = 40;
public $minWarCrew = 1500;
@@ -164,6 +165,7 @@ class AutorunNationPolicy {
'reqNPCDevelRice'=>500,
'minimumResourceActionAmount'=>1000,
'maximumResourceActionAmount'=>10000,
'minNPCWarLeadership'=>40,
'minWarCrew'=>1500,
+5 -5
View File
@@ -3,9 +3,9 @@ namespace sammo;
class CityHelper{
//Just Helper
private static $list = null;
private static $listInv = null;
private static $listByNation = null;
private static ?array $list = null;
private static ?array $listInv = null;
private static ?array $listByNation = null;
private function __construct(){
@@ -25,7 +25,7 @@ class CityHelper{
'@phan-var array<int,mixed>|null $list';
'@phan-var array<string,mixed>|null $listInv';
'@phan-var array<int,mixed>|null $listByNation';
foreach (DB::db()->query('SELECT `city` as `id`, `name`, `level`, `nation` from city') as $city) {
$id = $city['id'];
$name = $city['name'];
@@ -83,5 +83,5 @@ class CityHelper{
return $city;
}
}
+1
View File
@@ -162,6 +162,7 @@ class che_거병 extends Command\GeneralCommand{
$exp = 100;
$ded = 100;
$general->increaseInheritancePoint('active_action', 1);
$general->addExperience($exp);
$general->addDedication($ded);
$general->setVar('belong', 1);
+1
View File
@@ -188,6 +188,7 @@ class che_건국 extends Command\GeneralCommand
refreshNationStaticInfo();
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
tryUniqueItemLottery($general, '건국');
@@ -100,7 +100,7 @@ class che_등용수락 extends Command\GeneralCommand{
public function getCost():array{
return [0, 0];
}
public function getPreReqTurn():int{
return 0;
}
@@ -135,7 +135,7 @@ class che_등용수락 extends Command\GeneralCommand{
}
$isTroopLeader = ($generalID == $general->getVar('troop'));
$destGeneral->addExperience(100);
$destGeneral->addDedication(100);
@@ -188,13 +188,13 @@ class che_등용수락 extends Command\GeneralCommand{
$destLogger->pushGeneralHistoryLog("<Y>{$generalName}</> 등용에 성공");
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} <D><b>{$destNationName}</b></>{$josaRo} <S>망명</>하였습니다.");
if($nationID != 0){
$db->update('nation', $setOriginalNationValues, 'nation=%i', $nationID);
}
$db->update('nation', $setScoutNationValues, 'nation=%i', $destNationID);
$general->increaseInheritancePoint('active_action', 1);
$general->setVar('permission', 'normal');
$general->setVar('belong', 1);
$general->setVar('officer_level', 1);
+20 -26
View File
@@ -181,51 +181,44 @@ class che_랜덤임관 extends Command\GeneralCommand
$generalsCnt = [];
if ($notIn) {
$rawGeneralsCnt = $db->query(
'SELECT general.nation as nation, nation.gennum, nation.name, npc, count(*) as cnt FROM general JOIN nation ON general.nation = nation.nation WHERE npc != 9 AND nation.gennum < %i AND nation.scout=0 AND nation.nation NOT IN %li GROUP BY general.nation, general.npc',
"SELECT g.`nation`, n.`gennum`, n.name, SUM((ra.value + 1000)/(rb.value + 1000)*(CASE WHEN g.`npc` < 2 THEN 1.5 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'
LEFT JOIN `nation` AS n ON g.`nation` = n.`nation`
WHERE g.`npc` IN (0, 1, 2, 3, 6) AND g.nation != 0 AND n.scout=0 AND n.gennum < %i AND n.nation NOT IN %li
GROUP BY g.`nation`",
$genLimit,
$notIn
);
} else {
$rawGeneralsCnt = $db->query(
'SELECT general.nation as nation, nation.gennum, nation.name, npc, count(*) as cnt FROM general JOIN nation ON general.nation = nation.nation WHERE npc != 9 AND nation.gennum < %i AND nation.scout=0 GROUP BY general.nation, general.npc',
"SELECT g.`nation`, n.`gennum`, n.name, SUM((ra.value + 100)/(rb.value + 100)*(CASE WHEN g.`npc` < 2 THEN 1.5 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'
LEFT JOIN `nation` AS n ON g.`nation` = n.`nation`
WHERE g.`npc` IN (0, 1, 2, 3, 6) AND g.nation != 0 AND n.scout=0 AND n.gennum < %i
GROUP BY g.`nation`",
$genLimit
);
}
foreach ($rawGeneralsCnt as $nation) {
$nationID = $nation['nation'];
if (!\key_exists($nationID, $generalsCnt)) {
$generalsCnt[$nationID] = [
'nation' => $nationID,
'gennum' => $nation['gennum'],
'name' => $nation['name'],
'cnt' => 0,
];
$generalsCnt[$nationID]['cnt'] = 0;
}
if ($nation['npc'] <= 2) {
$calcCnt = $nation['cnt'];
} else {
$calcCnt = $nation['cnt'] / 2;
}
$calcCnt = $nation['warpower'] + $nation['develpower'];
if ($general->getNPCType() < 2 && Util::starts_with($nation['name'], 'ⓤ')) {
$calcCnt *= 100;
}
$generalsCnt[$nationID]['cnt'] += $calcCnt;
$generalsCnt[] = [$nation, (1 / $calcCnt)**3];
}
$randVals = [];
foreach ($generalsCnt as $testNation) {
$randVals[] = [$testNation, 1 / $testNation['cnt']];
}
if ($randVals) {
$destNation = Util::choiceRandomUsingWeightPair($randVals);
if ($generalsCnt) {
$destNation = Util::choiceRandomUsingWeightPair($generalsCnt);
}
}
@@ -292,6 +285,7 @@ class che_랜덤임관 extends Command\GeneralCommand
$general->setAuxVar('joinedNations', $joinedNations);
}
$general->increaseInheritancePoint('active_action', 1);
$general->addExperience($exp);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
@@ -96,6 +96,7 @@ class che_모반시도 extends Command\GeneralCommand{
$lordLogger->pushGeneralHistoryLog("<D><b>{$generalName}</b></>의 모반으로 인해 <D><b>{$nationName}</b></>의 군주자리를 박탈당함");
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->increaseInheritancePoint('active_action', 1);
$general->checkStatChange();
tryRollbackInheritUniqueItem($general);
$general->applyDB($db);
+1 -1
View File
@@ -121,7 +121,7 @@ class che_방랑 extends Command\GeneralCommand{
], 'me=%i OR you=%i', $nationID, $nationID);
refreshNationStaticInfo();
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
tryRollbackInheritUniqueItem($general);
$general->applyDB($db);
+1
View File
@@ -135,6 +135,7 @@ class che_선양 extends Command\GeneralCommand
$logger->pushGeneralHistoryLog("<D><b>{$nationName}</b></>의 군주자리를 <Y>{$destGeneralName}</>에게 선양");
$destLogger->pushGeneralHistoryLog("<D><b>{$nationName}</b></>의 군주자리를 물려 받음");
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
tryRollbackInheritUniqueItem($general);
@@ -160,7 +160,7 @@ class che_인재탐색 extends Command\GeneralCommand
$exp = 100 * (sqrt(1 / $foundProp) + 1);
$ded = 150 * (sqrt(1 / $foundProp) + 1);
$scoutType = "발견";
$age = Util::randRangeInt(20, 25);
@@ -172,7 +172,7 @@ class che_인재탐색 extends Command\GeneralCommand
avg(dex1+dex2+dex3+dex4) as dex_t, avg(age) as age, avg(dex5) as dex5
from general where npc < 4'
);
$pickTypeList = ['무' => 6, '지' => 6, '무지' => 3];
$pickedNPC = pickGeneralFromPool($db, 0, 1)[0];
@@ -210,6 +210,7 @@ class che_인재탐색 extends Command\GeneralCommand
$exp = 200;
$ded = 300;
$general->increaseInheritancePoint('active_action', Util::valueFit(sqrt(1 / $foundProp), 1));
$general->increaseVarWithLimit('gold', -$reqGold, 0);
$general->increaseVarWithLimit('rice', -$reqRice, 0);
$general->addExperience($exp);
+10 -9
View File
@@ -3,7 +3,7 @@ namespace sammo\Command\General;
use \sammo\{
DB, Util, JosaUtil,
General,
General,
ActionLogger,
GameConst, GameUnitConst,
LastTurn,
@@ -46,7 +46,7 @@ class che_임관 extends Command\GeneralCommand{
$this->arg = [
'destNationID' => $destNationID
];
return true;
}
@@ -69,7 +69,7 @@ class che_임관 extends Command\GeneralCommand{
ConstraintHelper::BeNeutral(),
ConstraintHelper::AllowJoinAction()
];
}
public function getCommandDetailTitle():string{
@@ -99,7 +99,7 @@ class che_임관 extends Command\GeneralCommand{
public function getCost():array{
return [0, 0];
}
public function getPreReqTurn():int{
return 0;
}
@@ -150,7 +150,7 @@ class che_임관 extends Command\GeneralCommand{
$general->setVar('officer_level', 1);
$general->setVar('officer_city', 0);
$general->setVar('belong', 1);
if($this->destGeneralObj !== null){
$general->setVar('city', $this->destGeneralObj->getCityID());
}
@@ -171,6 +171,7 @@ class che_임관 extends Command\GeneralCommand{
$general->setAuxVar('joinedNations', $joinedNations);
}
$general->increaseInheritancePoint('active_action', 1);
$general->addExperience($exp);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
@@ -221,17 +222,17 @@ class che_임관 extends Command\GeneralCommand{
}
}
unset($nation);
ob_start();
ob_start();
?>
국가에 임관합니다.<br>
이미 임관/등용되었던 국가는 다시 임관할 수 없습니다.<br>
바로 군주의 위치로 이동합니다.<br>
임관할 국가를 목록에서 선택하세요.<br>
임관할 국가를 목록에서 선택하세요.<br>
<select class='formInput' name="destNationID" id="destNationID" size='1' style='color:white;background-color:black;'>
<?php foreach($nationList as $nation): ?>
<?php if(key_exists($nation['nation'], $hiddenItems)){ continue; } ?>
<option
value='<?=$nation['nation']?>'
<option
value='<?=$nation['nation']?>'
style='<?=$nation['availableJoin']?'':'background-color:red;'?>'
>【<?=$nation['name']?> 】</option>
<?php endforeach; ?>
@@ -89,7 +89,7 @@ class che_장비매매 extends Command\GeneralCommand{
else if($itemCode == $general->getVar($itemType)){
$this->fullConditionConstraints[] = ConstraintHelper::AlwaysFail('이미 가지고 있습니다.');
}
else if($itemType != 'item' && !buildItemClass($general->getVar($itemType))->isBuyable()){
else if(!buildItemClass($general->getVar($itemType))->isBuyable()){
$this->fullConditionConstraints[] = ConstraintHelper::AlwaysFail('이미 진귀한 것을 가지고 있습니다.');
}
}
@@ -3,7 +3,7 @@ namespace sammo\Command\General;
use \sammo\{
DB, Util, JosaUtil,
General,
General,
ActionLogger,
GameConst, GameUnitConst,
LastTurn,
@@ -73,7 +73,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
ConstraintHelper::BeNeutral(),
ConstraintHelper::AllowJoinAction()
];
}
public function getCommandDetailTitle():string{
@@ -105,7 +105,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
public function getCost():array{
return [0, 0];
}
public function getPreReqTurn():int{
return 0;
}
@@ -155,7 +155,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
$general->setVar('officer_level', 1);
$general->setVar('officer_city', 0);
$general->setVar('belong', 1);
if($this->destGeneralObj !== null){
$general->setVar('city', $this->destGeneralObj->getCityID());
}
@@ -176,6 +176,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
$general->setAuxVar('joinedNations', $joinedNations);
}
$general->increaseInheritancePoint('active_action', 1);
$general->addExperience($exp);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
@@ -229,12 +230,12 @@ class che_장수대상임관 extends Command\GeneralCommand{
}
}
unset($nation);
ob_start();
ob_start();
?>
장수를 따라 임관합니다.<br>
이미 임관/등용되었던 국가는 다시 임관할 수 없습니다.<br>
바로 군주의 위치로 이동합니다.<br>
임관할 국가를 목록에서 선택하세요.<br>
임관할 국가를 목록에서 선택하세요.<br>
<select class='formInput' name="destGeneralID" id="destGeneralID" size='1' style='color:white;background-color:black;'>
<?php foreach($generalList as $targetGeneral): ?>
<?php if(key_exists($targetGeneral['nation'], $hiddenItems)){ continue; } ?>
+1
View File
@@ -211,6 +211,7 @@ class che_첩보 extends Command\GeneralCommand
$ded = Util::randRangeInt(1, 70);
[$reqGold, $reqRice] = $this->getCost();
$general->increaseInheritancePoint('active_action', 0.5);//NOTE: 첩보만 예외!
$general->increaseVarWithLimit('gold', -$reqGold, 0);
$general->increaseVarWithLimit('rice', -$reqRice, 0);
$general->addExperience($exp);
+5 -1
View File
@@ -223,9 +223,13 @@ class che_출병 extends Command\GeneralCommand
$this->destCity['term'] = 3;
$general->addDex($general->getCrewTypeObj(), $general->getVar('crew') / 100);
if($general->getVar('crew') > 500 && $general->getVar('train') * $general->getVar('atmos') > 70 * 70){
//500명 이상, 모훈출, 모사출
$general->increaseInheritancePoint('active_action', 1);
}
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->applyDB($db);
processWar($general, $this->nation, $this->destCity);
+12 -10
View File
@@ -3,7 +3,7 @@ namespace sammo\Command\General;
use \sammo\{
DB, Util, JosaUtil,
General,
General,
ActionLogger,
GameConst, GameUnitConst,
Command
@@ -31,18 +31,20 @@ class che_탈취 extends che_화계{
$commandName = $this->getName();
$db = DB::db();
// 탈취 최대 800 * 8 * sqrt(1 + (year - startyear) / 5) / 2
$yearCoef = sqrt(1 + ($this->env['year'] - $this->env['startyear']) / 5) / 2;
$gold = Util::randRangeInt(GameConst::$sabotageDamageMin, GameConst::$sabotageDamageMax) * $destCity['level'] * $yearCoef;
$rice = Util::randRangeInt(GameConst::$sabotageDamageMin, GameConst::$sabotageDamageMax) * $destCity['level'] * $yearCoef;
// 탈취 최대 800 * 8 * sqrt(1 + (year - startyear) / 4) / 2
$yearCoef = sqrt(1 + ($this->env['year'] - $this->env['startyear']) / 4) / 2;
$commRatio = $destCity['comm'] / $destCity['comm_max'];
$agriRatio = $destCity['agri'] / $destCity['agri_max'];
$gold = Util::randRangeInt(GameConst::$sabotageDamageMin, GameConst::$sabotageDamageMax) * $destCity['level'] * $yearCoef * (0.25 + $commRatio / 4);
$rice = Util::randRangeInt(GameConst::$sabotageDamageMin, GameConst::$sabotageDamageMax) * $destCity['level'] * $yearCoef * (0.25 + $agriRatio / 4);
if($destCity['supply']){
[$destNationGold, $destNationRice] = $db->queryFirstList('SELECT gold,rice FROM nation WHERE nation=%i', $destNationID);
$destNationGold -= $gold;
$destNationRice -= $rice;
if($destNationGold < GameConst::$minNationalGold) {
if($destNationGold < GameConst::$minNationalGold) {
$gold += $destNationGold - GameConst::$minNationalGold;
$destNationGold = GameConst::$minNationalGold;
}
@@ -50,7 +52,7 @@ class che_탈취 extends che_화계{
$rice += $destNationRice - GameConst::$minNationalRice;
$destNationRice = GameConst::$minNationalRice;
}
$db->update('nation', [
'gold'=>$destNationGold,
'rice'=>$destNationRice
@@ -96,5 +98,5 @@ class che_탈취 extends che_화계{
$logger->pushGeneralActionLog("금<C>{$goldText}</> 쌀<C>{$riceText}</>을 획득했습니다.", ActionLogger::PLAIN);
}
}
+1
View File
@@ -101,6 +101,7 @@ class che_하야 extends Command\GeneralCommand{
$general->setVar('officer_city', 0);
$general->setVar('belong', 0);
$general->setVar('makelimit', 12);
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
+8 -7
View File
@@ -46,7 +46,7 @@ class che_감축 extends Command\NationCommand{
$this->setCity();
$this->setNation(['gold', 'rice', 'capset', 'capital']);
if(!$this->nation['capital']){
$this->fullConditionConstraints=[
ConstraintHelper::AlwaysFail('방랑상태에서는 불가능합니다.')
@@ -55,7 +55,7 @@ class che_감축 extends Command\NationCommand{
}
$this->setDestCity($this->nation['capital']);
[$reqGold, $reqRice] = $this->getCost();
$origCityLevel = CityConst::byID($this->nation['capital'])->level;
@@ -78,10 +78,10 @@ class che_감축 extends Command\NationCommand{
return "{$name}/{$reqTurn}턴(금 {$reqGold}, 쌀 {$reqRice} 회수)";
}
public function getCost():array{
$amount = $this->env['develcost'] * GameConst::$expandCityCostCoef + GameConst::$expandCityDefaultCost / 2;
return [$amount, $amount];
}
@@ -157,10 +157,10 @@ class che_감축 extends Command\NationCommand{
$nationID = $general->getNationID();
$nationName = $this->nation['name'];
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
@@ -192,13 +192,14 @@ class che_감축 extends Command\NationCommand{
'gold' => $db->sqleval('gold + %i', $reqGold),
'rice' => $db->sqleval('rice + %i', $reqRice),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaUl} 감축했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaUl} <M>감축</>");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>감축</>");
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>감축</>하였습니다.");
$logger->pushGlobalHistoryLog("<M><b>【감축】</b></><D><b>{$nationName}</b></>{$josaYiNation} <G><b>{$destCityName}</b></>{$josaUl} <M>감축</>하였습니다.");
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
@@ -146,6 +146,7 @@ class che_국기변경 extends Command\NationCommand
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} <span style='color:{$color};'><b>국기</b></span>를 변경하였습니다");
$logger->pushGlobalHistoryLog("<S><b>【국기변경】</b></><D><b>{$nationName}</b></>{$josaYiNation} <span style='color:{$color};'><b>국기</b></span>를 변경하였습니다.");
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
@@ -152,6 +152,7 @@ class che_국호변경 extends Command\NationCommand
$logger->pushGlobalActionLog("<Y>{$generalName}</>{$josaYi} 국호를 <D><b>{$newNationName}</b></>{$josaRo} 변경합니다.");
$logger->pushGlobalHistoryLog("<S><b>【국호변경】</b></><D><b>{$nationName}</b></>{$josaYiNation} 국호를 <D><b>{$newNationName}</b></>{$josaRo} 변경합니다.");
$general->increaseInheritancePoint('active_action', 1);
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
$general->applyDB($db);
return true;
@@ -218,7 +218,7 @@ class che_물자원조 extends Command\NationCommand{
}
$josaRoSrc = JosaUtil::pick($nationName, '로');
$destNationLogger = new ActionLogger(0, $destChiefID, $year, $month);
$destNationLogger = new ActionLogger(0, $destNationID, $year, $month);
$destNationLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaRoSrc}부터 금<C>{$goldAmountText}</> 쌀<C>{$riceAmountText}</>을 지원 받음");
$destNationStor = KVStorage::getStorage(DB::db(), $destNationID, 'nation_env');
+8 -7
View File
@@ -51,9 +51,9 @@ class che_증축 extends Command\NationCommand{
];
return;
}
$this->setDestCity($this->nation['capital']);
[$reqGold, $reqRice] = $this->getCost();
$this->fullConditionConstraints=[
@@ -76,10 +76,10 @@ class che_증축 extends Command\NationCommand{
return "{$name}/{$reqTurn}턴(금 {$reqGold}, 쌀 {$reqRice})";
}
public function getCost():array{
$amount = $this->env['develcost'] * GameConst::$expandCityCostCoef + GameConst::$expandCityDefaultCost;
return [$amount, $amount];
}
@@ -155,13 +155,14 @@ class che_증축 extends Command\NationCommand{
$nationID = $general->getNationID();
$nationName = $this->nation['name'];
$logger = $general->getLogger();
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
$general->increaseInheritancePoint('active_action', 1);
$josaUl = JosaUtil::pick($destCityName, '을');
$josaYi = JosaUtil::pick($generalName, '이');
@@ -183,7 +184,7 @@ class che_증축 extends Command\NationCommand{
'gold' => $db->sqleval('gold - %i', $reqGold),
'rice' => $db->sqleval('rice - %i', $reqRice),
], 'nation=%i', $nationID);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaUl} 증축했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaUl} <M>증축</>");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>증축</>");
+1
View File
@@ -218,6 +218,7 @@ class che_천도 extends Command\NationCommand
'capset' => $db->sqleval('capset + 1'),
], 'nation=%i', $nationID);
$general->increaseInheritancePoint('active_action', 1);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaRo} 천도했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaRo} <M>천도</>명령");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaRo} <M>천도</> 명령");
@@ -184,6 +184,7 @@ class che_초토화 extends Command\NationCommand{
\sammo\refreshNationStaticInfo();
\sammo\SetNationFront($nationID);
$general->increaseInheritancePoint('active_action', 1);
$logger->pushGeneralActionLog("<G><b>{$destCityName}</b></>{$josaUl} 초토화했습니다. <1>$date</>");
$logger->pushGeneralHistoryLog("<G><b>{$destCityName}</b></>{$josaUl} <M>초토화</> 명령");
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <G><b>{$destCityName}</b></>{$josaUl} <M>초토화</> 명령");
@@ -33,6 +33,9 @@ class che_피장파장 extends Command\NationCommand{
if(!key_exists('destNationID', $this->arg)){
return false;
}
if(!key_exists('commandType', $this->arg)){
return false;
}
$destNationID = $this->arg['destNationID'];
$commandType = $this->arg['commandType'];
@@ -129,6 +132,7 @@ class che_피장파장 extends Command\NationCommand{
$nextTerm = Util::round(sqrt($genCount*2)*10);
$nextTerm = $this->generalObj->onCalcStrategic($this->getName(), 'delay', $nextTerm);
$nextTerm = Util::valueFit($nextTerm, Util::round(static::$delayCnt * 1.2));
return $nextTerm;
}
+16
View File
@@ -42,6 +42,22 @@ class DummyGeneral extends General{
return $value;
}
public function getInheritancePoint(string $key, &$aux = null, bool $forceCalc = false){
return 0;
}
public function setInheritancePoint(string $key, $value, $aux = null){
return;
}
public function increaseInheritancePoint(string $key, $value, $aux = null){
return;
}
public function mergeTotalInheritancePoint(){
return;
}
function applyDB($db):bool{
if($this->logger){
$this->initLogger(1, 1);
+18 -6
View File
@@ -9,9 +9,11 @@ use function sammo\pickGeneralFromPool;
//기존 event_3.php
class CreateManyNPC extends \sammo\Event\Action{
protected $npcCount;
protected $fillCnt;
protected $avgGen;
public function __construct($npcCount = 10){
public function __construct($npcCount = 10, $fillCnt = 0){
$this->npcCount = $npcCount;
$this->fillCnt = $fillCnt;
}
protected function generateNPC($env, int $cnt){
@@ -41,13 +43,23 @@ class CreateManyNPC extends \sammo\Event\Action{
}
return $result;
}
public function run(array $env){
if($this->npcCount <= 0){
return [__CLASS__, []];
if($this->npcCount <= 0 && $this->fillCnt <= 0){
return [__CLASS__, []];
}
$result = $this->generateNPC($env, $this->npcCount);
$moreGenCnt = 0;
if($this->fillCnt){
$db = DB::db();
$nations = $db->queryFirstColumn('SELECT nation FROM general WHERE npc < 2 AND officer_level = 12');
$regGens = $db->queryFirstField('SELECT count(*) FROM general WHERE nation IN %li AND npc < 4', $nations);
$moreGenCnt = count($nations) * $this->fillCnt - $regGens;
}
$result = $this->generateNPC($env, $this->npcCount + $moreGenCnt);
$logger = new \sammo\ActionLogger(0, 0, $env['year'], $env['month']);
$genCnt = count($result);
@@ -62,6 +74,6 @@ class CreateManyNPC extends \sammo\Event\Action{
$logger->pushGlobalHistoryLog("장수 <C>{$genCnt}</>명이 <S>등장</>했습니다.", \sammo\ActionLogger::NOTICE_YEAR_MONTH);
$logger->flush();
return [__CLASS__, $result];
return [__CLASS__, $result];
}
}
+10 -3
View File
@@ -195,14 +195,21 @@ class GameConstBase
'che_은둔', 'None'
];
public static $inheritBornSpecialPoint = 12000;
public static $maxUniqueItemLimit = [
[-1, 1],
[3, 2],
[10, 3],
[20, 4]
];
public static $inheritBornSpecialPoint = 6000;
public static $inheritBornTurntimePoint = 3000;
public static $inheritBornCityPoint = 1000;
public static $inheritBornStatPoint = 1000;
public static $inheritItemUniqueMinPoint = 5000;
public static $inheritItemRandomPoint = 3000;
public static $inheritBuffPoints = [0, 250, 750, 1500, 2500, 3750];
public static $inheritSpecificSpecialPoint = 5000;
public static $inheritBuffPoints = [0, 200, 600, 1200, 2000, 3000];
public static $inheritSpecificSpecialPoint = 4000;
public static $inheritResetAttrPointBase = [1000, 1000, 2000, 3000];//필요하면 늘려서 쓰기
public static $allItems = [
+2 -1
View File
@@ -58,7 +58,8 @@ class General implements iAction
'lived_month' => [true, 1, '생존'],
'max_belong' => [false, 10, '최대 임관년 수'],
'max_domestic_critical' => [true, 1, '최대 연속 내정 성공'],
'snipe_combat' => [true, 10, '병종 상성 우위 횟수'],
'active_action' => [true, 3, '능동 행동 수'],
//'snipe_combat' => [true, 10, '병종 상성 우위 횟수'],
'combat' => [['rank', 'warnum'], 5, '전투 횟수'],
'sabotage' => [['rank', 'firenum'], 20, '계략 성공 횟수'],
'unifier' => [true, 1, '천통 기여'],
+862 -822
View File
File diff suppressed because it is too large Load Diff
@@ -15,7 +15,7 @@ class che_도시치료 extends BaseGeneralTrigger{
/** @var \sammo\General $general */
$general = $this->object;
$logger = $general->getLogger();
if($general->getVar('injury') > 0){
$general->updateVar('injury', 0);
$general->activateSkill('pre.부상경감', 'pre.치료');
@@ -25,8 +25,8 @@ class che_도시치료 extends BaseGeneralTrigger{
$db = DB::db();
$patients = $db->queryAllLists(
'SELECT no,name,nation FROM general WHERE city=%i AND injury > 10 AND no != %i',
$general->getCityID(),
'SELECT no,name,nation FROM general WHERE city=%i AND injury > 10 AND no != %i',
$general->getCityID(),
$general->getID()
);
@@ -56,7 +56,7 @@ class che_도시치료 extends BaseGeneralTrigger{
return $env;
}
if(count($cureList) == 1){
$josaUl = JosaUtil::pick($curedPatientName, "");
$logger->pushGeneralActionLog("<C>의술</>을 펼쳐 도시의 장수 <Y>{$curedPatientName}</>{$josaUl} 치료합니다!", ActionLogger::PLAIN);
+5 -5
View File
@@ -114,7 +114,7 @@ class ResetHelper{
break;
}
}
}
if($mysqli_obj->multi_query(file_get_contents($servRoot.'/sql/schema.sql'))){
@@ -128,7 +128,7 @@ class ResetHelper{
}
}
opcache_reset();
//opcache_reset();
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->resetValues();
@@ -180,7 +180,7 @@ class ResetHelper{
$serverID = $clearResult['serverID'];
$seasonIdx = $clearResult['seasonIdx'];
$scenarioObj = new Scenario($scenario, true);
$scenarioObj->buildConf();
$scenarioObj->initFull();
@@ -316,7 +316,7 @@ class ResetHelper{
}
$db->insert('general_turn', $turnRows);
$rank_data = [];
foreach(array_keys(General::RANK_COLUMN) as $rankColumn){
$rank_data[] = [
@@ -345,7 +345,7 @@ class ResetHelper{
'scenario'=>$scenario,
'scenario_name'=>$scenarioObj->getTitle(),
'env'=>Json::encode($env)
]);
]);
$scenarioObj->build($env);
+1 -1
View File
@@ -459,7 +459,7 @@ class GeneralBuilder{
}
}
if(!$this->dex1 && in_array('dex_t', $avgGen)){
if(!$this->dex1 && key_exists('dex_t', $avgGen)){
$dexTotal = $avgGen['dex_t'];
if ($pickType == '무') {
$dexVal = Util::choiceRandom([
+8 -8
View File
@@ -86,7 +86,7 @@ class SpecialityHelper{
if($leadership > GameConst::$chiefStatMin){
$myCond |= self::STAT_LEADERSHIP;
}
if($strength >= $intel * 0.95 && $strength > GameConst::$chiefStatMin){
$myCond |= self::STAT_STRENGTH;
}
@@ -101,7 +101,7 @@ class SpecialityHelper{
}
if($strength < GameConst::$chiefStatMin){
$myCond |= self::STAT_NOT_STRENGTH;
}
}
if($intel < GameConst::$chiefStatMin){
$myCond |= self::STAT_NOT_INTEL;
}
@@ -118,7 +118,7 @@ class SpecialityHelper{
$myCond |= self::STAT_INTEL;
}
}
return $myCond;
}
@@ -179,7 +179,7 @@ class SpecialityHelper{
$specialObj = buildGeneralSpecialWarClass(GameConst::$defaultSpecialWar);
$result[GameConst::$defaultSpecialWar] = $specialObj;
}
foreach(GameConst::$availableSpecialWar as $specialID){
$specialObj = buildGeneralSpecialWarClass($specialID);
$result[$specialID] = $specialObj;
@@ -220,7 +220,7 @@ class SpecialityHelper{
if(in_array($specialID, $prevSpecials)){
continue;
}
if($weightType === static::WEIGHT_PERCENT){
$pAbs[$specialID] = $weight;
@@ -229,7 +229,7 @@ class SpecialityHelper{
$pRel[$specialID] = $weight;
}
}
if($pAbs){
if($pRel){
$pAbs[0] = max(0, 100 - array_sum($pAbs));
@@ -280,7 +280,7 @@ class SpecialityHelper{
if(in_array($specialID, $prevSpecials)){
continue;
}
if($cond & self::REQ_DEXTERITY){
$reqDex[$specialID] = $weight;
@@ -296,7 +296,7 @@ class SpecialityHelper{
if($reqDex){
return Util::choiceRandomUsingWeight($reqDex);
}
if($pAbs){
if($pRel){
$pAbs[0] = max(0, 100 - array_sum($pAbs));
+21 -1
View File
@@ -238,6 +238,7 @@ class TurnExecutionHelper
$turnObj = new static($general);
$env = $gameStor->getAll(true);
[$startYear, $year, $month, $turnterm] = $gameStor->getValuesAsArray(['startyear', 'year', 'month', 'turnterm']);
$hasNationTurn = false;
if ($general->getVar('nation') != 0 && $general->getVar('officer_level') >= 5) {
@@ -263,13 +264,22 @@ class TurnExecutionHelper
$turnObj->preprocessCommand($env);
if ($general->getNPCType() >= 2 || ($autorun_user['limit_minutes'] ?? false)) {
if ($general->getNPCType() >= 2){
$ai = new GeneralAI($turnObj->getGeneral());
} else {
$limitYearMonth = $general->getAuxVar('autorun_limit')??Util::joinYearMonth($year-2, $month);
if(Util::joinYearMonth($year, $month) < $limitYearMonth){
$ai = new GeneralAI($turnObj->getGeneral());
}
}
$hasReservedTurn = false;
if (!$turnObj->processBlocked()) {
if ($hasNationTurn) {
if (!($nationCommandObj instanceof Command\Nation\휴식)) {
$hasReservedTurn = true;
}
if ($ai && ($general->getAuxVar('use_auto_nation_turn') ?? 1)) {
$nationCommandObj = $ai->chooseNationTurn($nationCommandObj);
$cityName = CityConst::byID($general->getCityID())->name;
@@ -283,6 +293,9 @@ class TurnExecutionHelper
}
$generalCommandObj = $general->getReservedTurn(0, $env);
if (!($generalCommandObj instanceof Command\General\휴식)) {
$hasReservedTurn = true;
}
if ($ai) {
$newGeneralCommandObj = $ai->chooseGeneralTurn($generalCommandObj); // npc AI 처리
@@ -302,6 +315,13 @@ class TurnExecutionHelper
$currentTurn = $general->getTurnTime();
$general->increaseVarWithLimit('myset', 3, null, 9);
if(($autorun_user['limit_minutes']??false) && $general->getNPCType() < 2 && $hasReservedTurn){
$autorun_limit = Util::joinYearMonth($year, $month);
$autorun_limit += intdiv($autorun_user['limit_minutes'], $turnterm);
$general->setAuxVar('autorun_limit', $autorun_limit);
}
$turnObj->updateTurnTime();
$turnObj->applyDB();
}
+11 -2
View File
@@ -56,6 +56,9 @@ class WarUnitGeneral extends WarUnit
$semiTurn = $general->getTurnTime();
} else if ($oppose !== null) {
$semiTurn = $oppose->getGeneral()->getTurnTime();
} else {
LogText("WarUnitGeneral::setOppose", "defender인데 oppose가 null {$general->getID()}, {$general->getTurnTime()}");
$semiTurn = $general->getTurnTime();
}
$phase = $this->getRealPhase();
$semiTurn = substr($semiTurn, 0, strlen($semiTurn) - 2);
@@ -154,7 +157,13 @@ class WarUnitGeneral extends WarUnit
$general->increaseRankVar('occupied', 1);
}
$general->multiplyVarWithLimit('atmos', 1.1, null, GameConst::$maxAtmosByWar);
if($this->isAttacker()){
$general->multiplyVarWithLimit('atmos', 1.1, null, GameConst::$maxAtmosByWar);
}
else{
$general->multiplyVarWithLimit('atmos', 1.05, null, GameConst::$maxAtmosByWar);
}
$this->addStatExp(1);
}
@@ -205,7 +214,7 @@ class WarUnitGeneral extends WarUnit
if ($this->isAttacker) {
if ($officerLevel == 12) {
$warPower *= 1.10;
} else if ($officerLevel == 11 | $officerLevel == 10 || $officerLevel == 8 || $officerLevel == 6) {
} else if ($officerLevel == 11 || $officerLevel == 10 || $officerLevel == 8 || $officerLevel == 6) {
$warPower *= 1.05;
}
} else {
@@ -22,7 +22,7 @@ class che_전투치료발동 extends BaseWarUnitTrigger{
}
$selfEnv['치료발동'] = true;
$oppose->getLogger()->pushGeneralBattleDetailLog("상대가 <C>치료</>했다!", ActionLogger::PLAIN);
$oppose->getLogger()->pushGeneralBattleDetailLog("상대가 <R>치료</>했다!", ActionLogger::PLAIN);
$self->getLogger()->pushGeneralBattleDetailLog("<C>치료</>했다!", ActionLogger::PLAIN);
$oppose->multiplyWarPowerMultiply(0.5);
+1 -1
View File
@@ -9,7 +9,7 @@
"events":[
[
["or", ["Date", "==", null, 12], ["Date", "==", null, 6]],
["CreateManyNPC", 30],
["CreateManyNPC", 10, 10],
["DeleteEvent"]
],
[
+1 -1
View File
@@ -12,7 +12,7 @@
"events":[
[
["or", ["Date", "==", null, 12], ["Date", "==", null, 6]],
["CreateManyNPC", 30],
["CreateManyNPC", 10, 10],
["DeleteEvent"]
],
[
+1 -1
View File
@@ -16,7 +16,7 @@
"events":[
[
["or", ["Date", "==", null, 12], ["Date", "==", null, 6]],
["CreateManyNPC", 30],
["CreateManyNPC", 10, 10],
["DeleteEvent"]
],
[
+3 -3
View File
@@ -17,7 +17,7 @@
"iconPath": "쿠키런킹덤",
"fiction": 1,
"nation":[
],
"map":{
"mapName":"miniche",
@@ -100,7 +100,7 @@
"events":[
[
["or", ["Date", "==", null, 12], ["Date", "==", null, 6]],
["CreateManyNPC", 30],
["CreateManyNPC", 10, 10],
["DeleteEvent"]
],
[
@@ -109,5 +109,5 @@
["DeleteEvent"]
]
]
}
+13 -13
View File
@@ -9,26 +9,26 @@
"const": {
"joinRuinedNPCProp":0,
"availableSpecialWar":[
"che_귀병", "che_신산", "che_환술", "che_집중", "che_신중", "che_반계",
"che_귀병", "che_신산", "che_환술", "che_집중", "che_신중", "che_반계",
"che_보병", "che_궁병", "che_기병", "che_공성",
"che_돌격", "che_무쌍", "che_위압",
"che_돌격", "che_무쌍", "che_위압",
"che_저격", "che_필살", "che_징병", "che_의술", "che_격노", "che_척사"
],
"allItems":{
"horse":{
"che_명마_01_노기":0, "che_명마_02_조랑":0, "che_명마_03_노새":0,
"che_명마_04_나귀":0, "che_명마_05_갈색마":0, "che_명마_06_흑색마":0,
"che_명마_07_백마":2, "che_명마_07_기주마":2,
"che_명마_04_나귀":0, "che_명마_05_갈색마":0, "che_명마_06_흑색마":0,
"che_명마_07_백마":2, "che_명마_07_기주마":2,
"che_명마_08_양주마":2, "che_명마_09_과하마":2,
"che_명마_10_대완마":2, "che_명마_11_서량마":2,
"che_명마_10_대완마":2, "che_명마_11_서량마":2,
"che_명마_12_사륜거":2, "che_명마_13_절영":1, "che_명마_13_적로":1,
"che_명마_14_적란마":1, "che_명마_14_조황비전":1, "che_명마_15_한혈마":1, "che_명마_15_적토마":1
},
"weapon":{
"che_무기_01_단도":0, "che_무기_02_단궁":0, "che_무기_03_단극":0,
"che_무기_04_목검":0, "che_무기_05_죽창":0, "che_무기_06_소부":0,
"che_무기_07_동추":1, "che_무기_07_철편":1, "che_무기_07_철쇄":1, "che_무기_07_맥궁":1,
"che_무기_08_유성추":1, "che_무기_08_철질여골":1, "che_무기_09_쌍철극":1, "che_무기_09_동호비궁":1,
"che_무기_10_삼첨도":1, "che_무기_10_대부":1, "che_무기_11_고정도":1, "che_무기_11_이광궁":1,
@@ -37,18 +37,18 @@
},
"book":{
"che_서적_01_효경전":0, "che_서적_02_회남자":0, "che_서적_03_변도론":0,
"che_서적_04_건상역주":0, "che_서적_05_여씨춘추":0, "che_서적_06_사민월령":0,
"che_서적_04_건상역주":0, "che_서적_05_여씨춘추":0, "che_서적_06_사민월령":0,
"che_서적_07_위료자":1, "che_서적_07_사마법":1, "che_서적_07_한서":1, "che_서적_07_논어":1,
"che_서적_08_전론":1, "che_서적_08_사기":1, "che_서적_09_장자":1, "che_서적_09_역경":1,
"che_서적_10_시경":1, "che_서적_10_구국론":1, "che_서적_11_상군서":1, "che_서적_11_춘추전":1,
"che_서적_12_산해경":1, "che_서적_12_맹덕신서":1, "che_서적_13_관자":1, "che_서적_13_병법24편":1,
"che_서적_10_시경":1, "che_서적_10_구국론":1, "che_서적_11_상군서":1, "che_서적_11_춘추전":1,
"che_서적_12_산해경":1, "che_서적_12_맹덕신서":1, "che_서적_13_관자":1, "che_서적_13_병법24편":1,
"che_서적_14_한비자":1, "che_서적_14_오자병법":1, "che_서적_15_노자":1, "che_서적_15_손자병법":1
},
"item":{
"che_치료_환약":0, "che_저격_수극":0, "che_사기_탁주":0,
"che_훈련_청주":0, "che_계략_이추":0, "che_계략_향낭":0,
"event_전투특기_격노":0, "event_전투특기_공성":0, "event_전투특기_궁병":0,
"event_전투특기_귀병":0, "event_전투특기_기병":0, "event_전투특기_돌격":0, "event_전투특기_무쌍":0,
"event_전투특기_반계":0, "event_전투특기_보병":0, "event_전투특기_신산":0, "event_전투특기_신중":0,
@@ -60,7 +60,7 @@
"events":[
[
["Date", "==", null, 12],
["CreateManyNPC", 30],
["CreateManyNPC", 10, 10],
["DeleteEvent"]
],
[
+1 -1
View File
@@ -12,7 +12,7 @@
"events": [
[
["Date", "==", null, 12],
["CreateManyNPC", 100],
["CreateManyNPC", 100, 0],
["DeleteEvent"]
],
[
+9 -9
View File
@@ -1,13 +1,13 @@
<div class="buttonPlate bg1">
<div>
<a href="a_status.php" target="_blank"><button type="button" class="toolbarButton">세력도</button></a>
<a href="a_kingdomList.php" target="_blank"><button type="button" class="toolbarButton">세력일람</button></a>
<a href="a_genList.php" target="_blank"><button type="button" class="toolbarButton">장수일람</button></a>
<a href="a_bestGeneral.php" target="_blank"><button type="button" class="toolbarButton">명장일람</button></a>
<a href="a_history.php" target="_blank"><button type="button" class="toolbarButton">연감</button></a>
<a href="a_hallOfFame.php" target="_blank"><button type="button" class="toolbarButton">명예의전당</button></a>
<a href="a_emperior.php" target="_blank"><button type="button" class="toolbarButton">왕조일람</button></a>
<a href="a_traffic.php" target="_blank"><button type="button" class="toolbarButton">접속량정보</button></a>
<a href="a_status.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">세력도</button></a>
<a href="a_kingdomList.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">세력일람</button></a>
<a href="a_genList.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">장수일람</button></a>
<a href="a_bestGeneral.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">명장일람</button></a>
<a href="a_history.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">연감</button></a>
<a href="a_hallOfFame.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">명예의전당</button></a>
<a href="a_emperior.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">왕조일람</button></a>
<a href="a_traffic.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">접속량정보</button></a>
</div>
<div>
<a href="/bbs/board" target="_blank"><button type="button" class="toolbarButton2">삼모게시판</button></a>
@@ -17,6 +17,6 @@
<a href="/bbs/history3" target="_blank"><button type="button" class="toolbarButton">국가 열전</button></a>
<a href="/bbs/patch" target="_blank"><button type="button" class="toolbarButton">패치 내역</button></a>
<a href="battle_simulator.php" target="_blank"><button type="button" class="toolbarButton">전투 시뮬레이터</button></a>
<a href="<?=$site?>" target="_blank"><button type="button" class="toolbarButton"><?=$call?></button></a>
<a href="<?=$site?>" target="_blank" class="open-window"><button type="button" class="toolbarButton"><?=$call?></button></a>
</div>
</div>
+5 -5
View File
@@ -8,18 +8,18 @@
<a href='b_dipcenter.php'><button type="button" class='commandButton' <?=$showSecret?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>내 무 부</button></a>
<a href='b_chiefcenter.php'><button type="button" class='commandButton' <?=$showSecret?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>사 령 부</button></a>
<a href='v_NPCControl.php'><button type="button" class='commandButton' <?=$showSecret?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>NPC 정책</button></a>
<a href='b_genList.php' target='_blank'><button type="button" class='commandButton' <?=$showSecret?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>암 행 부</button></a>
<a href='b_tournament.php' target='_blank'><button type="button" class='commandButton' style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'> </button></a>
<a href='b_genList.php' target='_blank' class="open-window"><button type="button" class='commandButton' <?=$showSecret?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>암 행 부</button></a>
<a href='b_tournament.php' target='_blank' class="open-window"><button type="button" class='commandButton' style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'> </button></a>
<a href='b_myKingdomInfo.php'><button type="button" class='commandButton' <?=$meLevel>=1?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>세력 정보</button></a>
<a href='b_myCityInfo.php'><button type="button" class='commandButton' <?=($meLevel>=1&&$nationLevel>=1)?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>세력 도시</button></a>
<a href='b_myGenInfo.php'><button type="button" class='commandButton' <?=$meLevel>=1?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>세력 장수</button></a>
<a href='b_diplomacy.php'><button type="button" class='commandButton' style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>중원 정보</button></a>
<a href='b_currentCity.php'><button type="button" class='commandButton' style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>현재 도시</button></a>
<a href='b_battleCenter.php' target='_blank'><button type="button" class='commandButton' <?=$showSecret?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>감 찰 부</button></a>
<a href='b_battleCenter.php' target='_blank' class="open-window"><button type="button" class='commandButton' <?=$showSecret?'':'disabled'?> style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>감 찰 부</button></a>
<a href='v_inheritPoint.php'><button type="button" class='commandButton' style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'>유산 관리</button></a>
<a href='b_myPage.php'><button type="button" class='commandButton' style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'> 정보&amp;설정</button></a>
<a href='b_auction.php' target='_blank'><button type="button" class='commandButton' style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'> </button></a>
<a href='b_betting.php' target='_blank'><button type="button" class='commandButton' style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'> </button></a>
<a href='b_auction.php' target='_blank' class="open-window"><button type="button" class='commandButton' style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'> </button></a>
<a href='b_betting.php' target='_blank' class="open-window"><button type="button" class='commandButton' style='background-color:<?=$bgColor?>;color:<?=$fgColor?>;'> </button></a>
</div>
</div>
+8
View File
@@ -154,6 +154,14 @@
title="포상/몰수/헌납/삼/팜 최소 단위"
>연산결과가 단위보다 적다면 수행하지 않습니다.</NumberInputWithInfo
>
</div>
<div class="col">
<NumberInputWithInfo
v-model="nationPolicy.maximumResourceActionAmount"
:step="100"
title="포상/몰수/헌납/삼/팜 최대 단위"
>연산결과가 단위보다 크다면, 값에 맞춥니다.</NumberInputWithInfo
>
</div>
<div class="col">
<NumberInputWithInfo
+1
View File
@@ -125,6 +125,7 @@ export type NationPolicy = {
reqNPCDevelGold: number,
reqNPCDevelRice: number,
minimumResourceActionAmount: number,
maximumResourceActionAmount: number,
minNPCWarLeadership: number,
minWarCrew: number,
minNPCRecruitCityPopulation: number,
+127 -10
View File
@@ -1,7 +1,7 @@
import $ from 'jquery';
import 'popper.js';
import Popper from 'popper.js';
(window as unknown as {Popper:unknown}).Popper = Popper;
(window as unknown as { Popper: unknown }).Popper = Popper;
import 'bootstrap';
import { JQValidateForm, NamedRules } from '../util/jqValidateForm';
import axios from 'axios';
@@ -11,9 +11,12 @@ import { unwrap_any } from '../util/unwrap_any';
import { sha512 } from 'js-sha512';
import { unwrap } from '../util/unwrap';
import { InvalidResponse } from '../defs';
import internal from 'stream';
import { delay } from '../util/delay';
type LoginResponse = {
result: true,
nextToken: [number, string] | undefined,
} | {
result: false,
reqOTP: boolean,
@@ -29,6 +32,19 @@ type OTPResponse = {
reason: string,
}
type AutoLoginNonceResponse = {
result: true,
loginNonce: string,
} | InvalidResponse;
type AutoLoginResponse = {
result: true,
nextToken: [number, string] | undefined,
} | {
result: false,
silent: boolean,
reason: string,
}
declare global {
interface Window {
getOAuthToken: (mode: string, scope_list: string[]) => void;
@@ -41,6 +57,92 @@ declare const kakao_oauth_redirect_uri: string;
let oauthMode: string | null = null;
const TOKEN_VERSION = 1;
const LOGIN_TOKEN_KEY = 'sammo_login_token';
function regNextToken(tokenInfo: [number, string]) {
localStorage.setItem(LOGIN_TOKEN_KEY, JSON.stringify([TOKEN_VERSION, tokenInfo, Date.now()]));
}
function getToken(): [number, string] | undefined {
const trialToken = localStorage.getItem(LOGIN_TOKEN_KEY);
if (!trialToken) {
return;
}
const tokenItems = JSON.parse(trialToken);
if (tokenItems[0] != TOKEN_VERSION) {
console.log(tokenItems);
resetToken();
return;
}
const [, token,] = tokenItems;
return token;
}
function resetToken(){
localStorage.removeItem(LOGIN_TOKEN_KEY);
}
async function tryAutoLogin() {
try {
const tokenInfo = getToken();
if (!tokenInfo) {
return;
}
const [tokenID, token] = tokenInfo;
const result = await axios.post<AutoLoginNonceResponse>('api.php', {
path: ["Login", "ReqNonce"]
});
if(!result){
//api 에러.
return;
}
if(!result.data.result){
resetToken();
return;
}
const nonce = result.data.loginNonce;
const hashedToken = sha512(token + nonce);
const _loginResult = await axios.post<AutoLoginResponse>('api.php', {
path: ["Login", "LoginByToken"],
args: {
'hashedToken':hashedToken,
'token_id':tokenID,
}
});
if(!_loginResult){
return;
}
const loginResult = _loginResult.data;
if(!loginResult.result){
if(!loginResult.silent){
alert(loginResult.reason);
}
console.error(loginResult.reason);
return;
}
if(loginResult.nextToken){
regNextToken(loginResult.nextToken);
}
window.location.href = "./";
}
catch(e){
console.error(e);
return;
}
}
function getOAuthToken(mode: string, scope_list?: string[] | string) {
if (mode === undefined) {
mode = 'login';
@@ -115,6 +217,9 @@ async function doLoginUsingOAuth() {
}
if (result.result) {
if (result.nextToken) {
regNextToken(result.nextToken);
}
window.location.href = "./";
return;
}
@@ -156,9 +261,16 @@ function postOAuthResult(mode: string) {
window.postOAuthResult = postOAuthResult;
$(function ($) {
$(async function ($) {
setAxiosXMLHttpRequest();
//로그인 먼저 해볼 것
if(getToken()){
void tryAutoLogin();
await delay(100);
}
type LoginFormType = {
username: string,
password: string,
@@ -194,13 +306,16 @@ $(function ($) {
try {
const response = await axios({
url: 'j_login.php',
url: 'api.php',
responseType: 'json',
method: 'post',
data: convertFormData({
username: values.username,
password: hash_pw,
})
data: {
path: ["Login", "LoginByID"],
args: {
username: values.username,
password: hash_pw,
}
}
});
result = response.data;
}
@@ -212,6 +327,9 @@ $(function ($) {
if (result.result) {
if (result.nextToken) {
regNextToken(result.nextToken);
}
window.location.href = "./";
return;
}
@@ -268,12 +386,11 @@ $(function ($) {
getOAuthToken('change_pw', 'talk_message');
});
$('#btn_kakao_login').on('click', function(e){
$('#btn_kakao_login').on('click', function (e) {
e.preventDefault();
getOAuthToken('login', ['account_email','talk_message']);
getOAuthToken('login', ['account_email', 'talk_message']);
})
//TODO: 모바일에서 크기 비례 지도 다시 띄우기?
/*
if (document.body.clientWidth < 700) {
+8 -3
View File
@@ -272,7 +272,8 @@ type InheritanceType =
| "lived_month"
| "max_belong"
| "max_domestic_critical"
| "snipe_combat"
| "active_action"
// | "snipe_combat"
| "combat"
| "sabotage"
| "unifier"
@@ -320,10 +321,14 @@ const inheritanceViewText: Record<
title: "최대 연속 내정 성공",
info: "성공한 내정 중 최대 연속값입니다.",
},
snipe_combat: {
active_action: {
title: "능동 행동 수",
info: "장수 동향에 본인의 이름이 직접 나타난 수입니다.<br>일부 사령턴은 제외됩니다."
},
/* snipe_combat: {
title: "병종 상성 우위 횟수",
info: "유리한 상성을 가지고 전투했습니다.",
},
},*/
combat: {
title: "전투 횟수",
info: "전투 횟수입니다.",
+31 -7
View File
@@ -13,6 +13,8 @@ import './msg.ts';
import './map.ts';
import { exportWindow } from './util/exportWindow';
import {stringifyUrl} from 'query-string';
import { joinYearMonth } from './util/joinYearMonth';
import { parseYearMonth } from './util/parseYearMonth';
exportWindow($, '$');
type TurnArg = {
@@ -33,6 +35,7 @@ type ReservedTurnResponse = {
month: number,
date: string,
turn: TurnItem[],
autorun_limit: number|null,
}
$(function ($) {
@@ -65,10 +68,12 @@ $(function ($) {
const turnTime = parseTime(data.turnTime);
let nextTurnTime = new Date(turnTime);
let year = data.year;
let month = data.month;
let nowYearMonth = joinYearMonth(data.year, data.month);
const autorunLimitYearMonth = data.autorun_limit ?? nowYearMonth - 1;
const [autorunLimitYear, autorunLimitMonth] = parseYearMonth(autorunLimitYearMonth);
for (const [turnIdx, turnInfo] of Object.entries(data.turn)) {
const [year, month] = parseYearMonth(nowYearMonth);
const $tr = $(`#command_${turnIdx}`);
$tr.find('.time_pad').text(formatTime(nextTurnTime, 'HH:mm'));
@@ -76,6 +81,16 @@ $(function ($) {
const $turn_pad = $tr.find('.turn_pad');
const $turn_text = $turn_pad.find('.turn_text');
$turn_text.text(turnInfo.brief).css('font-size', '13px');
if(nowYearMonth <= autorunLimitYearMonth){
const brief = turnInfo.brief != '휴식'? turnInfo.brief :'휴식<small>(자율 행동)</small>';
const autorunTooltip = `<span class="obj_tooltip" data-toggle="tooltip" data-placement="top"
><span style='color:#aaffff;'>${brief}</span
><span class="tooltiptext"> 기간: ${autorunLimitYear} ${autorunLimitMonth}</span
></span>`;
$turn_text.html(autorunTooltip);
initTooltip($turn_text);
}
const oWidth = unwrap($turn_pad.innerWidth());
const iWidth = unwrap($turn_text.outerWidth());
@@ -85,11 +100,7 @@ $(function ($) {
}
nextTurnTime = addMinutes(nextTurnTime, data.turnTerm);
month += 1;
if (month >= 13) {
year += 1;
month -= 12;
}
nowYearMonth += 1;
}
console.log(data);
@@ -192,6 +203,19 @@ $(function ($) {
return false;
})
$('.open-window').on('click', function(e){
e.preventDefault();
let target = $(e.target as HTMLAnchorElement);
while(target.attr('href') === undefined){
target = target.parent('a');
if(target.length == 0){
return;
}
}
const href = target.attr('href');
window.open(href);
});
setInterval(myclock, 500);
reloadCommandList();
activateFlip();
+3
View File
@@ -0,0 +1,3 @@
export function joinYearMonth(year: number, month: number): number {
return year * 12 + month - 1;
}
+3
View File
@@ -0,0 +1,3 @@
export function parseYearMonth(yearMonth: number): [number, number] {
return [(yearMonth / 12) | 0, yearMonth % 12 + 1];
}
+2 -2
View File
@@ -63,8 +63,8 @@ if ($currentNationPolicy['reqHumanWarUrgentRice'] ?? 0) {
if ($currentNationPolicy['reqHumanWarUrgentGold'] ?? 0) {
$autoPolicyVariable['reqHumanWarUrgentGold'] = $currentNationPolicy['reqHumanWarUrgentGold'];
}
$autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], ['values' => $autoPolicyVariable], null, $nation, $gameStor->getAll(true));
$zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options'], null, null, $nation, $gameStor->getAll(true));
$autoPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options']??[], ['values' => $autoPolicyVariable], null, $nation, $gameStor->getAll(true));
$zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['options']??[], null, null, $nation, $gameStor->getAll(true));
$lastSetters = [
'policy' => [
-181
View File
@@ -1,181 +0,0 @@
<?php
namespace sammo;
require(__DIR__ . '/vendor/autoload.php');
require(__DIR__ . '/oauth_kakao/lib.join.php');
WebUtil::requireAJAX();
use \kakao\Kakao_REST_API_Helper as Kakao_REST_API_Helper;
$RootDB = RootDB::db();
$session = Session::getInstance();
if ($session->isLoggedIn()) {
$session->logout();
}
$username = mb_strtolower(Util::getPost('username'), 'utf-8');
$password = Util::getPost('password');
if (!$username || !$password) {
Json::die([
'result' => false,
'reqOTP' => false,
'reason' => '올바르지 않은 입력입니다.'
]);
}
function kakaoOAuthCheck(array $userInfo): ?array
{
if (!\kakao\KakaoKey::REST_KEY) {
return [false, '카카오 API 앱이 등록되지 않았습니다. 관리자에게 문의해 주세요.'];
}
$oauthID = $userInfo['oauth_id'];
$oauthInfo = Json::decode($userInfo['oauth_info']) ?? [];
if (!$oauthInfo) {
return [false, 'OAuth 정보가 보관되어 있지 않습니다. 카카오 로그인을 수행해 주세요.'];
}
$accessToken = $oauthInfo['accessToken'] ?? null;
$refreshToken = $oauthInfo['refreshToken'] ?? null;
$accessTokenValidUntil = $oauthInfo['accessTokenValidUntil'] ?? null;
$refreshTokenValidUntil = $oauthInfo['refreshTokenValidUntil'] ?? null;
$OTPValue = $oauthInfo['OTPValue'] ?? null;
$OTPTrialUntil = $oauthInfo['OTPTrialUntil'] ?? null;
$tokenValidUntil = $userInfo['token_valid_until'];
if (!$accessToken || !$refreshToken || !$accessTokenValidUntil || !$refreshTokenValidUntil) {
return [false, 'OAuth 정보가 보관되어 있지 않습니다. 카카오 로그인을 수행해 주세요.'];
}
$now = TimeUtil::now();
if ($now > $refreshTokenValidUntil) {
return [false, '로그인 토큰이 만료되었습니다. 카카오 로그인을 수행해 주세요.'];
}
if ($now > $accessTokenValidUntil) {
$apiHelper = new Kakao_REST_API_Helper($accessToken);
$refreshResult = $apiHelper->refresh_access_token($refreshToken);
if (!$refreshResult) {
return [false, '로그인 토큰 자동 갱신을 실패했습니다. 카카오 로그인을 수행해 주세요.'];
}
$accessToken = $refreshResult['access_token'] ?? null;
if (!$accessToken) {
trigger_error("refreshToken 에러 " . Json::encode($refreshResult) . "," . $refreshToken . "," . substr(\kakao\KakaoKey::REST_KEY, 0, 6), E_USER_NOTICE);
return [false, '로그인 토큰 자동 갱신을 실패했습니다. 카카오 로그인을 수행해 주세요.'];
}
$accessTokenValidUntil = TimeUtil::nowAddSeconds($refreshResult['expires_in']);
$oauthInfo['accessToken'] = $accessToken;
$oauthInfo['accessTokenValidUntil'] = $accessTokenValidUntil;
$refreshToken = $refreshResult['refresh_token'] ?? null;
if ($refreshToken) {
$refreshTokenValidUntil = TimeUtil::nowAddSeconds($refreshResult['refresh_token_expires_in']);
$oauthInfo['refreshToken'] = $refreshToken;
$oauthInfo['refresh_token_expires_in'] = $refreshTokenValidUntil;
}
RootDB::db()->update('member', [
'oauth_info' => Json::encode($oauthInfo)
], 'no=%i', $userInfo['no']);
}
if ($tokenValidUntil && $now <= $tokenValidUntil) {
return null;
}
//인증 시스템 가동
$session = Session::getInstance();
$session->access_token = $accessToken;
$session->expires = $accessTokenValidUntil;
$session->refresh_token = $refreshToken;
$session->refresh_token_expires = $refreshTokenValidUntil;
if (!createOTPbyUserNO($userInfo['no'])) {
return [false, '인증 코드를 보내는데 실패했습니다.'];
}
return [true, '인증 코드를 입력해주세요'];
}
$userInfo = $RootDB->queryFirstRow(
'SELECT `no`, `id`, `name`, `grade`, `delete_after`, `acl`, oauth_id, oauth_type, oauth_info, token_valid_until ' .
'from member where id=%s_username AND ' .
'pw=sha2(concat(salt, %s_password, salt), 512)',
[
'username' => $username,
'password' => $password
]
);
if (!$userInfo) {
Json::die([
'result' => false,
'reqOTP' => false,
'reason' => '아이디나 비밀번호가 올바르지 않습니다.'
]);
}
$canLogin = $RootDB->queryFirstField('SELECT `LOGIN` FROM `system` WHERE `NO` = 1');
if ($canLogin != 'Y' && $userInfo['grade'] < 5) {
Json::die([
'result' => false,
'reason' => '현재는 로그인이 금지되어있습니다!'
]);
}
$nowDate = TimeUtil::now();
if ($userInfo['delete_after']) {
if ($userInfo['delete_after'] < $nowDate) {
$RootDB->delete('member', 'no=%i', $userInfo['no']);
Json::die([
'result' => false,
'reqOTP' => false,
'reason' => "기간 만기로 삭제되었습니다. 재 가입을 시도해주세요."
]);
} else {
Json::die([
'result' => false,
'reqOTP' => false,
'reason' => "삭제 요청된 계정입니다.[{$userInfo['delete_after']}]"
]);
}
}
$RootDB->insert('member_log', [
'member_no' => $userInfo['no'],
'action_type' => 'login',
'action' => Json::encode([
'ip' => Util::get_client_ip(true),
'type' => 'plain'
])
]);
if ($userInfo['oauth_type'] == 'KAKAO') {
$oauthFailResult = kakaoOAuthCheck($userInfo);
if ($oauthFailResult !== null) {
$session->login($userInfo['no'], $userInfo['id'], $userInfo['grade'], true, $userInfo['token_valid_until'], Json::decode($userInfo['acl'] ?? '{}'));
[$oauthReqOTP, $oauthFailReason] = $oauthFailResult;
Json::die([
'result' => false,
'reqOTP' => $oauthReqOTP,
'reason' => $oauthFailReason
]);
}
}
$session->login($userInfo['no'], $userInfo['id'], $userInfo['grade'], false, $userInfo['token_valid_until'], Json::decode($userInfo['acl'] ?? '{}'));
Json::die([
'result' => true,
'reqOTP' => false,
'reason' => '로그인 되었습니다.'
]);
+2 -2
View File
@@ -267,7 +267,7 @@ if ($server == $baseServerName) {
$storage->$server = [$target, $version];
opcache_reset();
//opcache_reset();
Json::die([
'server' => $server,
@@ -321,7 +321,7 @@ genJS($server);
$storage->$server = [$target, $version];
//ServConfig::getServerList()[$server]->closeServer();
opcache_reset();
//opcache_reset();
Json::die([
'server' => $server,
+123 -82
View File
@@ -1,25 +1,30 @@
<?php
namespace sammo;
require(__DIR__.'/../vendor/autoload.php');
require(__DIR__ . '/../vendor/autoload.php');
require('lib.join.php');
//TODO: KakaoOauth를 API로 정식으로 이동
WebUtil::requireAJAX();
use \kakao\Kakao_REST_API_Helper as Kakao_REST_API_Helper;
$RootDB = RootDB::db();
$session = Session::getInstance();
if($session->isLoggedIn()){
if ($session->isLoggedIn()) {
$session->logout();
}
$canLogin = RootDB::db()->queryFirstField('SELECT `LOGIN` FROM `system` WHERE `NO` = 1');
if($canLogin != 'Y'){
if ($canLogin != 'Y') {
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>'현재는 로그인이 금지되어있습니다!',
'noRetry'=>true
'result' => false,
'reqOTP' => false,
'reason' => '현재는 로그인이 금지되어있습니다!',
'noRetry' => true
]);
}
@@ -32,173 +37,209 @@ $refresh_token_expires = $session->refresh_token_expires;
$email = $session->kaccount_email;
if(!$access_token || !$expires){
if (!$access_token || !$expires) {
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>'카카오로그인이 이루어지지 않았습니다.'
'result' => false,
'reqOTP' => false,
'reason' => '카카오로그인이 이루어지지 않았습니다.'
]);
}
//TODO: join과 login의 동작이 비슷하다. helper class로 묶자.
$restAPI = new Kakao_REST_API_Helper($access_token);
if($expires < $now && (!$refresh_token || ($refresh_token_expires < $now))){
if ($expires < $now && (!$refresh_token || ($refresh_token_expires < $now))) {
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>'로그인 토큰 만료.'.$refresh_token_expires.' 다시 카카오로그인을 수행해주세요.'
'result' => false,
'reqOTP' => false,
'reason' => '로그인 토큰 만료.' . $refresh_token_expires . ' 다시 카카오로그인을 수행해주세요.'
]);
}
if($expires < $now){
if ($expires < $now) {
$session->kaccount_email = null;
$email = null;
$result = $restAPI->refresh_access_token($refresh_token);
if(!isset($refresh_token)){
if (!isset($refresh_token)) {
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>'카카오 로그인 과정 중 추가 갱신 절차를 실패했습니다'
'result' => false,
'reqOTP' => false,
'reason' => '카카오 로그인 과정 중 추가 갱신 절차를 실패했습니다'
]);
}
$access_token = $result['access_token'];
$expires = TimeUtil::nowAddSeconds($result['expires_in']);
if(isset($result['refresh_token'])){
if (isset($result['refresh_token'])) {
$refresh_token = Util::array_get($result['refresh_token']);
$refresh_token_expires = TimeUtil::nowAddSeconds($result['refresh_token_expires_in']);
}
}
if(!$email){
if (!$email) {
$me = $restAPI->meWithEmail();
$me['code'] = Util::array_get($me['code'], 0);
if ($me['code']< 0) {
if ($me['code'] < 0) {
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>'카카오로그인이 정상적으로 수행되지 않았습니다.'
'result' => false,
'reqOTP' => false,
'reason' => '카카오로그인이 정상적으로 수행되지 않았습니다.'
]);
}
$kakao_account = $me['kakao_account']??null;
$kakao_account = $me['kakao_account'] ?? null;
if (!$kakao_account) {
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>'카카오 로그인 정보를 제대로 받아오지 못했습니다.'
'result' => false,
'reqOTP' => false,
'reason' => '카카오 로그인 정보를 제대로 받아오지 못했습니다.'
]);
}
if(!($kakao_account['has_email']??false)){
if (!($kakao_account['has_email'] ?? false)) {
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>'이메일 정보 공유를 허가해 주셔야 합니다.',
'result' => false,
'reqOTP' => false,
'reason' => '이메일 정보 공유를 허가해 주셔야 합니다.',
]);
}
$validEmail = $kakao_account['is_email_valid']??false;
$verifiedEmail = $kakao_account['is_email_verified']??false;
$validEmail = $kakao_account['is_email_valid'] ?? false;
$verifiedEmail = $kakao_account['is_email_verified'] ?? false;
if(!$validEmail || !$verifiedEmail){
if (!$validEmail || !$verifiedEmail) {
$restAPI->unlink();
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>'카카오 계정 이메일이 아직 인증되지 않았습니다',
'result' => false,
'reqOTP' => false,
'reason' => '카카오 계정 이메일이 아직 인증되지 않았습니다',
]);
}
$email = $kakao_account['email'];
$session->kaccount_email = $email;
}
$userInfo = $RootDB->queryFirstRow(
'SELECT `no`, `id`, `name`, `grade`, `delete_after`, `acl`, oauth_info, token_valid_until from member where email=%s',$email);
'SELECT `no`, `id`, `name`, `grade`, `delete_after`, `acl`, oauth_info, token_valid_until from member where email=%s',
$email
);
if(!$userInfo){
if (!$userInfo) {
$restAPI->unlink();
$session->access_token = null;
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>'카카오로그인에 해당하는 계정이 없습니다. 재 가입을 시도해주세요.',
'aux'=>$session->tmpx,
'result' => false,
'reqOTP' => false,
'reason' => '카카오로그인에 해당하는 계정이 없습니다. 재 가입을 시도해주세요.',
'aux' => $session->tmpx,
]);
}
if($userInfo['delete_after']){
if($userInfo['delete_after'] < $now){
if ($userInfo['delete_after']) {
if ($userInfo['delete_after'] < $now) {
$restAPI->unlink();
$session->access_token = null;
$RootDB->delete('member', 'no=%i', $userInfo['no']);
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>"기간 만기로 삭제되었습니다. 재 가입을 시도해주세요.",
'result' => false,
'reqOTP' => false,
'reason' => "기간 만기로 삭제되었습니다. 재 가입을 시도해주세요.",
]);
}
else{
} else {
$restAPI->unlink();
$session->access_token = null;
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>"삭제 요청된 계정입니다.[{$userInfo['delete_after']}]"
'result' => false,
'reqOTP' => false,
'reason' => "삭제 요청된 계정입니다.[{$userInfo['delete_after']}]"
]);
}
}
$oauthInfo = Json::decode($userInfo['oauth_info'])??[];
$oauthInfo = Json::decode($userInfo['oauth_info']) ?? [];
$oauthInfo['accessToken'] = $access_token;
$oauthInfo['accessTokenValidUntil'] = $expires;
if($refresh_token){
if ($refresh_token) {
$oauthInfo['refreshToken'] = $refresh_token;
$oauthInfo['refreshTokenValidUntil'] = $refresh_token_expires;
}
RootDB::db()->update('member', [
'oauth_info'=>Json::encode($oauthInfo)
'oauth_info' => Json::encode($oauthInfo)
], 'no=%i', $userInfo['no']);
$tokenValidUntil = $userInfo['token_valid_until'];
if(!$tokenValidUntil || $tokenValidUntil < $now){
if(!createOTPbyUserNO($userInfo['no'])){
if (!$tokenValidUntil || $tokenValidUntil < $now) {
if (!createOTPbyUserNO($userInfo['no'])) {
Json::die([
'result'=>false,
'reqOTP'=>false,
'reason'=>'인증 코드를 보내는데 실패했습니다.'
]);
'result' => false,
'reqOTP' => false,
'reason' => '인증 코드를 보내는데 실패했습니다.'
]);
}
$session->login($userInfo['no'], $userInfo['id'], $userInfo['grade'], true, $userInfo['token_valid_until'], Json::decode($userInfo['acl']??'{}'));
$session->login($userInfo['no'], $userInfo['id'], $userInfo['grade'], true, $userInfo['token_valid_until'], null, Json::decode($userInfo['acl'] ?? '{}'));
Json::die([
'result'=>false,
'reqOTP'=>true,
'reason'=>'인증 코드를 입력해주세요.'
'result' => false,
'reqOTP' => true,
'reason' => '인증 코드를 입력해주세요.'
]);
}
$RootDB->insert('member_log',[
'member_no'=>$userInfo['no'],
'action_type'=>'login',
'action'=>Json::encode([
'ip'=>Util::get_client_ip(true),
'type'=>'kakao'
$RootDB->insert('member_log', [
'member_no' => $userInfo['no'],
'action_type' => 'login',
'action' => Json::encode([
'ip' => Util::get_client_ip(true),
'type' => 'kakao'
])
]);
$session->login($userInfo['no'], $userInfo['id'], $userInfo['grade'], false, $userInfo['token_valid_until'], Json::decode($userInfo['acl']??'{}'));
//TODO: 이동하면서 이부분 정리
$nowDate = TimeUtil::now();
$RootDB->delete(
'login_token',
'user_id = %i AND expire_date < %s',
$userID,
$nowDate
);
$RootDB->query(
'DELETE invalid FROM login_token AS invalid
JOIN
( SELECT id
FROM login_token
WHERE user_id = %i
ORDER BY id DESC
LIMIT 8,1
) AS valid
ON invalid.id < valid.id WHERE user_id = %i',
$userID,
$userID
);
$token = Util::randomStr(20);
$RootDB->insert('login_token', [
'user_id' => $userInfo['no'],
'base_token' => $token,
'reg_ip' => Util::get_client_ip(true),
'reg_date' => $nowDate,
'expire_date' => TimeUtil::nowAddDays(7)
]);
$tokenID = $RootDB->insertId();
$session->login($userInfo['no'], $userInfo['id'], $userInfo['grade'], false, $userInfo['token_valid_until'], $tokenID, Json::decode($userInfo['acl'] ?? '{}'));
Json::die([
'result'=>true,
'reqOTP'=>false,
'reason'=>'로그인 되었습니다.'
]);
'result' => true,
'reqOTP' => false,
'nextToken' => [$tokenID, $token],
'reason' => '로그인 되었습니다.'
]);
+162
View File
@@ -0,0 +1,162 @@
<?php
namespace sammo\API\Login;
use DateTime;
use sammo\Session;
use DateTimeInterface;
use sammo\BaseAPI;
use sammo\Json;
use sammo\KakaoUtil;
use sammo\RootDB;
use sammo\TimeUtil;
use sammo\Util;
use sammo\Validator;
class LoginByID extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v
->rule('required', [
'username',
'password'
]);
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
{
return BaseAPI::NO_SESSION;
}
public function scrubToken(int $userID)
{
$RootDB = RootDB::db();
$nowDate = TimeUtil::now();
$RootDB->delete(
'login_token',
'user_id = %i AND expire_date < %s',
$userID,
$nowDate
);
$RootDB->query(
'DELETE invalid FROM login_token AS invalid
JOIN
( SELECT id
FROM login_token
WHERE user_id = %i
ORDER BY id DESC
LIMIT 8,1
) AS valid
ON invalid.id < valid.id WHERE user_id = %i',
$userID,
$userID
);
}
public function addToken(int $userID)
{
$RootDB = RootDB::db();
$nowDate = TimeUtil::now();
$token = Util::randomStr(20);
$RootDB->insert('login_token', [
'user_id' => $userID,
'base_token' => $token,
'reg_ip' => Util::get_client_ip(true),
'reg_date' => $nowDate,
'expire_date' => TimeUtil::nowAddDays(7)
]);
$tokenID = $RootDB->insertId();
return [$tokenID, $token];
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$RootDB = RootDB::db();
if ($session->isLoggedIn()) {
$session->logout();
}
$username = $this->args['username'];
$password = $this->args['password'];
$userInfo = $RootDB->queryFirstRow(
'SELECT `no`, `id`, `name`, `grade`, `delete_after`, `acl`, oauth_id, oauth_type, oauth_info, token_valid_until ' .
'from member where id=%s_username AND ' .
'pw=sha2(concat(salt, %s_password, salt), 512)',
[
'username' => $username,
'password' => $password
]
);
if (!$userInfo) {
return '아이디나 비밀번호가 올바르지 않습니다.';
}
$canLogin = $RootDB->queryFirstField('SELECT `LOGIN` FROM `system` WHERE `NO` = 1');
if ($canLogin != 'Y' && $userInfo['grade'] < 5) {
return '현재는 로그인이 금지되어있습니다!';
}
$nowDate = TimeUtil::now();
if ($userInfo['delete_after']) {
if ($userInfo['delete_after'] < $nowDate) {
$RootDB->delete('member', 'no=%i', $userInfo['no']);
return [
'result' => false,
'reqOTP' => false,
'reason' => "기간 만기로 삭제되었습니다. 재 가입을 시도해주세요."
];
} else {
return [
'result' => false,
'reqOTP' => false,
'reason' => "삭제 요청된 계정입니다.[{$userInfo['delete_after']}]"
];
}
}
$RootDB->insert('member_log', [
'member_no' => $userInfo['no'],
'action_type' => 'login',
'action' => Json::encode([
'ip' => Util::get_client_ip(true),
'type' => 'plain'
])
]);
if ($userInfo['oauth_type'] == 'KAKAO') {
$oauthFailResult = KakaoUtil::kakaoOAuthCheck($userInfo);
if ($oauthFailResult !== null) {
$session->login($userInfo['no'], $userInfo['id'], $userInfo['grade'], true, $userInfo['token_valid_until'], null, Json::decode($userInfo['acl'] ?? '{}'));
[$oauthReqOTP, $oauthFailReason] = $oauthFailResult;
return [
'result' => false,
'reqOTP' => $oauthReqOTP,
'reason' => $oauthFailReason
];
}
}
$this->scrubToken($userInfo['no']);
$nextToken = $this->addToken($userInfo['no']);
$session->login($userInfo['no'], $userInfo['id'], $userInfo['grade'], false, $userInfo['token_valid_until'], $nextToken[0], Json::decode($userInfo['acl'] ?? '{}'));
return [
'result' => true,
'reqOTP' => false,
'nextToken' => $nextToken,
'reason' => '로그인 되었습니다.'
];
}
}
+150
View File
@@ -0,0 +1,150 @@
<?php
namespace sammo\API\Login;
use sammo\Session;
use DateTimeInterface;
use sammo\BaseAPI;
use sammo\Json;
use sammo\KakaoUtil;
use sammo\RootDB;
use sammo\TimeUtil;
use sammo\Util;
use sammo\Validator;
class LoginByToken extends LoginByID
{
public function getRequiredSessionMode(): int
{
return \sammo\BaseAPI::NO_SESSION; //XXX: Token 때문에 엄밀히는 NO_SESSION이 아님
}
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v
->rule('required', [
'token_id',
'hashedToken'
]);
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$loginNonce = $session->loginNonce ?? null;
$loginNonceExpired = $session->loginNonceExpired ?? null;
if (!is_string($loginNonce) || !is_string($loginNonceExpired)) {
return '자동 로그인: 절차 오류';
}
$RootDB = RootDB::db();
if ($session->isLoggedIn()) {
$session->logout();
}
$token_id = $this->args['token_id'];
$token_info = $RootDB->queryFirstRow('SELECT * FROM login_token WHERE id = %i', $token_id);
if (!$token_info) {
return [
'result' => false,
'silent' => true,
'reason' => 'failed'
];
}
$hashedToken = $this->args['hashedToken'];
$tokenAnswer = hash('sha512', "{$token_info['base_token']}{$loginNonce}");
if (strtolower($hashedToken) != strtolower($tokenAnswer)) {
return [
'result' => false,
'silent' => true,
'reason' => 'failed'
];
}
$userInfo = $RootDB->queryFirstRow(
'SELECT `no`, `id`, `name`, `grade`, `delete_after`, `acl`, oauth_id, oauth_type, oauth_info, token_valid_until ' .
'from member where NO = %i',
$token_info['user_id']
);
if(!$userInfo){
return '자동 로그인: 올바른 계정이 아닙니다.';
}
$canLogin = $RootDB->queryFirstField('SELECT `LOGIN` FROM `system` WHERE `NO` = 1');
if ($canLogin != 'Y' && $userInfo['grade'] < 5) {
return '자동 로그인: 현재는 로그인이 금지되어있습니다!';
}
$nowDate = TimeUtil::now();
if ($userInfo['delete_after']) {
if ($userInfo['delete_after'] < $nowDate) {
$RootDB->delete('member', 'no=%i', $userInfo['no']);
return [
'result' => false,
'silent' => true,
'reason' => "기간 만기"
];
} else {
return [
'result' => false,
'silent' => true,
'reason' => "삭제 요청된 계정[{$userInfo['delete_after']}]"
];
}
}
$RootDB->insert('member_log', [
'member_no' => $userInfo['no'],
'action_type' => 'login',
'action' => Json::encode([
'ip' => Util::get_client_ip(true),
'type' => 'auto'
])
]);
if ($userInfo['oauth_type'] == 'KAKAO') {
$oauthFailResult = KakaoUtil::kakaoOAuthCheck($userInfo);
if ($oauthFailResult !== null) {
$session->login($userInfo['no'], $userInfo['id'], $userInfo['grade'], true, $userInfo['token_valid_until'], null, Json::decode($userInfo['acl'] ?? '{}'));
[$oauthReqOTP, $oauthFailReason] = $oauthFailResult;
$RootDB->delete(
'login_token',
'id = %i', $token_id
);
return $oauthFailReason;
}
}
$session->login($userInfo['no'], $userInfo['id'], $userInfo['grade'], false, $userInfo['token_valid_until'], $token_id, Json::decode($userInfo['acl'] ?? '{}'));
$this->scrubToken($userInfo['no']);
$nextDate = TimeUtil::nowAddDays(2);
if($nextDate < $token_info['expire_date']){
return [
'result' => true,
'silent' => true,
'reason' => 'success'
];
}
$RootDB->delete(
'login_token',
'id = %i', $token_id
);
$nextToken = $this->addToken($userInfo['no']);
return [
'result' => true,
'silent' => true,
'nextToken' => $nextToken,
'reason' => 'success'
];
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace sammo\API\Login;
use sammo\Session;
use DateTimeInterface;
use sammo\BaseAPI;
use sammo\Json;
use sammo\KakaoUtil;
use sammo\RootDB;
use sammo\TimeUtil;
use sammo\Util;
use sammo\Validator;
class ReqNonce extends BaseAPI{
public function getRequiredSessionMode(): int {
return \sammo\BaseAPI::NO_SESSION;
}
public function validateArgs(): ?string
{
return null;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag) {
$loginNonce = Util::randomStr(16);
$loginNonceExpired = TimeUtil::nowAddSeconds(2);
$session->loginNonce = $loginNonce;
$session->loginNonceExpired = $loginNonceExpired;
return [
'result'=>true,
'loginNonce'=>$loginNonce,
];
}
}
+4 -4
View File
@@ -40,7 +40,7 @@ class APIHelper
$sessionMode = $obj->getRequiredSessionMode();
if ($sessionMode === BaseAPI::NO_SESSION) {
$session = null;
$session = Session::getInstance();//XXX: NoSession이면 진짜 NoSession이어야..?
} else {
if ($sessionMode & BaseAPI::REQ_GAME_LOGIN) {
$session = Session::requireGameLogin();
@@ -71,7 +71,7 @@ class APIHelper
[$lastModified, $etag] = $cacheResult;
if ($lastModified !== null) {
header("Last-Modified: " . gmdate("D, d M Y H:i:s", TimeUtil::DateTimeToSeconds($lastModified, true)) . " GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s", Util::toInt(TimeUtil::DateTimeToSeconds($lastModified, true))) . " GMT");
}
if ($etag !== null) {
header("Etag: $etag");
@@ -94,10 +94,10 @@ class APIHelper
], $cacheResult === null ? Json::NO_CACHE : 0);
}
Json::die($result, $cacheResult === null ? Json::NO_CACHE : 0);
} catch (\Exception $e) {
} catch (\Throwable $e) {
Json::dieWithReason($e->getMessage());
} catch (mixed $e) {
Json::dieWithReason($e);
Json::dieWithReason(strval($e));
}
}
}
+10 -8
View File
@@ -11,7 +11,7 @@ namespace sammo;
* @property bool $reqOTP 인증 코드 필요
* @property array $acl 권한
* @property string $tokenValidUntil 로그인 토큰 길이
*
*
* @property int $generalID 장수 번호 (게임 로그인 필요)
* @property string $generalName 장수 이름 (게임 로그인 필요)
*/
@@ -82,7 +82,7 @@ class DummySession extends Session
return Util::array_get($_SESSION[$name]);
}
public function login(int $userID, string $userName, int $grade, bool $reqOTP, ?string $tokenValidUntil, array $acl): Session
public function login(int $userID, string $userName, int $grade, bool $reqOTP, ?string $tokenValidUntil, ?int $tokenID, array $acl): Session
{
$this->set('userID', $userID);
$this->set('userName', $userName);
@@ -92,6 +92,7 @@ class DummySession extends Session
$this->set('acl', $acl);
$this->set('reqOTP', $reqOTP);
$this->set('tokenValidUntil', $tokenValidUntil);
$this->set('tokenID', $tokenID);
return $this;
}
@@ -109,7 +110,7 @@ class DummySession extends Session
if (class_exists('\\sammo\\UniqueConst')) {
$this->logoutGame();
}
$this->set('userID', null);
$this->set('userName', null);
$this->set('userGrade', null);
@@ -117,6 +118,7 @@ class DummySession extends Session
$this->set('reqOTP', null);
$this->set('time', time());
$this->set('lastMsgGet', null);
$this->set('tokenID', null);
return $this;
}
@@ -196,7 +198,7 @@ class DummySession extends Session
} else {
$obj = self::getInstance();
}
return $obj->userGrade;
}
@@ -212,12 +214,12 @@ class DummySession extends Session
} else {
$obj = self::getInstance();
}
return $obj->userID;
}
/**
*
*
*/
public static function getGeneralID(bool $requireLogin = false, string $exitPath = '..')
{
@@ -226,7 +228,7 @@ class DummySession extends Session
} else {
$obj = self::getInstance();
}
return $obj->generalID??0;
}
@@ -244,7 +246,7 @@ class DummySession extends Session
return false;
}
}
if ($this->userID) {
return true;
} else {
+1
View File
@@ -39,6 +39,7 @@ class Json
return json_decode($value);
}
/** @return never */
public static function die($value, $flag = self::NO_CACHE)
{
//NOTE: REST 형식에 맞게, ok(), fail()로 쪼개는게 낫지 않을까 생각해봄.
+221
View File
@@ -0,0 +1,221 @@
<?php
namespace sammo;
use kakao\Kakao_REST_API_Helper;
class KakaoUtil
{
private function __construct()
{
}
static function checkUsernameDup($username)
{
if (!$username) {
return '계정명을 입력해주세요';
}
$username = mb_strtolower($username, 'utf-8');
$length = strlen($username);
if ($length < 4 || $length > 64) {
return '적절하지 않은 길이입니다.';
}
$cnt = RootDB::db()->queryFirstField('SELECT count(no) FROM member WHERE `id` = %s LIMIT 1', $username);
if ($cnt != 0) {
return '이미 사용중인 계정명입니다';
}
return true;
}
static function checkNicknameDup($nickname)
{
if (!$nickname) {
return '닉네임을 입력해주세요';
}
$length = mb_strwidth($nickname, 'utf-8');
if ($length < 1 || $length > 18) {
return '적절하지 않은 길이입니다.';
}
$cnt = RootDB::db()->queryFirstField('SELECT count(no) FROM member WHERE `name` = %s LIMIT 1', $nickname);
if ($cnt != 0) {
return '이미 사용중인 닉네임입니다';
}
return true;
}
static function checkEmailDup($email)
{
if (!$email) {
return '이메일을 입력해주세요';
}
$length = strlen($email);
if ($length < 1 || $length > 64) {
return '적절하지 않은 길이입니다.';
}
$userInfo = RootDB::db()->queryFirstField('SELECT `no`, `delete_after` FROM member WHERE `email` = %s LIMIT 1', $email);
if ($userInfo) {
if (!$userInfo['delete_after']) {
return '이미 사용중인 이메일입니다. 관리자에게 문의해주세요.';
}
if ($userInfo['delete_after'] >= $userInfo) {
return "삭제 요청된 계정입니다.[{$userInfo['delete_after']}]";
}
//$userInfo['delete_after'] < $userInfo
RootDB::db()->delete('member', 'no=%i', $userInfo['no']);
}
return true;
}
static function createOTPbyUserNO(int $userNo): bool
{
$userInfo = RootDB::db()->queryFirstRow('SELECT oauth_info FROM member WHERE no=%i', $userNo);
if (!$userInfo) {
return false;
}
$oauthInfo = Json::decode($userInfo['oauth_info']);
if (!$oauthInfo) {
return false;
}
$accessToken = $oauthInfo['accessToken'];
$OTPValue = $oauthInfo['OTPValue'] ?? null;
$OTPTrialUntil = $oauthInfo['OTPTrialUntil'] ?? null;
$now = TimeUtil::now();
if ($OTPTrialUntil && $OTPValue && $OTPTrialUntil > $now) {
return true;
}
[$OTPValue, $OTPTrialUntil] = static::createOTP($accessToken);
if (!$OTPValue) {
return false;
}
$oauthInfo['OTPValue'] = $OTPValue;
$oauthInfo['OTPTrialUntil'] = $OTPTrialUntil;
$oauthInfo['OTPTrialCount'] = 3;
RootDB::db()->update('member', [
'oauth_info' => Json::encode($oauthInfo)
], 'no=%i', $userNo);
return true;
}
static function createOTP(string $accessToken): ?array
{
$restAPI = new Kakao_REST_API_Helper($accessToken);
$OTPValue = Util::randRangeInt(1000, 9999);
$OTPTrialUntil = TimeUtil::nowAddSeconds(180);
$sendResult = $restAPI->talk_to_me_default([
"object_type" => "text",
"text" => "인증 코드는 $OTPValue 입니다. $OTPTrialUntil 이내에 입력해주세요.",
"link" => [
"web_url" => ServConfig::getServerBasepath(),
"mobile_web_url" => ServConfig::getServerBasepath()
],
"button_title" => "로그인 페이지 열기"
]);
$sendResult['code'] = Util::array_get($sendResult['code'], 0);
if ($sendResult['code'] < 0) {
return null;
}
return [$OTPValue, $OTPTrialUntil];
}
static function kakaoOAuthCheck(array $userInfo): ?array
{
if (!\kakao\KakaoKey::REST_KEY) {
return [false, '카카오 API 앱이 등록되지 않았습니다. 관리자에게 문의해 주세요.'];
}
$oauthID = $userInfo['oauth_id'];
$oauthInfo = Json::decode($userInfo['oauth_info']) ?? [];
if (!$oauthInfo) {
return [false, 'OAuth 정보가 보관되어 있지 않습니다. 카카오 로그인을 수행해 주세요.'];
}
$accessToken = $oauthInfo['accessToken'] ?? null;
$refreshToken = $oauthInfo['refreshToken'] ?? null;
$accessTokenValidUntil = $oauthInfo['accessTokenValidUntil'] ?? null;
$refreshTokenValidUntil = $oauthInfo['refreshTokenValidUntil'] ?? null;
$OTPValue = $oauthInfo['OTPValue'] ?? null;
$OTPTrialUntil = $oauthInfo['OTPTrialUntil'] ?? null;
$tokenValidUntil = $userInfo['token_valid_until'];
if (!$accessToken || !$refreshToken || !$accessTokenValidUntil || !$refreshTokenValidUntil) {
return [false, 'OAuth 정보가 보관되어 있지 않습니다. 카카오 로그인을 수행해 주세요.'];
}
$now = TimeUtil::now();
if ($now > $refreshTokenValidUntil) {
return [false, '로그인 토큰이 만료되었습니다. 카카오 로그인을 수행해 주세요.'];
}
if ($now > $accessTokenValidUntil) {
$apiHelper = new Kakao_REST_API_Helper($accessToken);
$refreshResult = $apiHelper->refresh_access_token($refreshToken);
if (!$refreshResult) {
return [false, '로그인 토큰 자동 갱신을 실패했습니다. 카카오 로그인을 수행해 주세요.'];
}
$accessToken = $refreshResult['access_token'] ?? null;
if (!$accessToken) {
trigger_error("refreshToken 에러 " . Json::encode($refreshResult) . "," . $refreshToken . "," . substr(\kakao\KakaoKey::REST_KEY, 0, 6), E_USER_NOTICE);
return [false, '로그인 토큰 자동 갱신을 실패했습니다. 카카오 로그인을 수행해 주세요.'];
}
$accessTokenValidUntil = TimeUtil::nowAddSeconds($refreshResult['expires_in']);
$oauthInfo['accessToken'] = $accessToken;
$oauthInfo['accessTokenValidUntil'] = $accessTokenValidUntil;
$refreshToken = $refreshResult['refresh_token'] ?? null;
if ($refreshToken) {
$refreshTokenValidUntil = TimeUtil::nowAddSeconds($refreshResult['refresh_token_expires_in']);
$oauthInfo['refreshToken'] = $refreshToken;
$oauthInfo['refresh_token_expires_in'] = $refreshTokenValidUntil;
}
RootDB::db()->update('member', [
'oauth_info' => Json::encode($oauthInfo)
], 'no=%i', $userInfo['no']);
}
if ($tokenValidUntil && $now <= $tokenValidUntil) {
return null;
}
//인증 시스템 가동
$session = Session::getInstance();
$session->access_token = $accessToken;
$session->expires = $accessTokenValidUntil;
$session->refresh_token = $refreshToken;
$session->refresh_token_expires = $refreshTokenValidUntil;
if (!static::createOTPbyUserNO($userInfo['no'])) {
return [false, '인증 코드를 보내는데 실패했습니다.'];
}
return [true, '인증 코드를 입력해주세요'];
}
}
+16 -10
View File
@@ -10,8 +10,9 @@ namespace sammo;
* @property string $ip IP
* @property bool $reqOTP 인증 코드 필요
* @property array $acl 권한
* @property int|null $tokenID 토큰ID
* @property string $tokenValidUntil 로그인 토큰 길이
*
*
* @property int $generalID 장수 번호 (게임 로그인 필요)
* @property string $generalName 장수 이름 (게임 로그인 필요)
*/
@@ -35,7 +36,7 @@ class Session
const GAME_KEY_GENERAL_ID = '_g_no';
const GAME_KEY_GENERAL_NAME = '_g_name';
const GAME_KEY_EXPECTED_DEADTIME = '_g_deadtime';
private $writeClosed = false;
private $sessionID = null;
@@ -170,7 +171,7 @@ class Session
return Util::array_get($_SESSION[$name]);
}
public function login(int $userID, string $userName, int $grade, bool $reqOTP, ?string $tokenValidUntil, array $acl): Session
public function login(int $userID, string $userName, int $grade, bool $reqOTP, ?string $tokenValidUntil, ?int $tokenID, array $acl): Session
{
$this->set('userID', $userID);
$this->set('userName', $userName);
@@ -180,6 +181,7 @@ class Session
$this->set('acl', $acl);
$this->set('reqOTP', $reqOTP);
$this->set('tokenValidUntil', $tokenValidUntil);
$this->set('tokenID', $tokenID);
return $this;
}
@@ -197,7 +199,11 @@ class Session
if (class_exists('\\sammo\\UniqueConst')) {
$this->logoutGame();
}
if($this->tokenID??null){
RootDB::db()->delete('login_token', 'id = %i', $this->tokenID);
}
$this->set('userID', null);
$this->set('userName', null);
$this->set('userGrade', null);
@@ -261,7 +267,7 @@ class Session
}
return $this;
}
$turnterm = $gameStor->turnterm;
$isUnited = $gameStor->isunited != 0;
@@ -319,7 +325,7 @@ class Session
} else {
$obj = self::getInstance();
}
return $obj->userGrade;
}
@@ -335,12 +341,12 @@ class Session
} else {
$obj = self::getInstance();
}
return $obj->userID;
}
/**
*
*
*/
public static function getGeneralID(bool $requireLogin = false, string $exitPath = '..')
{
@@ -349,7 +355,7 @@ class Session
} else {
$obj = self::getInstance();
}
return $obj->generalID??0;
}
@@ -367,7 +373,7 @@ class Session
return false;
}
}
if ($this->userID) {
return true;
} else {
+26 -26
View File
@@ -156,7 +156,7 @@ class Util extends \utilphp\util
else{
$text = str_replace("_tK_{$key}_", $value, $text);
}
}
file_put_contents($destFilePath, $text);
@@ -182,7 +182,7 @@ class Util extends \utilphp\util
else{
$head[] = "class $newClassName extends $srcClassName";
}
$head[] = '{';
$head[] = '';
$head = join("\n", $head);
@@ -203,7 +203,7 @@ class Util extends \utilphp\util
}
$result = file_put_contents($destFilePath, $head.join("\n", $body).$tail, LOCK_EX);
assert($result);
return true;
}
@@ -281,12 +281,12 @@ class Util extends \utilphp\util
public static function convertArrayToDict($arr, $keyName)
{
$result = [];
foreach ($arr as $obj) {
$key = $obj[$keyName];
$result[$key] = $obj;
}
return $result;
}
@@ -309,7 +309,7 @@ class Util extends \utilphp\util
public static function convertDictToArray($dict, bool $withKey=true)
{
$result = [];
foreach($dict as $key=>$value){
if($withKey){
$result[] = [$key, $value];
@@ -318,7 +318,7 @@ class Util extends \utilphp\util
$result[] = $value;
}
}
return $result;
}
@@ -327,7 +327,7 @@ class Util extends \utilphp\util
foreach($dict as $dictKey=>$value){
$result[$dictKey] = $value[$key];
}
return $result;
}
@@ -354,7 +354,7 @@ class Util extends \utilphp\util
}
$idx = $key + 1;
}
return false;
}
@@ -368,20 +368,20 @@ class Util extends \utilphp\util
if ($dict === null) {
return null;
}
if (is_array($dict) && empty($dict)) {
return null;
}
if ($depth <= 0) {
return $dict;
}
foreach ($dict as $key=>$value) {
if ($value === null) {
unset($dict[$key]);
continue;
}
}
if (!Util::isDict($value)) {
continue;
}
@@ -393,7 +393,7 @@ class Util extends \utilphp\util
$dict[$key] = $newValue;
}
}
return $dict;
}
@@ -465,7 +465,7 @@ class Util extends \utilphp\util
return (float)$matches[1] / 100;
}
/**
* $min과 $max 사이의 값으로 교정
@@ -552,7 +552,7 @@ class Util extends \utilphp\util
/**
* 2 배열에서 특정 키의
*
*
* @param array $array 배열. 1차원 배열 또는 2차원 배열
* @param int|string|null $key 2차원 배열에서 참조할 .
* @return int|float 합계
@@ -570,14 +570,14 @@ class Util extends \utilphp\util
/**
* 특정 키를 가진 값으로 묶음
*
*
* @param array $array 배열. 1차원 배열 또는 2차원 배열
* @param int|string|null $key 2차원 배열에서 참조할 .
* @return array
*/
public static function arrayGroupBy(array $array, $key, bool $preserveRowKey=false) {
$result = array();
if($preserveRowKey){
foreach($array as $rowKey=>$val) {
if(key_exists($key, $val)){
@@ -596,7 +596,7 @@ class Util extends \utilphp\util
}
}
}
return $result;
}
@@ -618,7 +618,7 @@ class Util extends \utilphp\util
*
* @param array $items 선택하고자 하는 배열
*
* @return int|float|string|object 선택된 value값.
* @return int|float|string|array|object 선택된 value값.
*/
public static function choiceRandom(array $items)
{
@@ -700,7 +700,7 @@ class Util extends \utilphp\util
else{
throw new \InvalidArgumentException('$lhs is not Traversable');
}
if($rhs instanceof \Traversable){
$rhsIter = new \IteratorIterator($rhs);
}
@@ -778,11 +778,11 @@ class Util extends \utilphp\util
/**
* Python 3 range와 동일
* @param int $from
* @param null|int $to
* @param null|int $step
* @param int $from
* @param null|int $to
* @param null|int $step
* @return \Traversable
* @throws \InvalidArgumentException
* @throws \InvalidArgumentException
*/
public static function range(int $from, ?int $to=null, ?int $step=null):\Traversable{
if($to === null){
@@ -809,5 +809,5 @@ class Util extends \utilphp\util
}
}
}
};
-1
View File
@@ -1 +0,0 @@
../scssphp/scssphp/bin/pscss
+75 -84
View File
@@ -29,7 +29,7 @@ private static $installed = array (
'aliases' =>
array (
),
'reference' => '40a20a55d3aa08f0ab58a50b0572b17dce33de80',
'reference' => '872755e57f84720a9c4c63d5455441f83c41f6c6',
'name' => 'sammo-hid/sammo',
),
'versions' =>
@@ -54,12 +54,12 @@ private static $installed = array (
),
'composer/semver' =>
array (
'pretty_version' => '3.2.5',
'version' => '3.2.5.0',
'pretty_version' => '3.2.6',
'version' => '3.2.6.0',
'aliases' =>
array (
),
'reference' => '31f3ea725711245195f62e54ffa402d8ef2fdba9',
'reference' => '83e511e247de329283478496f7a1e114c9517506',
),
'composer/xdebug-handler' =>
array (
@@ -72,12 +72,12 @@ private static $installed = array (
),
'doctrine/inflector' =>
array (
'pretty_version' => '2.0.3',
'version' => '2.0.3.0',
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
'aliases' =>
array (
),
'reference' => '9cf661f4eb38f7c881cac67c75ea9b00bf97b210',
'reference' => '8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89',
),
'erusev/parsedown' =>
array (
@@ -135,80 +135,80 @@ private static $installed = array (
),
'guzzlehttp/promises' =>
array (
'pretty_version' => '1.4.1',
'version' => '1.4.1.0',
'pretty_version' => '1.5.1',
'version' => '1.5.1.0',
'aliases' =>
array (
),
'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da',
),
'guzzlehttp/psr7' =>
array (
'pretty_version' => '1.8.2',
'version' => '1.8.2.0',
'pretty_version' => '1.8.3',
'version' => '1.8.3.0',
'aliases' =>
array (
),
'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91',
'reference' => '1afdd860a2566ed3c2b0b4a3de6e23434a79ec85',
),
'illuminate/bus' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => '808097c0dfd893309bd77b00139586c516b965c9',
'reference' => 'be400399687b97d5558a224e970060fd5d5f2735',
),
'illuminate/collections' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => '18fa841df912ec56849351dd6ca8928e8a98b69d',
'reference' => '05f286ec5fd2dd286e8384577047efc375c8954c',
),
'illuminate/container' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => '862b64ea4ab56e307a1676104a1b93295d347ad0',
'reference' => 'ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d',
),
'illuminate/contracts' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => 'ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913',
'reference' => 'e76f4bce73a2a1656add24bd5210ebc4b8af49c0',
),
'illuminate/database' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => 'acc11d6839ddb3b694bc6585177fa5141b70c693',
'reference' => '43c7ffb6299ae55b000b286cf1278afd268ef29f',
),
'illuminate/events' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => '7def78033f29cd0c0383513b27c291d233a7f90e',
'reference' => 'b7f06cafb6c09581617f2ca05d69e9b159e5a35d',
),
'illuminate/macroable' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
@@ -216,8 +216,8 @@ private static $installed = array (
),
'illuminate/pipeline' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
@@ -225,12 +225,12 @@ private static $installed = array (
),
'illuminate/support' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => 'b0a21c41163381dd9a5abbd68fe85ed7b4247d30',
'reference' => 'a8851b7001530d3c11626a81449ed9b63dd10db7',
),
'league/plates' =>
array (
@@ -261,12 +261,12 @@ private static $installed = array (
),
'nesbot/carbon' =>
array (
'pretty_version' => '2.53.1',
'version' => '2.53.1.0',
'pretty_version' => '2.54.0',
'version' => '2.54.0.0',
'aliases' =>
array (
),
'reference' => 'f4655858a784988f880c1b8c7feabbf02dfdf045',
'reference' => 'eed83939f1aed3eee517d03a33f5ec587ac529b5',
),
'netresearch/jsonmapper' =>
array (
@@ -297,12 +297,12 @@ private static $installed = array (
),
'nette/utils' =>
array (
'pretty_version' => 'v3.2.2',
'version' => '3.2.2.0',
'pretty_version' => 'v3.2.5',
'version' => '3.2.5.0',
'aliases' =>
array (
),
'reference' => '967cfc4f9a1acd5f1058d76715a424c53343c20c',
'reference' => '9cd80396ca58d7969ab44fc7afcf03624dfa526e',
),
'pguardiario/phpuri' =>
array (
@@ -315,12 +315,12 @@ private static $installed = array (
),
'phan/phan' =>
array (
'pretty_version' => '5.0.0',
'version' => '5.0.0.0',
'pretty_version' => '5.2.1',
'version' => '5.2.1.0',
'aliases' =>
array (
),
'reference' => 'f36b6b9a2f4143a25f35ce94d712ceb0527e9d90',
'reference' => 'd724bbb8fc3ba89179868bb5220ecdf6a9c1636b',
),
'php-extended/php-system' =>
array (
@@ -351,30 +351,30 @@ private static $installed = array (
),
'phpdocumentor/reflection-docblock' =>
array (
'pretty_version' => '5.2.2',
'version' => '5.2.2.0',
'pretty_version' => '5.3.0',
'version' => '5.3.0.0',
'aliases' =>
array (
),
'reference' => '069a785b2141f5bcf49f3e353548dc1cce6df556',
'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170',
),
'phpdocumentor/type-resolver' =>
array (
'pretty_version' => '1.4.0',
'version' => '1.4.0.0',
'pretty_version' => '1.5.1',
'version' => '1.5.1.0',
'aliases' =>
array (
),
'reference' => '6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0',
'reference' => 'a12f7e301eb7258bb68acd89d4aefa05c2906cae',
),
'psr/container' =>
array (
'pretty_version' => '1.1.1',
'version' => '1.1.1.0',
'pretty_version' => '1.1.2',
'version' => '1.1.2.0',
'aliases' =>
array (
),
'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
),
'psr/container-implementation' =>
array (
@@ -436,12 +436,12 @@ private static $installed = array (
),
'sabre/event' =>
array (
'pretty_version' => '5.1.2',
'version' => '5.1.2.0',
'pretty_version' => '5.1.4',
'version' => '5.1.4.0',
'aliases' =>
array (
),
'reference' => 'c120bec57c17b6251a496efc82b732418b49d50a',
'reference' => 'd7da22897125d34d7eddf7977758191c06a74497',
),
'sammo-hid/sammo' =>
array (
@@ -450,16 +450,7 @@ private static $installed = array (
'aliases' =>
array (
),
'reference' => '40a20a55d3aa08f0ab58a50b0572b17dce33de80',
),
'scssphp/scssphp' =>
array (
'pretty_version' => 'v1.6.0',
'version' => '1.6.0.0',
'aliases' =>
array (
),
'reference' => 'b83594e2323c5d6e80785df3f91b9d1d32aad530',
'reference' => '872755e57f84720a9c4c63d5455441f83c41f6c6',
),
'sergeytsalkov/meekrodb' =>
array (
@@ -472,12 +463,12 @@ private static $installed = array (
),
'symfony/console' =>
array (
'pretty_version' => 'v5.3.6',
'version' => '5.3.6.0',
'pretty_version' => 'v5.3.10',
'version' => '5.3.10.0',
'aliases' =>
array (
),
'reference' => '51b71afd6d2dc8f5063199357b9880cea8d8bfe2',
'reference' => 'd4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3',
),
'symfony/deprecation-contracts' =>
array (
@@ -490,12 +481,12 @@ private static $installed = array (
),
'symfony/lock' =>
array (
'pretty_version' => 'v4.4.27',
'version' => '4.4.27.0',
'pretty_version' => 'v4.4.33',
'version' => '4.4.33.0',
'aliases' =>
array (
),
'reference' => '6ca476d4ac992802f2a4043929f68f1818449486',
'reference' => '567d29b1bc6e3937652054dafc069151d17824a9',
),
'symfony/polyfill-ctype' =>
array (
@@ -580,21 +571,21 @@ private static $installed = array (
),
'symfony/string' =>
array (
'pretty_version' => 'v5.3.3',
'version' => '5.3.3.0',
'pretty_version' => 'v5.3.10',
'version' => '5.3.10.0',
'aliases' =>
array (
),
'reference' => 'bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1',
'reference' => 'd70c35bb20bbca71fc4ab7921e3c6bda1a82a60c',
),
'symfony/translation' =>
array (
'pretty_version' => 'v5.3.7',
'version' => '5.3.7.0',
'pretty_version' => 'v5.3.10',
'version' => '5.3.10.0',
'aliases' =>
array (
),
'reference' => '4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6',
'reference' => '6ef197aea2ac8b9cd63e0da7522b3771714035aa',
),
'symfony/translation-contracts' =>
array (
@@ -614,12 +605,12 @@ private static $installed = array (
),
'tysonandre/var_representation_polyfill' =>
array (
'pretty_version' => '0.0.2',
'version' => '0.0.2.0',
'pretty_version' => '0.1.1',
'version' => '0.1.1.0',
'aliases' =>
array (
),
'reference' => '3f17999ee1f257319ddc6721dd26ebbc5d175f33',
'reference' => '0a942e74e18af5514749895507bc6ca7ab96399a',
),
'vlucas/valitron' =>
array (
+1
View File
@@ -108,6 +108,7 @@ return array(
'Nette\\Utils\\Reflection' => $vendorDir . '/nette/utils/src/Utils/Reflection.php',
'Nette\\Utils\\RegexpException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
'Nette\\Utils\\Strings' => $vendorDir . '/nette/utils/src/Utils/Strings.php',
'Nette\\Utils\\Type' => $vendorDir . '/nette/utils/src/Utils/Type.php',
'Nette\\Utils\\UnknownImageFileException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php',
'Nette\\Utils\\Validators' => $vendorDir . '/nette/utils/src/Utils/Validators.php',
'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
+1 -1
View File
@@ -28,7 +28,7 @@ return array(
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'6714be961f4a45ae8b9a99d5d55c5d07' => $vendorDir . '/tysonandre/var_representation_polyfill/src/var_representation.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'5b154887902198b16314243c6e0e3e19' => $vendorDir . '/pguardiario/phpuri/phpuri.php',
'ef65a1626449d89d0811cf9befce46f0' => $vendorDir . '/illuminate/events/functions.php',
'5b154887902198b16314243c6e0e3e19' => $vendorDir . '/pguardiario/phpuri/phpuri.php',
'870dc64919afa8b0f700701bb2c6a783' => $baseDir . '/f_config/config.php',
);
-1
View File
@@ -27,7 +27,6 @@ return array(
'Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'),
'Symfony\\Component\\Lock\\' => array($vendorDir . '/symfony/lock'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'ScssPhp\\ScssPhp\\' => array($vendorDir . '/scssphp/scssphp/src'),
'Sabre\\Event\\' => array($vendorDir . '/sabre/event/lib'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
+2 -6
View File
@@ -29,8 +29,8 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'6714be961f4a45ae8b9a99d5d55c5d07' => __DIR__ . '/..' . '/tysonandre/var_representation_polyfill/src/var_representation.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'5b154887902198b16314243c6e0e3e19' => __DIR__ . '/..' . '/pguardiario/phpuri/phpuri.php',
'ef65a1626449d89d0811cf9befce46f0' => __DIR__ . '/..' . '/illuminate/events/functions.php',
'5b154887902198b16314243c6e0e3e19' => __DIR__ . '/..' . '/pguardiario/phpuri/phpuri.php',
'870dc64919afa8b0f700701bb2c6a783' => __DIR__ . '/../..' . '/f_config/config.php',
);
@@ -76,7 +76,6 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
'Symfony\\Component\\String\\' => 25,
'Symfony\\Component\\Lock\\' => 23,
'Symfony\\Component\\Console\\' => 26,
'ScssPhp\\ScssPhp\\' => 16,
'Sabre\\Event\\' => 12,
),
'P' =>
@@ -218,10 +217,6 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
array (
0 => __DIR__ . '/..' . '/symfony/console',
),
'ScssPhp\\ScssPhp\\' =>
array (
0 => __DIR__ . '/..' . '/scssphp/scssphp/src',
),
'Sabre\\Event\\' =>
array (
0 => __DIR__ . '/..' . '/sabre/event/lib',
@@ -472,6 +467,7 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
'Nette\\Utils\\Reflection' => __DIR__ . '/..' . '/nette/utils/src/Utils/Reflection.php',
'Nette\\Utils\\RegexpException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
'Nette\\Utils\\Strings' => __DIR__ . '/..' . '/nette/utils/src/Utils/Strings.php',
'Nette\\Utils\\Type' => __DIR__ . '/..' . '/nette/utils/src/Utils/Type.php',
'Nette\\Utils\\UnknownImageFileException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php',
'Nette\\Utils\\Validators' => __DIR__ . '/..' . '/nette/utils/src/Utils/Validators.php',
'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
+244 -254
View File
@@ -118,17 +118,17 @@
},
{
"name": "composer/semver",
"version": "3.2.5",
"version_normalized": "3.2.5.0",
"version": "3.2.6",
"version_normalized": "3.2.6.0",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9"
"reference": "83e511e247de329283478496f7a1e114c9517506"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9",
"url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506",
"reference": "83e511e247de329283478496f7a1e114c9517506",
"shasum": ""
},
"require": {
@@ -138,7 +138,7 @@
"phpstan/phpstan": "^0.12.54",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"time": "2021-05-24T12:41:47+00:00",
"time": "2021-10-25T11:34:17+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -182,7 +182,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.2.5"
"source": "https://github.com/composer/semver/tree/3.2.6"
},
"funding": [
{
@@ -269,36 +269,32 @@
},
{
"name": "doctrine/inflector",
"version": "2.0.3",
"version_normalized": "2.0.3.0",
"version": "2.0.4",
"version_normalized": "2.0.4.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
"reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210"
"reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210",
"reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
"reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^7.0",
"phpstan/phpstan": "^0.11",
"phpstan/phpstan-phpunit": "^0.11",
"phpstan/phpstan-strict-rules": "^0.11",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
"doctrine/coding-standard": "^8.2",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"vimeo/psalm": "^4.10"
},
"time": "2020-05-29T15:13:26+00:00",
"time": "2021-10-22T20:16:43+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
@@ -347,7 +343,7 @@
],
"support": {
"issues": "https://github.com/doctrine/inflector/issues",
"source": "https://github.com/doctrine/inflector/tree/2.0.x"
"source": "https://github.com/doctrine/inflector/tree/2.0.4"
},
"funding": [
{
@@ -684,17 +680,17 @@
},
{
"name": "guzzlehttp/promises",
"version": "1.4.1",
"version_normalized": "1.4.1.0",
"version": "1.5.1",
"version_normalized": "1.5.1.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"shasum": ""
},
"require": {
@@ -703,11 +699,11 @@
"require-dev": {
"symfony/phpunit-bridge": "^4.4 || ^5.1"
},
"time": "2021-03-07T09:25:29+00:00",
"time": "2021-10-22T20:56:57+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
"dev-master": "1.5-dev"
}
},
"installation-source": "dist",
@@ -724,10 +720,25 @@
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
}
],
"description": "Guzzle promises library",
@@ -736,23 +747,37 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.4.1"
"source": "https://github.com/guzzle/promises/tree/1.5.1"
},
"funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
"type": "tidelift"
}
],
"install-path": "../guzzlehttp/promises"
},
{
"name": "guzzlehttp/psr7",
"version": "1.8.2",
"version_normalized": "1.8.2.0",
"version": "1.8.3",
"version_normalized": "1.8.3.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
"shasum": ""
},
"require": {
@@ -770,7 +795,7 @@
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
"time": "2021-04-26T09:17:50+00:00",
"time": "2021-10-05T13:56:00+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -791,13 +816,34 @@
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "George Mponos",
"email": "gmponos@gmail.com",
"homepage": "https://github.com/gmponos"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com",
"homepage": "https://github.com/sagikazarmark"
},
{
"name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
}
],
@@ -814,23 +860,37 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/1.8.2"
"source": "https://github.com/guzzle/psr7/tree/1.8.3"
},
"funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
"type": "tidelift"
}
],
"install-path": "../guzzlehttp/psr7"
},
{
"name": "illuminate/bus",
"version": "v8.61.0",
"version_normalized": "8.61.0.0",
"version": "v8.69.0",
"version_normalized": "8.69.0.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/bus.git",
"reference": "808097c0dfd893309bd77b00139586c516b965c9"
"reference": "be400399687b97d5558a224e970060fd5d5f2735"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/bus/zipball/808097c0dfd893309bd77b00139586c516b965c9",
"reference": "808097c0dfd893309bd77b00139586c516b965c9",
"url": "https://api.github.com/repos/illuminate/bus/zipball/be400399687b97d5558a224e970060fd5d5f2735",
"reference": "be400399687b97d5558a224e970060fd5d5f2735",
"shasum": ""
},
"require": {
@@ -843,7 +903,7 @@
"suggest": {
"illuminate/queue": "Required to use closures when chaining jobs (^7.0)."
},
"time": "2021-08-10T16:49:48+00:00",
"time": "2021-10-21T19:19:36+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -876,17 +936,17 @@
},
{
"name": "illuminate/collections",
"version": "v8.61.0",
"version_normalized": "8.61.0.0",
"version": "v8.69.0",
"version_normalized": "8.69.0.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/collections.git",
"reference": "18fa841df912ec56849351dd6ca8928e8a98b69d"
"reference": "05f286ec5fd2dd286e8384577047efc375c8954c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/collections/zipball/18fa841df912ec56849351dd6ca8928e8a98b69d",
"reference": "18fa841df912ec56849351dd6ca8928e8a98b69d",
"url": "https://api.github.com/repos/illuminate/collections/zipball/05f286ec5fd2dd286e8384577047efc375c8954c",
"reference": "05f286ec5fd2dd286e8384577047efc375c8954c",
"shasum": ""
},
"require": {
@@ -897,7 +957,7 @@
"suggest": {
"symfony/var-dumper": "Required to use the dump method (^5.1.4)."
},
"time": "2021-09-08T12:48:16+00:00",
"time": "2021-10-22T18:01:46+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -933,17 +993,17 @@
},
{
"name": "illuminate/container",
"version": "v8.61.0",
"version_normalized": "8.61.0.0",
"version": "v8.69.0",
"version_normalized": "8.69.0.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/container.git",
"reference": "862b64ea4ab56e307a1676104a1b93295d347ad0"
"reference": "ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/container/zipball/862b64ea4ab56e307a1676104a1b93295d347ad0",
"reference": "862b64ea4ab56e307a1676104a1b93295d347ad0",
"url": "https://api.github.com/repos/illuminate/container/zipball/ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d",
"reference": "ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d",
"shasum": ""
},
"require": {
@@ -954,7 +1014,7 @@
"provide": {
"psr/container-implementation": "1.0"
},
"time": "2021-09-09T13:55:23+00:00",
"time": "2021-09-15T14:32:50+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -987,17 +1047,17 @@
},
{
"name": "illuminate/contracts",
"version": "v8.61.0",
"version_normalized": "8.61.0.0",
"version": "v8.69.0",
"version_normalized": "8.69.0.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/contracts.git",
"reference": "ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913"
"reference": "e76f4bce73a2a1656add24bd5210ebc4b8af49c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913",
"reference": "ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/e76f4bce73a2a1656add24bd5210ebc4b8af49c0",
"reference": "e76f4bce73a2a1656add24bd5210ebc4b8af49c0",
"shasum": ""
},
"require": {
@@ -1005,7 +1065,7 @@
"psr/container": "^1.0",
"psr/simple-cache": "^1.0"
},
"time": "2021-09-08T12:09:40+00:00",
"time": "2021-10-22T18:01:46+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -1038,17 +1098,17 @@
},
{
"name": "illuminate/database",
"version": "v8.61.0",
"version_normalized": "8.61.0.0",
"version": "v8.69.0",
"version_normalized": "8.69.0.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/database.git",
"reference": "acc11d6839ddb3b694bc6585177fa5141b70c693"
"reference": "43c7ffb6299ae55b000b286cf1278afd268ef29f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/database/zipball/acc11d6839ddb3b694bc6585177fa5141b70c693",
"reference": "acc11d6839ddb3b694bc6585177fa5141b70c693",
"url": "https://api.github.com/repos/illuminate/database/zipball/43c7ffb6299ae55b000b286cf1278afd268ef29f",
"reference": "43c7ffb6299ae55b000b286cf1278afd268ef29f",
"shasum": ""
},
"require": {
@@ -1062,7 +1122,7 @@
"symfony/console": "^5.1.4"
},
"suggest": {
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6|^3.0).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.2).",
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
"illuminate/console": "Required to use the database commands (^8.0).",
"illuminate/events": "Required to use the observers with Eloquent (^8.0).",
@@ -1070,7 +1130,7 @@
"illuminate/pagination": "Required to paginate the result set (^8.0).",
"symfony/finder": "Required to use Eloquent model factories (^5.1.4)."
},
"time": "2021-09-13T18:43:43+00:00",
"time": "2021-10-29T19:46:53+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -1109,17 +1169,17 @@
},
{
"name": "illuminate/events",
"version": "v8.61.0",
"version_normalized": "8.61.0.0",
"version": "v8.69.0",
"version_normalized": "8.69.0.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/events.git",
"reference": "7def78033f29cd0c0383513b27c291d233a7f90e"
"reference": "b7f06cafb6c09581617f2ca05d69e9b159e5a35d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/events/zipball/7def78033f29cd0c0383513b27c291d233a7f90e",
"reference": "7def78033f29cd0c0383513b27c291d233a7f90e",
"url": "https://api.github.com/repos/illuminate/events/zipball/b7f06cafb6c09581617f2ca05d69e9b159e5a35d",
"reference": "b7f06cafb6c09581617f2ca05d69e9b159e5a35d",
"shasum": ""
},
"require": {
@@ -1131,7 +1191,7 @@
"illuminate/support": "^8.0",
"php": "^7.3|^8.0"
},
"time": "2021-08-16T21:45:47+00:00",
"time": "2021-09-15T14:32:50+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -1167,8 +1227,8 @@
},
{
"name": "illuminate/macroable",
"version": "v8.61.0",
"version_normalized": "8.61.0.0",
"version": "v8.69.0",
"version_normalized": "8.69.0.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/macroable.git",
@@ -1216,8 +1276,8 @@
},
{
"name": "illuminate/pipeline",
"version": "v8.61.0",
"version_normalized": "8.61.0.0",
"version": "v8.69.0",
"version_normalized": "8.69.0.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/pipeline.git",
@@ -1267,17 +1327,17 @@
},
{
"name": "illuminate/support",
"version": "v8.61.0",
"version_normalized": "8.61.0.0",
"version": "v8.69.0",
"version_normalized": "8.69.0.0",
"source": {
"type": "git",
"url": "https://github.com/illuminate/support.git",
"reference": "b0a21c41163381dd9a5abbd68fe85ed7b4247d30"
"reference": "a8851b7001530d3c11626a81449ed9b63dd10db7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/support/zipball/b0a21c41163381dd9a5abbd68fe85ed7b4247d30",
"reference": "b0a21c41163381dd9a5abbd68fe85ed7b4247d30",
"url": "https://api.github.com/repos/illuminate/support/zipball/a8851b7001530d3c11626a81449ed9b63dd10db7",
"reference": "a8851b7001530d3c11626a81449ed9b63dd10db7",
"shasum": ""
},
"require": {
@@ -1287,7 +1347,7 @@
"illuminate/collections": "^8.0",
"illuminate/contracts": "^8.0",
"illuminate/macroable": "^8.0",
"nesbot/carbon": "^2.31",
"nesbot/carbon": "^2.53.1",
"php": "^7.3|^8.0",
"voku/portable-ascii": "^1.4.8"
},
@@ -1296,13 +1356,13 @@
},
"suggest": {
"illuminate/filesystem": "Required to use the composer class (^8.0).",
"league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0).",
"ramsey/uuid": "Required to use Str::uuid() (^4.0).",
"league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0.2).",
"ramsey/uuid": "Required to use Str::uuid() (^4.2.2).",
"symfony/process": "Required to use the composer class (^5.1.4).",
"symfony/var-dumper": "Required to use the dd function (^5.1.4).",
"vlucas/phpdotenv": "Required to use the Env class and env helper (^5.2)."
},
"time": "2021-09-13T18:43:43+00:00",
"time": "2021-10-29T13:34:03+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -1542,17 +1602,17 @@
},
{
"name": "nesbot/carbon",
"version": "2.53.1",
"version_normalized": "2.53.1.0",
"version": "2.54.0",
"version_normalized": "2.54.0.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "f4655858a784988f880c1b8c7feabbf02dfdf045"
"reference": "eed83939f1aed3eee517d03a33f5ec587ac529b5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f4655858a784988f880c1b8c7feabbf02dfdf045",
"reference": "f4655858a784988f880c1b8c7feabbf02dfdf045",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/eed83939f1aed3eee517d03a33f5ec587ac529b5",
"reference": "eed83939f1aed3eee517d03a33f5ec587ac529b5",
"shasum": ""
},
"require": {
@@ -1563,6 +1623,7 @@
"symfony/translation": "^3.4 || ^4.0 || ^5.0"
},
"require-dev": {
"doctrine/dbal": "^2.0 || ^3.0",
"doctrine/orm": "^2.7",
"friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0",
@@ -1572,7 +1633,7 @@
"phpunit/phpunit": "^7.5.20 || ^8.5.14",
"squizlabs/php_codesniffer": "^3.4"
},
"time": "2021-09-06T09:29:23+00:00",
"time": "2021-11-01T21:22:20+00:00",
"bin": [
"bin/carbon"
],
@@ -1833,21 +1894,21 @@
},
{
"name": "nette/utils",
"version": "v3.2.2",
"version_normalized": "3.2.2.0",
"version": "v3.2.5",
"version_normalized": "3.2.5.0",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c"
"reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/967cfc4f9a1acd5f1058d76715a424c53343c20c",
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c",
"url": "https://api.github.com/repos/nette/utils/zipball/9cd80396ca58d7969ab44fc7afcf03624dfa526e",
"reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e",
"shasum": ""
},
"require": {
"php": ">=7.2 <8.1"
"php": ">=7.2 <8.2"
},
"conflict": {
"nette/di": "<3.0.6"
@@ -1866,7 +1927,7 @@
"ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()",
"ext-xml": "to use Strings::length() etc. when mbstring is not available"
},
"time": "2021-03-03T22:53:25+00:00",
"time": "2021-09-20T10:50:11+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -1915,7 +1976,7 @@
],
"support": {
"issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v3.2.2"
"source": "https://github.com/nette/utils/tree/v3.2.5"
},
"install-path": "../nette/utils"
},
@@ -1948,17 +2009,17 @@
},
{
"name": "phan/phan",
"version": "5.0.0",
"version_normalized": "5.0.0.0",
"version": "5.2.1",
"version_normalized": "5.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/phan/phan.git",
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90"
"reference": "d724bbb8fc3ba89179868bb5220ecdf6a9c1636b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phan/phan/zipball/f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
"url": "https://api.github.com/repos/phan/phan/zipball/d724bbb8fc3ba89179868bb5220ecdf6a9c1636b",
"reference": "d724bbb8fc3ba89179868bb5220ecdf6a9c1636b",
"shasum": ""
},
"require": {
@@ -1975,7 +2036,7 @@
"symfony/console": "^3.2|^4.0|^5.0",
"symfony/polyfill-mbstring": "^1.11.0",
"symfony/polyfill-php80": "^1.20.0",
"tysonandre/var_representation_polyfill": "^0.0.2"
"tysonandre/var_representation_polyfill": "^0.0.2|^0.1.0"
},
"require-dev": {
"phpunit/phpunit": "^8.5.0"
@@ -1988,7 +2049,7 @@
"ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions.",
"ext-var_representation": "Suggested for converting values to strings in issue messages"
},
"time": "2021-08-01T18:17:28+00:00",
"time": "2021-09-15T00:08:40+00:00",
"bin": [
"phan",
"phan_client",
@@ -2024,7 +2085,7 @@
],
"support": {
"issues": "https://github.com/phan/phan/issues",
"source": "https://github.com/phan/phan/tree/5.0.0"
"source": "https://github.com/phan/phan/tree/5.2.1"
},
"install-path": "../phan/phan"
},
@@ -2176,17 +2237,17 @@
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.2.2",
"version_normalized": "5.2.2.0",
"version": "5.3.0",
"version_normalized": "5.3.0.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"shasum": ""
},
"require": {
@@ -2197,9 +2258,10 @@
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"mockery/mockery": "~1.3.2"
"mockery/mockery": "~1.3.2",
"psalm/phar": "^4.8"
},
"time": "2020-09-03T19:13:55+00:00",
"time": "2021-10-19T17:43:47+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -2229,23 +2291,23 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
},
"install-path": "../phpdocumentor/reflection-docblock"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.4.0",
"version_normalized": "1.4.0.0",
"version": "1.5.1",
"version_normalized": "1.5.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"shasum": ""
},
"require": {
@@ -2253,9 +2315,10 @@
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"ext-tokenizer": "*"
"ext-tokenizer": "*",
"psalm/phar": "^4.8"
},
"time": "2020-09-17T18:55:26+00:00",
"time": "2021-10-02T14:08:47+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -2281,29 +2344,29 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1"
},
"install-path": "../phpdocumentor/type-resolver"
},
{
"name": "psr/container",
"version": "1.1.1",
"version_normalized": "1.1.1.0",
"version": "1.1.2",
"version_normalized": "1.1.2.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": ""
},
"require": {
"php": ">=7.2.0"
"php": ">=7.4.0"
},
"time": "2021-03-05T17:36:06+00:00",
"time": "2021-11-05T16:50:12+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -2332,7 +2395,7 @@
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.1"
"source": "https://github.com/php-fig/container/tree/1.1.2"
},
"install-path": "../psr/container"
},
@@ -2541,28 +2604,28 @@
},
{
"name": "sabre/event",
"version": "5.1.2",
"version_normalized": "5.1.2.0",
"version": "5.1.4",
"version_normalized": "5.1.4.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/event.git",
"reference": "c120bec57c17b6251a496efc82b732418b49d50a"
"reference": "d7da22897125d34d7eddf7977758191c06a74497"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/event/zipball/c120bec57c17b6251a496efc82b732418b49d50a",
"reference": "c120bec57c17b6251a496efc82b732418b49d50a",
"url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497",
"reference": "d7da22897125d34d7eddf7977758191c06a74497",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.16.1",
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
},
"time": "2020-10-03T11:02:22+00:00",
"time": "2021-11-04T06:51:17+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -2608,82 +2671,6 @@
},
"install-path": "../sabre/event"
},
{
"name": "scssphp/scssphp",
"version": "v1.6.0",
"version_normalized": "1.6.0.0",
"source": {
"type": "git",
"url": "https://github.com/scssphp/scssphp.git",
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/b83594e2323c5d6e80785df3f91b9d1d32aad530",
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-json": "*",
"php": ">=5.6.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4",
"sass/sass-spec": "*",
"squizlabs/php_codesniffer": "~3.5",
"symfony/phpunit-bridge": "^5.1",
"twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.0",
"zurb/foundation": "~6.5"
},
"suggest": {
"ext-iconv": "Can be used as fallback when ext-mbstring is not available",
"ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
},
"time": "2021-07-02T16:28:10+00:00",
"bin": [
"bin/pscss"
],
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"ScssPhp\\ScssPhp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Anthon Pang",
"email": "apang@softwaredevelopment.ca",
"homepage": "https://github.com/robocoder"
},
{
"name": "Cédric Morin",
"email": "cedric@yterium.com",
"homepage": "https://github.com/Cerdic"
}
],
"description": "scssphp is a compiler for SCSS written in PHP.",
"homepage": "http://scssphp.github.io/scssphp/",
"keywords": [
"css",
"less",
"sass",
"scss",
"stylesheet"
],
"support": {
"issues": "https://github.com/scssphp/scssphp/issues",
"source": "https://github.com/scssphp/scssphp/tree/v1.6.0"
},
"install-path": "../scssphp/scssphp"
},
{
"name": "sergeytsalkov/meekrodb",
"version": "v2.4",
@@ -2737,17 +2724,17 @@
},
{
"name": "symfony/console",
"version": "v5.3.6",
"version_normalized": "5.3.6.0",
"version": "v5.3.10",
"version_normalized": "5.3.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2"
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
"url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
"shasum": ""
},
"require": {
@@ -2785,7 +2772,7 @@
"symfony/lock": "",
"symfony/process": ""
},
"time": "2021-07-27T19:10:22+00:00",
"time": "2021-10-26T09:30:15+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -2819,7 +2806,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.3.6"
"source": "https://github.com/symfony/console/tree/v5.3.10"
},
"funding": [
{
@@ -2909,17 +2896,17 @@
},
{
"name": "symfony/lock",
"version": "v4.4.27",
"version_normalized": "4.4.27.0",
"version": "v4.4.33",
"version_normalized": "4.4.33.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/lock.git",
"reference": "6ca476d4ac992802f2a4043929f68f1818449486"
"reference": "567d29b1bc6e3937652054dafc069151d17824a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/lock/zipball/6ca476d4ac992802f2a4043929f68f1818449486",
"reference": "6ca476d4ac992802f2a4043929f68f1818449486",
"url": "https://api.github.com/repos/symfony/lock/zipball/567d29b1bc6e3937652054dafc069151d17824a9",
"reference": "567d29b1bc6e3937652054dafc069151d17824a9",
"shasum": ""
},
"require": {
@@ -2934,7 +2921,7 @@
"doctrine/dbal": "^2.6|^3.0",
"predis/predis": "~1.0"
},
"time": "2021-07-23T15:41:52+00:00",
"time": "2021-10-05T20:27:01+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -2970,7 +2957,7 @@
"semaphore"
],
"support": {
"source": "https://github.com/symfony/lock/tree/v4.4.27"
"source": "https://github.com/symfony/lock/tree/v4.4.33"
},
"funding": [
{
@@ -3745,17 +3732,17 @@
},
{
"name": "symfony/string",
"version": "v5.3.3",
"version_normalized": "5.3.3.0",
"version": "v5.3.10",
"version_normalized": "5.3.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1"
"reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
"url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c",
"reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c",
"shasum": ""
},
"require": {
@@ -3772,7 +3759,7 @@
"symfony/translation-contracts": "^1.1|^2",
"symfony/var-exporter": "^4.4|^5.0"
},
"time": "2021-06-27T11:44:38+00:00",
"time": "2021-10-27T18:21:46+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -3811,7 +3798,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.3.3"
"source": "https://github.com/symfony/string/tree/v5.3.10"
},
"funding": [
{
@@ -3831,17 +3818,17 @@
},
{
"name": "symfony/translation",
"version": "v5.3.7",
"version_normalized": "5.3.7.0",
"version": "v5.3.10",
"version_normalized": "5.3.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6"
"reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6",
"reference": "4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6",
"url": "https://api.github.com/repos/symfony/translation/zipball/6ef197aea2ac8b9cd63e0da7522b3771714035aa",
"reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa",
"shasum": ""
},
"require": {
@@ -3878,7 +3865,7 @@
"symfony/config": "",
"symfony/yaml": ""
},
"time": "2021-08-26T08:22:53+00:00",
"time": "2021-10-10T06:43:24+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -3909,7 +3896,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/translation/tree/v5.3.7"
"source": "https://github.com/symfony/translation/tree/v5.3.10"
},
"funding": [
{
@@ -4010,17 +3997,17 @@
},
{
"name": "tysonandre/var_representation_polyfill",
"version": "0.0.2",
"version_normalized": "0.0.2.0",
"version": "0.1.1",
"version_normalized": "0.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/TysonAndre/var_representation_polyfill.git",
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33"
"reference": "0a942e74e18af5514749895507bc6ca7ab96399a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/3f17999ee1f257319ddc6721dd26ebbc5d175f33",
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33",
"url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/0a942e74e18af5514749895507bc6ca7ab96399a",
"reference": "0a942e74e18af5514749895507bc6ca7ab96399a",
"shasum": ""
},
"require": {
@@ -4031,7 +4018,10 @@
"phan/phan": "^4.0",
"phpunit/phpunit": "^8.5.0"
},
"time": "2021-06-26T18:55:02+00:00",
"suggest": {
"ext-var_representation": "*"
},
"time": "2021-08-16T00:12:50+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -4051,14 +4041,14 @@
"name": "Tyson Andre"
}
],
"description": "Polyfill for var_representation",
"description": "Polyfill for var_representation: convert a variable to a string in a way that fixes the shortcomings of var_export",
"keywords": [
"var_export",
"var_representation"
],
"support": {
"issues": "https://github.com/TysonAndre/var_representation_polyfill/issues",
"source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.0.2"
"source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.1"
},
"install-path": "../tysonandre/var_representation_polyfill"
},
+75 -84
View File
@@ -6,7 +6,7 @@
'aliases' =>
array (
),
'reference' => '40a20a55d3aa08f0ab58a50b0572b17dce33de80',
'reference' => '872755e57f84720a9c4c63d5455441f83c41f6c6',
'name' => 'sammo-hid/sammo',
),
'versions' =>
@@ -31,12 +31,12 @@
),
'composer/semver' =>
array (
'pretty_version' => '3.2.5',
'version' => '3.2.5.0',
'pretty_version' => '3.2.6',
'version' => '3.2.6.0',
'aliases' =>
array (
),
'reference' => '31f3ea725711245195f62e54ffa402d8ef2fdba9',
'reference' => '83e511e247de329283478496f7a1e114c9517506',
),
'composer/xdebug-handler' =>
array (
@@ -49,12 +49,12 @@
),
'doctrine/inflector' =>
array (
'pretty_version' => '2.0.3',
'version' => '2.0.3.0',
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
'aliases' =>
array (
),
'reference' => '9cf661f4eb38f7c881cac67c75ea9b00bf97b210',
'reference' => '8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89',
),
'erusev/parsedown' =>
array (
@@ -112,80 +112,80 @@
),
'guzzlehttp/promises' =>
array (
'pretty_version' => '1.4.1',
'version' => '1.4.1.0',
'pretty_version' => '1.5.1',
'version' => '1.5.1.0',
'aliases' =>
array (
),
'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da',
),
'guzzlehttp/psr7' =>
array (
'pretty_version' => '1.8.2',
'version' => '1.8.2.0',
'pretty_version' => '1.8.3',
'version' => '1.8.3.0',
'aliases' =>
array (
),
'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91',
'reference' => '1afdd860a2566ed3c2b0b4a3de6e23434a79ec85',
),
'illuminate/bus' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => '808097c0dfd893309bd77b00139586c516b965c9',
'reference' => 'be400399687b97d5558a224e970060fd5d5f2735',
),
'illuminate/collections' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => '18fa841df912ec56849351dd6ca8928e8a98b69d',
'reference' => '05f286ec5fd2dd286e8384577047efc375c8954c',
),
'illuminate/container' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => '862b64ea4ab56e307a1676104a1b93295d347ad0',
'reference' => 'ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d',
),
'illuminate/contracts' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => 'ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913',
'reference' => 'e76f4bce73a2a1656add24bd5210ebc4b8af49c0',
),
'illuminate/database' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => 'acc11d6839ddb3b694bc6585177fa5141b70c693',
'reference' => '43c7ffb6299ae55b000b286cf1278afd268ef29f',
),
'illuminate/events' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => '7def78033f29cd0c0383513b27c291d233a7f90e',
'reference' => 'b7f06cafb6c09581617f2ca05d69e9b159e5a35d',
),
'illuminate/macroable' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
@@ -193,8 +193,8 @@
),
'illuminate/pipeline' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
@@ -202,12 +202,12 @@
),
'illuminate/support' =>
array (
'pretty_version' => 'v8.61.0',
'version' => '8.61.0.0',
'pretty_version' => 'v8.69.0',
'version' => '8.69.0.0',
'aliases' =>
array (
),
'reference' => 'b0a21c41163381dd9a5abbd68fe85ed7b4247d30',
'reference' => 'a8851b7001530d3c11626a81449ed9b63dd10db7',
),
'league/plates' =>
array (
@@ -238,12 +238,12 @@
),
'nesbot/carbon' =>
array (
'pretty_version' => '2.53.1',
'version' => '2.53.1.0',
'pretty_version' => '2.54.0',
'version' => '2.54.0.0',
'aliases' =>
array (
),
'reference' => 'f4655858a784988f880c1b8c7feabbf02dfdf045',
'reference' => 'eed83939f1aed3eee517d03a33f5ec587ac529b5',
),
'netresearch/jsonmapper' =>
array (
@@ -274,12 +274,12 @@
),
'nette/utils' =>
array (
'pretty_version' => 'v3.2.2',
'version' => '3.2.2.0',
'pretty_version' => 'v3.2.5',
'version' => '3.2.5.0',
'aliases' =>
array (
),
'reference' => '967cfc4f9a1acd5f1058d76715a424c53343c20c',
'reference' => '9cd80396ca58d7969ab44fc7afcf03624dfa526e',
),
'pguardiario/phpuri' =>
array (
@@ -292,12 +292,12 @@
),
'phan/phan' =>
array (
'pretty_version' => '5.0.0',
'version' => '5.0.0.0',
'pretty_version' => '5.2.1',
'version' => '5.2.1.0',
'aliases' =>
array (
),
'reference' => 'f36b6b9a2f4143a25f35ce94d712ceb0527e9d90',
'reference' => 'd724bbb8fc3ba89179868bb5220ecdf6a9c1636b',
),
'php-extended/php-system' =>
array (
@@ -328,30 +328,30 @@
),
'phpdocumentor/reflection-docblock' =>
array (
'pretty_version' => '5.2.2',
'version' => '5.2.2.0',
'pretty_version' => '5.3.0',
'version' => '5.3.0.0',
'aliases' =>
array (
),
'reference' => '069a785b2141f5bcf49f3e353548dc1cce6df556',
'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170',
),
'phpdocumentor/type-resolver' =>
array (
'pretty_version' => '1.4.0',
'version' => '1.4.0.0',
'pretty_version' => '1.5.1',
'version' => '1.5.1.0',
'aliases' =>
array (
),
'reference' => '6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0',
'reference' => 'a12f7e301eb7258bb68acd89d4aefa05c2906cae',
),
'psr/container' =>
array (
'pretty_version' => '1.1.1',
'version' => '1.1.1.0',
'pretty_version' => '1.1.2',
'version' => '1.1.2.0',
'aliases' =>
array (
),
'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
),
'psr/container-implementation' =>
array (
@@ -413,12 +413,12 @@
),
'sabre/event' =>
array (
'pretty_version' => '5.1.2',
'version' => '5.1.2.0',
'pretty_version' => '5.1.4',
'version' => '5.1.4.0',
'aliases' =>
array (
),
'reference' => 'c120bec57c17b6251a496efc82b732418b49d50a',
'reference' => 'd7da22897125d34d7eddf7977758191c06a74497',
),
'sammo-hid/sammo' =>
array (
@@ -427,16 +427,7 @@
'aliases' =>
array (
),
'reference' => '40a20a55d3aa08f0ab58a50b0572b17dce33de80',
),
'scssphp/scssphp' =>
array (
'pretty_version' => 'v1.6.0',
'version' => '1.6.0.0',
'aliases' =>
array (
),
'reference' => 'b83594e2323c5d6e80785df3f91b9d1d32aad530',
'reference' => '872755e57f84720a9c4c63d5455441f83c41f6c6',
),
'sergeytsalkov/meekrodb' =>
array (
@@ -449,12 +440,12 @@
),
'symfony/console' =>
array (
'pretty_version' => 'v5.3.6',
'version' => '5.3.6.0',
'pretty_version' => 'v5.3.10',
'version' => '5.3.10.0',
'aliases' =>
array (
),
'reference' => '51b71afd6d2dc8f5063199357b9880cea8d8bfe2',
'reference' => 'd4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3',
),
'symfony/deprecation-contracts' =>
array (
@@ -467,12 +458,12 @@
),
'symfony/lock' =>
array (
'pretty_version' => 'v4.4.27',
'version' => '4.4.27.0',
'pretty_version' => 'v4.4.33',
'version' => '4.4.33.0',
'aliases' =>
array (
),
'reference' => '6ca476d4ac992802f2a4043929f68f1818449486',
'reference' => '567d29b1bc6e3937652054dafc069151d17824a9',
),
'symfony/polyfill-ctype' =>
array (
@@ -557,21 +548,21 @@
),
'symfony/string' =>
array (
'pretty_version' => 'v5.3.3',
'version' => '5.3.3.0',
'pretty_version' => 'v5.3.10',
'version' => '5.3.10.0',
'aliases' =>
array (
),
'reference' => 'bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1',
'reference' => 'd70c35bb20bbca71fc4ab7921e3c6bda1a82a60c',
),
'symfony/translation' =>
array (
'pretty_version' => 'v5.3.7',
'version' => '5.3.7.0',
'pretty_version' => 'v5.3.10',
'version' => '5.3.10.0',
'aliases' =>
array (
),
'reference' => '4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6',
'reference' => '6ef197aea2ac8b9cd63e0da7522b3771714035aa',
),
'symfony/translation-contracts' =>
array (
@@ -591,12 +582,12 @@
),
'tysonandre/var_representation_polyfill' =>
array (
'pretty_version' => '0.0.2',
'version' => '0.0.2.0',
'pretty_version' => '0.1.1',
'version' => '0.1.1.0',
'aliases' =>
array (
),
'reference' => '3f17999ee1f257319ddc6721dd26ebbc5d175f33',
'reference' => '0a942e74e18af5514749895507bc6ca7ab96399a',
),
'vlucas/valitron' =>
array (

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