From 8254bcb73dcf5fa8d9d32311c740dee2eae37048 Mon Sep 17 00:00:00 2001 From: swrring Date: Tue, 24 Nov 2026 19:08:19 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=AB=20=EC=8B=A4=ED=96=89=20=ED=9D=90?= =?UTF-8?q?=EB=A6=84=20=E2=80=94=20=EC=9D=B8=ED=8A=B8=EB=A1=9C=20=E2=86=92?= =?UTF-8?q?=20=EC=84=9C=EC=9E=A5=201~3=EB=A7=89=20=E2=86=92=20=EB=B3=B8?= =?UTF-8?q?=EC=98=81=20=EC=95=88=EB=82=B4=20=E2=86=92=20=EB=AC=B4=EB=A3=8C?= =?UTF-8?q?=201=ED=9A=8C=20=EB=93=B1=EC=9A=A9(=EA=B0=84=EC=98=B9)=20?= =?UTF-8?q?=E2=86=92=20=ED=8E=B8=EC=84=B1=20=E2=86=92=20=EC=B6=9C=EC=A0=95?= =?UTF-8?q?=201-1=20=EC=8A=A4=ED=82=AC=20=ED=8A=9C=ED=86=A0=EB=A6=AC?= =?UTF-8?q?=EC=96=BC=20=E2=86=92=20=EA=B5=B0=EC=98=81=20=EC=86=8C=EA=B0=9C?= =?UTF-8?q?(PD=202026-11-24=20=E3=80=8C=EC=9E=91=EC=97=85=ED=95=9C=20?= =?UTF-8?q?=EB=AA=A8=EB=93=A0=20=EB=82=B4=EC=9A=A9=EC=9D=84=20=ED=91=B8?= =?UTF-8?q?=EC=8B=9C=E3=80=8D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - OutGame/FirstFlow: FirstFlow(지휘) · FirstFlowGuide(포트레이트 대화 장치) · IntroScreen(인트로) · FirstFlowSortie(출정 1-1 스킬 튜토리얼) · FirstFlowData(표 읽기 · 검사) - 표 Resources/UI/FirstFlow first_flow_{config,lines,intro,text}.csv · gacha.csv(free_first_ten 0 · first_pull_hero) · content_modes_config(scenario reward_prologue hero:10) · scn_text · sound_bgm - 새 유저 = 영웅 없음 → 서장 3막 결과 화면에서 유비 획득 → 1회 무료 등용 첫 장 = 간옹(흐름 세이브만) → 편성 안내 → 출정 1-1(적 셋 일격 · 간옹 회복 안내) → 군영 장소 포커스 - 서장 막 잇기(PrologueRules.WinContinue · OutGameRoot.SettleMode · BattleManager.LeaveMode) · 연의 전기 화면의 서장은 그대로(결과 화면) - 군영 화면 = 그림이 화면보다 큰 쪽(가로 · 세로) 스크롤 · ArenaHub.Focus - 시험 메뉴 TKS/테스트/첫 실행 흐름 — 처음부터 보기(시험 세이브) · TKS/Import Gacha - 테스트 FirstFlowTests 12 + 캡처 2(Explicit) · 그림은 임시(여인 = npc_woman · 인트로 = 색 판) Co-Authored-By: Claude Fable 5.2 --- Assets/Data/OutGame/gacha.csv | 3 +- Assets/Resources/Audio/sound_bgm.csv | 1 + .../ContentModes/content_modes_config.csv | 1 + Assets/Resources/OutGame/GachaConfig.asset | 4 +- Assets/Resources/UI/FirstFlow.meta | 8 + .../UI/FirstFlow/first_flow_config.csv | 39 + .../UI/FirstFlow/first_flow_config.csv.meta | 7 + .../UI/FirstFlow/first_flow_intro.csv | 8 + .../UI/FirstFlow/first_flow_intro.csv.meta | 7 + .../UI/FirstFlow/first_flow_lines.csv | 28 + .../UI/FirstFlow/first_flow_lines.csv.meta | 7 + .../UI/FirstFlow/first_flow_text.csv | 42 + .../UI/FirstFlow/first_flow_text.csv.meta | 7 + Assets/Resources/UI/Scenario/scn_text.csv | 1 + Assets/Scripts/Editor/DataImporter.cs | 33 + Assets/Scripts/Editor/TestMenu.cs | 66 ++ Assets/Scripts/OutGame/Arena/ArenaHub.cs | 13 +- Assets/Scripts/OutGame/Arena/ArenaHubView.cs | 55 +- .../OutGame/Arena/ArenaScreen.Scenario.cs | 15 + Assets/Scripts/OutGame/Data/GachaConfig.cs | 5 + Assets/Scripts/OutGame/FirstFlow.meta | 8 + Assets/Scripts/OutGame/FirstFlow/FirstFlow.cs | 647 ++++++++++++++++ .../OutGame/FirstFlow/FirstFlow.cs.meta | 2 + .../OutGame/FirstFlow/FirstFlowData.cs | 409 ++++++++++ .../OutGame/FirstFlow/FirstFlowData.cs.meta | 2 + .../OutGame/FirstFlow/FirstFlowGuide.cs | 405 ++++++++++ .../OutGame/FirstFlow/FirstFlowGuide.cs.meta | 2 + .../OutGame/FirstFlow/FirstFlowSortie.cs | 450 +++++++++++ .../OutGame/FirstFlow/FirstFlowSortie.cs.meta | 2 + .../Scripts/OutGame/FirstFlow/IntroScreen.cs | 339 ++++++++ .../OutGame/FirstFlow/IntroScreen.cs.meta | 2 + Assets/Scripts/OutGame/GachaRules.cs | 26 +- Assets/Scripts/OutGame/Net/ServerSession.cs | 6 + Assets/Scripts/OutGame/OutGameSession.cs | 6 + Assets/Scripts/OutGame/OutGameTables.cs | 2 + Assets/Scripts/OutGame/SaveData.cs | 30 +- .../OutGame/Scenario/ScenarioModeRules.cs | 19 +- .../Scripts/OutGame/UI/BattleResultPanel.cs | 12 +- Assets/Scripts/OutGame/UI/GachaCutscene.cs | 4 +- Assets/Scripts/OutGame/UI/OutGameRoot.cs | 50 +- Assets/Scripts/Runtime/BattleManager.cs | 7 + .../Runtime/ContentModes/PrologueBattle.cs | 11 + Assets/Scripts/Runtime/GameBootstrap.cs | 6 +- .../Scripts/Runtime/Scenario/ScenarioEvent.cs | 4 + Assets/Scripts/Runtime/TestOptions.cs | 11 + Assets/Tests/PlayMode/FirstFlowTests.cs | 725 ++++++++++++++++++ Assets/Tests/PlayMode/FirstFlowTests.cs.meta | 2 + Assets/Tests/PlayMode/OutGameTests.cs | 9 +- CLAUDE.md | 1 + 49 files changed, 3520 insertions(+), 29 deletions(-) create mode 100644 Assets/Resources/UI/FirstFlow.meta create mode 100644 Assets/Resources/UI/FirstFlow/first_flow_config.csv create mode 100644 Assets/Resources/UI/FirstFlow/first_flow_config.csv.meta create mode 100644 Assets/Resources/UI/FirstFlow/first_flow_intro.csv create mode 100644 Assets/Resources/UI/FirstFlow/first_flow_intro.csv.meta create mode 100644 Assets/Resources/UI/FirstFlow/first_flow_lines.csv create mode 100644 Assets/Resources/UI/FirstFlow/first_flow_lines.csv.meta create mode 100644 Assets/Resources/UI/FirstFlow/first_flow_text.csv create mode 100644 Assets/Resources/UI/FirstFlow/first_flow_text.csv.meta create mode 100644 Assets/Scripts/OutGame/FirstFlow.meta create mode 100644 Assets/Scripts/OutGame/FirstFlow/FirstFlow.cs create mode 100644 Assets/Scripts/OutGame/FirstFlow/FirstFlow.cs.meta create mode 100644 Assets/Scripts/OutGame/FirstFlow/FirstFlowData.cs create mode 100644 Assets/Scripts/OutGame/FirstFlow/FirstFlowData.cs.meta create mode 100644 Assets/Scripts/OutGame/FirstFlow/FirstFlowGuide.cs create mode 100644 Assets/Scripts/OutGame/FirstFlow/FirstFlowGuide.cs.meta create mode 100644 Assets/Scripts/OutGame/FirstFlow/FirstFlowSortie.cs create mode 100644 Assets/Scripts/OutGame/FirstFlow/FirstFlowSortie.cs.meta create mode 100644 Assets/Scripts/OutGame/FirstFlow/IntroScreen.cs create mode 100644 Assets/Scripts/OutGame/FirstFlow/IntroScreen.cs.meta create mode 100644 Assets/Tests/PlayMode/FirstFlowTests.cs create mode 100644 Assets/Tests/PlayMode/FirstFlowTests.cs.meta diff --git a/Assets/Data/OutGame/gacha.csv b/Assets/Data/OutGame/gacha.csv index f296d1a1..d911b9bb 100644 --- a/Assets/Data/OutGame/gacha.csv +++ b/Assets/Data/OutGame/gacha.csv @@ -8,7 +8,8 @@ pity,80 pity_pickup_featured,1 pickup_share,0.5 pickup_exclusive,1 -free_first_ten,1 +free_first_ten,0 daily_free,1 ten_count,10 ten_guarantee_rarity,2 +first_pull_hero,jianyong diff --git a/Assets/Resources/Audio/sound_bgm.csv b/Assets/Resources/Audio/sound_bgm.csv index 9720822f..504f6fa8 100644 --- a/Assets/Resources/Audio/sound_bgm.csv +++ b/Assets/Resources/Audio/sound_bgm.csv @@ -25,3 +25,4 @@ mode_skilltest,bgm_battle,스킬 테스트 장면 battle_normal,bgm_battle,출정 일반 battle_elite,bgm_battle,출정 정예 battle_boss,bgm_boss,출정 보스 +screen_IntroScreen,bgm_story,인트로(첫 실행 흐름 · 연의 전기와 같은 음악 · 2026-11-24) diff --git a/Assets/Resources/ContentModes/content_modes_config.csv b/Assets/Resources/ContentModes/content_modes_config.csv index 037f1009..ca25ae60 100644 --- a/Assets/Resources/ContentModes/content_modes_config.csv +++ b/Assets/Resources/ContentModes/content_modes_config.csv @@ -56,6 +56,7 @@ scenario,power_mult_normal,1.1,연의(보통)의 기준 값 — 편별 맞춤 scenario,power_mult_hard,1.4,열전(어려움) — 적 체력 · 공격력에 (이 값 ÷ power_mult_normal)을 곱한다(1.27배) + scenario_rules.s_value_hard 의 조건 강화 scenario,reward_normal,shard:10,첫 승리 · 조각 = 그 편 주역(보옥 삭제 · PD 2026-11-24 ⑦) scenario,reward_hard,shard:20,첫 승리 · 조각 = 그 편 주역(보옥 · 금 상자 삭제 · PD 2026-11-24) +scenario,reward_prologue,hero:10,서장(n_no 0 · 도원결의) 첫 승리 꾸러미 — hero = 그 편 주역(s_reward_hero) 영웅을 얻는다(이미 보유 = 그 수만큼 조각) · 줄이 없으면 reward_normal · PD 2026-11-24 「최초 게임 시작 시 연의 전기 보상으로 3성 유비를 획득 · 연의 전기 완료 시 결과 화면으로 알림」 raid,unlock_stage,1-1,임시 1-1(즉시 개방 · PD 2026-11-18 테스트 지시) · 원래 값 = 3-15 · 3장 클리어 뒤 열림 raid,main_days,7,PD 확정(2026-11-17) — 메인 맹장은 한 주 동안 머문다 · 주가 바뀔 때 raid_rotation.n_order 의 다음 순서로 raid,sub_days,1,PD 확정(2026-11-17) — 서브 맹장은 매일 1명씩 바뀐다 diff --git a/Assets/Resources/OutGame/GachaConfig.asset b/Assets/Resources/OutGame/GachaConfig.asset index 20669b33..4e3c0970 100644 --- a/Assets/Resources/OutGame/GachaConfig.asset +++ b/Assets/Resources/OutGame/GachaConfig.asset @@ -33,13 +33,15 @@ MonoBehaviour: - key: pickup_exclusive value: 1 - key: free_first_ten - value: 1 + value: 0 - key: daily_free value: 1 - key: ten_count value: 10 - key: ten_guarantee_rarity value: 2 + - key: first_pull_hero + value: jianyong pool: - heroId: liubei inPool: 1 diff --git a/Assets/Resources/UI/FirstFlow.meta b/Assets/Resources/UI/FirstFlow.meta new file mode 100644 index 00000000..97a77a2a --- /dev/null +++ b/Assets/Resources/UI/FirstFlow.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c8f929bd7e63a7e4aa300c58e1783ec3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/FirstFlow/first_flow_config.csv b/Assets/Resources/UI/FirstFlow/first_flow_config.csv new file mode 100644 index 00000000..7a99e093 --- /dev/null +++ b/Assets/Resources/UI/FirstFlow/first_flow_config.csv @@ -0,0 +1,39 @@ +# 첫 실행 흐름 값 표(PD 2026-11-24 · 요청서 = 조직 레포 공유/기획팀_산출물/삼국지슬링샷/개발요청_최초실행흐름_2026-11-24.md) — 코드 = OutGame/FirstFlow(FirstFlow · FirstFlowGuide · IntroScreen) +# 형식 = 키 · 값(값 안 | = 칸) · 좌표 = 설계 화면 1080×1920 px · 색 = #RRGGBB 또는 #RRGGBBAA · 문구 = first_flow_text.csv · 대사 줄 = first_flow_lines.csv · 인트로 장 = first_flow_intro.csv +# 가신(retainer) = OutGame 표 gacha.csv first_ten_hero 의 영웅(이름 · 그림 · 첫 10회 무료 등용의 마지막 장) — 이 표에는 영웅 id 를 적지 않는다 +s_key,s_value,s_note +prologue_battle,taoyuan,서장 편 id(scenario_battles s_id · n_no 0) — 이 편의 막을 연의 전기 화면 없이 차례로 연다 +start_delay_sec,0.5,대사가 나올 화면에 들어온 뒤 첫 줄이 뜨기까지(초 · 본영 로비가 밝아지고 0.5초 뒤) +fade,940|#000000,막 사이 · 3막 뒤 검정 페이드 = 정렬 순서|색(어두워지는 시간 = scenario_event_config fade_sec) +act_in,0.15|0.25,다음 막을 연 뒤 = 검정 유지(초)|걷히는 시간(초) · 아래에 다음 막 시작 연출의 검은 화면이 이어짐 +lobby_in,0.2|0.6,3막 뒤 본영 로비 = 검정 유지(초)|밝아지는 시간(초) +start_heroes,,새 유저가 처음 가진 영웅(| 로 여럿 · 비어 있음 = 없음) — 서장 보상으로 유비 · 등용으로 가신을 얻는다(economy.csv start_heroes 는 이 흐름에서 뺀다 · PD 2026-11-24 「보유한 유닛은 유비 그리고 등용으로 얻은 유닛들로만」) +camp_focus_sec,0.45,군영 장소 소개: 그 장소로 화면이 옮겨 가는 시간(초 · 대사 줄 s_on_show focus:<장소 id>) +sortie_stage,1-1,스킬 튜토리얼이 나오는 출정 스테이지(장-판 · 그 스테이지를 처음 깨기 전의 판 · 유비와 가신이 출전했을 때 · PD 2026-11-24 3차 「튜토리얼을 제공해 적들을 섬멸」) +sortie_cluster,-1.0:3.0|0:3.5|1.0:3.0,모아 놓는 적 자리(유비에서 x:y 칸 · | 로 여럿 · 유비에게 가까운 적부터 · 판 밖이면 안으로) — 하나라도 맞으면 한 번에 쓰러짐 · 가운데(둘째)가 시작 대사를 함 +sortie_hp_pct,0.5,모여 있던 적을 쓰러뜨린 뒤 유비에게 남기는 체력(최대 체력 비율 · PD 「반격 피해로 체력이 50% 감소 된 상태」) +sortie_timing,0.4|0.4,대사 연출 = 시작 전 뜸|카메라가 옮겨 간 뒤 뜸(초) +canvas,470|0.33,대화 장치 캔버스 = 정렬 순서|카메라에서 거리(아웃게임 위 덮개 450 위 · 타이틀 850 아래) +dim,#000000A6,어둡게 덮는 색(말하기 = 화면 전체 · 가리키기 · 누르기 = 대상 밖) +talk,190|40|150,대화 칸 = 화면 아래에서 y|대상과의 간격|화면 위끝 여백(대상과 겹치면 대상 위로 올라감) +bubble,430|620|250|0,말풍선(말하기) = 왼 x|폭|높이|대화 칸 아래에서 y · 그림 = Scenario/bubble(9 분할) +bubble_small,300|750|250|0,말풍선(가리키기 · 누르기 = 포트레이트를 작게) = 왼 x|폭|높이|아래에서 y +bubble_text,38|28|#3D2112|44|40|34|1.15|40,대사 글자 = 크기|최소 크기|색|좌우 여백|위 여백|아래 여백|줄 간격|초당 글자 수(누르면 전부 표시) +name_tag,40|0|56|30|26|#FFFFFF,이름표 = 말풍선 왼쪽에서 x|말풍선 위끝에서 y(가운데)|높이|글자|좌우 여백|글자 색 · 그림 = Scenario/name_tag · 바탕색 = speaker.* 4번째 +portrait,250|170|400|340,포트레이트(말하기) = 가운데 x|가운데 y(대화 칸 아래에서)|그림 크기|둥근 받침 크기 +portrait_small,180|140|300|260,포트레이트(가리키기 · 누르기) = 가운데 x|가운데 y|그림 크기|받침 크기 +next_mark,34|-44|34|#B8433A|0.9,다음 표시(▼) = 글자 크기|말풍선 오른쪽에서 x|아래에서 y|색|깜박임 주기(초) +focus_frame,10|8|#F2B33D|1.0|0.55,대상 강조 테 = 대상 둘레 여백|테 굵기|색(금빛)|숨쉬기 주기(초)|가장 흐릴 때(0~1) +finger,150|0.22|-0.18|16|0.7,손가락(누르기 줄 · 테마 아이콘 tut_hand) = 크기|대상 가운데에서 x(폭 비율)|y(높이 비율)|까딱임 px|주기(초) +speaker.helper,ff_name_helper|UI/Guide/helper_|npc_woman|#8A5A2B|#F6D5CF,도우미 여인 = 이름 키|그림 경로 앞부분(+ 표정 normal · smile · wistful)|납품 전 임시 유닛 그림(Units/<이름>)|이름표 색|받침 색 +speaker.retainer,|||#3F6B4A|#DDE8D8,가신 = 이름 · 그림은 gacha.csv first_ten_hero 의 영웅(칸을 비움)|||이름표 색|받침 색 +intro_canvas,860|0.28,인트로 캔버스 = 정렬 순서|카메라에서 거리(타이틀 850 위 · 씬 페이드 950 아래) +intro_bg,#1B1D24,인트로 바탕색 +intro_open_sec,0.6,첫 장 = 검정에서 밝아지는 시간(초) +intro_scroll,UI/Scenario/parts/part_scroll_big|10|150|1060|1560,두루마리 틀 = 그림|왼 x|위 y|폭|높이(연의 전기 두루마리를 다시 씀 · 9 분할) +intro_picture,150|372|780|930,그림 칸 = 왼 x|위 y|폭|높이(이 칸 밖은 가려짐 · 납품 그림 = first_flow_intro s_picture) +intro_caption,150|1314|780|150|44|30|#101014E6|#FFF2D9,자막 띠 = 왼 x|위 y|폭|높이|글자|최소 글자|띠 색|글자 색 +intro_dots,1490|22|26|#B8433A|#C9B48F,장 점 = 위 y|크기|사이|지금 장 색|나머지 색 +intro_hint,1790|34|#9A9AA5,아래 안내 글 = 위 y|글자|색 +intro_skip,40|60|190|80|34|,건너뛰기 버튼 = 오른쪽에서 x|위 y|폭|높이|글자|나타나는 시간(초 · 빈칸 = scenario_event_config skip_show_after_sec) +intro_end,2.2|0.8|0.85|0.9|0.3,마지막 장 끝 = 확대 배율|확대 중심 x|y(0~1 · 오른쪽 위 주점 간판 쪽)|확대 + 검정 페이드 시간(초)|건너뛰기 때 검정 페이드 시간(초) diff --git a/Assets/Resources/UI/FirstFlow/first_flow_config.csv.meta b/Assets/Resources/UI/FirstFlow/first_flow_config.csv.meta new file mode 100644 index 00000000..5ae3b740 --- /dev/null +++ b/Assets/Resources/UI/FirstFlow/first_flow_config.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8c227a73b69500d4cbd1399d1b495926 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/FirstFlow/first_flow_intro.csv b/Assets/Resources/UI/FirstFlow/first_flow_intro.csv new file mode 100644 index 00000000..be38a027 --- /dev/null +++ b/Assets/Resources/UI/FirstFlow/first_flow_intro.csv @@ -0,0 +1,8 @@ +# 첫 실행 흐름 인트로 표(PD 2026-11-24 · 요청서 §2-7 · 기획 원본 = tables/first_flow_intro.csv) — 코드 = OutGame/FirstFlow/IntroScreen.cs +# s_picture = Resources 경로(그림이 없으면 s_dummy_color 색 판 + s_dummy_key 글자) · f_sec = 그 장을 보여 주는 시간(터치 = 다음 장) +# e_in = fade(앞 장 위로 서서히) · slide(오른쪽에서 밀려 들어옴) · f_in_sec = 등장 시간 · f_scale_from → f_scale_to = 그 장 동안 확대(f_pivot_x · y = 확대 중심 0~1 · 왼쪽 아래 기준) +# f_rise = 그 장 동안 위로 오르는 양(그림 높이 비율) · f_shake = 등장이 끝날 때 한 번 흔들림(px · 0 = 없음) +n_cut,f_sec,s_picture,s_caption_key,s_dummy_color,s_dummy_key,e_in,f_in_sec,f_scale_from,f_scale_to,f_pivot_x,f_pivot_y,f_rise,f_shake,Memo +1,5,UI/Intro/intro_cut_1,ff_intro_1,#3B3540,ff_intro_dummy_1,fade,0.6,1.04,1.04,0.5,0.5,0.02,0,검정에서 밝아짐 · 그림이 아래에서 위로 아주 천천히 오름(높이의 2 %) +2,5,UI/Intro/intro_cut_2,ff_intro_2,#7C3B22,ff_intro_dummy_2,slide,0.4,1.04,1.04,0.5,0.5,0,14,오른쪽에서 왼쪽으로 밀리며 등장 + 화면 흔들림 한 번 +3,6,UI/Intro/intro_cut_3,ff_intro_3,#5B5438,ff_intro_dummy_3,fade,0.4,1.0,1.12,0.5,0.45,0,0,청년 뒷모습으로 천천히 확대 · 끝 = first_flow_config intro_end(주점 간판으로 확대 → 검정) diff --git a/Assets/Resources/UI/FirstFlow/first_flow_intro.csv.meta b/Assets/Resources/UI/FirstFlow/first_flow_intro.csv.meta new file mode 100644 index 00000000..b51ffc01 --- /dev/null +++ b/Assets/Resources/UI/FirstFlow/first_flow_intro.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 110b104b1de29814b8cf50a3b6310caa +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/FirstFlow/first_flow_lines.csv b/Assets/Resources/UI/FirstFlow/first_flow_lines.csv new file mode 100644 index 00000000..606d58ff --- /dev/null +++ b/Assets/Resources/UI/FirstFlow/first_flow_lines.csv @@ -0,0 +1,28 @@ +# 첫 실행 흐름 대사 줄 표(PD 2026-11-24 · 요청서 §2-2 ~ §2-6 + 2차 지시: 무료 1회 등용 · 편성 안내 · 군영 진언 문구) — 코드 = OutGame/FirstFlow/FirstFlow.cs · 문구 = first_flow_text.csv(s_text_key) +# e_speaker = helper(도우미 여인) · retainer(가신 = gacha.csv first_pull_hero) · l_screen = 이 줄이 나올 수 있는 화면(; 로 여럿) lobby 본영 · recruit 명장 등용 · formation 편성 · worldmap 월드맵 · camp 군영 +# e_mode = talk 말하기(화면 어둡게 · 터치로 다음) · point 가리키기(s_target 만 밝게 · 눌리지 않음 · 터치로 다음) · press 누르게 함(s_target 만 밝게 + 금빛 테 + 손가락 · 그 대상만 눌림 · 누르면 다음) +# s_target = 화면/오브젝트 이름(+ 로 여럿 = 합친 칸 · {retainer} = 가신 영웅 id) · e_face = normal · smile · wistful · none(그림 그대로) · e_done = next 다음 줄 · lobby 스스로 본영 로비로 · end 흐름 끝 +# s_on_show = 줄이 뜰 때 할 일(banner:<등용 배너 id> = 그 배너를 고름 · focus:<군영 장소 id> = 그 장소로 화면을 옮김) · s_on_done = 줄이 끝난 뒤 할 일(save_formation = 편성 화면의 지금 편성을 저장) +# s_skip_if 가 참이면 n_skip_to 줄로 건너뜀(first_pull_done = 첫 등용을 이미 함 · retainer_placed = 가신이 이미 출전 편성에 있음) +# n_gate = 이 줄의 화면이 아닌 본영 로비에 있을 때 다시 보여 줄 줄(그 화면으로 이끄는 누르기 줄 · 진행 기록은 그대로) · s_wait = 이 조건이 참일 때만(stage_clear:장-판 = 그 출정 스테이지를 이김) +n_step,e_speaker,l_screen,e_mode,s_target,e_face,s_text_key,e_done,s_on_show,s_on_done,s_skip_if,n_skip_to,n_gate,s_wait,Memo +1,helper,lobby,talk,,smile,ff_line_01,next,,,,,,, +2,helper,lobby,talk,,smile,ff_line_02,next,,,,,,, +3,helper,lobby,talk,,normal,ff_line_03,next,,,,,,, +4,helper,lobby,press,lobby/Side_등용,smile,ff_line_04,next,,,first_pull_done,6,,,누르면 거래 화면 명장 등용 탭 · 첫 등용을 이미 한 세이브 = 6번으로 건너뜀 +5,helper,recruit,press,recruit/Single,smile,ff_line_05,next,banner:shu,,first_pull_done,6,4,,「1회 등용」(상시 배너의 오늘 무료 1회) · 첫 장 = 가신(gacha.csv first_pull_hero) · 등용 쪽 = s_on_show banner:(제안값 촉) +6,retainer,recruit;lobby,talk,,none,ff_line_06,next,,,,,,,카드를 닫은 뒤 · 말하는 이 retainer = gacha.csv first_pull_hero 의 영웅 +7,helper,recruit;lobby,talk,,normal,ff_line_07,lobby,,,retainer_placed,10,,,끝나면 스스로 본영 로비로 · 가신이 이미 출전 편성에 있으면 10번으로 건너뜀 +8,helper,lobby,press,lobby/Content_formation,smile,ff_line_08,next,,,retainer_placed,10,,,누르면 편성 화면 +9,helper,formation,press,formation/C_{retainer},smile,ff_line_09,next,,save_formation,retainer_placed,10,8,,가신 카드({retainer} = 가신 영웅 id)를 누르면 빈 자리에 서고 그 편성을 바로 저장(s_on_done) = 출전 편성 · PD 2026-11-24 2차 「1회 뽑기로 얻은 간옹을 데리고 출전」 +10,helper,formation;lobby,talk,,smile,ff_line_10,lobby,,,,,,,PD 원문 · 끝나면 스스로 본영 로비로(e_done lobby) +11,helper,lobby,press,lobby/Sortie,wistful,ff_line_11,next,,,,,,,누르면 월드맵 · 여인의 안내는 여기까지 +12,retainer,worldmap;lobby,talk,,none,ff_line_12,lobby,,,,,,stage_clear:1-1,출정 1-1 을 이긴 뒤 결과 화면을 닫으면(s_wait) · 끝나면 스스로 본영 로비로 +13,retainer,lobby,press,lobby/Content_camp,none,ff_line_13,next,,,,,,,누르면 군영 화면 +14,retainer,camp,talk,,none,ff_line_14,next,,,,,13,, +15,retainer,camp,point,camp/Press_hall+Tag_hall,none,ff_line_15,next,focus:hall,,,,13,,가리키기 = 그 장소로 화면을 옮기고 그 장소만 밝게 · 눌리지 않음(누름 칸 + 이름표) +16,retainer,camp,point,camp/Press_tower+Tag_tower,none,ff_line_16,next,focus:tower,,,,13,, +17,retainer,camp,point,camp/Press_yard+Tag_yard,none,ff_line_17,next,focus:yard,,,,13,, +18,retainer,camp,point,camp/Press_ring+Tag_ring,none,ff_line_18,next,focus:ring,,,,13,, +19,retainer,camp,point,camp/Press_gate+Tag_gate,none,ff_line_19,next,focus:gate,,,,13,, +20,retainer,camp,talk,,none,ff_line_20,end,,,,,13,,끝나면 안내 끝 = 첫 실행 흐름 끝(e_done end) diff --git a/Assets/Resources/UI/FirstFlow/first_flow_lines.csv.meta b/Assets/Resources/UI/FirstFlow/first_flow_lines.csv.meta new file mode 100644 index 00000000..840a6502 --- /dev/null +++ b/Assets/Resources/UI/FirstFlow/first_flow_lines.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2c106b3f4f0764e4ab4758b8f4668969 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/FirstFlow/first_flow_text.csv b/Assets/Resources/UI/FirstFlow/first_flow_text.csv new file mode 100644 index 00000000..0cfe727b --- /dev/null +++ b/Assets/Resources/UI/FirstFlow/first_flow_text.csv @@ -0,0 +1,42 @@ +# 첫 실행 흐름 글자 표(PD 2026-11-24 · 기획 = 조직 레포 공유/기획팀_산출물/삼국지슬링샷/개발요청_최초실행흐름_2026-11-24.md · 문구 원본 = tables/first_flow_lobby.csv · first_flow_intro.csv + PD 2차 지시) +# 대사 한 줄 = 28자 안 · 최대 3줄(말풍선 폭에 맞춰 스스로 줄바꿈) · 문구만 고치면 반영(코드 수정 없음) · 코드 = OutGame/FirstFlow +s_key,ko,en,note +ff_name_helper,탁현의 여인,,도우미 이름표(가칭 · PD 확인 대기 · first_flow_helper.csv) +ff_line_01,대인! 탁현 주점에서 건달들을 물리치시는 모습을 보았어요.,,대사 1 · 여인 · 문구 = 제안(기획 표 줄 1) +ff_line_02,백성을 위해 나서 주신 모습에 감동했어요. 작은 힘이라도 보태고 싶어 찾아왔답니다.,,대사 2 · 여인 · 문구 = 제안(기획 표 줄 2) +ff_line_03,이곳이 대인의 본영이에요. 싸움을 준비하는 곳이지요.,,대사 3 · 여인 · 문구 = 제안(기획 표 줄 3) +ff_line_04,대인의 소문을 듣고 장수들이 모여들고 있어요. 등용에서 맞이해 보세요!,,대사 4 · 여인 · 문구 = 제안(기획 표 줄 4) +ff_line_05,첫 분은 대가 없이 맞이하실 수 있답니다.,,대사 5 · 여인 · PD 2026-11-24 2차 「뽑기는 1회만 무료」 · 문구 = 제안 +ff_line_06,주공! 탁현의 간옹입니다. 주공을 도와 한 황실을 다시 일으키는 데 이 몸을 바치겠습니다.,,대사 6 · 간옹 · 문구 = 제안(기획 표 줄 6) +ff_line_07,출정하시기 전에 먼저 편성을 하셔야 해요. 새로 오신 분을 진영에 세워 볼까요?,,대사 7 · 여인 · PD 2026-11-24 2차 「출정하기 전에 편성을 먼저 해야한다는 안내」 · 문구 = 제안 +ff_line_08,편성은 이쪽이에요.,,대사 8 · 여인 · 문구 = 제안 +ff_line_09,새로 맞이한 장수를 누르면 빈 자리에 섭니다.,,대사 9 · 여인 · 문구 = 제안 +ff_line_10,황건적 소탕을 위해 출정하신다고 하셨죠? 제가 가는 길을 안내해드리겠어요.,,대사 10 · 여인 · PD 원문(기획 표 줄 7) +ff_line_11,여기서부터가 싸움터로 가는 길이에요. 언젠가 인연이 닿으면 다시 뵐 수 있겠지요.,,대사 11 · 여인 · 문구 = 제안(기획 표 줄 8) +ff_line_12,황건적들의 세력이 점점 강해지고 있는 것 같습니다. 저놈들과 맞서려면 군영을 꾸리는 것이 좋겠습니다.,,대사 12 · 가신 · PD 2026-11-24 2차 원문(오탈자 「맞서러면」 → 「맞서려면」) +ff_line_13,군영은 이쪽입니다. 함께 둘러보시지요.,,대사 13 · 간옹 · 문구 = 제안(기획 표 줄 10) +ff_line_14,이곳이 군영입니다. 싸우며 힘을 기르는 곳들이 모여 있습니다.,,대사 14 · 간옹 · 문구 = 제안(기획 표 줄 11) +ff_line_15,연의 전기에서는 지나온 이야기를 다시 보고 새 이야기에 도전하실 수 있습니다.,,대사 15 · 간옹 · 문구 = 제안(기획 표 줄 12) +ff_line_16,천하제일 탑은 한 층씩 올라가며 겨루는 곳입니다.,,대사 16 · 간옹 · 문구 = 제안(기획 표 줄 13) +ff_line_17,훈련장에서는 전술 훈련과 병법 훈련으로 군을 단련합니다.,,대사 17 · 간옹 · 문구 = 제안(기획 표 줄 14) +ff_line_18,투기장에서는 다른 군주의 군과 겨루게 됩니다.,,대사 18 · 간옹 · 문구 = 제안(기획 표 줄 15) +ff_line_19,성문 밖에는 이름난 맹장이 나타납니다. 토벌전에서 힘을 겨뤄 보십시오.,,대사 19 · 간옹 · 문구 = 제안(기획 표 줄 16) +ff_line_20,마구간과 천하 쟁패는 아직 준비 중입니다. 마음 가는 곳부터 들러 보시지요.,,대사 20 · 간옹 · 문구 = 제안(기획 표 줄 17) +ff_intro_1,한나라 말. 조정은 기울고 백성은 굶주렸다.,,인트로 1장 자막 +ff_intro_dummy_1,그림 1 — 기울어진 궁궐 지붕 · 텅 빈 곳간 · 고개 숙인 백성 서넛(먹색 바탕 + 붉은 노을),,인트로 1장 임시 그림(색 판) 위 글자 · 그림 납품 뒤에는 쓰지 않음 +ff_intro_2,누런 두건의 무리가 들불처럼 일어났다. 황건적의 난.,,인트로 2장 자막 +ff_intro_dummy_2,그림 2 — 누런 두건을 두른 무리가 횃불을 들고 마을로 밀려옴 · 하늘에 누런 깃발,,인트로 2장 임시 그림(색 판) 위 글자 · 그림 납품 뒤에는 쓰지 않음 +ff_intro_3,184년 탁현. 의용군을 모으는 방 앞에 돗자리 장수 한 사람이 서 있었다.,,인트로 3장 자막 +ff_intro_dummy_3,그림 3 — 탁현 성문 옆 의용군 모집 방문 앞 구경꾼들 · 돗자리를 멘 청년의 뒷모습 · 오른쪽 위에 주점 간판,,인트로 3장 임시 그림(색 판) 위 글자 · 그림 납품 뒤에는 쓰지 않음 +ff_intro_skip,건너뛰기 >>,,인트로 건너뛰기 버튼(연의 연출 건너뛰기와 같은 문구) +ff_intro_hint,화면을 누르면 다음 장,,인트로 아래 안내 글 +ff_retry,다시 도전,,첫 실행 흐름의 서장 패배 결과 창 버튼(그 막을 처음부터 다시) +ff_sortie_enemy,오~ 손님이 오셨군. 얼마나 가지고 있을지 기대되는데? 크크큭...,,시작 대사(모아 놓은 적 가운데 하나) · PD 원문 +ff_sortie_victim,너희들의 악행을 끝내주겠다.,,유비 대사 · PD 원문 +ff_sortie_tip_skill,유비의 「이도류 검법」을 시전하면 이번 턴에 두번 행동할 수 있습니다.,,유비 스킬 안내 카드 · PD 2026-11-24 「동작에 맞게 고침」(원문 「다음 턴에서」 → 스킬 표 설명 「다음 행동이 2번 행동 가능」에 맞춰 「이번 턴에」) +ff_sortie_retainer,주공 무리하시면 안됩니다.,,가신 대사(모여 있던 적을 쓰러뜨린 뒤) · PD 원문 +ff_sortie_tip_heal,간옹의 유세 스킬을 아군에게 사용하면 아군을 회복시킬 수 있습니다.,,가신 스킬 안내 카드 · PD 원문 +ff_sortie_bar_select,{0}을(를) 눌러 고르세요.,,안내 띠: 영웅을 고르게 함({0} = 영웅 이름) · 문구 = 제안 +ff_sortie_bar_skill,스킬 버튼을 누르세요.,,안내 띠: 스킬 버튼 · 문구 = 제안 +ff_sortie_bar_attack,모여 있는 적을 향해 끌어당겨 공격하세요.,,안내 띠: 유비 스킬을 건 뒤 · 문구 = 제안 +ff_sortie_bar_aim,{0} 쪽으로 끌어당겨 쏘면 회복합니다.,,안내 띠: 가신 스킬을 건 뒤({0} = 유비) · 가신의 스킬 = 다음 사격이 아군에 맞으면 회복 · 문구 = 제안 diff --git a/Assets/Resources/UI/FirstFlow/first_flow_text.csv.meta b/Assets/Resources/UI/FirstFlow/first_flow_text.csv.meta new file mode 100644 index 00000000..120f5705 --- /dev/null +++ b/Assets/Resources/UI/FirstFlow/first_flow_text.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 928ae6d01dfddec4f8056cd1be751715 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/Scenario/scn_text.csv b/Assets/Resources/UI/Scenario/scn_text.csv index a73b04a6..4934c81d 100644 --- a/Assets/Resources/UI/Scenario/scn_text.csv +++ b/Assets/Resources/UI/Scenario/scn_text.csv @@ -65,3 +65,4 @@ scn_cond_finisher,마무리 일격,,임시 이름 · 기획 확인 필요 scn_cond_per_turn_count,턴마다 횟수,,임시 이름 · 기획 확인 필요 scn_cond_miss_limit,빗맞힘 제한,,임시 이름 · 기획 확인 필요 scn_cond_hold_in_zone,구역 지키기,,임시 이름 · 기획 확인 필요 +scn_reward_hero,{0} {1} 획득,,서장 첫 승리 보상 줄({0} 영웅 이름 · {1} 별 · reward_prologue hero · PD 2026-11-24) diff --git a/Assets/Scripts/Editor/DataImporter.cs b/Assets/Scripts/Editor/DataImporter.cs index f148b3b7..754e5477 100644 --- a/Assets/Scripts/Editor/DataImporter.cs +++ b/Assets/Scripts/Editor/DataImporter.cs @@ -99,6 +99,39 @@ namespace TKS.EditorTools Debug.Log(msg); } + /// + /// 명장 등용 표(gacha · gacha_pool · gacha_banners)만 임포트(2026-11-24 · 첫 실행 흐름 first_ten_hero) — 전체 해석·검증 뒤 GachaConfig 하나만 쓴다(오류 시 불변 · + /// 전체 임포트가 CostumeDb 의 알파 경계를 비우는 일을 피함). CLI: -executeMethod TKS.EditorTools.DataImporter.ImportGacha + /// + [MenuItem("TKS/Import Gacha (명장 등용 표 임포트)")] + public static void ImportGacha() + { + var r = OutGameTables.Parse(ReadFiles()); + if (r.errors.Count > 0) + { + foreach (var e in r.errors) Debug.LogError("[TKS] 아웃게임 표 오류 · " + e); + Debug.LogError("[TKS] 명장 등용 임포트 중단(오류 " + r.errors.Count + ") · 자산 변경 없음"); + OutGameTables.Destroy(r); + return; + } + var so = r.data.Gacha; + string msg = "[TKS] 명장 등용 임포트 완료 · 값 " + so.values.entries.Count + " · 풀 " + so.pool.Count + " · 배너 " + so.banners.Count + " · 첫 등용 확정 영웅 「" + so.FirstPullHero + "」"; + var path = AssetFolder + "/GachaConfig.asset"; + var existing = AssetDatabase.LoadAssetAtPath(path); + so.name = "GachaConfig"; + if (existing == null) AssetDatabase.CreateAsset(so, path); + else + { + EditorUtility.CopySerialized(so, existing); + existing.name = "GachaConfig"; + EditorUtility.SetDirty(existing); + } + AssetDatabase.SaveAssets(); + foreach (var x in r.data.All) + if (x != null && !AssetDatabase.Contains(x)) Object.DestroyImmediate(x); + Debug.Log(msg); + } + /// /// 장비 등급 7 · 병종 장비 · 장별 드랍 표만 임포트(2026-11-20) — 전체 해석·검증 뒤 GearDb · HeroDb(hero_gear) · PromotionTable · AwakenDb(awaken_slots) 넷만 쓴다(오류 시 불변 · /// 다른 작업의 표 변경이 다른 자산에 섞이지 않게). CLI: -executeMethod TKS.EditorTools.DataImporter.ImportGear diff --git a/Assets/Scripts/Editor/TestMenu.cs b/Assets/Scripts/Editor/TestMenu.cs index 6c068d48..470183ae 100644 --- a/Assets/Scripts/Editor/TestMenu.cs +++ b/Assets/Scripts/Editor/TestMenu.cs @@ -92,9 +92,75 @@ namespace TKS.EditorTools Debug.Log("[TKS 테스트] 꾸미기 지급 " + n + "개 · 보유 " + root.Session.Save.costumes.Count); } + // 첫 실행 흐름(2026-11-24) — 내 세이브를 지우지 않고 새 유저의 흐름(인트로 → 서장 1 ~ 3막 → 본영 · 등용 · 출정 1-1 · 군영 소개)을 본다 + // 「처음부터 보기」 하나만 누르면 된다(시험 세이브를 켜고 + 새로 만듦) — 2026-11-24 PD 「시험 세이브 지우기 해도 처음부터 시작되지 않아」 + // (그 전 = 켜기 · 지우기가 따로였고 「모두 끄기」가 켜 둔 것을 꺼서 내 세이브로 실행됨) + const string FirstFlowFreshItem = Root + "첫 실행 흐름 — 처음부터 보기 (시험 세이브 새로 · 내 세이브는 그대로)"; + const string FirstFlowItem = Root + "첫 실행 흐름 — 시험 세이브 쓰는 중 (체크를 끄면 내 세이브)"; + const string FirstFlowDeleteKey = "TKS_FF_DELETE_PENDING"; + + static string FirstFlowSavePath + { + get { return Path.Combine(Application.persistentDataPath, OutGame.SaveStore.FirstFlowTestFile); } + } + + /// 시험 세이브를 켜고 새로 만든다 → 다음 Play = 인트로부터. Play 중이면 Play 를 끈 뒤에 지운다(돌던 세션이 세이브를 다시 쓰지 않게). CLI: -executeMethod TKS.EditorTools.TestMenu.FirstFlowFresh + [MenuItem(FirstFlowFreshItem, false, 55)] + public static void FirstFlowFresh() + { + TestOptions.FirstFlowSave = true; + if (EditorApplication.isPlayingOrWillChangePlaymode) + { + SessionState.SetBool(FirstFlowDeleteKey, true); + EditorApplication.isPlaying = false; + Notify("첫 실행 흐름: Play 를 끄고 시험 세이브를 새로 만듭니다 — 다시 Play 하면 인트로부터"); + return; + } + if (File.Exists(FirstFlowSavePath)) File.Delete(FirstFlowSavePath); + Notify("첫 실행 흐름: 시험 세이브를 새로 만들었습니다 — Play 하면 인트로부터 (내 세이브는 그대로)"); + } + + /// 시험 세이브를 쓰는가(체크) — 끄면 내 세이브 · 다시 켜면 시험 세이브의 이어 하던 곳부터. + [MenuItem(FirstFlowItem, false, 56)] + public static void FirstFlowSave() + { + TestOptions.FirstFlowSave = !TestOptions.FirstFlowSave; + Notify(TestOptions.FirstFlowSave ? "첫 실행 흐름: 시험 세이브를 씁니다(이어 하던 곳부터 · 다음 Play 부터)" : "첫 실행 흐름: 내 세이브로 돌아갑니다(다음 Play 부터)"); + } + + [MenuItem(FirstFlowItem, true)] + static bool FirstFlowSaveCheck() { Menu.SetChecked(FirstFlowItem, TestOptions.FirstFlowSave); return true; } + + [InitializeOnLoadMethod] + static void FirstFlowHook() + { + EditorApplication.playModeStateChanged += s => + { + if (s == PlayModeStateChange.EnteredEditMode && SessionState.GetBool(FirstFlowDeleteKey, false)) + { + SessionState.EraseBool(FirstFlowDeleteKey); + if (File.Exists(FirstFlowSavePath)) File.Delete(FirstFlowSavePath); + Notify("첫 실행 흐름: 시험 세이브를 새로 만들었습니다 — Play 하면 인트로부터 (내 세이브는 그대로)"); + } + // Play 를 켤 때마다 어느 세이브로 도는지 알림(시험 세이브를 켜 둔 채 내 세이브인 줄 아는 일이 없게) + if (s == PlayModeStateChange.EnteredPlayMode && TestOptions.FirstFlowSave) + Notify("시험 세이브로 Play 중(첫 실행 흐름) — 내 세이브는 쓰지 않음 · 끄기 = TKS/테스트/첫 실행 흐름 — 시험 세이브 쓰는 중"); + }; + } + + /// 콘솔 + 에디터 창 위 알림(막지 않는 알림 · 대화 상자 아님). + static void Notify(string msg) + { + Debug.Log("[TKS 테스트] " + msg); + foreach (var w in Resources.FindObjectsOfTypeAll()) + if (w != null && (w.GetType().Name == "GameView" || w is SceneView)) w.ShowNotification(new GUIContent(msg), 4.0); + } + [MenuItem(Root + "모두 끄기", false, 60)] static void AllOff() { + if (TestOptions.FirstFlowSave) Notify("첫 실행 흐름: 시험 세이브도 끔 — 내 세이브로 돌아갑니다(다시 보려면 「처음부터 보기」)"); + TestOptions.FirstFlowSave = false; TestOptions.UnlockAllStages = false; TestOptions.StandardSpec = false; TestOptions.LineupIds = ""; diff --git a/Assets/Scripts/OutGame/Arena/ArenaHub.cs b/Assets/Scripts/OutGame/Arena/ArenaHub.cs index a35e49aa..69b98941 100644 --- a/Assets/Scripts/OutGame/Arena/ArenaHub.cs +++ b/Assets/Scripts/OutGame/Arena/ArenaHub.cs @@ -230,6 +230,15 @@ namespace TKS.OutGame } } + /// 그 장소가 화면 가운데에 오게 화면을 옮긴다(sec 초 · 0 = 바로) · 장소가 없으면 false — 장소 소개의 포커스(PD 2026-11-24). + public bool Focus(string spotId, float sec) + { + var s = SpotOf(spotId); + if (s == null || Fitter == null) return false; + Fitter.FocusOn(s.press, sec); + return true; + } + public Spot SpotOf(string id) { foreach (var s in Spots) @@ -282,8 +291,8 @@ namespace TKS.OutGame Scroll = View.gameObject.AddComponent(); Scroll.viewport = View; Scroll.content = Content; - Scroll.horizontal = true; - Scroll.vertical = false; + Scroll.horizontal = true; // 끌 수 있는 방향(가로 · 세로)은 화면 맞춤(ArenaHubView.Fit)이 그림과 화면 크기로 정한다 + Scroll.vertical = true; Scroll.movementType = ScrollRect.MovementType.Clamped; Scroll.scrollSensitivity = 60f; // UiKit.ScrollGrid 와 같음 diff --git a/Assets/Scripts/OutGame/Arena/ArenaHubView.cs b/Assets/Scripts/OutGame/Arena/ArenaHubView.cs index 5c43f636..01e470af 100644 --- a/Assets/Scripts/OutGame/Arena/ArenaHubView.cs +++ b/Assets/Scripts/OutGame/Arena/ArenaHubView.cs @@ -46,8 +46,61 @@ namespace TKS.OutGame float oy = (box.center.y - canvasSize.y * 0.5f) * z; float mx = Mathf.Max(0f, (canvasSize.x * z - r.width) * 0.5f); float my = Mathf.Max(0f, (canvasSize.y * z - r.height) * 0.5f); - if (scroll != null) scroll.StopMovement(); + if (scroll != null) + { + scroll.StopMovement(); + // 끌어서 볼 수 있는 방향 = 그림이 화면보다 큰 쪽만(가로 · 세로 따로) — 화면에 다 보이는 쪽은 움직이지 않는다 + // (PD 2026-11-24 「상/하/좌/우 화면의 여백까지 스크롤 · 화면 전체가 보일 경우는 스크롤이 필요 없지만 스크롤 가능할 경우 스크롤」 · 그 전 = 가로만) + scroll.horizontal = mx > 0.5f; + scroll.vertical = my > 0.5f; + } + focusing = false; content.anchoredPosition = new Vector2(Mathf.Clamp(ox, -mx, mx), Mathf.Clamp(oy, -my, my)); } + + bool focusing; + Vector2 focusFrom, focusTo; + float focusT, focusSec; + + /// 그림 좌표(캔버스 px · 왼쪽 위 기준)의 한 점이 화면 가운데에 오게 한 자리(그림이 화면 밖으로 비지 않게 자름). + public Vector2 PositionFor(Vector2 canvasPoint) + { + var r = ((RectTransform)transform).rect; + float z = Zoom; + float mx = Mathf.Max(0f, (canvasSize.x * z - r.width) * 0.5f); + float my = Mathf.Max(0f, (canvasSize.y * z - r.height) * 0.5f); + float ox = (canvasSize.x * 0.5f - canvasPoint.x) * z; + float oy = (canvasPoint.y - canvasSize.y * 0.5f) * z; + return new Vector2(Mathf.Clamp(ox, -mx, mx), Mathf.Clamp(oy, -my, my)); + } + + /// 그 점으로 화면을 옮긴다(sec 초 동안 부드럽게 · 0 = 바로) — 장소 소개(첫 실행 흐름의 군영 안내)의 포커스. + public void FocusOn(Vector2 canvasPoint, float sec) + { + if (content == null || Zoom <= 0f) return; + if (scroll != null) scroll.StopMovement(); + focusFrom = content.anchoredPosition; + focusTo = PositionFor(canvasPoint); + focusT = 0f; + focusSec = sec; + focusing = sec > 0f && (focusTo - focusFrom).sqrMagnitude > 0.25f; + if (!focusing) content.anchoredPosition = focusTo; + } + + /// 포커스 이동이 끝났는가(테스트 · 안내가 자리 잡기를 기다림). + public bool Focusing + { + get { return focusing; } + } + + void Update() + { + if (!focusing) return; + focusT += Time.unscaledDeltaTime; + float k = Mathf.Clamp01(focusT / focusSec); + k = k * k * (3f - 2f * k); + content.anchoredPosition = Vector2.Lerp(focusFrom, focusTo, k); + if (focusT >= focusSec) focusing = false; + } } } diff --git a/Assets/Scripts/OutGame/Arena/ArenaScreen.Scenario.cs b/Assets/Scripts/OutGame/Arena/ArenaScreen.Scenario.cs index feef25e0..3e3a7b42 100644 --- a/Assets/Scripts/OutGame/Arena/ArenaScreen.Scenario.cs +++ b/Assets/Scripts/OutGame/Arena/ArenaScreen.Scenario.cs @@ -120,6 +120,15 @@ namespace TKS.OutGame /// — 2026-11-18 PD 「연의 전기 스테이지와 일반 출정 스테이지는 별개 · 완전히 별개의 스테이지 개념으로」(그 전 = 출정 월드맵 1-1 ~ 1-3 으로 들어감). false = 서장 아님. /// internal bool PrologueGo(string id, int act = 0) + { + return PrologueGo(id, act, null); + } + + /// + /// flow = 첫 실행 흐름이 여는 서장(연의 전기 화면을 거치지 않음 · PD 2026-11-24) — 막 승리 = 결과 화면 없이 flow 가 다음 막(마지막 막 = 본영)으로 · 패배 = 그 막을 처음부터 다시. + /// null = 연의 전기 화면의 막 버튼 · 출전 버튼(막 승리 = 결과 화면 → 연의 전기 화면 · 지금 그대로). + /// + internal bool PrologueGo(string id, int act, FirstFlow flow) { ScenarioData.Reload(); // 막을 시작할 때마다 연출 · 안내 · 배치 표를 다시 읽음(Play 중 표 수정 = 다음 막 시작부터 · 2026-11-19 PD 「수정 요청한 항목만 바로바로 반영하고 확인」) ContentTables.Reload(); @@ -147,6 +156,12 @@ namespace TKS.OutGame Root.Toast(w); return true; } + if (flow != null) + { + rules.WinContinue = () => flow.OnActWin(rules); + Root.StartMode(ScenarioModeRules.Kind, id, 0, stage, 0, ScenarioPage, rules, () => flow.OnActExit(rules)); + return true; + } Root.StartMode(ScenarioModeRules.Kind, id, 0, stage, 0, ScenarioPage, rules); return true; } diff --git a/Assets/Scripts/OutGame/Data/GachaConfig.cs b/Assets/Scripts/OutGame/Data/GachaConfig.cs index 672fb1dd..9360663d 100644 --- a/Assets/Scripts/OutGame/Data/GachaConfig.cs +++ b/Assets/Scripts/OutGame/Data/GachaConfig.cs @@ -70,6 +70,11 @@ namespace TKS.OutGame public bool FreeFirstTen { get { return values.I("free_first_ten") > 0; } } public int TenCount { get { return values.I("ten_count"); } } public int TenGuaranteeRarity { get { return values.I("ten_guarantee_rarity"); } } + /// + /// 첫 실행 흐름의 첫 등용에서 첫 장으로 확정되는 영웅 id(gacha.csv first_pull_hero · 줄이 없거나 비어 있으면 확정 없음 = 모두 확률) + /// — PD 2026-11-24 「등용 진행 시 … 책사(가신) 중 한명을 반드시 획득」 → 「튜토리얼 종료 후 뽑기는 1회만 무료 · 1회 뽑기로 얻은 간옹을 데리고 출전」. + /// + public string FirstPullHero { get { return values.Has("first_pull_hero") ? values.S("first_pull_hero").Trim() : ""; } } /// 희귀도 등급(1~3) 확률 p_r1~p_r3. public float P(int rarity) diff --git a/Assets/Scripts/OutGame/FirstFlow.meta b/Assets/Scripts/OutGame/FirstFlow.meta new file mode 100644 index 00000000..1664f523 --- /dev/null +++ b/Assets/Scripts/OutGame/FirstFlow.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 14873e1a3c2e8b6498ea4d05f3dc42ff +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/OutGame/FirstFlow/FirstFlow.cs b/Assets/Scripts/OutGame/FirstFlow/FirstFlow.cs new file mode 100644 index 00000000..90f58804 --- /dev/null +++ b/Assets/Scripts/OutGame/FirstFlow/FirstFlow.cs @@ -0,0 +1,647 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace TKS.OutGame +{ + /// + /// 첫 실행 흐름 지휘(PD 2026-11-24 「최초 게임 실행 시 게임 Flow」 · 요청서 = 조직 레포 공유/기획팀_산출물/삼국지슬링샷/개발요청_최초실행흐름_2026-11-24.md) — + /// 타이틀 → 인트로(IntroScreen) → 서장 1 → 2 → 3막(연의 전기 화면 · 결과 화면 없이 검정 페이드로 이어짐) → 본영 로비 → 대사 줄(first_flow_lines): + /// 여인의 인사 → 「등용」 → 「10회 등용」(첫 무료 · 마지막 장 = 가신) → 가신의 한마디 → 「출정」 → (출정 1-1 첫 승리) → 가신의 진언 → 「군영」 → 군영 장소 소개 → 끝. + /// 들어가는 조건 = 기기 세이브 모드 · 서장 마지막 막을 이긴 기록이 없음 · 흐름을 끝낸 기록이 없음(세이브 firstFlow) — 서장을 이미 끝낸 세이브 = 지금처럼 로비. + /// 메모리 세이브(자동 테스트 · 검증 캡처) = 건너뜀(ForceOn 으로 켬). 진행 = 세이브 firstFlow.line(끝낸 마지막 줄) — 도중에 꺼도 다음 줄부터, 그 줄의 화면에 들어왔을 때 이어진다. + /// 값 · 문구 · 대상 · 영웅 · 배너 · 스테이지 = 표(FirstFlowData · C45). 1 ~ 3막의 연출 · 안내 · 배치 표와 연의 전기 화면의 서장 다시 보기는 건드리지 않는다. + /// + public class FirstFlow : MonoBehaviour + { + /// 테스트: 메모리 세이브에서도 흐름을 켠다(기본 = 메모리 세이브는 건너뜀 · 기존 테스트 「Battle 씬 2 프레임 안 로비」). + public static bool ForceOn; + + OutGameRoot root; + ScreenFader fader; + bool talking; + bool switching; + bool lastWin; + float eligibleSince = -1f; + int eligibleStep; + Coroutine chain; + Coroutine afterAct; + + public FirstFlowGuide Guide { get; private set; } + /// 출정 첫 스테이지의 스킬 튜토리얼(FirstFlowSortie). + public FirstFlowSortie Sortie { get; private set; } + /// 지금 화면에 떠 있는 대사 줄(없으면 null · 테스트). + public FirstFlowData.Line Current { get; private set; } + + public static FirstFlow Create(OutGameRoot root) + { + var go = new GameObject("FirstFlow"); + go.transform.SetParent(root.transform, false); + var f = go.AddComponent(); + f.root = root; + f.Sortie = FirstFlowSortie.Create(root, f); + return f; + } + + OutGameSession S + { + get { return root.Session; } + } + + FirstFlowState State + { + get { return S.Save.firstFlow; } + } + + /// 이 세션에서 첫 실행 흐름을 쓰는가 — 표 있음 · 기기 세이브 모드 · 메모리 세이브가 아님(ForceOn 이면 켬). + public bool Available + { + get { return root != null && S != null && S.FirstFlowAvailable && (ForceOn || !SaveStore.MemoryOnly) && FirstFlowData.Ready; } + } + + /// 흐름에 들어와 있고 아직 끝나지 않았는가. + public bool Active + { + get { return Available && State.started && !State.done; } + } + + /// 대사 · 막 전환 · 인트로 중(뒤로 가기를 받지 않음). + public bool Busy + { + get { return talking || switching || IntroScreen.Current != null; } + } + + public bool Switching + { + get { return switching; } + } + + string PrologueId + { + get { return FirstFlowData.Str("prologue_battle"); } + } + + int PrologueActs + { + get + { + var b = ContentTables.Find("scenario_battles", "s_id", PrologueId); + return b != null && b.I("n_no") == 0 ? Mathf.Max(1, b.I("n_acts")) : 0; + } + } + + bool PrologueDone + { + get + { + int acts = PrologueActs; + return acts <= 0 || ScenarioModeRules.ActsCleared(S.Save, PrologueId) >= acts; + } + } + + // ---------- 시작(타이틀 누름 뒤 · Battle 씬) ---------- + + /// + /// 게임 시작 — 첫 실행(서장을 끝내지 않은 새 세이브)이면 인트로(아직 안 봤으면) → 아직 이기지 못한 첫 막을 열고 true(호출 쪽은 로비를 띄우지 않는다). + /// false = 지금처럼 본영 로비(서장을 끝낸 세이브 · 메모리 세이브 · 서버 모드 · 표 없음) — 서장 뒤 대사가 남아 있으면 로비에서 이어진다. + /// + public bool BootBegin() + { + if (!Available) return false; + var st = State; + if (st.done) return false; + bool prologueDone = PrologueDone; + if (!st.started) + { + if (prologueDone) return false; // 서장을 이미 끝낸 예전 세이브 = 흐름에 들어가지 않음 + st.started = true; + if (S.IsNewUser) ResetRoster(); // 새 유저 = 표 start_heroes 만 보유(비어 있음 = 없음) → 서장 보상으로 유비 · 등용으로 가신 + S.Commit(); + } + if (prologueDone) return false; // 서장 뒤에 끈 세이브 = 로비에서 대사를 이어 감 + int act = ScenarioModeRules.NextAct(S.Save, PrologueId, PrologueActs); + if (!st.intro && IntroScreen.CanShow) + { + root.SetBattleHud(false); // 인트로 밑에서 전투 HUD · 조작이 돌지 않게(1막을 열 때 다시 켜짐) + IntroScreen.Show(root.Cam, () => + { + State.intro = true; + S.Commit(); + if (!StartAct(act)) root.ShowLobby(); + }); + return true; + } + return StartAct(act); + } + + /// + /// 새 유저의 보유 영웅을 표(first_flow_config start_heroes · | 로 여럿 · 비어 있음 = 없음)대로 맞춘다 — PD 2026-11-24 + /// 「최초 게임 실행 시 보유한 유닛은 유비(연의 전기로 획득), 그리고 [등용] 보상으로 얻은 유닛들로만」(기본 지급 = economy.csv start_heroes 를 이 흐름에서만 뺀다). + /// + void ResetRoster() + { + var keep = new HashSet(); + foreach (var id in FirstFlowData.List("start_heroes")) + if (id.Trim().Length > 0) keep.Add(id.Trim()); + var d = S.Save; + d.heroes.RemoveAll(h => !keep.Contains(h.id)); + d.units.RemoveAll(u => !keep.Contains(u.id)); + HeroRules.Sanitize(S.Db, d, S.FormationSlots); // 편성 칸에서 없는 영웅을 비움 + } + + /// 출전 편성이 비어 있으면 보유 영웅을 앞 칸부터 세운다(서장 보상으로 유비를 얻은 직후 = 로비에 유비만). + void FillEmptyLineup() + { + var d = S.Save; + var p = d.ActivePreset; + if (p == null) return; + foreach (var id in p.slots) + if (!string.IsNullOrEmpty(id)) return; + int at = 0; + foreach (var h in d.heroes) + { + if (at >= p.slots.Count) break; + p.slots[at++] = h.id; + } + if (at > 0) S.Commit(); + } + + /// 서장 막을 연의 전기 화면 없이 연다 · false = 못 엶(표 없음 · 군량 부족 …). + bool StartAct(int act) + { + if (!root.Arena.PrologueGo(PrologueId, act, this)) return false; + return FlowRules(root.Battle) != null; + } + + /// 지금 전투가 첫 실행 흐름이 연 서장 막인가(그 규칙 · 아니면 null). + static PrologueRules FlowRules(BattleManager b) + { + var r = b != null && b.Mode != null ? b.Mode.rules as PrologueRules : null; + return r != null && r.WinContinue != null ? r : null; + } + + // ---------- 서장 막 잇기 ---------- + + /// 막 승리 연출이 끝남(결과 화면 대신) — 막 기록 · 보상은 지금 규칙대로 처리하고 검정 페이드 → 다음 막(마지막 막 = 본영 로비). + internal bool OnActWin(PrologueRules r) + { + if (!Available) return false; + if (r.LastAct) return false; // 마지막 막 = 결과 화면으로 서장 보상(유비 획득)을 알림(PD 2026-11-24) → 닫으면 본영(OnActExit) + root.SettleMode(true); + if (afterAct != null) StopCoroutine(afterAct); // 앞 막 전환의 페이드가 아직 걷히는 중 = 그 페이드를 이어 받음 + afterAct = StartCoroutine(AfterAct(r)); + return true; + } + + IEnumerator AfterAct(PrologueRules r) + { + switching = true; + root.SetBattleHud(false); + var f = Fader(); + if (ScenarioEvent.EndedBlack) f.Alpha = 1f; // 승리 연출이 검게 끝남(3막) = 그대로 이어 받음 + else yield return f.FadeTo(1f, ScenarioData.EvCfg("fade_sec")); + bool next = !r.LastAct && StartAct(r.Act + 1); + if (!next) + { + root.Battle.LeaveMode(); + root.ShowLobby(); + } + var io = FirstFlowData.List(next ? "act_in" : "lobby_in"); // 검정 유지 | 밝아지는 시간 + yield return Hold(ScreenTable.At(io, 0, 0.15f)); + yield return f.FadeTo(0f, ScreenTable.At(io, 1, 0.3f)); + DropFader(); + switching = false; + afterAct = null; + } + + /// 결과 창을 닫은 뒤 — 패배 · 포기 = 그 막을 처음부터 다시(연의 전기 화면으로 나가지 않음) · 마지막 막 승리 = 본영 로비(출전 편성 = 얻은 유비). + internal void OnActExit(PrologueRules r) + { + if (!lastWin && StartAct(r.Act)) return; + FillEmptyLineup(); + root.ShowLobby(); + } + + /// 컨텐츠 모드 결과가 채워진 직후 — 첫 실행 흐름의 서장 패배 = 버튼 글자 「다시 도전」. + internal void OnModeResult(BattleResultPanel panel, bool win) + { + lastWin = win; + if (!win && panel != null && FlowRules(root.Battle) != null) panel.SetOkText(FirstFlowData.T("ff_retry")); + } + + ScreenFader Fader() + { + if (fader != null) return fader; + var fd = FirstFlowData.List("fade"); // 정렬 순서 | 색 + fader = ScreenFader.Create(root.Cam, (int)ScreenTable.At(fd, 0, 940f), ScreenTable.Col(fd, 1, Color.black)); + return fader; + } + + void DropFader() + { + if (fader != null) Destroy(fader.gameObject); + fader = null; + } + + static IEnumerator Hold(float sec) + { + for (float t = 0f; t < sec; t += Time.unscaledDeltaTime) yield return null; + } + + void OnDestroy() + { + DropFader(); + } + + // ---------- 대사 줄 ---------- + + void Update() + { + if (talking || switching || root == null || root.Session == null) return; + if (!Active) + { + eligibleSince = -1f; + return; + } + var show = Eligible(); + if (show == null) + { + eligibleSince = -1f; + return; + } + // 그 화면에 들어온 뒤 잠깐 뜸을 들이고 시작(본영 로비가 밝아지고 0.5초 뒤 · 표 start_delay_sec) + if (eligibleSince < 0f || eligibleStep != show.step) + { + eligibleSince = Time.unscaledTime; + eligibleStep = show.step; + } + if (Time.unscaledTime - eligibleSince < FirstFlowData.Num("start_delay_sec", 0.5f)) return; + eligibleSince = -1f; + chain = StartCoroutine(Run(show)); + } + + /// 지금 화면에서 시작할 줄 — 다음 줄(건너뛰기 처리 뒤)이 이 화면의 줄이면 그 줄 · 아니고 본영 로비에 있으면 그 화면으로 이끄는 줄(n_gate) · 없으면 null. + FirstFlowData.Line Eligible() + { + if (Blocked()) return null; + var next = Next(); + if (next == null) return null; + if (!WaitOk(next)) return null; + if (ScreenOk(next)) return next; + if (next.gate > 0 && OnScreen(FirstFlowData.ScreenLobby)) + { + var g = FirstFlowData.LineOf(next.gate); + if (g != null && Targets(g) != null) return g; + } + return null; + } + + /// 다른 창 · 화면 전환이 떠 있어 대사를 시작하지 않는 때. + bool Blocked() + { + return root.ModalVisible || root.ResultVisible || SceneSwitch.Current != null || BootFlow.Current != null || TitleScreen.Current != null || IntroScreen.Current != null || LoadingScreen.Current != null; + } + + /// 끝낸 줄의 다음 줄 — 건너뛰는 조건(s_skip_if)이 참이면 n_skip_to 로 기록을 옮긴다 · 다음 줄이 없으면 흐름 끝. + FirstFlowData.Line Next() + { + for (int guard = 0; guard < 64; guard++) + { + var l = FirstFlowData.LineOf(State.line + 1); + if (l == null) + { + Finish(); + return null; + } + if (l.skipIf.Length == 0 || !SkipCond(l.skipIf)) return l; + State.line = Mathf.Max(State.line + 1, l.skipTo - 1); + S.Commit(); + } + return null; + } + + bool SkipCond(string cond) + { + if (cond == FirstFlowData.SkipFirstPullDone) return S.Save.gacha.total > 0; + if (cond == FirstFlowData.SkipRetainerPlaced) + { + var p = S.Save.ActivePreset; + return p != null && RetainerId.Length > 0 && p.slots.Contains(RetainerId); + } + return false; + } + + /// 가신 = gacha.csv first_pull_hero 의 영웅 id(첫 등용의 첫 장). + public string RetainerId + { + get { return S.Db.Gacha.FirstPullHero; } + } + + /// 서장 보상으로 얻는 영웅(scenario_battles 서장 편의 s_reward_hero = 유비) — 출정 첫 스테이지 스킬 튜토리얼의 주인공. + public string VictimId + { + get + { + var b = ContentTables.Find("scenario_battles", "s_id", PrologueId); + return b != null ? b.S("s_reward_hero") : ""; + } + } + + bool WaitOk(FirstFlowData.Line l) + { + if (l.wait.Length == 0) return true; + int ch, st; + string key = FirstFlowData.Arg(l.wait, FirstFlowData.WaitStageClear); + if (key == null || !FirstFlowData.ParseStage(key, out ch, out st)) return true; + var rec = S.Save.Stage(ch, st, false); + return rec != null && rec.clears > 0; + } + + bool ScreenOk(FirstFlowData.Line l) + { + foreach (var sc in l.screens) + if (OnScreen(sc) && (!l.HasTarget || l.targetScreen == sc)) + return true; + return false; + } + + bool OnScreen(string sc) + { + switch (sc) + { + case FirstFlowData.ScreenLobby: return root.LobbyVisible; + case FirstFlowData.ScreenRecruit: return root.ScreensVisible && root.Current == root.Trade && root.Trade.Page == 0 && !root.Trade.ResultVisible; + case FirstFlowData.ScreenMap: return root.Map != null && root.Map.IsVisible && !root.Map.PopupVisible && root.Battle.Phase == BattlePhase.Setup; + case FirstFlowData.ScreenCamp: return root.ScreensVisible && root.Current == root.Arena && root.Arena.HubVisible; + case FirstFlowData.ScreenFormation: return root.ScreensVisible && root.Current == root.Formation; + } + return false; + } + + RectTransform ScreenRoot(string sc) + { + switch (sc) + { + case FirstFlowData.ScreenLobby: return root.Lobby.Rt; + case FirstFlowData.ScreenRecruit: return root.Trade.Rt; + case FirstFlowData.ScreenCamp: return root.Arena.Rt; + case FirstFlowData.ScreenFormation: return root.Formation.Rt; + } + return null; + } + + /// 줄의 대상 오브젝트들(화면 안에서 이름으로 찾음 · 켜져 있는 것만) — 하나라도 못 찾으면 null. + List Targets(FirstFlowData.Line l) + { + if (!l.HasTarget) return null; + var sr = ScreenRoot(l.targetScreen); + if (sr == null) return null; + var list = new List(); + var all = sr.GetComponentsInChildren(false); + foreach (var raw in l.targetNames) + { + string name = raw.Replace(FirstFlowData.RetainerToken, RetainerId); // 예 C_{retainer} = 편성 화면의 가신 카드 + RectTransform hit = null; + foreach (var rt in all) + if (rt.name == name) + { + hit = rt; + break; + } + if (hit == null) return null; + list.Add(hit); + } + return list; + } + + /// 누르게 하는 줄의 대상이 눌렸는가를 받는 것 — 버튼(onClick) 또는 TapDrag(편성 화면의 영웅 카드 · OnTap). + class PressHook + { + Button btn; + TapDrag tap; + System.Action prevTap; + UnityEngine.Events.UnityAction onClick; + + public static PressHook Of(List targets) + { + if (targets == null) return null; + foreach (var t in targets) + { + var b = t.GetComponent