Compare commits

...
195 Commits
Author SHA1 Message Date
Hide_D 4ca33cb007 fix: 전투 시뮬레이터 UI 깨짐 수정 2021-12-16 03:34:34 +09:00
Hide_D 96515fd16c fix: 내정보/설정에 툴팁이 해제되어있음 2021-12-16 03:23:36 +09:00
Hide_D d736e2d947 refacor: customCSS 코드 분리 2021-12-16 03:23:11 +09:00
Hide_D 7631d99ce6 game: 척사 강화. 15%p -> 20%p 2021-12-16 03:12:37 +09:00
Hide_D 6ddeed82c0 fix: 500px/1000px 모드 2차 수정 2021-12-16 02:36:50 +09:00
Hide_D ffc8242aae fix: 500px/1000px 모드 설정 2021-12-16 02:32:33 +09:00
Hide_D 2767bf70d9 feat: 내 정보/설정 페이지 반응형, 500px/1000px 설정 2021-12-16 02:26:07 +09:00
Hide_D fa7c7794d0 feat: 상/하단 돌아가기 버튼을 bootstrap으로 변경 2021-12-16 01:56:44 +09:00
Hide_D 015e9e54dc feat: 임시 500px/1000px 모드 추가 2021-12-16 01:53:23 +09:00
Hide_D 7dc9863b49 fix: 지도 옵션 버튼의 초기화 이벤트 시점이 다른 점 수정
- 항상 통제 가능한 localStorage 기준으로 변경
2021-12-16 01:24:41 +09:00
Hide_D f13960a56a game: 토너먼터 자동 참가 시, 능력치에 기반 2021-12-16 01:05:59 +09:00
Hide_D ba6370d206 fix: AI 전쟁 상태 정의를 다시. 2021-12-16 01:02:41 +09:00
Hide_D 32fd8c481a fix: 토너먼트 warning 제거 2021-12-15 22:27:37 +09:00
Hide_D e9264e6f13 scenario: 애니집결 업데이트 2021-12-15 20:10:04 +09:00
Hide_D 93e6a056d4 game: 저격 버프, 견고 효과 중 저격,필살 너프
- 저격 성공시 증가하는 사기량 증가
  - 전특만, 몇몇 유니크 제외
- 저격이 성벽에도 발동
  - 사기 상승만 추가, 성벽 너프 없음
- 견고 효과 변경
  - 필살 무효 -> 필살 확률 20% 감소
  - 저격 무효 -> 저격은 받지만 부상 무효
2021-12-15 16:34:07 +09:00
Hide_D 3610f2cbd4 fix: 기본 DummyGeneral에 NPC 타입 3번 부여 2021-12-15 12:01:50 +09:00
Hide_D 0c51544e2e fix: 베팅 결과에서 실제 장수가 아닌 총합(0번)을 가져오는 버그 수정 2021-12-15 12:00:54 +09:00
Hide_D 8f1f477054 fix: mergeQueryColumn의 기본 값에 npc 추가 2021-12-15 11:57:45 +09:00
Hide_D 0b72925f09 fix: 토너먼트 값에서 npc를 안받아옴 2021-12-15 09:09:35 +09:00
Hide_D 9fb477facc game: NPC국이 접경이 사라져도 5개월가량은 기다림 2021-12-15 03:34:49 +09:00
Hide_D 3c474e5551 game: 반환은 4개월 이전에도 이루어지도록 수정 2021-12-15 03:19:02 +09:00
Hide_D 9217f0aaf5 game: 시작한지 4개월째부터 유산으로 유니그 획득 가능 2021-12-15 03:13:24 +09:00
Hide_D dddf4ccf6e build: webpack 캐시를 버전이 바뀌어도 계속 사용하도록 설정 2021-12-15 02:28:47 +09:00
Hide_D 4de010cb1e fix: 빙의 장수의 유산 포인트 적용 문제 수정
- 빙의장의 유산 포인트가 천통시엔 미적용.
- NPC 시절 베팅 결과가 반영되는 오류
  - 베팅횟수+0, 베팅성공+1, 베팅금액+ 문제
2021-12-15 02:15:38 +09:00
Hide_D d2ed7a4a80 Merge pull request 'feat: webpack 빌드 통일, TipTap 에디터 적용' (#201) from unifyBuildPath into devel
Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/201
2021-12-14 02:24:17 +09:00
Hide_D 311d5c42a8 fix: 메인페이지, 임관권유 페이지에 적용 2021-12-14 02:05:59 +09:00
Hide_D 3c6a884663 feat: TipTap 이미지 적용 2021-12-14 02:03:05 +09:00
Hide_D 1bfd0018b1 feat(WIP): tiptap 에디터 기능 구현 2021-12-13 21:45:49 +09:00
Hide_D 2c3a9b93c7 feat(WIP): 새 에디터 2021-12-13 03:24:14 +09:00
Hide_D 0961220fdd feat: 국방, 임관메시지 에디터에 TipTap 적용 2021-12-13 02:03:54 +09:00
Hide_D c8b2f28c7c build: esbuild-loader에서 es2021 2021-12-12 21:55:20 +09:00
Hide_D 3f7cc163ec refac: vue 파일 구조 변경 2021-12-12 21:48:48 +09:00
Hide_D 8ede84c176 build(WIP): printDist를 모든 코드에 적용
- 현재 summernote 미작동
2021-12-12 19:26:27 +09:00
Hide_D 6a7f62f2c2 build(WIP): php단에서 변경된 dist_js에 맞게 js,css 로드
- fix: webpack 출력물 문제
- webpack splitChunks 파일 통일
2021-12-12 16:33:20 +09:00
Hide_D 0b82024caa fix: 에러 없이 emit 된 경우에만 빌드 완료 표지 출력 2021-12-12 15:28:52 +09:00
Hide_D fd057ebb05 build(WIP): 빌드 결과물을 서버 주소에 관계없이 통일 2021-12-12 13:52:55 +09:00
Hide_D 47e6958446 feat: 글꼴 속성 시험 적용 2021-12-12 12:53:50 +09:00
Hide_D 690fe46931 fix: 추가 수정 2021-12-11 23:22:12 +09:00
Hide_D 10ec7b55d0 fix: 등용 수락이 불가능한 버그 수정 2021-12-11 23:20:32 +09:00
Hide_D 5079db5ceb fix: showErrorLog 페이지 디스플레이 수정 2021-12-11 23:10:34 +09:00
Hide_D dd4f664724 fix: 유산 포인트 반영시 ownerID가 아니라 generalID 를 사용하는 버그 2021-12-11 22:56:08 +09:00
Hide_D 932e8ca093 fix: 상단 버튼 안되는 버그 수정 2021-12-11 14:05:06 +09:00
Hide_D 193e6eb9ca fix: 메인페이지 갱신 버튼이 일부만 동작하는 버그 2021-12-11 13:52:00 +09:00
Hide_D e28b878a68 fix: 베팅에 사용할 값을 가져오지 못하는 버그 수정 2021-12-11 13:19:46 +09:00
Hide_D 4d6f64cf96 build: 약간 변경 2021-12-11 12:44:51 +09:00
Hide_D 6441fc09e4 misc: scss 파일 정리 2021-12-11 12:12:16 +09:00
Hide_D d8c54b4632 fix: main 페이지가 vue로 통합되었으므로 printCSS 변경 2021-12-11 11:55:17 +09:00
Hide_D a8f2c9787d misc: main의 외부 초기화 코드를 내부로 이동 2021-12-11 11:52:02 +09:00
Hide_D dfb10c1b44 fix: initTooltip과 bootstrap-vue-3 충돌 문제 해결
- 기타 data-bs 안붙은거 마저 수정
2021-12-11 11:37:41 +09:00
Hide_D 95bd5b539f fix(WIP): bootstrap4 잔여 코드 수정 중
- 이상하게도 ingame에서 bootstrap이 충돌 중
2021-12-11 04:45:39 +09:00
Hide_D c811a56557 fix: 비급 위압이 갱신된 위압을 따르지 않음 2021-12-11 03:31:09 +09:00
Hide_D 5892ddcad8 misc: 줄어튼 선택기에 맞게 갱신버튼 이동 2021-12-11 03:30:01 +09:00
Hide_D 111a81766e misc: bootstrap4 toast 사용코드 제거 2021-12-11 03:21:47 +09:00
Hide_D 5819045a01 misc: 여백을 위해 ReservedCommand 16->15 2021-12-11 02:57:32 +09:00
Hide_D b8f19e11ff Merge pull request 'refactor: bootstrap4 => bootstrap5' (#200) from no_bootstrap4 into devel
Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/200
2021-12-11 02:53:55 +09:00
Hide_D d3c73579d9 refactor: goodbye bootstrap4 2021-12-11 02:50:24 +09:00
Hide_D 5f001ee091 fix: bootstrap5 modal 2021-12-11 00:30:01 +09:00
Hide_D 741c67c7cb fix: bootstrap5 modal 2021-12-11 00:28:59 +09:00
Hide_D 9456406009 fix: login에서 modal을 Bootstrap5 Modal로 2021-12-11 00:20:11 +09:00
Hide_D 8464f96e40 refactor: common_ts 분리 후 일괄 로드 2021-12-11 00:07:59 +09:00
Hide_D 3c23e0fb93 fix: webpack image.ext revert 2021-12-10 23:33:39 +09:00
Hide_D 18807a642a fix: 앞선 refactor에서 경로 문제 수정 2021-12-10 23:12:35 +09:00
Hide_D 975f77e907 refactor: 상대경로를 @ 시작 절대경로로 2021-12-10 22:34:14 +09:00
Hide_D bd42042a61 refactor(WIP): scss, ts 공통 파일 묶기 2021-12-10 21:45:02 +09:00
Hide_D 9134a7d9f6 fix: lint error fix 2021-12-10 02:55:53 +09:00
Hide_D 53d65c31db dep: update packages 2021-12-10 02:53:12 +09:00
Hide_D 612f15ebad feat(WIP): gateway bootstrap 호출 제거 진행
- 메인페이지 미동작
2021-12-10 02:47:10 +09:00
Hide_D 33378c96ec dep: 이전 버전들과의 호환성을 위해 bootstrap5 명명 유지 2021-12-10 02:28:13 +09:00
Hide_D 703e2f51be feat(WIP): bootstrap 5 tooltip 적용
- bootstrap4 용의 popper.js 제거
- jquery기반 bootstrap tooltip 제거
2021-12-10 02:26:08 +09:00
Hide_D 7d8fa7f1c4 dep(WIP): bootstrap4 1차 제거 2021-12-10 02:02:38 +09:00
Hide_D 62089ef2c2 fix: 수비자 숙련 변경 2021-12-09 23:58:57 +09:00
Hide_D 1d946aa525 game: 수비자의 상대 병종을 0에서 0.1로 변경, 공격자 대비로는 10% 2021-12-09 01:59:04 +09:00
Hide_D 19b62a632b game: 궁병 회피 살짝 너프 2021-12-09 01:32:17 +09:00
Hide_D cbd5b7fc5e game: 백이병 추가
- 성도 특수 병종
- 숨겨진 상성 수치
2021-12-09 01:00:27 +09:00
Hide_D 58673fb385 feat: (예약)plock을 세부 구분할 예정 2021-12-09 00:51:10 +09:00
Hide_D 26ea6a6c69 fix: KVStorage의 기본 상태가 turnOnCache가 아니었던 점 수정 2021-12-09 00:36:15 +09:00
Hide_D 1727d34853 game: 빙의장도 유산 획득이 가능하도록 수정
- 유산 실 반영 시점을 은퇴, 천통 시점으로 변경
2021-12-09 00:26:47 +09:00
Hide_D fc3b854add fix: 빙의가 불가능한 버그 수정 2021-12-09 00:01:20 +09:00
Hide_D dba8e5d699 feat: 턴 선택기 실행 후 초기화시, 이전 턴 기억 2021-12-08 21:22:52 +09:00
Hide_D f3df6f7202 feat: 검색 모드 켬/끔 추가 2021-12-08 21:01:16 +09:00
Hide_D 3cbf1eba30 fix: AI 유저장 포상 버그 수정 2021-12-08 01:54:00 +09:00
Hide_D 4623cfbe06 fix: webp가 업로드 가능하나, 메시지 표기가 누락된 버그 수정 2021-12-08 01:38:23 +09:00
Hide_D d4d8e0045b misc: 턴 선택기에 기본턴 선택. 다른 턴 선택시 무효화. 2021-12-08 01:36:59 +09:00
Hide_D ea4f1643d4 misc: 하단 바 세부 항목 크기 확대 2021-12-08 01:31:34 +09:00
Hide_D 5a2ea3496e misc: 턴 입력이 아무것도 없으면 1턴 2021-12-08 01:23:58 +09:00
Hide_D 6dd77dd632 misc: 하단 바, type2 버튼에 밑줄 2021-12-08 01:19:29 +09:00
Hide_D d4279b0cb7 misc: 턴선택이 없을 경우 안내 2021-12-08 01:12:03 +09:00
Hide_D 601222a60d misc: 턴선택기 기본값을 무효화. 2021-12-08 01:11:14 +09:00
Hide_D 9c541735b7 fix: initial-scale=1 제거 2021-12-08 01:06:56 +09:00
Hide_D 858f7139ff fix: 구 sidebar 코드 제거 2021-12-08 01:01:25 +09:00
Hide_D a326ad3c66 fix: 풀모드 메시지함 grid 깨짐 수정 2021-12-08 00:55:54 +09:00
Hide_D 33751a06fe feat: 스마트폰용 하단 바 구현, 버튼 템플릿 변경 2021-12-08 00:24:40 +09:00
Hide_D 8cbe92ca46 fix: anchor 이동에서 #을 남기지 않도록 2021-12-07 02:27:42 +09:00
Hide_D 5587a358ce feat: 초성 검색에서 '알파벳' 대신 검색 추가 2021-12-07 02:03:10 +09:00
Hide_D 40b52dd517 fix: auto500px 가로모드 미설정 버그 수정 2021-12-07 01:54:22 +09:00
Hide_D 5424869d8e Revert "misc: auto500px 필요없음."
This reverts commit 2b5f38ca52.
2021-12-07 01:44:36 +09:00
Hide_D 68a2534d1b misc: auto500px 필요없음. 2021-12-07 01:38:26 +09:00
Hide_D 1699190334 misc: 스마트폰 모드에서 '명령으로' 추가 2021-12-07 01:22:09 +09:00
Hide_D d86d96acc1 misc: 초기 스마트폰 크기 관련 수정 2021-12-07 01:19:38 +09:00
Hide_D f70dbf9cf3 fix: 12px -> 12.5px 2021-12-07 01:01:39 +09:00
Hide_D 33a1681536 fix: font 정렬, 전체선택->턴 선택 2021-12-07 00:51:20 +09:00
Hide_D fcb8da95ca misc: 기본 글꼴 크기를13px -> 14px 2021-12-07 00:37:23 +09:00
Hide_D e8148ab4dc misc,dep: 기본 글꼴을 Pretendard로 일괄 적용용 2021-12-07 00:27:50 +09:00
Hide_D c14f06615e fix: 하단 버튼이 container 밖으로 벗어나는 문제 수정 2021-12-05 23:58:06 +09:00
Hide_D 1c0b28eacd game: 랜덤 임관 밸런스 수정 2021-12-05 23:47:56 +09:00
Hide_D d317a84b09 feat: 턴 선택기에 복합 커맨드 선택 적용 (#199)
- vue-multiselect 기반
- 초성 검색
- 이득, 불리 표기
- 불가 표기
- 선택후 단축 표기

Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/199
Co-authored-by: hide_d <hided62@gmail.com>
Co-committed-by: hide_d <hided62@gmail.com>
2021-12-05 23:02:27 +09:00
Hide_D 3972cf0194 fix: summernote 최신 버전에서 jQuery require 우회 2021-12-05 03:32:48 +09:00
Hide_D 6d408ac2b1 dep: vue-select 4.0 추가가 2021-12-04 14:11:37 +09:00
Hide_D 8338f8aaa0 misc: 턴선택기에서 모두 선택, 당기기, 미루기 위치 조절절 2021-12-04 13:49:59 +09:00
Hide_D fbd0561420 refac: 500px 모드 변환기 분리 2021-12-04 11:42:26 +09:00
Hide_D de854cc02c misc: 턴선택기 실행버튼 크기 50% 증가 2021-12-04 11:12:42 +09:00
Hide_D 822e161e2e misc: 500px 레이아웃 순서 변경 2021-12-04 02:11:59 +09:00
Hide_D b60bf9fdf9 fix: float-tabs가 sticky보다 아래에 오는 버그 수정 2021-12-04 01:13:50 +09:00
Hide_D 14b0a043d4 feat: 500px 모드에서, 메시지 입력기가 메시지창을 쫓아감 2021-12-04 01:07:05 +09:00
Hide_D a2f5d66597 misc: 500px 레이아웃 구성 변경 2021-12-04 00:42:51 +09:00
Hide_D c02bc26799 misc: 갱신/로비로 버튼 위치 이동 2021-12-04 00:10:41 +09:00
Hide_D 932afec74a fix: buttonPlate에 gap 추가 2021-12-03 23:44:55 +09:00
Hide_D 3da67e7d97 fix: 사령부 ajax 모드 2021-12-03 16:03:02 +09:00
Hide_D 0c95b958aa feat: 메인페이지 화면비 자동 조정 2021-12-03 16:00:38 +09:00
Hide_D 8895ac329a fix: 메인 화면 오동작 요소 수정
- 설문조사 항목 표기
- 설문조사 항목 marquee로 틀어짐(제거)
- 1000xp 모드에서 도시 툴팁 가려지는 문제 수정정
2021-12-03 15:26:45 +09:00
Hide_D cf0416e976 fix: nation color-code #330000 2021-12-03 02:18:13 +09:00
Hide_D f8f3e4d9e8 feat: 500px 모드 나머지 최적화 2021-12-03 02:07:34 +09:00
Hide_D d6bee9aa6d fix: 메인 페이지, 장수 동향, 개인 기록, 중원 정세 띠 2021-12-03 00:18:18 +09:00
Hide_D 2d5e99a0d6 feat: 500xp 모드에서 오른쪽 고속 이동 툴바 2021-12-03 00:14:22 +09:00
Hide_D 97b71347a6 fix: 500px 모드를 확실하게 명시 2021-12-02 22:01:29 +09:00
Hide_D 10e3a0814f misc: 메시지 받아오는 갯수 감소 2021-12-02 21:41:33 +09:00
Hide_D f909df204a fix: .toolbarButton2 2021-11-30 02:00:35 +09:00
Hide_D 661e6cc5da misc: ReservedCommand 색을 약간 수정
- 딱히 어룰린다는 느낌은 여전히 없다.
2021-11-30 01:58:42 +09:00
Hide_D b2b911ec81 fix: 메인페이지 '이전 메시지 불러오기'를 전체 너비로 2021-11-30 01:44:02 +09:00
Hide_D f238077944 fix: 메인 페이지 시나리오 표기, 줄 바꿈 2021-11-30 01:40:49 +09:00
Hide_D 3c930dacb8 feat: 나머지 메인 버튼도 lumen 버튼으로 통일 2021-11-30 01:38:07 +09:00
Hide_D 6dcb46c0b8 feat: commandButton을 lumen 버튼으로 2021-11-30 01:09:37 +09:00
Hide_D 27c7a5a3ad feat: 국가별 색 버튼을 lumen button profile에 맞춰 작성 2021-11-30 00:54:08 +09:00
Hide_D 846bdfdc88 feat(in-progress): 턴선택기 연월에 select, 강조 표기 2021-11-29 01:19:25 +09:00
Hide_D a2026cb3fd feat(in-progress): 턴 선택기에서 select와 toggle 분리 2021-11-29 01:17:36 +09:00
Hide_D 06fa539293 feat(in-progress): 커맨드 목록 UI/UX 정리 2021-11-29 01:00:52 +09:00
Hide_D 752f69d3ef misc: common.css를 bootstrap5를 포함한 css로 변경 2021-11-28 23:09:37 +09:00
Hide_D 897997b8ac feat: 메인화면의 도시정보를 500px, 700px 가변 2021-11-28 22:22:52 +09:00
Hide_D 526fa11c20 fix: 500px 지도모드에서 tooltip 위치 조정 2021-11-28 19:24:31 +09:00
Hide_D 8eda98ff4c feat(in-progress): 메인메뉴 지도를 500px 모드에 맞게 수정 2021-11-28 18:54:37 +09:00
Hide_D 99d7a26b98 dep: bootstrap5 custom 조합 darkly + lumen 2021-11-28 18:03:18 +09:00
Hide_D 0aaadf9536 feat: 턴 선택기를 vue 기반으로 변경 2021-11-28 01:57:46 +09:00
Hide_D 9adcbecce4 feat(in-progress): 턴 조작기를 vue로 분리 2021-11-27 15:40:31 +09:00
Hide_D 6605a84f2c dep: bootstrap 2021-11-27 15:40:00 +09:00
Hide_D 6c9510d8f4 fix(in-progress): viewport width를 500으로 진행하기로 2021-11-27 02:15:39 +09:00
Hide_D 03a62dc23f fix(in-progress): viewport width를 360px 폰에서 맞게 수정 2021-11-27 02:10:08 +09:00
Hide_D 93efacbef5 feat(in-progress): 메인페이지 기본 반응형 전환.
- full, half 모드
2021-11-27 01:53:00 +09:00
Hide_D b6b28de8e2 feat(in-progress): 메인 페이지에서 table 제거 2021-11-26 21:40:55 +09:00
Hide_D faaed40b39 fix: 비쟁장에 쟁장 공식이 섞여서, 최소 포상 금쌀이 꼬이는 문제 수정 2021-11-26 19:53:12 +09:00
Hide_D 6b035f64d2 fix: branch 못 알아낸 건 unknown으로 하기 2021-11-26 19:11:50 +09:00
Hide_D 9f049dcb18 fix: branch 가져오는 표기법 다시 수정 2021-11-26 19:05:59 +09:00
Hide_D 0141449e4f fix: git ignore 빠진부분 수정정 2021-11-26 19:03:34 +09:00
Hide_D 4ce49f259d fix: origin branch를 제대로 파싱하지 못하는 버그 수정 2021-11-26 18:56:04 +09:00
Hide_D 0f35569e05 fix: 삭제된 기능인 '폐쇄중 로그인'을 UI에서도 제거 2021-11-26 18:48:00 +09:00
Hide_D 1c4dabed72 feat: 버전 표기에 branch명 같이 표기 2021-11-26 18:44:18 +09:00
Hide_D 38114c0639 game: 수비자 피살 숙련도 0, 사살 숙련도 0.9->0.8 2021-11-26 17:42:50 +09:00
Hide_D 527c8370f1 fix: 권한 없는 유저가 수락 버튼을 누를 시, 아예 메시지가 사라지는 버그 수정 2021-11-20 14:00:01 +09:00
Hide_D 6a9a57e2bc fix: '최소 전투 가능 병력 수'를 매우 높여 출병 금지가 가능한 문제 수정 2021-11-20 00:37:07 +09:00
Hide_D 7b6f1b510e feat: 전쟁 금지/허가 여부 횟수 제한 부활 2021-11-19 23:43:00 +09:00
Hide_D 94bc7547d6 game: 출병은 일반내정보다 먼저여야함 2021-11-19 23:10:32 +09:00
Hide_D 5a4552aaff fix: 방어력 증가 세팅이 잘못됨. 2021-11-17 23:08:57 +09:00
Hide_D 06e314d301 game: 보병 수비시 방어력 5% 증가 2021-11-17 23:00:40 +09:00
Hide_D 8bead301ef game: NPC 베팅 판돈 스케일 증가가 2021-11-16 23:45:33 +09:00
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
1057 changed files with 20009 additions and 31553 deletions
+24 -9
View File
@@ -1,27 +1,42 @@
module.exports = { module.exports = {
root: true, root: true,
parser: "vue-eslint-parser", parser: "vue-eslint-parser",
parserOptions: { "env": {
"project": "./tsconfig.json" "browser": true,
"es2021": true
}, },
ignorePatterns: ['*.test.ts', '.eslintrc.cjs', 'webpack.config.cjs', '*.js'], ignorePatterns: ['*.test.ts', '.eslintrc.cjs', 'webpack.config.cjs', '*.js'],
overrides: [{ overrides: [{
files: ['*.ts', '*.tsx', "*.vue"], files: ['*.ts', '*.tsx', "*.vue"],
}], }],
plugins: [ plugins: [
"@typescript-eslint", "@typescript-eslint"
], ],
extends: [ extends: [
"eslint:recommended", "eslint:recommended",
'plugin:vue/essential', "plugin:vue/vue3-essential",
'@vue/typescript',
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended" "plugin:@typescript-eslint/recommended"
], ],
parserOptions: {
"sourceType": "module",
"project": "./tsconfig.json",
"ecmaVersion": 2021,
"parser": "@typescript-eslint/parser",
extraFileExtensions: ['.vue']
},
rules: { rules: {
'@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-floating-promises': 'error',
"vue/no-multiple-template-root": "off", },
"vue/no-v-for-template-key": "off", settings: {
'import/resolver': {
alias: {
map: [
['@', './hwe/ts'],
['@util', './hwe/ts/util'],
['@scss', './hwe/scss'],
]
} }
} }
},
};
+1
View File
@@ -27,6 +27,7 @@ hwe/.htaccess
d_shared d_shared
/d_pic
d_pic/*.jpg d_pic/*.jpg
d_pic/*.gif d_pic/*.gif
d_pic/*.png d_pic/*.png
-2
View File
@@ -101,13 +101,11 @@ return [
'hwe/j_export_simulator_object.php', 'hwe/j_export_simulator_object.php',
'hwe/j_general_log_old.php', 'hwe/j_general_log_old.php',
'hwe/j_general_set_permission.php', 'hwe/j_general_set_permission.php',
'hwe/j_general_turn.php',
'hwe/j_get_basic_general_list.php', 'hwe/j_get_basic_general_list.php',
'hwe/j_getChiefTurn.php', 'hwe/j_getChiefTurn.php',
'hwe/j_get_city_list.php', 'hwe/j_get_city_list.php',
'hwe/j_get_general_list.php', 'hwe/j_get_general_list.php',
'hwe/j_get_nation_general_list.php', 'hwe/j_get_nation_general_list.php',
'hwe/j_get_reserved_command.php',
'hwe/j_get_select_npc_token.php', 'hwe/j_get_select_npc_token.php',
'hwe/j_get_select_pool.php', 'hwe/j_get_select_pool.php',
'hwe/j_image_upload.php', 'hwe/j_image_upload.php',
+1 -2
View File
@@ -8,7 +8,7 @@
], ],
"config": { "config": {
"platform": { "platform": {
"php": "7.4" "php": "8.0"
} }
}, },
"require": { "require": {
@@ -16,7 +16,6 @@
"sergeytsalkov/meekrodb": "^2.3", "sergeytsalkov/meekrodb": "^2.3",
"league/plates": "^3.3", "league/plates": "^3.3",
"guzzlehttp/guzzle": "^6.3", "guzzlehttp/guzzle": "^6.3",
"scssphp/scssphp": "^1.0",
"monolog/monolog": "^1.23", "monolog/monolog": "^1.23",
"firephp/firephp-core": "^0.4.0", "firephp/firephp-core": "^0.4.0",
"vlucas/valitron": "^1.4", "vlucas/valitron": "^1.4",
Generated
+214 -221
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "317938cff7b30806f4e385a70f4943fc", "content-hash": "94cfbcb22b9f475e421ad5009391006f",
"packages": [ "packages": [
{ {
"name": "brandonwamboldt/utilphp", "name": "brandonwamboldt/utilphp",
@@ -122,16 +122,16 @@
}, },
{ {
"name": "composer/semver", "name": "composer/semver",
"version": "3.2.5", "version": "3.2.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/semver.git", "url": "https://github.com/composer/semver.git",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" "reference": "83e511e247de329283478496f7a1e114c9517506"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", "url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", "reference": "83e511e247de329283478496f7a1e114c9517506",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -183,7 +183,7 @@
"support": { "support": {
"irc": "irc://irc.freenode.org/composer", "irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues", "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": [ "funding": [
{ {
@@ -199,7 +199,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-05-24T12:41:47+00:00" "time": "2021-10-25T11:34:17+00:00"
}, },
{ {
"name": "composer/xdebug-handler", "name": "composer/xdebug-handler",
@@ -267,34 +267,30 @@
}, },
{ {
"name": "doctrine/inflector", "name": "doctrine/inflector",
"version": "2.0.3", "version": "2.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/inflector.git", "url": "https://github.com/doctrine/inflector.git",
"reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
"reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2 || ^8.0" "php": "^7.2 || ^8.0"
}, },
"require-dev": { "require-dev": {
"doctrine/coding-standard": "^7.0", "doctrine/coding-standard": "^8.2",
"phpstan/phpstan": "^0.11", "phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.11", "phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.11", "phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"vimeo/psalm": "^4.10"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Doctrine\\Inflector\\": "lib/Doctrine/Inflector" "Doctrine\\Inflector\\": "lib/Doctrine/Inflector"
@@ -342,7 +338,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/doctrine/inflector/issues", "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": [ "funding": [
{ {
@@ -358,7 +354,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2020-05-29T15:13:26+00:00" "time": "2021-10-22T20:16:43+00:00"
}, },
{ {
"name": "erusev/parsedown", "name": "erusev/parsedown",
@@ -674,16 +670,16 @@
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
"version": "1.4.1", "version": "1.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/promises.git", "url": "https://github.com/guzzle/promises.git",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -695,7 +691,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.4-dev" "dev-master": "1.5-dev"
} }
}, },
"autoload": { "autoload": {
@@ -711,10 +707,25 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com", "email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling" "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", "description": "Guzzle promises library",
@@ -723,22 +734,36 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/promises/issues", "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", "name": "guzzlehttp/psr7",
"version": "1.8.2", "version": "1.8.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91" "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", "url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91", "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -775,13 +800,34 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com", "email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling" "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", "name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion" "homepage": "https://github.com/Tobion"
} }
], ],
@@ -798,22 +844,36 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "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", "name": "illuminate/bus",
"version": "v8.61.0", "version": "v8.69.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/bus.git", "url": "https://github.com/illuminate/bus.git",
"reference": "808097c0dfd893309bd77b00139586c516b965c9" "reference": "be400399687b97d5558a224e970060fd5d5f2735"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/bus/zipball/808097c0dfd893309bd77b00139586c516b965c9", "url": "https://api.github.com/repos/illuminate/bus/zipball/be400399687b97d5558a224e970060fd5d5f2735",
"reference": "808097c0dfd893309bd77b00139586c516b965c9", "reference": "be400399687b97d5558a224e970060fd5d5f2735",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -853,20 +913,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "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", "name": "illuminate/collections",
"version": "v8.61.0", "version": "v8.69.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/collections.git", "url": "https://github.com/illuminate/collections.git",
"reference": "18fa841df912ec56849351dd6ca8928e8a98b69d" "reference": "05f286ec5fd2dd286e8384577047efc375c8954c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/collections/zipball/18fa841df912ec56849351dd6ca8928e8a98b69d", "url": "https://api.github.com/repos/illuminate/collections/zipball/05f286ec5fd2dd286e8384577047efc375c8954c",
"reference": "18fa841df912ec56849351dd6ca8928e8a98b69d", "reference": "05f286ec5fd2dd286e8384577047efc375c8954c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -907,20 +967,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "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", "name": "illuminate/container",
"version": "v8.61.0", "version": "v8.69.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/container.git", "url": "https://github.com/illuminate/container.git",
"reference": "862b64ea4ab56e307a1676104a1b93295d347ad0" "reference": "ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/container/zipball/862b64ea4ab56e307a1676104a1b93295d347ad0", "url": "https://api.github.com/repos/illuminate/container/zipball/ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d",
"reference": "862b64ea4ab56e307a1676104a1b93295d347ad0", "reference": "ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -958,20 +1018,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "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", "name": "illuminate/contracts",
"version": "v8.61.0", "version": "v8.69.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/contracts.git", "url": "https://github.com/illuminate/contracts.git",
"reference": "ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913" "reference": "e76f4bce73a2a1656add24bd5210ebc4b8af49c0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913", "url": "https://api.github.com/repos/illuminate/contracts/zipball/e76f4bce73a2a1656add24bd5210ebc4b8af49c0",
"reference": "ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913", "reference": "e76f4bce73a2a1656add24bd5210ebc4b8af49c0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1006,20 +1066,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "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", "name": "illuminate/database",
"version": "v8.61.0", "version": "v8.69.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/database.git", "url": "https://github.com/illuminate/database.git",
"reference": "acc11d6839ddb3b694bc6585177fa5141b70c693" "reference": "43c7ffb6299ae55b000b286cf1278afd268ef29f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/database/zipball/acc11d6839ddb3b694bc6585177fa5141b70c693", "url": "https://api.github.com/repos/illuminate/database/zipball/43c7ffb6299ae55b000b286cf1278afd268ef29f",
"reference": "acc11d6839ddb3b694bc6585177fa5141b70c693", "reference": "43c7ffb6299ae55b000b286cf1278afd268ef29f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1033,7 +1093,7 @@
"symfony/console": "^5.1.4" "symfony/console": "^5.1.4"
}, },
"suggest": { "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).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
"illuminate/console": "Required to use the database commands (^8.0).", "illuminate/console": "Required to use the database commands (^8.0).",
"illuminate/events": "Required to use the observers with Eloquent (^8.0).", "illuminate/events": "Required to use the observers with Eloquent (^8.0).",
@@ -1074,20 +1134,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "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", "name": "illuminate/events",
"version": "v8.61.0", "version": "v8.69.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/events.git", "url": "https://github.com/illuminate/events.git",
"reference": "7def78033f29cd0c0383513b27c291d233a7f90e" "reference": "b7f06cafb6c09581617f2ca05d69e9b159e5a35d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/events/zipball/7def78033f29cd0c0383513b27c291d233a7f90e", "url": "https://api.github.com/repos/illuminate/events/zipball/b7f06cafb6c09581617f2ca05d69e9b159e5a35d",
"reference": "7def78033f29cd0c0383513b27c291d233a7f90e", "reference": "b7f06cafb6c09581617f2ca05d69e9b159e5a35d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1129,11 +1189,11 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "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", "name": "illuminate/macroable",
"version": "v8.61.0", "version": "v8.69.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/macroable.git", "url": "https://github.com/illuminate/macroable.git",
@@ -1179,7 +1239,7 @@
}, },
{ {
"name": "illuminate/pipeline", "name": "illuminate/pipeline",
"version": "v8.61.0", "version": "v8.69.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/pipeline.git", "url": "https://github.com/illuminate/pipeline.git",
@@ -1227,16 +1287,16 @@
}, },
{ {
"name": "illuminate/support", "name": "illuminate/support",
"version": "v8.61.0", "version": "v8.69.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/support.git", "url": "https://github.com/illuminate/support.git",
"reference": "b0a21c41163381dd9a5abbd68fe85ed7b4247d30" "reference": "a8851b7001530d3c11626a81449ed9b63dd10db7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/support/zipball/b0a21c41163381dd9a5abbd68fe85ed7b4247d30", "url": "https://api.github.com/repos/illuminate/support/zipball/a8851b7001530d3c11626a81449ed9b63dd10db7",
"reference": "b0a21c41163381dd9a5abbd68fe85ed7b4247d30", "reference": "a8851b7001530d3c11626a81449ed9b63dd10db7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1246,7 +1306,7 @@
"illuminate/collections": "^8.0", "illuminate/collections": "^8.0",
"illuminate/contracts": "^8.0", "illuminate/contracts": "^8.0",
"illuminate/macroable": "^8.0", "illuminate/macroable": "^8.0",
"nesbot/carbon": "^2.31", "nesbot/carbon": "^2.53.1",
"php": "^7.3|^8.0", "php": "^7.3|^8.0",
"voku/portable-ascii": "^1.4.8" "voku/portable-ascii": "^1.4.8"
}, },
@@ -1255,8 +1315,8 @@
}, },
"suggest": { "suggest": {
"illuminate/filesystem": "Required to use the composer class (^8.0).", "illuminate/filesystem": "Required to use the composer class (^8.0).",
"league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0).", "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0.2).",
"ramsey/uuid": "Required to use Str::uuid() (^4.0).", "ramsey/uuid": "Required to use Str::uuid() (^4.2.2).",
"symfony/process": "Required to use the composer class (^5.1.4).", "symfony/process": "Required to use the composer class (^5.1.4).",
"symfony/var-dumper": "Required to use the dd function (^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)." "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.2)."
@@ -1291,7 +1351,7 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "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", "name": "league/plates",
@@ -1490,16 +1550,16 @@
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
"version": "2.53.1", "version": "2.54.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/briannesbitt/Carbon.git", "url": "https://github.com/briannesbitt/Carbon.git",
"reference": "f4655858a784988f880c1b8c7feabbf02dfdf045" "reference": "eed83939f1aed3eee517d03a33f5ec587ac529b5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f4655858a784988f880c1b8c7feabbf02dfdf045", "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/eed83939f1aed3eee517d03a33f5ec587ac529b5",
"reference": "f4655858a784988f880c1b8c7feabbf02dfdf045", "reference": "eed83939f1aed3eee517d03a33f5ec587ac529b5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1510,6 +1570,7 @@
"symfony/translation": "^3.4 || ^4.0 || ^5.0" "symfony/translation": "^3.4 || ^4.0 || ^5.0"
}, },
"require-dev": { "require-dev": {
"doctrine/dbal": "^2.0 || ^3.0",
"doctrine/orm": "^2.7", "doctrine/orm": "^2.7",
"friendsofphp/php-cs-fixer": "^3.0", "friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0", "kylekatarnls/multi-tester": "^2.0",
@@ -1580,7 +1641,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-09-06T09:29:23+00:00" "time": "2021-11-01T21:22:20+00:00"
}, },
{ {
"name": "netresearch/jsonmapper", "name": "netresearch/jsonmapper",
@@ -1773,20 +1834,20 @@
}, },
{ {
"name": "nette/utils", "name": "nette/utils",
"version": "v3.2.2", "version": "v3.2.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nette/utils.git", "url": "https://github.com/nette/utils.git",
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c" "reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/967cfc4f9a1acd5f1058d76715a424c53343c20c", "url": "https://api.github.com/repos/nette/utils/zipball/9cd80396ca58d7969ab44fc7afcf03624dfa526e",
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c", "reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2 <8.1" "php": ">=7.2 <8.2"
}, },
"conflict": { "conflict": {
"nette/di": "<3.0.6" "nette/di": "<3.0.6"
@@ -1852,9 +1913,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/nette/utils/issues", "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", "name": "pguardiario/phpuri",
@@ -2110,16 +2171,16 @@
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
"version": "5.2.2", "version": "5.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" "reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", "reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2130,7 +2191,8 @@
"webmozart/assert": "^1.9.1" "webmozart/assert": "^1.9.1"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "~1.3.2" "mockery/mockery": "~1.3.2",
"psalm/phar": "^4.8"
}, },
"type": "library", "type": "library",
"extra": { "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.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": { "support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", "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", "name": "phpdocumentor/type-resolver",
"version": "1.4.0", "version": "1.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git", "url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2183,7 +2245,8 @@
"phpdocumentor/reflection-common": "^2.0" "phpdocumentor/reflection-common": "^2.0"
}, },
"require-dev": { "require-dev": {
"ext-tokenizer": "*" "ext-tokenizer": "*",
"psalm/phar": "^4.8"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -2209,26 +2272,26 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": { "support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues", "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", "name": "psr/container",
"version": "1.1.1", "version": "1.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/container.git", "url": "https://github.com/php-fig/container.git",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.0" "php": ">=7.4.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -2257,9 +2320,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/php-fig/container/issues", "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", "name": "psr/http-message",
@@ -2461,23 +2524,23 @@
}, },
{ {
"name": "sabre/event", "name": "sabre/event",
"version": "5.1.2", "version": "5.1.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sabre-io/event.git", "url": "https://github.com/sabre-io/event.git",
"reference": "c120bec57c17b6251a496efc82b732418b49d50a" "reference": "d7da22897125d34d7eddf7977758191c06a74497"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sabre-io/event/zipball/c120bec57c17b6251a496efc82b732418b49d50a", "url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497",
"reference": "c120bec57c17b6251a496efc82b732418b49d50a", "reference": "d7da22897125d34d7eddf7977758191c06a74497",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1 || ^8.0" "php": "^7.1 || ^8.0"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "~2.16.1", "friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12", "phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0" "phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
}, },
@@ -2523,80 +2586,7 @@
"issues": "https://github.com/sabre-io/event/issues", "issues": "https://github.com/sabre-io/event/issues",
"source": "https://github.com/fruux/sabre-event" "source": "https://github.com/fruux/sabre-event"
}, },
"time": "2020-10-03T11:02:22+00:00" "time": "2021-11-04T06:51:17+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"
}, },
{ {
"name": "sergeytsalkov/meekrodb", "name": "sergeytsalkov/meekrodb",
@@ -2648,16 +2638,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v5.3.6", "version": "v5.3.10",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2" "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/51b71afd6d2dc8f5063199357b9880cea8d8bfe2", "url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2", "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2727,7 +2717,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v5.3.6" "source": "https://github.com/symfony/console/tree/v5.3.10"
}, },
"funding": [ "funding": [
{ {
@@ -2743,7 +2733,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-27T19:10:22+00:00" "time": "2021-10-26T09:30:15+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@@ -2814,16 +2804,16 @@
}, },
{ {
"name": "symfony/lock", "name": "symfony/lock",
"version": "v4.4.27", "version": "v4.4.33",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/lock.git", "url": "https://github.com/symfony/lock.git",
"reference": "6ca476d4ac992802f2a4043929f68f1818449486" "reference": "567d29b1bc6e3937652054dafc069151d17824a9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/lock/zipball/6ca476d4ac992802f2a4043929f68f1818449486", "url": "https://api.github.com/repos/symfony/lock/zipball/567d29b1bc6e3937652054dafc069151d17824a9",
"reference": "6ca476d4ac992802f2a4043929f68f1818449486", "reference": "567d29b1bc6e3937652054dafc069151d17824a9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2872,7 +2862,7 @@
"semaphore" "semaphore"
], ],
"support": { "support": {
"source": "https://github.com/symfony/lock/tree/v4.4.27" "source": "https://github.com/symfony/lock/tree/v4.4.33"
}, },
"funding": [ "funding": [
{ {
@@ -2888,7 +2878,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-23T15:41:52+00:00" "time": "2021-10-05T20:27:01+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@@ -3620,16 +3610,16 @@
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v5.3.3", "version": "v5.3.10",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1" "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", "url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c",
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3683,7 +3673,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v5.3.3" "source": "https://github.com/symfony/string/tree/v5.3.10"
}, },
"funding": [ "funding": [
{ {
@@ -3699,20 +3689,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-06-27T11:44:38+00:00" "time": "2021-10-27T18:21:46+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v5.3.7", "version": "v5.3.10",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6" "reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6", "url": "https://api.github.com/repos/symfony/translation/zipball/6ef197aea2ac8b9cd63e0da7522b3771714035aa",
"reference": "4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6", "reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3778,7 +3768,7 @@
"description": "Provides tools to internationalize your application", "description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/translation/tree/v5.3.7" "source": "https://github.com/symfony/translation/tree/v5.3.10"
}, },
"funding": [ "funding": [
{ {
@@ -3794,7 +3784,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-08-26T08:22:53+00:00" "time": "2021-10-10T06:43:24+00:00"
}, },
{ {
"name": "symfony/translation-contracts", "name": "symfony/translation-contracts",
@@ -3876,16 +3866,16 @@
}, },
{ {
"name": "tysonandre/var_representation_polyfill", "name": "tysonandre/var_representation_polyfill",
"version": "0.0.2", "version": "0.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/TysonAndre/var_representation_polyfill.git", "url": "https://github.com/TysonAndre/var_representation_polyfill.git",
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33" "reference": "0a942e74e18af5514749895507bc6ca7ab96399a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/3f17999ee1f257319ddc6721dd26ebbc5d175f33", "url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/0a942e74e18af5514749895507bc6ca7ab96399a",
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33", "reference": "0a942e74e18af5514749895507bc6ca7ab96399a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3896,6 +3886,9 @@
"phan/phan": "^4.0", "phan/phan": "^4.0",
"phpunit/phpunit": "^8.5.0" "phpunit/phpunit": "^8.5.0"
}, },
"suggest": {
"ext-var_representation": "*"
},
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@@ -3914,16 +3907,16 @@
"name": "Tyson Andre" "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": [ "keywords": [
"var_export", "var_export",
"var_representation" "var_representation"
], ],
"support": { "support": {
"issues": "https://github.com/TysonAndre/var_representation_polyfill/issues", "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", "name": "vlucas/valitron",
@@ -4181,7 +4174,7 @@
"platform": [], "platform": [],
"platform-dev": [], "platform-dev": [],
"platform-overrides": { "platform-overrides": {
"php": "7.4" "php": "8.0"
}, },
"plugin-api-version": "2.0.0" "plugin-api-version": "2.0.0"
} }
+7 -13
View File
@@ -2,7 +2,7 @@
body { body {
color: white; color: white;
background-color: black; background-color: black;
font-family: '맑은 고딕'; font-family: 'Pretendard';
} }
table { table {
@@ -14,10 +14,9 @@ table {
border-right-color: black; border-right-color: black;
border-bottom-color: black; border-bottom-color: black;
padding: 0px; padding: 0px;
font-size: 13px; font-size: 14px;
word-break: break-all; word-break: break-all;
text-align: center; text-align: center;
font-family: '맑은 고딕';
} }
th, th,
@@ -30,10 +29,9 @@ td {
border-right-color: black; border-right-color: black;
border-bottom-color: black; border-bottom-color: black;
padding: 0px; padding: 0px;
font-size: 13px; font-size: 14px;
word-break: break-all; word-break: break-all;
text-align: center; text-align: center;
font-family: '맑은 고딕';
} }
a.just_link { a.just_link {
@@ -70,11 +68,9 @@ a.just_link {
border-right-color: black; border-right-color: black;
border-bottom-color: black; border-bottom-color: black;
padding: 0px; padding: 0px;
font-size: 13px; font-size: 14px;
word-break: break-all; word-break: break-all;
text-align: center; text-align: center;
font-family: '맑은 고딕';
;
} }
.obj_fill { .obj_fill {
@@ -87,8 +83,7 @@ button.with_skin {
padding: 0 4px; padding: 0 4px;
background-color: black; background-color: black;
color: white; color: white;
font-family: '맑은 고딕'; font-size: 14px;
font-size: 13px;
} }
button.with_skin:disabled { button.with_skin:disabled {
@@ -98,8 +93,7 @@ button.with_skin:disabled {
input.with_skin { input.with_skin {
background-color: black; background-color: black;
color: white; color: white;
font-family: '맑은 고딕'; font-size: 14px;
font-size: 13px;
} }
input.with_skin:disabled { input.with_skin:disabled {
@@ -111,7 +105,7 @@ input.with_skin:disabled {
} }
.font1 { .font1 {
font-size: 13px; font-size: 14px;
} }
.font2 { .font2 {
+1 -1
View File
@@ -9,7 +9,7 @@ body, html{
h1.title { h1.title {
font-size: 50px; font-size: 50px;
font-family: 'Passion One', cursive; font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic';
font-weight: 400; font-weight: 400;
} }
+1 -1
View File
@@ -9,7 +9,7 @@
h1.title { h1.title {
font-size: 50px; font-size: 50px;
font-family: 'Passion One', cursive; font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic';
font-weight: 400; font-weight: 400;
} }
+35 -43
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__ . '/../vendor/autoload.php');
@@ -6,17 +7,26 @@ require(__DIR__.'/../vendor/autoload.php');
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="ko"> <html lang="ko">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>설치</title> <title>설치</title>
<?php /* NOTE: 설치 이전에는 ServConfig가 준비되어있지 않으므로 예외로 수동 지정 */ ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('../dist_js/vendors.js') ?> <?= WebUtil::printJS('../dist_js/gateway/vendors.js') ?>
<?=WebUtil::printJS('../dist_js/install.js')?> <?= WebUtil::printCSS('../dist_js/gateway/vendor.css') ?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?> <?= WebUtil::printJS('../dist_js/gateway/common_ts.js') ?>
<?= WebUtil::printCSS('../dist_js/gateway/common_ts.css') ?>
<?= WebUtil::printJS('../dist_js/gateway/install.js') ?>
<?= WebUtil::printCSS('../dist_js/gateway/install.css') ?>
<?= WebUtil::printCSS('../css/install.css') ?> <?= WebUtil::printCSS('../css/install.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 설치</h1> <h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 설치</h1>
@@ -32,16 +42,14 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row"> <div class="form-group row">
<label for="db_host" class="col-sm-4 col-form-label">DB호스트</label> <label for="db_host" class="col-sm-4 col-form-label">DB호스트</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="text" class="form-control" name="db_host" id="db_host" <input type="text" class="form-control" name="db_host" id="db_host" placeholder="호스트" value="localhost" />
placeholder="호스트" value="localhost" />
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="db_port" class="col-sm-4 col-form-label">DB포트</label> <label for="db_port" class="col-sm-4 col-form-label">DB포트</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="text" class="form-control" name="db_port" id="db_port" <input type="text" class="form-control" name="db_port" id="db_port" placeholder="접속 포트" value="3306" />
placeholder="접속 포트" value="3306" />
</div> </div>
</div> </div>
@@ -56,52 +64,43 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row"> <div class="form-group row">
<label for="db_pw" class="col-sm-4 col-form-label">DB비밀번호</label> <label for="db_pw" class="col-sm-4 col-form-label">DB비밀번호</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="password" class="form-control" name="db_pw" id="db_pw" <input type="password" class="form-control" name="db_pw" id="db_pw" placeholder="DB비밀번호" />
placeholder="DB비밀번호"/>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="db_name" class="col-sm-4 col-form-label">DB명</label> <label for="db_name" class="col-sm-4 col-form-label">DB명</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="text" class="form-control" name="db_name" id="db_name" <input type="text" class="form-control" name="db_name" id="db_name" placeholder="DB명(예:sammo)" />
placeholder="DB명(예:sammo)"/>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="serv_host" class="col-sm-4 col-form-label">접속 경로</label> <label for="serv_host" class="col-sm-4 col-form-label">접속 경로</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="text" class="form-control" name="serv_host" id="serv_host" <input type="text" class="form-control" name="serv_host" id="serv_host" placeholder="접속경로(예:http://www.example.com)" />
placeholder="접속경로(예:http://www.example.com)"/>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="shared_icon_path" class="col-sm-4 col-form-label">공용 아이콘 주소</label> <label for="shared_icon_path" class="col-sm-4 col-form-label">공용 아이콘 주소</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path" <input type="text" class="form-control" name="shared_icon_path" id="shared_icon_path" placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)" value="../image/icons" />
placeholder="공용 아이콘 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
value="../image/icons" />
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="game_image_path" class="col-sm-4 col-form-label">게임 이미지 주소</label> <label for="game_image_path" class="col-sm-4 col-form-label">게임 이미지 주소</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="text" class="form-control" name="game_image_path" id="game_image_path" <input type="text" class="form-control" name="game_image_path" id="game_image_path" placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)" value="../image/game" />
placeholder="게임 이미지 주소(웹 주소, 또는 접속 경로에 따른 상대 주소)"
value="../image/game" />
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="image_request_key" class="col-sm-4 col-form-label">이미지 갱신 키</label> <label for="image_request_key" class="col-sm-4 col-form-label">이미지 갱신 키</label>
<div class="input-group col-sm-8"> <div class="input-group col-sm-8">
<input type="text" class="form-control" name="image_request_key" id="image_request_key" <input type="text" class="form-control" name="image_request_key" id="image_request_key" placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게" value="" />
placeholder="이미지 서버의 hook/HashKey.php의 값과 동일하게" <div class="input-group-text">
value="" />
<div class="input-group-append">
<button id="btn_random_generate_key" class="btn btn-secondary" type="button">랜덤 생성</button> <button id="btn_random_generate_key" class="btn btn-secondary" type="button">랜덤 생성</button>
</div> </div>
</div> </div>
@@ -112,31 +111,27 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row"> <div class="form-group row">
<label for="kakao_rest_key" class="col-sm-4 col-form-label">카카오 API Rest Key</label> <label for="kakao_rest_key" class="col-sm-4 col-form-label">카카오 API Rest Key</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key" <input type="text" class="form-control" name="kakao_rest_key" id="kakao_rest_key" placeholder="카카오톡 API의 Rest Key" value="" />
placeholder="카카오톡 API의 Rest Key"
value="" />
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="kakao_admin_key" class="col-sm-4 col-form-label">카카오 API Admin Key</label> <label for="kakao_admin_key" class="col-sm-4 col-form-label">카카오 API Admin Key</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key" <input type="text" class="form-control" name="kakao_admin_key" id="kakao_admin_key" placeholder="카카오톡 API의 Admin Key" value="" />
placeholder="카카오톡 API의 Admin Key"
value="" />
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-sm-4"></div> <div class="col-sm-4"></div>
<div class="col-sm-8"> <div class="col-sm-8">
<button type="submit" <button type="submit" class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
</div><!--DB 폼 끝--> </div>
<!--DB 폼 끝-->
<div class="card" id="admin_form_card" style="display:none"> <div class="card" id="admin_form_card" style="display:none">
<h3 class="card-header"> <h3 class="card-header">
@@ -147,8 +142,7 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row"> <div class="form-group row">
<label for="username" class="col-sm-3 col-form-label">계정명</label> <label for="username" class="col-sm-3 col-form-label">계정명</label>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control" name="username" id="username" <input type="text" class="form-control" name="username" id="username" placeholder="계정명" />
placeholder="계정명"/>
</div> </div>
</div> </div>
@@ -156,24 +150,21 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row"> <div class="form-group row">
<label for="password" class="col-sm-3 col-form-label">비밀번호</label> <label for="password" class="col-sm-3 col-form-label">비밀번호</label>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="password" class="form-control" name="password" id="password" <input type="password" class="form-control" name="password" id="password" placeholder="비밀번호" />
placeholder="비밀번호"/>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="confirm_password" class="col-sm-3 col-form-label">비밀번호 확인</label> <label for="confirm_password" class="col-sm-3 col-form-label">비밀번호 확인</label>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="password" class="form-control" name="confirm_password" id="confirm_password" <input type="password" class="form-control" name="confirm_password" id="confirm_password" placeholder="비밀번호 확인" />
placeholder="비밀번호 확인"/>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="nickname" class="col-sm-3 col-form-label">닉네임</label> <label for="nickname" class="col-sm-3 col-form-label">닉네임</label>
<div class="col-sm-9"> <div class="col-sm-9">
<input type="text" class="form-control" name="nickname" id="nickname" <input type="text" class="form-control" name="nickname" id="nickname" placeholder="닉네임" value="운영자" />
placeholder="닉네임" value="운영자"/>
</div> </div>
</div> </div>
@@ -182,13 +173,13 @@ require(__DIR__.'/../vendor/autoload.php');
<div class="form-group row"> <div class="form-group row">
<div class="col-sm-3"></div> <div class="col-sm-3"></div>
<div class="col-sm-9"> <div class="col-sm-9">
<button type="submit" <button type="submit" class="btn btn-primary btn-lg btn-block login-button">관리자 계정 생성</button>
class="btn btn-primary btn-lg btn-block login-button">관리자 계정 생성</button>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
</div><!--ADMIN 폼 끝--> </div>
<!--ADMIN 폼 끝-->
<!-- TODO: conf_kakao.php --> <!-- TODO: conf_kakao.php -->
@@ -196,4 +187,5 @@ require(__DIR__.'/../vendor/autoload.php');
</div> </div>
</div> </div>
</body> </body>
</html> </html>
+2 -2
View File
@@ -24,7 +24,8 @@ $plock = $db->queryFirstField('SELECT plock FROM plock');
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?> <?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
<form action=_119_b.php method=post> <form action=_119_b.php method=post>
@@ -35,4 +36,3 @@ $plock = $db->queryFirstField('SELECT plock FROM plock');
</form> </form>
</body> </body>
</html> </html>
+2 -1
View File
@@ -22,7 +22,8 @@ $admin = getAdmin();
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?> <?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
<table align=center width=1000 class="tb_layout bg0"> <table align=center width=1000 class="tb_layout bg0">
+4 -3
View File
@@ -23,7 +23,8 @@ $db = DB::db();
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('css/common.css') ?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
@@ -50,7 +51,7 @@ $db = DB::db();
<?php <?php
echo " echo "
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>"; <select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:14px'>";
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)'); $generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
foreach ($generalList as $general) { foreach ($generalList as $general) {
@@ -73,7 +74,7 @@ $db = DB::db();
</td> </td>
<td width=100 align=center>아이템 지급</td> <td width=100 align=center>아이템 지급</td>
<td width=504> <td width=504>
<select name=weapon size=1 style='color:white;background-color:black;font-size:13px'>"; <select name=weapon size=1 style='color:white;background-color:black;font-size:14px'>";
foreach (GameConst::$allItems as $itemCategories) { foreach (GameConst::$allItems as $itemCategories) {
foreach ($itemCategories as $item => $cnt) { foreach ($itemCategories as $item => $cnt) {
if ($cnt == 0) { if ($cnt == 0) {
+5 -3
View File
@@ -23,7 +23,8 @@ $ipGroupList = Util::arrayGroupBy(
'ip_c' 'ip_c'
); );
function colorBlockedName($general){ function colorBlockedName($general)
{
if (!$general['blocked']) { if (!$general['blocked']) {
return $general['name']; return $general['name'];
} }
@@ -40,7 +41,8 @@ function colorBlockedName($general){
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('css/common.css') ?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
@@ -61,7 +63,7 @@ function colorBlockedName($general){
<?php <?php
echo " echo "
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>"; <select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:14px'>";
foreach ($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general) { foreach ($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general) {
$style = "style=;"; $style = "style=;";
+2 -1
View File
@@ -39,7 +39,8 @@ $sel2[$type2] = "selected";
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('css/common.css') ?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
+2 -1
View File
@@ -86,7 +86,8 @@ $generalObj = General::createGeneralObjFromDB($gen);
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('css/common.css') ?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
+34 -11
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -25,18 +26,24 @@ $sel[$type] = "selected";
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>외교정보</title> <title>외교정보</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>외 교 정 보<br><?=closeButton()?></td></tr> <tr>
<tr><td> <td>외 교 정 보<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post> <form name=form1 method=post>
정렬순서 : 정렬순서 :
<select name=type size=1> <select name=type size=1>
@@ -44,10 +51,13 @@ $sel[$type] = "selected";
</select> </select>
<input type=submit name=btn value='정렬하기'> <input type=submit name=btn value='정렬하기'>
</form> </form>
</td></tr> </td>
</tr>
</table> </table>
<table width=1000 align=center class='tb_layout bg0'> <table width=1000 align=center class='tb_layout bg0'>
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr> <tr>
<td colspan=9 align=center bgcolor=blue>외 교 관 계</td>
</tr>
<tr> <tr>
<td width=130 align=center class='bg1'>국 가 명</td> <td width=130 align=center class='bg1'>국 가 명</td>
<td width=130 align=center class='bg1'>국 가 명</td> <td width=130 align=center class='bg1'>국 가 명</td>
@@ -73,10 +83,18 @@ foreach($db->query('SELECT * from diplomacy where me < you order by state desc')
} }
switch ($dip['state']) { switch ($dip['state']) {
case 0: $state = "<font color=red>교 전</font>"; break; case 0:
case 1: $state = "<font color=magenta>선포중</font>"; break; $state = "<font color=red>교 전</font>";
case 2: $state = "통 상"; break; break;
case 7: $state = "<font color=green>불가침</font>"; break; case 1:
$state = "<font color=magenta>선포중</font>";
break;
case 2:
$state = "통 상";
break;
case 7:
$state = "<font color=green>불가침</font>";
break;
} }
$date = TimeUtil::now(); $date = TimeUtil::now();
@@ -92,8 +110,13 @@ foreach($db->query('SELECT * from diplomacy where me < you order by state desc')
?> ?>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+3 -1
View File
@@ -26,5 +26,7 @@ foreach ($db->queryFirstColumn(
} }
foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){ foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){
$genObj->mergeTotalInheritancePoint(); $genObj->mergeTotalInheritancePoint(true);
applyInheritanceUser($genObj->getVar('owner'));
$genObj->clearInheritancePoint();
} }
+95 -50
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -25,25 +26,27 @@ $templates = new \League\Plates\Engine(__DIR__.'/templates');
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" /> <meta name="viewport" content="width=1136" />
<title><?= UniqueConst::$serverName ?>: 명장일람</title> <title><?= UniqueConst::$serverName ?>: 명장일람</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/hallOfFame.css') ?> <?= WebUtil::printCSS('css/hallOfFame.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?> <?= WebUtil::printDist('ts', 'common') ?>
<?=WebUtil::printJS('dist_js/common.js')?>
</head> </head>
<body> <body>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<tr><td>명 장 일 람<br><?=closeButton()?></td></tr> <tr>
<td>명 장 일 람<br><?= closeButton() ?></td>
</tr>
</table> </table>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<form name=form1 action=a_bestGeneral.php method=post> <form name=form1 action=a_bestGeneral.php method=post>
<tr><td align=center> <tr>
<td align=center>
<input type=submit name=btn value='유저 보기'> <input type=submit name=btn value='유저 보기'>
<input type=submit name=btn value='NPC 보기'> <input type=submit name=btn value='NPC 보기'>
</td></tr> </td>
</tr>
</form> </form>
</table> </table>
<div style="margin:auto;width:1100px;"> <div style="margin:auto;width:1100px;">
@@ -64,8 +67,14 @@ foreach (getAllNationStaticInfo() as $nation) {
} }
$types = [ $types = [
["명 성", "int", function($v){$v['value'] = $v['experience']; return $v; }], ["명 성", "int", function ($v) {
["계 급", "int", function($v){$v['value'] = $v['dedication']; return $v; }], $v['value'] = $v['experience'];
return $v;
}],
["계 급", "int", function ($v) {
$v['value'] = $v['dedication'];
return $v;
}],
["계 략 성 공", "int", function ($v) use ($gameStor) { ["계 략 성 공", "int", function ($v) use ($gameStor) {
$v['value'] = $v['firenum']; $v['value'] = $v['firenum'];
if ($gameStor->isunited) { if ($gameStor->isunited) {
@@ -79,49 +88,75 @@ $types = [
$v['fgColor'] = newColor($v['bgColor']); $v['fgColor'] = newColor($v['bgColor']);
return $v; return $v;
}], }],
["전 투 횟 수", "int", function($v){$v['value'] = $v['warnum']; return $v; }], ["전 투 횟 수", "int", function ($v) {
["승 리", "int", function($v){$v['value'] = $v['killnum']; return $v; }], $v['value'] = $v['warnum'];
return $v;
}],
["승 리", "int", function ($v) {
$v['value'] = $v['killnum'];
return $v;
}],
["승 률", "percent", function ($v) { ["승 률", "percent", function ($v) {
if ($v['warnum'] < 10) { if ($v['warnum'] < 10) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['killnum'] / max(1, $v['warnum']); $v['value'] = $v['killnum'] / max(1, $v['warnum']);
} }
return $v; return $v;
}], }],
["점 령", "int", function($v){$v['value'] = $v['occupied']; return $v; }], ["점 령", "int", function ($v) {
["사 살", "int", function($v){$v['value'] = $v['killcrew']; return $v; }], $v['value'] = $v['occupied'];
return $v;
}],
["사 살", "int", function ($v) {
$v['value'] = $v['killcrew'];
return $v;
}],
["살 상 률", "percent", function ($v) { ["살 상 률", "percent", function ($v) {
if ($v['warnum'] < 10) { if ($v['warnum'] < 10) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['killcrew'] / max(1, $v['deathcrew']); $v['value'] = $v['killcrew'] / max(1, $v['deathcrew']);
} }
return $v; return $v;
}], }],
["대 인 사 살", "int", function($v){$v['value'] = $v['killcrew_person']; return $v; }], ["대 인 사 살", "int", function ($v) {
$v['value'] = $v['killcrew_person'];
return $v;
}],
["대 인 살 상 률", "percent", function ($v) { ["대 인 살 상 률", "percent", function ($v) {
if ($v['warnum'] < 10) { if ($v['warnum'] < 10) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['killcrew_person'] / max(1, $v['deathcrew_person']); $v['value'] = $v['killcrew_person'] / max(1, $v['deathcrew_person']);
} }
return $v; return $v;
}], }],
["보 병 숙 련 도", "int", function($v){$v['value'] = $v['dex1']; return $v; }], ["보 병 숙 련 도", "int", function ($v) {
["궁 병 숙 련 도", "int", function($v){$v['value'] = $v['dex2']; return $v; }], $v['value'] = $v['dex1'];
["기 병 숙 련 도", "int", function($v){$v['value'] = $v['dex3']; return $v; }], return $v;
["귀 병 숙 련 도", "int", function($v){$v['value'] = $v['dex4']; return $v; }], }],
[" 병 숙 련 도", "int", function($v){$v['value'] = $v['dex5']; return $v; }], [" 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex2'];
return $v;
}],
["기 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex3'];
return $v;
}],
["귀 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex4'];
return $v;
}],
["차 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex5'];
return $v;
}],
["전 력 전 승 률", "percent", function ($v) { ["전 력 전 승 률", "percent", function ($v) {
$totalCnt = $v['ttw'] + $v['ttd'] + $v['ttl']; $totalCnt = $v['ttw'] + $v['ttd'] + $v['ttl'];
if ($totalCnt < 50) { if ($totalCnt < 50) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['ttw'] / max(1, $totalCnt); $v['value'] = $v['ttw'] / max(1, $totalCnt);
} }
return $v; return $v;
@@ -130,8 +165,7 @@ $types = [
$totalCnt = $v['tlw'] + $v['tld'] + $v['tll']; $totalCnt = $v['tlw'] + $v['tld'] + $v['tll'];
if ($totalCnt < 50) { if ($totalCnt < 50) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['tlw'] / max(1, $totalCnt); $v['value'] = $v['tlw'] / max(1, $totalCnt);
} }
return $v; return $v;
@@ -140,8 +174,7 @@ $types = [
$totalCnt = $v['tsw'] + $v['tsd'] + $v['tsl']; $totalCnt = $v['tsw'] + $v['tsd'] + $v['tsl'];
if ($totalCnt < 50) { if ($totalCnt < 50) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['tsw'] / max(1, $totalCnt); $v['value'] = $v['tsw'] / max(1, $totalCnt);
} }
return $v; return $v;
@@ -150,21 +183,28 @@ $types = [
$totalCnt = $v['tiw'] + $v['tid'] + $v['til']; $totalCnt = $v['tiw'] + $v['tid'] + $v['til'];
if ($totalCnt < 50) { if ($totalCnt < 50) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['tiw'] / max(1, $totalCnt); $v['value'] = $v['tiw'] / max(1, $totalCnt);
} }
return $v; return $v;
}], }],
["베 팅 투 자 액", "int", function($v){$v['value'] = $v['betgold']; return $v; }], ["베 팅 투 자 액", "int", function ($v) {
["베 팅 당 첨", "int", function($v){$v['value'] = $v['betwin']; return $v; }], $v['value'] = $v['betgold'];
["베 팅 수 익 금", "int", function($v){$v['value'] = $v['betwingold']; return $v; }], return $v;
}],
["베 팅 당 첨", "int", function ($v) {
$v['value'] = $v['betwin'];
return $v;
}],
["베 팅 수 익 금", "int", function ($v) {
$v['value'] = $v['betwingold'];
return $v;
}],
["베 팅 수 익 률", "percent", function ($v) { ["베 팅 수 익 률", "percent", function ($v) {
if ($v['betgold'] < GameConst::$defaultGold) { if ($v['betgold'] < GameConst::$defaultGold) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['betwingold'] / max(1, $v['betgold']); $v['value'] = $v['betwingold'] / max(1, $v['betgold']);
} }
return $v; return $v;
@@ -177,8 +217,9 @@ foreach($db->query(
experience, dedication, experience, dedication,
dex1, dex2, dex3, dex4, dex5, dex1, dex2, dex3, dex4, dex5,
horse, weapon, book, item horse, weapon, book, item
FROM general WHERE %l", $btn == "NPC 보기"?"npc>=2":"npc<2") as $general FROM general WHERE %l",
){ $btn == "NPC 보기" ? "npc>=2" : "npc<2"
) as $general) {
$generalID = $general['no']; $generalID = $general['no'];
$general['bgColor'] = $nationColor[$general['nation']] ?? GameConst::$basecolor4; $general['bgColor'] = $nationColor[$general['nation']] ?? GameConst::$basecolor4;
$general['fgColor'] = newColor($general['bgColor']); $general['fgColor'] = newColor($general['bgColor']);
@@ -187,8 +228,7 @@ foreach($db->query(
if (key_exists('picture', $general)) { if (key_exists('picture', $general)) {
$imageTemp = GetImageURL($general['imgsvr']); $imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}"; $general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
} } else {
else{
$general['pictureFullPath'] = GetImageURL(0) . "/default.jpg"; $general['pictureFullPath'] = GetImageURL(0) . "/default.jpg";
} }
@@ -217,8 +257,7 @@ foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
if ($typeValue == 'percent') { if ($typeValue == 'percent') {
$general['printValue'] = number_format($value * 100, 2) . '%'; $general['printValue'] = number_format($value * 100, 2) . '%';
} } else {
else {
$general['printValue'] = number_format($value); $general['printValue'] = number_format($value);
} }
return $general; return $general;
@@ -247,7 +286,10 @@ $itemTypes = [
'item' => '도 구' 'item' => '도 구'
]; ];
$simpleItemTypes = array_keys($itemTypes); array_map(function($itemType){return $itemType[1];}, $itemTypes); $simpleItemTypes = array_keys($itemTypes);
array_map(function ($itemType) {
return $itemType[1];
}, $itemTypes);
$itemOwners = []; $itemOwners = [];
foreach ($generals as $general) { foreach ($generals as $general) {
@@ -260,11 +302,9 @@ foreach($generals as $general){
if (key_exists($itemClassName, $itemOwners)) { if (key_exists($itemClassName, $itemOwners)) {
$itemOwners[$itemClassName][] = $general; $itemOwners[$itemClassName][] = $general;
} } else {
else{
$itemOwners[$itemClassName] = [$general]; $itemOwners[$itemClassName] = [$general];
} }
} }
} }
@@ -331,8 +371,13 @@ foreach(GameConst::$allItems as $itemType=>$itemList){
?> ?>
</div> </div>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+14 -8
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -17,19 +18,19 @@ increaseRefresh("왕조일람", 1);
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 왕조일람</title> <title><?= UniqueConst::$serverName ?>: 왕조일람</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', 'common') ?>
</head> </head>
<body> <body>
<table align=center width=1000 class="tb_layout bg0"> <table align=center width=1000 class="tb_layout bg0">
<tr><td>역 대 왕 조<br> <tr>
<td>역 대 왕 조<br>
<button onclick=window.close()>창 닫기</button><br> <button onclick=window.close()>창 닫기</button><br>
</td></tr> </td>
</tr>
</table> </table>
<?php <?php
@@ -122,8 +123,13 @@ foreach($emperiors as $emperior){
?> ?>
<table style="margin-top:10px;" align=center width=1000 class='tb_layout bg0'> <table style="margin-top:10px;" align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+18 -11
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -26,18 +27,21 @@ $serverID = $emperior['server_id']??($emperior['serverID']??null);
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 왕조일람</title> <title><?= UniqueConst::$serverName ?>: 왕조일람</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
<table align=center width=1000 class="tb_layout bg0"> <table align=center width=1000 class="tb_layout bg0">
<tr><td>역 대 왕 조<br> <tr>
<td>역 대 왕 조<br>
<button onclick=window.close()>창 닫기</button> <button onclick=window.close()>창 닫기</button>
<div style="float:right;"><a href="a_emperior.php"><button type='button'>전체보기</button></a><div> <div style="float:right;"><a href="a_emperior.php"><button type='button'>전체보기</button></a>
</td></tr> <div>
</td>
</tr>
</table> </table>
@@ -188,12 +192,10 @@ if($showServers){
} }
$liveGenerals = $db->query('SELECT `no`as`general_no`, `name` FROM general WHERE no IN %li', $liveGenerals); $liveGenerals = $db->query('SELECT `no`as`general_no`, `name` FROM general WHERE no IN %li', $liveGenerals);
$nation['generalsFull'] = array_merge($liveGenerals, $generals); $nation['generalsFull'] = array_merge($liveGenerals, $generals);
} } else {
else{
$nation['generalsFull'] = $generals; $nation['generalsFull'] = $generals;
} }
} } else {
else{
$nation['generalsFull'] = []; $nation['generalsFull'] = [];
} }
@@ -207,8 +209,13 @@ if($showServers){
?> ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+19 -10
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -43,19 +44,21 @@ if($gameStor->isunited){
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 장수일람</title> <title><?= UniqueConst::$serverName ?>: 장수일람</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?> <?= WebUtil::printDist('ts', 'common') ?>
<?=WebUtil::printJS('dist_js/common.js')?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>장 수 일 람<br><?=closeButton()?></td></tr> <tr>
<tr><td><form name=form1 method=post>정렬순서 : <td>장 수 일 람<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select id='viewType' name='type' size=1> <select id='viewType' name='type' size=1>
<option value=1>국가</option> <option value=1>국가</option>
<option value=2>통솔</option> <option value=2>통솔</option>
@@ -73,8 +76,10 @@ if($gameStor->isunited){
<option value=14>연령</option> <option value=14>연령</option>
<option value=15>NPC</option> <option value=15>NPC</option>
</select> </select>
<input type=submit value='정렬하기'></form> <input type=submit value='정렬하기'>
</td></tr> </form>
</td>
</tr>
</table> </table>
<?php <?php
$nationname = []; $nationname = [];
@@ -201,8 +206,12 @@ echo "
?> ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
+23 -27
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -31,8 +32,7 @@ $scenarioList = (function(){
if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) { if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) {
$searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name']; $searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name'];
$searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx); $searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx);
} } else {
else{
$searchScenarioName = '* 모두 *'; $searchScenarioName = '* 모두 *';
$searchFilter = $db->sqleval('season = %i', $seasonIdx); $searchFilter = $db->sqleval('season = %i', $seasonIdx);
} }
@@ -46,37 +46,31 @@ else{
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1136" /> <meta name="viewport" content="width=1136" />
<title><?= UniqueConst::$serverName ?>: 명예의 전당</title> <title><?= UniqueConst::$serverName ?>: 명예의 전당</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/hallOfFame.css') ?> <?= WebUtil::printCSS('css/hallOfFame.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?> <?= WebUtil::printDist('ts', ['common', 'hallOfFame']) ?>
<?=WebUtil::printJs('dist_js/hallOfFame.js')?>
</head> </head>
<body> <body>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<tr><td>명 예 의 전 당<br><?=closeButton()?></td></tr> <tr>
<tr><td> <td>명 예 의 전 당<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
시나리오 검색 : <select id="by_scenario" name="by_scenario"> 시나리오 검색 : <select id="by_scenario" name="by_scenario">
<?php foreach ($scenarioList as $iterSeasonIdx => $subScenarioList) : ?> <?php foreach ($scenarioList as $iterSeasonIdx => $subScenarioList) : ?>
<option <option data-season="<?= $iterSeasonIdx ?>" value="" <?= ($iterSeasonIdx == $seasonIdx && $scenarioIdx === null) ? "selected='selected'" : '' ?>>* 시즌 : <?= $iterSeasonIdx ?> 종합 *</option>
data-season="<?=$iterSeasonIdx?>"
value=""
<?=($iterSeasonIdx == $seasonIdx && $scenarioIdx === null)?"selected='selected'":''?>
>* 시즌 : <?=$iterSeasonIdx?> 종합 *</option>
<?php foreach ($subScenarioList as $info) : ?> <?php foreach ($subScenarioList as $info) : ?>
<option <option data-season="<?= $iterSeasonIdx ?>" value="<?= $info['scenario'] ?>" <?= ($iterSeasonIdx == $seasonIdx && $info['scenario'] === $scenarioIdx) ? "selected='selected'" : '' ?>><?= $info['name'] ?>(<?= $info['cnt'] ?>회)</option>
data-season="<?=$iterSeasonIdx?>"
value="<?=$info['scenario']?>"
<?=($iterSeasonIdx == $seasonIdx && $info['scenario']===$scenarioIdx)?"selected='selected'":''?>
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
<?php endforeach; ?> <?php endforeach; ?>
<?php endforeach; ?> <?php endforeach; ?>
?> ?>
</select> </select>
</td></tr> </td>
</tr>
</table> </table>
<div style="margin:auto;width:1100px;"> <div style="margin:auto;width:1100px;">
<?php <?php
@@ -128,8 +122,7 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
if (!key_exists('bgColor', $general)) { if (!key_exists('bgColor', $general)) {
if (!key_exists('color', $general)) { if (!key_exists('color', $general)) {
$general['bgColor'] = GameConst::$basecolor4; $general['bgColor'] = GameConst::$basecolor4;
} } else {
else{
$general['bgColor'] = $general['color']; $general['bgColor'] = $general['color'];
} }
} }
@@ -141,8 +134,7 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
if (key_exists('picture', $general)) { if (key_exists('picture', $general)) {
$imageTemp = GetImageURL($general['imgsvr']); $imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}"; $general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
} } else {
else{
$general['pictureFullPath'] = GetImageURL(0) . "/default.jpg"; $general['pictureFullPath'] = GetImageURL(0) . "/default.jpg";
} }
@@ -150,8 +142,7 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
$value = $general['value']; $value = $general['value'];
if ($typeValue == 'percent') { if ($typeValue == 'percent') {
$general['printValue'] = number_format($value * 100, 2) . '%'; $general['printValue'] = number_format($value * 100, 2) . '%';
} } else {
else {
$general['printValue'] = number_format($value); $general['printValue'] = number_format($value);
} }
} }
@@ -167,8 +158,13 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
?> ?>
</div> </div>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+31 -16
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -47,8 +48,7 @@ $e = $e_year * 12 + $e_month;
if ($serverID !== UniqueConst::$serverID) { if ($serverID !== UniqueConst::$serverID) {
$mapTheme = $db->queryFirstField('SELECT map FROM ng_games WHERE server_id=%s', $serverID) ?: 'che'; $mapTheme = $db->queryFirstField('SELECT map FROM ng_games WHERE server_id=%s', $serverID) ?: 'che';
} } else {
else{
$mapTheme = $admin['map_theme'] ?? 'che'; $mapTheme = $admin['map_theme'] ?? 'che';
} }
@@ -56,8 +56,7 @@ else{
if ($serverID !== UniqueConst::$serverID && !$yearmonth) { if ($serverID !== UniqueConst::$serverID && !$yearmonth) {
$year = $s_year; $year = $s_year;
$month = $s_month; $month = $s_month;
} } else if (!$yearmonth) {
else if (!$yearmonth) {
$year = $admin['year']; $year = $admin['year'];
$month = $admin['month'] - 1; $month = $admin['month'] - 1;
} else { } else {
@@ -100,14 +99,13 @@ $nations = Json::decode($history['nations']);
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 연감</title> <title><?= UniqueConst::$serverName ?>: 연감</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?= WebUtil::printJS("js/map/theme_{$mapTheme}.js") ?> <?= WebUtil::printJS("js/map/theme_{$mapTheme}.js") ?>
<?=WebUtil::printJS('dist_js/history.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?> <?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printCSS('css/history.css') ?> <?= WebUtil::printCSS('css/history.css') ?>
<?= WebUtil::printDist('ts', ['common', 'history']) ?>
<script> <script>
var startYear = <?= $s_year ?>; var startYear = <?= $s_year ?>;
var startMonth = <?= $s_month ?>; var startMonth = <?= $s_month ?>;
@@ -121,8 +119,11 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>연 감<br><?=closeButton()?></td></tr> <tr>
<tr><td> <td>연 감<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post> <form name=form1 method=post>
연월 선택 : 연월 선택 :
<input type=submit name=btn value="◀◀ 이전달"> <input type=submit name=btn value="◀◀ 이전달">
@@ -133,10 +134,15 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
<input type=submit name=btn value='조회하기'> <input type=submit name=btn value='조회하기'>
<input type=submit name=btn value="다음달 ▶▶"> <input type=submit name=btn value="다음달 ▶▶">
</form> </form>
</td></tr> </td>
</tr>
</table> </table>
<table align=center width=1000 height=520 class='tb_layout bg0'> <table align=center width=1000 height=520 class='tb_layout bg0'>
<thead><tr><th colspan=5 align=center class='bg1'>중 원 지 도</th></tr></thead> <thead>
<tr>
<th colspan=5 align=center class='bg1'>중 원 지 도</th>
</tr>
</thead>
<tbody> <tbody>
<tr height=520> <tr height=520>
<td width=698> <td width=698>
@@ -166,13 +172,17 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
</table> </table>
</td> </td>
</tr> </tr>
<tr><th colspan=5 align=center class='bg1'>중 원 정 세</th></tr> <tr>
<th colspan=5 align=center class='bg1'>중 원 정 세</th>
</tr>
<tr> <tr>
<td colspan=5 valign=top> <td colspan=5 valign=top>
<?= formatHistoryToHTML(Json::decode($history['global_history'])) ?> <?= formatHistoryToHTML(Json::decode($history['global_history'])) ?>
</td> </td>
</tr> </tr>
<tr><th colspan=5 align=center class='bg1'>장 수 동 향</th></tr> <tr>
<th colspan=5 align=center class='bg1'>장 수 동 향</th>
</tr>
<tr> <tr>
<td colspan=5 valign=top> <td colspan=5 valign=top>
<?= formatHistoryToHTML(Json::decode($history['global_action'])) ?> <?= formatHistoryToHTML(Json::decode($history['global_action'])) ?>
@@ -181,8 +191,12 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
</tbody> </tbody>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
<script> <script>
window.serverNick = '<?= DB::prefix() ?>'; window.serverNick = '<?= DB::prefix() ?>';
@@ -197,4 +211,5 @@ reloadWorldMap({
}); });
</script> </script>
</body> </body>
</html> </html>
+27 -15
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -15,7 +16,10 @@ increaseRefresh("세력일람", 2);
$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner=%i', $userID); $me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner=%i', $userID);
$con = checkLimit($me['con']); $con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); } if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@@ -26,22 +30,23 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력일람</title> <title><?= UniqueConst::$serverName ?>: 세력일람</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/extKingdoms.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common', 'extKingdoms']) ?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>세 력 일 람<br><?=closeButton()?></td></tr> <tr>
<td>세 력 일 람<br><?= closeButton() ?></td>
</tr>
</table> </table>
<?php <?php
$nations = getAllNationStaticInfo(); $nations = getAllNationStaticInfo();
uasort($nations, function($lhs, $rhs){return $rhs['power']<=>$lhs['power'];}); uasort($nations, function ($lhs, $rhs) {
return $rhs['power'] <=> $lhs['power'];
});
$nations[0] = getNationStaticInfo(0); $nations[0] = getNationStaticInfo(0);
@@ -79,8 +84,7 @@ foreach ($nations as $nation) {
$generalPermission = checkSecretPermission($general, false); $generalPermission = checkSecretPermission($general, false);
if ($generalPermission == 4) { if ($generalPermission == 4) {
$ambassadors[] = $general['name']; $ambassadors[] = $general['name'];
} } else if ($generalPermission == 3) {
else if($generalPermission == 3){
$auditors[] = $general['name']; $auditors[] = $general['name'];
} }
} }
@@ -140,9 +144,13 @@ foreach ($nations as $nation) {
<tr> <tr>
<td colspan=8> 장수 일람 : "; <td colspan=8> 장수 일람 : ";
foreach ($generals as $general) { foreach ($generals as $general) {
if($general['npc'] >= 2) { echo "<font color=cyan>{$general['name']}</font>, "; } if ($general['npc'] >= 2) {
elseif($general['npc'] == 1) { echo "<font color=skyblue>{$general['name']}</font>, "; } echo "<font color=cyan>{$general['name']}</font>, ";
else { echo "{$general['name']}, "; } } elseif ($general['npc'] == 1) {
echo "<font color=skyblue>{$general['name']}</font>, ";
} else {
echo "{$general['name']}, ";
}
} }
echo " echo "
</td> </td>
@@ -186,8 +194,12 @@ echo"
?> ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
+20 -13
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -27,18 +28,19 @@ $sel[$type] = "selected";
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 빙의일람</title> <title><?= UniqueConst::$serverName ?>: 빙의일람</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>빙 의 일 람<br><?=closeButton()?></td></tr> <tr>
<tr><td><form name=form1 method=post>정렬순서 : <td>빙 의 일 람<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1> <select name=type size=1>
<option <?= $sel[1] ?? '' ?> value=1>이름</option> <option <?= $sel[1] ?? '' ?> value=1>이름</option>
<option <?= $sel[2] ?? '' ?> value=2>국가</option> <option <?= $sel[2] ?? '' ?> value=2>국가</option>
@@ -49,8 +51,10 @@ $sel[$type] = "selected";
<option <?= $sel[7] ?? '' ?> value=7>명성</option> <option <?= $sel[7] ?? '' ?> value=7>명성</option>
<option <?= $sel[8] ?? '' ?> value=8>계급</option> <option <?= $sel[8] ?? '' ?> value=8>계급</option>
</select> </select>
<input type=submit value='정렬하기'></form> <input type=submit value='정렬하기'>
</td></tr> </form>
</td>
</tr>
</table> </table>
<?php <?php
$nationName = []; $nationName = [];
@@ -83,8 +87,7 @@ if($isAsc){
usort($generalList, function ($lhs, $rhs) use ($sortKey) { usort($generalList, function ($lhs, $rhs) use ($sortKey) {
return $lhs[$sortKey] <=> $rhs[$sortKey]; return $lhs[$sortKey] <=> $rhs[$sortKey];
}); });
} } else {
else{
usort($generalList, function ($lhs, $rhs) use ($sortKey) { usort($generalList, function ($lhs, $rhs) use ($sortKey) {
return $rhs[$sortKey] <=> $lhs[$sortKey]; return $rhs[$sortKey] <=> $lhs[$sortKey];
}); });
@@ -124,8 +127,12 @@ else{
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
+20 -13
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -18,20 +19,26 @@ $mapTheme = $gameStor->map_theme??'che';
$me = $db->queryFirstRow('SELECT con,turntime from general where owner=%i', $userID); $me = $db->queryFirstRow('SELECT con,turntime from general where owner=%i', $userID);
$con = checkLimit($me['con']); $con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); } if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력도</title> <title><?= UniqueConst::$serverName ?>: 세력도</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('css/normalize.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?= WebUtil::printJS('d_shared/base_map.js') ?> <?= WebUtil::printJS('d_shared/base_map.js') ?>
<?=WebUtil::printJS('dist_js/map.js')?> <?= WebUtil::printDist('ts', ['common', 'map']) ?>
<script> <script>
window.serverNick = '<?= DB::prefix() ?>'; window.serverNick = '<?= DB::prefix() ?>';
window.serverID = '<?= UniqueConst::$serverID ?>'; window.serverID = '<?= UniqueConst::$serverID ?>';
@@ -45,17 +52,13 @@ $(function(){
}); });
</script> </script>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/normalize.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/map.css')?>
</head> </head>
<body> <body>
<table align=center width=1200 class='tb_layout bg0'> <table align=center width=1200 class='tb_layout bg0'>
<tr><td>세 력 도<br><?=closeButton()?></td></tr> <tr>
<td>세 력 도<br><?= closeButton() ?></td>
</tr>
</table> </table>
<table align=center width=1200 height=520 class='tb_layout bg0'> <table align=center width=1200 height=520 class='tb_layout bg0'>
<tr height=520> <tr height=520>
@@ -73,8 +76,12 @@ $(function(){
</tr> </tr>
</table> </table>
<table align=center width=1200 class='tb_layout bg0'> <table align=center width=1200 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
+74 -19
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -47,23 +48,21 @@ if ($admin['maxonline'] < $curonline) {
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: 트래픽정보</title> <title><?= UniqueConst::$serverName ?>: 트래픽정보</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<style> <style>
.big_bar { .big_bar {
float: left; float: left;
position: relative; position: relative;
height: 30px; height: 30px;
} }
.big_bar span { .big_bar span {
float: right; float: right;
padding: 0; padding: 0;
@@ -83,16 +82,26 @@ span.out_bar{
margin-left: 1ch; margin-left: 1ch;
} }
</style> </style>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['common']) ?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>트 래 픽 정 보<br><?=closeButton()?></td></tr> <tr>
<td>트 래 픽 정 보<br><?= closeButton() ?></td>
</tr>
</table> </table>
<br> <br>
<table align=center width=1016> <table align=center width=1016>
<tr><td align=left> <tr>
<td align=left>
<table align=center class='tb_layout bg0'> <table align=center class='tb_layout bg0'>
<tr><td colspan=4 align=center class='bg2'><font size=5>접 속 량</font></td></tr> <tr>
<td colspan=4 align=center class='bg2'>
<font size=5>접 속 량</font>
</td>
</tr>
<?php <?php
$refresh[] = $admin['refresh']; $refresh[] = $admin['refresh'];
foreach ($refresh as $i => $value) { foreach ($refresh as $i => $value) {
@@ -117,7 +126,9 @@ foreach($refresh as $i=>$value){
<?php <?php
} }
?> ?>
<tr><td colspan=4 height=5 align=center class='bg1'></td></tr> <tr>
<td colspan=4 height=5 align=center class='bg1'></td>
</tr>
<tr> <tr>
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxrefresh'] ?></td> <td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxrefresh'] ?></td>
</tr> </tr>
@@ -127,7 +138,11 @@ foreach($refresh as $i=>$value){
</td> </td>
<td align=right> <td align=right>
<table align=center class='tb_layout bg0'> <table align=center class='tb_layout bg0'>
<tr><td colspan=4 align=center class='bg2'><font size=5>접 속 자</font></td></tr> <tr>
<td colspan=4 align=center class='bg2'>
<font size=5>접 속 자</font>
</td>
</tr>
<?php <?php
$online[] = $curonline; $online[] = $curonline;
foreach ($online as $i => $value) { foreach ($online as $i => $value) {
@@ -152,16 +167,23 @@ foreach($online as $i=>$value){
<?php <?php
} }
?> ?>
<tr><td colspan=4 height=5 align=center class='bg1'></td></tr> <tr>
<td colspan=4 height=5 align=center class='bg1'></td>
</tr>
<tr> <tr>
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxonline'] ?></td> <td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxonline'] ?></td>
</tr> </tr>
</table> </table>
</td></tr> </td>
</tr>
</table> </table>
<br> <br>
<table align=center class='tb_layout bg0'> <table align=center class='tb_layout bg0'>
<tr><td colspan=3 align=center class='bg2'><font size=5>주 의 대 상 자 (순간과도갱신)</font></td></tr> <tr>
<td colspan=3 align=center class='bg2'>
<font size=5>주 의 대 상 자 (순간과도갱신)</font>
</td>
</tr>
<?php <?php
$max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general'); $max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general');
$max_refresh['name'] = '접속자 총합'; $max_refresh['name'] = '접속자 총합';
@@ -191,10 +213,15 @@ foreach ($refresh_result as $i=>$user) {
</table> </table>
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
<?php <?php
@@ -217,9 +244,37 @@ function getHex($dec)
function getHexCode($hex) function getHexCode($hex)
{ {
switch ($hex) { switch ($hex) {
case 0: return "0"; case 1: return "1"; case 2: return "2"; case 3: return "3"; case 0:
case 4: return "4"; case 5: return "5"; case 6: return "6"; case 7: return "7"; return "0";
case 8: return "8"; case 9: return "9"; case 10: return "A"; case 11: return "B"; case 1:
case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F"; return "1";
case 2:
return "2";
case 3:
return "3";
case 4:
return "4";
case 5:
return "5";
case 6:
return "6";
case 7:
return "7";
case 8:
return "8";
case 9:
return "9";
case 10:
return "A";
case 11:
return "B";
case 12:
return "C";
case 13:
return "D";
case 14:
return "E";
case 15:
return "F";
} }
} }
+61 -29
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -23,17 +24,14 @@ $vote = $admin['vote']?:['-'];
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: 설문조사</title> <title><?= UniqueConst::$serverName ?>: 설문조사</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<style> <style>
.little_bar { .little_bar {
float: left; float: left;
@@ -43,6 +41,8 @@ $vote = $admin['vote']?:['-'];
text-align: center; text-align: center;
} }
</style> </style>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['common']) ?>
<script type="text/javascript"> <script type="text/javascript">
function captureKey(e) { function captureKey(e) {
if (e.keyCode == 13 && e.srcElement.type == 'text') { if (e.keyCode == 13 && e.srcElement.type == 'text') {
@@ -54,13 +54,20 @@ function captureKey(e) {
</script> </script>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>설 문 조 사<br><?=closeButton()?></td></tr> <tr>
<td>설 문 조 사<br><?= closeButton() ?></td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<form name=form1 action=c_vote.php method=post> <form name=form1 action=c_vote.php method=post>
<tr><td colspan=3 align=center class='bg2'><font size=5>설 문 조 사 (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr> <tr>
<td colspan=3 align=center class='bg2'>
<font size=5>설 문 조 사 (<?= $admin['develcost'] * 5 ?>금과 추첨으로 유니크템 증정!)</font>
</td>
</tr>
<?php <?php
if ($isVoteAdmin) { if ($isVoteAdmin) {
@@ -180,7 +187,9 @@ if ($me['no'] > 0) {
</table> </table>
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=3 align=center class='bg2'><font size=5> <tr>
<td colspan=3 align=center class='bg2'>
<font size=5>
전 체 통 계 전 체 통 계
<?php <?php
if ($isVoteAdmin) { if ($isVoteAdmin) {
@@ -234,8 +243,7 @@ if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
$per = round(($totalVote[$i] ?? 0) * 100 / $memCount, 1); $per = round(($totalVote[$i] ?? 0) * 100 / $memCount, 1);
if ($i == $voteTypeCount - 1) { if ($i == $voteTypeCount - 1) {
$per = 100 - $totalPer; $per = 100 - $totalPer;
} } else {
else{
$totalPer += $per; $totalPer += $per;
} }
@@ -280,8 +288,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
$per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1); $per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1);
if ($i == $voteTypeCount - 1) { if ($i == $voteTypeCount - 1) {
$per = 100 - $totalPer; $per = 100 - $totalPer;
} } else {
else{
$totalPer += $per; $totalPer += $per;
} }
// if($per < 5) { $vote['cnt'] = "&nbsp;"; } // if($per < 5) { $vote['cnt'] = "&nbsp;"; }
@@ -308,8 +315,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
$voteCount = $nationVoteCount[$nation['nation']] ?? 0; $voteCount = $nationVoteCount[$nation['nation']] ?? 0;
if ($memCount == 0) { if ($memCount == 0) {
$percentage = 100; $percentage = 100;
} } else {
else{
$percentage = round($voteCount / $memCount * 100, 1); $percentage = round($voteCount / $memCount * 100, 1);
} }
@@ -332,8 +338,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
if ($i == $voteTypeCount - 1) { if ($i == $voteTypeCount - 1) {
$per = 100 - $totalPer; $per = 100 - $totalPer;
} } else {
else{
$totalPer += $per; $totalPer += $per;
} }
@@ -358,10 +363,15 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
</form> </form>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
<?php <?php
@@ -373,14 +383,30 @@ function getVoteColor($type)
switch ($type) { switch ($type) {
default: default:
case 0: $color = "black"; break; case 0:
case 1: $color = "red"; break; $color = "black";
case 2: $color = "orange"; break; break;
case 3: $color = "yellow"; break; case 1:
case 4: $color = "green"; break; $color = "red";
case 5: $color = "blue"; break; break;
case 6: $color = "navy"; break; case 2:
case 7: $color = "purple"; break; $color = "orange";
break;
case 3:
$color = "yellow";
break;
case 4:
$color = "green";
break;
case 5:
$color = "blue";
break;
case 6:
$color = "navy";
break;
case 7:
$color = "purple";
break;
} }
return $color; return $color;
@@ -393,9 +419,15 @@ function getNewColor($type)
} }
switch ($type) { switch ($type) {
case 2: $color = "black"; break; case 2:
case 3: $color = "black"; break; $color = "black";
default:$color = "white"; break; break;
case 3:
$color = "black";
break;
default:
$color = "white";
break;
} }
return $color; return $color;
+48 -16
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -44,26 +45,36 @@ if ($msg2 == "") {
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: 거래장</title> <title><?= UniqueConst::$serverName ?>: 거래장</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>거 래 장<br><?=closeButton()?></td></tr> <tr>
<tr><td align=center class='bg2'><font color=orange size=6><b>거 래 장</b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')"></td></tr> <td>거 래 장<br><?= closeButton() ?></td>
</tr>
<tr>
<td align=center class='bg2'>
<font color=orange size=6><b>거 래 장</b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')">
</td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_auction.php> <form method=post action=c_auction.php>
<tr><td colspan=11 align=center bgcolor=orange><font size=5>팝 니 다</font></td></tr> <tr>
<td colspan=11 align=center bgcolor=orange>
<font size=5>팝 니 다</font>
</td>
</tr>
<tr align=center class='bg1'> <tr align=center class='bg1'>
<td width=68>거래번호</td> <td width=68>거래번호</td>
<td width=48>선택</td> <td width=48>선택</td>
@@ -151,7 +162,11 @@ foreach($db->query('SELECT * from auction where type=0 order by expire') as $auc
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_auction.php> <form method=post action=c_auction.php>
<tr><td colspan=11 align=center bgcolor=skyblue><font size=5>삽 니 다</font></td></tr> <tr>
<td colspan=11 align=center bgcolor=skyblue>
<font size=5>삽 니 다</font>
</td>
</tr>
<tr align=center class='bg1'> <tr align=center class='bg1'>
<td width=68>거래번호</td> <td width=68>거래번호</td>
<td width=48>선택</td> <td width=48>선택</td>
@@ -237,12 +252,23 @@ foreach($db->query('SELECT * from auction where type=1 order by expire') as $auc
</table> </table>
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td align=center class='bg2'><font size=5>최 근 기 록</font></td></tr> <tr>
<tr><td> <td align=center class='bg2'>
<font size=5>최 근 기 록</font>
</td>
</tr>
<tr>
<td>
<?= getAuctionLogRecent(20) ?> <?= getAuctionLogRecent(20) ?>
</td></tr> </td>
<tr><td align=center class='bg2'><font size=5>도 움 말</font></td></tr> </tr>
<tr><td> <tr>
<td align=center class='bg2'>
<font size=5>도 움 말</font>
</td>
</tr>
<tr>
<td>
<font color=white size=2> <font color=white size=2>
ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.<br> ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.<br>
ㆍ<font color=cyan>Hint</font>) 쌀이 귀한 경우는 입찰자가 많아서 자연스레 단가가 오르게 됩니다. (해당 물품을 사려는 가격이 오름)<br> ㆍ<font color=cyan>Hint</font>) 쌀이 귀한 경우는 입찰자가 많아서 자연스레 단가가 오르게 됩니다. (해당 물품을 사려는 가격이 오름)<br>
@@ -266,9 +292,15 @@ foreach($db->query('SELECT * from auction where type=1 order by expire') as $auc
ㆍ<font color=cyan>Hint</font>) 단가가 낮으면(<1.00) 금이 비싸므로 구매가 이득입니다.<br> ㆍ<font color=cyan>Hint</font>) 단가가 낮으면(<1.00) 금이 비싸므로 구매가 이득입니다.<br>
ㆍ즐거운 거래! ㆍ즐거운 거래!
</font> </font>
</td></tr> </td>
<tr><td><?=closeButton()?></td></tr> </tr>
<tr><td><?=banner()?> </td></tr> <tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+47 -28
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -63,8 +64,7 @@ $permission = checkSecretPermission($me);
if ($permission < 0) { if ($permission < 0) {
echo '국가에 소속되어있지 않습니다.'; echo '국가에 소속되어있지 않습니다.';
die(); die();
} } else if ($permission < 1) {
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다."; echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die(); die();
} }
@@ -82,25 +82,24 @@ if ($btn == '정렬하기') {
[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType]; [$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType];
if ($reqArgType === 0) { if ($reqArgType === 0) {
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level FROM general WHERE nation = %i', $nationID); $generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level FROM general WHERE nation = %i', $nationID);
} } else if ($reqArgType === 1) {
else if($reqArgType===1){
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, %b FROM general WHERE nation = %i', $reqQueryType, $nationID); $generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, %b FROM general WHERE nation = %i', $reqQueryType, $nationID);
} } else if ($reqArgType === 2) {
else if($reqArgType===2){ $generalBasicList = $db->query(
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, value as %b 'SELECT no, name, npc, turntime, officer_level, value as %b
FROM general LEFT JOIN rank_data FROM general LEFT JOIN rank_data
ON general.no = rank_data.general_id ON general.no = rank_data.general_id
WHERE rank_data.type = %s AND general.nation = %i', WHERE rank_data.type = %s AND general.nation = %i',
$reqQueryType, $reqQueryType, $nationID $reqQueryType,
$reqQueryType,
$nationID
); );
} } else if ($reqArgType === 3) {
else if($reqArgType===3){
$generalBasicList = array_map(function ($arr) { $generalBasicList = array_map(function ($arr) {
$arr['aux'] = Json::decode($arr['aux']); $arr['aux'] = Json::decode($arr['aux']);
return $arr; return $arr;
}, $db->query('SELECT no, name, npc, turntime, officer_level, aux FROM general WHERE nation = %i', $nationID)); }, $db->query('SELECT no, name, npc, turntime, officer_level, aux FROM general WHERE nation = %i', $nationID));
} } else {
else{
throw new \sammo\MustNotBeReachedException(); throw new \sammo\MustNotBeReachedException();
} }
@@ -121,18 +120,19 @@ $showGeneral = General::createGeneralObjFromDB($gen);
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>감 찰 부<br><?=closeButton()?></td></tr> <tr>
<tr><td> <td>감 찰 부<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post> <form name=form1 method=post>
정렬순서 : 정렬순서 :
<select name='query_type' size=1> <select name='query_type' size=1>
@@ -149,24 +149,34 @@ $showGeneral = General::createGeneralObjFromDB($gen);
</select> </select>
<input type=submit name=btn value='조회하기'> <input type=submit name=btn value='조회하기'>
</form> </form>
</td></tr> </td>
</tr>
</table> </table>
<table width=1000 align=center class='tb_layout bg0'> <table width=1000 align=center class='tb_layout bg0'>
<tr> <tr>
<td width=50% align=center class='bg1'><font color=skyblue size=3>장 수 정 보</font></td> <td width=50% align=center class='bg1'>
<td width=50% align=center class='bg1'><font color=orange size=3>장 수 열 전</font></td> <font color=skyblue size=3>장 수 정 보</font>
</td>
<td width=50% align=center class='bg1'>
<font color=orange size=3>장 수 열 전</font>
</td>
</tr> </tr>
<tr> <tr>
<td valign=top> <td valign=top>
<?php generalInfo($showGeneral); generalInfo2($showGeneral); ?> <?php generalInfo($showGeneral);
generalInfo2($showGeneral); ?>
</td> </td>
<td valign=top> <td valign=top>
<?= formatHistoryToHTML(getGeneralHistoryLogAll($gen)) ?> <?= formatHistoryToHTML(getGeneralHistoryLogAll($gen)) ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td align=center class='bg1'><font color=orange size=3>전투 기록</font></td> <td align=center class='bg1'>
<td align=center class='bg1'><font color=orange size=3>전투 결과</font></td> <font color=orange size=3>전투 기록</font>
</td>
<td align=center class='bg1'>
<font color=orange size=3>전투 결과</font>
</td>
</tr> </tr>
<tr> <tr>
<td valign=top> <td valign=top>
@@ -178,8 +188,12 @@ $showGeneral = General::createGeneralObjFromDB($gen);
</tr> </tr>
<?php if ($showGeneral->getNPCType() > 1 || $permission >= 2) : ?> <?php if ($showGeneral->getNPCType() > 1 || $permission >= 2) : ?>
<tr> <tr>
<td align=center class='bg1'><font color=orange size=3>개인 기록</font></td> <td align=center class='bg1'>
<td align=center class='bg1'><font color=orange size=3>&nbsp;</font></td> <font color=orange size=3>개인 기록</font>
</td>
<td align=center class='bg1'>
<font color=orange size=3>&nbsp;</font>
</td>
</tr> </tr>
<tr> <tr>
<td valign=top> <td valign=top>
@@ -191,8 +205,13 @@ $showGeneral = General::createGeneralObjFromDB($gen);
<?php endif; ?> <?php endif; ?>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+138 -37
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -35,11 +36,32 @@ if ($con >= 2) {
} }
switch ($admin['tnmt_type']) { switch ($admin['tnmt_type']) {
default: throw new \RuntimeException('Invalid tnmt_type'); default:
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "total"; $tp2 = "종합"; $tp3 = "total"; break; throw new \RuntimeException('Invalid tnmt_type');
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "leadership"; $tp2 = "통솔"; $tp3 = "leadership"; break; case 0:
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "strength"; $tp2 = "무력"; $tp3 = "strength"; break; $tnmt_type = "<font color=cyan>전력전</font>";
case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "intel"; $tp2 = "지력"; $tp3 = "intel"; break; $tp = "total";
$tp2 = "종합";
$tp3 = "total";
break;
case 1:
$tnmt_type = "<font color=cyan>통솔전</font>";
$tp = "leadership";
$tp2 = "통솔";
$tp3 = "leadership";
break;
case 2:
$tnmt_type = "<font color=cyan>일기토</font>";
$tp = "strength";
$tp2 = "무력";
$tp3 = "strength";
break;
case 3:
$tnmt_type = "<font color=cyan>설전</font>";
$tp = "intel";
$tp2 = "지력";
$tp3 = "intel";
break;
} }
$str1 = getTournament($admin['tournament']); $str1 = getTournament($admin['tournament']);
@@ -58,30 +80,44 @@ if($str3){
<?php if ($con == 1) { <?php if ($con == 1) {
MessageBox("접속제한이 얼마 남지 않았습니다!"); MessageBox("접속제한이 얼마 남지 않았습니다!");
} ?> } ?>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 베팅장</title> <title><?= UniqueConst::$serverName ?>: 베팅장</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/betting.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common', 'betting']) ?>
</head> </head>
<body> <body>
<table align=center width=1120 class='tb_layout bg0'> <table align=center width=1120 class='tb_layout bg0'>
<tr><td>베 팅 장<br><?=closeButton()?></td></tr> <tr>
<td>베 팅 장<br><?= closeButton() ?></td>
</tr>
</table> </table>
<table align=center width=1120 class='tb_layout bg0'> <table align=center width=1120 class='tb_layout bg0'>
<tr><td colspan=16><input type=button value='갱신' onclick='location.reload()'></td></tr> <tr>
<tr><td colspan=16 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.$str2.$str3?>)</font></td></tr> <td colspan=16><input type=button value='갱신' onclick='location.reload()'></td>
<tr><td height=50 colspan=16 align=center class='bg2'><font color=limegreen size=6>16강 상황</font><br><font color=orange size=3>(전체 금액 : <?=$globalBetTotal?> / 내 투자 금액 : <?=$myBetTotal?>)</font></td></tr> </tr>
<tr>
<td colspan=16 align=center>
<font color=white size=6><?= $tnmt_type ?> (<?= $str1 . $str2 . $str3 ?>)</font>
</td>
</tr>
<tr>
<td height=50 colspan=16 align=center class='bg2'>
<font color=limegreen size=6>16강 상황</font><br>
<font color=orange size=3>(전체 금액 : <?= $globalBetTotal ?> / 내 투자 금액 : <?= $myBetTotal ?>)</font>
</td>
</tr>
</table> </table>
<table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'> <table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'>
<tr align=center><td height=10 colspan=16></td></tr> <tr align=center>
<td height=10 colspan=16></td>
</tr>
<tr align=center> <tr align=center>
<?php <?php
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=60 order by grp, grp_no LIMIT 1'); $generalList = $db->query('SELECT npc,name,win from tournament where grp>=60 order by grp, grp_no LIMIT 1');
@@ -297,8 +333,7 @@ $gold = [];
for ($i = 0; $i < 16; $i++) { for ($i = 0; $i < 16; $i++) {
if ($globalBet[$i] == 0) { if ($globalBet[$i] == 0) {
$bet[$i] = "∞"; $bet[$i] = "∞";
} } else {
else{
$bet[$i] = round($globalBetTotal / $globalBet[$i], 2); $bet[$i] = round($globalBetTotal / $globalBet[$i], 2);
} }
} }
@@ -306,17 +341,17 @@ for ($i=0; $i < 16; $i++) {
for ($i = 0; $i < 16; $i++) { for ($i = 0; $i < 16; $i++) {
if (!is_numeric($bet[$i])) { if (!is_numeric($bet[$i])) {
$gold[$i] = 0; $gold[$i] = 0;
} } else {
else{
$gold[$i] = Util::round($myBet[$i] * $bet[$i]); $gold[$i] = Util::round($myBet[$i] * $bet[$i]);
} }
} }
?> ?>
</tr> </tr>
</table> </table>
<table align=center width=1120 class='tb_layout bg0'> <table align=center width=1120 class='tb_layout bg0'>
<tr align=center><td height=10 colspan=16></td></tr> <tr align=center>
<td height=10 colspan=16></td>
</tr>
<?php <?php
echo " echo "
<tr align=center>"; <tr align=center>";
@@ -327,8 +362,22 @@ for ($i=0; $i < 16; $i++) {
?> ?>
</tr> </tr>
<tr align=center> <tr align=center>
<td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td> <td>×</td>
<td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td> <td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
</tr> </tr>
<tr align=center> <tr align=center>
<?php <?php
@@ -338,8 +387,22 @@ for ($i=0; $i < 16; $i++) {
?> ?>
</tr> </tr>
<tr align=center> <tr align=center>
<td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td> <td>∥</td>
<td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td> <td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
</tr> </tr>
<tr align=center> <tr align=center>
<?php <?php
@@ -389,33 +452,51 @@ if ($admin['tournament'] == 6) {
<font color=skyblue size=4>( 베팅후 500원 이하일땐 베팅이 불가능합니다. )</font> <font color=skyblue size=4>( 베팅후 500원 이하일땐 베팅이 불가능합니다. )</font>
</td> </td>
</tr> </tr>
<tr align=center><td height=10 colspan=16></td></tr> <tr align=center>
<td height=10 colspan=16></td>
</tr>
</table> </table>
<table align=center width=1120 class='tb_layout bg0'> <table align=center width=1120 class='tb_layout bg0'>
<tr align=center><td height=50 colspan=4 class='bg2'><font color=yellow size=6>토너먼트 랭킹</font></td></tr> <tr align=center>
<tr align=center><td colspan=4 class='bg2'><font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font></td></tr> <td height=50 colspan=4 class='bg2'>
<font color=yellow size=6>토너먼트 랭킹</font>
</td>
</tr>
<tr align=center>
<td colspan=4 class='bg2'>
<font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font>
</td>
</tr>
<tr align=center> <tr align=center>
<?php <?php
$tournamentType = [ $tournamentType = [
'전 력 전' => [ '전 력 전' => [
'종합', '종합',
function(General $general){return $general->getVar('leadership')+$general->getVar('strength')+$general->getVar('intel');}, function (General $general) {
return $general->getVar('leadership') + $general->getVar('strength') + $general->getVar('intel');
},
'tt', 'tt',
], ],
'통 솔 전' => [ '통 솔 전' => [
'통솔', '통솔',
function(General $general){return $general->getVar('leadership');}, function (General $general) {
return $general->getVar('leadership');
},
'tl', 'tl',
], ],
'일 기 토' => [ '일 기 토' => [
'무력', '무력',
function(General $general){return $general->getVar('strength');}, function (General $general) {
return $general->getVar('strength');
},
'ts', 'ts',
], ],
'설 전' => [ '설 전' => [
'지력', '지력',
function(General $general){return $general->getVar('intel');}, function (General $general) {
return $general->getVar('intel');
},
'ti', 'ti',
], ],
]; ];
@@ -427,9 +508,23 @@ $type4 = array("total", "leadership", "strength", "intel");
foreach ($tournamentType as $tournamentTypeText => [$statTypeText, $statFunc, $rankColumn]) : ?> foreach ($tournamentType as $tournamentTypeText => [$statTypeText, $statFunc, $rankColumn]) : ?>
<td> <td>
<table align=center width=280 class='tb_layout bg0'> <table align=center width=280 class='tb_layout bg0 f_tnum'>
<tr><td colspan=9 align=center style=color:white;background-color:black;><font size=4><?=$tournamentTypeText?></font></td></tr> <tr>
<tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center><?=$statTypeText?></td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>勝</td></tr> <td colspan=9 align=center style=color:white;background-color:black;>
<font size=4><?= $tournamentTypeText ?></font>
</td>
</tr>
<tr class='bg1'>
<td align=center>순</td>
<td align=center>장수</td>
<td align=center><?= $statTypeText ?></td>
<td align=center>경</td>
<td align=center>승</td>
<td align=center>무</td>
<td align=center>패</td>
<td align=center>점</td>
<td align=center>勝</td>
</tr>
<?php <?php
$prizeColumn = "{$rankColumn}p"; $prizeColumn = "{$rankColumn}p";
$gameColumn = "{$rankColumn}g"; $gameColumn = "{$rankColumn}g";
@@ -473,7 +568,8 @@ foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankCo
); );
} }
?> ?>
</table></td> </table>
</td>
<?php endforeach; ?> <?php endforeach; ?>
</tr> </tr>
<tr> <tr>
@@ -487,8 +583,13 @@ foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankCo
</tr> </tr>
</table> </table>
<table align=center width=1120 class='tb_layout bg0'> <table align=center width=1120 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+49 -71
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -10,21 +11,20 @@ $generalObj = General::createGeneralObjFromDB($session->generalID);
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 사령부</title> <title><?= UniqueConst::$serverName ?>: 사령부</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/chiefCenter.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/chiefCenter.css') ?> <?= WebUtil::printCSS('css/chiefCenter.css') ?>
<script type="text/javascript"> <script type="text/javascript">
var maxChiefTurn = <?= GameConst::$maxChiefTurn ?>; var maxChiefTurn = <?= GameConst::$maxChiefTurn ?>;
</script> </script>
<?= WebUtil::printDist('ts', ['common', 'chiefCenter']) ?>
</head> </head>
@@ -33,75 +33,53 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
<div class='tb_layout bg0'>사 령 부<button type='button' id='reloadTable'>갱신</button><br> <div class='tb_layout bg0'>사 령 부<button type='button' id='reloadTable'>갱신</button><br>
<?= backButton() ?></div> <?= backButton() ?></div>
<div style='background-color:skyblue;text-align:center;'>수뇌부 일정</div> <div style='background-color:skyblue;text-align:center;'>수뇌부 일정</div>
<div class="chiefSubTable" style='height:<?=22*(GameConst::$maxChiefTurn+1)?>px;' <div class="chiefSubTable" style='height:<?= 22 * (GameConst::$maxChiefTurn + 1) ?>px;'>
><div class='chiefTurnIdxPanel' <div class='chiefTurnIdxPanel'>
><div class='bg1 chiefTurnIdx'>.</div <div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?> <div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div </div <?php foreach ([12, 10, 8, 6] as $chiefIdx) : ?>>
<?php endforeach; ?> <div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?= $chiefIdx ?>'>
></div <div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $turnIdx) : ?>>
<?php foreach([12, 10, 8, 6] as $chiefIdx): ?> <div class='chiefTurnBox turn<?= $turnIdx ?>'>
><div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?=$chiefIdx?>' <div class='chiefTurnTime'>&nbsp;</div>
><div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div <div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div>
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $turnIdx): ?> </div <?php endforeach; ?>>
><div class='chiefTurnBox turn<?=$turnIdx?>' </div <?php endforeach; ?>>
><div class='chiefTurnTime'>&nbsp;</div <div class='chiefTurnIdxPanel tail'>
><div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div <div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
></div <div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
<?php endforeach; ?> </div>
></div </div>
<?php endforeach; ?> <div id='controlPlate' style='display:flex;flex-flow:row wrap;justify-content:center;'>
><div class='chiefTurnIdxPanel tail' <div style='width:400px;text-align:right;'><?= chiefTurnTable()
><div class='bg1 chiefTurnIdx'>.</div ?></div>
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?> <div style='width:400px;display: flex;justify-content: center;flex-direction: column;'>
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div <div><input type='button' id='turnPush' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='미루기▼'><input type='button' id='turnPull' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='▲당기기'></div>
<?php endforeach; ?> <div><?= chiefCommandTable($generalObj)
></div ?><br><input type='button' id='setCommand' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='실 행'></div>
></div </div>
><div id='controlPlate' style='display:flex;flex-flow:row wrap;justify-content:center;' </div>
><div style='width:400px;text-align:right;' <div class="chiefSubTable" style='height:<?= 22 * (GameConst::$maxChiefTurn + 1) ?>px;'>
><?=chiefTurnTable() <div class='chiefTurnIdxPanel'>
?></div <div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
><div style='width:400px;display: flex;justify-content: center;flex-direction: column;' <div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
><div </div <?php foreach ([11, 9, 7, 5] as $chiefIdx) : ?>>
><input type='button' id='turnPush' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:13px;' value='미루기▼' <div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?= $chiefIdx ?>'>
><input type='button' id='turnPull' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:13px;' value='▲당기기' <div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $turnIdx) : ?>>
></div <div class='chiefTurnBox turn<?= $turnIdx ?>'>
><div <div class='chiefTurnTime'>&nbsp;</div>
><?=chiefCommandTable($generalObj) <div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div>
?><br><input type='button' id='setCommand' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:13px;' value='실 행' </div <?php endforeach; ?>>
></div </div <?php endforeach; ?>>
></div <div class='chiefTurnIdxPanel tail'>
></div <div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
><div class="chiefSubTable" style='height:<?=22*(GameConst::$maxChiefTurn+1)?>px;' <div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
><div class='chiefTurnIdxPanel' </div>
><div class='bg1 chiefTurnIdx'>.</div </div>
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?> <div><?= backButton()
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
<?php endforeach; ?>
></div
<?php foreach([11, 9, 7, 5] as $chiefIdx): ?>
><div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?=$chiefIdx?>'
><div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $turnIdx): ?>
><div class='chiefTurnBox turn<?=$turnIdx?>'
><div class='chiefTurnTime'>&nbsp;</div
><div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div
></div
<?php endforeach; ?>
></div
<?php endforeach; ?>
><div class='chiefTurnIdxPanel tail'
><div class='bg1 chiefTurnIdx'>.</div
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
<?php endforeach; ?>
></div
></div
><div
><?=backButton()
?><?= banner() ?><?= banner()
?></div> ?></div>
</div> </div>
</body> </body>
</html> </html>
+44 -32
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -34,13 +35,10 @@ $templates = new \League\Plates\Engine('templates');
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/currentCity.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<style> <style>
#general_list tr td { #general_list tr td {
text-align: center; text-align: center;
@@ -55,11 +53,14 @@ $templates = new \League\Plates\Engine('templates');
font-size: x-small; font-size: x-small;
} }
</style> </style>
<?= WebUtil::printDist('ts', ['common', 'currentCity']) ?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>도 시 정 보<br><?=backButton()?></td></tr> <tr>
<td>도 시 정 보<br><?= backButton() ?></td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
@@ -79,7 +80,10 @@ if($me['officer_level'] == 0) {
$city = $db->queryFirstRow('SELECT city,name,nation from city where city=%i', $me['city']); $city = $db->queryFirstRow('SELECT city,name,nation from city where city=%i', $me['city']);
echo " echo "
<option value={$city['city']}"; <option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; } if ($city['city'] == $citylist) {
echo " selected";
$valid = 1;
}
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】"; echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
if ($city['nation'] == 0) echo "공백지"; if ($city['nation'] == 0) echo "공백지";
elseif ($me['nation'] == $city['nation']) echo "본국"; elseif ($me['nation'] == $city['nation']) echo "본국";
@@ -90,7 +94,10 @@ if($me['officer_level'] == 0) {
foreach ($db->query('SELECT city,name,nation from city where nation=%i', $me['nation']) as $city) { foreach ($db->query('SELECT city,name,nation from city where nation=%i', $me['nation']) as $city) {
echo " echo "
<option value={$city['city']}"; <option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; } if ($city['city'] == $citylist) {
echo " selected";
$valid = 1;
}
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】"; echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
if ($city['nation'] == 0) echo "공백지"; if ($city['nation'] == 0) echo "공백지";
elseif ($me['nation'] == $city['nation']) echo "본국"; elseif ($me['nation'] == $city['nation']) echo "본국";
@@ -102,7 +109,10 @@ if($me['officer_level'] == 0) {
foreach ($db->query('SELECT distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation=%i and B.nation!=%i', $me['nation'], $me['nation']) as $city) { foreach ($db->query('SELECT distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation=%i and B.nation!=%i', $me['nation'], $me['nation']) as $city) {
echo " echo "
<option value={$city['city']}"; <option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; } if ($city['city'] == $citylist) {
echo " selected";
$valid = 1;
}
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】"; echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
if ($city['nation'] == 0) echo "공백지"; if ($city['nation'] == 0) echo "공백지";
elseif ($me['nation'] == $city['nation']) echo "본국"; elseif ($me['nation'] == $city['nation']) echo "본국";
@@ -118,8 +128,7 @@ if($myNation['level'] > 0) {
if ($rawSpy == '') { if ($rawSpy == '') {
$spyCities = []; $spyCities = [];
} } else {
else{
$spyCities = array_keys(Json::decode($rawSpy)); $spyCities = array_keys(Json::decode($rawSpy));
} }
@@ -127,7 +136,10 @@ if($myNation['level'] > 0) {
if ($spyCities) { if ($spyCities) {
foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) { foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) {
echo "<option value={$city['city']}"; echo "<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; } if ($city['city'] == $citylist) {
echo " selected";
$valid = 1;
}
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】"; echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
if ($city['nation'] == 0) echo "공백지"; if ($city['nation'] == 0) echo "공백지";
elseif ($me['nation'] == $city['nation']) echo "본국"; elseif ($me['nation'] == $city['nation']) echo "본국";
@@ -135,7 +147,6 @@ if($myNation['level'] > 0) {
echo "</option>"; echo "</option>";
} }
} }
} }
echo " echo "
@@ -203,16 +214,14 @@ if($showDetailedInfo){
Util::formatListOfBackticks($dbColumns), Util::formatListOfBackticks($dbColumns),
$city['city'] $city['city']
); );
} } else {
else{
$generals = []; $generals = [];
} }
if ($valid) { if ($valid) {
$city['trustText'] = round($city['trust'], 1); $city['trustText'] = round($city['trust'], 1);
$city['popRateText'] = round($city['pop'] / $city['pop_max'] * 100, 2); $city['popRateText'] = round($city['pop'] / $city['pop_max'] * 100, 2);
} } else {
else{
$city['agri'] = '?'; $city['agri'] = '?';
$city['comm'] = '?'; $city['comm'] = '?';
$city['pop'] = '?'; $city['pop'] = '?';
@@ -233,8 +242,7 @@ if($generals){
foreach ($db->queryAllLists( foreach ($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC', 'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($generals, 'no') array_column($generals, 'no')
) as [$generalID, $turnIdx, $brief] ) as [$generalID, $turnIdx, $brief]) {
){
if (!key_exists($generalID, $generalTurnList)) { if (!key_exists($generalID, $generalTurnList)) {
$generalTurnList[$generalID] = []; $generalTurnList[$generalID] = [];
} }
@@ -259,8 +267,7 @@ foreach($generals as $general){
if ($general['nation'] != 0 && $general['nation'] == $myNation['nation']) { if ($general['nation'] != 0 && $general['nation'] == $myNation['nation']) {
$ourGeneral = true; $ourGeneral = true;
} } else {
else{
$ourGeneral = false; $ourGeneral = false;
} }
@@ -297,8 +304,7 @@ foreach($generals as $general){
$crew = $general['crew']; $crew = $general['crew'];
$train = $general['train']; $train = $general['train'];
$atmos = $general['atmos']; $atmos = $general['atmos'];
} } else {
else{
$defenceTrain = 0; $defenceTrain = 0;
$defenceTrainText = ''; $defenceTrainText = '';
$crewType = 0; $crewType = 0;
@@ -323,8 +329,7 @@ foreach($generals as $general){
$turnText[] = "{$turnIdx} : $turn"; $turnText[] = "{$turnIdx} : $turn";
} }
$turnText = join('<br>', $turnText); $turnText = join('<br>', $turnText);
} } else {
else{
$turnText = ''; $turnText = '';
} }
@@ -358,7 +363,9 @@ foreach($generals as $general){
]; ];
} }
$generalsName = array_map(function($gen){return getColoredName($gen['name'], $gen['npc']);}, $generals); $generalsName = array_map(function ($gen) {
return getColoredName($gen['name'], $gen['npc']);
}, $generals);
$enemyCrew = 0; $enemyCrew = 0;
$enemyCnt = 0; $enemyCnt = 0;
@@ -425,15 +432,14 @@ foreach($generalsFormat as $general){
$genDef += 1; $genDef += 1;
$chkDef = true; $chkDef = true;
} }
} }
?> ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<td><?= backButton() ?></td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg2'> <table align=center width=1000 class='tb_layout bg2'>
@@ -506,7 +512,8 @@ foreach($generalsFormat as $general){
<td width=48 align=center class=bg1>훈련</td> <td width=48 align=center class=bg1>훈련</td>
<td width=48 align=center class=bg1>사기</td> <td width=48 align=center class=bg1>사기</td>
<td width=280 align=center class=bg1>명 령</td> <td width=280 align=center class=bg1>명 령</td>
</tr></thead> </tr>
</thead>
<tbody class='bg0' id='general_list'> <tbody class='bg0' id='general_list'>
<?php <?php
foreach ($generalsFormat as $general) { foreach ($generalsFormat as $general) {
@@ -517,8 +524,13 @@ foreach($generalsFormat as $general){
</table> </table>
<?php endif; ?> <?php endif; ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+40 -59
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -29,8 +30,7 @@ $permission = checkSecretPermission($me);
if ($permission < 0) { if ($permission < 0) {
echo '국가에 소속되어있지 않습니다.'; echo '국가에 소속되어있지 않습니다.';
die(); die();
} } else if ($permission < 1) {
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다."; echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die(); die();
} }
@@ -43,41 +43,38 @@ if ($me['officer_level'] >= 5) {
$read = "readonly"; $read = "readonly";
} }
$nationStor->cacheValues(['notice', 'scout_msg']); $nationStor->cacheValues(['notice', 'scout_msg', 'available_war_setting_cnt']);
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 내무부</title> <title><?= UniqueConst::$serverName ?>: 내무부</title>
<script> <?= WebUtil::printStaticValues([
var editable = <?=(($me['officer_level']>=5||$permission==4)?'true':'false')?>; 'editable' => ($me['officer_level'] >= 5 || $permission == 4),
var storedData = <?=Json::encode([ 'nationMsg' => $nationStor->notice ?? '',
"nationMsg"=>$nationStor->notice??'', 'scoutMsg' => $nationStor->scout_msg ?? '',
"scoutMsg"=>$nationStor->scout_msg??'' ]) ?>
])?>;
</script>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/dipcenter.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../e_lib/summernote/summernote-bs4.css')?>
<?=WebUtil::printCSS('dist_css/vendors.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?=WebUtil::printCSS('css/dipcenter.css')?> <?= WebUtil::printDist('vue', 'v_dipcenter', true) ?>
<link href="https://fonts.googleapis.com/css?family=Nanum+Gothic|Nanum+Myeongjo|Nanum+Pen+Script" rel="stylesheet">
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>내 무 부<br><?=backButton()?></td></tr> <tr>
<td>내 무 부<br><?= backButton() ?></td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr> <tr>
<td colspan=9 align=center bgcolor=blue>외 교 관 계</td>
</tr>
<tr> <tr>
<td width=130 align=center class=bg1>국 가 명</td> <td width=130 align=center class=bg1>국 가 명</td>
<td width=50 align=center class=bg1>국력</td> <td width=50 align=center class=bg1>국력</td>
@@ -171,40 +168,15 @@ if ($budgetricediff > 0) {
} }
?> ?>
<table width=1000 class='tb_layout bg0' style='margin:auto;'> <div class='tb_layout bg0' style='margin:auto;width: 1000px;' id="editorForm">
<form name=form1 method=post action=c_dipcenter.php>
<tr><td colspan=2 height=10></td></tr>
<tr><td colspan=2 align=center bgcolor=orange>국 가 방 침 &amp; 임관 권유 메시지</td></tr>
<tr><td colspan='2'><div id='noticeForm'>
<div class='bg1' style="display: flex; justify-content: space-around">
<div style='flex: 1 1 auto;'>
국가 방침
</div>
<div>
<input type='submit' class='submit' name=btn value='국가방침 수정'><input type='button' class='cancel_edit' value='취소'>
</div>
</div>
<input type='hidden' class='input_form' name='msg' data-global='nationMsg'>
<div class='edit_form viewer'></div>
</div></td></tr>
<tr><td colspan='2'><div id='scoutMsgForm'>
<div class='bg1' style="display: flex; justify-content: space-around">
<div style='flex: 1 1 auto;'>
임관 권유
</div>
<div>
<input type='submit' class='submit' name=btn value='임관 권유문 수정'><input type='button' class='cancel_edit' value='취소'>
</div>
</div>
<div style='border-bottom:solid gray 0.5px;'>870px x 200px를 넘어서는 내용은 표시되지 않습니다.</div>
<input type='hidden' class='input_form' name='scoutMsg' data-global='scoutMsg'>
<div style="width:870px;margin-left:auto;">
<div class='edit_form viewer'></div>
</div>
</div>
</div></td></tr> </div>
<tr><td colspan=2 align=center bgcolor=green>예 산 &amp; 정 책</td></tr> <table class="tb_layout bg0" style="margin:auto;">
<form name=form1 method=post action=c_dipcenter.php>
<tr>
<td colspan=2 align=center bgcolor=green>예 산 &amp; 정 책</td>
</tr>
<tr> <tr>
<td colspan=2> <td colspan=2>
<table width=998 class='tb_layout bg0'> <table width=998 class='tb_layout bg0'>
@@ -251,8 +223,8 @@ if ($budgetricediff > 0) {
<tr> <tr>
<td align=right class=bg1>기밀 권한 (1 ~ 99년)&nbsp;&nbsp;&nbsp;</td> <td align=right class=bg1>기밀 권한 (1 ~ 99년)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?= $read ?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?= $nation['secretlimit'] ?>>년 <input type=<?= $btn ?> name=btn value=기밀권한></td> <td align=center><input type=text <?= $read ?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?= $nation['secretlimit'] ?>>년 <input type=<?= $btn ?> name=btn value=기밀권한></td>
<td align=right class=bg1>임관&amp;전쟁 변경 가능</td> <td align=right class=bg1>전쟁 허용/금지 변경 가능</td>
<td align=center>무제한</td> <td align=center><?= $nationStor->getValue('available_war_setting_cnt') ?>회(월 +<?= GameConst::$incAvailableWarSettingCnt ?>회, 최대<?= GameConst::$maxAvailableWarSettingCnt ?>회)</td>
</tr> </tr>
<tr> <tr>
<td colspan=4 align=center> <td colspan=4 align=center>
@@ -276,13 +248,22 @@ if ($nation['war'] == 0) {
</td> </td>
</tr> </tr>
</table> </table>
<tr><td colspan=2>기밀 권한이란, 암행부를 열람할 수 있는 일반 장수의 최소 사관 년수를 의미합니다.</td></tr> <tr>
<tr><td colspan=2 height=10></td></tr> <td colspan=2>기밀 권한이란, 암행부를 열람할 수 있는 일반 장수의 최소 사관 년수를 의미합니다.</td>
</tr>
<tr>
<td colspan=2 height=10></td>
</tr>
</form> </form>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+40 -31
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -34,8 +35,7 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
$cityID, $cityID,
$cityName, $cityName,
$rawConflict $rawConflict
]) ]) {
{
$rawConflict = Json::decode($rawConflict); $rawConflict = Json::decode($rawConflict);
if (count($rawConflict) < 2) { if (count($rawConflict) < 2) {
continue; continue;
@@ -85,16 +85,19 @@ $neutralStateCharMap = [
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 중원 정보</title> <title><?= UniqueConst::$serverName ?>: 중원 정보</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?= WebUtil::printJS('d_shared/base_map.js') ?> <?= WebUtil::printJS('d_shared/base_map.js') ?>
<?=WebUtil::printJS('dist_js/map.js')?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printCSS('css/history.css') ?>
<?= WebUtil::printDist('ts', ['common', 'map']) ?>
<script> <script>
window.serverNick = '<?= DB::prefix() ?>'; window.serverNick = '<?= DB::prefix() ?>';
window.serverID = '<?= UniqueConst::$serverID ?>'; window.serverID = '<?= UniqueConst::$serverID ?>';
@@ -108,21 +111,19 @@ $(function(){
}); });
</script> </script>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('css/common.css')?>
<?=WebUtil::printCSS('css/map.css')?>
<?=WebUtil::printCSS('css/history.css')?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>중 원 정 보<br><?=backButton()?></td></tr> <tr>
<td>중 원 정 보<br><?= backButton() ?></td>
</tr>
</table> </table>
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=<?=$nationCnt+1?> align=center bgcolor=blue>외 교 현 황</td></tr> <tr>
<td colspan=<?= $nationCnt + 1 ?> align=center bgcolor=blue>외 교 현 황</td>
</tr>
<tr> <tr>
<td align=center width=130 style=background-color:<?= GameConst::$basecolor2 ?>;>&nbsp;</td> <td align=center width=130 style=background-color:<?= GameConst::$basecolor2 ?>;>&nbsp;</td>
<?php foreach ($nations as $nation) : ?> <?php foreach ($nations as $nation) : ?>
@@ -136,25 +137,28 @@ $(function(){
<td <?= ($me == $myNationID || $you == $myNationID) ? 'style="background-color:' . GameConst::$basecolor3 . '"' : '' ?>><?php <td <?= ($me == $myNationID || $you == $myNationID) ? 'style="background-color:' . GameConst::$basecolor3 . '"' : '' ?>><?php
if ($me == $you) { if ($me == $you) {
echo $sameNationStateChar; echo $sameNationStateChar;
} } else if ($me == $myNationID || $you == $myNationID || $session->userGrade >= 5) {
else if($me==$myNationID || $you==$myNationID || $session->userGrade >= 5){
echo $infomativeStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar; echo $infomativeStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar;
} } else {
else{
echo $neutralStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar; echo $neutralStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar;
} }
?></td> ?></td>
<?php endforeach; ?> <?php endforeach; ?>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<tr><td colspan=<?=$nationCnt+1?> align=center>불가침 : <font color=limegreen>@</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr> <tr>
<td colspan=<?= $nationCnt + 1 ?> align=center>불가침 : <font color=limegreen>@</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font>
</td>
</tr>
</table> </table>
<?php if ($realConflict) : ?> <?php if ($realConflict) : ?>
<br> <br>
<table align='center' width=1000 class='tb_layout bg0'> <table align='center' width=1000 class='tb_layout bg0'>
<tr><td colspan=2 align=center bgcolor=magenta>분 쟁 현 황</td></tr> <tr>
<td colspan=2 align=center bgcolor=magenta>분 쟁 현 황</td>
</tr>
<?php foreach ($realConflict as list($cityID, $cityName, $conflict)) : ?> <?php foreach ($realConflict as list($cityID, $cityName, $conflict)) : ?>
<tr> <tr>
<td align=center width=48><?= $cityName ?></td> <td align=center width=48><?= $cityName ?></td>
@@ -162,15 +166,11 @@ else{
<table class='tb_layout bg0' style='width:100%;'> <table class='tb_layout bg0' style='width:100%;'>
<?php foreach ($conflict as $item) : ?> <?php foreach ($conflict as $item) : ?>
<tr> <tr>
<td <td width=130 align=right style='color:<?= newColor($item['color']) ?>;background-color:<?= $item['color'] ?>;'><?= $item['name'] ?>&nbsp;</td>
width=130
align=right
style='color:<?=newColor($item['color'])?>;background-color:<?=$item['color']?>;'
><?=$item['name']?>&nbsp;</td>
<td width=48 align=right><?= (float)$item['percent'] ?> %&nbsp;</td> <td width=48 align=right><?= (float)$item['percent'] ?> %&nbsp;</td>
<td width=*><div <td width=*>
style='display:inline-block;width:<?=$item['percent']?>%;background-color:<?=$item['color']?>;' <div style='display:inline-block;width:<?= $item['percent'] ?>%;background-color:<?= $item['color'] ?>;'>&nbsp;</div>
>&nbsp;</div></td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
@@ -178,7 +178,9 @@ else{
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<tr><td colspan=2 height=5 class='bg1'></td></tr> <tr>
<td colspan=2 height=5 class='bg1'></td>
</tr>
</table> </table>
<?php endif; ?> <?php endif; ?>
@@ -186,7 +188,9 @@ else{
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr> <tr>
<td colspan=5 align=center bgcolor=green><font size=3>중 원 지 도</font></td> <td colspan=5 align=center bgcolor=green>
<font size=3>중 원 지 도</font>
</td>
</tr> </tr>
<tr> <tr>
<td width=698 height=420> <td width=698 height=420>
@@ -220,8 +224,13 @@ else{
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+71 -34
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -32,8 +33,7 @@ $permission = checkSecretPermission($me);
if ($permission < 0) { if ($permission < 0) {
echo '국가에 소속되어있지 않습니다.'; echo '국가에 소속되어있지 않습니다.';
die(); die();
} } else if ($permission < 1) {
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다."; echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die(); die();
} }
@@ -48,23 +48,26 @@ $templates = new \League\Plates\Engine('templates');
<?php if ($con == 1) { <?php if ($con == 1) {
MessageBox("접속제한이 얼마 남지 않았습니다!"); MessageBox("접속제한이 얼마 남지 않았습니다!");
} ?> } ?>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 암행부</title> <title><?= UniqueConst::$serverName ?>: 암행부</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?> <?= WebUtil::printDist('ts', ['common']) ?>
<?=WebUtil::printJS('dist_js/common.js')?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>암 행 부<br><?=closeButton()?></td></tr> <tr>
<tr><td><form name=form1 method=get>정렬순서 : <td>암 행 부<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=get>정렬순서 :
<select name=type size=1> <select name=type size=1>
<option <?= $sel[1] ?? '' ?> value=1>자금</option> <option <?= $sel[1] ?? '' ?> value=1>자금</option>
<option <?= $sel[2] ?? '' ?> value=2>군량</option> <option <?= $sel[2] ?? '' ?> value=2>군량</option>
@@ -75,8 +78,10 @@ $templates = new \League\Plates\Engine('templates');
<option <?= $sel[7] ?? '' ?> value=7>턴</option> <option <?= $sel[7] ?? '' ?> value=7>턴</option>
<option <?= $sel[8] ?? '' ?> value=8>부대</option> <option <?= $sel[8] ?? '' ?> value=8>부대</option>
</select> </select>
<input type=submit value='정렬하기'></form> <input type=submit value='정렬하기'>
</td></tr> </form>
</td>
</tr>
</table> </table>
<?php <?php
$troopName = []; $troopName = [];
@@ -86,14 +91,30 @@ foreach($db->queryAllLists('SELECT troop_leader, name FROM troop WHERE nation=%i
$orderSQL = ''; $orderSQL = '';
switch ($type) { switch ($type) {
case 1: $orderSQL = "order by gold desc"; break; case 1:
case 2: $orderSQL = "order by rice desc"; break; $orderSQL = "order by gold desc";
case 3: $orderSQL = "order by city"; break; break;
case 4: $orderSQL = "order by crewtype desc"; break; case 2:
case 5: $orderSQL = "order by crew desc"; break; $orderSQL = "order by rice desc";
case 6: $orderSQL = "order by killturn"; break; break;
case 7: $orderSQL = "order by turntime"; break; case 3:
case 8: $orderSQL = "order by troop desc"; break; $orderSQL = "order by city";
break;
case 4:
$orderSQL = "order by crewtype desc";
break;
case 5:
$orderSQL = "order by crew desc";
break;
case 6:
$orderSQL = "order by killturn";
break;
case 7:
$orderSQL = "order by turntime";
break;
case 8:
$orderSQL = "order by troop desc";
break;
} }
$generals = $db->query( $generals = $db->query(
@@ -107,8 +128,7 @@ $generalTurnList = [];
foreach ($db->queryAllLists( foreach ($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC', 'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($generals, 'no') array_column($generals, 'no')
) as [$generalID, $turnIdx, $brief] ) as [$generalID, $turnIdx, $brief]) {
){
if (!key_exists($generalID, $generalTurnList)) { if (!key_exists($generalID, $generalTurnList)) {
$generalTurnList[$generalID] = []; $generalTurnList[$generalID] = [];
} }
@@ -213,24 +233,36 @@ foreach($generals as $general){
<table style='width:1000px;margin:5px auto' class='tb_layout bg0'> <table style='width:1000px;margin:5px auto' class='tb_layout bg0'>
<thead> <thead>
<colgroup> <colgroup>
<col style="width:120px;"><col> <col style="width:120px;">
<col style="width:120px;"><col> <col>
<col style="width:120px;"><col> <col style="width:120px;">
<col style="width:120px;"><col> <col>
<col style="width:120px;">
<col>
<col style="width:120px;">
<col>
</colgroup> </colgroup>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td class='bg1'>전체 금</td><td><?=number_format($totalGold)?></td> <td class='bg1'>전체 금</td>
<td class='bg1'>전체 쌀</td><td><?=number_format($totalRice)?></td> <td><?= number_format($totalGold) ?></td>
<td class='bg1'>평균 금</td><td><?=number_format($totalGold/$genCntEff, 2)?></td> <td class='bg1'>전체 쌀</td>
<td class='bg1'>평균 쌀</td><td><?=number_format($totalRice/$genCntEff, 2)?></td> <td><?= number_format($totalRice) ?></td>
<td class='bg1'>평균 금</td>
<td><?= number_format($totalGold / $genCntEff, 2) ?></td>
<td class='bg1'>평균 쌀</td>
<td><?= number_format($totalRice / $genCntEff, 2) ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1'>전체 병력/장수</td><td><?=number_format($crewTotal)?>/<?=number_format($genCntEff)?></td> <td class='bg1'>전체 병력/장수</td>
<td class='bg1'>훈사 90 병력/장수</td><td><?=number_format($crew90)?>/<?=number_format($gen90)?></td> <td><?= number_format($crewTotal) ?>/<?= number_format($genCntEff) ?></td>
<td class='bg1'>훈사 80 병력/장수</td><td><?=number_format($crew80)?>/<?=number_format($gen80)?></td> <td class='bg1'>훈사 90 병력/장수</td>
<td class='bg1'>훈사 60 병력/장수</td><td><?=number_format($crew60)?>/<?=number_format($gen60)?></td> <td><?= number_format($crew90) ?>/<?= number_format($gen90) ?></td>
<td class='bg1'>훈사 80 병력/장수</td>
<td><?= number_format($crew80) ?>/<?= number_format($gen80) ?></td>
<td class='bg1'>훈사 60 병력/장수</td>
<td><?= number_format($crew60) ?>/<?= number_format($gen60) ?></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -238,8 +270,13 @@ foreach($generals as $general){
<?= $templates->render('generalList', ['generals' => $generals]) ?> <?= $templates->render('generalList', ['generals' => $generals]) ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+73 -32
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -34,18 +35,15 @@ $nation = $db->queryFirstRow('SELECT nation,name,level,color,chief_set from nati
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 인사부</title> <title><?= UniqueConst::$serverName ?>: 인사부</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printJS('dist_js/bossInfo.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<script type="text/javascript"> <script type="text/javascript">
var chiefStatMin = <?= GameConst::$chiefStatMin ?>; var chiefStatMin = <?= GameConst::$chiefStatMin ?>;
var myLevel = <?= $meLevel ?>; var myLevel = <?= $meLevel ?>;
</script> </script>
<?= WebUtil::printDist('ts', ['common', 'bossInfo']) ?>
<?php <?php
@@ -92,26 +90,33 @@ var candidateAuditors = <?=Json::encode(array_map(function($value){
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>인 사 부<br><?=backButton()?></td></tr> <tr>
<td>인 사 부<br><?= backButton() ?></td>
</tr>
</table> </table>
<br> <br>
<?php <?php
$lv = getNationChiefLevel($nation['level']); $lv = getNationChiefLevel($nation['level']);
if($meLevel >= 5) { $btn = "button"; } if ($meLevel >= 5) {
else { $btn = "hidden"; } $btn = "button";
} else {
$btn = "hidden";
}
$level = Util::convertArrayToDict( $level = Util::convertArrayToDict(
$db->query( $db->query(
'SELECT name,officer_level,city,picture,imgsvr,belong from general where nation=%i and officer_level>=%i order by officer_level desc', 'SELECT name,officer_level,city,picture,imgsvr,belong from general where nation=%i and officer_level>=%i order by officer_level desc',
$nationID, $lv $nationID,
$lv
), ),
'officer_level' 'officer_level'
); );
$tigers = $db->query('SELECT value, name $tigers = $db->query(
'SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "killnum" AND value > 0 ORDER BY value DESC LIMIT 5', WHERE rank_data.nation_id = %i AND rank_data.type = "killnum" AND value > 0 ORDER BY value DESC LIMIT 5',
$nationID $nationID
@@ -121,7 +126,8 @@ $tigerstr = join(', ', array_map(function($arr){
return "{$arr['name']}【{$number}】"; return "{$arr['name']}【{$number}】";
}, $tigers)); }, $tigers));
$eagles = $db->query('SELECT value, name $eagles = $db->query(
'SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7', WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
$nationID $nationID
@@ -140,17 +146,26 @@ $eaglestr = join(', ', array_map(function($arr){
</tr> </tr>
<?php <?php
for ($i = 12; $i >= $lv; $i -= 2) { for ($i = 12; $i >= $lv; $i -= 2) {
$i1 = $i; $i2 = $i - 1; $i1 = $i;
$i2 = $i - 1;
$imageTemp1 = GetImageURL($level[$i1]['imgsvr'] ?? 0); $imageTemp1 = GetImageURL($level[$i1]['imgsvr'] ?? 0);
$imageTemp2 = GetImageURL($level[$i2]['imgsvr'] ?? 0); $imageTemp2 = GetImageURL($level[$i2]['imgsvr'] ?? 0);
?> ?>
<tr> <tr>
<td width=98 align=center class='bg1'><font size=4><?=getOfficerLevelText($i1, $nation['level'])?></font></td> <td width=98 align=center class='bg1'>
<font size=4><?= getOfficerLevelText($i1, $nation['level']) ?></font>
</td>
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?= $imageTemp1 ?>/<?= $level[$i1]['picture'] ?? 'default.jpg' ?>");background-size:64px;'></td> <td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?= $imageTemp1 ?>/<?= $level[$i1]['picture'] ?? 'default.jpg' ?>");background-size:64px;'></td>
<td width=332><font size=4><?=$level[$i1]['name']??'-'?>(<?=$level[$i1]['belong']??'-'?>년)</font></td> <td width=332>
<td width=98 align=center class='bg1'><font size=4><?=getOfficerLevelText($i2, $nation['level'])?></font></td> <font size=4><?= $level[$i1]['name'] ?? '-' ?>(<?= $level[$i1]['belong'] ?? '-' ?>년)</font>
</td>
<td width=98 align=center class='bg1'>
<font size=4><?= getOfficerLevelText($i2, $nation['level']) ?></font>
</td>
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?= $imageTemp2 ?>/<?= $level[$i2]['picture'] ?? 'default.jpg' ?>");background-size:64px;'></td> <td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?= $imageTemp2 ?>/<?= $level[$i2]['picture'] ?? 'default.jpg' ?>");background-size:64px;'></td>
<td width=332><font size=4><?=$level[$i2]['name']??'-'?>(<?=$level[$i2]['belong']??'-'?>년)</font></td> <td width=332>
<font size=4><?= $level[$i2]['name'] ?? '-' ?>(<?= $level[$i2]['belong'] ?? '-' ?>년)</font>
</td>
</tr> </tr>
<?php <?php
} }
@@ -166,8 +181,12 @@ for($i=12; $i >= $lv; $i-=2) {
</tr> </tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=6 height=5></td></tr> <tr>
<tr><td colspan=2 align=center bgcolor=red>추 방</td></tr> <td colspan=6 height=5></td>
</tr>
<tr>
<td colspan=2 align=center bgcolor=red>추 방</td>
</tr>
<tr> <tr>
<td width=498 align=right class='bg1'>대상 장수</td> <td width=498 align=right class='bg1'>대상 장수</td>
<td width=498> <td width=498>
@@ -177,8 +196,7 @@ if($meLevel >= 5){
$candidateStrength = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and strength>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin); $candidateStrength = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and strength>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin);
$candidateIntel = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and intel>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin); $candidateIntel = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and intel>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin);
$candidateAny = $db->query('SELECT no,name,officer_level,city,npc,leadership,strength,intel,killturn from general where nation=%i and officer_level!=12 order by npc,binary(name)', $nationID); //추방 때문에 조금 더 김 $candidateAny = $db->query('SELECT no,name,officer_level,city,npc,leadership,strength,intel,killturn from general where nation=%i and officer_level!=12 order by npc,binary(name)', $nationID); //추방 때문에 조금 더 김
} } else {
else{
$candidateStrength = []; $candidateStrength = [];
$candidateIntel = []; $candidateIntel = [];
$candidateAny = []; $candidateAny = [];
@@ -239,7 +257,6 @@ if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], 11)) {
if (key_exists(11, $level)) { if (key_exists(11, $level)) {
echo "{$level[11]['name']} 【" . CityConst::byID($level[11]['city'])->name . "】"; echo "{$level[11]['name']} 【" . CityConst::byID($level[11]['city'])->name . "】";
} }
} }
echo " echo "
</td> </td>
@@ -247,7 +264,9 @@ echo "
"; ";
for ($i = 10; $i >= $lv; $i--) { for ($i = 10; $i >= $lv; $i--) {
if($i % 2 == 0) { echo "<tr>"; } if ($i % 2 == 0) {
echo "<tr>";
}
$officerLevelText = getOfficerLevelText($i, $nation['level']); $officerLevelText = getOfficerLevelText($i, $nation['level']);
echo " echo "
<td width=98 align=right class='bg1'>{$officerLevelText}</td> <td width=98 align=right class='bg1'>{$officerLevelText}</td>
@@ -280,7 +299,9 @@ for($i=10; $i >= $lv; $i--) {
} }
} }
echo "</td>"; echo "</td>";
if($i % 2 == 1) { echo "</tr>"; } if ($i % 2 == 1) {
echo "</tr>";
}
} }
echo " echo "
<tr><td colspan=4>※ <font color=red>빨간색</font>은 현재 임명중인 장수, <font color=orange>노란색</font>은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr> <tr><td colspan=4>※ <font color=red>빨간색</font>은 현재 임명중인 장수, <font color=orange>노란색</font>은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr>
@@ -291,8 +312,12 @@ echo "
if ($meLevel == 12) : if ($meLevel == 12) :
?> ?>
<table align='center' width='1000' class='tb_layout bg0'> <table align='center' width='1000' class='tb_layout bg0'>
<tr><td colspan='4' height='5'></td></tr> <tr>
<tr><td colspan='4' align='center' bgcolor='purple'>외 교 권 자 임 명</td></tr> <td colspan='4' height='5'></td>
</tr>
<tr>
<td colspan='4' align='center' bgcolor='purple'>외 교 권 자 임 명</td>
</tr>
<tr> <tr>
<td width=98 align=right class='bg1'>외교권자</td> <td width=98 align=right class='bg1'>외교권자</td>
<td width=398> <td width=398>
@@ -312,7 +337,9 @@ if($meLevel == 12):
endif; endif;
?> ?>
<table align=center width=1000 id='officer_list' class='tb_layout bg0'> <table align=center width=1000 id='officer_list' class='tb_layout bg0'>
<tr><td colspan=5 height=5></td></tr> <tr>
<td colspan=5 height=5></td>
</tr>
<?php <?php
if ($meLevel >= 5) { if ($meLevel >= 5) {
$officerLevelText = getOfficerLevelText(4, $nation['level']); $officerLevelText = getOfficerLevelText(4, $nation['level']);
@@ -494,9 +521,16 @@ foreach($db->query('SELECT city,name,level,region,officer_set from city where na
$cityOfficerList = $officerList[$cityID] ?? []; $cityOfficerList = $officerList[$cityID] ?? [];
?> ?>
<?php if ($region != $city['region']) : ?> <?php if ($region != $city['region']) : ?>
<tr><td colspan=5 height=3 class='bg1'></td></tr> <tr>
<tr><td colspan=5 class='bg1'><font size=4 color=skyblue> 【 <?=CityConst::$regionMap[$city['region']]?> 】 </font></td></tr> <td colspan=5 height=3 class='bg1'></td>
<?php endif; $region = $city['region']; ?> </tr>
<tr>
<td colspan=5 class='bg1'>
<font size=4 color=skyblue> 【 <?= CityConst::$regionMap[$city['region']] ?> 】 </font>
</td>
</tr>
<?php endif;
$region = $city['region']; ?>
<tr> <tr>
<td width=78 align=center style='color:<?= $textColor ?>;background-color:<?= $nationColor ?>;font-size:1.2em;'>【<?= $citylevel[$city['level']] ?>】</td> <td width=78 align=center style='color:<?= $textColor ?>;background-color:<?= $nationColor ?>;font-size:1.2em;'>【<?= $citylevel[$city['level']] ?>】</td>
<td width=78 align=right style='color:<?= $textColor ?>;background-color:<?= $nationColor ?>;font-size:1.2em;'><?= $city['name'] ?>&nbsp;&nbsp;</td> <td width=78 align=right style='color:<?= $textColor ?>;background-color:<?= $nationColor ?>;font-size:1.2em;'><?= $city['name'] ?>&nbsp;&nbsp;</td>
@@ -515,12 +549,19 @@ $officer = $cityOfficerList[$officerLevel];
} }
?> ?>
<tr><td colspan=5>※ <font color=orange>노란색</font>은 변경 불가능, 하얀색은 변경 가능 관직입니다.</td></tr> <tr>
<td colspan=5>※ <font color=orange>노란색</font>은 변경 불가능, 하얀색은 변경 가능 관직입니다.</td>
</tr>
</table> </table>
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+75 -25
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -35,19 +36,20 @@ $sel = [$type => "selected"];
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력도시</title> <title><?= UniqueConst::$serverName ?>: 세력도시</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?> <?= WebUtil::printDist('ts', ['common', 'extExpandCity']) ?>
<?=WebUtil::printJS('dist_js/extExpandCity.js')?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>세 력 도 시<br><?=backButton()?></td></tr> <tr>
<tr><td><form name=form1 method=post>정렬순서 : <td>세 력 도 시<br><?= backButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1> <select name=type size=1>
<option <?= $sel[1] ?? '' ?> value=1>기본</option> <option <?= $sel[1] ?? '' ?> value=1>기본</option>
<option <?= $sel[2] ?? '' ?> value=2>인구</option> <option <?= $sel[2] ?? '' ?> value=2>인구</option>
@@ -62,8 +64,10 @@ $sel = [$type => "selected"];
<option <?= $sel[11] ?? '' ?> value=11>지역</option> <option <?= $sel[11] ?? '' ?> value=11>지역</option>
<option <?= $sel[12] ?? '' ?> value=12>규모</option> <option <?= $sel[12] ?? '' ?> value=12>규모</option>
</select> </select>
<input type=submit value='정렬하기'></form> <input type=submit value='정렬하기'>
</td></tr> </form>
</td>
</tr>
</table> </table>
<?php <?php
@@ -83,30 +87,71 @@ $cityList = $db->query('SELECT *,pop/pop_max as poprate from city where nation=%
switch ($type) { switch ($type) {
case 1: break; case 1:
case 2: usort($cityList, function($lhs, $rhs){return $rhs['pop'] <=> $lhs['pop'];}); break; break;
case 3: usort($cityList, function($lhs, $rhs){return $rhs['poprate'] <=> $lhs['poprate'];}); break; case 2:
case 4: usort($cityList, function($lhs, $rhs){return $rhs['trust'] <=> $lhs['trust'];}); break; usort($cityList, function ($lhs, $rhs) {
case 5: usort($cityList, function($lhs, $rhs){return $rhs['agri'] <=> $lhs['agri'];}); break; return $rhs['pop'] <=> $lhs['pop'];
case 6: usort($cityList, function($lhs, $rhs){return $rhs['comm'] <=> $lhs['comm'];}); break; });
case 7: usort($cityList, function($lhs, $rhs){return $rhs['secu'] <=> $lhs['secu'];}); break; break;
case 8: usort($cityList, function($lhs, $rhs){return $rhs['def'] <=> $lhs['def'];}); break; case 3:
case 9: usort($cityList, function($lhs, $rhs){return $rhs['wall'] <=> $lhs['wall'];}); break; usort($cityList, function ($lhs, $rhs) {
case 10: usort($cityList, function($lhs, $rhs){return $rhs['trade'] <=> $lhs['trade'];}); break; return $rhs['poprate'] <=> $lhs['poprate'];
case 11: usort($cityList, function($lhs, $rhs){ });
break;
case 4:
usort($cityList, function ($lhs, $rhs) {
return $rhs['trust'] <=> $lhs['trust'];
});
break;
case 5:
usort($cityList, function ($lhs, $rhs) {
return $rhs['agri'] <=> $lhs['agri'];
});
break;
case 6:
usort($cityList, function ($lhs, $rhs) {
return $rhs['comm'] <=> $lhs['comm'];
});
break;
case 7:
usort($cityList, function ($lhs, $rhs) {
return $rhs['secu'] <=> $lhs['secu'];
});
break;
case 8:
usort($cityList, function ($lhs, $rhs) {
return $rhs['def'] <=> $lhs['def'];
});
break;
case 9:
usort($cityList, function ($lhs, $rhs) {
return $rhs['wall'] <=> $lhs['wall'];
});
break;
case 10:
usort($cityList, function ($lhs, $rhs) {
return $rhs['trade'] <=> $lhs['trade'];
});
break;
case 11:
usort($cityList, function ($lhs, $rhs) {
$cmpTrust = $lhs['region'] <=> $rhs['region']; $cmpTrust = $lhs['region'] <=> $rhs['region'];
if ($cmpTrust != 0) { if ($cmpTrust != 0) {
return $cmpTrust; return $cmpTrust;
} }
return $rhs['level'] <=> $lhs['level']; return $rhs['level'] <=> $lhs['level'];
}); break; });
case 12: usort($cityList, function($lhs, $rhs){ break;
case 12:
usort($cityList, function ($lhs, $rhs) {
$cmpTrust = $rhs['level'] <=> $lhs['level']; $cmpTrust = $rhs['level'] <=> $lhs['level'];
if ($cmpTrust != 0) { if ($cmpTrust != 0) {
return $cmpTrust; return $cmpTrust;
} }
return $lhs['region'] <=> $rhs['region']; return $lhs['region'] <=> $rhs['region'];
}); break; });
break;
} }
$region = 0; $region = 0;
@@ -200,9 +245,14 @@ foreach($cityList as $city){
?> ?>
<table align=center width=1000 class='tb_layout bg0 anchor'> <table align=center width=1000 class='tb_layout bg0 anchor'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
<div id="helper_genlist" style="display:none;"></div> <div id="helper_genlist" style="display:none;"></div>
</html> </html>
+31 -16
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -44,19 +45,20 @@ if($gameStor->isunited){
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력장수</title> <title><?= UniqueConst::$serverName ?>: 세력장수</title>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?> <?= WebUtil::printDist('ts', ['common']) ?>
<?=WebUtil::printJS('dist_js/common.js')?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>세 력 장 수<br><?=backButton()?></td></tr> <tr>
<tr><td><form name=form1 method=post>정렬순서 : <td>세 력 장 수<br><?= backButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1> <select name=type size=1>
<option <?= $sel[1] ?? '' ?> value=1>관직</option> <option <?= $sel[1] ?? '' ?> value=1>관직</option>
<option <?= $sel[2] ?? '' ?> value=2>계급</option> <option <?= $sel[2] ?? '' ?> value=2>계급</option>
@@ -74,8 +76,10 @@ if($gameStor->isunited){
<option <?= $sel[14] ?? '' ?> value=14>사관</option> <option <?= $sel[14] ?? '' ?> value=14>사관</option>
<option <?= $sel[15] ?? '' ?> value=15>NPC</option> <option <?= $sel[15] ?? '' ?> value=15>NPC</option>
</select> </select>
<input type=submit value='정렬하기'></form> <input type=submit value='정렬하기'>
</td></tr> </form>
</td>
</tr>
</table> </table>
<?php <?php
@@ -142,9 +146,13 @@ foreach($generalList as $general){
$intel = "{$general['intel']}"; $intel = "{$general['intel']}";
} }
if($general['npc'] >= 2) { $name = "<font color=cyan>{$general['name']}</font>"; } if ($general['npc'] >= 2) {
elseif($general['npc'] == 1) { $name = "<font color=skyblue>{$general['name']}</font>"; } $name = "<font color=cyan>{$general['name']}</font>";
else { $name = "{$general['name']}"; } } elseif ($general['npc'] == 1) {
$name = "<font color=skyblue>{$general['name']}</font>";
} else {
$name = "{$general['name']}";
}
if (key_exists($general['owner'], $ownerNameList)) { if (key_exists($general['owner'], $ownerNameList)) {
$name = $name . '<br><small>(' . $ownerNameList[$general['owner']] . ')</small>'; $name = $name . '<br><small>(' . $ownerNameList[$general['owner']] . ')</small>';
@@ -155,7 +163,9 @@ foreach($generalList as $general){
<tr> <tr>
<td align=center class='generalIcon' style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;' height=64></td> <td align=center class='generalIcon' style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;' height=64></td>
<td align=center>$name</td> <td align=center>$name</td>
<td align=center>"; echo getOfficerLevelText($general['officer_level'], $nationLevel); echo "</td> <td align=center>";
echo getOfficerLevelText($general['officer_level'], $nationLevel);
echo "</td>
<td align=center>" . getDed($general['dedication']) . "</td> <td align=center>" . getDed($general['dedication']) . "</td>
<td align=center>" . getHonor($general['experience']) . "</td> <td align=center>" . getHonor($general['experience']) . "</td>
<td align=center>" . getBill($general['dedication']) . "</td> <td align=center>" . getBill($general['dedication']) . "</td>
@@ -167,7 +177,8 @@ foreach($generalList as $general){
<td align=center>" . displayCharInfo($general['personal']) . "</td> <td align=center>" . displayCharInfo($general['personal']) . "</td>
<td align=center>" . displaySpecialDomesticInfo($general['special']) . " / " . displaySpecialWarInfo($general['special2']) . "</td> <td align=center>" . displaySpecialDomesticInfo($general['special']) . " / " . displaySpecialWarInfo($general['special2']) . "</td>
<td align=center>{$general['belong']}</td> <td align=center>{$general['belong']}</td>
<td align=center>{$general['connect']}"; echo "<br>(".getConnect($general['connect']).")</td> <td align=center>{$general['connect']}";
echo "<br>(" . getConnect($general['connect']) . ")</td>
</tr>"; </tr>";
} }
echo " echo "
@@ -177,8 +188,12 @@ foreach($generalList as $general){
?> ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
+13 -10
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -28,17 +29,16 @@ if($nationID == 0) {
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력정보</title> <title><?= UniqueConst::$serverName ?>: 세력정보</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>세 력 정 보<br><?=backButton()?></td></tr> <tr>
<td>세 력 정 보<br><?= backButton() ?></td>
</tr>
</table> </table>
<br> <br>
<?php <?php
@@ -55,8 +55,7 @@ foreach($cityList as $city){
$maxPop += $city['pop_max']; $maxPop += $city['pop_max'];
if ($city['city'] == $nation['capital']) { if ($city['city'] == $nation['capital']) {
$cityNames[] = "<span style='color:cyan;'>{$city['name']}</span>"; $cityNames[] = "<span style='color:cyan;'>{$city['name']}</span>";
} } else {
else{
$cityNames[] = $city['name']; $cityNames[] = $city['name'];
} }
} }
@@ -152,8 +151,12 @@ if ($budgetricediff > 0) {
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
+94 -52
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -43,34 +44,36 @@ $use_auto_nation_turn = $me->getAuxVar('use_auto_nation_turn')??1;
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=500" />
<title><?= UniqueConst::$serverName ?>: 내정보</title> <title><?= UniqueConst::$serverName ?>: 내정보</title>
<script> <script>
var availableDieImmediately = <?= $availableDieImmediately ? 'true' : 'false' ?>; var availableDieImmediately = <?= $availableDieImmediately ? 'true' : 'false' ?>;
</script> </script>
<?=WebUtil::printJS('../d_shared/common_path.js')?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printJS('dist_js/myPage.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['myPage']) ?>
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <div id="container" class="bg0">
<tr><td>내 정 보<br><?=backButton()?></td></tr> <div class="row gx-0">
</table> <div class="col">내 정 보<br><?= backButton() ?></div>
<table align=center width=1000 class='tb_layout bg0'> </div>
<tr> <div class="row gx-0">
<td width=50%> <div class="col col-12 col-md-6">
<?php generalInfo($me); ?> <div class="row">
<?php generalInfo2($me); ?> <div class="col"><?php generalInfo($me); ?><?php generalInfo2($me); ?></div>
</td> </div>
<td width=50% valign=top style="padding-left:4ch;"> </div>
<div class="col col-12 col-md-6">
<div class="row">
<div class="col" style='padding-left:4ch;'>
토너먼트 【 토너먼트 【
<input type=radio class='tnmt' name=tnmt value=0 <?= $me->getVar('tnmt') == 0 ? "checked" : ""; ?>>수동참여 <input type=radio class='tnmt' name=tnmt value=0 <?= $me->getVar('tnmt') == 0 ? "checked" : ""; ?>>수동참여
<input type=radio class='tnmt' name=tnmt value=1 <?= $me->getVar('tnmt') == 1 ? "checked" : ""; ?>>자동참여 <input type=radio class='tnmt' name=tnmt value=1 <?= $me->getVar('tnmt') == 1 ? "checked" : ""; ?>>자동참여
@@ -99,66 +102,105 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
<option value=999 <?= $me->getVar('defence_train') == 999 ? "selected" : ""; ?>><?= formatDefenceTrain(999) ?>[훈련, 사기 -3]</option> <option value=999 <?= $me->getVar('defence_train') == 999 ? "selected" : ""; ?>><?= formatDefenceTrain(999) ?>[훈련, 사기 -3]</option>
</select> </select>
】<br><br> 】<br><br>
<input type=<?=$submit?> id='set_my_setting' name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=설정저장><br> <input type=<?= $submit ?> id='set_my_setting' name=btn style=background-color:<?= GameConst::$basecolor2 ?>;color:white;width:160px;height:30px;font-size:14px; value=설정저장><br>
∞<span style='color:orange'>설정저장은 이달중 <?= $myset ?>회 남았습니다.</span><br><br> ∞<span style='color:orange'>설정저장은 이달중 <?= $myset ?>회 남았습니다.</span><br><br>
<?php if (!($gameStor->autorun_user['limit_minutes'] ?? false)) : ?> <?php if (!($gameStor->autorun_user['limit_minutes'] ?? false)) : ?>
휴 가 신 청<br> 휴 가 신 청<br>
<button type="button" id='vacation' style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>휴가 신청</button><br><br> <button type="button" id='vacation' style=background-color:<?= GameConst::$basecolor2 ?>;color:white;width:160px;height:30px;font-size:14px;>휴가 신청</button><br><br>
<?php endif; ?> <?php endif; ?>
<!--빙의 해제용 삭턴 조절<br> <!--빙의 해제용 삭턴 조절<br>
<a href="b_myPage.php?detachNPC=1"><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>빙의 해체 요청</button></a>--> <a href="b_myPage.php?detachNPC=1"><button type="button" style=background-color:<?= GameConst::$basecolor2 ?>;color:white;width:160px;height:30px;font-size:14px;>빙의 해체 요청</button></a>-->
<?php if ($showDieImmediatelyBtn) : ?> <?php if ($showDieImmediatelyBtn) : ?>
가오픈 기간 내 장수 삭제 (<?= substr($targetTime, 0, 19) ?> 부터)<br> 가오픈 기간 내 장수 삭제 (<?= substr($targetTime, 0, 19) ?> 부터)<br>
<a href="c_die_immediately.php" id='die_immediately'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>장수 삭제</button></a><br><br> <a href="c_die_immediately.php" id='die_immediately'><button type="button" style=background-color:<?= GameConst::$basecolor2 ?>;color:white;width:160px;height:30px;font-size:14px;>장수 삭제</button></a><br><br>
<?php endif; ?> <?php endif; ?>
<?php if ($gameStor->npcmode == 2 && $me->getNPCType() == 0) : ?> <?php if ($gameStor->npcmode == 2 && $me->getNPCType() == 0) : ?>
다른 장수 선택 (<?= substr($me->getAuxVar('next_change') ?? TimeUtil::now(), 0, 19) ?> 부터)<br> 다른 장수 선택 (<?= substr($me->getAuxVar('next_change') ?? TimeUtil::now(), 0, 19) ?> 부터)<br>
<a href="select_general_from_pool.php" id='select_general_from_pool'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>다른 장수 선택</button></a><br><br> <a href="select_general_from_pool.php" id='select_general_from_pool'><button type="button" style=background-color:<?= GameConst::$basecolor2 ?>;color:white;width:160px;height:30px;font-size:14px;>다른 장수 선택</button></a><br><br>
<?php endif; ?> <?php endif; ?>
<div class="row">
<div class="col-4 text-end">500px/1000px 모드<br>(모바일 전용, 즉시 설정)</div>
<div class="col-8">
<div class="btn-group" role="group" aria-label="500px/1000px 모드 설정">
<input type="radio" class="btn-check" name="screenMode" value="auto" id="screenMode_auto" autocomplete="off">
<label class="btn btn-primary" for="screenMode_auto">자동</label>
<input type="radio" class="btn-check" name="screenMode" value="500px" id="screenMode_500px" autocomplete="off">
<label class="btn btn-primary" for="screenMode_500px">500px</label>
<input type="radio" class="btn-check" name="screenMode" value="1000px" id="screenMode_1000px" autocomplete="off">
<label class="btn btn-primary" for="screenMode_1000px">1000px</label>
</div>
</div>
</div>
<br>
개인용 CSS<br> 개인용 CSS<br>
<textarea id='custom_css' style='color:white;background-color:black;width:420px;height:150px;'></textarea> <textarea id='custom_css' style='color:white;background-color:black;width:420px;height:150px;'></textarea>
</td> </div>
</tr> </div>
<tr> </div>
<td align=center class='bg1'><font color=skyblue size=3>개인 기록</font></td> <div class="col col-12 col-md-6">
<td align=center class='bg1'><font color=orange size=3>전투 기록</font></td> <div class="row gx-0">
</tr> <div class="col bg1 text-center">
<tr> <h4 style='color:skyblue'>개인 기록</h4>
<td valign=top> </div>
</div>
<div class="row gx-0">
<div id='generalActionPlate'> <div id='generalActionPlate'>
<?= formatHistoryToHTML(getGeneralActionLogRecent($generalID, 24), 'generalAction') ?> <?= formatHistoryToHTML(getGeneralActionLogRecent($generalID, 24), 'generalAction') ?>
</div> </div>
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="generalAction">이전 로그 불러오기</button> <button type="button" class="load_old_log btn btn-secondary" data-log_type="generalAction">이전 로그 불러오기</button>
</td> </div>
<td valign=top> </div>
<div class="col col-12 col-md-6">
<div class="row gx-0">
<div class="col bg1 text-center">
<h4 style='color:orange'>전투 기록</h4>
</div>
</div>
<div class="row gx-0">
<div id='battleDetailPlate'> <div id='battleDetailPlate'>
<?= formatHistoryToHTML(getBattleDetailLogRecent($generalID, 24), 'battleDetail') ?> <?= formatHistoryToHTML(getBattleDetailLogRecent($generalID, 24), 'battleDetail') ?>
</div> </div>
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="battleDetail">이전 로그 불러오기</button> <button type="button" class="load_old_log btn btn-secondary" data-log_type="battleDetail">이전 로그 불러오기</button>
</td> </div>
</tr> </div>
<tr>
<td align=center class='bg1'><font color=skyblue size=3>장수 열전</font></td> <div class="col col-12 col-md-6">
<td align=center class='bg1'><font color=orange size=3>전투 결과</font></td> <div class="row gx-0">
</tr> <div class="col bg1 text-center">
<tr> <h4 style='color:skyblue'>장수 열전</h4>
<td valign=top> </div>
</div>
<div class="row gx-0">
<?= formatHistoryToHTML(getGeneralHistoryLogAll($generalID)) ?> <?= formatHistoryToHTML(getGeneralHistoryLogAll($generalID)) ?>
</td> </div>
<td valign=top> </div>
<div class="col col-12 col-md-6">
<div class="row gx-0">
<div class="col bg1 text-center">
<h4 style='color:orange'>전투 결과</h4>
</div>
</div>
<div class="row gx-0">
<div id='battleResultPlate'> <div id='battleResultPlate'>
<?= formatHistoryToHTML(getBattleResultRecent($generalID, 24), 'battleResult') ?> <?= formatHistoryToHTML(getBattleResultRecent($generalID, 24), 'battleResult') ?>
</div> </div>
<button type="button" class="load_old_log btn btn-secondary btn-block" data-log_type="battleResult">이전 로그 불러오기</button> <button type="button" class="load_old_log btn btn-secondary" data-log_type="battleResult">이전 로그 불러오기</button>
</td> </div>
</tr> </div>
</table> </div>
<table align=center width=1000 class='tb_layout bg0'> <div class="row gx-0">
<tr><td><?=backButton()?></td></tr> <div class="col "><?= backButton() ?></div>
<tr><td><?=banner()?></td></tr> </div>
</table> <div class="row bg0 gx-0">
<div class="col bg0"><?= banner() ?></div>
</div>
</div>
</body> </body>
</html> </html>
+21 -15
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -14,8 +15,7 @@ function die_redirect()
global $isChiefTurn; global $isChiefTurn;
if (!$isChiefTurn) { if (!$isChiefTurn) {
header('location:index.php', true, 303); header('location:index.php', true, 303);
} } else {
else{
header('location:b_chiefcenter.php', true, 303); header('location:b_chiefcenter.php', true, 303);
} }
die(); die();
@@ -46,8 +46,7 @@ $general = General::createGeneralObjFromDB($session->generalID);
if (!$isChiefTurn) { if (!$isChiefTurn) {
$commandObj = buildGeneralCommandClass($commandType, $general, $env); $commandObj = buildGeneralCommandClass($commandType, $general, $env);
} } else {
else{
if ($general->getVar('officer_level') < 5) { if ($general->getVar('officer_level') < 5) {
die_redirect(); die_redirect();
} }
@@ -70,16 +69,14 @@ $cssList = $commandObj->getCSSFiles();
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= $commandObj->getName() ?></title> <title><?= $commandObj->getName() ?></title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?= WebUtil::printJS('d_shared/base_map.js') ?> <?= WebUtil::printJS('d_shared/base_map.js') ?>
<?=WebUtil::printJS('dist_js/processing.js')?>
<script> <script>
window.serverNick = '<?= DB::prefix() ?>'; window.serverNick = '<?= DB::prefix() ?>';
window.serverID = '<?= UniqueConst::$serverID ?>'; window.serverID = '<?= UniqueConst::$serverID ?>';
@@ -88,38 +85,47 @@ window.turnList = [<?=join(', ',$turnList)?>];
window.isChiefTurn = <?= $isChiefTurn ? 'true' : 'false' ?>; window.isChiefTurn = <?= $isChiefTurn ? 'true' : 'false' ?>;
var jsPlugins = <?= Json::encode($jsList) ?>; var jsPlugins = <?= Json::encode($jsList) ?>;
</script> </script>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/main.css') ?> <?= WebUtil::printCSS('css/main.css') ?>
<?= WebUtil::printCSS('css/map.css') ?> <?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printCSS('css/processing.css') ?> <?= WebUtil::printCSS('css/processing.css') ?>
<?php <?php
foreach ($cssList as $css) { foreach ($cssList as $css) {
print(WebUtil::printCSS($css)); print(WebUtil::printCSS($css));
} }
?> ?>
<?= WebUtil::printDist('ts', ['common', 'processing']) ?>
</head> </head>
<body class="img_back"> <body class="img_back">
<table class="tb_layout bg0" style="width:1000px;margin:auto;"> <table class="tb_layout bg0" style="width:1000px;margin:auto;">
<tr><td class="bg1" style='text-align:center;'><?=$commandObj->getName()?></td></tr> <tr>
<tr><td> <td class="bg1" style='text-align:center;'><?= $commandObj->getName() ?></td>
</tr>
<tr>
<td>
<input type=button value='돌아가기' onclick="history.back();"><br> <input type=button value='돌아가기' onclick="history.back();"><br>
</td></tr></table> </td>
</tr>
</table>
<div class="tb_layout bg0" style="width:1000px;margin:auto;padding-bottom:2em;border:solid 1px gray;"> <div class="tb_layout bg0" style="width:1000px;margin:auto;padding-bottom:2em;border:solid 1px gray;">
<?= $commandObj->getForm() ?> <?= $commandObj->getForm() ?>
</div> </div>
<table class="tb_layout bg0" style="width:1000px;margin:auto;"> <table class="tb_layout bg0" style="width:1000px;margin:auto;">
<tr><td> <tr>
<td>
<input type=button value='돌아가기' onclick="history.back();"><br> <input type=button value='돌아가기' onclick="history.back();"><br>
<?= banner() ?> <?= banner() ?>
</td></tr></table> </td>
</tr>
</table>
</body> </body>
</html> </html>
+112 -32
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -24,11 +25,32 @@ if ($con >= 2) {
} }
switch ($admin['tnmt_type']) { switch ($admin['tnmt_type']) {
default: throw new \RuntimeException('invalid tnmt_type'); default:
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "total"; $tp2 = "종합"; $tp3 = "total"; break; throw new \RuntimeException('invalid tnmt_type');
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "leadership"; $tp2 = "통솔"; $tp3 = "leadership"; break; case 0:
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "strength"; $tp2 = "무력"; $tp3 = "strength"; break; $tnmt_type = "<font color=cyan>전력전</font>";
case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "intel"; $tp2 = "지력"; $tp3 = "intel"; break; $tp = "total";
$tp2 = "종합";
$tp3 = "total";
break;
case 1:
$tnmt_type = "<font color=cyan>통솔전</font>";
$tp = "leadership";
$tp2 = "통솔";
$tp3 = "leadership";
break;
case 2:
$tnmt_type = "<font color=cyan>일기토</font>";
$tp = "strength";
$tp2 = "무력";
$tp3 = "strength";
break;
case 3:
$tnmt_type = "<font color=cyan>설전</font>";
$tp = "intel";
$tp2 = "지력";
$tp3 = "intel";
break;
} }
?> ?>
@@ -37,18 +59,22 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "intel"; $tp2 = "
<?php if ($con == 1) { <?php if ($con == 1) {
MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^"); MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^");
} ?> } ?>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 토너먼트</title> <title><?= UniqueConst::$serverName ?>: 토너먼트</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
<table align=center width=2000 class='tb_layout bg0'> <table align=center width=2000 class='tb_layout bg0'>
<tr><td>삼모전 토너먼트<br><?=closeButton()?></td></tr> <tr>
<td>삼모전 토너먼트<br><?= closeButton() ?></td>
</tr>
</table> </table>
<table align=center class='tb_layout bg0'> <table align=center class='tb_layout bg0'>
<?php <?php
@@ -61,14 +87,30 @@ if ($session->userGrade >= 5) {
<input type=button value='갱신' onclick='location.reload()'>"; <input type=button value='갱신' onclick='location.reload()'>";
switch ($admin['tnmt_trig']) { switch ($admin['tnmt_trig']) {
case 0: $sel[0] = "selected"; break; case 0:
case 1: $sel[1] = "selected"; break; $sel[0] = "selected";
case 2: $sel[2] = "selected"; break; break;
case 3: $sel[3] = "selected"; break; case 1:
case 4: $sel[4] = "selected"; break; $sel[1] = "selected";
case 5: $sel[5] = "selected"; break; break;
case 6: $sel[6] = "selected"; break; case 2:
case 7: $sel[7] = "selected"; break; $sel[2] = "selected";
break;
case 3:
$sel[3] = "selected";
break;
case 4:
$sel[4] = "selected";
break;
case 5:
$sel[5] = "selected";
break;
case 6:
$sel[6] = "selected";
break;
case 7:
$sel[7] = "selected";
break;
} }
if ($admin['tournament'] == 0) { if ($admin['tournament'] == 0) {
@@ -113,15 +155,33 @@ if ($session->userGrade >= 5) {
echo "<input type=submit name=btn value='랜덤투입'>"; echo "<input type=submit name=btn value='랜덤투입'>";
echo "<input type=submit name=btn value='랜덤전부투입'>"; echo "<input type=submit name=btn value='랜덤전부투입'>";
break; break;
case 2: echo "<input type=submit name=btn value='예선'><input type=submit name=btn value='예선전부'>"; break; case 2:
case 3: echo "<input type=submit name=btn value='추첨'><input type=submit name=btn value='추첨전부'>"; break; echo "<input type=submit name=btn value='예선'><input type=submit name=btn value='예선전부'>";
case 4: echo "<input type=submit name=btn value='본선'><input type=submit name=btn value='본선전부'>"; break; break;
case 5: echo "<input type=submit name=btn value='배정'>"; break; case 3:
case 6: echo "<input type=submit name=btn value='베팅마감'>"; break; echo "<input type=submit name=btn value='추첨'><input type=submit name=btn value='추첨전부'>";
case 7: echo "<input type=submit name=btn value='16강'>"; break; break;
case 8: echo "<input type=submit name=btn value='8강'>"; break; case 4:
case 9: echo "<input type=submit name=btn value='4강'>"; break; echo "<input type=submit name=btn value='본선'><input type=submit name=btn value='본선전부'>";
case 10: echo "<input type=submit name=btn value='결승'>"; break; break;
case 5:
echo "<input type=submit name=btn value='배정'>";
break;
case 6:
echo "<input type=submit name=btn value='베팅마감'>";
break;
case 7:
echo "<input type=submit name=btn value='16강'>";
break;
case 8:
echo "<input type=submit name=btn value='8강'>";
break;
case 9:
echo "<input type=submit name=btn value='4강'>";
break;
case 10:
echo "<input type=submit name=btn value='결승'>";
break;
} }
echo " echo "
@@ -143,10 +203,23 @@ if($str3){
$str3 = ', ' . $str3; $str3 = ', ' . $str3;
} }
?> ?>
<tr><td colspan=8>운영자 메세지 : <font color=orange size=5><?=$admin['tnmt_msg']?></font></td></tr> <tr>
<tr><td colspan=8 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.$str2.$str3?>)</font></td></tr> <td colspan=8>운영자 메세지 : <font color=orange size=5><?= $admin['tnmt_msg'] ?></font>
<tr><td colspan=8 align=center class='bg2'><font color=magenta size=5>16강 승자전</font></td></tr> </td>
<tr><td height=10 colspan=8 align=center></td></tr> </tr>
<tr>
<td colspan=8 align=center>
<font color=white size=6><?= $tnmt_type ?> (<?= $str1 . $str2 . $str3 ?>)</font>
</td>
</tr>
<tr>
<td colspan=8 align=center class='bg2'>
<font color=magenta size=5>16강 승자전</font>
</td>
</tr>
<tr>
<td height=10 colspan=8 align=center></td>
</tr>
<?php <?php
echo " echo "
@@ -456,7 +529,8 @@ if ($admin['tournament'] == 2 || $admin['tournament'] == 3) {
?> ?>
</tr> </tr>
<tr><td colspan=8> <tr>
<td colspan=8>
<font color=white size=2> <font color=white size=2>
ㆍ예선은 홈&amp;어웨이 풀리그로 진행됩니다. (총 14경기)<br> ㆍ예선은 홈&amp;어웨이 풀리그로 진행됩니다. (총 14경기)<br>
ㆍ상위 4명이 본선에 진출하게 되며 조추첨을 통해 조가 배정됩니다.<br> ㆍ상위 4명이 본선에 진출하게 되며 조추첨을 통해 조가 배정됩니다.<br>
@@ -469,11 +543,17 @@ if ($admin['tournament'] == 2 || $admin['tournament'] == 3) {
ㆍ16강자 100, 8강자 300, 4강자 600, 준우승자 1200, 우승자 2000 (220년 기준)<br> ㆍ16강자 100, 8강자 300, 4강자 600, 준우승자 1200, 우승자 2000 (220년 기준)<br>
ㆍ즐거운 삼토! ㆍ즐거운 삼토!
</font> </font>
</td></tr> </td>
</tr>
</table> </table>
<table align=center width=2000 class='tb_layout bg0'> <table align=center width=2000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+43 -27
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -24,8 +25,7 @@ foreach($db->query('SELECT troop_leader,name FROM troop WHERE nation = %i', $me[
foreach ($db->query( foreach ($db->query(
'SELECT no,name,turntime,troop,city FROM general WHERE troop!=0 AND nation = %i ORDER BY turntime ASC', 'SELECT no,name,turntime,troop,city FROM general WHERE troop!=0 AND nation = %i ORDER BY turntime ASC',
$me['nation'] $me['nation']
) as $general ) as $general) {
){
if (!key_exists($general['troop'], $troops)) { if (!key_exists($general['troop'], $troops)) {
trigger_error("올바르지 않은 부대 소속 {$general['no']}, {$general['name']} : {$general['troop']}"); trigger_error("올바르지 않은 부대 소속 {$general['no']}, {$general['name']} : {$general['troop']}");
continue; continue;
@@ -46,8 +46,7 @@ if($troops){
foreach ($db->queryAllLists( foreach ($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC', 'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($troopLeaders, 'no') array_column($troopLeaders, 'no')
) as [$generalID, $turnIdx, $brief] ) as [$generalID, $turnIdx, $brief]) {
){
if (!key_exists($generalID, $generalTurnList)) { if (!key_exists($generalID, $generalTurnList)) {
$generalTurnList[$generalID] = []; $generalTurnList[$generalID] = [];
} }
@@ -80,28 +79,24 @@ uasort($troops, function($lhs, $rhs){
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 부대편성</title> <title><?= UniqueConst::$serverName ?>: 부대편성</title>
<?=WebUtil::preloadJS('dist_js/troop.js')?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/common.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?=WebUtil::printCSS('dist_css/troop.css')?> <?= WebUtil::printDist('ts', ['common', 'troop'], true) ?>
<script>
</script>
</head> </head>
<body> <body>
<div style="width:1000px;margin:auto;"> <div style="width:1000px;margin:auto;">
<table width=1000 class='tb_layout bg0'> <table width=1000 class='tb_layout bg0'>
<tr><td>부 대 편 성<br><?=backButton()?></td></tr> <tr>
<td>부 대 편 성<br><?= backButton() ?></td>
</tr>
</table> </table>
<table id="troop_list" class='tb_layout bg0'> <table id="troop_list" class='tb_layout bg0'>
<thead> <thead>
@@ -113,14 +108,18 @@ uasort($troops, function($lhs, $rhs){
<td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td> <td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td>
</tr> </tr>
</thead> </thead>
<tfoot><tr><td colspan='5'> <tfoot>
<tr>
<td colspan='5'>
<?php if (!$troops) : ?> <?php if (!$troops) : ?>
<?php elseif ($me['troop'] == 0) : ?> <?php elseif ($me['troop'] == 0) : ?>
<input type=button id='btnJoinTroop' value='부 대 가 입'> <input type=button id='btnJoinTroop' value='부 대 가 입'>
<?php else : ?> <?php else : ?>
<input type=button id="btnLeaveTroop" value='부 대 탈 퇴'> <input type=button id="btnLeaveTroop" value='부 대 탈 퇴'>
<?php endif; ?> <?php endif; ?>
</td></tr></tfoot> </td>
</tr>
</tfoot>
<tbody> <tbody>
<?php <?php
foreach ($troops as $troopNo => $troop) { foreach ($troops as $troopNo => $troop) {
@@ -154,9 +153,15 @@ foreach ($troops as $troopNo=>$troop) {
<td rowspan=2><?= $troopLeader['turnText'] ?></td> <td rowspan=2><?= $troopLeader['turnText'] ?></td>
</tr> </tr>
<tr> <tr>
<td align=center><font size=2>【턴】 <?=substr($troopLeader['turntime'], 14, 5)?></font></td> <td align=center>
<td align=center><font size=1><?=$troopLeader['name']?></font></td></tr> <font size=2>【턴】 <?= substr($troopLeader['turntime'], 14, 5) ?></font>
<tr><td colspan=5> </td>
<td align=center>
<font size=1><?= $troopLeader['name'] ?></font>
</td>
</tr>
<tr>
<td colspan=5>
<?php else : ?> <?php else : ?>
<tr> <tr>
@@ -166,7 +171,7 @@ foreach ($troops as $troopNo=>$troop) {
<td rowspan=2 width=62><?= $genlistText ?></td> <td rowspan=2 width=62><?= $genlistText ?></td>
<td rowspan=2> <td rowspan=2>
<?php if ($me['no'] == $troopLeader['no']) : ?> <?php if ($me['no'] == $troopLeader['no']) : ?>
<select id='genNo' name=gen size=3 style=color:white;background-color:black;font-size:13px;width:128px;>"; <select id='genNo' name=gen size=3 style=color:white;background-color:black;font-size:14px;width:128px;>";
<?php foreach ($troop['users'] as $troopUser) : ?> <?php foreach ($troop['users'] as $troopUser) : ?>
<?php if ($troopUser['no'] == $me['no']) { <?php if ($troopUser['no'] == $me['no']) {
continue; continue;
@@ -180,11 +185,18 @@ foreach ($troops as $troopNo=>$troop) {
<?php endif; ?> <?php endif; ?>
</td> </td>
</tr> </tr>
<tr><td align=center><font size=2>【턴】 <?=substr($troopLeader['turntime'], 14, 5)?></font></td> <tr>
<td align=center><font size=1><?=$troopLeader['name']?></font></td></tr> <td align=center>
<tr><td colspan=5></td></tr> <font size=2>【턴】 <?= substr($troopLeader['turntime'], 14, 5) ?></font>
</td>
<td align=center>
<font size=1><?= $troopLeader['name'] ?></font>
</td>
</tr>
<tr>
<td colspan=5></td>
</tr>
<?php endif; <?php endif;
} //foreach ($troops as $troopNo=>$troop) { } //foreach ($troops as $troopNo=>$troop) {
?> ?>
@@ -205,10 +217,14 @@ foreach ($troops as $troopNo=>$troop) {
</table> </table>
<table width=1000 class='tb_layout bg0'> <table width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</div> </div>
<?=WebUtil::printJS('dist_js/troop.js')?>
</body> </body>
</html> </html>
+143 -167
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -18,8 +19,7 @@ if($me){
$generalID = $me['no']; $generalID = $me['no'];
$nationID = $me['nation']; $nationID = $me['nation'];
$city = $db->queryFirstRow('SELECT city, level, def, wall FROM city WHERE city = %i', $me['city']); $city = $db->queryFirstRow('SELECT city, level, def, wall FROM city WHERE city = %i', $me['city']);
} } else {
else{
$generalID = 0; $generalID = 0;
$nationID = 0; $nationID = 0;
$city = [ $city = [
@@ -32,32 +32,31 @@ else{
if ($nationID) { if ($nationID) {
$nation = $db->queryFirstRow('SELECT level, type, tech, capital FROM nation WHERE nation = %i', $nationID); $nation = $db->queryFirstRow('SELECT level, type, tech, capital FROM nation WHERE nation = %i', $nationID);
} } else {
else{
$nation = null; $nation = null;
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: 전투 시뮬레이터</title> <title><?= UniqueConst::$serverName ?>: 전투 시뮬레이터</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1100" /> <meta name="viewport" content="width=1100" />
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/battle_simulator.css') ?> <?= WebUtil::printCSS('css/battle_simulator.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<script> <script>
var defaultSpecialDomestic = '<?= GameConst::$defaultSpecialDomestic ?>'; var defaultSpecialDomestic = '<?= GameConst::$defaultSpecialDomestic ?>';
var city = <?= Json::encode($city) ?>; var city = <?= Json::encode($city) ?>;
var nation = <?= Json::encode($nation) ?>; var nation = <?= Json::encode($nation) ?>;
</script> </script>
<?=WebUtil::printJS('dist_js/battle_simulator.js')?> <?= WebUtil::printDist('ts', ['common', 'battle_simulator']) ?>
</head> </head>
<body> <body>
<div id="container"> <div id="container">
<div class="card mb-3"> <div class="card mb-3">
@@ -69,34 +68,28 @@ var nation = <?=Json::encode($nation)?>;
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
<input type="number" class="form-control" aria-describedby="text_year" value="<?= $startYear ?>" disabled> <input type="number" class="form-control" aria-describedby="text_year" value="<?= $startYear ?>" disabled>
<div class="input-group-append"> <div class="input-group-text"> 년 시작 </div>
<span class="input-group-text">년 시작</span>
</div>
<input type="number" class="form-control" id="year" value="<?= $year ?>" min="<?= $startYear ?>"> <input type="number" class="form-control" id="year" value="<?= $year ?>" min="<?= $startYear ?>">
<div class="input-group-append"> <div class="input-group-text"> 년 </div>
<span class="input-group-text">년</span>
</div>
<input type="number" class="form-control" id="month" value="1" min="1" max="12"> <input type="number" class="form-control" id="month" value="1" min="1" max="12">
<div class="input-group-append"> <div class="input-group-text"> 월 </div>
<span class="input-group-text">월</span>
</div>
</div> </div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="btn-toolbar" role="toolbar"> <div class="btn-toolbar" role="toolbar">
<div class="input-group mr-2" role="group"> <div class="input-group me-2" role="group">
<div class="input-group-prepend"> <div class="input-group-text">
<span class="input-group-text">반복 횟수</span> 반복 횟수
</div> </div>
<select class="custom-select" id="repeat_cnt"> <select class="form-select" id="repeat_cnt">
<option value="1">1회 (로그 표기)</option> <option value="1">1회 (로그 표기)</option>
<option value="1000">1000회 (요약 표기)</option> <option value="1000">1000회 (요약 표기)</option>
</select> </select>
</div> </div>
<div class="btn-group mr-2" role="group"> <div class="btn-group me-2" role="group">
<button type="button" class="btn btn-danger btn-begin_battle">전투</button> <button type="button" class="btn btn-danger btn-begin_battle">전투</button>
</div> </div>
<div class="btn-group mr-2" role="group"> <div class="btn-group me-2" role="group">
<button type="button" class="btn btn-info btn-battle-save">모두 저장</button> <button type="button" class="btn btn-info btn-battle-save">모두 저장</button>
<input type="file" class="form_load_battle_file" accept=".json" style="display: none;" /> <input type="file" class="form_load_battle_file" accept=".json" style="display: none;" />
<button type="button" class="btn btn-primary btn-battle-load">모두 불러오기</button> <button type="button" class="btn btn-primary btn-battle-load">모두 불러오기</button>
@@ -114,50 +107,40 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
<div class="card-body nation_detail dragpad_battle"> <div class="card-body nation_detail dragpad_battle">
<div class="input-group mb-1"> <div class="input-group mb-1">
<div class="input-group-prepend"> <div class="input-group-text">국가 성향
<span class="input-group-text">국가 성향</span>
</div> </div>
<select class="custom-select form_nation_type" style="width:25ch;"> <select class="form-select form_nation_type" style="width:25ch;">
<?php foreach (GameConst::$availableNationType as $typeID) : ?> <?php foreach (GameConst::$availableNationType as $typeID) : ?>
<?php $nationTypeClass = buildNationTypeClass($typeID) ?> <?php $nationTypeClass = buildNationTypeClass($typeID) ?>
<option value="<?= $typeID ?>"><?= $nationTypeClass->getName() ?> (<?= $nationTypeClass::$pros ?>, <?= $nationTypeClass::$cons ?>)</option> <option value="<?= $typeID ?>"><?= $nationTypeClass->getName() ?> (<?= $nationTypeClass::$pros ?>, <?= $nationTypeClass::$cons ?>)</option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">기술 </div>
<span class="input-group-text">기술</span>
</div>
<input type="number" class="form-control form_tech" value="1" min="0" max="12"> <input type="number" class="form-control form_tech" value="1" min="0" max="12">
<div class="input-group-append"> <div class="input-group-text">등급 </div>
<span class="input-group-text">등급</span>
</div>
</div> </div>
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-text">국가 규모 </div>
<span class="input-group-text">국가 규모</span> <select class="form-select form_nation_level">
</div>
<select class="custom-select form_nation_level">
<?php foreach (getNationLevelList() as $nationLevel => [$name, $chiefCnt, $cityCnt]) : ?> <?php foreach (getNationLevelList() as $nationLevel => [$name, $chiefCnt, $cityCnt]) : ?>
<option value="<?= $nationLevel ?>"><?= $name ?></option> <option value="<?= $nationLevel ?>"><?= $name ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">도시 규모
<span class="input-group-text">도시 규모</span>
</div> </div>
<select class="custom-select form_city_level"> <select class="form-select form_city_level">
<?php foreach (getCityLevelList() as $levelID => $name) : ?> <?php foreach (getCityLevelList() as $levelID => $name) : ?>
<option value="<?= $levelID ?>"><?= $name ?></option> <option value="<?= $levelID ?>"><?= $name ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">수도
<span class="input-group-text">수도</span>
</div> </div>
<div class="input-group-append btn-group btn-group-toggle" data-toggle="buttons"> <div class="btn-group" role="group" aria-label="수도">
<label class="btn btn-secondary"> <input type="radio" class="btn-check" name="is_attacker_capital" value="1" id="is_attacker_capital_1" autocomplete="off">
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="1" autocomplete="off">Y <label class="btn btn-secondary" for="is_attacker_capital_1">Y</label>
</label>
<label class="btn btn-secondary active"> <input type="radio" class="btn-check" name="is_attacker_capital" value="0" id="is_attacker_capital_0" autocomplete="off" checked>
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="0" autocomplete="off">N <label class="btn btn-secondary" for="is_attacker_capital_0">N</label>
</label>
</div> </div>
</div> </div>
@@ -168,12 +151,12 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
<div class="card mb-2 attacker_form general_form" data-general_no='1'> <div class="card mb-2 attacker_form general_form" data-general_no='1'>
<div class="card-header"> <div class="card-header">
<div class="float-sm-left" style="line-height:25px;">출병자 설정</div> <div class="float-sm-start" style="line-height:25px;">출병자 설정</div>
<div class="float-sm-right btn-toolbar" role="toolbar"> <div class="float-sm-end btn-toolbar" role="toolbar">
<div class="btn-group btn-group-sm mr-2" role="group"> <div class="btn-group btn-group-sm me-2" role="group">
<button type="button" class="btn btn-success btn-general-import-server">서버에서 가져오기</button> <button type="button" class="btn btn-success btn-general-import-server">서버에서 가져오기</button>
</div> </div>
<div class="btn-group btn-group-sm mr-2" role="group"> <div class="btn-group btn-group-sm me-2" role="group">
<button type="button" class="btn btn-info btn-general-save">저장</button> <button type="button" class="btn btn-info btn-general-save">저장</button>
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" /> <input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
<button type="button" class="btn btn-primary btn-general-load">불러오기</button> <button type="button" class="btn btn-primary btn-general-load">불러오기</button>
@@ -189,59 +172,50 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
<div class="card-body dragpad_battle"> <div class="card-body dragpad_battle">
<div class="input-group mb-1"> <div class="input-group mb-1">
<div class="input-group-prepend"> <div class="input-group-text">국가 성향
<span class="input-group-text">국가 성향</span>
</div> </div>
<select class="custom-select form_nation_type" style="width:25ch;"> <select class="form-select form_nation_type" style="width:25ch;">
<?php foreach (GameConst::$availableNationType as $typeID) : ?> <?php foreach (GameConst::$availableNationType as $typeID) : ?>
<?php $nationTypeObj = buildNationTypeClass($typeID) ?> <?php $nationTypeObj = buildNationTypeClass($typeID) ?>
<option value="<?= $typeID ?>"><?= $nationTypeObj->getName() ?> (<?= $nationTypeObj::$pros ?>, <?= $nationTypeObj::$cons ?>)</option> <option value="<?= $typeID ?>"><?= $nationTypeObj->getName() ?> (<?= $nationTypeObj::$pros ?>, <?= $nationTypeObj::$cons ?>)</option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">기술
<span class="input-group-text">기술</span>
</div> </div>
<input type="number" class="form-control form_tech" value="1" min="0" max="12"> <input type="number" class="form-control form_tech" value="1" min="0" max="12">
<div class="input-group-append"> <div class="input-group-text">등급
<span class="input-group-text">등급</span>
</div> </div>
</div> </div>
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-text">국가 규모
<span class="input-group-text">국가 규모</span>
</div> </div>
<select class="custom-select form_nation_level"> <select class="form-select form_nation_level">
<?php foreach (getNationLevelList() as $nationLevel => [$name, $chiefCnt, $cityCnt]) : ?> <?php foreach (getNationLevelList() as $nationLevel => [$name, $chiefCnt, $cityCnt]) : ?>
<option value="<?= $nationLevel ?>"><?= $name ?></option> <option value="<?= $nationLevel ?>"><?= $name ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">도시 규모
<span class="input-group-text">도시 규모</span>
</div> </div>
<select class="custom-select form_city_level"> <select class="form-select form_city_level">
<?php foreach (getCityLevelList() as $levelID => $name) : ?> <?php foreach (getCityLevelList() as $levelID => $name) : ?>
<option value="<?= $levelID ?>"><?= $name ?></option> <option value="<?= $levelID ?>"><?= $name ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">수도
<span class="input-group-text">수도</span>
</div> </div>
<div class="input-group-append btn-group btn-group-toggle" data-toggle="buttons"> <div class="btn-group" role="group" aria-label="수도">
<label class="btn btn-secondary"> <input type="radio" class="btn-check" name="is_defender_capital" value="1" id="is_defender_capital_1" autocomplete="off">
<input type="radio" name="is_defender_capital" class="form_is_capital" value="1" autocomplete="off">Y <label class="btn btn-secondary" for="is_defender_capital_1">Y</label>
</label>
<label class="btn btn-secondary active"> <input type="radio" class="btn-check" name="is_defender_capital" value="0" id="is_defender_capital_0" autocomplete="off" checked>
<input type="radio" name="is_defender_capital" class="form_is_capital" value="0" autocomplete="off">N <label class="btn btn-secondary" for="is_defender_capital_0">N</label>
</label>
</div> </div>
</div> </div>
<div class="input-group mb-1"> <div class="input-group mb-1">
<div class="input-group-prepend"> <div class="input-group-text">수비
<span class="input-group-text">수비</span>
</div> </div>
<input type="number" class="form-control form_def" id="city_def" value="1000" min="10" step="10"> <input type="number" class="form-control form_def" id="city_def" value="1000" min="10" step="10">
<div class="input-group-prepend"> <div class="input-group-text">성벽
<span class="input-group-text">성벽</span>
</div> </div>
<input type="number" class="form-control form_wall" id="city_wall" value="1000" min="0" step="10"> <input type="number" class="form-control form_wall" id="city_wall" value="1000" min="0" step="10">
</div> </div>
@@ -249,9 +223,9 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
<div class="card mb-2 defender_add_form"> <div class="card mb-2 defender_add_form">
<div class="card-header"> <div class="card-header">
<div class="float-sm-left" style="line-height:25px;">수비자 설정</div> <div class="float-sm-start" style="line-height:25px;">수비자 설정</div>
<div class="float-sm-right btn-toolbar" role="toolbar"> <div class="float-sm-end btn-toolbar" role="toolbar">
<div class="btn-group btn-group-sm mr-2" role="group"> <div class="btn-group btn-group-sm me-2" role="group">
<button type="button" class="btn btn-dark btn-reorder_defender">수비 순서대로 정렬</button> <button type="button" class="btn btn-dark btn-reorder_defender">수비 순서대로 정렬</button>
</div> </div>
<div class="btn-group btn-group-sm" role="group"> <div class="btn-group btn-group-sm" role="group">
@@ -262,12 +236,12 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
<div class="card mb-2 form_sample"> <div class="card mb-2 form_sample">
<div class="card-header"> <div class="card-header">
<div class="float-sm-left" style="line-height:25px;">수비자 설정</div> <div class="float-sm-start" style="line-height:25px;">수비자 설정</div>
<div class="float-sm-right btn-toolbar" role="toolbar"> <div class="float-sm-end btn-toolbar" role="toolbar">
<div class="btn-group btn-group-sm mr-2" role="group"> <div class="btn-group btn-group-sm me-2" role="group">
<button type="button" class="btn btn-success btn-general-import-server">서버에서 가져오기</button> <button type="button" class="btn btn-success btn-general-import-server">서버에서 가져오기</button>
</div> </div>
<div class="btn-group btn-group-sm mr-2" role="group"> <div class="btn-group btn-group-sm me-2" role="group">
<button type="button" class="btn btn-info btn-general-save">저장</button> <button type="button" class="btn btn-info btn-general-save">저장</button>
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" /> <input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
<button type="button" class="btn btn-primary btn-general-load">불러오기</button> <button type="button" class="btn btn-primary btn-general-load">불러오기</button>
@@ -280,14 +254,12 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
<div class="card-body general_detail"> <div class="card-body general_detail">
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-text">이름
<span class="input-group-text">이름</span>
</div> </div>
<input type="text" class="form-control form_general_name" value="무명" style="width:15ch;"> <input type="text" class="form-control form_general_name" value="무명" style="width:15ch;">
<div class="input-group-prepend"> <div class="input-group-text">직위
<span class="input-group-text">직위</span>
</div> </div>
<select class="custom-select form_officer_level" style="width:8ch;"> <select class="form-select form_officer_level" style="width:8ch;">
<option value="1">일반</option> <option value="1">일반</option>
<option value="4">태수</option> <option value="4">태수</option>
<option value="3">군사</option> <option value="3">군사</option>
@@ -297,49 +269,42 @@ var nation = <?=Json::encode($nation)?>;
<option value="11">참모</option> <option value="11">참모</option>
<option value="12">군주</option> <option value="12">군주</option>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">Level
<span class="input-group-text">Level</span>
</div> </div>
<input type="number" class="form-control form_exp_level" value="20" min="0" max="300" step="1"> <input type="number" class="form-control form_exp_level" value="20" min="0" max="300" step="1">
</div> </div>
<div class="input-group mb-1"> <div class="input-group mb-1">
<div class="input-group-prepend"> <div class="input-group-text">통솔
<span class="input-group-text">통솔</span>
</div> </div>
<input type="number" class="form-control form_leadership" value="50" min="1" max="300" step="1"> <input type="number" class="form-control form_leadership" value="50" min="1" max="300" step="1">
<div class="input-group-prepend"> <div class="input-group-text">무력
<span class="input-group-text">무력</span>
</div> </div>
<input type="number" class="form-control form_strength" value="50" min="1" max="300" step="1"> <input type="number" class="form-control form_strength" value="50" min="1" max="300" step="1">
<div class="input-group-prepend"> <div class="input-group-text">지력
<span class="input-group-text">지력</span>
</div> </div>
<input type="number" class="form-control form_intel" value="50" min="1" max="300" step="1"> <input type="number" class="form-control form_intel" value="50" min="1" max="300" step="1">
</div> </div>
<div class="input-group mb-1"> <div class="input-group mb-1">
<div class="input-group-prepend"> <div class="input-group-text">명마
<span class="input-group-text">명마</span>
</div> </div>
<select class="custom-select form_general_horse"> <select class="form-select form_general_horse">
<option value='None'>-</option> <option value='None'>-</option>
<?php foreach (GameConst::$allItems['horse'] as $horseID => $cnt) : ?> <?php foreach (GameConst::$allItems['horse'] as $horseID => $cnt) : ?>
<option value="<?= $horseID ?>"><?= getItemName($horseID) ?></option> <option value="<?= $horseID ?>"><?= getItemName($horseID) ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">무기
<span class="input-group-text">무기</span>
</div> </div>
<select class="custom-select form_general_weap"> <select class="form-select form_general_weap">
<option value='None'>-</option> <option value='None'>-</option>
<?php foreach (GameConst::$allItems['weapon'] as $weaponID => $cnt) : ?> <?php foreach (GameConst::$allItems['weapon'] as $weaponID => $cnt) : ?>
<option value="<?= $weaponID ?>"><?= getItemName($weaponID) ?></option> <option value="<?= $weaponID ?>"><?= getItemName($weaponID) ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">서적
<span class="input-group-text">서적</span>
</div> </div>
<select class="custom-select form_general_book"> <select class="form-select form_general_book">
<option value='None'>-</option> <option value='None'>-</option>
<?php foreach (GameConst::$allItems['book'] as $bookID => $cnt) : ?> <?php foreach (GameConst::$allItems['book'] as $bookID => $cnt) : ?>
<option value="<?= $bookID ?>"><?= getItemName($bookID) ?></option> <option value="<?= $bookID ?>"><?= getItemName($bookID) ?></option>
@@ -347,21 +312,17 @@ var nation = <?=Json::encode($nation)?>;
</select> </select>
</div> </div>
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-text">부상
<span class="input-group-text">부상</span>
</div> </div>
<input type="number" class="form-control form_injury" value="0" min="0" max="80" step="1"> <input type="number" class="form-control form_injury" value="0" min="0" max="80" step="1">
<div class="input-group-append"> <div class="input-group-text">%(<span class="injury_helptext">건강</span>)
<span class="input-group-text">%(<span class="injury_helptext">건강</span>)</span>
</div> </div>
<div class="input-group-prepend"> <div class="input-group-text">군량
<span class="input-group-text">군량</span>
</div> </div>
<input type="number" class="form-control form_rice" value="5000" min="50" max="40000" step="50"> <input type="number" class="form-control form_rice" value="5000" min="50" max="40000" step="50">
<div class="input-group-prepend"> <div class="input-group-text">도구
<span class="input-group-text">도구</span>
</div> </div>
<select class="custom-select form_general_item"> <select class="form-select form_general_item">
<option value='None'>-</option> <option value='None'>-</option>
<?php foreach (GameConst::$allItems['item'] as $itemID => $cnt) : ?> <?php foreach (GameConst::$allItems['item'] as $itemID => $cnt) : ?>
<option value="<?= $itemID ?>"><?= getItemName($itemID) ?></option> <option value="<?= $itemID ?>"><?= getItemName($itemID) ?></option>
@@ -369,93 +330,83 @@ var nation = <?=Json::encode($nation)?>;
</select> </select>
</div> </div>
<div class="input-group mb-1"> <div class="input-group mb-1">
<div class="input-group-prepend"> <div class="input-group-text">병종
<span class="input-group-text">병종</span>
</div> </div>
<select class="custom-select form_crewtype"> <select class="form-select form_crewtype">
<?php foreach (GameUnitConst::all() as $crewTypeID => $crewType) : ?> <?php foreach (GameUnitConst::all() as $crewTypeID => $crewType) : ?>
<?php if($crewType->armType === GameUnitConst::T_CASTLE){ continue; } ?> <?php if ($crewType->armType === GameUnitConst::T_CASTLE) {
continue;
} ?>
<option value="<?= $crewTypeID ?>"><?= $crewType->name ?></option> <option value="<?= $crewTypeID ?>"><?= $crewType->name ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">병사
<span class="input-group-text">병사</span>
</div> </div>
<input type="number" class="form-control form_crew" value="7000" min="100" step="100"> <input type="number" class="form-control form_crew" value="7000" min="100" step="100">
<div class="input-group-prepend"> <div class="input-group-text">성격
<span class="input-group-text">성격</span>
</div> </div>
<select class="custom-select form_general_character"> <select class="form-select form_general_character">
<?php foreach (getCharacterList(false) as $characterID => [$name, $info]) : ?> <?php foreach (getCharacterList(false) as $characterID => [$name, $info]) : ?>
<option value="<?= $characterID ?>"><?= $name ?></option> <option value="<?= $characterID ?>"><?= $name ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-text">훈련
<span class="input-group-text">훈련</span>
</div> </div>
<input type="number" class="form-control form_train" value="100" min="40" max="<?= GameConst::$maxTrainByWar ?>" step="1"> <input type="number" class="form-control form_train" value="100" min="40" max="<?= GameConst::$maxTrainByWar ?>" step="1">
<div class="input-group-prepend"> <div class="input-group-text">사기
<span class="input-group-text">사기</span>
</div> </div>
<input type="number" class="form-control form_atmos" value="100" min="40" max="<?= GameConst::$maxAtmosByWar ?>" step="1"> <input type="number" class="form-control form_atmos" value="100" min="40" max="<?= GameConst::$maxAtmosByWar ?>" step="1">
<div class="input-group-prepend"> <div class="input-group-text">전특
<span class="input-group-text">전특</span>
</div> </div>
<select class="custom-select form_general_special_war"> <select class="form-select form_general_special_war">
<?php foreach (SpecialityHelper::getSpecialWarList(false) as $specialWarID => $specialObj) : ?> <?php foreach (SpecialityHelper::getSpecialWarList(false) as $specialWarID => $specialObj) : ?>
<option value="<?= $specialWarID ?>"><?= $specialObj->getName() ?></option> <option value="<?= $specialWarID ?>"><?= $specialObj->getName() ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
<div class="input-group mb-1"> <div class="input-group mb-1">
<div class="input-group-prepend"> <div class="input-group-text">보병숙련
<span class="input-group-text">보병숙련</span>
</div> </div>
<select class="custom-select form_dex1"> <select class="form-select form_dex1">
<?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?> <?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?>
<option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option> <option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">궁병숙련
<span class="input-group-text">궁병숙련</span>
</div> </div>
<select class="custom-select form_dex2"> <select class="form-select form_dex2">
<?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?> <?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?>
<option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option> <option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">기병숙련
<span class="input-group-text">기병숙련</span>
</div> </div>
<select class="custom-select form_dex3"> <select class="form-select form_dex3">
<?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?> <?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?>
<option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option> <option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-text">귀병숙련
<span class="input-group-text">귀병숙련</span>
</div> </div>
<select class="custom-select form_dex4"> <select class="form-select form_dex4">
<?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?> <?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?>
<option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option> <option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend"> <div class="input-group-text">차병숙련
<span class="input-group-text">차병숙련</span>
</div> </div>
<select class="custom-select form_dex5"> <select class="form-select form_dex5">
<?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?> <?php foreach (getDexLevelList() as $dexLevel => [$dexAmount, $color, $name]) : ?>
<option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option> <option value="<?= $dexAmount ?>"><?= "{$name} (" . number_format($dexAmount) . ")" ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<div class="input-group-prepend only_defender"> <div class="input-group-text only_defender">수비여부
<span class="input-group-text">수비여부</span>
</div> </div>
<select class="custom-select form_defence_train only_defender"> <select class="form-select form_defence_train only_defender">
<option value="90">훈사 90</option> <option value="90">훈사 90</option>
<option value="80">훈사 80</option> <option value="80">훈사 80</option>
<option value="60">훈사 60</option> <option value="60">훈사 60</option>
@@ -464,16 +415,13 @@ var nation = <?=Json::encode($nation)?>;
</select> </select>
</div> </div>
<div class="input-group mb-1"> <div class="input-group mb-1">
<div class="input-group-prepend"> <div class="input-group-text">전투 수
<span class="input-group-text">전투 수</span>
</div> </div>
<input type="number" class="form-control form_warnum" value="0" step="1"> <input type="number" class="form-control form_warnum" value="0" step="1">
<div class="input-group-prepend"> <div class="input-group-text">승리 수
<span class="input-group-text">승리 수</span>
</div> </div>
<input type="number" class="form-control form_killnum" value="0" step="1"> <input type="number" class="form-control form_killnum" value="0" step="1">
<div class="input-group-prepend"> <div class="input-group-text">사살 수
<span class="input-group-text">사살 수</span>
</div> </div>
<input type="number" class="form-control form_killcrew" value="0" step="1"> <input type="number" class="form-control form_killcrew" value="0" step="1">
</div> </div>
@@ -489,15 +437,42 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
<table class="table"> <table class="table">
<tbody id="battle_result_summary"> <tbody id="battle_result_summary">
<tr><th style='width:18ch;'>전투 일시</th><td id='result_datetime'></td></tr> <tr>
<tr><th>전투 횟수</th><td id='result_warcnt'></td></tr> <th style='width:18ch;'>전투 일시</th>
<tr><th>전투 페이즈</th><td id='result_phase'></td></tr> <td id='result_datetime'></td>
<tr><th>준 피해</th><td><span id='result_killed'>0</span><span id='result_varKilled'> (<span id='result_minKilled'>0</span> ~ <span id='result_maxKilled'>0</span>)</span></td></tr> </tr>
<tr><th>받은 피해</th><td><span id='result_dead'>0</span><span id='result_varDead'> (<span id='result_minDead'>0</span> ~ <span id='result_maxDead'>0</span>)</span></td></tr> <tr>
<tr><th>출병자 군량 소모</th><td id='result_attackerRice'></td></tr> <th>전투 횟수</th>
<tr><th>수비자 군량 소모</th><td id='result_defenderRice'></td></tr> <td id='result_warcnt'></td>
<tr><th>공격자 스킬</th><td id='result_attackerSkills'></td></tr> </tr>
<tr class='result_defenderSkills'><th>수비자1 스킬</th><td></td></tr> <tr>
<th>전투 페이즈</th>
<td id='result_phase'></td>
</tr>
<tr>
<th>준 피해</th>
<td><span id='result_killed'>0</span><span id='result_varKilled'> (<span id='result_minKilled'>0</span> ~ <span id='result_maxKilled'>0</span>)</span></td>
</tr>
<tr>
<th>받은 피해</th>
<td><span id='result_dead'>0</span><span id='result_varDead'> (<span id='result_minDead'>0</span> ~ <span id='result_maxDead'>0</span>)</span></td>
</tr>
<tr>
<th>출병자 군량 소모</th>
<td id='result_attackerRice'></td>
</tr>
<tr>
<th>수비자 군량 소모</th>
<td id='result_defenderRice'></td>
</tr>
<tr>
<th>공격자 스킬</th>
<td id='result_attackerSkills'></td>
</tr>
<tr class='result_defenderSkills'>
<th>수비자1 스킬</th>
<td></td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
@@ -529,7 +504,7 @@ var nation = <?=Json::encode($nation)?>;
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">장수 목록</h5> <h5 class="modal-title">장수 목록</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
@@ -539,10 +514,11 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary" id='importFromDB'>가져오기</button> <button type="button" class="btn btn-primary" id='importFromDB'>가져오기</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
+14 -6
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -6,8 +7,8 @@ include "func.php";
// $btn, $msg, $scoutmsg, $rate, $bill, $secretlimit // $btn, $msg, $scoutmsg, $rate, $bill, $secretlimit
$btn = Util::getPost('btn'); $btn = Util::getPost('btn');
$msg = Util::getPost('msg'); //$msg = Util::getPost('msg');
$scoutmsg = Util::getPost('scoutMsg'); //$scoutmsg = Util::getPost('scoutMsg');
$rate = Util::getPost('rate', 'int'); $rate = Util::getPost('rate', 'int');
$bill = Util::getPost('bill', 'int'); $bill = Util::getPost('bill', 'int');
$secretlimit = Util::getPost('secretlimit', 'int'); $secretlimit = Util::getPost('secretlimit', 'int');
@@ -25,8 +26,7 @@ $permission = checkSecretPermission($me);
if ($permission < 0) { if ($permission < 0) {
header('location:b_myBossInfo.php', true, 303); header('location:b_myBossInfo.php', true, 303);
exit(); exit();
} } else if ($me['officer_level'] < 5 && $permission != 4) {
else if ($me['officer_level'] < 5 && $permission != 4) {
header('location:b_myBossInfo.php', true, 303); header('location:b_myBossInfo.php', true, 303);
exit(); exit();
} }
@@ -34,14 +34,14 @@ else if ($me['officer_level'] < 5 && $permission != 4) {
$nationID = $me['nation']; $nationID = $me['nation'];
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env'); $nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
if($btn == "국가방침 수정") { /*if ($btn == "국가방침 수정") {
$msg = mb_substr($msg, 0, 16384); $msg = mb_substr($msg, 0, 16384);
//$msg = StringUtil:: //$msg = StringUtil::
$nationStor->notice = WebUtil::htmlPurify($msg); $nationStor->notice = WebUtil::htmlPurify($msg);
} elseif ($btn == "임관 권유문 수정") { } elseif ($btn == "임관 권유문 수정") {
$scoutmsg = mb_substr($scoutmsg, 0, 1000); $scoutmsg = mb_substr($scoutmsg, 0, 1000);
$nationStor->scout_msg = WebUtil::htmlPurify($scoutmsg); $nationStor->scout_msg = WebUtil::htmlPurify($scoutmsg);
} elseif($btn == "세율") { } else*/if ($btn == "세율") {
$rate = Util::valueFit($rate, 5, 30); $rate = Util::valueFit($rate, 5, 30);
$db->update('nation', [ $db->update('nation', [
'rate' => $rate, 'rate' => $rate,
@@ -65,13 +65,21 @@ if($btn == "국가방침 수정") {
'scout' => 0 'scout' => 0
], 'nation=%i', $nationID); ], 'nation=%i', $nationID);
} elseif ($btn == "전쟁 금지") { } elseif ($btn == "전쟁 금지") {
$avilableCnt = $nationStor->getValue('available_war_setting_cnt') ?? 0;
if ($avilableCnt > 0) {
$db->update('nation', [ $db->update('nation', [
'war' => 1 'war' => 1
], 'nation=%i', $nationID); ], 'nation=%i', $nationID);
$nationStor->setValue('available_war_setting_cnt', $avilableCnt - 1);
}
} elseif ($btn == "전쟁 허가") { } elseif ($btn == "전쟁 허가") {
$avilableCnt = $nationStor->getValue('available_war_setting_cnt') ?? 0;
if ($avilableCnt > 0) {
$db->update('nation', [ $db->update('nation', [
'war' => 0 'war' => 0
], 'nation=%i', $nationID); ], 'nation=%i', $nationID);
$nationStor->setValue('available_war_setting_cnt', $avilableCnt - 1);
}
} }
header('location:b_dipcenter.php'); header('location:b_dipcenter.php');
+1 -1
View File
@@ -202,7 +202,7 @@ if($btn == "자동개최설정") {
$gameStor->tournament = 2; $gameStor->tournament = 2;
$gameStor->phase = 0; $gameStor->phase = 0;
} elseif($btn == "무명전부투입") { } elseif($btn == "무명전부투입") {
fillLowGenAll(); fillLowGenAll($admin['tnmt_type']);
} elseif($btn == "예선") { } elseif($btn == "예선") {
qualify($admin['tnmt_type'], $admin['tournament'], $admin['phase']); qualify($admin['tnmt_type'], $admin['tournament'], $admin['phase']);
} elseif($btn == "예선전부") { } elseif($btn == "예선전부") {
+2 -2
View File
@@ -6,12 +6,12 @@
} }
.defender_add_form .general_detail{ .defender_add_form .general_detail{
display:none; display:none !important;
} }
.form_sample{ .form_sample{
display:none; display:none !important;
} }
input[type=number]{ input[type=number]{
+5 -5
View File
@@ -11,7 +11,7 @@
width:50px; width:50px;
color:white; color:white;
background-color:black; background-color:black;
font-size:13px; font-size:14px;
} }
.chiefTurnIdx{ .chiefTurnIdx{
@@ -42,20 +42,20 @@
} }
.chiefTurnBox .turnHeader{ .chiefTurnBox .turnHeader{
font-weight: bold; font-weight: 500;
text-align: center; text-align: center;
} }
.chiefNamePlate{ .chiefNamePlate{
border-top:solid 0.67px #888888; border-top:solid 0.67px #888888;
font-weight: bold; font-weight: 500;
text-align: center; text-align: center;
flex-grow: 1; flex-grow: 1;
line-height:21px; line-height:21px;
} }
.turnIdxHeader{ .turnIdxHeader{
font-weight: bold; font-weight: 500;
text-align: center; text-align: center;
width:20px; width:20px;
} }
@@ -63,7 +63,7 @@
.chiefTurnTime{ .chiefTurnTime{
border-top:solid 0.67px #888888; border-top:solid 0.67px #888888;
border-right:solid 0.67px #888888; border-right:solid 0.67px #888888;
font-weight: bold; font-weight: 500;
background: black; background: black;
text-align: center; text-align: center;
width:44px; width:44px;
+5 -36
View File
@@ -1,36 +1,18 @@
@charset "UTF-8";
/* font-boostring Block */
html * { html * {
max-height: 1000000px; max-height: 1000000px;
} }
html, html,
body { body {
font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic';
background-color: black; background-color: black;
color: white; color: white;
line-height: 1.3; line-height: 1.3;
font-family: '맑은 고딕'; font-size: 14px;
font-size: 13px;
}
table {
font-family: '맑은 고딕';
}
font {
font-family: '맑은 고딕';
} }
input { input {
font-family: '맑은 고딕'; font-size: 14px;
font-size: 13px;
}
select {
font-family: '굴림';
line-height: 100%;
} }
.center { .center {
@@ -53,9 +35,8 @@ table.mimic_flex {
table.tb_layout { table.tb_layout {
border-collapse: collapse; border-collapse: collapse;
padding: 0px; padding: 0px;
font-size: 13px; font-size: 14px;
word-break: break-all; word-break: break-all;
font-family: '맑은 고딕';
} }
.tb_layout td, .tb_layout td,
@@ -63,8 +44,6 @@ table.tb_layout {
border: solid 1px gray; border: solid 1px gray;
padding: 0px; padding: 0px;
word-break: break-all; word-break: break-all;
font-family: '맑은 고딕';
;
} }
div.bar_out { div.bar_out {
@@ -206,8 +185,7 @@ div.bar_out div.bar_in {
} }
.tooltip { .tooltip {
font-size: 12px; font-size: 12.5px;
font-family: '맑은 고딕';
} }
.tooltip_copyable_info .tooltiptext { .tooltip_copyable_info .tooltiptext {
@@ -249,11 +227,6 @@ div.bar_out div.bar_in {
padding: 0; padding: 0;
} }
.commandBasic {
background-color: black;
color: white;
}
.compensatePositive { .compensatePositive {
color: skyblue; color: skyblue;
} }
@@ -262,10 +235,6 @@ div.bar_out div.bar_in {
color: orange; color: orange;
} }
.compensateNeutral {
color: white;
}
.commandBasic.commandImpossible { .commandBasic.commandImpossible {
background-color: red; background-color: red;
color: white; color: white;
+1 -1
View File
@@ -4,7 +4,7 @@
width:1100px; width:1100px;
margin:auto; margin:auto;
position:relative; position:relative;
font-size:13px; font-size:14px;
} }
.rankView h3{ .rankView h3{
+3 -1
View File
@@ -1,2 +1,4 @@
@charset "UTF-8";
.form-group{
margin-bottom: 1em;
}
-100
View File
@@ -1,100 +0,0 @@
@charset "UTF-8";
body {
color:white;
background-color:black;
border-width:1px;
border-color:gray; background-position:center; background-repeat:repeat-y;
}
#container {
width:1000px;
margin: 0 auto;
}
.buttonPlate{
width:1000px;
height:60px;
}
.toolbarButton {
float:left;
background-color:#225500;
color:white;
width:125px;
height:30px;
font-weight:bold;
font-size:13px;
margin:0;
display:block;
}
.commandButton {
float:left;
width:100px;
height:30px;
font-weight:bold;
font-size:13px;
margin:0;
display:block;
}
.commandButton:disabled::before{
content:'【'
}
.commandButton:disabled::after{
content:'】'
}
.commandButton:disabled{
background-color:transparent !important;
color:gray !important;
border-color:transparent !important;
}
.toolbarButton2 {
float:left;
background-color:#225500;
color:magenta;
width:125px;
height:30px;
font-weight:bold;
font-size:13px;
margin:0;
display:block;
}
.nation_info td{
height:18px;
}
#generalTurnSelector{
width:50px;
color:white;
background-color:black;
font-size:13px;
}
#sidebar{
position:fixed;
right:0;
top: 50%;
transform: translateY(-50%);
}
#sidebar button{
/*width:100px;*/
}
.turn_pad{
white-space:nowrap;
font-weight:lighter;
max-width: 162px;
width: 162px;
}
.turn_pad .turn_text{
display:inline-block;
}
+10 -3
View File
@@ -3,8 +3,9 @@
.world_map{ .world_map{
width:700px; width:700px;
background:black; background:black;
font-size:13px; font-size:14px;
color:white; color:white;
position: relative;
} }
.map_title{ .map_title{
@@ -25,7 +26,7 @@
width:160px; width:160px;
display:block; display:block;
line-height:20px; line-height:20px;
font-size:13px; font-size:14px;
font-weight:bold; font-weight:bold;
} }
@@ -33,6 +34,7 @@
width:700px; width:700px;
height:500px; height:500px;
position:relative; position:relative;
overflow: hidden;
} }
.map_body .map_bglayer1{ .map_body .map_bglayer1{
@@ -88,7 +90,7 @@
.world_map .city_tooltip{ .world_map .city_tooltip{
position: absolute; position: absolute;
z-index:6; z-index:16;
display:none; display:none;
min-width:120px; min-width:120px;
border: 0.02em gray solid; border: 0.02em gray solid;
@@ -492,3 +494,8 @@
.map_basic .city_base .city_state.city_state_good{ .map_basic .city_base .city_state.city_state_good{
background-color:blue; background-color:blue;
} }
.btn.btn-minimum{
padding-top: 1px;
padding-bottom: 1px;
}
-202
View File
@@ -1,202 +0,0 @@
@charset "UTF-8";
/*임시용 */
#container{
width:1000px;
margin:auto;
font-size:13px;
}
/*임시용 끝*/
#message_board{
height:1370px;
position:relative;
}
#message_board section{
overflow-y:auto;
overflow-x:hidden;
}
.msg_plate{
width:100%;
outline-style:solid;
outline-width:1px;
outline-color: gray;
min-height:64px;
font-size:12px;
word-break:break-all;
color:white;
}
.msg_plate_private{
background-color:#5d1e1a;
}
.msg_plate_private.msg_plate_dest{
background-color:#5d461a;
}
.msg_plate_public{
background-color:#141c65;
}
.msg_plate_national, .msg_plate_diplomacy{
background-color:#00582c;
}
.msg_plate_national.msg_plate_dest, .msg_plate_diplomacy.msg_plate_dest {
background-color:#704615;
}
.msg_plate_national.msg_plate_src, .msg_plate_diplomacy.msg_plate_src {
background-color:#70153b;
}
.public_message{
height:667px;
}
.diplomacy_message{
flex: 1;
}
.national_message{
height:667px;
}
.private_message{
flex: 1;
}
.msg_icon{
float:left;
width:64px;
height:64px;
border-right:solid 1px gray;
}
.msg_time{
font-size:0.75em;
font-weight:normal;
}
.msg_header{
font-weight: bold;
margin-bottom:3px;
color:white;
position: relative;
}
.message_input_form{
position:relative;
}
#msg_input{
color:white;
background-color:black;
font-size:12px;
width:715px;
margin:0 2px;
height:20px;
border:solid 1px gray;
}
#msg_submit{
position:absolute;
right:0;
margin-right:2px;
}
#mailbox_list{
float:left;
color:white;
background-color:black;
font-size:12px;
width:160px;
height:20px;
}
.board_header{
color:white;
outline-style:solid;
outline-width:1px;
outline-color: gray;
}
.board_side{
position:absolute;
height:1370px;
width:50%;
overflow-y: hidden;
outline-style:solid;
outline-width:1px;
outline-color: gray;
display: flex;
flex-wrap: wrap;
flex-direction: column;
}
.board_side > div{
height: 1.2em;
}
.msg_invalid{
color:rgba(255,255,255,0.5);
}
.msg_body{
padding-left:64px;
}
.msg_target{
margin:2px 2px 0 2px;
padding:2px 3px;
display:inline-block;
box-shadow: 2px 2px black;
border-radius: 3px;
}
.btn-delete-msg{
position: absolute;
right: 0;
top: 0;
margin:2px 2px 0 2px;
font-size:8px;
}
/*
.public_message .msg_target{
box-shadow: 2px 2px darkslategrey;
}
*/
.msg_target.msg_bright{
color:black;
}
.msg_target.msg_dark{
color:white;
}
.msg_from_to{
display:inline-block;
}
.msg_content{
margin-left:10px;
margin-right:5px;
overflow:hidden;
}
.msg_prompt{
text-align:right;
margin-top:5px;
margin-right:5px;
}
#mailbox_list option{
color:white;
background-color:black;
}
+1 -5
View File
@@ -1,5 +1,4 @@
<div class="buttonPlate bg1"> <div class="buttonPlate">
<div>
<a href="a_status.php" target="_blank" class="open-window"><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_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_genList.php" target="_blank" class="open-window"><button type="button" class="toolbarButton">장수일람</button></a>
@@ -8,8 +7,6 @@
<a href="a_hallOfFame.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_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> <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> <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/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/news" target="_blank"><button type="button" class="toolbarButton">삼국 일보</button></a>
@@ -19,4 +16,3 @@
<a href="battle_simulator.php" 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> <a href="<?=$site?>" target="_blank" class="open-window"><button type="button" class="toolbarButton"><?=$call?></button></a>
</div> </div>
</div>
+97 -25
View File
@@ -218,9 +218,9 @@ function myNationInfo(General $generalObj)
<td colspan=4 "; <td colspan=4 ";
if (!$nationID) { if (!$nationID) {
echo "style='color:white;background-color:000000;font-weight:bold;font-size:13px;text-align:center;'>【재 야】"; echo "style='color:white;background-color:000000;font-weight:bold;font-size:14px;text-align:center;'>【재 야】";
} else { } else {
echo "style='color:" . newColor($nation['color']) . ";background-color:{$nation['color']};font-weight:bold;font-size:13px;text-align:center'>국가【 {$nation['name']}"; echo "style='color:" . newColor($nation['color']) . ";background-color:{$nation['color']};font-weight:bold;font-size:14px;text-align:center'>국가【 {$nation['name']}";
} }
echo " echo "
@@ -461,6 +461,40 @@ function commandGroup($typename, $type = 0)
} }
} }
function getCommandTable(General $general)
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$gameStor->turnOnCache();
$env = $gameStor->getAll();
$result = [];
foreach (GameConst::$availableGeneralCommand as $commandCategory => $commandList) {
$subList = [];
foreach ($commandList as $commandClassName) {
$commandObj = buildGeneralCommandClass($commandClassName, $general, $env);
if (!$commandObj->canDisplay()) {
continue;
}
$subList[] = [
'value' => Util::getClassNameFromObj($commandObj),
'compensation' => $commandObj->getCompensationStyle(),
'possible' => $commandObj->hasMinConditionMet(),
'title' => $commandObj->getCommandDetailTitle(),
'simpleName' => $commandObj->getName(),
'reqArg' => $commandObj::$reqArg,
];
}
$result[] = [
'category' => $commandCategory,
'values' => $subList
];
}
return $result;
}
function printCommandTable(General $generalObj) function printCommandTable(General $generalObj)
{ {
$db = DB::db(); $db = DB::db();
@@ -519,7 +553,7 @@ function chiefCommandTable(General $generalObj)
$env = $gameStor->getAll(); $env = $gameStor->getAll();
?> ?>
<select id='chiefCommandList' name='commandtype' size=1 style='height:20px;color:white;background-color:black;font-size:13px;display:inline-block;'>"; <select id='chiefCommandList' name='commandtype' size=1 style='height:20px;color:white;background-color:black;font-size:14px;display:inline-block;'>";
<?php <?php
//보정(Pros,Cons) 여부. //보정(Pros,Cons) 여부.
@@ -686,7 +720,7 @@ function generalInfo(General $generalObj)
echo "<table width=498 class='tb_layout bg2'> echo "<table width=498 class='tb_layout bg2'>
<tr> <tr>
<td width=64 height=64 rowspan=3 class='generalIcon' style='text-align:center;background:no-repeat center url(\"{$imagePath}\");background-size:64px;'>&nbsp;</td> <td width=64 height=64 rowspan=3 class='generalIcon' style='text-align:center;background:no-repeat center url(\"{$imagePath}\");background-size:64px;'>&nbsp;</td>
<td colspan=9 height=16 style=text-align:center;color:" . newColor($nation['color']) . ";background-color:{$nation['color']};font-weight:bold;font-size:13px;>{$generalObj->getName()} 【 {$officerLevelText} | {$call} | {$color}{$injury}</span> 】 " . $generalObj->getTurnTime($generalObj::TURNTIME_HMS) . "</td> <td colspan=9 height=16 style=text-align:center;color:" . newColor($nation['color']) . ";background-color:{$nation['color']};font-weight:bold;font-size:14px;>{$generalObj->getName()} 【 {$officerLevelText} | {$call} | {$color}{$injury}</span> 】 " . $generalObj->getTurnTime($generalObj::TURNTIME_HMS) . "</td>
</tr> </tr>
<tr height=16> <tr height=16>
<td style='text-align:center;' class='bg1'><b>통솔</b></td> <td style='text-align:center;' class='bg1'><b>통솔</b></td>
@@ -848,7 +882,7 @@ function generalInfo2(General $generalObj)
<td style='text-align:center;'>{$generalObj->getRankVar('deathcrew')}</td> <td style='text-align:center;'>{$generalObj->getRankVar('deathcrew')}</td>
</tr> </tr>
</table> </table>
<table width=498 class='tb_layout bg2'> <table width=498 class='tb_layout bg2 f_tnum'>
<tr><td style='text-align:center;' colspan=4 class='bg1'><b>숙 련 도</b></td></tr> <tr><td style='text-align:center;' colspan=4 class='bg1'><b>숙 련 도</b></td></tr>
<tr height=16> <tr height=16>
<td width=64 style='text-align:center;' class='bg1'><b>보병</b></td> <td width=64 style='text-align:center;' class='bg1'><b>보병</b></td>
@@ -1348,17 +1382,29 @@ function triggerTournament()
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $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%확률 //현재 토너먼트 없고, 자동개시 걸려있을때, 40%확률
if ($admin['tournament'] == 0 && $admin['tnmt_trig'] > 0 && rand() % 100 < 40) { if ($tournament != 0) {
$type = rand() % 5; // 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전 return;
}
if ($tnmt_trig == 0) {
return;
}
if (!Util::randBool(0.4)) {
return;
}
if (!$tnmt_pattern) {
// 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전
//전력전 40%, 통, 일, 설 각 20% //전력전 40%, 통, 일, 설 각 20%
if ($type > 3) { $tnmt_pattern = [0, 0, 1, 2, 3];
$type = 0; shuffle($tnmt_pattern);
}
startTournament($admin['tnmt_trig'], $type);
} }
$tnmt_type = array_pop($tnmt_pattern);
$gameStor->setValue('tnmt_pattern', $tnmt_pattern);
startTournament($tnmt_trig, $tnmt_type);
} }
function CheckHall($no) function CheckHall($no)
@@ -1603,9 +1649,19 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool
return false; return false;
} }
if ($general->getAuxVar('inheritRandomUnique')) { if ($general->getAuxVar('inheritRandomUnique')) {
$gameStor = KVStorage::getStorage($db, 'game_env');
[$year, $month, $initYear, $initMonth] = $gameStor->getValuesAsArray(['year', 'month', 'init_year', 'init_month']);
$relMonthByInit = Util::joinYearMonth($year, $month) - Util::joinYearMonth($initYear, $initMonth);
$availableBuyUnique = $relMonthByInit >= GameConst::$minMonthToAllowInheritItem;
if($availableBuyUnique){
$general->setAuxVar('inheritRandomUnique', null); $general->setAuxVar('inheritRandomUnique', null);
} }
}
[$itemType, $itemCode] = Util::choiceRandomUsingWeightPair($availableUnique); [$itemType, $itemCode] = Util::choiceRandomUsingWeightPair($availableUnique);
@@ -1840,21 +1896,30 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
return false; return false;
} }
$inheritUnique = $general->getAuxVar('inheritUniqueTrial'); $itemTypeCnt = count(GameConst::$allItems);
if ($acquireType != '설문조사' && $inheritUnique && count($inheritUnique)) {
LogText("유니크 준비?? {$general->getID()}", $inheritUnique);
$trialResult = tryInheritUniqueItem($general, $acquireType); [$startYear, $year, $month, $initYear, $initMonth] = $gameStor->getValuesAsArray(['startyear', 'year', 'month', 'init_year', 'init_month']);
if ($trialResult) { $relYear = $year - $startYear;
return true; $maxTrialCountByYear = 1;
foreach (GameConst::$maxUniqueItemLimit as $tmpVals) {
[$targetYear, $targetTrialCnt] = $tmpVals;
if ($relYear < $targetYear) {
break;
} }
$maxTrialCountByYear = $targetTrialCnt;
} }
$itemTypeCnt = count(GameConst::$allItems); $trialCnt = Util::valueFit($itemTypeCnt, null, $maxTrialCountByYear);
$trialCnt = $itemTypeCnt; $maxCnt = $itemTypeCnt;
$relMonthByInit = Util::joinYearMonth($year, $month) - Util::joinYearMonth($initYear, $initMonth);
$availableBuyUnique = $relMonthByInit >= GameConst::$minMonthToAllowInheritItem;
foreach ($general->getItems() as $item) { foreach ($general->getItems() as $item) {
if (!$item->isBuyable()) { if (!$item->isBuyable()) {
$trialCnt -= 1; $trialCnt -= 1;
$maxCnt -= 1;
} }
} }
@@ -1866,10 +1931,17 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
$userLogger = new UserLogger($general->getVar('owner')); $userLogger = new UserLogger($general->getVar('owner'));
$userLogger->push(sprintf("유니크를 얻을 공간이 없어 %d 포인트 반환", GameConst::$inheritItemRandomPoint), "inheritPoint"); $userLogger->push(sprintf("유니크를 얻을 공간이 없어 %d 포인트 반환", GameConst::$inheritItemRandomPoint), "inheritPoint");
} }
tryRollbackInheritUniqueItem($general);
return false; return false;
} }
$inheritUnique = $general->getAuxVar('inheritUniqueTrial');
if ($acquireType != '설문조사' && $inheritUnique && count($inheritUnique) && $availableBuyUnique) {
$trialResult = tryInheritUniqueItem($general, $acquireType);
if ($trialResult) {
return true;
}
}
$scenario = $gameStor->scenario; $scenario = $gameStor->scenario;
$genCount = $db->queryFirstField('SELECT count(*) FROM general WHERE npc<2'); $genCount = $db->queryFirstField('SELECT count(*) FROM general WHERE npc<2');
@@ -1894,12 +1966,12 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
$prob /= sqrt(2); $prob /= sqrt(2);
$moreProb = pow(2, 1 / 4); $moreProb = pow(2, 1 / 4);
if ($general->getAuxVar('inheritRandomUnique')) { if ($general->getAuxVar('inheritRandomUnique') && $availableBuyUnique) {
//포인트로 랜덤 유니크 획득 //포인트로 랜덤 유니크 획득
$prob = 1; $prob = 1;
} }
foreach (Util::range($trialCnt) as $_idx) { foreach (Util::range($maxCnt) as $_idx) {
if (Util::randBool($prob)) { if (Util::randBool($prob)) {
$result = true; $result = true;
break; break;
@@ -1907,10 +1979,10 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
$prob *= $moreProb; $prob *= $moreProb;
} }
if (!$result) { if (!$result) {
LogText("{$general->getName()}, {$general->getID()} 유니크 실패 {$trialCnt}", $prob); LogText("{$general->getName()}, {$general->getID()} 유니크 실패 {$maxCnt}", $prob);
return false; return false;
} }
LogText("{$general->getName()}, {$general->getID()} 유니크 성공 {$trialCnt}", $prob); LogText("{$general->getName()}, {$general->getID()} 유니크 성공 {$maxCnt}", $prob);
return giveRandomUniqueItem($general, $acquireType); return giveRandomUniqueItem($general, $acquireType);
} }
+45 -9
View File
@@ -167,7 +167,8 @@ function checkSupply()
} }
} }
function updateGeneralNumber(){ function updateGeneralNumber()
{
$db = DB::db(); $db = DB::db();
foreach ($db->queryAllLists('SELECT nation, count(*) FROM general WHERE npc != 5 GROUP BY nation') as [$nationID, $gennum]) { foreach ($db->queryAllLists('SELECT nation, count(*) FROM general WHERE npc != 5 GROUP BY nation') as [$nationID, $gennum]) {
if ($nationID === 0) { if ($nationID === 0) {
@@ -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 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 ) 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.`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(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(sum(experience+dedication)/100) from general where nation=A.nation)
+(select round(avg(connect)) from general where nation=A.nation) +(select round(avg(connect)) from general where nation=A.nation)
@@ -435,8 +440,7 @@ function postUpdateMonthly()
foreach ($db->queryAllLists('SELECT me,you FROM diplomacy WHERE state=0 AND term <= 1 ORDER BY me desc, you desc') as [$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) { if ($me < $you) {
$key = "{$me}_{$you}"; $key = "{$me}_{$you}";
} } else {
else{
$key = "{$you}_{$me}"; $key = "{$you}_{$me}";
} }
if (!key_exists($key, $stopWarList)) { if (!key_exists($key, $stopWarList)) {
@@ -477,6 +481,21 @@ function postUpdateMonthly()
'term' => 6, 'term' => 6,
], 'state = 1 AND term = 0'); ], 'state = 1 AND term = 0');
$availableWarSettingCnt = KVStorage::getValuesFromInterNamespace($db, 'nation_env', 'available_war_setting_cnt');
foreach ($nations as $nation) {
$nationID = $nation['nation'];
if(!key_exists($nationID, $availableWarSettingCnt)){
$availableWarSettingCnt[$nationID] = 0;
}
}
foreach($availableWarSettingCnt as $nationID=>$cnt){
if($cnt >= GameConst::$maxAvailableWarSettingCnt){
continue;
}
$cnt = Util::valueFit($cnt + GameConst::$incAvailableWarSettingCnt, 0, GameConst::$maxAvailableWarSettingCnt);
(KVStorage::getStorage($db, $nationID, 'nation_env'))->setValue('available_war_setting_cnt', $cnt);
}
//초반이후 방랑군 자동 해체 //초반이후 방랑군 자동 해체
if ($admin['year'] >= $admin['startyear'] + 2) { if ($admin['year'] >= $admin['startyear'] + 2) {
checkWander(); checkWander();
@@ -627,11 +646,22 @@ function updateNationState()
$chiefID = null; $chiefID = null;
$uniqueLotteryWeightList = []; $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) { foreach ($nationGenList as $nationGen) {
if ($nationGen->getVar('officer_level') == 12) { if ($nationGen->getVar('officer_level') == 12) {
$chiefID = $nationGen->getID(); $chiefID = $nationGen->getID();
} }
$trialCnt = count(GameConst::$allItems); $trialCnt = min($maxTrialCountByYear, count(GameConst::$allItems));
foreach ($nationGen->getItems() as $item) { foreach ($nationGen->getItems() as $item) {
if (!$item->isBuyable()) { if (!$item->isBuyable()) {
@@ -992,13 +1022,15 @@ function checkEmperior()
$nationLogger = new ActionLogger(0, $nationID, $admin['year'], $admin['month']); $nationLogger = new ActionLogger(0, $nationID, $admin['year'], $admin['month']);
$nationLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaYi} 전토를 통일"); $nationLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaYi} 전토를 통일");
foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){ foreach (General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc < 2')) as $genObj) {
if ($genObj->getNationID() == $nationID) { if ($genObj->getNationID() == $nationID) {
if ($genObj->getVar('officer_level') > 4) { if ($genObj->getVar('officer_level') > 4) {
$genObj->increaseInheritancePoint('unifier', 2000); $genObj->increaseInheritancePoint('unifier', 2000);
}; };
} }
$genObj->mergeTotalInheritancePoint(); $genObj->mergeTotalInheritancePoint(true);
applyInheritanceUser($genObj->getVar('owner'));
$genObj->clearInheritancePoint();
} }
$gameStor->isunited = 2; $gameStor->isunited = 2;
@@ -1152,7 +1184,10 @@ function checkEmperior()
LogHistory(); LogHistory();
} }
function resetInheritanceUser(int $userID, bool $isRebirth=false):float{ function applyInheritanceUser(int $userID, bool $isRebirth = false): float
{
//FIXME: 은퇴, 사망, 천통 시점에 바로 반영한다면 여기가 아니라 general class로 이동하는 것이 옳음
//또한 굳이 merge, apply, clean 3단계를 거쳐야 할 이유도 없음
$rebirthDegraded = [ $rebirthDegraded = [
'dex' => 0.5, 'dex' => 0.5,
]; ];
@@ -1190,7 +1225,8 @@ function resetInheritanceUser(int $userID, bool $isRebirth=false):float{
return $totalPoint; return $totalPoint;
} }
function updateMaxDomesticCritical(General $general, $score){ function updateMaxDomesticCritical(General $general, $score)
{
$maxDomesticCritical = $general->getAuxVar('max_domestic_critical') ?? 0; $maxDomesticCritical = $general->getAuxVar('max_domestic_critical') ?? 0;
$maxDomesticCritical += $score / 2; $maxDomesticCritical += $score / 2;
$general->setAuxVar('max_domestic_critical', $maxDomesticCritical); $general->setAuxVar('max_domestic_critical', $maxDomesticCritical);
-11
View File
@@ -77,12 +77,6 @@ function pushProcessLog($log) {
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_processlog.txt", $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) { function pushLockLog($log) {
$date = date('Y_m_d'); $date = date('Y_m_d');
pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_locklog.txt", $log); pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_locklog.txt", $log);
@@ -378,8 +372,6 @@ function getGlobalActionLogWithDate(int $year, int $month):array {
} }
function LogHistory($isFirst=0) { function LogHistory($isFirst=0) {
if(STEP_LOG) pushStepLog(TimeUtil::now().', LogHistory Start');
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
$obj = $gameStor->getValues(['startyear', 'year', 'month']); $obj = $gameStor->getValues(['startyear', 'year', 'month']);
@@ -426,8 +418,6 @@ function LogHistory($isFirst=0) {
return -($lhs['power']<=>$rhs['power']); return -($lhs['power']<=>$rhs['power']);
}); });
if(STEP_LOG) pushStepLog(TimeUtil::now().', contents collected');
$db->insert('ng_history', [ $db->insert('ng_history', [
'server_id' => UniqueConst::$serverID, 'server_id' => UniqueConst::$serverID,
'year' => $year, 'year' => $year,
@@ -438,6 +428,5 @@ function LogHistory($isFirst=0) {
'nations' => Json::encode($nations), 'nations' => Json::encode($nations),
]); ]);
if(STEP_LOG) pushStepLog(TimeUtil::now().', LogHistory Finish');
return true; return true;
} }
+51 -28
View File
@@ -1,33 +1,47 @@
<?php <?php
namespace sammo; namespace sammo;
function printLimitMsg($turntime) { function printLimitMsg($turntime)
{
//FIXME: template로 이동. //FIXME: template로 이동.
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>접속제한</title> <title>접속제한</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
<font size=4><b> <font size=4><b>
접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 접속 가능 시각 : <?= $turntime ?>)<br> 접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 접속 가능 시각 : <?= $turntime ?>)<br>
(자신의 턴이 되면 다시 접속 가능합니다. 당신의 건강을 위해 잠시 쉬어보시는 것은 어떨까요? ^^)<br> (자신의 턴이 되면 다시 접속 가능합니다. 당신의 건강을 위해 잠시 쉬어보시는 것은 어떨까요? ^^)<br>
</b></font> </b></font>
</body> </body>
</html> </html>
<?php <?php
} }
function bar($per, $h=7) { function bar($per, $h = 7)
if($h == 7) { $bd = 0; $h = 7; $h2 = 5; } {
else { $bd = 1; $h = 12; $h2 = 8; } if ($h == 7) {
$bd = 0;
$h = 7;
$h2 = 5;
} else {
$bd = 1;
$h = 12;
$h2 = 8;
}
$per = round($per, 1); $per = round($per, 1);
@@ -39,7 +53,8 @@ function bar($per, $h=7) {
} }
function optionsForCities(callable $infoCall=null) { function optionsForCities(callable $infoCall = null)
{
if (!$infoCall) { if (!$infoCall) {
return join('', array_map(function ($city) { return join('', array_map(function ($city) {
@@ -61,7 +76,8 @@ function optionsForCities(callable $infoCall=null) {
return join('', array_merge($infoList, $noInfoList)); return join('', array_merge($infoList, $noInfoList));
} }
function Submit($url, $msg="", $msg2="") { function Submit($url, $msg = "", $msg2 = "")
{
echo "a"; // 파폭 버그 때문 echo "a"; // 파폭 버그 때문
echo " echo "
<form method=post name=f1 action='{$url}'> <form method=post name=f1 action='{$url}'>
@@ -73,35 +89,36 @@ function Submit($url, $msg="", $msg2="") {
} }
function GetNationColors() { function GetNationColors()
$colors = array("#FF0000", "#800000", "#A0522D", "#FF6347", "#FFA500", "#FFDAB9", "#FFD700", "#FFFF00", {
$colors = array(
"#FF0000", "#800000", "#A0522D", "#FF6347", "#FFA500", "#FFDAB9", "#FFD700", "#FFFF00",
"#7CFC00", "#00FF00", "#808000", "#008000", "#2E8B57", "#008080", "#20B2AA", "#6495ED", "#7FFFD4", "#7CFC00", "#00FF00", "#808000", "#008000", "#2E8B57", "#008080", "#20B2AA", "#6495ED", "#7FFFD4",
"#AFEEEE", "#87CEEB", "#00FFFF", "#00BFFF", "#0000FF", "#000080", "#483D8B", "#7B68EE", "#BA55D3", "#AFEEEE", "#87CEEB", "#00FFFF", "#00BFFF", "#0000FF", "#000080", "#483D8B", "#7B68EE", "#BA55D3",
"#800080", "#FF00FF", "#FFC0CB", "#F5F5DC", "#E0FFFF", "#FFFFFF", "#A9A9A9"); "#800080", "#FF00FF", "#FFC0CB", "#F5F5DC", "#E0FFFF", "#FFFFFF", "#A9A9A9"
);
return $colors; return $colors;
} }
function backButton() { function backButton()
return " {
<input type=button value='돌아가기' onclick=location.replace('./')><br> return "<button type='button' class='btn btn-primary back_btn' onclick=location.replace('./')>돌아가기</button><br>";
";
} }
function CoreBackButton() { function CoreBackButton()
return " {
<input type=button value='돌아가기' onclick=location.replace('b_chiefcenter.php')><br> return "<button type='button' class='btn btn-primary back_btn' onclick=location.replace('b_chiefcenter.php')>돌아가기</button><br>";
";
} }
function closeButton() { function closeButton()
return " {
<input type=button value='창 닫기' onclick=window.close()><br> return "<button type='button' class='btn btn-primary back_btn' onclick=window.close()>창 닫기</button><br>";
";
} }
function printCitiesBasedOnDistance(int $cityNo, int $maxDistance=1):string { function printCitiesBasedOnDistance(int $cityNo, int $maxDistance = 1): string
{
$distanceList = searchDistance($cityNo, $maxDistance, true); $distanceList = searchDistance($cityNo, $maxDistance, true);
$result = []; $result = [];
@@ -113,9 +130,15 @@ function printCitiesBasedOnDistance(int $cityNo, int $maxDistance=1):string {
$cityStr = join(', ', $cityList); $cityStr = join(', ', $cityList);
switch ($dist) { switch ($dist) {
case 1: $color = "magenta"; break; case 1:
case 2: $color = "orange"; break; $color = "magenta";
default: $color = "yellow"; break; break;
case 2:
$color = "orange";
break;
default:
$color = "yellow";
break;
} }
$result[] = "{$dist}칸 떨어진 도시 : <span style='color:{$color};font-weight:bold;'>{$cityStr}</span>"; $result[] = "{$dist}칸 떨어진 도시 : <span style='color:{$color};font-weight:bold;'>{$cityStr}</span>";
@@ -124,7 +147,8 @@ function printCitiesBasedOnDistance(int $cityNo, int $maxDistance=1):string {
} }
function info($type=0) { function info($type = 0)
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
@@ -146,4 +170,3 @@ function info($type=0) {
return "등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + <font color=cyan>NPC {$npccount} 명</font>"; return "등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + <font color=cyan>NPC {$npccount} 명</font>";
} }
} }
+56 -29
View File
@@ -28,7 +28,8 @@ function requireAdminPermissionHTML()
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('css/common.css') ?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
@@ -41,28 +42,6 @@ function requireAdminPermissionHTML()
return ob_get_clean(); return ob_get_clean();
} }
function turnTable()
{
$turnList = [];
$turnList[] = "<option selected value='0'>1턴</option>";
foreach (Util::range(1, GameConst::$maxTurn) as $turnIdx) {
$turnText = $turnIdx + 1;
$turnList[] = "<option value='{$turnIdx}'>{$turnText}턴</option>";
}
$turnText = join("\n", $turnList);
return "
<select id='generalTurnSelector' name=turn[] size=11 multiple>
<option value='-3'>전체</option>
<option value='-1'>홀턴</option>
<option value='-2'>짝턴</option>
{$turnText}
</select>
";
}
function chiefTurnTable() function chiefTurnTable()
{ {
$turnList = []; $turnList = [];
@@ -140,7 +119,7 @@ function displaySpecialDomesticInfo(?string $type): string
]); ]);
} }
function allButton(bool $seizeNPCMode) function allButton(bool $seizeNPCMode, array $opts = [])
{ {
if ($seizeNPCMode) { if ($seizeNPCMode) {
$site = "a_npcList.php"; $site = "a_npcList.php";
@@ -157,14 +136,14 @@ function allButton(bool $seizeNPCMode)
} }
return $templates->render('allButton', [ return $templates->render('allButton', array_merge([
'call' => $call, 'call' => $call,
'site' => $site 'site' => $site
]); ], $opts));
} }
function commandButton() function commandButton(array $opts = [])
{ {
$session = Session::getInstance(); $session = Session::getInstance();
$userID = Session::getUserID(); $userID = Session::getUserID();
@@ -194,14 +173,14 @@ function commandButton()
$showSecret = false; $showSecret = false;
} }
return $templates->render('commandButton', [ return $templates->render('commandButton', array_merge([
'bgColor' => $bgColor, 'bgColor' => $bgColor,
'fgColor' => $fgColor, 'fgColor' => $fgColor,
'meLevel' => $me['officer_level'], 'meLevel' => $me['officer_level'],
'nationLevel' => $nation['level'], 'nationLevel' => $nation['level'],
'showSecret' => $showSecret, 'showSecret' => $showSecret,
'permission' => $permission, 'permission' => $permission,
]); ], $opts));
} }
function formatWounded(int $value, int $wound): string function formatWounded(int $value, int $wound): string
@@ -272,3 +251,51 @@ function getInvitationList(array $nationList)
'nationList' => $nationList 'nationList' => $nationList
]); ]);
} }
function getAutorunInfo($autorunOption)
{
$templates = new \League\Plates\Engine(__DIR__ . '/templates');
$auto_info = [];
foreach ($autorunOption['options'] as $auto_option => $value) {
assert($value);
switch ($auto_option) {
case 'develop':
$auto_info['내정'] = '내정';
break;
case 'warp':
$auto_info['순간이동'] = '순간이동';
break;
case 'recruit':
$auto_info['징병'] = $auto_info['징병'] ?? '징병';
break;
case 'recruit_high':
$auto_info['징병'] = '모병';
break;
case 'train':
$auto_info['훈사'] = '훈련/사기진작';
break;
case 'battle':
$auto_info['출병'] = '출병';
break;
case 'chief':
$auto_info['사령턴'] = '사령턴';
break;
}
}
$limit = Util::toInt($autorunOption['limit_minutes']);
if ($limit >= 43200) {
$auto_info['제한'] = '항상 유효';
} else if ($limit % 60 == 0) {
$auto_info['제한'] = ($limit / 60) . '시간 유효';
} else {
$auto_info['제한'] = ($limit) . '분 유효';
}
$auto_info = join(', ', array_values($auto_info));
return $templates->render('tooltip', [
'text' => '자율행동',
'info' => $auto_info,
'style' => 'text-decoration:underline',
'copyable_info' => true
]);
}
+879 -220
View File
@@ -1,79 +1,129 @@
<?php <?php
namespace sammo; namespace sammo;
function processTournament() { function processTournament()
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['tournament', 'phase', 'tnmt_type', 'tnmt_auto', 'tnmt_time']); $admin = $gameStor->getValues(['tournament', 'phase', 'tnmt_type', 'tnmt_auto', 'tnmt_time']);
$now = new \DateTime(); $now = new \DateTime();
$admin['now'] = $now->format('Y-m-d H:i:s'); $offset = $now->getTimestamp() - (new \DateTime($admin['tnmt_time']))->getTimestamp();
$admin['offset'] = $now->getTimestamp() - (new \DateTime($admin['tnmt_time']))->getTimestamp();
//수동일땐 무시 //수동일땐 무시
if($admin['tnmt_auto'] == 0) { return; } if ($admin['tnmt_auto'] == 0) {
return;
}
$type = $admin['tnmt_type']; $type = $admin['tnmt_type'];
$tnmt = $admin['tournament']; $tnmt = $admin['tournament'];
$phase = $admin['phase']; $phase = $admin['phase'];
if ($offset < 0) {
return;
}
//현시간이 스탬프 지나친경우 //현시간이 스탬프 지나친경우
if($admin['offset'] >= 0) {
switch ($admin['tnmt_auto']) { switch ($admin['tnmt_auto']) {
case 1: $unit = 720; break; case 1:
case 2: $unit = 420; break; $unit = 720;
case 3: $unit = 180; break; break;
case 4: $unit = 60; break; case 2:
case 5: $unit = 30; break; $unit = 420;
case 6: $unit = 15; break; break;
case 7: $unit = 5; break; case 3:
default: throw new MustNotBeReachedException(); $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($admin['offset'], $unit) + 1; $iter = intdiv($offset, $unit) + 1;
for ($i = 0; $i < $iter; $i++) { for ($i = 0; $i < $iter; $i++) {
switch ($tnmt) { switch ($tnmt) {
case 1: //신청 마감 case 1: //신청 마감
fillLowGenAll(); fillLowGenAll($type);
$tnmt = 2; $phase = 0; $tnmt = 2;
$phase = 0;
break; break;
case 2: //예선중 case 2: //예선중
qualify($type, $tnmt, $phase); $phase++; qualify($type, $tnmt, $phase);
if($phase >= 56) { $tnmt = 3; $phase = 0; } $phase++;
if ($phase >= 56) {
$tnmt = 3;
$phase = 0;
}
break; break;
case 3: //추첨중 case 3: //추첨중
selectionAll($type, $tnmt, $phase); $phase+=8; selectionAll($type, $tnmt, $phase);
if($phase >= 32) { $tnmt = 4; $phase = 0; } $phase += 8;
if ($phase >= 32) {
$tnmt = 4;
$phase = 0;
}
break; break;
case 4: //본선중 case 4: //본선중
finallySingle($type, $tnmt, $phase); $phase++; finallySingle($type, $tnmt, $phase);
if($phase >= 6) { $tnmt = 5; $phase = 0; } $phase++;
if ($phase >= 6) {
$tnmt = 5;
$phase = 0;
}
break; break;
case 5: //배정중 case 5: //배정중
final16set(); final16set();
$tnmt = 6; $phase = 0; $tnmt = 6;
$phase = 0;
startBetting();
break; break;
case 6: //베팅중 case 6: //베팅중
$tnmt = 7; $phase = 0; $tnmt = 7;
$phase = 0;
break; break;
case 7: //16강중 case 7: //16강중
finalFight($type, $tnmt, $phase, 16); $phase++; finalFight($type, $tnmt, $phase, 16);
if($phase >= 8) { $tnmt = 8; $phase = 0; } $phase++;
if ($phase >= 8) {
$tnmt = 8;
$phase = 0;
}
break; break;
case 8: //8강중 case 8: //8강중
finalFight($type, $tnmt, $phase, 8); $phase++; finalFight($type, $tnmt, $phase, 8);
if($phase >= 4) { $tnmt = 9; $phase = 0; } $phase++;
if ($phase >= 4) {
$tnmt = 9;
$phase = 0;
}
break; break;
case 9: //4강중 case 9: //4강중
finalFight($type, $tnmt, $phase, 4); $phase++; finalFight($type, $tnmt, $phase, 4);
if($phase >= 2) { $tnmt = 10; $phase = 0; } $phase++;
if ($phase >= 2) {
$tnmt = 10;
$phase = 0;
}
break; break;
case 10: //결승중 case 10: //결승중
finalFight($type, $tnmt, $phase, 2); finalFight($type, $tnmt, $phase, 2);
$tnmt = 0; $phase = 0; $tnmt = 0;
$phase = 0;
setGift($type, $tnmt, $phase); setGift($type, $tnmt, $phase);
$i = $iter; $i = $iter;
break; break;
@@ -82,7 +132,9 @@ function processTournament() {
//베팅은 무조건 60페이즈후 진행(최대 1시간) //베팅은 무조건 60페이즈후 진행(최대 1시간)
if ($tnmt == 6) { if ($tnmt == 6) {
$betTerm = $unit * 60; $betTerm = $unit * 60;
if($betTerm > 3600) { $betTerm = 3600; } if ($betTerm > 3600) {
$betTerm = 3600;
}
//처리 초 더한 날짜 //처리 초 더한 날짜
$dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i + $betTerm); $dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i + $betTerm);
$gameStor->tournament = $tnmt; $gameStor->tournament = $tnmt;
@@ -111,72 +163,114 @@ function processTournament() {
$gameStor->phase = $phase; $gameStor->phase = $phase;
$gameStor->tnmt_time = (new \DateTimeImmutable($admin['tnmt_time']))->add(new \DateInterval("PT{$second}S"))->format('Y-m-d H:i:s'); $gameStor->tnmt_time = (new \DateTimeImmutable($admin['tnmt_time']))->add(new \DateInterval("PT{$second}S"))->format('Y-m-d H:i:s');
} }
}
function getTournamentTerm() { function getTournamentTerm()
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
$tnmt_auto = $gameStor->tnmt_auto; $tnmt_auto = $gameStor->tnmt_auto;
switch ($tnmt_auto) { switch ($tnmt_auto) {
case 0: $str = ''; break; case 0:
case 1: $str = "경기당 12분"; break; $str = '';
case 2: $str = "경기당 7분"; break; break;
case 3: $str = "경기당 3분"; break; case 1:
case 4: $str = "경기당 1분"; break; $str = "경기당 12";
case 5: $str = "경기당 30초"; break; break;
case 6: $str = "경기당 15초"; break; case 2:
case 7: $str = "경기당 5초"; break; $str = "경기당 7분";
break;
case 3:
$str = "경기당 3분";
break;
case 4:
$str = "경기당 1분";
break;
case 5:
$str = "경기당 30초";
break;
case 6:
$str = "경기당 15초";
break;
case 7:
$str = "경기당 5초";
break;
} }
return $str; return $str;
} }
function getTournamentTime() { function getTournamentTime()
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
list($tnmt, $tnmt_time) = $gameStor->getValuesAsArray(['tournament', 'tnmt_time']); list($tnmt, $tnmt_time) = $gameStor->getValuesAsArray(['tournament', 'tnmt_time']);
$dt = substr($tnmt_time, 11, 5); $dt = substr($tnmt_time, 11, 5);
switch ($tnmt) { switch ($tnmt) {
case 1: $tnmt = "개막시간 {$dt}"; break; case 1:
case 2: $tnmt = "다음경기 {$dt}"; break; $tnmt = "개막시간 {$dt}";
case 3: $tnmt = "다음추첨 {$dt}"; break; break;
case 4: $tnmt = "다음경기 {$dt}"; break; case 2:
case 5: $tnmt = "16강배정 {$dt}"; break; $tnmt = "다음경기 {$dt}";
case 6: $tnmt = "베팅마감 {$dt}"; break; break;
case 7: case 8: case 9: case 10: case 3:
$tnmt = "다음경기 {$dt}"; break; $tnmt = "다음추첨 {$dt}";
default: $tnmt = ""; break; break;
case 4:
$tnmt = "다음경기 {$dt}";
break;
case 5:
$tnmt = "16강배정 {$dt}";
break;
case 6:
$tnmt = "베팅마감 {$dt}";
break;
case 7:
case 8:
case 9:
case 10:
$tnmt = "다음경기 {$dt}";
break;
default:
$tnmt = "";
break;
} }
return $tnmt; return $tnmt;
} }
function getTournament(int $tnmt) { function getTournament(int $tnmt)
{
return [ return [
"<font color=magenta>경기 없음</font>", "<span style='color:magenta;'>경기 없음</span>",
"<font color=orange>참가 모집중</font>", "<span style='color:orange;'>참가 모집중</span>",
"<font color=orange>예선 진행중</font>", "<span style='color:orange;'>예선 진행중</span>",
"<font color=orange>본선 추첨중</font>", "<span style='color:orange;'>본선 추첨중</span>",
"<font color=orange>본선 진행중</font>", "<span style='color:orange;'>본선 진행중</span>",
"<font color=orange>16강 배정중</font>", "<span style='color:orange;'>16강 배정중</span>",
"<font color=orange>베팅 진행중</font>", "<span style='color:orange;'>베팅 진행중</span>",
"<font color=orange>16강 진행중</font>", "<span style='color:orange;'>16강 진행중</span>",
"<font color=orange>8강 진행중</font>", "<span style='color:orange;'>8강 진행중</span>",
"<font color=orange>4강 진행중</font>", "<span style='color:orange;'>4강 진행중</span>",
"<font color=orange>결승 진행중</font>", "<span style='color:orange;'>결승 진행중</span>",
][$tnmt] ?? "TOURNAMENT_TYPE_ERR_{$tnmt}"; ][$tnmt] ?? "TOURNAMENT_TYPE_ERR_{$tnmt}";
} }
function printRow($k, $npc, $name, $abil, $tgame, $win, $draw, $lose, $gd, $gl, $prmt) { function printRow($k, $npc, $name, $abil, $tgame, $win, $draw, $lose, $gd, $gl, $prmt)
{
$k += 1; $k += 1;
if($prmt > 0) { $name = "<font color=orange>".$name."</font>"; } if ($prmt > 0) {
elseif($npc >= 2) { $name = "<font color=cyan>".$name."</font>"; } $name = "<font color=orange>" . $name . "</font>";
elseif($npc == 1) { $name = "<font color=skyblue>".$name."</font>"; } } elseif ($npc >= 2) {
$name = "<font color=cyan>" . $name . "</font>";
} elseif ($npc == 1) {
$name = "<font color=skyblue>" . $name . "</font>";
}
echo "<tr align=center><td class='bg2'>$k</td><td style='font-size:80%;'>$name</td><td>$abil</td><td>$tgame</td><td>$win</td><td>$draw</td><td>$lose</td><td>$gd</td><td>$gl</td></tr>"; echo "<tr align=center><td class='bg2'>$k</td><td style='font-size:80%;'>$name</td><td>$abil</td><td>$tgame</td><td>$win</td><td>$draw</td><td>$lose</td><td>$gd</td><td>$gl</td></tr>";
} }
function printFighting($tournament, $phase) { function printFighting($tournament, $phase)
{
$code = $tournament * 100 + $phase; $code = $tournament * 100 + $phase;
if ($code == 0) { if ($code == 0) {
echo "<tr valign=top>"; echo "<tr valign=top>";
@@ -228,21 +322,38 @@ function printFighting($tournament, $phase) {
} }
} }
function startTournament($auto, $type) { function startTournament($auto, $type)
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
eraseTnmtFightLogAll(); eraseTnmtFightLogAll();
switch ($auto) { switch ($auto) {
case 1: $unit = 60; break; case 1:
case 2: $unit = 60; break; $unit = 60;
case 3: $unit = 60; break; break;
case 4: $unit = 60; break; case 2:
case 5: $unit = 30; break; $unit = 60;
case 6: $unit = 15; break; break;
case 7: $unit = 5; break; case 3:
default:$unit = 60; break; $unit = 60;
break;
case 4:
$unit = 60;
break;
case 5:
$unit = 30;
break;
case 6:
$unit = 15;
break;
case 7:
$unit = 5;
break;
default:
$unit = 60;
break;
} }
$admin = $gameStor->getValues(['year', 'month']); $admin = $gameStor->getValues(['year', 'month']);
@@ -283,8 +394,7 @@ function startTournament($auto, $type) {
if ($opener) { if ($opener) {
$openerText = "황제 <Y>{$opener}</>의 명으로 "; $openerText = "황제 <Y>{$opener}</>의 명으로 ";
} } else {
else{
$openerText = ''; $openerText = '';
} }
@@ -296,12 +406,54 @@ function startTournament($auto, $type) {
['설전', '책사'], ['설전', '책사'],
][$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']); pushGlobalHistoryLog($history, $admin['year'], $admin['month']);
} }
function fillLowGenAll() { function startBetting()
{
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
[$year, $month, $startyear] = $gameStor->getValuesAsArray(['year', 'month', 'startyear']);
pushGlobalHistoryLog([
"<S>◆</>{$year}{$month}월:<B><b>【대회】</b></>우승자를 예상하는 <C>내기</>가 진행중입니다! 호사가의 참여를 기다립니다!"
], $year, $month);
$betGold = Util::valueFit(floor((3 + $year - $startyear) * 0.334) * 10, 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($tnmt_type)
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
@@ -314,17 +466,7 @@ function fillLowGenAll() {
'leadership' => 10, 'leadership' => 10,
'strength' => 10, 'strength' => 10,
'intel' => 10, 'intel' => 10,
'explevel'=>10 'lvl' => 10,
];
$dummyGeneral = [
'no'=>0,
'npc'=>2,
'name'=>'무명장수',
'leadership'=>10,
'strength'=>10,
'intel'=>10,
'lvl'=>0,
'h' => 'None', 'h' => 'None',
'w' => 'None', 'w' => 'None',
'b' => 'None' 'b' => 'None'
@@ -348,16 +490,43 @@ function fillLowGenAll() {
$toBeFilledCnt = 8 * 8 - $currentJoinerCnt; $toBeFilledCnt = 8 * 8 - $currentJoinerCnt;
$scoringCandFunction = match ($tnmt_type) {
0 => function ($gen) {
return $gen['leadership'] + $gen['strength'] + $gen['intel'];
}, //전력전
1 => function ($gen) {
return $gen['leadership'];
}, //통솔전
2 => function ($gen) {
return $gen['strength'];
}, //통솔전
3 => function ($gen) {
return $gen['intel'];
}, //통솔전
default => throw new \ValueError('invalid tnmt_type' . $tnmt_type)
};
//자동신청하고, 돈 있고, 아직 참가 안한 장수 //자동신청하고, 돈 있고, 아직 참가 안한 장수
$freeJoiners = $db->query( $freeJoinerCandidate = [];
'SELECT no,npc,name,leadership,strength,intel,explevel,horse,weapon,book from general where tnmt=1 and tournament=0 order by rand() limit %d',
$toBeFilledCnt foreach($db->query(
); 'SELECT no,npc,name,leadership,strength,intel,explevel,horse,weapon,book from general where tnmt=1 and tournament=0',
) as $gen){
$score = $scoringCandFunction($gen);
$freeJoinerCandidate[$gen['no']] = [$gen, $score**2];
}
$joinersValues = []; $joinersValues = [];
$joinersIdx = []; $joinersIdx = [];
foreach($freeJoiners as $general){ foreach(Util::range($toBeFilledCnt) as $_){
if(!$freeJoinerCandidate){
break;
}
$general = Util::choiceRandomUsingWeightPair($freeJoinerCandidate);
unset($freeJoinerCandidate[$general['no']]);
$grpIdx = array_keys($grpCount, min($grpCount))[0]; $grpIdx = array_keys($grpCount, min($grpCount))[0];
$grpCnt = $grpCount[$grpIdx]; $grpCnt = $grpCount[$grpIdx];
$joinersValues[] = [ $joinersValues[] = [
@@ -407,19 +576,125 @@ function fillLowGenAll() {
//7 8강 //7 8강
//8 4강 //8 4강
//9 결승 //9 결승
function getTwo($tournament, $phase) { function getTwo($tournament, $phase)
{
$cand = []; $cand = [];
switch ($tournament) { switch ($tournament) {
case 2: case 2:
//예선 //예선
switch ($phase % 28) { switch ($phase % 28) {
case 0: $cand[0] = 0; $cand[1] = 1; break; case 1: $cand[0] = 2; $cand[1] = 3; break; case 2: $cand[0] = 4; $cand[1] = 5; break; case 3: $cand[0] = 6; $cand[1] = 7; break; case 0:
case 4: $cand[0] = 0; $cand[1] = 2; break; case 5: $cand[0] = 1; $cand[1] = 3; break; case 6: $cand[0] = 4; $cand[1] = 6; break; case 7: $cand[0] = 5; $cand[1] = 7; break; $cand[0] = 0;
case 8: $cand[0] = 0; $cand[1] = 3; break; case 9: $cand[0] = 1; $cand[1] = 6; break; case 10: $cand[0] = 2; $cand[1] = 5; break; case 11: $cand[0] = 4; $cand[1] = 7; break; $cand[1] = 1;
case 12: $cand[0] = 0; $cand[1] = 4; break; case 13: $cand[0] = 1; $cand[1] = 5; break; case 14: $cand[0] = 2; $cand[1] = 6; break; case 15: $cand[0] = 3; $cand[1] = 7; break; break;
case 16: $cand[0] = 0; $cand[1] = 5; break; case 17: $cand[0] = 1; $cand[1] = 4; break; case 18: $cand[0] = 2; $cand[1] = 7; break; case 19: $cand[0] = 3; $cand[1] = 6; break; case 1:
case 20: $cand[0] = 0; $cand[1] = 6; break; case 21: $cand[0] = 1; $cand[1] = 7; break; case 22: $cand[0] = 2; $cand[1] = 4; break; case 23: $cand[0] = 3; $cand[1] = 5; break; $cand[0] = 2;
case 24: $cand[0] = 0; $cand[1] = 7; break; case 25: $cand[0] = 1; $cand[1] = 2; break; case 26: $cand[0] = 3; $cand[1] = 4; break; case 27: $cand[0] = 5; $cand[1] = 6; break; $cand[1] = 3;
break;
case 2:
$cand[0] = 4;
$cand[1] = 5;
break;
case 3:
$cand[0] = 6;
$cand[1] = 7;
break;
case 4:
$cand[0] = 0;
$cand[1] = 2;
break;
case 5:
$cand[0] = 1;
$cand[1] = 3;
break;
case 6:
$cand[0] = 4;
$cand[1] = 6;
break;
case 7:
$cand[0] = 5;
$cand[1] = 7;
break;
case 8:
$cand[0] = 0;
$cand[1] = 3;
break;
case 9:
$cand[0] = 1;
$cand[1] = 6;
break;
case 10:
$cand[0] = 2;
$cand[1] = 5;
break;
case 11:
$cand[0] = 4;
$cand[1] = 7;
break;
case 12:
$cand[0] = 0;
$cand[1] = 4;
break;
case 13:
$cand[0] = 1;
$cand[1] = 5;
break;
case 14:
$cand[0] = 2;
$cand[1] = 6;
break;
case 15:
$cand[0] = 3;
$cand[1] = 7;
break;
case 16:
$cand[0] = 0;
$cand[1] = 5;
break;
case 17:
$cand[0] = 1;
$cand[1] = 4;
break;
case 18:
$cand[0] = 2;
$cand[1] = 7;
break;
case 19:
$cand[0] = 3;
$cand[1] = 6;
break;
case 20:
$cand[0] = 0;
$cand[1] = 6;
break;
case 21:
$cand[0] = 1;
$cand[1] = 7;
break;
case 22:
$cand[0] = 2;
$cand[1] = 4;
break;
case 23:
$cand[0] = 3;
$cand[1] = 5;
break;
case 24:
$cand[0] = 0;
$cand[1] = 7;
break;
case 25:
$cand[0] = 1;
$cand[1] = 2;
break;
case 26:
$cand[0] = 3;
$cand[1] = 4;
break;
case 27:
$cand[0] = 5;
$cand[1] = 6;
break;
} }
if ($phase >= 28) { if ($phase >= 28) {
$temp = $cand[0]; $temp = $cand[0];
@@ -430,16 +705,38 @@ function getTwo($tournament, $phase) {
case 4: case 4:
//본선 //본선
switch ($phase % 6) { switch ($phase % 6) {
case 0: $cand[0] = 0; $cand[1] = 1; break; case 1: $cand[0] = 2; $cand[1] = 3; break; case 0:
case 2: $cand[0] = 0; $cand[1] = 2; break; case 3: $cand[0] = 1; $cand[1] = 3; break; $cand[0] = 0;
case 4: $cand[0] = 0; $cand[1] = 3; break; case 5: $cand[0] = 1; $cand[1] = 2; break; $cand[1] = 1;
break;
case 1:
$cand[0] = 2;
$cand[1] = 3;
break;
case 2:
$cand[0] = 0;
$cand[1] = 2;
break;
case 3:
$cand[0] = 1;
$cand[1] = 3;
break;
case 4:
$cand[0] = 0;
$cand[1] = 3;
break;
case 5:
$cand[0] = 1;
$cand[1] = 2;
break;
} }
break; break;
} }
return $cand; return $cand;
} }
function qualify($tnmt_type, $tnmt, $phase) { function qualify($tnmt_type, $tnmt, $phase)
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
@@ -469,7 +766,8 @@ function qualify($tnmt_type, $tnmt, $phase) {
} }
} }
function qualifyAll($tnmt_type, $tnmt, $phase) { function qualifyAll($tnmt_type, $tnmt, $phase)
{
$db = DB::db(); $db = DB::db();
$start = $phase; $start = $phase;
@@ -479,23 +777,28 @@ function qualifyAll($tnmt_type, $tnmt, $phase) {
} }
} }
function selection($tnmt_type, $tnmt, $phase) { function selection($tnmt_type, $tnmt, $phase)
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
//시드1 배정 //시드1 배정
if ($phase < 8) { if ($phase < 8) {
$grp = $phase + 10; $grp_no = 0; $grp = $phase + 10;
$grp_no = 0;
$general = $db->queryFirstRow('SELECT * FROM tournament WHERE prmt=1 ORDER BY rand() LIMIT 1'); $general = $db->queryFirstRow('SELECT * FROM tournament WHERE prmt=1 ORDER BY rand() LIMIT 1');
//시드2 배정 //시드2 배정
} elseif ($phase < 16) { } elseif ($phase < 16) {
$grp = $phase - 8 + 10; $grp_no = 1; $grp = $phase - 8 + 10;
$grp_no = 1;
$general = $db->queryFirstRow('SELECT * FROM tournament WHERE prmt=2 ORDER BY rand() LIMIT 1'); $general = $db->queryFirstRow('SELECT * FROM tournament WHERE prmt=2 ORDER BY rand() LIMIT 1');
} elseif ($phase < 24) { } elseif ($phase < 24) {
$grp = $phase - 16 + 10; $grp_no = 2; $grp = $phase - 16 + 10;
$grp_no = 2;
$general = $db->queryFirstRow('SELECT * FROM tournament WHERE prmt>2 ORDER BY rand() LIMIT 1'); $general = $db->queryFirstRow('SELECT * FROM tournament WHERE prmt>2 ORDER BY rand() LIMIT 1');
} else { } else {
$grp = $phase - 24 + 10; $grp_no = 3; $grp = $phase - 24 + 10;
$grp_no = 3;
$general = $db->queryFirstRow('SELECT * FROM tournament WHERE prmt>2 ORDER BY rand() LIMIT 1'); $general = $db->queryFirstRow('SELECT * FROM tournament WHERE prmt>2 ORDER BY rand() LIMIT 1');
} }
//해당 시드에서 랜덤 선택 //해당 시드에서 랜덤 선택
@@ -528,7 +831,8 @@ function selection($tnmt_type, $tnmt, $phase) {
} }
} }
function selectionAll($tnmt_type, $tnmt, $phase) { function selectionAll($tnmt_type, $tnmt, $phase)
{
$start = $phase; $start = $phase;
$end = $phase - ($phase % 8) + 8; $end = $phase - ($phase % 8) + 8;
for ($i = $start; $i < $end; $i++) { for ($i = $start; $i < $end; $i++) {
@@ -536,7 +840,8 @@ function selectionAll($tnmt_type, $tnmt, $phase) {
} }
} }
function finallySingle($tnmt_type, $tnmt, $phase) { function finallySingle($tnmt_type, $tnmt, $phase)
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
@@ -566,7 +871,8 @@ function finallySingle($tnmt_type, $tnmt, $phase) {
} }
} }
function finallyAll($tnmt_type, $tnmt, $phase) { function finallyAll($tnmt_type, $tnmt, $phase)
{
$start = $phase; $start = $phase;
$end = $phase - ($phase % 2) + 2; $end = $phase - ($phase % 2) + 2;
for ($i = $start; $i < $end; $i++) { for ($i = $start; $i < $end; $i++) {
@@ -574,13 +880,14 @@ function finallyAll($tnmt_type, $tnmt, $phase) {
} }
} }
function final16set() { function final16set()
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
//1조1-5조2, 2조1-6조2, 3조1-7조2, 4조1-8조2, 5조1-1조2, 6조1-2조2, 7조1-3조2, 8조1-4조2 //1조1-5조2, 2조1-6조2, 3조1-7조2, 4조1-8조2, 5조1-1조2, 6조1-2조2, 7조1-3조2, 8조1-4조2
$grp = Array(10, 14, 11, 15, 12, 16, 13, 17, 14, 10, 15, 11, 16, 12, 17, 13); $grp = array(10, 14, 11, 15, 12, 16, 13, 17, 14, 10, 15, 11, 16, 12, 17, 13);
$prmt = Array( 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2); $prmt = array(1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2);
for ($i = 0; $i < 16; $i++) { for ($i = 0; $i < 16; $i++) {
$general = $db->queryFirstRow('SELECT * FROM tournament WHERE grp=%i AND prmt=%i LIMIT 1', $grp[$i], $prmt[$i]); $general = $db->queryFirstRow('SELECT * FROM tournament WHERE grp=%i AND prmt=%i LIMIT 1', $grp[$i], $prmt[$i]);
//16강에 추가 //16강에 추가
@@ -610,16 +917,34 @@ function final16set() {
$gameStor->phase = 0; $gameStor->phase = 0;
} }
function finalFight($tnmt_type, $tnmt, $phase, $type) { function finalFight($tnmt_type, $tnmt, $phase, $type)
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
switch ($type) { switch ($type) {
case 16: $offset = 20; $turn = 7; $next = 7; break; case 16:
case 8: $offset = 30; $turn = 3; $next = 8; break; $offset = 20;
case 4: $offset = 40; $turn = 1; $next = 9; break; $turn = 7;
case 2: $offset = 50; $turn = 0; $next = 0; break; $next = 7;
default: throw new MustNotBeReachedException(); break;
case 8:
$offset = 30;
$turn = 3;
$next = 8;
break;
case 4:
$offset = 40;
$turn = 1;
$next = 9;
break;
case 2:
$offset = 50;
$turn = 0;
$next = 0;
break;
default:
throw new MustNotBeReachedException();
} }
$grp = $phase + $offset; $grp = $phase + $offset;
@@ -652,7 +977,8 @@ function finalFight($tnmt_type, $tnmt, $phase, $type) {
} }
} }
function setGift($tnmt_type, $tnmt, $phase) { function setGift($tnmt_type, $tnmt, $phase)
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
@@ -661,11 +987,24 @@ function setGift($tnmt_type, $tnmt, $phase) {
$resultHelper = []; $resultHelper = [];
switch ($tnmt_type) { switch ($tnmt_type) {
case 0: $tp = "전력전"; $tp2 = "tt"; break; case 0:
case 1: $tp = "통솔전"; $tp2 = "tl"; break; $tp = "전력전";
case 2: $tp = "일기토"; $tp2 = "ts"; break; $tp2 = "tt";
case 3: $tp = "설전"; $tp2 = "ti"; break; break;
default: throw new MustNotBeReachedException(); case 1:
$tp = "통솔전";
$tp2 = "tl";
break;
case 2:
$tp = "일기토";
$tp2 = "ts";
break;
case 3:
$tp = "설전";
$tp2 = "ti";
break;
default:
throw new MustNotBeReachedException();
} }
//16강자 명성 돈 //16강자 명성 돈
@@ -785,8 +1124,8 @@ function setGift($tnmt_type, $tnmt, $phase) {
$josaYiWinner = JosaUtil::pick($winner['name'], '이'); $josaYiWinner = JosaUtil::pick($winner['name'], '이');
$josaYiRunnerUp = JosaUtil::pick($runnerUp['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("<B><b>【대회】</b></><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}</> 대회의 <S>우승자</>에게는 <C>{$winnerRewardText}</>, <S>준우승자</>에겐 <C>{$runnerUpRewardText}</>의 <S>상금</>과 약간의 <S>명성</>이 주어집니다!", ActionLogger::EVENT_YEAR_MONTH);
$generalObjList = General::createGeneralObjListFromDB(array_keys($resultHelper)); $generalObjList = General::createGeneralObjListFromDB(array_keys($resultHelper));
@@ -811,20 +1150,23 @@ function setGift($tnmt_type, $tnmt, $phase) {
$rewardRate = round($globalBetTotal / max($globalBet[$winnerSlot], 1), 2); $rewardRate = round($globalBetTotal / max($globalBet[$winnerSlot], 1), 2);
$betKey = "bet{$winnerSlot}"; $betKey = "bet{$winnerSlot}";
$gambleResult = Util::convertArrayToDict($db->query('SELECT general_id, %b as bet FROM betting WHERE %b > 0', $betKey, $betKey), 'general_id'); $gambleResult = Util::convertArrayToDict($db->query('SELECT general_id, %b as bet FROM betting WHERE %b > 0 AND general_id > 0', $betKey, $betKey), 'general_id');
foreach(General::createGeneralObjListFromDB(Util::squeezeFromArray($gambleResult, 'general_id'), ['gold'], 1) as $gambler){ foreach (General::createGeneralObjListFromDB(Util::squeezeFromArray($gambleResult, 'general_id'), ['gold', 'npc'], 1) as $gambler) {
$reward = Util::round($gambleResult[$gambler->getID()]['bet'] * $rewardRate); $reward = Util::round($gambleResult[$gambler->getID()]['bet'] * $rewardRate);
$gambler->increaseVar('gold', $reward); $gambler->increaseVar('gold', $reward);
if (($gambler->getNPCType() == 0) || ($gambler->getNPCType() == 1 && $gambler->getRankVar('betgold') > 0)) {
$gambler->increaseRankVar('betwingold', $reward); $gambler->increaseRankVar('betwingold', $reward);
$gambler->increaseRankVar('betwin', 1); $gambler->increaseRankVar('betwin', 1);
}
$rewardText = number_format($reward); $rewardText = number_format($reward);
$gambler->getLogger()->pushGeneralActionLog("<C>{$tp}</> 대회의 베팅 당첨으로 <C>{$rewardText}</>의 <S>금</> 획득!", ActionLogger::EVENT_PLAIN); $gambler->getLogger()->pushGeneralActionLog("<C>{$tp}</> 대회의 베팅 당첨으로 <C>{$rewardText}</>의 <S>금</> 획득!", ActionLogger::EVENT_PLAIN);
$gambler->applyDB($db); $gambler->applyDB($db);
} }
} }
function setRefund() { function setRefund()
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
@@ -845,7 +1187,8 @@ function setRefund() {
} }
//10차이 1.1, 50 차이 1.17, 100차이 1.2 //10차이 1.1, 50 차이 1.17, 100차이 1.2
function getLog($lvl1, $lvl2) { function getLog($lvl1, $lvl2)
{
if ($lvl1 >= $lvl2) { if ($lvl1 >= $lvl2) {
$ratio = 1 + log(1 + $lvl1 - $lvl2, 10) / 10; $ratio = 1 + log(1 + $lvl1 - $lvl2, 10) / 10;
} else { } else {
@@ -855,7 +1198,8 @@ function getLog($lvl1, $lvl2) {
} }
//0 : 승무패, 1 : 승패 //0 : 승무패, 1 : 승패
function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type)
{
$log = []; $log = [];
$db = DB::db(); $db = DB::db();
@@ -864,14 +1208,26 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
$gen1 = $db->queryFirstRow('SELECT *,(leadership+strength+intel)*7/15 as total,h,w,b from tournament where grp=%i AND grp_no=%i', $group, $g1); $gen1 = $db->queryFirstRow('SELECT *,(leadership+strength+intel)*7/15 as total,h,w,b from tournament where grp=%i AND grp_no=%i', $group, $g1);
$gen2 = $db->queryFirstRow('SELECT *,(leadership+strength+intel)*7/15 as total,h,w,b from tournament where grp=%i AND grp_no=%i', $group, $g2); $gen2 = $db->queryFirstRow('SELECT *,(leadership+strength+intel)*7/15 as total,h,w,b from tournament where grp=%i AND grp_no=%i', $group, $g2);
if($type == 0) { $turn = 10; } if ($type == 0) {
else { $turn = 100; } $turn = 10;
} else {
$turn = 100;
}
if($tnmt_type == 1) { $tp = "leadership"; $tp2 = "tl"; } if ($tnmt_type == 1) {
elseif($tnmt_type == 2) { $tp = "strength"; $tp2 = "ts"; } $tp = "leadership";
elseif($tnmt_type == 3) { $tp = "intel"; $tp2 = "ti"; } $tp2 = "tl";
else /*$tnmt_type == 0*/{ $tp = "total"; $tp2 = "tt"; } } elseif ($tnmt_type == 2) {
$tp = "strength";
$tp2 = "ts";
} elseif ($tnmt_type == 3) {
$tp = "intel";
$tp2 = "ti";
} else /*$tnmt_type == 0*/ {
$tp = "total";
$tp2 = "tt";
}
$e1 = $energy1 = Util::round($gen1[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10); $e1 = $energy1 = Util::round($gen1[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10);
$e2 = $energy2 = Util::round($gen2[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10); $e2 = $energy2 = Util::round($gen2[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10);
@@ -890,17 +1246,21 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
switch (rand() % 4) { switch (rand() % 4) {
case 0: case 0:
$josaYi = JosaUtil::pick($itemRawName, '이'); $josaYi = JosaUtil::pick($itemRawName, '이');
$log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 포효합니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 포효합니다!";
break;
case 1: case 1:
$josaYi = JosaUtil::pick($itemRawName, '이'); $josaYi = JosaUtil::pick($itemRawName, '이');
$log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 그 위용을 뽐냅니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 그 위용을 뽐냅니다!";
break;
case 2: case 2:
$josaYi = JosaUtil::pick($gen['name'], '이'); $josaYi = JosaUtil::pick($gen['name'], '이');
$josaUl = JosaUtil::pick($itemRawName, '을'); $josaUl = JosaUtil::pick($itemRawName, '을');
$log[] = "<S>●</> <Y>{$gen['name']}</>{$josaYi} <S>{$itemName}</>{$josaUl} 타고 있습니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>{$josaYi} <S>{$itemName}</>{$josaUl} 타고 있습니다!";
break;
case 3: case 3:
$josaYi = JosaUtil::pick($itemRawName, '이'); $josaYi = JosaUtil::pick($itemRawName, '이');
$log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 갈기를 휘날립니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 갈기를 휘날립니다!";
break;
} }
} }
if (!$weapon->isBuyable() && ($tnmt_type == 0 || $tnmt_type == 2)) { if (!$weapon->isBuyable() && ($tnmt_type == 0 || $tnmt_type == 2)) {
@@ -909,15 +1269,19 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
switch (rand() % 4) { switch (rand() % 4) {
case 0: case 0:
$josaYi = JosaUtil::pick($itemRawName, '이'); $josaYi = JosaUtil::pick($itemRawName, '이');
$log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 번뜩입니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 번뜩입니다!";
break;
case 1: case 1:
$josaYi = JosaUtil::pick($itemRawName, '이'); $josaYi = JosaUtil::pick($itemRawName, '이');
$log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 푸르게 빛납니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 푸르게 빛납니다!";
break;
case 2: case 2:
$log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>에서 살기가 느껴집니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>에서 살기가 느껴집니다!";
break;
case 3: case 3:
$josaYi = JosaUtil::pick($itemRawName, '이'); $josaYi = JosaUtil::pick($itemRawName, '이');
$log[] = "<S>●</> <Y>{$gen['name']}</>의 손에는 <S>{$itemName}</>{$josaYi} 쥐어져 있습니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>의 손에는 <S>{$itemName}</>{$josaYi} 쥐어져 있습니다!";
break;
} }
} }
if (!$book->isBuyable() && ($tnmt_type == 0 || $tnmt_type == 3)) { if (!$book->isBuyable() && ($tnmt_type == 0 || $tnmt_type == 3)) {
@@ -927,26 +1291,32 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
case 0: case 0:
$josaYi = JosaUtil::pick($gen['name'], '이'); $josaYi = JosaUtil::pick($gen['name'], '이');
$josaUl = JosaUtil::pick($itemRawName, '을'); $josaUl = JosaUtil::pick($itemRawName, '을');
$log[] = "<S>●</> <Y>{$gen['name']}</>{$josaYi} <S>{$itemName}</>{$josaUl} 펼쳐듭니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>{$josaYi} <S>{$itemName}</>{$josaUl} 펼쳐듭니다!";
break;
case 1: case 1:
$josaYi = JosaUtil::pick($gen['name'], '이'); $josaYi = JosaUtil::pick($gen['name'], '이');
$josaUl = JosaUtil::pick($itemRawName, '을'); $josaUl = JosaUtil::pick($itemRawName, '을');
$log[] = "<S>●</> <Y>{$gen['name']}</>{$josaYi} <S>{$itemName}</>{$josaUl} 품에서 꺼냅니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>{$josaYi} <S>{$itemName}</>{$josaUl} 품에서 꺼냅니다!";
break;
case 2: case 2:
$josaYi = JosaUtil::pick($gen['name'], '이'); $josaYi = JosaUtil::pick($gen['name'], '이');
$josaUl = JosaUtil::pick($itemRawName, '을'); $josaUl = JosaUtil::pick($itemRawName, '을');
$log[] = "<S>●</> <Y>{$gen['name']}</>{$josaYi} <S>{$itemName}</>{$josaUl} 들고 있습니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>{$josaYi} <S>{$itemName}</>{$josaUl} 들고 있습니다!";
break;
case 3: case 3:
$josaYi = JosaUtil::pick($itemRawName, '이'); $josaYi = JosaUtil::pick($itemRawName, '이');
$log[] = "<S>●</> <Y>{$gen['name']}</>의 손에는 <S>{$itemName}</>{$josaYi} 쥐어져 있습니다!"; break; $log[] = "<S>●</> <Y>{$gen['name']}</>의 손에는 <S>{$itemName}</>{$josaYi} 쥐어져 있습니다!";
break;
} }
} }
} }
$log[] = "<S>●</> <Y>{$gen1['name']}</> <C>({$energy1})</> vs <C>({$energy2})</> <Y>{$gen2['name']}</>"; $log[] = "<S>●</> <Y>{$gen1['name']}</> <C>({$energy1})</> vs <C>({$energy2})</> <Y>{$gen2['name']}</>";
$gd1 = 0; $gd2 = 0; $gd1 = 0;
$phase = 0; $sel = 2; $gd2 = 0;
$phase = 0;
$sel = 2;
while ($phase < $turn) { while ($phase < $turn) {
$phase++; $phase++;
//평타 //평타
@@ -954,67 +1324,312 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
$damage2 = Util::round($gen1[$tp] * (rand() % 21 + 90) / 130); // 90~110% $damage2 = Util::round($gen1[$tp] * (rand() % 21 + 90) / 130); // 90~110%
//보너스타 //보너스타
$ratio = rand() % 100; $ratio = rand() % 100;
if($gen1[$tp] >= $ratio) { $damage2 += Util::round($gen1[$tp] * (rand() % 41 + 10) / 130); } // 10~50 if ($gen1[$tp] >= $ratio) {
$damage2 += Util::round($gen1[$tp] * (rand() % 41 + 10) / 130);
} // 10~50
$ratio = rand() % 100; $ratio = rand() % 100;
if($gen2[$tp] >= $ratio) { $damage1 += Util::round($gen2[$tp] * (rand() % 41 + 10) / 130); } // 10~50 if ($gen2[$tp] >= $ratio) {
$critical1 = 0; $critical2 = 0; $damage1 += Util::round($gen2[$tp] * (rand() % 41 + 10) / 130);
} // 10~50
$critical1 = 0;
$critical2 = 0;
//막판 분노 //막판 분노
$ratio = rand() % 300; $ratio = rand() % 300;
if ($e1 / 5 > $energy1 && $damage1 > $damage2 && $gen1[$tp] >= $ratio) { if ($e1 / 5 > $energy1 && $damage1 > $damage2 && $gen1[$tp] >= $ratio) {
$damage2 *= Util::round((rand() % 301 + 200) / 100); // 200 ~ 500% $damage2 *= Util::round((rand() % 301 + 200) / 100); // 200 ~ 500%
$critical1 = 1; $critical1 = 1;
if ($tnmt_type == 0) { switch(rand()%2) { case 0: $str = "전력"; break; case 1: $str = "집중"; break; } } if ($tnmt_type == 0) {
elseif($tnmt_type == 1) { switch(rand()%2) { case 0: $str = "봉시진"; break; case 1: $str = "어린진"; break; } } switch (rand() % 2) {
elseif($tnmt_type == 2) { switch(rand()%2) { case 0: $str = "삼단"; break; case 1: $str = "나선"; break; } } case 0:
elseif($tnmt_type == 3) { switch(rand()%2) { case 0: $str = "독설"; break; case 1: $str = "논파"; break; } } $str = "전력";
break;
case 1:
$str = "집중";
break;
}
} elseif ($tnmt_type == 1) {
switch (rand() % 2) {
case 0:
$str = "봉시진";
break;
case 1:
$str = "어린진";
break;
}
} elseif ($tnmt_type == 2) {
switch (rand() % 2) {
case 0:
$str = "삼단";
break;
case 1:
$str = "나선";
break;
}
} elseif ($tnmt_type == 3) {
switch (rand() % 2) {
case 0:
$str = "독설";
break;
case 1:
$str = "논파";
break;
}
}
$log[] = "<S>●</> <Y>{$gen1['name']}</>의 분노의 <M>{$str}</> 공격!"; $log[] = "<S>●</> <Y>{$gen1['name']}</>의 분노의 <M>{$str}</> 공격!";
} }
$ratio = rand() % 300; $ratio = rand() % 300;
if ($e2 / 5 > $energy2 && $damage2 > $damage1 && $gen2[$tp] >= $ratio) { if ($e2 / 5 > $energy2 && $damage2 > $damage1 && $gen2[$tp] >= $ratio) {
$damage1 *= Util::round((rand() % 301 + 200) / 100); // 200 ~ 500% $damage1 *= Util::round((rand() % 301 + 200) / 100); // 200 ~ 500%
$critical2 = 1; $critical2 = 1;
if($tnmt_type == 0) { switch(rand()%2) { case 0: $str = "전력"; break; case 1: $str = "집중"; break; } } if ($tnmt_type == 0) {
elseif($tnmt_type == 1) { switch(rand()%2) { case 0: $str = "봉시진"; break; case 1: $str = "어린진"; break; } } switch (rand() % 2) {
elseif($tnmt_type == 2) { switch(rand()%2) { case 0: $str = "삼단"; break; case 1: $str = "나선"; break; } } case 0:
elseif($tnmt_type == 3) { switch(rand()%2) { case 0: $str = "독설"; break; case 1: $str = "논파"; break; } } $str = "전력";
break;
case 1:
$str = "집중";
break;
}
} elseif ($tnmt_type == 1) {
switch (rand() % 2) {
case 0:
$str = "봉시진";
break;
case 1:
$str = "어린진";
break;
}
} elseif ($tnmt_type == 2) {
switch (rand() % 2) {
case 0:
$str = "삼단";
break;
case 1:
$str = "나선";
break;
}
} elseif ($tnmt_type == 3) {
switch (rand() % 2) {
case 0:
$str = "독설";
break;
case 1:
$str = "논파";
break;
}
}
$log[] = "<S>●</> <Y>{$gen2['name']}</>의 분노의 <M>{$str}</> 공격!"; $log[] = "<S>●</> <Y>{$gen2['name']}</>의 분노의 <M>{$str}</> 공격!";
} }
//1합 승부 //1합 승부
if ($phase == 1) { if ($phase == 1) {
$ratio = rand() % 400; $ratio = rand() % 400;
if ($gen1[$tp] * 0.9 > $gen2[$tp] && $gen1[$tp] >= $ratio) { if ($gen1[$tp] * 0.9 > $gen2[$tp] && $gen1[$tp] >= $ratio) {
$damage1 = 0; $damage2 = $e2; $damage1 = 0;
if ($tnmt_type == 0) { $log[] = "<S>●</> <Y>{$gen1['name']}</>의 <M>압도</>!"; } $damage2 = $e2;
elseif($tnmt_type == 1) { $log[] = "<S>●</> <Y>{$gen1['name']}</>의 <M>팔문금쇄진</>!"; } if ($tnmt_type == 0) {
elseif($tnmt_type == 2) { $log[] = "<S>●</> <Y>{$gen1['name']}</>의 <M>일격 필살</>!"; } $log[] = "<S>●</> <Y>{$gen1['name']}</>의 <M>압도</>!";
elseif($tnmt_type == 3) { $log[] = "<S>●</> <Y>{$gen1['name']}</>의 <M>모독 욕설</>!"; } } elseif ($tnmt_type == 1) {
$log[] = "<S>●</> <Y>{$gen1['name']}</>의 <M>팔문금쇄진</>!";
} elseif ($tnmt_type == 2) {
$log[] = "<S>●</> <Y>{$gen1['name']}</>의 <M>일격 필살</>!";
} elseif ($tnmt_type == 3) {
$log[] = "<S>●</> <Y>{$gen1['name']}</>의 <M>모독 욕설</>!";
}
} }
if ($gen2[$tp] * 0.9 > $gen1[$tp] && $gen2[$tp] >= $ratio) { if ($gen2[$tp] * 0.9 > $gen1[$tp] && $gen2[$tp] >= $ratio) {
$damage2 = 0; $damage1 = $e1; $damage2 = 0;
if ($tnmt_type == 0) { $log[] = "<S>●</> <Y>{$gen2['name']}</>의 <M>압도</>!"; } $damage1 = $e1;
elseif($tnmt_type == 1) { $log[] = "<S>●</> <Y>{$gen2['name']}</>의 <M>팔문금쇄진</>!"; } if ($tnmt_type == 0) {
elseif($tnmt_type == 2) { $log[] = "<S>●</> <Y>{$gen2['name']}</>의 <M>일격 필살</>!"; } $log[] = "<S>●</> <Y>{$gen2['name']}</>의 <M>압도</>!";
elseif($tnmt_type == 3) { $log[] = "<S>●</> <Y>{$gen2['name']}</>의 <M>모독 욕설</>!"; } } elseif ($tnmt_type == 1) {
$log[] = "<S>●</> <Y>{$gen2['name']}</>의 <M>팔문금쇄진</>!";
} elseif ($tnmt_type == 2) {
$log[] = "<S>●</> <Y>{$gen2['name']}</>의 <M>일격 필살</>!";
} elseif ($tnmt_type == 3) {
$log[] = "<S>●</> <Y>{$gen2['name']}</>의 <M>모독 욕설</>!";
}
} }
} else { } else {
$ratio = rand() % 1000; $ratio = rand() % 1000;
if ($critical1 == 0 && $gen1[$tp] >= $ratio) { if ($critical1 == 0 && $gen1[$tp] >= $ratio) {
$damage2 *= Util::randRangeInt(150, 300) / 100; // 150 ~ 300% $damage2 *= Util::randRangeInt(150, 300) / 100; // 150 ~ 300%
$critical1 = 1; $critical1 = 1;
if ($tnmt_type == 0) { switch(rand()%6) { case 0: $str = "참격"; break; case 1: $str = "집중"; break; case 2: $str = "역공"; break; case 3: $str = "반격"; break; case 4: $str = "선제"; break; case 5: $str = "도발"; break; } } if ($tnmt_type == 0) {
elseif($tnmt_type == 1) { switch(rand()%6) { case 0: $str = "추행진"; break; case 1: $str = "학익진"; break; case 2: $str = "장사진"; break; case 3: $str = "형액진"; break; case 4: $str = "기형진"; break; case 5: $str = "구행진"; break; } } switch (rand() % 6) {
elseif($tnmt_type == 2) { switch(rand()%6) { case 0: $str = "기합"; break; case 1: $str = "기염"; break; case 2: $str = "반격"; break; case 3: $str = "역공"; break; case 4: $str = "삼단"; break; case 5: $str = "나선"; break; } } case 0:
elseif($tnmt_type == 3) { switch(rand()%6) { case 0: $str = "논파"; break; case 1: $str = "항변"; break; case 2: $str = "반론"; break; case 3: $str = "반박"; break; case 4: $str = "도발"; break; case 5: $str = "면박"; break; } } $str = "참격";
break;
case 1:
$str = "집중";
break;
case 2:
$str = "역공";
break;
case 3:
$str = "반격";
break;
case 4:
$str = "선제";
break;
case 5:
$str = "도발";
break;
}
} elseif ($tnmt_type == 1) {
switch (rand() % 6) {
case 0:
$str = "추행진";
break;
case 1:
$str = "학익진";
break;
case 2:
$str = "장사진";
break;
case 3:
$str = "형액진";
break;
case 4:
$str = "기형진";
break;
case 5:
$str = "구행진";
break;
}
} elseif ($tnmt_type == 2) {
switch (rand() % 6) {
case 0:
$str = "기합";
break;
case 1:
$str = "기염";
break;
case 2:
$str = "반격";
break;
case 3:
$str = "역공";
break;
case 4:
$str = "삼단";
break;
case 5:
$str = "나선";
break;
}
} elseif ($tnmt_type == 3) {
switch (rand() % 6) {
case 0:
$str = "논파";
break;
case 1:
$str = "항변";
break;
case 2:
$str = "반론";
break;
case 3:
$str = "반박";
break;
case 4:
$str = "도발";
break;
case 5:
$str = "면박";
break;
}
}
$log[] = "<S>●</> <Y>{$gen1['name']}</>의 <M>{$str}</>!"; $log[] = "<S>●</> <Y>{$gen1['name']}</>의 <M>{$str}</>!";
} }
$ratio = rand() % 1000; $ratio = rand() % 1000;
if ($critical2 == 0 && $gen2[$tp] >= $ratio) { if ($critical2 == 0 && $gen2[$tp] >= $ratio) {
$damage1 *= Util::randRangeInt(150, 300) / 100; // 150 ~ 300% $damage1 *= Util::randRangeInt(150, 300) / 100; // 150 ~ 300%
$critical2 = 1; $critical2 = 1;
if ($tnmt_type == 0) { switch(rand()%6) { case 0: $str = "참격"; break; case 1: $str = "집중"; break; case 2: $str = "역공"; break; case 3: $str = "반격"; break; case 4: $str = "선제"; break; case 5: $str = "도발"; break; } } if ($tnmt_type == 0) {
elseif($tnmt_type == 1) { switch(rand()%6) { case 0: $str = "추행진"; break; case 1: $str = "학익진"; break; case 2: $str = "장사진"; break; case 3: $str = "형액진"; break; case 4: $str = "기형진"; break; case 5: $str = "구행진"; break; } } switch (rand() % 6) {
elseif($tnmt_type == 2) { switch(rand()%6) { case 0: $str = "기합"; break; case 1: $str = "기염"; break; case 2: $str = "반격"; break; case 3: $str = "역공"; break; case 4: $str = "삼단"; break; case 5: $str = "나선"; break; } } case 0:
elseif($tnmt_type == 3) { switch(rand()%6) { case 0: $str = "논파"; break; case 1: $str = "항변"; break; case 2: $str = "반론"; break; case 3: $str = "반박"; break; case 4: $str = "도발"; break; case 5: $str = "면박"; break; } } $str = "참격";
break;
case 1:
$str = "집중";
break;
case 2:
$str = "역공";
break;
case 3:
$str = "반격";
break;
case 4:
$str = "선제";
break;
case 5:
$str = "도발";
break;
}
} elseif ($tnmt_type == 1) {
switch (rand() % 6) {
case 0:
$str = "추행진";
break;
case 1:
$str = "학익진";
break;
case 2:
$str = "장사진";
break;
case 3:
$str = "형액진";
break;
case 4:
$str = "기형진";
break;
case 5:
$str = "구행진";
break;
}
} elseif ($tnmt_type == 2) {
switch (rand() % 6) {
case 0:
$str = "기합";
break;
case 1:
$str = "기염";
break;
case 2:
$str = "반격";
break;
case 3:
$str = "역공";
break;
case 4:
$str = "삼단";
break;
case 5:
$str = "나선";
break;
}
} elseif ($tnmt_type == 3) {
switch (rand() % 6) {
case 0:
$str = "논파";
break;
case 1:
$str = "항변";
break;
case 2:
$str = "반론";
break;
case 3:
$str = "반박";
break;
case 4:
$str = "도발";
break;
case 5:
$str = "면박";
break;
}
}
$log[] = "<S>●</> <Y>{$gen2['name']}</>의 <M>{$str}</>!"; $log[] = "<S>●</> <Y>{$gen2['name']}</>의 <M>{$str}</>!";
} }
} }
@@ -1024,36 +1639,49 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
$energy1 -= $damage1; $energy1 -= $damage1;
$energy2 -= $damage2; $energy2 -= $damage2;
$tDamage1 = $damage1; $tDamage2 = $damage2; $tDamage1 = $damage1;
$tEnergy1 = $energy1; $tEnergy2 = $energy2; $tDamage2 = $damage2;
$tEnergy1 = $energy1;
$tEnergy2 = $energy2;
if ($energy1 <= 0 && $energy2 <= 0) { if ($energy1 <= 0 && $energy2 <= 0) {
$r1 = $tEnergy1 / Util::valueFit($tDamage1, 1); $r1 = $tEnergy1 / Util::valueFit($tDamage1, 1);
$r2 = $tEnergy2 / Util::valueFit($tDamage2, 1); $r2 = $tEnergy2 / Util::valueFit($tDamage2, 1);
if ($r1 > $r2) { if ($r1 > $r2) {
$offset = Util::round($tEnergy2 * $tDamage1 / Util::valueFit($tDamage2, 1)); $offset = Util::round($tEnergy2 * $tDamage1 / Util::valueFit($tDamage2, 1));
$damage1 += $offset; $energy1 -= $offset; $damage1 += $offset;
$damage2 += $tEnergy2; $energy2 = 0; $energy1 -= $offset;
$damage2 += $tEnergy2;
$energy2 = 0;
} else { } else {
$offset = Util::round($tEnergy1 * $tDamage2 / Util::valueFit($tDamage1, 1)); $offset = Util::round($tEnergy1 * $tDamage2 / Util::valueFit($tDamage1, 1));
$damage2 += $offset; $energy2 -= $offset; $damage2 += $offset;
$damage1 += $tEnergy1; $energy1 = 0; $energy2 -= $offset;
$damage1 += $tEnergy1;
$energy1 = 0;
} }
} elseif ($energy1 * $energy2 <= 0) { } elseif ($energy1 * $energy2 <= 0) {
if ($energy2 < 0) { if ($energy2 < 0) {
$offset = Util::round($tEnergy2 * $tDamage1 / Util::valueFit($tDamage2, 1)); $offset = Util::round($tEnergy2 * $tDamage1 / Util::valueFit($tDamage2, 1));
$damage1 += $offset; $energy1 -= $offset; $damage1 += $offset;
$damage2 += $tEnergy2; $energy2 = 0; $energy1 -= $offset;
$damage2 += $tEnergy2;
$energy2 = 0;
} }
if ($energy1 < 0) { if ($energy1 < 0) {
$offset = Util::round($tEnergy1 * $tDamage2 / Util::valueFit($tDamage1, 1)); $offset = Util::round($tEnergy1 * $tDamage2 / Util::valueFit($tDamage1, 1));
$damage2 += $offset; $energy2 -= $offset; $damage2 += $offset;
$damage1 += $tEnergy1; $energy1 = 0; $energy2 -= $offset;
$damage1 += $tEnergy1;
$energy1 = 0;
} }
} }
$gd1 += $damage1; $gd2 += $damage2; $gd1 += $damage1;
$energy1 = Util::round($energy1); $energy2 = Util::round($energy2); $gd2 += $damage2;
$damage1 = Util::round($damage1); $damage2 = Util::round($damage2); $energy1 = Util::round($energy1);
$energy2 = Util::round($energy2);
$damage1 = Util::round($damage1);
$damage2 = Util::round($damage2);
$log[] = '<S>●</> ' $log[] = '<S>●</> '
. StringUtil::padStringAlignRight((string)$phase, 2, "0") . '合 : ' . StringUtil::padStringAlignRight((string)$phase, 2, "0") . '合 : '
@@ -1064,18 +1692,27 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
. '<C>' . StringUtil::padStringAlignRight((string)$energy2, 3, "0") . '</>'; . '<C>' . StringUtil::padStringAlignRight((string)$energy2, 3, "0") . '</>';
if ($energy1 <= 0 && $energy2 <= 0) { if ($energy1 <= 0 && $energy2 <= 0) {
if($type == 0) { $sel = 2; break; } if ($type == 0) {
else { $sel = 2;
$energy1 = Util::round($e1 / 2); $energy2 = Util::round($e2 / 2); break;
} else {
$energy1 = Util::round($e1 / 2);
$energy2 = Util::round($e2 / 2);
$log[] = "<S>●</> <span class='ev_highlight'>재대결</span>!"; $log[] = "<S>●</> <span class='ev_highlight'>재대결</span>!";
} }
} }
if($energy1 <= 0) { $sel = 1; break; } if ($energy1 <= 0) {
if($energy2 <= 0) { $sel = 0; break; } $sel = 1;
break;
}
if ($energy2 <= 0) {
$sel = 0;
break;
}
} }
$general1 = $db->queryFirstRow('SELECT value as gl FROM rank_data WHERE general_id = %i AND type = %s', $gen1['no'], $tp2.'g'); $gen1gl = $db->queryFirstField('SELECT value as gl FROM rank_data WHERE general_id = %i AND type = %s', $gen1['no'], $tp2 . 'g') ?? 0;
$general2 = $db->queryFirstRow('SELECT value as gl FROM rank_data WHERE general_id = %i AND type = %s', $gen2['no'], $tp2.'g'); $gen2gl = $db->queryFirstField('SELECT value as gl FROM rank_data WHERE general_id = %i AND type = %s', $gen2['no'], $tp2 . 'g') ?? 0;
switch ($sel) { switch ($sel) {
case 0: case 0:
@@ -1091,9 +1728,16 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
'gl' => $db->sqleval('gl-%i', $gl) 'gl' => $db->sqleval('gl-%i', $gl)
], 'grp=%i AND grp_no=%i', $group, $g2); ], 'grp=%i AND grp_no=%i', $group, $g2);
if($general1['gl'] > $general2['gl']) { $gl1 = 1; $gl2 = 0; } if ($gen1gl > $gen2gl) {
elseif($general1['gl'] == $general2['gl']) { $gl1 = 2; $gl2 = -1; } $gl1 = 1;
else { $gl1 = 3; $gl2 = -2; } $gl2 = 0;
} elseif ($gen1gl == $gen2gl) {
$gl1 = 2;
$gl2 = -1;
} else {
$gl1 = 3;
$gl2 = -2;
}
$gen1resKey = 'w'; $gen1resKey = 'w';
$gen2resKey = 'l'; $gen2resKey = 'l';
@@ -1111,9 +1755,16 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
'gl' => $db->sqleval('gl+%i', $gl) 'gl' => $db->sqleval('gl+%i', $gl)
], 'grp=%i AND grp_no=%i', $group, $g2); ], 'grp=%i AND grp_no=%i', $group, $g2);
if($general2['gl'] > $general1['gl']) { $gl2 = 1; $gl1 = 0; } if ($gen2gl > $gen1gl) {
elseif($general2['gl'] == $general1['gl']) { $gl2 = 2; $gl1 = -1; } $gl2 = 1;
else { $gl2 = 3; $gl1 = -2; } $gl1 = 0;
} elseif ($gen2gl == $gen1gl) {
$gl2 = 2;
$gl1 = -1;
} else {
$gl2 = 3;
$gl1 = -2;
}
$gen1resKey = 'l'; $gen1resKey = 'l';
$gen2resKey = 'w'; $gen2resKey = 'w';
@@ -1125,14 +1776,22 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
'draw' => $db->sqleval('draw+1') 'draw' => $db->sqleval('draw+1')
], 'grp=%i AND (grp_no=%i OR grp_no=%i)', $group, $g1, $g2); ], 'grp=%i AND (grp_no=%i OR grp_no=%i)', $group, $g1, $g2);
if($general1['gl'] > $general2['gl']) { $gl2 = -1; $gl1 = 1; } if ($gen1gl > $gen2gl) {
elseif($general1['gl'] == $general2['gl']) { $gl2 = 0; $gl1 = 0; } $gl2 = -1;
else { $gl2 = +1; $gl1 = -1; } $gl1 = 1;
} elseif ($gen1gl == $gen2gl) {
$gl2 = 0;
$gl1 = 0;
} else {
$gl2 = +1;
$gl1 = -1;
}
$gen1resKey = 'd'; $gen1resKey = 'd';
$gen2resKey = 'd'; $gen2resKey = 'd';
break; break;
default: throw new MustNotBeReachedException(); default:
throw new MustNotBeReachedException();
} }
$db->update('rank_data', [ $db->update('rank_data', [
+258 -232
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -64,24 +65,20 @@ if($nationID){
$nationStor->cacheAll(); $nationStor->cacheAll();
} }
$valid = 0;
if ($gameStor->extended_general == 0) { if ($gameStor->extended_general == 0) {
$extend = "표준"; $extend = "표준";
} else { } else {
$extend = "확장"; $extend = "확장";
$valid = 1;
} }
if ($gameStor->fiction == 0) { if ($gameStor->fiction == 0) {
$fiction = "사실"; $fiction = "사실";
} else { } else {
$fiction = "가상"; $fiction = "가상";
$valid = 1;
} }
if ($gameStor->npcmode == 0) { if ($gameStor->npcmode == 0) {
$npcmode = "불가능"; $npcmode = "불가능";
} else if ($gameStor->npcmode == 1) { } else if ($gameStor->npcmode == 1) {
$npcmode = "가능"; $npcmode = "가능";
$valid = 1;
} else { } else {
$npcmode = "선택 생성"; $npcmode = "선택 생성";
} }
@@ -89,131 +86,140 @@ $color = "cyan";
$mapTheme = $gameStor->map_theme; $mapTheme = $gameStor->map_theme;
$serverName = UniqueConst::$serverName; $serverName = UniqueConst::$serverName;
$serverCnt = $gameStor->server_cnt; $serverCnt = $gameStor->server_cnt;
$auctionCount = $db->queryFirstField('SELECT count(`no`) FROM auction');
$myNationStatic = getNationStaticInfo($generalObj->getNationID());
$nationColorType = substr($myNationStatic['color'] ?? '#000000', 1);
$autorunUser = ($gameStor->autorun_user) ?? [];
$otherTextInfo = [];
if ($gameStor->join_mode == 'onlyRandom') {
$otherTextInfo[] = '랜덤 임관 전용';
}
if ($autorunUser['limit_minutes'] ?? false) {
$otherTextInfo[] = getAutorunInfo($autorunUser);
}
if (!$otherTextInfo) {
$otherTextInfo = '표준';
} else {
$otherTextInfo = join(', ', $otherTextInfo);
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= $serverName ?>: 메인</title> <title><?= $serverName ?>: 메인</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=500" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?= WebUtil::printJS('d_shared/base_map.js') ?> <?= WebUtil::printJS('d_shared/base_map.js') ?>
<?=WebUtil::printJS('dist_js/main.js')?>
<script>
window.serverNick = '<?=DB::prefix()?>';
window.serverID = '<?=UniqueConst::$serverID?>';
$(function(){
reloadWorldMap({
hrefTemplate:'b_currentCity.php?citylist={0}',
useCachedMap:true
});
setInterval(function(){
refreshMsg();
}, 5000);
});
</script>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('css/common.css')?> <?= WebUtil::printDist('vue', 'v_main', true) ?>
<?=WebUtil::printCSS('css/main.css')?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?> <?= WebUtil::printCSS('css/map.css') ?>
<?=WebUtil::printCSS('css/msg.css')?> <?= WebUtil::printStaticValues([
'serverNick' => DB::prefix(),
'serverID' => UniqueConst::$serverID,
'maxTurn' => GameConst::$maxTurn,
'maxPushTurn' => 12,
'commandList' => getCommandTable($generalObj),
'serverNow' => TimeUtil::now(false),
'baseColor2' => GameConst::$basecolor2,
]) ?>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Nanum+Gothic|Nanum+Myeongjo|Nanum+Pen+Script" rel="stylesheet">
</head> </head>
<body class="img_back">
<div id="container"> <body class="img_back sam-color-<?= $nationColorType ?>">
<div><?=allButton($gameStor->npcmode==1)?></div> <div id="container" class="bg0">
<table class="tb_layout bg0" style="width:1000px;"> <div class="row toolbars gx-0">
<tr height=50> <div class="buttonPlate"><?= allButton($gameStor->npcmode == 1) ?></button></div>
<td colspan=5 id="server_title" align=center><font size=4>삼국지 모의전투 HiDCHe <?=$serverName.$serverCnt?>기 (<font color=cyan><?=$scenario?></font>)</font></td> </div>
</tr> <div class="tb_layout row gx-0">
<?php if ($valid == 1): ?> <div id="server_title" class="row py-2 center">
<tr height=30> <h3>삼국지 모의전투 HiDCHe <?= $serverName . $serverCnt ?>기 <span class="avoid-wrap">(<font color=cyan><?= $scenario ?></font>)</span></h3>
<td width=398 colspan=2 align=center><font color=<?=$color?>><?=$scenario?></font></td> </div>
<td width=198 align=center><font color=<?=$color?>>NPC수 : <?=$extend?></font></td>
<td width=198 align=center><font color=<?=$color?>>NPC상성 : <?=$fiction?></font></td> <div class="row center gx-0">
<td width=198 align=center><font color=<?=$color?>>NPC선택 : <?=$npcmode?></font></td> <div class="s-border-t col py-2 col-8 col-md-4" style="color:<?= $color ?>;">
</tr> <?= $scenario ?>
</div>
<div class="s-border-t col py-2 col-4 col-md-2" style="color:<?= $color ?>;">
NPC수 : <?= $extend ?>
</div>
<div class="s-border-t col py-2 col-4 col-md-2" style="color:<?= $color ?>;">
NPC상성 : <?= $fiction ?>
</div>
<div class="s-border-t col py-2 col-4 col-md-2" style="color:<?= $color ?>;">
NPC선택 : <?= $npcmode ?>
</div>
<div class="s-border-t col py-2 col-4 col-md-2" style="color:<?= $color ?>;">
기타 설정: <?= $otherTextInfo ?>
</div>
<div class="s-border-t col py-2 col-8 col-md-4"><?= info(2) ?></div>
<div class="s-border-t col py-2 col-4 col-md-2">전체 접속자 수 : <?= $gameStor->online_user_cnt ?> 명</div>
<div class="s-border-t col py-2 col-4 col-md-2">턴당 갱신횟수 : <?= $gameStor->conlimit ?>회</div>
<div class="s-border-t col py-2 col-8 col-md-4"><?= info(3) ?></div>
<div class="s-border-t py-2 col col-6 col-md-4"><?php if ($gameStor->tournament == 0) : ?>
<span style='color:magenta'>현재 토너먼트 경기 없음</span>
<?php else : ?>
↑<span style='color:cyan'><?=
([
'전력전', '통솔전', '일기토', '설전',
])[$gameStor->tnmt_type] ?? '' ?> <?= getTournament($gameStor->tournament) ?> <?= getTournamentTime() ?></span>↑
<?php endif; ?> <?php endif; ?>
</div>
<tr height=30> <div class="s-border-t py-2 col col-6 col-md-2">
<td width=198><?=info(2)?></td> <div style="display:inline-block;"><?= !$plock ? ("<span style='color:cyan;'>동작 시각: " . substr($gameStor->turntime, 5, 14) . "</span>") : ("<span style='color:magenta;'>동작 시각: " . substr($gameStor->turntime, 5, 14) . "</span>") ?></div>
<td width=198>전체 접속자 수 : <?=$gameStor->online_user_cnt?> 명</td> </div>
<td width=198>턴당 갱신횟수 : <?=$gameStor->conlimit?>회</td> <div class="s-border-t py-2 col col-6 col-md-2">
<td width=398 colspan=2><?=info(3)?></td> <?php if ($auctionCount > 0) : ?>
</tr> <span style='color:cyan'><?= $auctionCount ?>건</span> 거래 진행중
<tr height=30> <?php else : ?>
<td style='text-align:center;'> <span style='color:magenta'>진행중 거래 없음</span>
<?php endif; ?>
</div>
<div class="s-border-t py-2 col col-6 col-md-4 vote-cell">
<?php <?php
if (!$plock) {
echo "<span style='color:cyan;'>동작 시각: ".substr($gameStor->turntime, 5, 14)."</span>";
} else {
echo "<span style='color:magenta;'>동작 시각: ".substr($gameStor->turntime, 5, 14)."</span>";
}
echo "
</td>
<td align=center>
";
if ($gameStor->tournament == 0) {
echo "<font color=magenta>현재 토너먼트 경기 없음</font>";
} else {
switch ($gameStor->tnmt_type) {
case 0: $str = "전력전"; break;
case 1: $str = "통솔전"; break;
case 2: $str = "일기토"; break;
case 3: $str = "설전"; break;
}
$str2 = getTournament($gameStor->tournament);
$str3 = getTournamentTime();
echo "<marquee scrollamount=2>↑<font color=cyan>{$str}</font> {$str2} {$str3}↑</marquee>";
}
echo "
</td>
<td align=center>
";
$auctionCount = $db->queryFirstField('SELECT count(`no`) FROM auction');
if ($auctionCount > 0) {
echo "<marquee scrollamount=2><font color=cyan>{$auctionCount}건</font> 거래 진행중</marquee>";
} else {
echo "<font color=magenta>진행중 거래 없음</font>";
}
echo "
</td>
<td colspan=2 align=center>
";
$vote = $gameStor->vote ?: ['']; $vote = $gameStor->vote ?: [''];
$vote_title = Tag2Code($gameStor->vote_title ?? '-'); $vote_title = Tag2Code($gameStor->vote_title ?? '-');
if ($vote[0] == "") {
echo "<font color=magenta>진행중 설문 없음</font>";
} else {
echo "<marquee scrollamount=3><font color=cyan>설문 진행중</font> : $vote_title</marquee>";
}
echo "
</td>
</tr>";
?> ?>
<tr><td colspan=5 style="text-align:left;">접속중인 국가: <?=$gameStor->online_nation?></td></tr> <?php if ($vote[0] == "") : ?>
<tr><td colspan=5 style="text-align:left;">운영자 메세지 : <span style='color:yellow;'><?=$gameStor->msg?></span></td></tr> <span style='color:magenta'>진행중 설문 없음</span>
<tr><td colspan=5 style="text-align:left;"><div>【 국가방침 】</div><div><?=nationMsg($generalObj)?></div></td></tr> <?php else : ?>
<tr><td colspan=5 style="text-align:left;">【 접속자 】<?=onlinegen($generalObj)?></td></tr> <span style='color:cyan'>설문 진행중</span> : <span><?= $vote_title ?></span>
<?php <?php endif; ?>
if ($session->userGrade >= 5) { </div>
?> </div>
<tr><td colspan=5> <div class="row gx-0">
<div class="col s-border-t px-2 py-2">접속중인 국가: <?= $gameStor->online_nation ?></div>
</div>
<div class="row gx-0">
<div class="col s-border-t px-2 py-2">운영자 메세지 : <span style='color:yellow;'><?= $gameStor->msg ?></span></div>
</div>
<div class="row gx-0">
<div class="col s-border-t py-2" id="nation-msg-position">
<div class="px-2">【 국가방침 】</div>
<div id='nation-msg-box'>
<div id='nation-msg'><?= nationMsg($generalObj) ?></div>
</div>
</div>
</div>
<div class="row gx-0">
<div class="col s-border-t px-2 py-2">
【 접속자 】<?= onlinegen($generalObj) ?>
</div>
</div>
<?php if ($session->userGrade >= 5) : ?>
<div class="row">
<div class="col">
<a href='_admin1.php' target='_blank'><button type='button'>게임관리</button></a> <a href='_admin1.php' target='_blank'><button type='button'>게임관리</button></a>
<a href='_admin2.php' target='_blank'><button type='button'>회원관리</button></a> <a href='_admin2.php' target='_blank'><button type='button'>회원관리</button></a>
<a href='_admin4.php' target='_blank'><button type='button'>멀티관리</button></a> <a href='_admin4.php' target='_blank'><button type='button'>멀티관리</button></a>
@@ -221,141 +227,101 @@ if ($session->userGrade >= 5) {
<a href='_admin7.php' target='_blank'><button type='button'>로그정보</button></a> <a href='_admin7.php' target='_blank'><button type='button'>로그정보</button></a>
<a href='_admin8.php' target='_blank'><button type='button'>외교정보</button></a> <a href='_admin8.php' target='_blank'><button type='button'>외교정보</button></a>
<a href='_119.php' target='_blank'><button type='button'>119</button></a> <a href='_119.php' target='_blank'><button type='button'>119</button></a>
</td></tr> </div>
<?php </div>
} <?php elseif ($session->userGrade == 4) : ?>
else if($session->userGrade == 4){ <div class="row">
?> <div class="col">
<tr><td colspan=5>
<a href='_119.php' target='_blank'><button type='button'>119</button></a> <a href='_119.php' target='_blank'><button type='button'>119</button></a>
</td></tr>
<?php
}
?>
</table>
<table class="tb_layout bg0" style="width:1000px;" id='map_position'>
<tr>
<td style='width:700px;height:520px;' colspan=2>
<?=getMapHtml($mapTheme)?>
</td>
<td style='width:300px;vertical-align:top;' rowspan=4>
<div id="reservedCommandList" style='overflow-y:scroll;height:700px;'>
<table width="300" class="tb_layout b2">
<thead>
<tr height="24"><td colspan="4" class="center bg0"
><strong>- 명령 목록 - </strong><input value="<?=TimeUtil::now(false)?>" type="text" id="clock" size="19" style="background-color:black;color:white;border-style:none;"
></td></tr>
</thead>
<tbody class="center" style="font-weight:bold">
<?php for($turnIdx = 0; $turnIdx < GameConst::$maxTurn; $turnIdx++): ?>
<tr height='28' id="command_<?=$turnIdx?>"
><td width="24" class='idx_pad center bg0'><?=$turnIdx+1?></td
><td height='24' class='month_pad center bg1' style='min-width:70px;white-space:nowrap;overflow:hidden;'></td
><td width='42' class='time_pad center' style='background-color:black;white-space:nowrap;overflow:hidden;'></td
><td width='165' class='turn_pad center bg2'><span class='turn_text'></span></td
></tr>
<?php endfor; ?>
</tbody>
</table>
</div> </div>
</td> </div>
</tr> <?php endif; ?>
<tr> <div id="map_view" class="gx-0">
<td rowspan=3 width=50 valign=top><?=turnTable()?></td> <div id="mapZone" class="view-item"><?= getMapHtml($mapTheme) ?></div>
<td style="width:650px;border:none;text-align:center;"><?=cityInfo($generalObj)?></td> <div class="view-item" id="reservedCommandZone">
</tr> <div id="reservedCommandList"></div>
<tr> <div id="actionMiniPlate" class="gx-0 row">
<td style='width:650px;' align=right> <div class="col">
<font color=cyan><b>←</b> Ctrl, Shift, 드래그로 복수선택 가능  반복&amp;수정<b>→</b></font> <div class="gx-1 row">
<select id='repeatAmount' name=sel size=1 style=color:white;background-color:black;font-size:13px;> <div class="col-8 d-grid"><button type='button' class='btn btn-sammo-base2 refreshPage'>갱 신</button></div>
<option value=1>1턴</option> <div class="col-4 d-grid"><button type='button' class='btn btn-sammo-base2' onclick="location.replace('../')">로비로</button></div>
<option value=2>2턴</option> </div>
<option value=3>3턴</option> </div>
<option value=4>4턴</option> </div>
<option value=5>5턴</option> </div>
<option value=6>6턴</option> <div id="cityInfo" class="view-item" style="border:none;text-align:center;"><?= cityInfo($generalObj) ?></div>
<option value=7>7턴</option> <div id="nation-position"><?php myNationInfo($generalObj); ?></div>
<option value=8>8턴</option> <div id="general-position"><?php generalInfo($generalObj); ?></div>
<option value=9>9턴</option> <div id="generalCommandButton" class="row gx-0">
<option value=10>10턴</option> <div class="buttonPlate bg2"><?= commandButton(['btnClass' => 'btn btn-sammo-nation']) ?></div>
<option value=11>11턴</option> </div>
<option value=12>12턴</option> </div>
</select </div>
><input type=button value='반복' id='repeatTurn' <div id="actionMiniPlateSub" class="gx-0 row">
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:70px;font-size:13px;margin-left:1ch;margin-right:2ch;' <div class="col">
><input type=button value='▼미루기' id='pushTurn' <div class="gx-1 row">
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:80px;font-size:13px;' <div class="col-3 d-grid"><button type='button' class="btn btn-dark" onclick="scrollHardTo('reservedCommandList')">명령으로</button></div>
><input type=button value='▲당기기' id='pullTurn' <div class="col-5 d-grid"><button type='button' class='btn btn-sammo-base2 refreshPage'>갱 신</button></div>
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:80px;font-size:13px;' <div class="col-4 d-grid"><button type='button' class='btn btn-sammo-base2' onclick="location.replace('../')">로비로</button></div>
></td> </div>
</tr> </div>
<tr> </div>
<td align=right style="width:650px;border:none;"><br> <div class="row gx-0">
<?php printCommandTable($generalObj)?> <div class="col-md-6" id="general_public_record-position">
<input type=button value='실 행' id="reserveTurn" <div class="bg1 center s-border-tb"><b>장수 동향</b></div>
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:110px;font-size:13px;' <div id="general_public_record" style="text-align:left;"><?= formatHistoryToHTML(getGlobalActionLogRecent(15)) ?></div>
><input type=button value='갱 신' id='refreshPage' </div>
style='background-color:<?=GameConst::$basecolor2?>;color:white;width:110px;font-size:13px;' <div class="col-md-6" id="general_log-position">
><input type=button value='로비로' onclick="location.replace('../')" <div class="bg1 center s-border-tb"><b>개인 기록</b></div>
style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;font-size:13px; <div id="general_log" style="text-align:left;"><?= formatHistoryToHTML(getGeneralActionLogRecent($me['no'], 15)) ?></div>
> </div>
</td> <div class="col-12" id="world_history-position">
</tr> <div class="bg1 center s-border-tb"><b>중원 정세</b></div>
</table> <div id="world_history" colspan=2 style="text-align:left;"><?= formatHistoryToHTML(getGlobalHistoryLogRecent(15)) ?></div>
<table class="tb_layout bg0" style="width:1000px;"> </div>
<tr> </div>
<td width=498 style="border:none;"><?php myNationInfo($generalObj); ?></td> <div class="row toolbars gx-0">
<td width=498 style="border:none;"><?php generalInfo($generalObj); ?></td> <div class="buttonPlate"><?= allButton($gameStor->npcmode == 1) ?></div>
</tr>
<tr><td colspan=2><?=commandButton()?></td></tr>
</table>
<table class="tb_layout bg0" id='history_position'>
<tr>
<td width=498 class='bg1 center'><b>장수 동향</b></td>
<td width=498 class='bg1 center'><b>개인 기록</b></td>
</tr>
<tr>
<td width=498 id="general_public_record" style="text-align:left;"><?=formatHistoryToHTML(getGlobalActionLogRecent(15))?></td>
<td width=498 id="general_log" style="text-align:left;"><?=formatHistoryToHTML(getGeneralActionLogRecent($me['no'], 15))?></td>
</tr>
<tr><td width=998 colspan=2 class='bg1 center'><b>중원 정세</b></td></tr>
<tr><td width=998 id="world_history" colspan=2 style="text-align:left;"><?=formatHistoryToHTML(getGlobalHistoryLogRecent(15))?></td></tr>
</table>
<div class="message_input_form bg0">
<select id="mailbox_list" size="1">
<select name="genlist" size="1" style="color:white;background-color:black;font-size:13px">
<div id="message_board" class="row gx-0">
<div class="message_input_form bg0 gx-0 row">
<div id="mailbox_list-col" class="col-6 col-md-2 d-grid">
<select id="mailbox_list" size="1" class="form-control bg-dark text-white">
</select> </select>
<input type="textarea" id="msg_input" maxlength="99">
<button id="msg_submit">서신전달&amp;갱신</button><br>
내용 없이 '서신전달&amp;갱신'을 누르면 메세지창이 갱신됩니다.
</div> </div>
<div><?=allButton($gameStor->npcmode==1)?></div> <div id="msg_input-col" class="col-12 col-md-8 d-grid">
<div id="message_board"><div style="left:0;" class="board_side bg0"> <input type="text" id="msg_input" maxlength="99" class="form-control">
<div class="board_header bg0" id='public_talk_position'>전체 메시지(최고99자)</div> </div>
<div id="msg_submit-col" class="col-6 col-md-2 d-grid"><button id="msg_submit" class="btn btn-primary">서신전달&amp;갱신</button></div>
</div>
<div class="col-md-6 board_side bg0"><a id="public_talk_position"></a>
<div class="board_header bg0">전체 메시지(최고99자)</div>
<section class="public_message"> <section class="public_message">
<button type="button" class="load_old_message btn btn-secondary btn-block" data-msg_type="public">이전 메시지 불러오기</button> <div class="d-grid"><button type="button" class="load_old_message btn btn-secondary" data-msg_type="public">이전 메시지 불러오기</button></div>
</section> </section>
<div class="board_header bg0" id='secret_talk_position'>개인 메시지(최고99자)</div> </div>
<section class="private_message"> <div class="col-md-6 board_side bg0"><a id="national_talk_position"></a>
<button type="button" class="load_old_message btn btn-secondary btn-block" data-msg_type="private">이전 메시지 불러오기</button>
</section>
</div><div style="right:0;" class="board_side bg0">
<div class="board_header bg0">국가 메시지(최고99자)</div> <div class="board_header bg0">국가 메시지(최고99자)</div>
<section class="national_message"> <section class="national_message">
<button type="button" class="load_old_message btn btn-secondary btn-block" data-msg_type="national">이전 메시지 불러오기</button> <div class="d-grid"><button type="button" class="load_old_message btn btn-secondary" data-msg_type="national">이전 메시지 불러오기</button></div>
</section> </section>
</div>
<div class="col-md-6 board_side bg0"><a id="private_talk_position"></a>
<div class="board_header bg0">개인 메시지(최고99자)</div>
<section class="private_message">
<div class="d-grid"><button type="button" class="load_old_message btn btn-secondary" data-msg_type="private">이전 메시지 불러오기</button></div>
</section>
</div>
<div class="col-md-6 board_side bg0"><a id="diplomacy_talk_position"></a>
<div class="board_header bg0">외교 메시지(최고99자)</div> <div class="board_header bg0">외교 메시지(최고99자)</div>
<section class="diplomacy_message"> <section class="diplomacy_message">
<button type="button" class="load_old_message btn btn-secondary btn-block" data-msg_type="diplomacy">이전 메시지 불러오기</button> <div class="d-grid"><button type="button" class="load_old_message btn btn-secondary" data-msg_type="diplomacy">이전 메시지 불러오기</button></div>
</section> </section>
</div></div> </div>
<div style="clear:left;"><?=allButton($gameStor->npcmode==1)?><?=banner()?></div> </div>
<div class="row toolbars gx-0">
<div class="buttonPlate"><?= allButton($gameStor->npcmode == 1) ?></div><?= banner() ?>
</div>
</div> </div>
<?php <?php
if ($con == 1) { if ($con == 1) {
@@ -369,5 +335,65 @@ if ($me['newvote'] == 1) {
MessageBox("설문조사에 참여하시면 금{$develcost}과 유니크템을 드립니다! (우측 상단 설문조사 메뉴)"); MessageBox("설문조사에 참여하시면 금{$develcost}과 유니크템을 드립니다! (우측 상단 설문조사 메뉴)");
} }
?> ?>
</div>
<nav class="navbar navbar-expand fixed-bottom navbar-dark bg-dark d-sm-block d-md-none p-0" id="navbar500">
<div class="container-fluid">
<div class="collapse navbar-collapse">
<ul class="navbar-nav me-auto mx-auto">
<li class="nav-item dropup">
<div class="dropdown-toggle text-white btn btn-sammo-base2" id="navbarGlobal" role="button" data-bs-toggle="dropdown" aria-expanded="false">
외부 메뉴
</div>
<ul class="dropdown-menu dropdown-menu-start" aria-labelledby="navbarGlobal" id="navbarGlobalItems">
<?= allButton($gameStor->npcmode == 1, ['btnBegin' => '<li>', 'btnEnd' => '</li>', 'btnClass' => 'dropdown-item']) ?>
</ul>
</li>
<li class="nav-item dropup">
<div class="dropdown-toggle btn btn-sammo-nation" id="navbarNation" role="button" data-bs-toggle="dropdown" aria-expanded="false">
국가 메뉴
</div>
<ul class="dropdown-menu" aria-labelledby="navbarNation" id="navbarNationItems">
<?= commandButton(['btnBegin' => '<li>', 'btnEnd' => '</li>', 'btnClass' => 'dropdown-item']) ?>
</ul>
</li>
<li class="nav-item dropup">
<div class="dropdown-toggle text-white btn btn-dark" id="navbarQuick" role="button" data-bs-toggle="dropdown" aria-expanded="false">
빠른 이동
</div>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown" id="navbarQuickItems">
<li><a class="dropdown-item disabled">국가 정보</a></button></li>
<hr class="dropdown-divider">
</hr>
<li><button type="button" onclick="scrollHardTo('nation-msg-position')" class="dropdown-item">방침</button></li>
<li><button type="button" onclick="scrollHardTo('reservedCommandList')" class="dropdown-item">명령</button></li>
<li><button type="button" onclick="scrollHardTo('nation-position')" class="dropdown-item">국가</button></li>
<li><button type="button" onclick="scrollHardTo('general-position')" class="dropdown-item">장수</button></li>
<li><button type="button" onclick="scrollHardTo('cityInfo')" class="dropdown-item">도시</button></li>
<li><a class="dropdown-item disabled">동향 정보</a></button></li>
<hr class="dropdown-divider">
</hr>
<li><button type="button" onclick="scrollHardTo('mapZone')" class="dropdown-item">지도</button></li>
<li><button type="button" onclick="scrollHardTo('general_public_record-position')" class="dropdown-item">동향</button></li>
<li><button type="button" onclick="scrollHardTo('general_log-position')" class="dropdown-item">개인</button></li>
<li><button type="button" onclick="scrollHardTo('world_history-position')" class="dropdown-item">정세</button></li>
<li><span>&nbsp;</span></li>
<li><a class="dropdown-item disabled">메시지</a></button></li>
<hr class="dropdown-divider">
</hr>
<li><button type="button" onclick="scrollHardTo('public_talk_position')" class="dropdown-item">전체</button></li>
<li><button type="button" onclick="scrollHardTo('national_talk_position')" class="dropdown-item">국가</button></li>
<li><button type="button" onclick="scrollHardTo('private_talk_position')" class="dropdown-item">개인</button></li>
<li><button type="button" onclick="scrollHardTo('diplomacy_talk_position')" class="dropdown-item">외교</button></li>
<li><button type='button' class='btn btn-sammo-base2' onclick="location.replace('../')">로비로</button></li>
</ul>
</li>
<li class="nav-item">
<a class="refreshPage btn btn-sammo-base2 text-white" role="button">갱신</a>
</li>
</ul>
</div>
</div>
</nav>
</body> </body>
</html> </html>
+89 -192
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -23,20 +24,19 @@ if($session->userGrade < 5 && !$allowReset){
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>설치</title> <title>설치</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/install.js')?>
<?=WebUtil::printCSS('css/normalize.css')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('css/install.css') ?> <?= WebUtil::printCSS('css/install.css') ?>
<?= WebUtil::printDist('ts', ['common', 'install']) ?>
</head> </head>
<body> <body>
<div class="container" style="min-width:720px;"> <div class="container">
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 리셋</h1> <h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 리셋</h1>
<div class="row justify-content-md-center"> <div class="row justify-content-md-center">
@@ -51,31 +51,15 @@ if($session->userGrade < 5 && !$allowReset){
<div class="form-group row"> <div class="form-group row">
<label for="turnterm" class="col-sm-3 col-form-label">턴 시간(분)</label> <label for="turnterm" class="col-sm-3 col-form-label">턴 시간(분)</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div id="turnterm" class="btn-group btn-group-toggle" data-toggle="buttons"> <div id="turnterm" class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<label class="btn btn-secondary"> <input type="radio" class="btn-check" name="turnterm" id="turnterm_120" value="120"><label for="turnterm_120" class="btn btn-secondary">120</label>
<input type="radio" name="turnterm" value="120">120 <input type="radio" class="btn-check" name="turnterm" id="turnterm_60" value="60" checked><label for="turnterm_60" class="btn btn-secondary">60</label>
</label> <input type="radio" class="btn-check" name="turnterm" id="turnterm_30" value="30"><label for="turnterm_30" class="btn btn-secondary">30</label>
<label class="btn btn-secondary active"> <input type="radio" class="btn-check" name="turnterm" id="turnterm_20" value="20"><label for="turnterm_20" class="btn btn-secondary">20</label>
<input type="radio" name="turnterm" value="60" checked>60 <input type="radio" class="btn-check" name="turnterm" id="turnterm_10" value="10"><label for="turnterm_10" class="btn btn-secondary">10</label>
</label> <input type="radio" class="btn-check" name="turnterm" id="turnterm_5" value="5"><label for="turnterm_5" class="btn btn-secondary">5</label>
<label class="btn btn-secondary"> <input type="radio" class="btn-check" name="turnterm" id="turnterm_2" value="2"><label for="turnterm_2" class="btn btn-secondary">2</label>
<input type="radio" name="turnterm" value="30">30 <input type="radio" class="btn-check" name="turnterm" id="turnterm_1" value="1"><label for="turnterm_1" class="btn btn-secondary">1</label>
</label>
<label class="btn btn-secondary">
<input type="radio" name="turnterm" value="20">20
</label>
<label class="btn btn-secondary">
<input type="radio" name="turnterm" value="10">10
</label>
<label class="btn btn-secondary">
<input type="radio" name="turnterm" value="5">5
</label>
<label class="btn btn-secondary">
<input type="radio" name="turnterm" value="2">2
</label>
<label class="btn btn-secondary">
<input type="radio" name="turnterm" value="1">1
</label>
</div> </div>
</div> </div>
</div> </div>
@@ -84,13 +68,9 @@ if($session->userGrade < 5 && !$allowReset){
<div class="form-group row"> <div class="form-group row">
<label for="sync" class="col-sm-3 col-form-label">시간 동기화</label> <label for="sync" class="col-sm-3 col-form-label">시간 동기화</label>
<div class="col-sm-9" style="display: inline-flex;"> <div class="col-sm-9" style="display: inline-flex;">
<div id="sync" class="btn-group btn-group-toggle" data-toggle="buttons"> <div id="sync" class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<label class="btn btn-secondary active"> <input class="btn-check" id="sync_1" type="radio" name="sync" value="1" checked><label class="btn btn-secondary" for="sync_1">Y</label>
<input type="radio" name="sync" value="1" checked>Y <input class="btn-check" id="sync_0" type="radio" name="sync" value="0"><label class="btn btn-secondary" for="sync_0">N</label>
</label>
<label class="btn btn-secondary">
<input type="radio" name="sync" value="0">N
</label>
</div> </div>
<small class="text-muted"> <small class="text-muted">
@@ -111,13 +91,9 @@ if($session->userGrade < 5 && !$allowReset){
<div class="form-group row"> <div class="form-group row">
<label for="fiction" class="col-sm-3 col-form-label">NPC 상성</label> <label for="fiction" class="col-sm-3 col-form-label">NPC 상성</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div id="fiction" class="btn-group btn-group-toggle" data-toggle="buttons"> <div id="fiction" class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<label class="btn btn-secondary active"> <input type="radio" id="fiction_0" class="btn-check" name="fiction" value="0" checked><label for="fiction_0" class="btn btn-secondary"> 연의 </label>
<input type="radio" name="fiction" value="0" checked>연의 <input type="radio" id="fiction_1" class="btn-check" name="fiction" value="1"><label for="fiction_1" class="btn btn-secondary"> 가상 </label>
</label>
<label class="btn btn-secondary">
<input type="radio" name="fiction" value="1">가상
</label>
</div> </div>
</div> </div>
</div> </div>
@@ -125,13 +101,9 @@ if($session->userGrade < 5 && !$allowReset){
<div class="form-group row"> <div class="form-group row">
<label for="extend" class="col-sm-3 col-form-label">확장 NPC</label> <label for="extend" class="col-sm-3 col-form-label">확장 NPC</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div id="extend" class="btn-group btn-group-toggle" data-toggle="buttons"> <div id="extend" class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<label class="btn btn-secondary active"> <input type="radio" id="extend_1" class="btn-check" name="extend" value="1" checked><label for="extend_1" class="btn btn-secondary">포함</label>
<input type="radio" name="extend" value="1" checked>포함 <input type="radio" id="extend_0" class="btn-check" name="extend" value="0"><label for="extend_0" class="btn btn-secondary">미포함</label>
</label>
<label class="btn btn-secondary">
<input type="radio" name="extend" value="0">미포함
</label>
</div> </div>
</div> </div>
</div> </div>
@@ -139,13 +111,9 @@ if($session->userGrade < 5 && !$allowReset){
<div class="form-group row"> <div class="form-group row">
<label for="block_general_create" class="col-sm-3 col-form-label">장수 임의 생성</label> <label for="block_general_create" class="col-sm-3 col-form-label">장수 임의 생성</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div id="block_general_create" class="btn-group btn-group-toggle" data-toggle="buttons"> <div id="block_general_create" class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<label class="btn btn-secondary"> <input type="radio" class="btn-check" id="block_general_create_0" name="block_general_create" value="0" checked><label for="block_general_create_0" class="btn btn-secondary">가능</label>
<input type="radio" name="block_general_create" value="0" checked>가능 <input type="radio" class="btn-check" id="block_general_create_1" name="block_general_create" value="1"><label for="block_general_create_1" class="btn btn-secondary">불가</label>
</label>
<label class="btn btn-secondary active">
<input type="radio" name="block_general_create" value="1">불가
</label>
</div> </div>
</div> </div>
</div> </div>
@@ -153,16 +121,10 @@ if($session->userGrade < 5 && !$allowReset){
<div class="form-group row"> <div class="form-group row">
<label for="npcmode" class="col-sm-3 col-form-label">NPC 빙의</label> <label for="npcmode" class="col-sm-3 col-form-label">NPC 빙의</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div id="npcmode" class="btn-group btn-group-toggle" data-toggle="buttons"> <div id="npcmode" class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<label class="btn btn-secondary"> <input type="radio" id="npcmode_1" class="btn-check" name="npcmode" value="1"><label for="npcmode_1" class="btn btn-secondary"> 가능 </label>
<input type="radio" name="npcmode" value="1">가능 <input type="radio" id="npcmode_0" class="btn-check" name="npcmode" value="0" checked><label for="npcmode_0" class="btn btn-secondary"> 불가 </label>
</label> <input type="radio" id="npcmode_2" class="btn-check" name="npcmode" value="2"><label for="npcmode_2" class="btn btn-secondary"> 선택 생성 가능 </label>
<label class="btn btn-secondary active">
<input type="radio" name="npcmode" value="0" checked>불가
</label>
<label class="btn btn-secondary">
<input type="radio" name="npcmode" value="2">선택 생성 가능
</label>
</div> </div>
</div> </div>
</div> </div>
@@ -171,31 +133,20 @@ if($session->userGrade < 5 && !$allowReset){
<label class="col-sm-3 col-form-label" id="autorun_set_label">휴식 턴 시 장수 턴</label> <label class="col-sm-3 col-form-label" id="autorun_set_label">휴식 턴 시 장수 턴</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend btn-group btn-group-toggle" data-toggle="buttons"> <div class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<label class="btn btn-secondary"> <input type="checkbox" id="autorun_develop" class="autorun_user_chk btn-check" data-key="develop" name="autorun_user[]" value="develop"><label class="btn btn-secondary" for="autorun_develop">내정</label>
<input type="checkbox" class="autorun_user_chk" data-key="develop" name="autorun_user[]" value="develop">내정 <input type="checkbox" id="autorun_warp" class="autorun_user_chk btn-check" data-key="warp" name="autorun_user[]" value="warp"><label class="btn btn-secondary" for="autorun_warp">순간이동</label>
</label> <input type="checkbox" id="autorun_recruit" class="autorun_user_chk btn-check" data-key="recruit" name="autorun_user[]" value="recruit"><label class="btn btn-secondary" for="autorun_recruit">징병</label>
<label class="btn btn-secondary"> <input type="checkbox" id="autorun_recruit_high" class="autorun_user_chk btn-check" data-key="recruit_high" name="autorun_user[]" value="recruit_high"><label class="btn btn-secondary" for="autorun_recruit_high">모병</label>
<input type="checkbox" class="autorun_user_chk" data-key="warp" name="autorun_user[]" value="warp">순간이동 <input type="checkbox" id="autorun_train" class="autorun_user_chk btn-check" data-key="train" name="autorun_user[]" value="train"><label class="btn btn-secondary" for="autorun_train">훈사</label>
</label> <input type="checkbox" id="autorun_battle" class="autorun_user_chk btn-check" data-key="battle" name="autorun_user[]" value="battle"><label class="btn btn-secondary" for="autorun_battle">출병</label>
<label class="btn btn-secondary"> <input type="checkbox" id="autorun_chief" class="autorun_user_chk btn-check" data-key="chief" name="autorun_user[]" value="chief"><label class="btn btn-secondary" for="autorun_chief">기본 사령턴</label>
<input type="checkbox" class="autorun_user_chk" data-key="recruit" name="autorun_user[]" value="recruit">징병
</label>
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="recruit_high" name="autorun_user[]" value="recruit_high">모병
</label>
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="train" name="autorun_user[]" value="train">훈사
</label>
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="battle" name="autorun_user[]" value="battle">출병
</label>
<label class="btn btn-secondary">
<input type="checkbox" class="autorun_user_chk" data-key="chief" name="autorun_user[]" value="chief">기본 사령턴
</label>
</div> </div>
<div class="input-group-append"> </div>
<span class="input-group-text">유효 시간</span> </div>
<div class="col-sm-6 offset-sm-3">
<div class="input-group">
<div class="input-group-text">유효 시간
</div> </div>
<select class="custom-select" name="autorun_user_minutes" id="autorun_user_minutes"> <select class="custom-select" name="autorun_user_minutes" id="autorun_user_minutes">
<option value="0" selected>꺼짐</option> <option value="0" selected>꺼짐</option>
@@ -220,61 +171,12 @@ if($session->userGrade < 5 && !$allowReset){
</div> </div>
</div> </div>
</div> </div>
<!--
<div class="form-group row">
<label class="col-sm-3 col-form-label">휴식 턴 시 사령 턴</label>
<div class="col-sm-9">
<div class="input-group">
<div class="input-group-prepend btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary">
<input type="radio" name="autorun_chief_reward" id="autorun_chief_reward">포상/몰수
</label>
<label class="btn btn-secondary">
<input type="radio" name="autorun_chief_warp" id="autorun_chief_warp">발령
</label>
<label class="btn btn-secondary">
<input type="radio" name="autorun_chief_declaration" id="autorun_chief_declaration">선포
</label>
</div>
<div class="input-group-append">
<span class="input-group-text">유효 시간</span>
</div>
<select class="custom-select" name="autorun_chief_minutes" id="autorun_chief_minutes">
<option value="0" selected>꺼짐</option>
<option value="43200">항상</option>
<option value="10">10분</option>
<option value="20">20분</option>
<option value="30">30분</option>
<option value="60">1시간</option>
<option value="120">2시간</option>
<option value="180">3시간</option>
<option value="240">4시간</option>
<option value="360">6시간</option>
<option value="480">8시간</option>
<option value="600">10시간</option>
<option value="720">12시간</option>
<option value="1440">24시간</option>
<option value="2160">36시간</option>
<option value="2880">48시간</option>
<option value="3600">60시간</option>
<option value="4320">72시간</option>
</select>
</div>
</div>
</div>
-->
<div class="form-group row"> <div class="form-group row">
<label for="join_mode" class="col-sm-3 col-form-label">임관 모드</label> <label for="join_mode" class="col-sm-3 col-form-label">임관 모드</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div id="join_mode" class="btn-group btn-group-toggle" data-toggle="buttons"> <div id="join_mode" class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<label class="btn btn-secondary active"> <input class="btn-check" id="join_mode_full" type="radio" name="join_mode" value="full" checked><label class="btn btn-secondary" for="join_mode_full">일반</label>
<input type="radio" name="join_mode" value="full" checked>일반 <input class="btn-check" id="join_mode_onlyRandom" type="radio" name="join_mode" value="onlyRandom"><label class="btn btn-secondary" for="join_mode_onlyRandom">랜덤 임관</label>
</label>
<label class="btn btn-secondary">
<input type="radio" name="join_mode" value="onlyRandom">랜덤 임관
</label>
</div> </div>
</div> </div>
</div> </div>
@@ -282,51 +184,27 @@ if($session->userGrade < 5 && !$allowReset){
<div class="form-group row"> <div class="form-group row">
<label for="show_img_level" class="col-sm-3 col-form-label">이미지 표기</label> <label for="show_img_level" class="col-sm-3 col-form-label">이미지 표기</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div id="show_img_level" class="btn-group btn-group-toggle" data-toggle="buttons"> <div id="show_img_level" class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<label class="btn btn-secondary"> <input type="radio" id="show_img_level_0" class="btn-check" name="show_img_level" value="0"><label for="show_img_level_0" class="btn btn-secondary">안함</label>
<input type="radio" name="show_img_level" value="0">안함 <input type="radio" id="show_img_level_1" class="btn-check" name="show_img_level" value="1"><label for="show_img_level_1" class="btn btn-secondary">전콘</label>
</label> <input type="radio" id="show_img_level_2" class="btn-check" name="show_img_level" value="2"><label for="show_img_level_2" class="btn btn-secondary">전콘, 병종</label>
<label class="btn btn-secondary"> <input type="radio" id="show_img_level_3" class="btn-check" name="show_img_level" value="3" checked><label for="show_img_level_3" class="btn btn-secondary">전콘, 병종, NPC</label>
<input type="radio" name="show_img_level" value="1">전콘
</label>
<label class="btn btn-secondary">
<input type="radio" name="show_img_level" value="2">전콘, 병종
</label>
<label class="btn btn-secondary active">
<input type="radio" name="show_img_level" value="3" checked>전콘, 병종, NPC
</label>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="tournament_trig" class="col-sm-3 col-form-label">토너먼트 자동 시작<br>경기 단위</label> <label for="tournament_trig" class="col-sm-3 col-form-label"><span class="text-nowrap">토너먼트 자동 시작</span> <span class="text-nowrap">경기 단위</span></label>
<div class="col-sm-9" id="tournament_trig"> <div class="col-sm-9" id="tournament_trig">
<div id="tournament_trig" class="btn-group-toggle btn-group flex-wrap" data-toggle="buttons"> <div id="tournament_trig" class="btn-group-toggle btn-group flex-wrap" data-bs-toggle="buttons">
<label class="btn btn-secondary w-25"> <input type="radio" class="btn-check" id="tournament_trig_0" name="tournament_trig" value="0"><label for="tournament_trig_0" class="btn btn-secondary w-25">안함</label>
<input type="radio" name="tournament_trig" value="0">안함 <input type="radio" class="btn-check" id="tournament_trig_1" name="tournament_trig" value="1"><label for="tournament_trig_1" class="btn btn-secondary w-25">12분(총 5일)</label>
</label> <input type="radio" class="btn-check" id="tournament_trig_2" name="tournament_trig" value="2"><label for="tournament_trig_2" class="btn btn-secondary w-25">7분(총 10시간)</label>
<label class="btn btn-secondary w-25"> <input type="radio" class="btn-check" id="tournament_trig_3" name="tournament_trig" value="3"><label for="tournament_trig_3" class="btn btn-secondary w-25">3분(총 4시간)</label>
<input type="radio" name="tournament_trig" value="1">12분(총 5일) <input type="radio" class="btn-check" id="tournament_trig_4" name="tournament_trig" value="4" checked><label for="tournament_trig_4" class="btn btn-secondary w-25">1분(총 82분)</label>
</label> <input type="radio" class="btn-check" id="tournament_trig_5" name="tournament_trig" value="5"><label for="tournament_trig_5" class="btn btn-secondary w-25">30초(총 41분)</label>
<label class="btn btn-secondary w-25"> <input type="radio" class="btn-check" id="tournament_trig_6" name="tournament_trig" value="6"><label for="tournament_trig_6" class="btn btn-secondary w-25">15초(총 21분)</label>
<input type="radio" name="tournament_trig" value="2">7분(총 10시간) <input type="radio" class="btn-check" id="tournament_trig_7" name="tournament_trig" value="7"><label for="tournament_trig_7" class="btn btn-secondary w-25">5초(총 7분)</label>
</label>
<label class="btn btn-secondary w-25">
<input type="radio" name="tournament_trig" value="3">3분(총 4시간)
</label>
<label class="btn btn-secondary w-25 active">
<input type="radio" name="tournament_trig" value="4" checked>1분(총 82분)
</label>
<label class="btn btn-secondary w-25">
<input type="radio" name="tournament_trig" value="5">30초(총 41분)
</label>
<label class="btn btn-secondary w-25">
<input type="radio" name="tournament_trig" value="6">15초(총 21분)
</label>
<label class="btn btn-secondary w-25">
<input type="radio" name="tournament_trig" value="7">5초(총 7분)
</label>
</div> </div>
</div> </div>
</div> </div>
@@ -347,7 +225,7 @@ if($session->userGrade < 5 && !$allowReset){
<div class="form-group row"> <div class="form-group row">
<div class="col-sm-3"></div> <div class="col-sm-3"></div>
<div class="col-sm-9"> <div class="col-sm-9 d-grid">
<input type="submit" class="btn btn-primary btn-lg btn-block login-button" value="리셋 개시"> <input type="submit" class="btn btn-primary btn-lg btn-block login-button" value="리셋 개시">
</div> </div>
</div> </div>
@@ -355,25 +233,44 @@ if($session->userGrade < 5 && !$allowReset){
</div> </div>
<h4 class="card-header">시나리오 정보</h4> <h4 class="card-header">시나리오 정보</h4>
<table class="table table-striped"> <table class="table table-striped">
<colgroup><col style="width:100px;"><col></colgroup> <colgroup>
<col style="width:100px;">
<col>
</colgroup>
<thead> <thead>
<tr><th>설정</th><th>값</th> <tr>
<th>설정</th>
<th>값</th>
</thead> </thead>
<tbody> <tbody>
<tr><th>시작 연도</th><td ><span id="scenario_begin">180년</span><small id="scenario_begin_with_sync"></small></td></tr> <tr>
<tr><th>NPC 수</th><td><span id="scenario_npc"></span><span id="scenario_npc_extend"></span></td></tr> <th>시작 연도</th>
<tr><th>국가</th><td><span id="scenario_nation"></span></td></tr> <td><span id="scenario_begin">180년</span><small id="scenario_begin_with_sync"></small>
</td>
</tr>
<tr>
<th>NPC 수</th>
<td><span id="scenario_npc"></span><span id="scenario_npc_extend"></span></td>
</tr>
<tr>
<th>국가</th>
<td><span id="scenario_nation"></span></td>
</tr>
</tbody> </tbody>
<tfoot> <tfoot>
<tr><td colspan="2"> <tr>
<td colspan="2">
</td></tr> </td>
</tr>
</tfoot> </tfoot>
</table> </table>
</div><!--GAME 폼 끝--> </div>
<!--GAME 폼 끝-->
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
+8 -5
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -16,18 +17,18 @@ if($session->userGrade == 5){
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>설치</title> <title>설치</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?=WebUtil::printJS('dist_js/vendors.js')?>
<?=WebUtil::printJS('dist_js/install_db.js')?>
<?= WebUtil::printCSS('css/normalize.css') ?> <?= WebUtil::printCSS('css/normalize.css') ?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?= WebUtil::printCSS('css/install.css') ?> <?= WebUtil::printCSS('css/install.css') ?>
<?= WebUtil::printDist('ts', ['common', 'install_db']) ?>
</head> </head>
<body> <body>
<div class="container" style="min-width:720px;"> <div class="container" style="min-width:720px;">
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 리셋</h1> <h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 리셋</h1>
@@ -44,7 +45,7 @@ if($session->userGrade == 5){
<div class="form-group row"> <div class="form-group row">
<label for="full_reset" class="col-sm-3 col-form-label">이전 DB 초기화</label> <label for="full_reset" class="col-sm-3 col-form-label">이전 DB 초기화</label>
<div class="col-sm-9" style="display: inline-flex;"> <div class="col-sm-9" style="display: inline-flex;">
<div id="full_reset" class="btn-group btn-group-toggle" data-toggle="buttons"> <div id="full_reset" class="btn-group btn-group-toggle" data-bs-toggle="buttons">
<label class="btn btn-secondary"> <label class="btn btn-secondary">
<input type="radio" name="full_reset" value="1">Y <input type="radio" name="full_reset" value="1">Y
</label> </label>
@@ -104,10 +105,12 @@ if($session->userGrade == 5){
</div> </div>
</form> </form>
</div> </div>
</div><!--DB 폼 끝--> </div>
<!--DB 폼 끝-->
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
-42
View File
@@ -1,42 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
WebUtil::requireAJAX();
$session = Session::requireGameLogin([])->setReadOnly();
$generalID = $session->generalID;
$turnAmount = Util::getPost('amount', 'int');
$isRepeat = Util::getPost('is_repeat', 'bool', false);
if($turnAmount == null){
Json::die([
'result'=>false,
'reason'=>'턴이 입력되지 않았습니다.',
]);
}
if(abs($turnAmount) >= GameConst::$maxTurn){
Json::die([
'result'=>false,
'reason'=>'턴 숫자가 올바르지 않습니다.',
]);
}
if($isRepeat){
repeatGeneralCommand($generalID, $turnAmount);
}
else{
pushGeneralCommand($generalID, $turnAmount);
}
Json::die([
'result'=>true,
'reason'=>'success',
]);
-46
View File
@@ -1,46 +0,0 @@
<?php
namespace sammo;
include "lib.php";
include "func.php";
$session = Session::requireGameLogin([])->setReadOnly();
$db = DB::db();
$commandList = [];
$gameStor = KVStorage::getStorage($db, 'game_env');
$generalID = $session->generalID;
$rawTurn = $db->queryAllLists('SELECT turn_idx, action, arg, brief FROM general_turn WHERE general_id = %i ORDER BY turn_idx ASC', $generalID);
foreach($rawTurn as [$turn_idx, $action, $arg, $brief]){
$commandList[$turn_idx] = [
'action'=>$action,
'brief'=>$brief,
'arg'=>Json::decode($arg)
];
}
[$turnTerm, $year, $month, $lastExecute] = $gameStor->getValuesAsArray(['turnterm', 'year', 'month', 'turntime']);
$turnTime = $db->queryFirstField('SELECT turntime FROM general WHERE no=%i', $generalID);
if(cutTurn($turnTime, $turnTerm) > cutTurn($lastExecute, $turnTerm)){
//이미 이번달에 실행된 턴이다.
$month++;
if($month >= 13){
$month -= 12;
$year += 1;
}
}
Json::die([
'result'=>true,
'turnTime'=>$turnTime,
'turnTerm'=>$turnTerm,
'year'=>$year,
'month'=>$month,
'date'=>TimeUtil::now(true),
'turn'=>$commandList
]);
-111
View File
@@ -1,111 +0,0 @@
<?php
namespace sammo;
include 'lib.php';
include 'func.php';
WebUtil::requireAJAX();
$session = Session::requireGameLogin([])->setReadOnly();
$userID = $session::getUserID();
$serverID = UniqueConst::$serverID;
$image = $_FILES['img'];
switch ($image['error']) {
case UPLOAD_ERR_OK:
break;
case UPLOAD_ERR_NO_FILE:
Json::die([
'result'=>false,
'reason'=>'파일이 없습니다.'
]);
case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE:
Json::die([
'result'=>false,
'reason'=>'업로드된 파일이 지나치게 큽니다.'
]);
default:
Json::die([
'result'=>false,
'reason'=>'업로드되지 않았습니다.'
]);
}
if(!is_uploaded_file($image['tmp_name'])) {
Json::die([
'result'=>false,
'reason'=>'제대로 파일이 업로드되지 않았습니다.'
]);
}
if($image['size'] > 1048576) {
//파일크기 검사
Json::die([
'result'=>false,
'reason'=>'1MB 이하로 올려주세요!'
]);
}
$size = getImageSize($image['tmp_name']);
$imageType = $size[2];
$availableImageType = array('.jpg'=>IMAGETYPE_JPEG, '.png'=>IMAGETYPE_PNG, '.gif'=>IMAGETYPE_GIF);
$newExt = array_search($imageType, $availableImageType, true);
if(!$newExt) {
Json::die([
'result'=>false,
'reason'=>'jpg, gif, png 파일이 아닙니다!'
]);
}
$db = RootDB::db();
$imgStor = KVStorage::getStorage($db, 'img_storage');
$picName = hash_file('md5', $image['tmp_name']);
$newPicName = "$picName$newExt";
$destDir = AppConf::getUserIconPathFS().'/uploaded_image';
$dest = $destDir.'/'.$newPicName;
if(!file_exists($dest)){
if (!file_exists($destDir)) {
mkdir($destDir);
}
if(!is_dir($destDir)) {
Json::die([
'result'=>false,
'reason'=>'버그! 업로드 경로 확인!'
]);
}
if(!is_writable($destDir)){
Json::die([
'result'=>false,
'reason'=>'버그! 업로드 권한 확인!'
]);
}
$dest = $destDir.'/'.$newPicName;
if(!move_uploaded_file($image['tmp_name'], $dest)) {
Json::die([
'result'=>false,
'reason'=>'업로드에 실패했습니다!'
]);
}
}
$storedStatus = $imgStor->$newPicName??[];
$imgKey = "$serverID:$userID";
if(!key_exists($imgKey, $storedStatus)){
$storedStatus[$imgKey] = TimeUtil::now();
}
$imgStor->$newPicName = $storedStatus;
Json::die([
'result'=>true,
'reason'=>'성공',
'path'=>AppConf::getUserIconPathWeb().'/uploaded_image/'.$newPicName
]);
+2
View File
@@ -47,6 +47,8 @@ if($msg === null){
]); ]);
} }
$reason = 'success'; $reason = 'success';
$gameStor = KVStorage::getStorage(DB::db(), 'game_env');
$gameStor->cacheAll();
if($msgResponse){ if($msgResponse){
$result = $msg->agreeMessage($general['no'], $reason); $result = $msg->agreeMessage($general['no'], $reason);
} }
+4 -4
View File
@@ -83,7 +83,7 @@ if($reqType == 'private'){
$nextSequence = $msg->id; $nextSequence = $msg->id;
} }
return $msg->toArray(); return $msg->toArray();
}, Message::getMessagesFromMailBoxOld($generalID, Message::MSGTYPE_PRIVATE, $reqTo, 20)); }, Message::getMessagesFromMailBoxOld($generalID, Message::MSGTYPE_PRIVATE, $reqTo, 15));
} }
else if($reqType == 'public'){ else if($reqType == 'public'){
$result['public'] = array_map(function(Message $msg)use (&$nextSequence){ $result['public'] = array_map(function(Message $msg)use (&$nextSequence){
@@ -91,7 +91,7 @@ else if($reqType == 'public'){
$nextSequence = $msg->id; $nextSequence = $msg->id;
} }
return $msg->toArray(); return $msg->toArray();
}, Message::getMessagesFromMailBoxOld(Message::MAILBOX_PUBLIC, Message::MSGTYPE_PUBLIC, $reqTo, 20)); }, Message::getMessagesFromMailBoxOld(Message::MAILBOX_PUBLIC, Message::MSGTYPE_PUBLIC, $reqTo, 15));
} }
else if($reqType == 'national'){ else if($reqType == 'national'){
$result['national'] = array_map(function(Message $msg)use (&$nextSequence){ $result['national'] = array_map(function(Message $msg)use (&$nextSequence){
@@ -99,7 +99,7 @@ else if($reqType == 'national'){
$nextSequence = $msg->id; $nextSequence = $msg->id;
} }
return $msg->toArray(); return $msg->toArray();
}, Message::getMessagesFromMailBoxOld(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_NATIONAL, $reqTo, 20)); }, Message::getMessagesFromMailBoxOld(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_NATIONAL, $reqTo, 15));
} }
else{ else{
$result['diplomacy'] = array_map(function(Message $msg)use (&$nextSequence, $permission){ $result['diplomacy'] = array_map(function(Message $msg)use (&$nextSequence, $permission){
@@ -112,7 +112,7 @@ else{
$values['option']['invalid'] = true; $values['option']['invalid'] = true;
} }
return $values; return $values;
}, Message::getMessagesFromMailBoxOld(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_DIPLOMACY, $reqTo, 20)); }, Message::getMessagesFromMailBoxOld(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_DIPLOMACY, $reqTo, 15));
} }
Json::die($result); Json::die($result);
+4 -4
View File
@@ -66,7 +66,7 @@ $result['private'] = array_map(function(Message $msg) use (&$nextSequence, &$min
$lastType = 'private'; $lastType = 'private';
} }
return $msg->toArray(); return $msg->toArray();
}, Message::getMessagesFromMailBox($generalID, Message::MSGTYPE_PRIVATE, 20, $reqSequence)); }, Message::getMessagesFromMailBox($generalID, Message::MSGTYPE_PRIVATE, 15, $reqSequence));
$result['public'] = array_map(function(Message $msg)use (&$nextSequence, &$minSequence, &$lastType){ $result['public'] = array_map(function(Message $msg)use (&$nextSequence, &$minSequence, &$lastType){
if($msg->id > $nextSequence){ if($msg->id > $nextSequence){
@@ -77,7 +77,7 @@ $result['public'] = array_map(function(Message $msg)use (&$nextSequence, &$minSe
$lastType = 'public'; $lastType = 'public';
} }
return $msg->toArray(); return $msg->toArray();
}, Message::getMessagesFromMailBox(Message::MAILBOX_PUBLIC, Message::MSGTYPE_PUBLIC, 20, $reqSequence)); }, Message::getMessagesFromMailBox(Message::MAILBOX_PUBLIC, Message::MSGTYPE_PUBLIC, 15, $reqSequence));
$result['national'] = array_map(function(Message $msg)use (&$nextSequence, &$minSequence, &$lastType){ $result['national'] = array_map(function(Message $msg)use (&$nextSequence, &$minSequence, &$lastType){
if($msg->id > $nextSequence){ if($msg->id > $nextSequence){
@@ -88,7 +88,7 @@ $result['national'] = array_map(function(Message $msg)use (&$nextSequence, &$min
$lastType = 'national'; $lastType = 'national';
} }
return $msg->toArray(); return $msg->toArray();
}, Message::getMessagesFromMailBox(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_NATIONAL, 20, $reqSequence)); }, Message::getMessagesFromMailBox(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_NATIONAL, 15, $reqSequence));
$result['diplomacy']= array_map(function(Message $msg)use (&$nextSequence, &$minSequence, &$lastType, $permission){ $result['diplomacy']= array_map(function(Message $msg)use (&$nextSequence, &$minSequence, &$lastType, $permission){
if($msg->id > $nextSequence){ if($msg->id > $nextSequence){
@@ -104,7 +104,7 @@ $result['diplomacy']= array_map(function(Message $msg)use (&$nextSequence, &$min
$values['option']['invalid'] = true; $values['option']['invalid'] = true;
} }
return $values; return $values;
}, Message::getMessagesFromMailBox(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_DIPLOMACY, 20, $reqSequence)); }, Message::getMessagesFromMailBox(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_DIPLOMACY, 15, $reqSequence));
if($lastType !== null){ if($lastType !== null){
array_pop($result[$lastType]); array_pop($result[$lastType]);
+3
View File
@@ -73,6 +73,8 @@ if ($gencount >= $maxgeneral) {
]); ]);
} }
$genAux = Json::decode($db->queryFirstField('SELECT aux FROM general WHERE no = %i', $pick)??'{}');
$genAux['pickYearMonth'] = Util::joinYearMonth($year, $month);
//등록 시작 //등록 시작
$db->update('general', [ $db->update('general', [
'owner_name'=>$userNick, 'owner_name'=>$userNick,
@@ -81,6 +83,7 @@ $db->update('general', [
'defence_train'=>80, 'defence_train'=>80,
'permission'=>'normal', 'permission'=>'normal',
'owner'=>$userID, 'owner'=>$userID,
'aux'=>Json::encode($genAux)
], 'owner <= 0 AND npc = 2 AND no = %i', $pick); ], 'owner <= 0 AND npc = 2 AND no = %i', $pick);
if(!$db->affectedRows()){ if(!$db->affectedRows()){
+1 -36
View File
@@ -2,42 +2,7 @@
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
include "func_template.php";
$templates = new \League\Plates\Engine(__DIR__.'/templates');
function getAutorunInfo($autorunOption){
global $templates;
$auto_info = [];
foreach($autorunOption['options'] as $auto_option => $value){
assert($value);
switch($auto_option){
case 'develop': $auto_info['내정'] = '내정'; break;
case 'warp': $auto_info['순간이동'] = '순간이동'; break;
case 'recruit': $auto_info['징병'] = $auto_info['징병']??'징병'; break;
case 'recruit_high': $auto_info['징병'] = '모병'; break;
case 'train': $auto_info['훈사'] = '훈련/사기진작'; break;
case 'battle': $auto_info['출병'] = '출병'; break;
case 'chief': $auto_info['사령턴'] = '사령턴'; break;
}
}
$limit = Util::toInt($autorunOption['limit_minutes']);
if($limit >= 43200){
$auto_info['제한'] = '항상 유효';
}
else if($limit % 60 == 0){
$auto_info['제한'] = ($limit/60).'시간 유효';
}
else{
$auto_info['제한'] = ($limit).'분 유효';
}
$auto_info = join(', ', array_values($auto_info));
return $templates->render('tooltip', [
'text'=>'자율행동',
'info'=>$auto_info,
'style'=>'text-decoration:underline',
'copyable_info'=>true
]);
}
$session = Session::requireLogin([ $session = Session::requireLogin([
'game'=>null, 'game'=>null,
+19 -1
View File
@@ -167,7 +167,12 @@ function applyGeneralPriority($priority, $nationID, $generalName): ?string
$generalPolicyRoot = $nationStor->npc_general_policy; $generalPolicyRoot = $nationStor->npc_general_policy;
$defaultPriority = AutorunGeneralPolicy::$default_priority; $defaultPriority = AutorunGeneralPolicy::$default_priority;
$mustHaveActions = ['출병' => 1]; $actionOrder = [
['출병', '일반내정']
];
$mustHaveActions = ['출병' => 1, '일반내정' => 1];
$orderMap = [];
foreach ($priority as $item) { foreach ($priority as $item) {
if (key_exists($item, $mustHaveActions)) { if (key_exists($item, $mustHaveActions)) {
$mustHaveActions[$item] = 0; $mustHaveActions[$item] = 0;
@@ -175,6 +180,19 @@ function applyGeneralPriority($priority, $nationID, $generalName): ?string
if (!in_array($item, $defaultPriority)) { if (!in_array($item, $defaultPriority)) {
return "{$item}은 올바른 명령이 아닙니다."; return "{$item}은 올바른 명령이 아닙니다.";
} }
$orderMap[$item] = count($orderMap);
}
foreach($actionOrder as [$preItem, $postItem]){
if(!key_exists($preItem, $orderMap)){
continue;
}
if(!key_exists($postItem, $orderMap)){
continue;
}
if($orderMap[$preItem] > $orderMap[$postItem]){
return "{$preItem} 명령은 {$postItem} 명령보다 먼저여야 합니다.";
}
} }
foreach ($mustHaveActions as $actionKey => $unset) { foreach ($mustHaveActions as $actionKey => $unset) {
-4
View File
@@ -20,10 +20,6 @@ $loader->addClassMap((function () {
//디버그용 매크로 //디버그용 매크로
ini_set("session.cache_expire", 10080); // minutes ini_set("session.cache_expire", 10080); // minutes
// 각종 변수
define('STEP_LOG', true);
define('PROCESS_LOG', true);
ob_start(); ob_start();
// 에러 메세지 출력 // 에러 메세지 출력
+2
View File
@@ -264,12 +264,14 @@ function processWar_NG(
$attackerCrewTypeCoef = $attacker->getCrewType()->getAttackCoef($defender->getCrewType()) * $defender->getCrewType()->getDefenceCoef($attacker->getCrewType()); $attackerCrewTypeCoef = $attacker->getCrewType()->getAttackCoef($defender->getCrewType()) * $defender->getCrewType()->getDefenceCoef($attacker->getCrewType());
$defenderCrewTypeCoef = $defender->getCrewType()->getAttackCoef($attacker->getCrewType()) * $attacker->getCrewType()->getDefenceCoef($defender->getCrewType()); $defenderCrewTypeCoef = $defender->getCrewType()->getAttackCoef($attacker->getCrewType()) * $attacker->getCrewType()->getDefenceCoef($defender->getCrewType());
/*
if($attackerCrewTypeCoef > $defenderCrewTypeCoef && $attacker instanceof WarUnitGeneral){ if($attackerCrewTypeCoef > $defenderCrewTypeCoef && $attacker instanceof WarUnitGeneral){
$attacker->getGeneral()->increaseInheritancePoint('snipe_combat', 1); $attacker->getGeneral()->increaseInheritancePoint('snipe_combat', 1);
} }
if($defenderCrewTypeCoef > $attackerCrewTypeCoef && $defender instanceof WarUnitGeneral){ if($defenderCrewTypeCoef > $attackerCrewTypeCoef && $defender instanceof WarUnitGeneral){
$defender->getGeneral()->increaseInheritancePoint('snipe_combat', 1); $defender->getGeneral()->increaseInheritancePoint('snipe_combat', 1);
} }
*/
$attackerName = $attacker->getName(); $attackerName = $attacker->getName();
$attackerCrewTypeName = $attacker->getCrewTypeName(); $attackerCrewTypeName = $attacker->getCrewTypeName();
+2 -5
View File
@@ -19,14 +19,12 @@ include "func.php";
'serverNick' => DB::prefix(), 'serverNick' => DB::prefix(),
'serverID' => UniqueConst::$serverID 'serverID' => UniqueConst::$serverID
]) ?> ]) ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('d_shared/base_map.js') ?> <?= WebUtil::printJS('d_shared/base_map.js') ?>
<?= WebUtil::printJS('dist_js/recent_map.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/common.css') ?>
<?= WebUtil::printCSS('css/map.css') ?> <?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printDist('ts', ['common', 'recent_map'], true) ?>
<style> <style>
html { html {
width: 700px; width: 700px;
@@ -52,7 +50,6 @@ include "func.php";
<div class="card-body"> <div class="card-body">
</div> </div>
</div> </div>
</body> </body>
</html> </html>
@@ -0,0 +1,69 @@
<?php
namespace sammo\API\Command;
use sammo\Session;
use DateTimeInterface;
use sammo\DB;
use sammo\Json;
use sammo\KVStorage;
use sammo\TimeUtil;
use function sammo\cutTurn;
class GetReservedCommand extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
return null;
}
public function getRequiredSessionMode(): int
{
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$db = DB::db();
$commandList = [];
$gameStor = KVStorage::getStorage($db, 'game_env');
$generalID = $session->generalID;
$rawTurn = $db->queryAllLists('SELECT turn_idx, action, arg, brief FROM general_turn WHERE general_id = %i ORDER BY turn_idx ASC', $generalID);
foreach ($rawTurn as [$turn_idx, $action, $arg, $brief]) {
$commandList[$turn_idx] = [
'action' => $action,
'brief' => $brief,
'arg' => Json::decode($arg)
];
}
[$turnTerm, $year, $month, $lastExecute] = $gameStor->getValuesAsArray(['turnterm', 'year', 'month', 'turntime']);
[$turnTime, $rawGeneralAux] = $db->queryFirstList('SELECT turntime, aux FROM general WHERE no=%i', $generalID);
$generalAux = Json::decode($rawGeneralAux ?? '{}');
if (cutTurn($turnTime, $turnTerm) > cutTurn($lastExecute, $turnTerm)) {
//이미 이번달에 실행된 턴이다.
$month++;
if ($month >= 13) {
$month -= 12;
$year += 1;
}
}
return [
'result' => true,
'turnTime' => $turnTime,
'turnTerm' => $turnTerm,
'year' => $year,
'month' => $month,
'date' => TimeUtil::now(true),
'turn' => $commandList,
'autorun_limit' => $generalAux['autorun_limit'] ?? null,
];
}
}
+47
View File
@@ -0,0 +1,47 @@
<?php
namespace sammo\API\Command;
use sammo\Session;
use DateTimeInterface;
use sammo\Validator;
use function sammo\cutTurn;
use function sammo\pushGeneralCommand;
class PushCommand extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v->rule('required', [
'amount',
])
->rule('integer', 'amount')
->rule('min', 'amount', -12)
->rule('max', 'amount', 12);
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
{
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$amount = $this->args['amount'];
if($amount == 0){
return '0은 불가능합니다';
}
pushGeneralCommand($session->generalID, $amount);
return [
'result'=>true
];
}
}
+45
View File
@@ -0,0 +1,45 @@
<?php
namespace sammo\API\Command;
use sammo\Session;
use DateTimeInterface;
use sammo\Validator;
use function sammo\cutTurn;
use function sammo\repeatGeneralCommand;
class RepeatCommand extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v->rule('required', [
'amount',
])
->rule('integer', 'amount')
->rule('min', 'amount', 1)
->rule('max', 'amount', 12);
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
{
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$amount = $this->args['amount'];
repeatGeneralCommand($session->generalID, $amount);
return [
'result'=>true
];
}
}
+56
View File
@@ -0,0 +1,56 @@
<?php
namespace sammo\API\Command;
use sammo\Session;
use DateTimeInterface;
use sammo\GameConst;
use sammo\Util;
use sammo\Validator;
use function sammo\setGeneralCommand;
class ReserveCommand extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v->rule('required', [
'action',
'turnList'
])
->rule('lengthMin', 'action', 1)
->rule('integerArray', 'turnList');
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
{
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$action = $this->args['action'];
$turnList = $this->args['turnList'];
$arg = $this->args['arg']??[];
if(!$turnList){
return '턴이 입력되지 않았습니다';
}
if(!in_array($action, Util::array_flatten(GameConst::$availableGeneralCommand))){
return '사용할 수 없는 커맨드입니다.';
}
if(!is_array($arg)){
'올바른 arg 형태가 아닙니다.';
}
return setGeneralCommand($session->generalID, $turnList, $action, $arg);
}
}
+2 -2
View File
@@ -26,7 +26,7 @@ use function sammo\cutTurn;
use function sammo\getGeneralSpecialWarName; use function sammo\getGeneralSpecialWarName;
use function sammo\getRandTurn; use function sammo\getRandTurn;
use function sammo\pushAdminLog; use function sammo\pushAdminLog;
use function sammo\resetInheritanceUser; use function sammo\applyInheritanceUser;
class Join extends \sammo\BaseAPI class Join extends \sammo\BaseAPI
{ {
@@ -155,7 +155,7 @@ class Join extends \sammo\BaseAPI
$admin = $gameStor->getValues(['scenario', 'turnterm', 'turntime', 'show_img_level', 'startyear', 'year', 'month']); $admin = $gameStor->getValues(['scenario', 'turnterm', 'turntime', 'show_img_level', 'startyear', 'year', 'month']);
$inheritTotalPoint = resetInheritanceUser($userID); $inheritTotalPoint = applyInheritanceUser($userID);
$inheritRequiredPoint = 0; $inheritRequiredPoint = 0;
$userLogger = new UserLogger($userID, $admin['year'], $admin['month'], false); $userLogger = new UserLogger($userID, $admin['year'], $admin['month'], false);
+101
View File
@@ -0,0 +1,101 @@
<?php
namespace sammo\API\Misc;
use sammo\Session;
use DateTimeInterface;
use sammo\AppConf;
use sammo\KVStorage;
use sammo\RootDB;
use sammo\TimeUtil;
use sammo\UniqueConst;
use sammo\Validator;
class UploadImage extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v->rule('required', [
'imageData',
]);
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
{
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$imageData = base64_decode($this->args['imageData'], true);
if ($imageData === false) {
return "올바른 데이터가 아닙니다.";
}
if(strlen($imageData) > 1024*1024){
//NOTE: 가변 길이를 적용해야할까?
return "이미지 크기가 1MB보다 큽니다.";
}
$contentType = (new \finfo(FILEINFO_MIME_TYPE))->buffer($imageData);
if (substr($contentType, 0, 5) !== 'image') {
return '이미지 파일이 아닙니다: ' . $contentType;
}
$extension = ltrim($contentType, 'image/');
$validExtensions = ['png', 'jpeg', 'jpg', 'gif', 'webp'];
if (!in_array(strtolower($extension), $validExtensions)) {
return '지원하지 않는 이미지 파일입니다: ' . $contentType;
}
$oMD = hash_init('md5');
hash_update($oMD, $imageData);
$imgName = hash_final($oMD);
$imgFullName = "{$imgName}.{$extension}";
$destDir = AppConf::getUserIconPathFS() . '/uploaded_image';
$destPath = "{$destDir}/{$imgFullName}";
if (!file_exists($destPath)) {
if (!file_exists($destDir)) {
mkdir($destDir);
}
if (!is_dir($destDir)) {
return '버그! 업로드 경로 확인!';
}
if (!is_writable($destDir)) {
return '버그! 업로드 권한 확인!';
}
if (!file_put_contents($destPath, $imageData)) {
return '업로드에 실패했습니다!';
}
}
$db = RootDB::db();
$imgStor = KVStorage::getStorage($db, 'img_storage');
$userID = $session->userID;
$serverID = UniqueConst::$serverID;
$storedStatus = $imgStor->$imgFullName ?? [];
$imgKey = "$serverID:$userID";
if (!key_exists($imgKey, $storedStatus)) {
$storedStatus[$imgKey] = TimeUtil::now();
}
$imgStor->$imgFullName = $storedStatus;
return [
'result' => true,
'path'=>AppConf::getUserIconPathWeb().'/uploaded_image/'.$imgFullName,
];
}
}
+58
View File
@@ -0,0 +1,58 @@
<?php
namespace sammo\API\Nation;
use sammo\Session;
use DateTimeInterface;
use sammo\DB;
use sammo\KVStorage;
use sammo\Validator;
use sammo\WebUtil;
use function sammo\checkSecretPermission;
class SetNotice extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v->rule('required', [
'msg',
])->rule('lengthMax', 'msg', 16384);
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
{
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$msg = $this->args['msg'];
$userID = $session->userID;
$db = DB::db();
$me = $db->queryFirstRow('SELECT `no`,nation,`officer_level`,permission,penalty FROM general WHERE `owner`=%i', $userID);
$permission = checkSecretPermission($me, false);
if($permission < 0){
return "권한이 부족합니다.";
}
if ($me['officer_level'] < 5 && $permission != 4){
return "권한이 부족합니다.";
}
$nationID = $me['nation'];
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nationStor->notice = WebUtil::htmlPurify($msg);
return [
'result' => true
];
}
}
+58
View File
@@ -0,0 +1,58 @@
<?php
namespace sammo\API\Nation;
use sammo\Session;
use DateTimeInterface;
use sammo\DB;
use sammo\KVStorage;
use sammo\Validator;
use sammo\WebUtil;
use function sammo\checkSecretPermission;
class SetScoutMsg extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v->rule('required', [
'msg',
])->rule('lengthMax', 'msg', 1000);
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
{
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$msg = $this->args['msg'];
$userID = $session->userID;
$db = DB::db();
$me = $db->queryFirstRow('SELECT `no`,nation,`officer_level`,permission,penalty FROM general WHERE `owner`=%i', $userID);
$permission = checkSecretPermission($me, false);
if($permission < 0){
return "권한이 부족합니다.";
}
if ($me['officer_level'] < 5 && $permission != 4){
return "권한이 부족합니다.";
}
$nationID = $me['nation'];
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nationStor->scout_msg = WebUtil::htmlPurify($msg);
return [
'result' => true
];
}
}
@@ -14,12 +14,12 @@ class che_무기_09_동호비궁 extends \sammo\BaseStatItem{
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
$this->info .= "<br>[전투] 새로운 상대와 전투 시 20% 확률로 저격 발동, 성공 시 사기+10"; $this->info .= "<br>[전투] 새로운 상대와 전투 시 20% 확률로 저격 발동, 성공 시 사기+20";
} }
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 109, 0.2, 20, 40), new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 109, 0.2, 20, 40, 20),
new che_저격발동($unit, che_저격발동::TYPE_ITEM) new che_저격발동($unit, che_저격발동::TYPE_ITEM)
); );
} }
@@ -19,7 +19,7 @@ class che_무기_11_이광궁 extends \sammo\BaseStatItem{
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 111, 0.10, 20, 40), new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 111, 0.10, 20, 40, 10),
new che_저격발동($unit, che_저격발동::TYPE_ITEM) new che_저격발동($unit, che_저격발동::TYPE_ITEM)
); );
} }
@@ -19,7 +19,7 @@ class che_무기_13_양유기궁 extends \sammo\BaseStatItem{
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 113, 0.1, 20, 40), new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 113, 0.1, 20, 40, 10),
new che_저격발동($unit, che_저격발동::TYPE_ITEM) new che_저격발동($unit, che_저격발동::TYPE_ITEM)
); );
} }
@@ -15,7 +15,7 @@ class che_반계_백우선 extends \sammo\BaseItem{
protected $id = 45; protected $id = 45;
protected $rawName = '백우선'; protected $rawName = '백우선';
protected $name = '백우선(반계)'; protected $name = '백우선(반계)';
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림'; protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 20% 확률로 되돌림';
protected $cost = 200; protected $cost = 200;
protected $consumable = false; protected $consumable = false;
@@ -29,7 +29,7 @@ class che_반계_백우선 extends \sammo\BaseItem{
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new 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) new che_반계발동($unit)
); );
} }
@@ -15,7 +15,7 @@ class che_반계_파초선 extends \sammo\BaseItem{
protected $id = 45; protected $id = 45;
protected $rawName = '파초선'; protected $rawName = '파초선';
protected $name = '파초선(반계)'; protected $name = '파초선(반계)';
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림'; protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 20% 확률로 되돌림';
protected $cost = 200; protected $cost = 200;
protected $consumable = false; protected $consumable = false;
@@ -29,7 +29,7 @@ class che_반계_파초선 extends \sammo\BaseItem{
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new 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) new che_반계발동($unit)
); );
} }
@@ -16,12 +16,12 @@ class che_서적_07_사마법 extends \sammo\BaseStatItem{
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
$this->info .= "<br>[전투] 상대의 계략을 20% 확률로 되돌림"; $this->info .= "<br>[전투] 상대의 계략을 10% 확률로 되돌림";
} }
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new 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) new che_반계발동($unit)
); );
} }
@@ -16,12 +16,12 @@ class che_서적_12_산해경 extends \sammo\BaseStatItem{
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
$this->info .= "<br>[전투] 상대의 계략을 20% 확률로 되돌림"; $this->info .= "<br>[전투] 상대의 계략을 10% 확률로 되돌림";
} }
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM, 0.2), new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM, 0.1),
new che_반계발동($unit) new che_반계발동($unit)
); );
} }
@@ -15,7 +15,7 @@ class che_저격_매화수전 extends \sammo\BaseItem{
protected $id = 70; protected $id = 70;
protected $rawName = '매화수전'; protected $rawName = '매화수전';
protected $name = '매화수전(저격)'; protected $name = '매화수전(저격)';
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10'; protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
protected $cost = 200; protected $cost = 200;
protected $consumable = false; protected $consumable = false;
+1 -1
View File
@@ -15,7 +15,7 @@ class che_저격_비도 extends \sammo\BaseItem{
protected $id = 70; protected $id = 70;
protected $rawName = '비도'; protected $rawName = '비도';
protected $name = '비도(저격)'; protected $name = '비도(저격)';
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10'; protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
protected $cost = 200; protected $cost = 200;
protected $consumable = false; protected $consumable = false;
@@ -20,9 +20,6 @@ class event_전투특기_위압 extends \sammo\BaseItem{
protected $reqSecu = 3000; protected $reqSecu = 3000;
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
if($unit->getPhase() != 0){
return null;
}
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new che_위압시도($unit), new che_위압시도($unit),
new che_위압발동($unit) new che_위압발동($unit)
@@ -13,7 +13,7 @@ class event_전투특기_저격 extends \sammo\BaseItem{
protected $id = 70; protected $id = 70;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(저격)'; protected $name = '비급(저격)';
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10'; protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -10,7 +10,7 @@ class event_전투특기_척사 extends \sammo\BaseItem{
protected $id = 75; protected $id = 75;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(척사)'; protected $name = '비급(척사)';
protected $info = '[전투] 지역·도시 병종 상대로 대미지 +10%, 아군 피해 -10%'; protected $info = '[전투] 지역·도시 병종 상대로 대미지 +20%, 아군 피해 -20%';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -19,7 +19,7 @@ class event_전투특기_척사 extends \sammo\BaseItem{
public function getWarPowerMultiplier(WarUnit $unit):array{ public function getWarPowerMultiplier(WarUnit $unit):array{
$opposeCrewType = $unit->getOppose()->getCrewType(); $opposeCrewType = $unit->getOppose()->getCrewType();
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){ if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
return [1.1, 0.9]; return [1.2, 0.8];
} }
return [1, 1]; return [1, 1];
} }
+1 -1
View File
@@ -35,7 +35,7 @@ class che_종횡가 extends \sammo\BaseNation{
public function onCalcStrategic(string $turnType, string $varType, $value){ public function onCalcStrategic(string $turnType, string $varType, $value){
if($varType == 'delay'){ if($varType == 'delay'){
return Util::round($value / 2); return Util::round($value * 3 / 4);
} }
if($varType == 'globalDelay'){ if($varType == 'globalDelay'){
return Util::round($value / 2); return Util::round($value / 2);
@@ -13,7 +13,7 @@ class che_event_견고 extends \sammo\BaseSpecial{
protected $id = 62; protected $id = 62;
protected $name = '견고'; protected $name = '견고';
protected $info = '[전투] 상대 필살, 저격 불가, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -10%'; protected $info = '[전투] 상대 필살 확률 -20%p, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -10%';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -25,6 +25,7 @@ class che_event_견고 extends \sammo\BaseSpecial{
{ {
$debuff = [ $debuff = [
'warMagicSuccessProb' => 0.1, 'warMagicSuccessProb' => 0.1,
'warCriticalRatio' => 0.20,
][$statName] ?? 0; ][$statName] ?? 0;
return $value - $debuff; return $value - $debuff;
} }
@@ -32,13 +33,12 @@ class che_event_견고 extends \sammo\BaseSpecial{
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM), new che_부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*402, false, '저격불가')
); );
} }
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*402, false, '필살불가', '저격불가') new che_부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
); );
} }
@@ -12,7 +12,7 @@ class che_event_저격 extends \sammo\BaseSpecial{
protected $id = 70; protected $id = 70;
protected $name = '저격'; protected $name = '저격';
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10'; protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;

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