From 8accc378963eedb962163a296e4c403ef4346214 Mon Sep 17 00:00:00 2001 From: swrring Date: Tue, 24 Nov 2026 14:45:48 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=AC=ED=99=94=203=20~=204=EC=B0=A8=20?= =?UTF-8?q?=EA=B2=B0=EC=A0=95=20=C2=B7=20=EB=B3=B4=EB=AC=BC=20=EC=83=81?= =?UTF-8?q?=EC=9E=90=20=E3=80=8C=ED=95=9C=20=EB=B2=88=EC=97=90=20=ED=95=98?= =?UTF-8?q?=EB=82=98=E3=80=8D=20=C2=B7=20=EA=B3=B5=EB=B0=A9(=EC=B1=84?= =?UTF-8?q?=EA=B5=B4=20=C2=B7=20=EC=A0=9C=EC=9E=91)=20=EA=B5=AC=ED=98=84(P?= =?UTF-8?q?D=202026-11-24=20=E3=80=8C=EB=B3=B8=20=EC=84=B8=EC=85=98?= =?UTF-8?q?=EC=9D=98=20=EC=9E=91=EC=97=85=EB=AC=BC=20=EB=AA=A8=EB=91=90=20?= =?UTF-8?q?=EC=BB=A4=EB=B0=8B&=ED=91=B8=EC=8B=9C=E3=80=8D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 재화 밸런스 3 ~ 4차 결정 반영(앞 세션 미커밋분) - 풀성장 기준(무과금 140 · 소액 90 · 고액 45일)에 맞춘 값: hard_mode · skill_upgrade(스킬 풀 강화 600) · training_ranks · 군량 구매 값 - 보물 등급별 능력치 값 · 중복 조각(treasures) · 상점 상품 하루 1번 · 이벤트 보상 표 보물 상자 = 한 번 열면 하나만(PD 「각 상자 별 드랍 아이템 컨셉이 다르고 한번에 하나의 아이템만」) - chests(p_* · gold_* · gem_* · iron_* 칸 삭제 + concept_ko) · chest_loot(상자마다 확률 합 100 · treasure_<등급> 낱말) - TreasureRules.Open = 줄 하나 고르기 · 명장 상자 = 진영 비서(열 때 진영 고르기 · ShopWindow.ClaimPicks) - 보물 > 상자 내용 칩 · 결과 팝업 · 거래 > 보물 상자 요약 공방(하단 탭 5번 · 채굴 · 제작 · 그림 = 더미) - 표: mine_blocks · mine_layers · mine_contents · mine_tools · mine_depth_rewards · craft_grades + content_modes_config(workshop · mine · craft) · chest_drop(mine) · 철광석 재화 · dev_tree 공업(관영 공방 = 제작 등급 · 곡괭이 보관 · 제작 비용) - 채굴(MineRules): 끝없는 갱도(깊이 m) · 철광맥 · 금강석 · 묻힌 것 · 도구(쇠말뚝 · 화약) · 곡괭이 충전(기본 20 · 최대 100) · 깊이 보상 - 제작(CraftRules): 일반 = 재료 장비 없이 · 그 위 = 아래 등급 3개 + 철광석 + 골드(도면 안 씀) · 소지품 제외 · 대기열 · 즉시 완성 - 화면(WorkshopScreen): 병종 탭 + 필터 · 모든 등급 목록(잠금) · 재료 확인 창 · 하단 공방 탭 빨간 점 - 테스트 WorkshopTests 7 · 캡처 -uiOnly workshop_* Co-Authored-By: Claude Fable 5.2 --- Assets/Data/OutGame/chest_drop.csv | 4 + Assets/Data/OutGame/chest_loot.csv | 37 +- Assets/Data/OutGame/chests.csv | 12 +- Assets/Data/OutGame/dev_tree.csv | 5 +- Assets/Data/OutGame/economy.csv | 6 +- Assets/Data/OutGame/goods_awaken_evolve.csv | 1 + Assets/Data/OutGame/hard_mode.csv | 2 +- Assets/Data/OutGame/patrol.csv | 22 +- Assets/Data/OutGame/skill_upgrade.csv | 18 +- Assets/Data/OutGame/training_ranks.csv | 12 +- Assets/Data/OutGame/treasures.csv | 60 +- .../ContentModes/content_modes_config.csv | 15 + .../Resources/ContentModes/craft_grades.csv | 8 + .../ContentModes/craft_grades.csv.meta | 7 + Assets/Resources/ContentModes/medal_shop.csv | 8 +- Assets/Resources/ContentModes/mine_blocks.csv | 7 + .../ContentModes/mine_blocks.csv.meta | 7 + .../Resources/ContentModes/mine_contents.csv | 9 + .../ContentModes/mine_contents.csv.meta | 7 + .../ContentModes/mine_depth_rewards.csv | 3 + .../ContentModes/mine_depth_rewards.csv.meta | 7 + Assets/Resources/ContentModes/mine_layers.csv | 5 + .../ContentModes/mine_layers.csv.meta | 7 + Assets/Resources/ContentModes/mine_tools.csv | 4 + .../ContentModes/mine_tools.csv.meta | 7 + Assets/Resources/ContentModes/raid_shop.csv | 6 +- Assets/Resources/Event/event_attend.csv | 7 +- Assets/Resources/Event/event_items.csv | 3 +- Assets/Resources/Event/event_mission7.csv | 9 +- .../Resources/Event/event_mission7_steps.csv | 3 +- Assets/Resources/Event/event_roulette.csv | 3 +- .../Resources/Event/event_roulette_extra.csv | 3 +- Assets/Resources/OutGame/AwakenDb.asset | 23 +- Assets/Resources/OutGame/ChestDb.asset | 60 +- Assets/Resources/OutGame/DevTree.asset | 22 +- Assets/Resources/OutGame/EconomyConfig.asset | 6 +- Assets/Resources/OutGame/GoodsDb.asset | 195 ++-- Assets/Resources/OutGame/PatrolTable.asset | 80 ++ Assets/Resources/OutGame/TrainingTable.asset | 12 +- Assets/Resources/OutGame/TreasureDb.asset | 142 +-- Assets/Resources/UI/Event/event_text.csv | 2 +- Assets/Scripts/OutGame/Data/EconomyConfig.cs | 12 +- Assets/Scripts/OutGame/Data/GoodsDb.cs | 11 +- .../Scripts/OutGame/Data/OutGameTables.C.cs | 40 +- .../OutGame/Data/OutGameTables.Goods.cs | 22 +- Assets/Scripts/OutGame/Domestic/DevRules.cs | 7 +- .../Scripts/OutGame/Domestic/PatrolRules.cs | 63 +- .../Scripts/OutGame/Domestic/PatrolTable.cs | 4 + Assets/Scripts/OutGame/EconomyRules.cs | 7 +- Assets/Scripts/OutGame/Event/EventRules.cs | 1 + Assets/Scripts/OutGame/GoodsRules.cs | 39 +- Assets/Scripts/OutGame/Net/ServerSession.cs | 25 +- Assets/Scripts/OutGame/OutGameSession.cs | 44 +- Assets/Scripts/OutGame/SaveData.cs | 6 + Assets/Scripts/OutGame/Treasure/ChestDb.cs | 11 +- .../Scripts/OutGame/Treasure/TreasureRules.cs | 132 ++- .../OutGame/Treasure/TreasureScreen.cs | 186 ++-- Assets/Scripts/OutGame/UI/OutGameRoot.cs | 61 +- Assets/Scripts/OutGame/UI/ShopWindow.cs | 18 +- Assets/Scripts/OutGame/UI/TradeScreen.cs | 11 +- Assets/Scripts/OutGame/UICaptureDriver.cs | 80 ++ Assets/Scripts/OutGame/Workshop.meta | 8 + .../Scripts/OutGame/Workshop/WorkshopRules.cs | 742 +++++++++++++++ .../OutGame/Workshop/WorkshopRules.cs.meta | 2 + .../OutGame/Workshop/WorkshopScreen.cs | 851 ++++++++++++++++++ .../OutGame/Workshop/WorkshopScreen.cs.meta | 2 + Assets/Tests/PlayMode/GoodsTests.cs | 190 +++- Assets/Tests/PlayMode/OutGameCTests.cs | 47 +- Assets/Tests/PlayMode/OutGameTests.cs | 13 +- Assets/Tests/PlayMode/ServerLinkTests.cs | 2 +- Assets/Tests/PlayMode/TreasureSceneTests.cs | 126 ++- Assets/Tests/PlayMode/WorkshopTests.cs | 626 +++++++++++++ Assets/Tests/PlayMode/WorkshopTests.cs.meta | 2 + CLAUDE.md | 4 + 74 files changed, 3675 insertions(+), 576 deletions(-) create mode 100644 Assets/Resources/ContentModes/craft_grades.csv create mode 100644 Assets/Resources/ContentModes/craft_grades.csv.meta create mode 100644 Assets/Resources/ContentModes/mine_blocks.csv create mode 100644 Assets/Resources/ContentModes/mine_blocks.csv.meta create mode 100644 Assets/Resources/ContentModes/mine_contents.csv create mode 100644 Assets/Resources/ContentModes/mine_contents.csv.meta create mode 100644 Assets/Resources/ContentModes/mine_depth_rewards.csv create mode 100644 Assets/Resources/ContentModes/mine_depth_rewards.csv.meta create mode 100644 Assets/Resources/ContentModes/mine_layers.csv create mode 100644 Assets/Resources/ContentModes/mine_layers.csv.meta create mode 100644 Assets/Resources/ContentModes/mine_tools.csv create mode 100644 Assets/Resources/ContentModes/mine_tools.csv.meta create mode 100644 Assets/Scripts/OutGame/Workshop.meta create mode 100644 Assets/Scripts/OutGame/Workshop/WorkshopRules.cs create mode 100644 Assets/Scripts/OutGame/Workshop/WorkshopRules.cs.meta create mode 100644 Assets/Scripts/OutGame/Workshop/WorkshopScreen.cs create mode 100644 Assets/Scripts/OutGame/Workshop/WorkshopScreen.cs.meta create mode 100644 Assets/Tests/PlayMode/WorkshopTests.cs create mode 100644 Assets/Tests/PlayMode/WorkshopTests.cs.meta diff --git a/Assets/Data/OutGame/chest_drop.csv b/Assets/Data/OutGame/chest_drop.csv index 6725708f..70233337 100644 --- a/Assets/Data/OutGame/chest_drop.csv +++ b/Assets/Data/OutGame/chest_drop.csv @@ -9,3 +9,7 @@ patrol,8,10,72,22,5.5,0.5,시간당 0.2개 · 구간 = 장 bandit,1,3,80,17,3,0,S · A 2개 · B · C 1개 · 구간 = 단계 bandit,4,7,68,25,6.5,0.5,S · A 2개 · B · C 1개 · 구간 = 단계 bandit,8,10,55,32,12,1,S · A 2개 · B · C 1개 · 구간 = 단계 +mine,1,200,90,9,1,0,공방 채굴(묻힌 상자 · 금강석 · 깊이 보상) · 구간 = 깊이 m(PD 2026-11-24 「보물 상자(랜덤)」) +mine,201,1000,84,13,3,0,공방 채굴 · 구간 = 깊이 m +mine,1001,3000,76,19,4.5,0.5,공방 채굴 · 구간 = 깊이 m +mine,3001,9999999,68,24,7,1,공방 채굴 · 구간 = 깊이 m diff --git a/Assets/Data/OutGame/chest_loot.csv b/Assets/Data/OutGame/chest_loot.csv index 4f4756d4..747d0e9e 100644 --- a/Assets/Data/OutGame/chest_loot.csv +++ b/Assets/Data/OutGame/chest_loot.csv @@ -1,20 +1,19 @@ s_chest,s_item,f_pct,n_min,n_max,Memo -bronze,iron,50,1,3,보물 굴림 · 골드는 지금 chests 표 그대로 -bronze,blueprint,20,1,1,보물 굴림 · 골드는 지금 chests 표 그대로 -bronze,gem,10,5,10,보물 굴림 · 골드는 지금 chests 표 그대로 -bronze,tome_t1,4,1,1,보물 굴림 · 골드는 지금 chests 표 그대로 -silver,iron,100,3,8,보물 굴림 · 골드는 지금 chests 표 그대로 -silver,blueprint,50,1,2,보물 굴림 · 골드는 지금 chests 표 그대로 -silver,gem,20,10,30,보물 굴림 · 골드는 지금 chests 표 그대로 -silver,tome_t1,8,1,1,보물 굴림 · 골드는 지금 chests 표 그대로 -silver,tome_t2,4,1,1,보물 굴림 · 골드는 지금 chests 표 그대로 -gold,iron,100,10,30,보물 굴림 · 골드는 지금 chests 표 그대로 -gold,blueprint,100,2,4,보물 굴림 · 골드는 지금 chests 표 그대로 -gold,gem,30,30,80,보물 굴림 · 골드는 지금 chests 표 그대로 -gold,tome_t2,12,1,1,보물 굴림 · 골드는 지금 chests 표 그대로 -gold,tome_t3,6,1,1,보물 굴림 · 골드는 지금 chests 표 그대로 -general,iron,100,20,50,보물 굴림 · 골드는 지금 chests 표 그대로 -general,blueprint,100,4,8,보물 굴림 · 골드는 지금 chests 표 그대로 -general,gem,50,80,200,보물 굴림 · 골드는 지금 chests 표 그대로 -general,tome_t3,20,1,1,보물 굴림 · 골드는 지금 chests 표 그대로 -general,tome_t4,8,1,1,보물 굴림 · 골드는 지금 chests 표 그대로 +bronze,gold,38,2000,2000,"재료 · 골드 2,000 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100)" +bronze,gold,14,6000,6000,"재료 · 골드 6,000 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100)" +bronze,iron,27,8,8,재료 · 운철 8 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +bronze,iron,8,25,25,재료 · 운철 25 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +bronze,blueprint,5,1,1,재료 · 도면 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +bronze,gem,8,50,50,재료 · 보옥 50 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +silver,treasure_rare,70,1,1,보물(희귀 ~ 전설) · 희귀 보물 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +silver,treasure_epic,27,1,1,보물(희귀 ~ 전설) · 영웅 보물 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +silver,treasure_legend,3,1,1,보물(희귀 ~ 전설) · 전설 보물 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +gold,treasure_epic,55,1,1,보물(영웅 ~ 신화) · 영웅 보물 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +gold,treasure_legend,40,1,1,보물(영웅 ~ 신화) · 전설 보물 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +gold,treasure_myth,5,1,1,보물(영웅 ~ 신화) · 신화 보물 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +general,tome_t1,20,1,1,진영 비서(진화 재료) · 하급 비서 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +general,tome_t2,30,1,1,진영 비서(진화 재료) · 중급 비서 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +general,tome_t3,35,1,1,진영 비서(진화 재료) · 상급 비서 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +general,tome_t4,15,1,1,진영 비서(진화 재료) · 특급 비서 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +gem,treasure_legend,75,1,1,보물(전설 ~ 신화) · 보옥 구매 · 전설 보물 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) +gem,treasure_myth,25,1,1,보물(전설 ~ 신화) · 보옥 구매 · 신화 보물 1 · 상자를 열면 이 상자의 줄 가운데 하나만(확률 합 100) diff --git a/Assets/Data/OutGame/chests.csv b/Assets/Data/OutGame/chests.csv index d32e87f2..1cd86435 100644 --- a/Assets/Data/OutGame/chests.csv +++ b/Assets/Data/OutGame/chests.csv @@ -1,6 +1,6 @@ -id,name_ko,points,p_rare,p_epic,p_legend,p_myth,gold_min,gold_max,gem_min,gem_max,source,iron_min,iron_max,buy_gold,buy_gem,buy_points -bronze,구리 상자,1,0.8,0.2,0,0,300,800,0,0,출정;순찰;황건적 소탕;임무,0,0,1000,0,0 -silver,은 상자,10,0.5,0.4,0.1,0,800,2000,0,0,출정;순찰;황건적 소탕;임무,0,0,0,150,30 -gold,금 상자,30,0,0.55,0.4,0.05,2000,5000,0,0,출정;순찰;황건적 소탕;임무,0,0,0,450,90 -general,명장 상자,50,0,0.3,0.5,0.2,5000,10000,0,0,출정;상자 포인트;훈장 상점,0,0,0,0,0 -gem,신물 상자,0,0,0,0.75,0.25,0,0,300,1300,상점,0,0,0,1500,0 +id,name_ko,concept_ko,points,source,buy_gold,buy_gem,buy_points +bronze,구리 상자,재료,1,출정;순찰;황건적 소탕;임무,1000,0,0 +silver,은 상자,보물(희귀 ~ 전설),10,출정;순찰;황건적 소탕;임무,0,150,30 +gold,금 상자,보물(영웅 ~ 신화),30,출정;순찰;황건적 소탕;임무,0,450,90 +general,명장 상자,진영 비서(진화 재료),50,출정;상자 포인트;훈장 상점,0,0,0 +gem,신물 상자,보물(전설 ~ 신화),0,상점,0,1500,0 diff --git a/Assets/Data/OutGame/dev_tree.csv b/Assets/Data/OutGame/dev_tree.csv index 692bc353..9309e045 100644 --- a/Assets/Data/OutGame/dev_tree.csv +++ b/Assets/Data/OutGame/dev_tree.csv @@ -20,9 +20,10 @@ agri,agr_patrol_gear,둔전 장비 확률,small,patrol_gear_chance_pct,2,10,200, industry,ind_gear_drop,장비 드랍,small,gear_drop_pct,2,10,200,1.3,5,1, industry,ind_chest_high,상자 상위 확률,small,chest_high_grade_pct,1,10,200,1.3,5,1,ind_gear_drop:3 industry,ind_iron_gain,운철,small,iron_gain_pct,3,10,200,1.3,5,1,ind_gear_drop:5 -industry,ind_craft_cost,합성 비용,small,craft_cost_cut_pct,2,10,200,1.3,5,1,ind_chest_high:5 -industry,ind_workshop,관영 공방,big,craft_bulk;craft_blueprint_cut,1,3,200,1.3,1,20,ind_iron_gain:5;ind_craft_cost:5 +industry,ind_craft_cost,제작 비용,small,craft_cost_cut_pct,2,10,200,1.3,5,1,ind_chest_high:5 +industry,ind_workshop,관영 공방,big,craft_grade_add,1,6,200,1.3,1,10,ind_iron_gain:5;ind_craft_cost:5 industry,ind_gear_sell,장비 판매,small,gear_sell_pct,2,10,200,1.3,5,1,ind_workshop:1 industry,ind_blueprint_gain,도면 획득,small,blueprint_gain_pct,2,10,200,1.3,5,1,ind_workshop:1 industry,ind_dungeon_gear,던전 장비,small,dungeon_gear_pct,2,10,200,1.3,5,1,ind_gear_sell:5 industry,ind_chest_tier,상자 등급,small,chest_tier_up_pct,1,10,200,1.3,5,1,ind_blueprint_gain:5 +industry,ind_pick_cap,곡괭이 보관,small,pick_cap_add,8,10,200,1.3,5,1,ind_workshop:1 diff --git a/Assets/Data/OutGame/economy.csv b/Assets/Data/OutGame/economy.csv index 454a2e8a..c4ef1cd6 100644 --- a/Assets/Data/OutGame/economy.csv +++ b/Assets/Data/OutGame/economy.csv @@ -6,9 +6,9 @@ stage_cost,5 boss_cost,10 ad_stamina,10 ad_stamina_daily,2 -gem_stamina_cost,50 -gem_stamina_amount,15 -gem_stamina_daily,2 +gem_stamina_cost,50;50;100;100;200;200;400;400 +gem_stamina_amount,50 +gem_stamina_daily,8 repeat_reward_mult,0.5 soldier_dup_gold,500 start_gold,1000 diff --git a/Assets/Data/OutGame/goods_awaken_evolve.csv b/Assets/Data/OutGame/goods_awaken_evolve.csv index d4337388..0fb88548 100644 --- a/Assets/Data/OutGame/goods_awaken_evolve.csv +++ b/Assets/Data/OutGame/goods_awaken_evolve.csv @@ -3,3 +3,4 @@ 504,awaken_stone,각성석,Material,Counter,awaken_stone,1,None,None,얻는 곳 = 병법 훈련(supply_rewards n_awaken_stone) · 맹장 토벌전(참가 · 누적 단계) · 훈장 상점 · 천하제일 탑 층 첫 클리어 / 쓰는 곳 = 각성(awaken_cost) 505,univ_shard,만능 조각,Material,Counter,univ_shard,1,None,None,쓰는 곳 = 스킬 강화에서 그 영웅 조각이 모자란 몫만 채운다(skill_config.substitute · 영웅 조각 먼저) / 얻는 곳 = 미정(PD 결정 대기) · 시험 = 테스트 지급 510,tome,진영 비서 16종,Material,Counter,tome_<진영>_<등급>,1,None,None,id 511~544 = evolve_items 표(진영 4 × 등급 4) / 얻는 곳 = 메달 · 훈장 상점(진영을 골라 삼 · medal_shop · raid_shop) · 보물 상자(진영 무작위 · chest_loot) · 천하제일 탑 층 첫 클리어 / 쓰는 곳 = 진화 +506,iron_ore,철광석,Material,Counter,iron_ore,1,None,None,얻는 곳 = 공방 채굴(철광맥을 때릴 때마다 · PD 2026-11-24) / 쓰는 곳 = 장비 제작(craft_grades n_ore) diff --git a/Assets/Data/OutGame/hard_mode.csv b/Assets/Data/OutGame/hard_mode.csv index 11bbcfc6..6821fefd 100644 --- a/Assets/Data/OutGame/hard_mode.csv +++ b/Assets/Data/OutGame/hard_mode.csv @@ -8,4 +8,4 @@ 7,blue;purple;orange,20;70;10,10,20,3,1.5,2,50,20 8,purple;orange,60;40,10,20,3,1.5,2,50,20 9,purple;orange,30;70,10,20,3,1.5,2,50,20 -10,orange;red,90;10,10,20,3,1.5,2,50,20 +10,orange;red,98;2,10,20,3,1.5,2,50,20 diff --git a/Assets/Data/OutGame/patrol.csv b/Assets/Data/OutGame/patrol.csv index 554828fd..93963653 100644 --- a/Assets/Data/OutGame/patrol.csv +++ b/Assets/Data/OutGame/patrol.csv @@ -1,11 +1,11 @@ -chapter,gold_per_hour,exp_per_hour,gear_grade,chest_bronze_per_hour -1,270,56,white,0.2 -2,360,72,white,0.2 -3,450,88,white,0.2 -4,540,104,green,0.2 -5,630,120,green,0.2 -6,720,136,green,0.2 -7,810,152,green,0.2 -8,900,168,blue,0.2 -9,990,184,blue,0.2 -10,1080,200,blue,0.2 +chapter,gold_per_hour,exp_per_hour,l_gear_grade,l_gear_weight,chest_bronze_per_hour +1,270,56,white,100,0.2 +2,360,72,white;green,95;5,0.2 +3,450,88,white;green,85;15,0.2 +4,540,104,white;green;blue,35;60;5,0.2 +5,630,120,white;green;blue,25;65;10,0.2 +6,720,136,white;green;blue;purple,15;65;18;2,0.2 +7,810,152,white;green;blue;purple,10;60;26;4,0.2 +8,900,168,green;blue;purple,40;52;8,0.2 +9,990,184,green;blue;purple;orange,30;55;13;2,0.2 +10,1080,200,green;blue;purple;orange,20;57;18;5,0.2 diff --git a/Assets/Data/OutGame/skill_upgrade.csv b/Assets/Data/OutGame/skill_upgrade.csv index 852f8e4f..3af9c286 100644 --- a/Assets/Data/OutGame/skill_upgrade.csv +++ b/Assets/Data/OutGame/skill_upgrade.csv @@ -1,10 +1,10 @@ n_lv_from,n_lv_to,n_shard,n_need_hero_lv,Memo -1,2,1,20,액티브 · 패시브 같은 값 · 그 영웅 조각(모자라면 만능 조각으로 채움 · skill_config) · n_need_hero_lv = 이 레벨로 올리는 데 필요한 영웅 레벨 = 스킬 레벨 × 10(PD 2026-11-20 「10레벨 단위로 제한」) · 영웅 Lv20 = ★1 최대 → 스킬 2 -2,3,1,30, -3,4,2,40,영웅 Lv40 = ★2 최대 → 스킬 4 -4,5,2,50, -5,6,3,60,영웅 Lv60 = ★3 최대 → 스킬 6 -6,7,3,70, -7,8,4,80,영웅 Lv80 = ★4 최대 → 스킬 8 -8,9,4,90, -9,10,5,100,Lv10 = 최고 · 영웅 Lv100(★5 최대) · 스킬 하나 Lv1 → 10 = 조각 25 · 액티브 + 패시브 = 50 +1,2,10,20,액티브 · 패시브 같은 값 · 그 영웅 조각(모자라면 만능 조각으로 채움 · skill_config) · n_need_hero_lv = 이 레벨로 올리는 데 필요한 영웅 레벨 = 스킬 레벨 × 10(PD 2026-11-20 「10레벨 단위로 제한」) · 영웅 Lv20 = ★1 최대 → 스킬 2 +2,3,20,30, +3,4,20,40,영웅 Lv40 = ★2 최대 → 스킬 4 +4,5,30,50, +5,6,30,60,영웅 Lv60 = ★3 최대 → 스킬 6 +6,7,40,70, +7,8,40,80,영웅 Lv80 = ★4 최대 → 스킬 8 +8,9,50,90, +9,10,60,100,Lv10 = 최고 · 영웅 Lv100(★5 최대) · 스킬 하나 Lv1 → 10 = 조각 300(★3 중복 5번분) · 액티브 + 패시브 = 600(중복 10번분) · 모든 ★ 같은 값 · 10단위 · 스킬 레벨이 오를수록 늘어남(PD 2026-11-24 「중복 영웅 10개는 있어야 풀 성장」 · 그 전 84 · 처음 50) diff --git a/Assets/Data/OutGame/training_ranks.csv b/Assets/Data/OutGame/training_ranks.csv index 9b9b722d..1bae8df0 100644 --- a/Assets/Data/OutGame/training_ranks.csv +++ b/Assets/Data/OutGame/training_ranks.csv @@ -1,8 +1,8 @@ rank,name_ko,rank_pct,promote_gold,cost_mult 1,신병,0,1440,1 -2,정졸,3,2592,1.6 -3,정예,6,4666,2.56 -4,근위,9,8398,4.096 -5,호분,12,15117,6.5536 -6,우림,15,27210,10.4858 -7,용양,18,,16.7772 +2,정졸,3,2592,1.55 +3,정예,6,4666,2.4 +4,근위,9,8398,3.72 +5,호분,12,15117,5.77 +6,우림,15,27210,8.95 +7,용양,18,,13.87 diff --git a/Assets/Data/OutGame/treasures.csv b/Assets/Data/OutGame/treasures.csv index 80021e01..fe7198b8 100644 --- a/Assets/Data/OutGame/treasures.csv +++ b/Assets/Data/OutGame/treasures.csv @@ -1,31 +1,31 @@ id,name_ko,grade,set_id,base_stat,base_pct,cond_key,cond_every,cond_pct,cond_max,star_max,shards_dup -green_dragon_blade,청룡언월도,myth,shu_five,atk,12,boss_kills,15,0.6,20,10,50 -serpent_spear,장팔사모,legend,shu_five,atk,8,pushes,60,0.5,20,10,40 -dragon_gall_spear,용담창,epic,shu_five,crit,5,battles,30,0.5,10,10,30 -tiger_head_spear,호두잠금창,epic,shu_five,hp,5,pushes,45,0.5,10,10,30 -iron_core_bow,철태궁,epic,shu_five,range,5,archer_crits,30,0.5,10,10,30 -jade_seal,옥새,myth,world_treasure,hp,12,gold_spent,1500,0.6,20,10,50 -book_of_changes,주역,epic,world_treasure,def,5,patrols,8,0.5,10,10,30 -three_strategies,삼략,arcana,world_treasure,splash,10,active_uses,100,0.5,20,10,50 -feather_fan,환우선,legend,world_treasure,splash,8,strategist_shots,20,0.5,20,10,40 -seven_star_sword,칠성검,legend,world_treasure,crit,8,archer_crits,40,0.5,20,10,40 -great_chopper,대감도,epic,hebei,atk,5,boss_kills,8,0.5,10,10,30 -twin_iron_halberd,쌍철극,epic,hebei,atk,5,pushes,45,0.5,10,10,30 -black_iron_armor,흑철중갑,rare,hebei,def,3,battles,20,0.3,10,10,20 -hebei_war_banner,하북 군령기,rare,hebei,hp,3,patrols,5,0.3,10,10,20 -ancient_blade,고정도,epic,jiangdong,atk,5,battles,30,0.5,10,10,30 -gold_bell,금령,rare,jiangdong,crit,3,active_uses,50,0.3,10,10,20 -seven_string_zither,칠현금,rare,jiangdong,splash,3,strategist_shots,10,0.3,10,10,20 -king_wu_sword,오왕검,rare,jiangdong,atk,3,gold_spent,500,0.3,10,10,20 -sky_piercer_halberd,방천화극,myth,xiliang,atk,12,boss_kills,15,0.6,20,10,50 -red_hare,적토마,myth,xiliang,atk,12,battles,60,0.6,20,10,50 -xiliang_armor,서량 철갑,rare,xiliang,def,3,pushes,30,0.3,10,10,20 -xiliang_bow,서량 강궁,rare,xiliang,range,3,archer_crits,20,0.3,10,10,20 -taiping_book,태평요술서,legend,yellow,splash,8,strategist_shots,20,0.5,20,10,40 -nine_section_staff,구절장,rare,yellow,hp,3,active_uses,50,0.3,10,10,20 -yellow_talisman,황건 부적,rare,yellow,def,3,patrols,5,0.3,10,10,20 -yellow_turban,황건 두건,rare,yellow,hp,3,battles,20,0.3,10,10,20 -art_of_war,손자병법,legend,,range,8,gold_spent,1000,0.5,20,10,40 -heaven_reliant_sword,의천검,legend,,crit,8,boss_kills,10,0.5,20,10,40 -twin_swords,쌍고검,epic,,atk,5,active_uses,75,0.5,10,10,30 -dilu,적로,epic,,def,5,patrols,8,0.5,10,10,30 +green_dragon_blade,청룡언월도,myth,shu_five,atk,20,boss_kills,15,1,20,10,50 +serpent_spear,장팔사모,legend,shu_five,atk,12,pushes,60,0.6,20,10,25 +dragon_gall_spear,용담창,epic,shu_five,crit,2,battles,30,0.2,10,10,15 +tiger_head_spear,호두잠금창,epic,shu_five,hp,6,pushes,45,0.6,10,10,15 +iron_core_bow,철태궁,epic,shu_five,range,2,archer_crits,30,0.2,10,10,15 +jade_seal,옥새,myth,world_treasure,hp,20,gold_spent,1500,1,20,10,50 +book_of_changes,주역,epic,world_treasure,def,6,patrols,8,0.6,10,10,15 +three_strategies,삼략,arcana,world_treasure,splash,8,active_uses,100,0.4,20,10,50 +feather_fan,환우선,legend,world_treasure,splash,4,strategist_shots,20,0.2,20,10,25 +seven_star_sword,칠성검,legend,world_treasure,crit,4,archer_crits,40,0.2,20,10,25 +great_chopper,대감도,epic,hebei,atk,6,boss_kills,8,0.6,10,10,15 +twin_iron_halberd,쌍철극,epic,hebei,atk,6,pushes,45,0.6,10,10,15 +black_iron_armor,흑철중갑,rare,hebei,def,3,battles,20,0.3,10,10,10 +hebei_war_banner,하북 군령기,rare,hebei,hp,3,patrols,5,0.3,10,10,10 +ancient_blade,고정도,epic,jiangdong,atk,6,battles,30,0.6,10,10,15 +gold_bell,금령,rare,jiangdong,crit,1,active_uses,50,0.1,10,10,10 +seven_string_zither,칠현금,rare,jiangdong,splash,1,strategist_shots,10,0.1,10,10,10 +king_wu_sword,오왕검,rare,jiangdong,atk,3,gold_spent,500,0.3,10,10,10 +sky_piercer_halberd,방천화극,myth,xiliang,atk,20,boss_kills,15,1,20,10,50 +red_hare,적토마,myth,xiliang,atk,20,battles,60,1,20,10,50 +xiliang_armor,서량 철갑,rare,xiliang,def,3,pushes,30,0.3,10,10,10 +xiliang_bow,서량 강궁,rare,xiliang,range,1,archer_crits,20,0.1,10,10,10 +taiping_book,태평요술서,legend,yellow,splash,4,strategist_shots,20,0.2,20,10,25 +nine_section_staff,구절장,rare,yellow,hp,3,active_uses,50,0.3,10,10,10 +yellow_talisman,황건 부적,rare,yellow,def,3,patrols,5,0.3,10,10,10 +yellow_turban,황건 두건,rare,yellow,hp,3,battles,20,0.3,10,10,10 +art_of_war,손자병법,legend,,range,4,gold_spent,1000,0.2,20,10,25 +heaven_reliant_sword,의천검,legend,,crit,4,boss_kills,10,0.2,20,10,25 +twin_swords,쌍고검,epic,,atk,6,active_uses,75,0.6,10,10,15 +dilu,적로,epic,,def,6,patrols,8,0.6,10,10,15 diff --git a/Assets/Resources/ContentModes/content_modes_config.csv b/Assets/Resources/ContentModes/content_modes_config.csv index c11a107e..037f1009 100644 --- a/Assets/Resources/ContentModes/content_modes_config.csv +++ b/Assets/Resources/ContentModes/content_modes_config.csv @@ -157,3 +157,18 @@ supply,drill_dummy_unit,enemy;no_move;no_counter;no_push;no_matchup;not_counted, supply,bandit_chest_count,S:2;A:2;B:1;C:1,황건적 소탕 보상 = 보물 상자 · 판정 등급별 개수(PD 2026-11-24) · 상자 등급 = chest_drop 의 bandit 줄(단계 구간) · 내정 「던전 장비」 = 이 개수에 곱한다 raid,play_awaken_stone,5,기록 도전 1회마다 각성석(PD 2026-11-24 재화 배치 · 연습은 없음) arena,gold,win:300;lose:100,투기장 1판 골드(PD 2026-11-24 재화 배치 · 메달은 arena.medal 그대로) +workshop,unlock_stage,1-1,임시 1-1(즉시 개방 · 다른 컨텐츠와 같은 테스트 값) · 원래 값 = 2-10 · 2장 클리어 뒤 열림(초안) · 하단 「공방」 탭(PD 2026-11-24) +mine,cols,6,채굴 갱도 가로 칸 +mine,rows,7,화면에 보이는 세로 줄(1줄 = 깊이 1 m) · 끝없이 아래로 이어짐(PD 2026-11-24 「아래층 개념 없이 무한 · 깊이 m 로만 표시」) +mine,view_keep,3,가장 깊이 판 줄이 화면 위에서 몇 번째 줄(0부터)에 오도록 따라 내려가는가 · 위로 올라간 줄은 사라짐 +mine,pick_base,20,곡괭이 기본 최대 보유 = 처음 받는 수(PD 2026-11-24 「기본 수량 20개」) +mine,pick_cap_max,100,내정(공업)으로 늘릴 수 있는 최대 보유 상한(PD 2026-11-24 「최대 100개까지 확장」) +mine,pick_regen_min,10,곡괭이 1개가 차는 분(최대 보유까지만 참 · 하루 144개 · 초안) +mine,content_pct,22,보통 칸(흙 · 자갈 · 바위 · 암반)에 무언가 묻혀 있을 확률 % +craft,base_grades,1,기본으로 제작할 수 있는 등급 수(1 = 일반만 · PD 2026-11-24) · 내정(공업) craft_grade_add 만큼 늘어남 +craft,queue_base,2,제작 대기열 기본 칸(칸마다 따로 만든다) +craft,queue_gem,300,대기열 1칸 추가 값(보옥) +craft,queue_gem_max,1,보옥으로 늘릴 수 있는 칸 수 +craft,rush_gem_per_10min,5,즉시 완성 = 남은 시간 10분마다 보옥(올림) +craft,batch_max,5,같은 제작을 한 번에 거는 최대 수(빈 대기열 칸 수까지) +craft,exclude_kinds,pouch,제작하지 않는 부위(소지품 · PD 2026-11-24 「소지품은 제작에 포함되지 않아」) · gear_kinds s_kind · 여럿 = 「;」 diff --git a/Assets/Resources/ContentModes/craft_grades.csv b/Assets/Resources/ContentModes/craft_grades.csv new file mode 100644 index 00000000..05a769b6 --- /dev/null +++ b/Assets/Resources/ContentModes/craft_grades.csv @@ -0,0 +1,8 @@ +s_grade,n_ore,n_gold,n_minutes,Memo +white,5,300,2,일반 = 재료 장비 없이 제작(PD 2026-11-24) · 등급 = gear_grades s_grade +green,10,500,5,아래 등급 같은 장비 n개(gear_items craft_from · craft_count) + 철광석 + 골드 · 도면은 안 씀(PD 2026-11-24) +blue,25,1500,30, +purple,60,5000,120, +orange,150,15000,360, +red,400,50000,720, +rainbow,1000,150000,1440, diff --git a/Assets/Resources/ContentModes/craft_grades.csv.meta b/Assets/Resources/ContentModes/craft_grades.csv.meta new file mode 100644 index 00000000..abd7c726 --- /dev/null +++ b/Assets/Resources/ContentModes/craft_grades.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d4845b3d27063184fa37204c9c020b0f +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ContentModes/medal_shop.csv b/Assets/Resources/ContentModes/medal_shop.csv index a8a52c4b..771d3291 100644 --- a/Assets/Resources/ContentModes/medal_shop.csv +++ b/Assets/Resources/ContentModes/medal_shop.csv @@ -1,6 +1,6 @@ s_item,s_name_ko,n_amount,e_pick,n_price,n_weekly_limit,Memo -tome_t1,하급 비서,1,faction,20,4,살 때 진영을 고른다 → tome_<진영>_1(evolve_items) -tome_t2,중급 비서,1,faction,45,3,살 때 진영을 고른다 → tome_<진영>_2(evolve_items) -tome_t3,상급 비서,1,faction,100,2,살 때 진영을 고른다 → tome_<진영>_3(evolve_items) +tome_t1,하급 비서,1,faction,20,1,살 때 진영을 고른다 → tome_<진영>_1(evolve_items) +tome_t2,중급 비서,1,faction,45,1,살 때 진영을 고른다 → tome_<진영>_2(evolve_items) +tome_t3,상급 비서,1,faction,100,1,살 때 진영을 고른다 → tome_<진영>_3(evolve_items) gear_red,불멸 장비,1,gear,400,1,살 때 병종 · 부위를 고른다 → gear_<병종>_<부위>_red(gear_items) -recruit_ticket,등용권,1,none,60,2,명장 등용 1회 +recruit_ticket,등용권,1,none,60,1,명장 등용 1회 diff --git a/Assets/Resources/ContentModes/mine_blocks.csv b/Assets/Resources/ContentModes/mine_blocks.csv new file mode 100644 index 00000000..5eb34277 --- /dev/null +++ b/Assets/Resources/ContentModes/mine_blocks.csv @@ -0,0 +1,7 @@ +s_block,s_name_ko,n_hp_min,n_hp_max,s_hit_item,n_hit_min,n_hit_max,e_scale,s_break_item,s_color,Memo +soil,흙,1,1,,0,0,none,,#B9824A,내구도 = 부수는 데 드는 곡괭이질 수 +gravel,자갈,2,2,,0,0,none,,#8C7B6A, +rock,바위,3,3,,0,0,none,,#6E7480, +bedrock,암반,6,6,,0,0,none,,#3F4455, +iron_vein,철광맥,4,6,iron_ore,1,1,layer,,#A9B4C8,때릴 때마다 철광석(100 % · PD 2026-11-24) · e_scale layer = 수량에 층 배율(반올림 · 최소 1) +diamond,금강석,7,10,gem,8,10,none,chest,#7FE8E0,매우 드묾 · 때릴 때마다 보옥 · 다 부수면 보물 상자 1개(등급 = chest_drop mine · PD 2026-11-24) diff --git a/Assets/Resources/ContentModes/mine_blocks.csv.meta b/Assets/Resources/ContentModes/mine_blocks.csv.meta new file mode 100644 index 00000000..cdbac525 --- /dev/null +++ b/Assets/Resources/ContentModes/mine_blocks.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 199be37e099c56d4aab877d79ff09071 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ContentModes/mine_contents.csv b/Assets/Resources/ContentModes/mine_contents.csv new file mode 100644 index 00000000..f4e2cc32 --- /dev/null +++ b/Assets/Resources/ContentModes/mine_contents.csv @@ -0,0 +1,9 @@ +s_item,s_name_ko,f_weight,n_min,n_max,e_scale,Memo +gold,골드,30,150,250,layer,보통 칸(흙 · 자갈 · 바위 · 암반)에 묻힌 것 · 칸을 부수면 얻음 · e_scale layer = 층 배율 적용(반올림 · 최소 1) +iron,운철,26,2,4,layer,보물 강화 +blueprint,도면,20,1,2,layer,내정 개발(제작에는 안 씀 · PD 2026-11-24) +pick,곡괭이,12,2,4,none,곡괭이 수에 더함(최대 보유를 넘어도 됨) +awaken_stone,각성석,4,1,2,layer,각성 재화(PD 2026-11-24) +chest,보물 상자,1.5,1,1,none,등급 = chest_drop mine(깊이 구간) +stake,쇠말뚝,1.5,1,1,none,도구 +powder,화약,1.5,1,1,none,도구 diff --git a/Assets/Resources/ContentModes/mine_contents.csv.meta b/Assets/Resources/ContentModes/mine_contents.csv.meta new file mode 100644 index 00000000..a4d7b323 --- /dev/null +++ b/Assets/Resources/ContentModes/mine_contents.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 70b9c06497e832548b63598a0f42f3c4 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ContentModes/mine_depth_rewards.csv b/Assets/Resources/ContentModes/mine_depth_rewards.csv new file mode 100644 index 00000000..288ab17c --- /dev/null +++ b/Assets/Resources/ContentModes/mine_depth_rewards.csv @@ -0,0 +1,3 @@ +n_every,s_reward,Memo +25,gem:5,최대 깊이가 이만큼(m) 늘 때마다 · 낱말 = 보상 낱말 또는 pick · stake · powder · chest(PD 2026-11-24 「일정 미터마다 추가 보상」) +100,pick:10;chest:1,100 m마다(25 m 보상에 더해) diff --git a/Assets/Resources/ContentModes/mine_depth_rewards.csv.meta b/Assets/Resources/ContentModes/mine_depth_rewards.csv.meta new file mode 100644 index 00000000..4f5f80c1 --- /dev/null +++ b/Assets/Resources/ContentModes/mine_depth_rewards.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3aa269b4bc859d44d94aca1e79973bac +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ContentModes/mine_layers.csv b/Assets/Resources/ContentModes/mine_layers.csv new file mode 100644 index 00000000..4eb57652 --- /dev/null +++ b/Assets/Resources/ContentModes/mine_layers.csv @@ -0,0 +1,5 @@ +n_from,n_to,s_name_ko,f_soil,f_gravel,f_rock,f_bedrock,f_iron_vein,f_diamond,f_amount_mult,Memo +1,200,겉흙층,64,24.8,6,0,5,0.2,0.6,깊이 m 구간 · 칸 종류 비율(합 100 · 칸 = f_) · 수량 배율 +201,1000,자갈층,40,36,15.8,3,5,0.2,1,수량 기준 층(mine_contents 의 수량 = 이 층 값) +1001,3000,암석층,21,37,27.8,9,5,0.2,1.5, +3001,9999999,심층,11,29,36.8,18,5,0.2,2,끝없이 이어짐 diff --git a/Assets/Resources/ContentModes/mine_layers.csv.meta b/Assets/Resources/ContentModes/mine_layers.csv.meta new file mode 100644 index 00000000..5ceb0b07 --- /dev/null +++ b/Assets/Resources/ContentModes/mine_layers.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 200af88122828064f809637caf64fa12 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ContentModes/mine_tools.csv b/Assets/Resources/ContentModes/mine_tools.csv new file mode 100644 index 00000000..84dc3cab --- /dev/null +++ b/Assets/Resources/ContentModes/mine_tools.csv @@ -0,0 +1,4 @@ +s_tool,s_name_ko,e_break,l_cells,s_source,Memo +pick,곡괭이,hit,0:0,시간이 지나면 충전 · 채굴 칸 · 깊이 보상,고른 칸을 1번 때림(내구도 1 줄임) +stake,쇠말뚝,break,0:0;0:1;0:2;0:3;0:4,채굴 칸,고른 칸부터 아래로 5칸을 바로 부숨(세로 한 줄) · 칸 = 가로:세로(아래 = +) · 광맥은 남은 내구도만큼 캔 것으로 침 +powder,화약,break,0:-2;-1:-1;0:-1;1:-1;-2:0;-1:0;0:0;1:0;2:0;-1:1;0:1;1:1;0:2,채굴 칸,고른 칸 둘레 마름모 13칸을 바로 부숨 diff --git a/Assets/Resources/ContentModes/mine_tools.csv.meta b/Assets/Resources/ContentModes/mine_tools.csv.meta new file mode 100644 index 00000000..4e781381 --- /dev/null +++ b/Assets/Resources/ContentModes/mine_tools.csv.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: be82747337084dc4e8c81d52961818dc +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/ContentModes/raid_shop.csv b/Assets/Resources/ContentModes/raid_shop.csv index 659519f6..a56ec64e 100644 --- a/Assets/Resources/ContentModes/raid_shop.csv +++ b/Assets/Resources/ContentModes/raid_shop.csv @@ -1,7 +1,7 @@ s_item,s_name_ko,n_amount,e_pick,n_price,n_weekly_limit,Memo -tome_t3,상급 비서,1,faction,110,2,살 때 진영을 고른다 → tome_<진영>_3(evolve_items) +tome_t3,상급 비서,1,faction,110,1,살 때 진영을 고른다 → tome_<진영>_3(evolve_items) tome_t4,특급 비서,1,faction,260,1,살 때 진영을 고른다 → tome_<진영>_4(evolve_items) gear_red,불멸 장비,1,gear,400,1,살 때 병종 · 부위를 고른다 → gear_<병종>_<부위>_red(gear_items) -awaken_stone,각성석,20,none,40,5, +awaken_stone,각성석,20,none,40,1, general_chest,명장 상자,1,none,300,1,상자 = <상자 id>_chest -arcana_shard,천기 보물 조각,5,treasure,50,6,보유한 천기 등급 보물 가운데 고른다 · 하나도 없으면 살 수 없다 +arcana_shard,천기 보물 조각,5,treasure,50,1,보유한 천기 등급 보물 가운데 고른다 · 하나도 없으면 살 수 없다 diff --git a/Assets/Resources/Event/event_attend.csv b/Assets/Resources/Event/event_attend.csv index d6bcef77..e525bd4f 100644 --- a/Assets/Resources/Event/event_attend.csv +++ b/Assets/Resources/Event/event_attend.csv @@ -1,12 +1,13 @@ # 출석부 보상(PD 2026-11-19 · 시안 attend_rewards_draft.csv 예시 그대로 · 기획 확정 전) — att7 = 오픈 기념 7일 출석 · att14 = 일일 14일 출석(상시) # s_rewards = 아이템 id(event_items)×수량 · ; = 여러 개 · s_mark = final(마지막 날 큰 칸) · mid(중간 보상 · 푸른 테) +# 2026-11-24 PD 「이벤트 보상 변경하고, 등용권으로 바꿔」 — cur_ticket = 등용권(recruit_ticket · 그 전 = 탑 입장권) · 무작위 영웅 조각(cur_shard) 보상은 등용권으로 바꿈(영웅 조각의 수급처 = 등용) s_event,n_day,s_rewards,s_mark att7,1,cur_gold×5000, att7,2,cur_gem×50, att7,3,cur_stamina×30, att7,4,chest_silver×1, att7,5,cur_gem×80, -att7,6,cur_shard×10, +att7,6,cur_ticket×2, att7,7,hero_liubei3×1;cur_gem×300,final att14,1,cur_gold×10000, att14,2,cur_gem×50, @@ -17,8 +18,8 @@ att14,6,cur_gem×80, att14,7,chest_gold×1,mid att14,8,cur_stamina×60, att14,9,cur_gem×100, -att14,10,cur_shard×20, +att14,10,cur_ticket×3, att14,11,cur_gold×30000, att14,12,cur_gem×120, att14,13,chest_gold×1, -att14,14,chest_general×1;cur_gem×500;cur_shard×50,final +att14,14,chest_general×1;cur_gem×500;cur_ticket×5,final diff --git a/Assets/Resources/Event/event_items.csv b/Assets/Resources/Event/event_items.csv index a749552c..3dfcc119 100644 --- a/Assets/Resources/Event/event_items.csv +++ b/Assets/Resources/Event/event_items.csv @@ -2,6 +2,7 @@ # s_kind = gold · gem · stamina · iron · blueprint(도면) · hero_shard(무작위 보유 영웅 조각 · 보급전과 같은 규칙) · tower_ticket(천하제일 탑 입장권) · chest(s_arg = 상자 id) · pouch(행운 복주머니 = 이벤트 재화) · hero(s_arg = 영웅 id · n_star = 성급 · 이미 있으면 등용 중복과 같은 조각) # s_icon = 테마 아이콘 id · 「/」 가 있으면 Resources 스프라이트 경로 · 영웅 = 비움(얼굴 = 원화) # 시안 예시 id 중 게임에 없는 것: cur_shard(영웅 조각 · 게임 조각은 영웅마다) = 무작위 보유 영웅 조각 · cur_ticket(시안 「등용패」 · 게임에 없음) = 천하제일 탑 입장권(같은 아이콘) — 기획 확정 때 이 줄만 바꿈 +# 2026-11-24 PD 「이벤트 보상 변경하고, 등용권으로 바꿔」 — cur_ticket = 등용권(recruit_ticket · 그 전 = 탑 입장권) · 무작위 영웅 조각(cur_shard) 보상은 등용권으로 바꿈(영웅 조각의 수급처 = 등용) s_id,s_kind,s_arg,n_star,s_icon,s_name_key cur_gold,gold,,,cur_gold,ev_item_gold cur_gem,gem,,,cur_gem,ev_item_gem @@ -9,7 +10,7 @@ cur_stamina,stamina,,,cur_stamina,ev_item_stamina cur_iron,iron,,,cur_iron,ev_item_iron cur_blueprint,blueprint,,,cur_blueprint,ev_item_blueprint cur_shard,hero_shard,,,cur_shard,ev_item_shard -cur_ticket,tower_ticket,,,cur_ticket,ev_item_ticket +cur_ticket,recruit_ticket,,,cur_ticket,ev_item_ticket chest_bronze,chest,bronze,,chest_bronze,ev_item_chest_bronze chest_silver,chest,silver,,chest_silver,ev_item_chest_silver chest_gold,chest,gold,,chest_gold,ev_item_chest_gold diff --git a/Assets/Resources/Event/event_mission7.csv b/Assets/Resources/Event/event_mission7.csv index abbc0a4f..b9708f52 100644 --- a/Assets/Resources/Event/event_mission7.csv +++ b/Assets/Resources/Event/event_mission7.csv @@ -1,5 +1,6 @@ # 7일 특별 미션(PD 2026-11-19 · 시안 mission7_draft.csv 예시 그대로 · 기획 확정 전) — n_day = 열리는 일차(첫 접속일부터 하루에 1일차) · s_kind = event_kinds · s_arg = 종류별 값(supply_try = 던전 id · stage_cleared = 장-번호 · hero_star = 성급) # n_point = 미션 점수(훈장 · 점수 단계 보상) · s_rewards = 아이템 id×수량 · 진행 = 첫 접속일부터 누적(count) 또는 지금 세이브 값(state) · s_text_key = 비우면 종류 글자 +# 2026-11-24 PD 「이벤트 보상 변경하고, 등용권으로 바꿔」 — cur_ticket = 등용권(recruit_ticket · 그 전 = 탑 입장권) · 무작위 영웅 조각(cur_shard) 보상은 등용권으로 바꿈(영웅 조각의 수급처 = 등용) n_day,n_order,s_kind,s_arg,n_target,n_point,s_rewards,s_text_key 1,1,login,,1,20,cur_gold×5000,ev_k_login_game 1,2,stage_clear,,3,30,cur_stamina×30, @@ -11,21 +12,21 @@ n_day,n_order,s_kind,s_arg,n_target,n_point,s_rewards,s_text_key 2,4,stamina_use,,60,40,cur_gem×50, 3,1,tower_floor,,5,40,cur_gem×80, 3,2,train,,3,30,cur_gold×10000, -3,3,treasure_enhance,,1,40,cur_shard×5, +3,3,treasure_enhance,,1,40,cur_iron×50, 3,4,skill_up,,2,40,cur_blueprint×8, 4,1,arena_try,,3,40,cur_gem×80, 4,2,stars,,30,40,cur_gold×15000, 4,3,gacha,,10,50,cur_ticket×1, 4,4,gold_use,,50000,30,cur_iron×100, -5,1,raid_try,,2,50,cur_shard×10, +5,1,raid_try,,2,50,cur_ticket×1, 5,2,promote,,5,40,cur_iron×120, 5,3,tower_floor,,10,40,cur_gem×100, 5,4,stamina_use,,150,30,cur_stamina×60, 6,1,stage_cleared,2-10,1,50,cur_gem×120, -6,2,evolve,,1,50,cur_shard×15, +6,2,evolve,,1,50,cur_ticket×1, 6,3,supply_try,drill,5,40,cur_blueprint×10, 6,4,arena_win,,3,40,cur_gold×20000, 7,1,scenario_clear,,3,50,cur_gem×150, 7,2,hero_star,3,3,50,cur_ticket×2, -7,3,raid_try,,5,50,cur_shard×20, +7,3,raid_try,,5,50,cur_ticket×2, 7,4,stage_cleared,3-5,1,50,cur_gold×30000, diff --git a/Assets/Resources/Event/event_mission7_steps.csv b/Assets/Resources/Event/event_mission7_steps.csv index 17fa9e3e..a237d393 100644 --- a/Assets/Resources/Event/event_mission7_steps.csv +++ b/Assets/Resources/Event/event_mission7_steps.csv @@ -1,7 +1,8 @@ # 7일 특별 미션 점수 단계 보상(PD 2026-11-19 · 시안 mission7_steps_draft.csv 예시 그대로) — 미션 점수(받은 미션 n_point 합)가 n_point 이상이면 받기 · s_icon = 막대 위 그림(아이템 id) · 마지막 = 최종 보상(영웅 · 배너 「1000점 달성 보상」) +# 2026-11-24 PD 「이벤트 보상 변경하고, 등용권으로 바꿔」 — cur_ticket = 등용권(recruit_ticket · 그 전 = 탑 입장권) · 무작위 영웅 조각(cur_shard) 보상은 등용권으로 바꿈(영웅 조각의 수급처 = 등용) n_point,s_icon,s_rewards 100,chest_bronze,cur_gold×20000;cur_iron×100 250,chest_silver,cur_gem×200;cur_blueprint×10 -450,chest_gold,cur_gem×300;cur_shard×30 +450,chest_gold,cur_gem×300;cur_ticket×3 700,chest_gem,cur_gem×500;cur_ticket×5 1000,hero_guanyu3,hero_guanyu3×1 diff --git a/Assets/Resources/Event/event_roulette.csv b/Assets/Resources/Event/event_roulette.csv index d1539ad7..9aa6dd42 100644 --- a/Assets/Resources/Event/event_roulette.csv +++ b/Assets/Resources/Event/event_roulette.csv @@ -1,5 +1,6 @@ # 행운 룰렛 칸(PD 2026-11-19 · 시안 roulette_draft.csv 예시 그대로 · 기획 확정 전) — n_slot = 0(왼쪽 위)부터 시계 방향 12칸 · s_tag = final(최종 보상 · 확률 0 = 횟수 보장으로만 · 가운데 그림과 같음) · limited(한정 = 검은 돌) · 비움 = 보통(흰 돌) # n_weight = 확률 가중치(합 100) · s_frame = 칸 등급 색(PD 결정 ⑤: 판에는 안 씀 · 「확률 정보」 창에만 표시) +# 2026-11-24 PD 「이벤트 보상 변경하고, 등용권으로 바꿔」 — cur_ticket = 등용권(recruit_ticket · 그 전 = 탑 입장권) · 무작위 영웅 조각(cur_shard) 보상은 등용권으로 바꿈(영웅 조각의 수급처 = 등용) n_slot,s_reward,s_frame,n_weight,s_tag 0,hero_zhangfei3×1,gold,0,final 1,cur_gold×5000,green,22, @@ -10,6 +11,6 @@ n_slot,s_reward,s_frame,n_weight,s_tag 6,chest_gold×1,orange,2.5, 7,cur_gold×20000,blue,8, 8,cur_gem×50,blue,10, -9,cur_shard×50,gold,0.5,limited +9,cur_ticket×10,gold,0.5,limited 10,cur_ticket×1,purple,4.5, 11,cur_iron×200,blue,6, diff --git a/Assets/Resources/Event/event_roulette_extra.csv b/Assets/Resources/Event/event_roulette_extra.csv index efeb8847..fcaa7b74 100644 --- a/Assets/Resources/Event/event_roulette_extra.csv +++ b/Assets/Resources/Event/event_roulette_extra.csv @@ -1,10 +1,11 @@ # 행운 룰렛 부가 표(PD 2026-11-19 · 시안 roulette_extra_draft.csv 예시 그대로 · 기획 확정 전) # kind = count(뽑기 횟수 누적 보상 · n_target = 횟수) · quest(이벤트 미션 = 복주머니 · s_kind = event_kinds · s_reset = daily(날마다 다시) · event(회차 동안 한 번 · 회차 시작부터 누적)) # pack(선물 팩 · s_kind = ad(광고 · 하루 n_limit) · paid(유료 · 회차 동안 n_limit · 가격 = 예시 원화 · PD 결정 ② 「유료 = 결제 준비 중 토스트만 · 지급 없음」)) +# 2026-11-24 PD 「이벤트 보상 변경하고, 등용권으로 바꿔」 — cur_ticket = 등용권(recruit_ticket · 그 전 = 탑 입장권) · 무작위 영웅 조각(cur_shard) 보상은 등용권으로 바꿈(영웅 조각의 수급처 = 등용) kind,n_order,s_kind,s_arg,n_target,s_rewards,s_reset,n_price,n_limit,s_text_key count,1,,,10,cur_gem×50,,,, count,2,,,30,cur_blueprint×10,,,, -count,3,,,60,cur_shard×20,,,, +count,3,,,60,cur_ticket×3,,,, count,4,,,100,cur_gem×200,,,, quest,1,login,,1,ev_pouch×1,daily,,,ev_k_login_daily quest,2,stamina_use,,100,ev_pouch×3,event,,, diff --git a/Assets/Resources/OutGame/AwakenDb.asset b/Assets/Resources/OutGame/AwakenDb.asset index 96c261c8..a2f6ea18 100644 --- a/Assets/Resources/OutGame/AwakenDb.asset +++ b/Assets/Resources/OutGame/AwakenDb.asset @@ -375,6 +375,11 @@ MonoBehaviour: nameKo: "\uC9C4\uC601 \uBE44\uC11C 16\uC885" kind: Material wallet: "tome_<\uC9C4\uC601>_<\uB4F1\uAE09>" + - id: 506 + key: iron_ore + nameKo: "\uCCA0\uAD11\uC11D" + kind: Material + wallet: iron_ore slots: - slot: 1 gearGrade: green @@ -397,37 +402,37 @@ MonoBehaviour: skillSteps: - from: 1 to: 2 - shard: 1 + shard: 10 needHeroLv: 20 - from: 2 to: 3 - shard: 1 + shard: 20 needHeroLv: 30 - from: 3 to: 4 - shard: 2 + shard: 20 needHeroLv: 40 - from: 4 to: 5 - shard: 2 + shard: 30 needHeroLv: 50 - from: 5 to: 6 - shard: 3 + shard: 30 needHeroLv: 60 - from: 6 to: 7 - shard: 3 + shard: 40 needHeroLv: 70 - from: 7 to: 8 - shard: 4 + shard: 40 needHeroLv: 80 - from: 8 to: 9 - shard: 4 + shard: 50 needHeroLv: 90 - from: 9 to: 10 - shard: 5 + shard: 60 needHeroLv: 100 diff --git a/Assets/Resources/OutGame/ChestDb.asset b/Assets/Resources/OutGame/ChestDb.asset index 32b0003d..4ff5a189 100644 --- a/Assets/Resources/OutGame/ChestDb.asset +++ b/Assets/Resources/OutGame/ChestDb.asset @@ -15,90 +15,40 @@ MonoBehaviour: chests: - id: bronze nameKo: "\uAD6C\uB9AC \uC0C1\uC790" + conceptKo: "\uC7AC\uB8CC" points: 1 - p: - - 0.8 - - 0.2 - - 0 - - 0 - goldMin: 300 - goldMax: 800 - gemMin: 0 - gemMax: 0 - ironMin: 0 - ironMax: 0 source: "\uCD9C\uC815;\uC21C\uCC30;\uD669\uAC74\uC801 \uC18C\uD0D5;\uC784\uBB34" buyGold: 1000 buyGem: 0 buyPoints: 0 - id: silver nameKo: "\uC740 \uC0C1\uC790" + conceptKo: "\uBCF4\uBB3C(\uD76C\uADC0 ~ \uC804\uC124)" points: 10 - p: - - 0.5 - - 0.4 - - 0.1 - - 0 - goldMin: 800 - goldMax: 2000 - gemMin: 0 - gemMax: 0 - ironMin: 0 - ironMax: 0 source: "\uCD9C\uC815;\uC21C\uCC30;\uD669\uAC74\uC801 \uC18C\uD0D5;\uC784\uBB34" buyGold: 0 buyGem: 150 buyPoints: 30 - id: gold nameKo: "\uAE08 \uC0C1\uC790" + conceptKo: "\uBCF4\uBB3C(\uC601\uC6C5 ~ \uC2E0\uD654)" points: 30 - p: - - 0 - - 0.55 - - 0.4 - - 0.05 - goldMin: 2000 - goldMax: 5000 - gemMin: 0 - gemMax: 0 - ironMin: 0 - ironMax: 0 source: "\uCD9C\uC815;\uC21C\uCC30;\uD669\uAC74\uC801 \uC18C\uD0D5;\uC784\uBB34" buyGold: 0 buyGem: 450 buyPoints: 90 - id: general nameKo: "\uBA85\uC7A5 \uC0C1\uC790" + conceptKo: "\uC9C4\uC601 \uBE44\uC11C(\uC9C4\uD654 \uC7AC\uB8CC)" points: 50 - p: - - 0 - - 0.3 - - 0.5 - - 0.2 - goldMin: 5000 - goldMax: 10000 - gemMin: 0 - gemMax: 0 - ironMin: 0 - ironMax: 0 source: "\uCD9C\uC815;\uC0C1\uC790 \uD3EC\uC778\uD2B8;\uD6C8\uC7A5 \uC0C1\uC810" buyGold: 0 buyGem: 0 buyPoints: 0 - id: gem nameKo: "\uC2E0\uBB3C \uC0C1\uC790" + conceptKo: "\uBCF4\uBB3C(\uC804\uC124 ~ \uC2E0\uD654)" points: 0 - p: - - 0 - - 0 - - 0.75 - - 0.25 - goldMin: 0 - goldMax: 0 - gemMin: 300 - gemMax: 1300 - ironMin: 0 - ironMax: 0 source: "\uC0C1\uC810" buyGold: 0 buyGem: 1500 diff --git a/Assets/Resources/OutGame/DevTree.asset b/Assets/Resources/OutGame/DevTree.asset index 3c6f1533..f9a91e18 100644 --- a/Assets/Resources/OutGame/DevTree.asset +++ b/Assets/Resources/OutGame/DevTree.asset @@ -307,7 +307,7 @@ MonoBehaviour: lv: 5 - branch: industry id: ind_craft_cost - nameKo: "\uD569\uC131 \uBE44\uC6A9" + nameKo: "\uC81C\uC791 \uBE44\uC6A9" kind: small effectKey: craft_cost_cut_pct pctPerLv: 2 @@ -323,13 +323,13 @@ MonoBehaviour: id: ind_workshop nameKo: "\uAD00\uC601 \uACF5\uBC29" kind: big - effectKey: craft_bulk;craft_blueprint_cut + effectKey: craft_grade_add pctPerLv: 1 - lvMax: 3 + lvMax: 6 goldBase: 200 goldGrowth: 1.3 blueprintFromLv: 1 - blueprintPerLv: 20 + blueprintPerLv: 10 requires: - node: ind_iron_gain lv: 5 @@ -391,3 +391,17 @@ MonoBehaviour: requires: - node: ind_blueprint_gain lv: 5 + - branch: industry + id: ind_pick_cap + nameKo: "\uACE1\uAD2D\uC774 \uBCF4\uAD00" + kind: small + effectKey: pick_cap_add + pctPerLv: 8 + lvMax: 10 + goldBase: 200 + goldGrowth: 1.3 + blueprintFromLv: 5 + blueprintPerLv: 1 + requires: + - node: ind_workshop + lv: 1 diff --git a/Assets/Resources/OutGame/EconomyConfig.asset b/Assets/Resources/OutGame/EconomyConfig.asset index dbadcfb0..914ac881 100644 --- a/Assets/Resources/OutGame/EconomyConfig.asset +++ b/Assets/Resources/OutGame/EconomyConfig.asset @@ -29,11 +29,11 @@ MonoBehaviour: - key: ad_stamina_daily value: 2 - key: gem_stamina_cost - value: 50 + value: 50;50;100;100;200;200;400;400 - key: gem_stamina_amount - value: 15 + value: 50 - key: gem_stamina_daily - value: 2 + value: 8 - key: repeat_reward_mult value: 0.5 - key: soldier_dup_gold diff --git a/Assets/Resources/OutGame/GoodsDb.asset b/Assets/Resources/OutGame/GoodsDb.asset index 5443a9b2..c1761507 100644 --- a/Assets/Resources/OutGame/GoodsDb.asset +++ b/Assets/Resources/OutGame/GoodsDb.asset @@ -143,100 +143,147 @@ MonoBehaviour: - 32 - 12 - 1 + - source: mine + from: 1 + to: 200 + chests: + - bronze + - silver + - gold + - general + weights: + - 90 + - 9 + - 1 + - 0 + - source: mine + from: 201 + to: 1000 + chests: + - bronze + - silver + - gold + - general + weights: + - 84 + - 13 + - 3 + - 0 + - source: mine + from: 1001 + to: 3000 + chests: + - bronze + - silver + - gold + - general + weights: + - 76 + - 19 + - 4.5 + - 0.5 + - source: mine + from: 3001 + to: 9999999 + chests: + - bronze + - silver + - gold + - general + weights: + - 68 + - 24 + - 7 + - 1 chestLoots: + - chest: bronze + item: gold + pct: 38 + min: 2000 + max: 2000 + - chest: bronze + item: gold + pct: 14 + min: 6000 + max: 6000 - chest: bronze item: iron - pct: 50 - min: 1 - max: 3 - - chest: bronze - item: blueprint - pct: 20 - min: 1 - max: 1 - - chest: bronze - item: gem - pct: 10 - min: 5 - max: 10 - - chest: bronze - item: tome_t1 - pct: 4 - min: 1 - max: 1 - - chest: silver - item: iron - pct: 100 - min: 3 + pct: 27 + min: 8 max: 8 - - chest: silver - item: blueprint - pct: 50 - min: 1 - max: 2 - - chest: silver - item: gem - pct: 20 - min: 10 - max: 30 - - chest: silver - item: tome_t1 + - chest: bronze + item: iron pct: 8 + min: 25 + max: 25 + - chest: bronze + item: blueprint + pct: 5 + min: 1 + max: 1 + - chest: bronze + item: gem + pct: 8 + min: 50 + max: 50 + - chest: silver + item: treasure_rare + pct: 70 min: 1 max: 1 - chest: silver - item: tome_t2 - pct: 4 + item: treasure_epic + pct: 27 + min: 1 + max: 1 + - chest: silver + item: treasure_legend + pct: 3 min: 1 max: 1 - chest: gold - item: iron - pct: 100 - min: 10 - max: 30 - - chest: gold - item: blueprint - pct: 100 - min: 2 - max: 4 - - chest: gold - item: gem - pct: 30 - min: 30 - max: 80 - - chest: gold - item: tome_t2 - pct: 12 + item: treasure_epic + pct: 55 min: 1 max: 1 - chest: gold - item: tome_t3 - pct: 6 + item: treasure_legend + pct: 40 + min: 1 + max: 1 + - chest: gold + item: treasure_myth + pct: 5 min: 1 max: 1 - chest: general - item: iron - pct: 100 - min: 20 - max: 50 - - chest: general - item: blueprint - pct: 100 - min: 4 - max: 8 - - chest: general - item: gem - pct: 50 - min: 80 - max: 200 - - chest: general - item: tome_t3 + item: tome_t1 pct: 20 min: 1 max: 1 + - chest: general + item: tome_t2 + pct: 30 + min: 1 + max: 1 + - chest: general + item: tome_t3 + pct: 35 + min: 1 + max: 1 - chest: general item: tome_t4 - pct: 8 + pct: 15 + min: 1 + max: 1 + - chest: gem + item: treasure_legend + pct: 75 + min: 1 + max: 1 + - chest: gem + item: treasure_myth + pct: 25 min: 1 max: 1 hardModes: @@ -377,8 +424,8 @@ MonoBehaviour: - orange - red weights: - - 90 - - 10 + - 98 + - 2 stamina: 10 staminaBoss: 20 dailyPerStage: 3 diff --git a/Assets/Resources/OutGame/PatrolTable.asset b/Assets/Resources/OutGame/PatrolTable.asset index 2595c9cb..e006ab1a 100644 --- a/Assets/Resources/OutGame/PatrolTable.asset +++ b/Assets/Resources/OutGame/PatrolTable.asset @@ -17,49 +17,129 @@ MonoBehaviour: goldPerHour: 270 expPerHour: 56 gearGrade: white + gearGrades: + - white + gearWeights: + - 100 chestPerHour: 0.2 - chapter: 2 goldPerHour: 360 expPerHour: 72 gearGrade: white + gearGrades: + - white + - green + gearWeights: + - 95 + - 5 chestPerHour: 0.2 - chapter: 3 goldPerHour: 450 expPerHour: 88 gearGrade: white + gearGrades: + - white + - green + gearWeights: + - 85 + - 15 chestPerHour: 0.2 - chapter: 4 goldPerHour: 540 expPerHour: 104 gearGrade: green + gearGrades: + - white + - green + - blue + gearWeights: + - 35 + - 60 + - 5 chestPerHour: 0.2 - chapter: 5 goldPerHour: 630 expPerHour: 120 gearGrade: green + gearGrades: + - white + - green + - blue + gearWeights: + - 25 + - 65 + - 10 chestPerHour: 0.2 - chapter: 6 goldPerHour: 720 expPerHour: 136 gearGrade: green + gearGrades: + - white + - green + - blue + - purple + gearWeights: + - 15 + - 65 + - 18 + - 2 chestPerHour: 0.2 - chapter: 7 goldPerHour: 810 expPerHour: 152 gearGrade: green + gearGrades: + - white + - green + - blue + - purple + gearWeights: + - 10 + - 60 + - 26 + - 4 chestPerHour: 0.2 - chapter: 8 goldPerHour: 900 expPerHour: 168 gearGrade: blue + gearGrades: + - green + - blue + - purple + gearWeights: + - 40 + - 52 + - 8 chestPerHour: 0.2 - chapter: 9 goldPerHour: 990 expPerHour: 184 gearGrade: blue + gearGrades: + - green + - blue + - purple + - orange + gearWeights: + - 30 + - 55 + - 13 + - 2 chestPerHour: 0.2 - chapter: 10 goldPerHour: 1080 expPerHour: 200 gearGrade: blue + gearGrades: + - green + - blue + - purple + - orange + gearWeights: + - 20 + - 57 + - 18 + - 5 chestPerHour: 0.2 diff --git a/Assets/Resources/OutGame/TrainingTable.asset b/Assets/Resources/OutGame/TrainingTable.asset index babc4f03..069f8ccb 100644 --- a/Assets/Resources/OutGame/TrainingTable.asset +++ b/Assets/Resources/OutGame/TrainingTable.asset @@ -773,29 +773,29 @@ MonoBehaviour: nameKo: "\uC815\uC878" rankPct: 3 promoteGold: 2592 - costMult: 1.6 + costMult: 1.55 - rank: 3 nameKo: "\uC815\uC608" rankPct: 6 promoteGold: 4666 - costMult: 2.56 + costMult: 2.4 - rank: 4 nameKo: "\uADFC\uC704" rankPct: 9 promoteGold: 8398 - costMult: 4.096 + costMult: 3.72 - rank: 5 nameKo: "\uD638\uBD84" rankPct: 12 promoteGold: 15117 - costMult: 6.5536 + costMult: 5.77 - rank: 6 nameKo: "\uC6B0\uB9BC" rankPct: 15 promoteGold: 27210 - costMult: 10.4858 + costMult: 8.95 - rank: 7 nameKo: "\uC6A9\uC591" rankPct: 18 promoteGold: 0 - costMult: 16.7772 + costMult: 13.87 diff --git a/Assets/Resources/OutGame/TreasureDb.asset b/Assets/Resources/OutGame/TreasureDb.asset index 4e1b0715..cf6245d5 100644 --- a/Assets/Resources/OutGame/TreasureDb.asset +++ b/Assets/Resources/OutGame/TreasureDb.asset @@ -18,10 +18,10 @@ MonoBehaviour: grade: myth setId: shu_five baseStat: atk - basePct: 12 + basePct: 20 condKey: boss_kills condEvery: 15 - condPct: 0.6 + condPct: 1 condMax: 20 starMax: 10 shardsDup: 50 @@ -30,58 +30,58 @@ MonoBehaviour: grade: legend setId: shu_five baseStat: atk - basePct: 8 + basePct: 12 condKey: pushes condEvery: 60 - condPct: 0.5 + condPct: 0.6 condMax: 20 starMax: 10 - shardsDup: 40 + shardsDup: 25 - id: dragon_gall_spear nameKo: "\uC6A9\uB2F4\uCC3D" grade: epic setId: shu_five baseStat: crit - basePct: 5 + basePct: 2 condKey: battles condEvery: 30 - condPct: 0.5 + condPct: 0.2 condMax: 10 starMax: 10 - shardsDup: 30 + shardsDup: 15 - id: tiger_head_spear nameKo: "\uD638\uB450\uC7A0\uAE08\uCC3D" grade: epic setId: shu_five baseStat: hp - basePct: 5 + basePct: 6 condKey: pushes condEvery: 45 - condPct: 0.5 + condPct: 0.6 condMax: 10 starMax: 10 - shardsDup: 30 + shardsDup: 15 - id: iron_core_bow nameKo: "\uCCA0\uD0DC\uAD81" grade: epic setId: shu_five baseStat: range - basePct: 5 + basePct: 2 condKey: archer_crits condEvery: 30 - condPct: 0.5 + condPct: 0.2 condMax: 10 starMax: 10 - shardsDup: 30 + shardsDup: 15 - id: jade_seal nameKo: "\uC625\uC0C8" grade: myth setId: world_treasure baseStat: hp - basePct: 12 + basePct: 20 condKey: gold_spent condEvery: 1500 - condPct: 0.6 + condPct: 1 condMax: 20 starMax: 10 shardsDup: 50 @@ -90,22 +90,22 @@ MonoBehaviour: grade: epic setId: world_treasure baseStat: def - basePct: 5 + basePct: 6 condKey: patrols condEvery: 8 - condPct: 0.5 + condPct: 0.6 condMax: 10 starMax: 10 - shardsDup: 30 + shardsDup: 15 - id: three_strategies nameKo: "\uC0BC\uB7B5" grade: arcana setId: world_treasure baseStat: splash - basePct: 10 + basePct: 8 condKey: active_uses condEvery: 100 - condPct: 0.5 + condPct: 0.4 condMax: 20 starMax: 10 shardsDup: 50 @@ -114,49 +114,49 @@ MonoBehaviour: grade: legend setId: world_treasure baseStat: splash - basePct: 8 + basePct: 4 condKey: strategist_shots condEvery: 20 - condPct: 0.5 + condPct: 0.2 condMax: 20 starMax: 10 - shardsDup: 40 + shardsDup: 25 - id: seven_star_sword nameKo: "\uCE60\uC131\uAC80" grade: legend setId: world_treasure baseStat: crit - basePct: 8 + basePct: 4 condKey: archer_crits condEvery: 40 - condPct: 0.5 + condPct: 0.2 condMax: 20 starMax: 10 - shardsDup: 40 + shardsDup: 25 - id: great_chopper nameKo: "\uB300\uAC10\uB3C4" grade: epic setId: hebei baseStat: atk - basePct: 5 + basePct: 6 condKey: boss_kills condEvery: 8 - condPct: 0.5 + condPct: 0.6 condMax: 10 starMax: 10 - shardsDup: 30 + shardsDup: 15 - id: twin_iron_halberd nameKo: "\uC30D\uCCA0\uADF9" grade: epic setId: hebei baseStat: atk - basePct: 5 + basePct: 6 condKey: pushes condEvery: 45 - condPct: 0.5 + condPct: 0.6 condMax: 10 starMax: 10 - shardsDup: 30 + shardsDup: 15 - id: black_iron_armor nameKo: "\uD751\uCCA0\uC911\uAC11" grade: rare @@ -168,7 +168,7 @@ MonoBehaviour: condPct: 0.3 condMax: 10 starMax: 10 - shardsDup: 20 + shardsDup: 10 - id: hebei_war_banner nameKo: "\uD558\uBD81 \uAD70\uB839\uAE30" grade: rare @@ -180,43 +180,43 @@ MonoBehaviour: condPct: 0.3 condMax: 10 starMax: 10 - shardsDup: 20 + shardsDup: 10 - id: ancient_blade nameKo: "\uACE0\uC815\uB3C4" grade: epic setId: jiangdong baseStat: atk - basePct: 5 + basePct: 6 condKey: battles condEvery: 30 - condPct: 0.5 + condPct: 0.6 condMax: 10 starMax: 10 - shardsDup: 30 + shardsDup: 15 - id: gold_bell nameKo: "\uAE08\uB839" grade: rare setId: jiangdong baseStat: crit - basePct: 3 + basePct: 1 condKey: active_uses condEvery: 50 - condPct: 0.3 + condPct: 0.1 condMax: 10 starMax: 10 - shardsDup: 20 + shardsDup: 10 - id: seven_string_zither nameKo: "\uCE60\uD604\uAE08" grade: rare setId: jiangdong baseStat: splash - basePct: 3 + basePct: 1 condKey: strategist_shots condEvery: 10 - condPct: 0.3 + condPct: 0.1 condMax: 10 starMax: 10 - shardsDup: 20 + shardsDup: 10 - id: king_wu_sword nameKo: "\uC624\uC655\uAC80" grade: rare @@ -228,16 +228,16 @@ MonoBehaviour: condPct: 0.3 condMax: 10 starMax: 10 - shardsDup: 20 + shardsDup: 10 - id: sky_piercer_halberd nameKo: "\uBC29\uCC9C\uD654\uADF9" grade: myth setId: xiliang baseStat: atk - basePct: 12 + basePct: 20 condKey: boss_kills condEvery: 15 - condPct: 0.6 + condPct: 1 condMax: 20 starMax: 10 shardsDup: 50 @@ -246,10 +246,10 @@ MonoBehaviour: grade: myth setId: xiliang baseStat: atk - basePct: 12 + basePct: 20 condKey: battles condEvery: 60 - condPct: 0.6 + condPct: 1 condMax: 20 starMax: 10 shardsDup: 50 @@ -264,31 +264,31 @@ MonoBehaviour: condPct: 0.3 condMax: 10 starMax: 10 - shardsDup: 20 + shardsDup: 10 - id: xiliang_bow nameKo: "\uC11C\uB7C9 \uAC15\uAD81" grade: rare setId: xiliang baseStat: range - basePct: 3 + basePct: 1 condKey: archer_crits condEvery: 20 - condPct: 0.3 + condPct: 0.1 condMax: 10 starMax: 10 - shardsDup: 20 + shardsDup: 10 - id: taiping_book nameKo: "\uD0DC\uD3C9\uC694\uC220\uC11C" grade: legend setId: yellow baseStat: splash - basePct: 8 + basePct: 4 condKey: strategist_shots condEvery: 20 - condPct: 0.5 + condPct: 0.2 condMax: 20 starMax: 10 - shardsDup: 40 + shardsDup: 25 - id: nine_section_staff nameKo: "\uAD6C\uC808\uC7A5" grade: rare @@ -300,7 +300,7 @@ MonoBehaviour: condPct: 0.3 condMax: 10 starMax: 10 - shardsDup: 20 + shardsDup: 10 - id: yellow_talisman nameKo: "\uD669\uAC74 \uBD80\uC801" grade: rare @@ -312,7 +312,7 @@ MonoBehaviour: condPct: 0.3 condMax: 10 starMax: 10 - shardsDup: 20 + shardsDup: 10 - id: yellow_turban nameKo: "\uD669\uAC74 \uB450\uAC74" grade: rare @@ -324,52 +324,52 @@ MonoBehaviour: condPct: 0.3 condMax: 10 starMax: 10 - shardsDup: 20 + shardsDup: 10 - id: art_of_war nameKo: "\uC190\uC790\uBCD1\uBC95" grade: legend setId: baseStat: range - basePct: 8 + basePct: 4 condKey: gold_spent condEvery: 1000 - condPct: 0.5 + condPct: 0.2 condMax: 20 starMax: 10 - shardsDup: 40 + shardsDup: 25 - id: heaven_reliant_sword nameKo: "\uC758\uCC9C\uAC80" grade: legend setId: baseStat: crit - basePct: 8 + basePct: 4 condKey: boss_kills condEvery: 10 - condPct: 0.5 + condPct: 0.2 condMax: 20 starMax: 10 - shardsDup: 40 + shardsDup: 25 - id: twin_swords nameKo: "\uC30D\uACE0\uAC80" grade: epic setId: baseStat: atk - basePct: 5 + basePct: 6 condKey: active_uses condEvery: 75 - condPct: 0.5 + condPct: 0.6 condMax: 10 starMax: 10 - shardsDup: 30 + shardsDup: 15 - id: dilu nameKo: "\uC801\uB85C" grade: epic setId: baseStat: def - basePct: 5 + basePct: 6 condKey: patrols condEvery: 8 - condPct: 0.5 + condPct: 0.6 condMax: 10 starMax: 10 - shardsDup: 30 + shardsDup: 15 diff --git a/Assets/Resources/UI/Event/event_text.csv b/Assets/Resources/UI/Event/event_text.csv index cce4cc6a..db310e41 100644 --- a/Assets/Resources/UI/Event/event_text.csv +++ b/Assets/Resources/UI/Event/event_text.csv @@ -101,7 +101,7 @@ ev_item_stamina,군량,, ev_item_iron,운철,, ev_item_blueprint,도면,, ev_item_shard,영웅 조각,, -ev_item_ticket,입장권,,천하제일 탑 입장권(시안 「등용패」 = 게임에 없음) +ev_item_ticket,등용권,,명장 등용 1회(시안 「등용패」 · PD 2026-11-24 등용권으로) ev_item_chest_bronze,구리 상자,, ev_item_chest_silver,은 상자,, ev_item_chest_gold,금 상자,, diff --git a/Assets/Scripts/OutGame/Data/EconomyConfig.cs b/Assets/Scripts/OutGame/Data/EconomyConfig.cs index 83b0273b..26db3355 100644 --- a/Assets/Scripts/OutGame/Data/EconomyConfig.cs +++ b/Assets/Scripts/OutGame/Data/EconomyConfig.cs @@ -18,7 +18,17 @@ namespace TKS.OutGame public int BossCost { get { return values.I("boss_cost"); } } public int AdStamina { get { return values.I("ad_stamina"); } } public int AdStaminaDaily { get { return values.I("ad_stamina_daily"); } } - public int GemStaminaCost { get { return values.I("gem_stamina_cost"); } } + /// + /// 오늘 이미 boughtToday 번 산 뒤의 군량 구매 값(보옥) — gem_stamina_cost 「50;50;100;100;…」 의 차례 값(살수록 비싸짐 · 목록보다 많이 사면 마지막 값) · + /// PD 2026-11-24 「군량은 충전을 통해 하루 제한량 이상 이용할 수 있지만 구매할 때마다 효율이 떨어지도록」. + /// + public int GemStaminaCostAt(int boughtToday) + { + var a = values.List("gem_stamina_cost"); + if (a == null || a.Length == 0) return 0; + int v; + return int.TryParse(a[Mathf.Clamp(boughtToday, 0, a.Length - 1)].Trim(), out v) ? v : 0; + } public int GemStaminaAmount { get { return values.I("gem_stamina_amount"); } } public int GemStaminaDaily { get { return values.I("gem_stamina_daily"); } } public float RepeatRewardMult { get { return values.F("repeat_reward_mult"); } } diff --git a/Assets/Scripts/OutGame/Data/GoodsDb.cs b/Assets/Scripts/OutGame/Data/GoodsDb.cs index fe7bc8b2..4f9d42a3 100644 --- a/Assets/Scripts/OutGame/Data/GoodsDb.cs +++ b/Assets/Scripts/OutGame/Data/GoodsDb.cs @@ -6,7 +6,7 @@ namespace TKS.OutGame { /// /// 컨텐츠별 재화 배치 표 4장(PD 2026-11-24 · 개발 요청서 「재화배치」 §1) — chest_drop(수급처 × 구간별 보물 상자 등급 가중치) · - /// chest_loot(상자 등급별 더해지는 내용 줄) · hard_mode(장별 출정 하드 난이도) · hero_unlock(태생 ★ → 영입 조각). + /// chest_loot(상자 등급별 내용 줄 · 열면 그 가운데 하나) · hard_mode(장별 출정 하드 난이도) · hero_unlock(태생 ★ → 영입 조각). /// 임포트 = TKS/Import OutGame Data(OutGameTables.Goods.cs · 참조 오류가 있으면 자산 불변) · 규칙 = GoodsRules. /// public class GoodsDb : ScriptableObject @@ -22,7 +22,10 @@ namespace TKS.OutGame public float[] weights = new float[0]; } - /// 상자를 열 때 더해지는 내용 한 줄(확률 % · 수량 범위) — 보물 굴림 · 골드는 chests 표 그대로. + /// + /// 상자 내용 한 줄(확률 % · 수량 범위) — 상자 1개를 열면 그 상자의 줄 가운데 하나만(상자마다 f_pct 합 100 · PD 2026-11-24 「한 번에 하나」). + /// item = 보상 낱말(gold · iron · blueprint · gem · tome_t<등급> …) 또는 treasure_<등급>(그 등급 보물 1개). + /// [Serializable] public class ChestLoot { @@ -60,7 +63,9 @@ namespace TKS.OutGame public const string SourceHard = "stage_hard"; public const string SourcePatrol = "patrol"; public const string SourceBandit = "bandit"; - public static readonly string[] Sources = { SourceStage, SourceHard, SourcePatrol, SourceBandit }; + /// 공방 채굴(묻힌 상자 · 금강석 · 깊이 보상 · 구간 = 깊이 m · PD 2026-11-24). + public const string SourceMine = "mine"; + public static readonly string[] Sources = { SourceStage, SourceHard, SourcePatrol, SourceBandit, SourceMine }; public List chestDrops = new List(); public List chestLoots = new List(); diff --git a/Assets/Scripts/OutGame/Data/OutGameTables.C.cs b/Assets/Scripts/OutGame/Data/OutGameTables.C.cs index 0d8b464d..e6140b37 100644 --- a/Assets/Scripts/OutGame/Data/OutGameTables.C.cs +++ b/Assets/Scripts/OutGame/Data/OutGameTables.C.cs @@ -72,17 +72,37 @@ namespace TKS.OutGame { var t = ScriptableObject.CreateInstance(); const string f = "patrol.csv"; - if (!Cols(rows, f, e, "chapter", "gold_per_hour", "exp_per_hour", "gear_grade", "chest_bronze_per_hour")) return t; + if (!Cols(rows, f, e, "chapter", "gold_per_hour", "exp_per_hour", "l_gear_grade", "l_gear_weight", "chest_bronze_per_hour")) return t; var seen = new HashSet(); foreach (var r in rows) { var row = new PatrolTable.Row { chapter = Int(r, "chapter", f, e), goldPerHour = Int(r, "gold_per_hour", f, e), expPerHour = Int(r, "exp_per_hour", f, e), - gearGrade = Get(r, "gear_grade"), chestPerHour = Float(r, "chest_bronze_per_hour", f, e), + chestPerHour = Float(r, "chest_bronze_per_hour", f, e), }; + // 순찰 장비 = 등급마다 가중치(가장 큰 것 = 화면에 보이는 등급) + var gs = Get(r, "l_gear_grade").Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); + var ws = Get(r, "l_gear_weight").Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); + row.gearGrades = gs; + row.gearWeights = new float[ws.Length]; + float topW = -1f, sumW = 0f; + for (int i = 0; i < ws.Length; i++) + { + float w; + if (!float.TryParse(ws[i], NumberStyles.Float, CultureInfo.InvariantCulture, out w) || w < 0f) e.Add(f + ": 챕터 " + row.chapter + " l_gear_weight 「" + ws[i] + "」 숫자 아님"); + row.gearWeights[i] = w; + sumW += w; + if (i < gs.Length && w > topW) + { + topW = w; + row.gearGrade = gs[i]; + } + } + if (gs.Length == 0 || gs.Length != ws.Length || sumW <= 0f) e.Add(f + ": 챕터 " + row.chapter + " l_gear_grade · l_gear_weight 칸 수가 다르거나 비었음"); + foreach (var gname in gs) + if (d.Gear == null || d.Gear.OrderOf(gname) == 0) e.Add(f + ": 챕터 " + row.chapter + " l_gear_grade 「" + gname + "」 가 gear_items.csv 등급에 없음"); if (!Unique(seen, row.chapter.ToString(CultureInfo.InvariantCulture), f, r, e)) continue; - if (d.Gear == null || d.Gear.OrderOf(row.gearGrade) == 0) e.Add(f + ": 챕터 " + row.chapter + " gear_grade 「" + row.gearGrade + "」 가 gear_items.csv 등급에 없음"); t.rows.Add(row); } return t; @@ -129,24 +149,18 @@ namespace TKS.OutGame { var t = ScriptableObject.CreateInstance(); const string f = "chests.csv"; - if (!Cols(rows, f, e, "id", "name_ko", "points", "p_rare", "p_epic", "p_legend", "p_myth", "gold_min", "gold_max", "gem_min", "gem_max", "source", - "iron_min", "iron_max", "buy_gold", "buy_gem", "buy_points")) return t; + // 내용물(확률 · 수량)은 chest_loot.csv — 상자 1개 = 그 상자의 줄 가운데 하나(PD 2026-11-24 「한 번에 하나」 · 검증 = OutGameTables.Goods) + if (!Cols(rows, f, e, "id", "name_ko", "concept_ko", "points", "source", "buy_gold", "buy_gem", "buy_points")) return t; var seen = new HashSet(); foreach (var r in rows) { var c = new ChestDb.Chest { - id = Get(r, "id"), nameKo = Get(r, "name_ko"), points = Int(r, "points", f, e), - goldMin = Int(r, "gold_min", f, e), goldMax = Int(r, "gold_max", f, e), gemMin = Int(r, "gem_min", f, e), gemMax = Int(r, "gem_max", f, e), - ironMin = Int(r, "iron_min", f, e), ironMax = Int(r, "iron_max", f, e), source = Get(r, "source"), + id = Get(r, "id"), nameKo = Get(r, "name_ko"), conceptKo = Get(r, "concept_ko"), points = Int(r, "points", f, e), source = Get(r, "source"), buyGold = Int(r, "buy_gold", f, e), buyGem = Int(r, "buy_gem", f, e), buyPoints = Int(r, "buy_points", f, e), }; - for (int i = 0; i < ChestDb.ProbGrades.Length; i++) c.p[i] = Float(r, "p_" + ChestDb.ProbGrades[i], f, e); if (!Unique(seen, c.id, f, r, e)) continue; - float sum = 0f; - foreach (var p in c.p) sum += p; - if (Mathf.Abs(sum - 1f) > 1e-4f) e.Add(f + ": " + c.id + " 등급 확률 합 = " + sum.ToString("0.####", CultureInfo.InvariantCulture) + " ≠ 1"); - if (c.goldMin > c.goldMax || c.gemMin > c.gemMax || c.ironMin > c.ironMax) e.Add(f + ": " + c.id + " min > max"); + if (string.IsNullOrEmpty(c.conceptKo)) e.Add(f + ": " + c.id + " concept_ko 비었음"); t.chests.Add(c); } return t; diff --git a/Assets/Scripts/OutGame/Data/OutGameTables.Goods.cs b/Assets/Scripts/OutGame/Data/OutGameTables.Goods.cs index 85056b22..c0fabb8b 100644 --- a/Assets/Scripts/OutGame/Data/OutGameTables.Goods.cs +++ b/Assets/Scripts/OutGame/Data/OutGameTables.Goods.cs @@ -54,18 +54,36 @@ namespace TKS.OutGame const string fl = "chest_loot.csv"; if (Cols(rows[fl], fl, e, "s_chest", "s_item", "f_pct", "n_min", "n_max")) { + // 상자 1개를 열면 그 상자의 줄 가운데 하나만(PD 2026-11-24) — 상자마다 f_pct 합 = 100 · 같은 재화를 수량만 달리 여러 줄로 둘 수 있다(골드 2,000 · 6,000) var seen = new HashSet(); + var sums = new Dictionary(); foreach (var r in rows[fl]) { var l = new GoodsDb.ChestLoot { chest = Get(r, "s_chest"), item = Get(r, "s_item"), pct = Float(r, "f_pct", fl, e), min = Int(r, "n_min", fl, e), max = Int(r, "n_max", fl, e) }; string at = fl + " 행 " + Get(r, "#") + " " + l.chest + " · " + l.item; - if (!seen.Add(l.chest + "|" + l.item)) e.Add(at + ": 중복"); + if (!seen.Add(l.chest + "|" + l.item + "|" + l.min + "|" + l.max)) e.Add(at + ": 중복"); if (d.Chests == null || d.Chests.Get(l.chest) == null) e.Add(at + ": 상자 「" + l.chest + "」 가 chests.csv 에 없음"); - if (!GoodsRules.Known(d, l.item)) e.Add(at + ": 내용 「" + l.item + "」 = 지급하는 법을 코드가 모름(GoodsRules)"); + string grade = GoodsRules.TreasureGrade(l.item); + if (grade != null) + { + if (d.Treasures == null || d.Treasures.OfGrade(grade).Count == 0) e.Add(at + ": 「" + grade + "」 등급 보물이 treasures.csv 에 없음"); + if (l.min != 1 || l.max != 1) e.Add(at + ": 보물 줄의 수량은 1(한 번에 하나)"); + } + else if (!GoodsRules.Known(d, l.item)) e.Add(at + ": 내용 「" + l.item + "」 = 지급하는 법을 코드가 모름(GoodsRules)"); if (l.pct <= 0f || l.pct > 100f) e.Add(at + ": f_pct " + l.pct.ToString("0.##", CultureInfo.InvariantCulture) + " = 0 초과 100 이하가 아님"); if (l.min < 1 || l.min > l.max) e.Add(at + ": 수량 범위 " + l.min + "~" + l.max + " 이상"); + float sum; + sums.TryGetValue(l.chest, out sum); + sums[l.chest] = sum + l.pct; t.chestLoots.Add(l); } + if (d.Chests != null) + foreach (var c in d.Chests.chests) + { + float sum; + if (!sums.TryGetValue(c.id, out sum)) e.Add(fl + ": 상자 「" + c.id + "」 의 내용 줄이 없음(열어도 아무것도 안 나옴)"); + else if (Mathf.Abs(sum - 100f) > 0.01f) e.Add(fl + ": 상자 「" + c.id + "」 의 f_pct 합 = " + sum.ToString("0.##", CultureInfo.InvariantCulture) + " ≠ 100"); + } } const string fh = "hard_mode.csv"; diff --git a/Assets/Scripts/OutGame/Domestic/DevRules.cs b/Assets/Scripts/OutGame/Domestic/DevRules.cs index ce8f4461..ab975db5 100644 --- a/Assets/Scripts/OutGame/Domestic/DevRules.cs +++ b/Assets/Scripts/OutGame/Domestic/DevRules.cs @@ -37,6 +37,9 @@ namespace TKS.OutGame public const string BlueprintGain = "blueprint_gain_pct"; public const string DungeonGear = "dungeon_gear_pct"; public const string ChestTier = "chest_tier_up_pct"; + // 공방(PD 2026-11-24) — 제작 가능 등급 · 곡괭이 최대 보유는 내정(공업)으로 늘린다 + public const string CraftGrade = "craft_grade_add"; + public const string PickCap = "pick_cap_add"; /// 효과 키 → 적용 지점(화면 설명 · 「미구현」 = 판매·합성·별 보상이 아직 없어 적용 지점 없음 · PD 확인 대상). public static readonly Dictionary Keys = new Dictionary @@ -62,13 +65,15 @@ namespace TKS.OutGame { GearDrop, "스테이지 장비 드랍 +%p" }, { ChestHigh, "상자 상위 등급 확률 +%" }, { IronGain, "운철 +%" }, - { CraftCost, "합성 비용 −% (합성 미구현)" }, + { CraftCost, "공방 제작 비용(철광석 · 골드) −%" }, { CraftBulk, "합성 일괄 (합성 미구현)" }, { CraftBlueprint, "합성 도면 − (합성 미구현)" }, { GearSell, "장비 판매 +% (판매 미구현)" }, { BlueprintGain, "도면 획득 +%(탑 · 보물 상자)" }, { DungeonGear, "황건적 소탕 상자 수 +%" }, { ChestTier, "상자 한 단계 위 확률 +%" }, + { CraftGrade, "공방 제작 가능 등급 +(일반 다음 등급부터)" }, + { PickCap, "곡괭이 최대 보유 +" }, }; public static bool Known(string key) diff --git a/Assets/Scripts/OutGame/Domestic/PatrolRules.cs b/Assets/Scripts/OutGame/Domestic/PatrolRules.cs index 41e124ae..b3fe15dc 100644 --- a/Assets/Scripts/OutGame/Domestic/PatrolRules.cs +++ b/Assets/Scripts/OutGame/Domestic/PatrolRules.cs @@ -51,13 +51,19 @@ namespace TKS.OutGame return db.Patrol.For(Mathf.Max(1, d.chapterMax)); } - /// 순찰 장비 등급 = 표 gear_grade + 둔전제 Lv(최고 등급에서 멈춤). - public static string GearGrade(OutGameData db, SaveData d) + /// 순찰 장비의 가장 높은 등급 순서 = 순찰 표 전체에서 가장 높은 등급(지금 전설) — 내정 「둔전제」 로 올려도 이 위(불멸 · 신화)는 나오지 않는다. + public static int TopGearOrder(OutGameData db) { - var row = Row(db, d); - if (row == null) return ""; - int order = db.Gear.OrderOf(row.gearGrade) + Mathf.RoundToInt(DevRules.Mod(db, d, DevRules.PatrolGearGrade)); - string best = row.gearGrade; + int top = 0; + foreach (var r in db.Patrol.rows) + foreach (var g in r.gearGrades) top = Mathf.Max(top, db.Gear.OrderOf(g)); + return top; + } + + /// 등급 순서(1 = 일반 …) → 그 순서 이하에서 가장 높은 장비 등급 이름. + static string GradeAt(OutGameData db, int order, string fallback) + { + string best = fallback; int bestOrder = 0; foreach (var it in db.Gear.items) if (it.order <= order && it.order > bestOrder) @@ -68,6 +74,40 @@ namespace TKS.OutGame return best; } + /// + /// 순찰 장비 1개의 등급 = 그 장의 가중치(patrol l_gear_grade · l_gear_weight)로 굴림 + 둔전제 Lv(순찰 표의 최고 등급에서 멈춤) — + /// PD 2026-11-24 「10장 기준 확률에 따라 최대 전설까지 · 영웅 · 전설 등급은 확률이 낮아 많이 얻지는 못하더라도」. + /// + public static string RollGearGrade(OutGameData db, SaveData d, System.Random rng) + { + var row = Row(db, d); + if (row == null || row.gearGrades.Length == 0) return GearGrade(db, d); + float sum = 0f; + foreach (var w in row.gearWeights) sum += w; + float at = (float)(rng.NextDouble() * sum); + string g = row.gearGrades[row.gearGrades.Length - 1]; + for (int i = 0; i < row.gearGrades.Length && i < row.gearWeights.Length; i++) + { + if (at < row.gearWeights[i]) + { + g = row.gearGrades[i]; + break; + } + at -= row.gearWeights[i]; + } + int order = Mathf.Min(TopGearOrder(db), db.Gear.OrderOf(g) + Mathf.RoundToInt(DevRules.Mod(db, d, DevRules.PatrolGearGrade))); + return GradeAt(db, order, g); + } + + /// 순찰 장비의 대표 등급(가장 잘 나오는 것 · 화면 그림) = 표의 가장 큰 가중치 등급 + 둔전제 Lv(순찰 표의 최고 등급에서 멈춤). + public static string GearGrade(OutGameData db, SaveData d) + { + var row = Row(db, d); + if (row == null) return ""; + int order = Mathf.Min(TopGearOrder(db), db.Gear.OrderOf(row.gearGrade) + Mathf.RoundToInt(DevRules.Mod(db, d, DevRules.PatrolGearGrade))); + return GradeAt(db, order, row.gearGrade); + } + /// 마지막으로 클리어한 스테이지 = 클리어한 것 가운데 가장 뒤(장 → 판) · 없으면 1-1 로 본다(하드 난이도 기록은 세지 않는다). public static void LastCleared(SaveData d, out int chapter, out int stage) { @@ -156,11 +196,14 @@ namespace TKS.OutGame HeroRules.GrantExp(s, y.exp); y.expTo.Add(id); } - var pool = new List(); - foreach (var it in db.Gear.items) - if (it.grade == y.gearGrade) pool.Add(it.id); - for (int i = 0; i < y.gear && pool.Count > 0; i++) + for (int i = 0; i < y.gear; i++) { + // 장비마다 등급을 굴린다(장별 가중치 · 10장 = 전설까지) → 그 등급의 장비 가운데 무작위 + string grade = RollGearGrade(db, d, rng); + var pool = new List(); + foreach (var it in db.Gear.items) + if (it.grade == grade) pool.Add(it.id); + if (pool.Count == 0) continue; var g = pool[rng.Next(pool.Count)]; d.inv.AddGear(g, 1); y.gearIds.Add(g); diff --git a/Assets/Scripts/OutGame/Domestic/PatrolTable.cs b/Assets/Scripts/OutGame/Domestic/PatrolTable.cs index d7f5ba60..26538ae8 100644 --- a/Assets/Scripts/OutGame/Domestic/PatrolTable.cs +++ b/Assets/Scripts/OutGame/Domestic/PatrolTable.cs @@ -13,7 +13,11 @@ namespace TKS.OutGame public int chapter; public int goldPerHour; public int expPerHour; + [Tooltip("가장 잘 나오는 장비 등급(l_gear_weight 가 가장 큰 것 · 화면 그림 · 임포터가 채운다)")] public string gearGrade; + [Tooltip("순찰 장비 등급과 가중치(patrol.csv l_gear_grade · l_gear_weight · PD 2026-11-24 「10장 기준 확률에 따라 최대 전설까지」)")] + public string[] gearGrades = new string[0]; + public float[] gearWeights = new float[0]; public float chestPerHour; } diff --git a/Assets/Scripts/OutGame/EconomyRules.cs b/Assets/Scripts/OutGame/EconomyRules.cs index 6085c257..987f51c5 100644 --- a/Assets/Scripts/OutGame/EconomyRules.cs +++ b/Assets/Scripts/OutGame/EconomyRules.cs @@ -244,14 +244,15 @@ namespace TKS.OutGame if (d.stamina >= StaminaMax(db, d)) d.staminaAt = SaveStore.Iso(nowUtc); } - /// 보옥 gem_stamina_cost → 군량 gem_stamina_amount (gem_stamina_daily 회/일). null = 성공. + /// 보옥 → 군량 gem_stamina_amount(gem_stamina_daily 회/일 · 값 = 오늘 몇 번째인지에 따라 gem_stamina_cost 목록 · 살수록 비싸짐). null = 성공. public static string BuyStaminaWithGem(OutGameData db, SaveData d, DateTime nowUtc) { var e = db.Economy; RollDaily(d, nowUtc); if (d.adsUsed.gemStamina >= e.GemStaminaDaily) return "오늘 구매 " + e.GemStaminaDaily + "회를 모두 썼습니다"; - if (d.gem < e.GemStaminaCost) return "보옥 부족 " + d.gem + " / " + e.GemStaminaCost; - d.gem -= e.GemStaminaCost; + int cost = e.GemStaminaCostAt(d.adsUsed.gemStamina); + if (d.gem < cost) return "보옥 부족 " + d.gem + " / " + cost; + d.gem -= cost; d.adsUsed.gemStamina++; AddStamina(db, d, e.GemStaminaAmount, nowUtc); return null; diff --git a/Assets/Scripts/OutGame/Event/EventRules.cs b/Assets/Scripts/OutGame/Event/EventRules.cs index 0c1f3ef5..a1468e33 100644 --- a/Assets/Scripts/OutGame/Event/EventRules.cs +++ b/Assets/Scripts/OutGame/Event/EventRules.cs @@ -237,6 +237,7 @@ namespace TKS.OutGame case "iron": d.inv.iron += r.n; break; case "blueprint": d.inv.blueprint += r.n; break; case "tower_ticket": d.arena.towerTickets += r.n; break; + case "recruit_ticket": AwakenRules.AddGoods(d, GoodsRules.Ticket, r.n); break; // 등용권(PD 2026-11-24 「이벤트 보상 … 등용권으로」) case "chest": Counts.Add(d.inv.chests, it.arg, r.n); break; case "pouch": St(d).pouch += r.n; break; case "hero_shard": diff --git a/Assets/Scripts/OutGame/GoodsRules.cs b/Assets/Scripts/OutGame/GoodsRules.cs index ca8df86f..8eea6767 100644 --- a/Assets/Scripts/OutGame/GoodsRules.cs +++ b/Assets/Scripts/OutGame/GoodsRules.cs @@ -380,22 +380,35 @@ namespace TKS.OutGame // ---------- 보물 상자 내용 줄(chest_loot) ---------- - /// - /// 상자 1개를 열 때 더해지는 것 — 줄마다 확률 굴림 · 수량 범위(운철 = 내정 「운철」 · 도면 = 내정 「도면 획득」 배율) · 진영 비서 등급(tome_t*) = 진영 무작위. - /// - public static List RollChestLoot(OutGameData db, SaveData d, string chestId, System.Random rng) + /// 상자 내용 줄 전용 낱말 머리 — treasure_<등급> = 그 등급 보물 1개(TreasureRules.Open 이 지급). + public const string TreasurePick = "treasure_"; + + /// treasure_legend → legend(상자에서 나오는 보물 등급이 아니면 null). + public static string TreasureGrade(string key) { - var res = new List(); - if (db.Goods == null) return res; - foreach (var l in db.Goods.LootOf(chestId)) + if (key == null || !key.StartsWith(TreasurePick, StringComparison.Ordinal)) return null; + var g = key.Substring(TreasurePick.Length); + return Array.IndexOf(ChestDb.ProbGrades, g) >= 0 ? g : null; + } + + /// + /// 상자 1개의 내용 = 그 상자의 줄 가운데 하나(f_pct 가중 · 표의 합 = 100 · PD 2026-11-24 「보물 상자에서는 한번에 하나의 아이템만」) — 줄이 없으면 null. + /// 지급은 TreasureRules.Open(보물 등급 줄 · 고르는 줄 · 그 밖). + /// + public static GoodsDb.ChestLoot PickChestLoot(OutGameData db, string chestId, System.Random rng) + { + if (db.Goods == null) return null; + var lines = db.Goods.LootOf(chestId); + float sum = 0f; + foreach (var l in lines) sum += l.pct; + if (lines.Count == 0 || sum <= 0f) return null; + double at = rng.NextDouble() * sum; + foreach (var l in lines) { - if (rng.NextDouble() * 100.0 >= l.pct) continue; - int n = l.max > l.min ? rng.Next(l.min, l.max + 1) : l.min; - if (l.item == "iron") n = Mathf.RoundToInt(n * DevRules.Mult(db, d, DevRules.IronGain)); - else if (l.item == "blueprint") n = Mathf.RoundToInt(n * DevRules.Mult(db, d, DevRules.BlueprintGain)); - AddAll(res, Give(db, d, l.item, n, rng)); + if (at < l.pct) return l; + at -= l.pct; } - return res; + return lines[lines.Count - 1]; } } diff --git a/Assets/Scripts/OutGame/Net/ServerSession.cs b/Assets/Scripts/OutGame/Net/ServerSession.cs index f59309ce..ddc1b95d 100644 --- a/Assets/Scripts/OutGame/Net/ServerSession.cs +++ b/Assets/Scripts/OutGame/Net/ServerSession.cs @@ -697,15 +697,24 @@ namespace TKS.OutGame.Net return; } Sync.Post("POST", "/tks/chests/" + Esc(id) + "/open", null, - r => done(new ChestResult + r => { - chestId = id, - treasureId = r.Has("result.treasureId") ? r.Str("result.treasureId") : null, - grade = r.Has("result.grade") ? r.Str("result.grade") : null, - isNew = r.Bool("result.isNew"), shards = (int)r.Num("result.shards"), gradeUp = r.Bool("result.gradeUp"), - gold = (int)r.Num("result.gold"), gem = (int)r.Num("result.gem"), iron = (int)r.Num("result.iron"), - points = (int)r.Num("result.points"), bonusChests = (int)r.Num("result.bonusChests"), - }), + var res = new ChestResult + { + chestId = id, + treasureId = r.Has("result.treasureId") ? r.Str("result.treasureId") : null, + grade = r.Has("result.grade") ? r.Str("result.grade") : null, + isNew = r.Bool("result.isNew"), shards = (int)r.Num("result.shards"), gradeUp = r.Bool("result.gradeUp"), + points = (int)r.Num("result.points"), bonusChests = (int)r.Num("result.bonusChests"), + }; + // 서버가 돌려준 골드 · 보옥 · 운철 = 바로 받은 것(화면은 extras 만 본다 · 2026-11-24 「한 번에 하나」) + foreach (var k in new[] { "gold", "gem", "iron" }) + { + int n = (int)r.Num("result." + k); + if (n > 0) GoodsRules.Add(res.extras, k, n, GoodsRules.NameOf(Db, k), k); + } + done(res); + }, r => done(null), true, true); } diff --git a/Assets/Scripts/OutGame/OutGameSession.cs b/Assets/Scripts/OutGame/OutGameSession.cs index 307392d3..f41655b2 100644 --- a/Assets/Scripts/OutGame/OutGameSession.cs +++ b/Assets/Scripts/OutGame/OutGameSession.cs @@ -624,7 +624,7 @@ namespace TKS.OutGame public virtual string BuyChest(string id, string currency) { - return Do(() => TreasureRules.Buy(Db, Save, id, currency)); + return Do(() => TreasureRules.Buy(Db, Save, id, currency, Now)); } // 결과에 주사위가 들어가는 동작 — 서버 모드에서는 서버가 결과를 정하므로 응답을 기다린 뒤 done 을 부른다. 기본 세션은 바로 부른다. @@ -692,6 +692,48 @@ namespace TKS.OutGame return r; } + // ---------- 공방(채굴 · 제작 · PD 2026-11-24) — 화면은 이 함수들을 부른다(기기 세이브 · 서버 쪽 규칙은 따로) ---------- + + /// 최근 공방 동작이 안 된 까닭(됐으면 null). + public string LastWhy { get; private set; } + + /// 공방을 열 때 — 갱도가 없으면 만들고(씨앗 · 곡괭이 기본 수) 곡괭이 충전을 지금 시각에 맞춘다. + public void MineEnter() + { + if (MineRules.Ensure(Db, Save, Now, Rng)) Commit(); + } + + /// 갱도 칸에 도구 1번(곡괭이 = 1번 때림 · 쇠말뚝 · 화약 = 범위) → 결과(못 쓰면 null · LastWhy). + public MineResult MineUse(string tool, int c, int r) + { + MineRules.Ensure(Db, Save, Now, Rng); + string why; + var res = MineRules.Use(Db, Save, tool, c, r, Now, Rng, out why); + LastWhy = why; + if (res != null) Commit(); + return res; + } + + public string CraftStart(string gearId, int n) + { + return LastWhy = Do(() => CraftRules.Start(Db, Save, gearId, n, Now)); + } + + public string CraftClaim(int i) + { + return LastWhy = Do(() => CraftRules.Claim(Db, Save, i, Now)); + } + + public string CraftRush(int i) + { + return LastWhy = Do(() => CraftRules.Rush(Db, Save, i, Now)); + } + + public string CraftBuySlot() + { + return LastWhy = Do(() => CraftRules.BuySlot(Db, Save)); + } + // ---------- 연무장 · 우편 — 화면은 이 함수들을 부른다(서버 모드에서는 같은 동작이 서버로도 간다 · Net/ServerSession) ---------- /// 연무장 화면을 열 때 — 일일 횟수 · 시즌 · 이번 주 보스를 지금 시각에 맞춘다. diff --git a/Assets/Scripts/OutGame/SaveData.cs b/Assets/Scripts/OutGame/SaveData.cs index 2ca25f09..7e962bc0 100644 --- a/Assets/Scripts/OutGame/SaveData.cs +++ b/Assets/Scripts/OutGame/SaveData.cs @@ -226,12 +226,18 @@ namespace TKS.OutGame public MailState mail = new MailState(); [Tooltip("재화 상점 주간 구매 기록(메달 상점 · 임무 주간 경계 · 2026-11-24)")] public ShopBuys shopBuys = new ShopBuys(); + [Tooltip("거래 > 보물 상자 구매 기록(상품 = 상자 × 값의 재화 · 매일 갱신 전까지 1번씩 · week 칸 = 날짜 · PD 2026-11-24)")] + public ShopBuys chestBuys = new ShopBuys(); [Tooltip("받을 때 고르는 보상(탑 층 첫 클리어의 진영 비서 · 불멸 장비 — 보상 낱말 → 남은 수 · 탑 화면에서 고른다 · 2026-11-24)")] public List picks = new List(); [Tooltip("출정 하드 난이도 하루 클리어 수(스테이지마다 hard_mode n_daily_per_stage 회 · 소탕 포함 · 2026-11-24) — 별 · 클리어 기록은 stages 의 「h장-판」 칸")] public HardDaily hardDaily = new HardDaily(); [Tooltip("떠돌이 상인의 오늘 물품(영웅 조각 · 날마다 확률로 등장 · wander_shop · 2026-11-24)")] public WanderState wander = new WanderState(); + [Tooltip("공방 채굴(갱도 화면 칸 · 깊이 · 곡괭이 · 도구 · PD 2026-11-24)")] + public MineState mine = new MineState(); + [Tooltip("공방 제작 대기열(PD 2026-11-24)")] + public CraftState craft = new CraftState(); [Tooltip("보유 꾸미기(2026-11-20 외형 · 계정 공용 · costume_items s_id)")] public List costumes = new List(); [Tooltip("새로 얻은 꾸미기 = 「외형」 버튼 빨간 점(창을 열면 끔)")] diff --git a/Assets/Scripts/OutGame/Treasure/ChestDb.cs b/Assets/Scripts/OutGame/Treasure/ChestDb.cs index c6f9f708..cf3d043e 100644 --- a/Assets/Scripts/OutGame/Treasure/ChestDb.cs +++ b/Assets/Scripts/OutGame/Treasure/ChestDb.cs @@ -5,12 +5,13 @@ using UnityEngine; namespace TKS.OutGame { /// - /// 보물 상자(chests.csv · 기획서 §8 · S8·S15) — 상자 포인트 · 등급 확률(희귀·영웅·전설·신화 · 천기 = 적장 토벌 전용) · 골드·보옥·운철 범위 · 획득처 · + /// 보물 상자(chests.csv · 기획서 §8 · S8·S15) — 상자 포인트 · 컨셉(무엇이 나오는 상자인가 · 화면 글자) · 획득처 · /// 거래 구매 가격(buy_gold · buy_gem · buy_points · 0 = 판매 안 함 · C 단계 추가 열). + /// 내용물 = chest_loot.csv(GoodsDb.chestLoots) — 상자 1개를 열면 그 상자의 줄 가운데 하나만(PD 2026-11-24 「한 번에 하나」). /// public class ChestDb : ScriptableObject { - /// 확률 열 p_<grade> 순서. + /// 상자에서 나오는 보물 등급 순서(chest_loot 낱말 treasure_<등급> · 내정 「상위 확률」 = 이 순서의 다음 등급 · 천기 = 적장 토벌 전용이라 없음). public static readonly string[] ProbGrades = { "rare", "epic", "legend", "myth" }; [Serializable] @@ -18,12 +19,8 @@ namespace TKS.OutGame { public string id; public string nameKo; + public string conceptKo; public int points; - [Tooltip("ProbGrades 순서 확률(합 1)")] - public float[] p = new float[4]; - public int goldMin, goldMax; - public int gemMin, gemMax; - public int ironMin, ironMax; public string source; public int buyGold, buyGem, buyPoints; } diff --git a/Assets/Scripts/OutGame/Treasure/TreasureRules.cs b/Assets/Scripts/OutGame/Treasure/TreasureRules.cs index 1f9a3ca4..8ba819dc 100644 --- a/Assets/Scripts/OutGame/Treasure/TreasureRules.cs +++ b/Assets/Scripts/OutGame/Treasure/TreasureRules.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using UnityEngine; @@ -12,14 +13,22 @@ namespace TKS.OutGame public bool isNew; public int shards; public bool gradeUp; - public int gold; - public int gem; - public int iron; public int points; /// 상자 포인트가 목표를 넘겨 받은 보상 상자 수. public int bonusChests; - /// 더해진 내용 줄(chest_loot · 운철 · 도면 · 보옥 · 진영 비서 … · 2026-11-24). + /// 보물이 아닌 줄이 나왔을 때 바로 받은 것(chest_loot · 골드 · 운철 · 도면 · 보옥 … · 상자 1개 = 한 가지). public List extras = new List(); + /// 고르는 줄이 나와 보관한 것(진영 비서 tome_t* → SaveData.picks · 화면에서 진영을 골라 받는다) — key = 보상 낱말. + public List held = new List(); + + /// 바로 받은 것 가운데 그 낱말의 수(골드 = "gold"). + public int Got(string key) + { + int n = 0; + foreach (var g in extras) + if (g.key == key) n += g.n; + return n; + } } /// @@ -215,25 +224,51 @@ namespace TKS.OutGame return it.id; } - /// 상자 1개 열기: 등급 확률(상위 확률 개발 = 한 등급 위) → 그 등급 보물 1개 · 골드/보옥/운철 범위(chests) + 내용 줄(chest_loot) · 상자 포인트(+개발 %) → 목표 넘으면 보상 상자. + /// + /// 상자 1개 열기(PD 2026-11-24 「보물 상자에서는 한번에 하나의 아이템만」): 그 상자의 내용 줄(chest_loot) 가운데 하나만 — + /// 보물 등급 줄(treasure_<등급>) = 그 등급 보물 1개(내정 「상위 확률」 = 한 등급 위) · 고르는 줄(진영 비서 tome_t*) = 보관(SaveData.picks · 화면에서 진영을 골라 받는다) · + /// 그 밖(골드 · 운철 · 도면 · 보옥 …) = 바로 지급(운철 · 도면 = 내정 배율) · 상자 포인트(+개발 %) → 목표를 넘으면 보상 상자. 내정 효과는 맞는 줄이 나왔을 때만. + /// public static ChestResult Open(OutGameData db, SaveData d, string chestId, System.Random rng) { var c = db.Chests.Get(chestId); if (c == null || ChestCount(d, chestId) <= 0) return null; Counts.Add(d.inv.chests, chestId, -1); var r = new ChestResult { chestId = chestId }; - double roll = rng.NextDouble(), acc = 0; - int gi = 0; - for (int i = 0; i < c.p.Length; i++) + var line = GoodsRules.PickChestLoot(db, chestId, rng); + if (line != null) { - acc += c.p[i]; - if (c.p[i] > 0f) gi = i; - if (roll < acc && c.p[i] > 0f) + int n = line.max > line.min ? rng.Next(line.min, line.max + 1) : line.min; + string grade = GoodsRules.TreasureGrade(line.item); + if (grade != null) GrantFromChest(db, d, grade, rng, r); + else if (GoodsRules.PickKind(db, line.item) != null) { - gi = i; - break; + GoodsRules.AddPick(d, line.item, n); + GoodsRules.Add(r.held, line.item, n, GoodsRules.NameOf(db, line.item), "pick"); + } + else + { + if (line.item == "iron") n = Mathf.RoundToInt(n * DevRules.Mult(db, d, DevRules.IronGain)); + else if (line.item == "blueprint") n = Mathf.RoundToInt(n * DevRules.Mult(db, d, DevRules.BlueprintGain)); + r.extras = GoodsRules.Give(db, d, line.item, n, rng); } } + r.points = Mathf.RoundToInt(c.points * DevRules.Mult(db, d, DevRules.ChestPoint)); + d.inv.chestPoints += r.points; + int goal = Mathf.Max(1, db.Economy.ChestPointGoal); + while (d.inv.chestPoints >= goal) + { + d.inv.chestPoints -= goal; + Counts.Add(d.inv.chests, db.Economy.ChestPointReward, 1); + r.bonusChests++; + } + return r; + } + + /// 상자의 보물 등급 줄 지급 — 내정 「상위 확률」(chest_high) = 한 등급 위 · 그 등급 보물이 없으면 아래 등급. + static void GrantFromChest(OutGameData db, SaveData d, string grade, System.Random rng, ChestResult r) + { + int gi = Mathf.Max(0, Array.IndexOf(ChestDb.ProbGrades, grade)); float high = DevRules.Mod(db, d, DevRules.ChestHigh) / 100f; if (high > 0f && gi + 1 < ChestDb.ProbGrades.Length && rng.NextDouble() < high) { @@ -250,23 +285,48 @@ namespace TKS.OutGame r.isNew = Grant(d, it, out r.shards); break; } - r.gold = c.goldMax > 0 ? rng.Next(c.goldMin, c.goldMax + 1) : 0; - r.gem = c.gemMax > 0 ? rng.Next(c.gemMin, c.gemMax + 1) : 0; - r.iron = c.ironMax > 0 ? Mathf.RoundToInt(rng.Next(c.ironMin, c.ironMax + 1) * DevRules.Mult(db, d, DevRules.IronGain)) : 0; - d.gold += r.gold; - d.gem += r.gem; - d.inv.iron += r.iron; - r.extras = GoodsRules.RollChestLoot(db, d, chestId, rng); // 내용 줄마다 확률 굴림(chest_loot · PD 2026-11-24 재화 배치) - r.points = Mathf.RoundToInt(c.points * DevRules.Mult(db, d, DevRules.ChestPoint)); - d.inv.chestPoints += r.points; - int goal = Mathf.Max(1, db.Economy.ChestPointGoal); - while (d.inv.chestPoints >= goal) - { - d.inv.chestPoints -= goal; - Counts.Add(d.inv.chests, db.Economy.ChestPointReward, 1); - r.bonusChests++; - } - return r; + } + + /// 상자 내용 줄의 짧은 이름(화면 칩 · 거래 탭) — 보물 등급 줄 = 등급 이름(희귀) · 고르는 줄 1개 = 이름(하급 비서) · 그 밖 = 이름 + 수량(골드 2,000 · 범위 = 8~25). + public static string LootName(OutGameData db, GoodsDb.ChestLoot l) + { + string grade = GoodsRules.TreasureGrade(l.item); + if (grade != null) return GradeKo(grade); + string name = GoodsRules.NameOf(db, l.item); + if (l.max <= 1 && GoodsRules.PickKind(db, l.item) != null) return name; + return name + " " + (l.max > l.min ? l.min.ToString("N0") + "~" + l.max.ToString("N0") : l.min.ToString("N0")); + } + + /// 상자 내용 줄 한 칸 글자 = 「이름 확률%」. + public static string LootChip(OutGameData db, GoodsDb.ChestLoot l) + { + return LootName(db, l) + " " + l.pct.ToString("0.#") + "%"; + } + + /// + /// 상자 내용 요약 한 줄(거래 > 보물 상자) — 보물 · 고르는 줄 = 줄마다 「이름 확률%」 · 그 밖 = 같은 재화끼리 확률을 더해 「골드 52%」(수량 갈래는 보물 > 상자 화면의 칩에). + /// + public static string LootSummary(OutGameData db, string chestId) + { + var names = new List(); + var pcts = new List(); + if (db.Goods != null) + foreach (var l in db.Goods.LootOf(chestId)) + { + bool whole = GoodsRules.TreasureGrade(l.item) != null || GoodsRules.PickKind(db, l.item) != null; + string name = whole ? LootName(db, l) : GoodsRules.NameOf(db, l.item); + int at = names.IndexOf(name); + if (at < 0) + { + names.Add(name); + pcts.Add(l.pct); + } + else pcts[at] += l.pct; + } + var parts = new List(); + // 한 칸(이름 확률%) 안의 빈칸 = 줄 바꿈 없는 빈칸 → 긴 줄은 「 · 」 에서만 넘어간다 + for (int i = 0; i < names.Count; i++) parts.Add((names[i] + " " + pcts[i].ToString("0.#") + "%").Replace(' ', ' ')); + return string.Join(" · ", parts.ToArray()); } /// 거래 상자 가격(currency = gold|gem|points · 0 = 판매 안 함) · 골드·보옥 = 거래 할인 개발 적용. @@ -277,12 +337,19 @@ namespace TKS.OutGame return Mathf.Max(1, Mathf.RoundToInt(baseP * Mathf.Max(0f, 1f - DevRules.Mod(db, d, DevRules.TradeDiscount) / 100f))); } - public static string Buy(OutGameData db, SaveData d, string chestId, string currency) + /// 그 상품(상자 × 값의 재화)을 오늘 이미 샀는가 — 상점 상품은 갱신(매일) 전까지 1번씩만(PD 2026-11-24). + public static bool BoughtToday(SaveData d, string chestId, string currency, DateTime nowUtc) + { + return d.chestBuys != null && d.chestBuys.week == EconomyRules.DayKey(nowUtc) && Counts.Get(d.chestBuys.bought, chestId + ":" + currency) > 0; + } + + public static string Buy(OutGameData db, SaveData d, string chestId, string currency, DateTime nowUtc) { var c = db.Chests.Get(chestId); if (c == null) return "없는 상자"; int price = Price(db, d, c, currency); if (price <= 0) return "판매하지 않음"; + if (BoughtToday(d, chestId, currency, nowUtc)) return "오늘은 이미 구매했습니다(매일 갱신)"; if (currency == "gold") { if (d.gold < price) return "골드 부족 " + d.gold.ToString("N0") + " / " + price.ToString("N0"); @@ -299,6 +366,9 @@ namespace TKS.OutGame d.inv.chestPoints -= price; } Counts.Add(d.inv.chests, chestId, 1); + string day = EconomyRules.DayKey(nowUtc); + if (d.chestBuys == null || d.chestBuys.week != day) d.chestBuys = new ShopBuys { week = day }; + Counts.Add(d.chestBuys.bought, chestId + ":" + currency, 1); return null; } diff --git a/Assets/Scripts/OutGame/Treasure/TreasureScreen.cs b/Assets/Scripts/OutGame/Treasure/TreasureScreen.cs index 919f48df..ac876bde 100644 --- a/Assets/Scripts/OutGame/Treasure/TreasureScreen.cs +++ b/Assets/Scripts/OutGame/Treasure/TreasureScreen.cs @@ -973,20 +973,8 @@ namespace TKS.OutGame UiKit.Border(banner, new Color(0.25f, 0.2f, 0.18f), 4f); UiKit.Title(UiKit.Label(banner.transform, c.nameKo, 60, UiKit.White, TextAnchor.MiddleCenter, new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(0f, -40f), new Vector2(520f, 90f)), true); UiKit.Icon(banner.transform, "chest_" + c.id, new Vector2(0f, 1f), new Vector2(0.5f, 0.5f), new Vector2(10f, -10f), 150f); - int line = 0; - for (int i = 0; i < ChestDb.ProbGrades.Length; i++) - { - if (c.p[i] <= 0f) continue; - var chip = UiKit.Box("P" + i, banner.transform, new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(0f, -150f - line * 62f), new Vector2(360f, 54f), GradeColor(ChestDb.ProbGrades[i])); - UiKit.FillLabel(chip.transform, TreasureRules.GradeKo(ChestDb.ProbGrades[i]) + " " + (c.p[i] * 100f).ToString("0.#") + " %", 30, UiKit.White); - line++; - } - var extra = new List(); - if (c.goldMax > 0) extra.Add("골드 " + c.goldMin + "~" + c.goldMax); - if (c.gemMax > 0) extra.Add("보옥 " + c.gemMin + "~" + c.gemMax); - if (c.ironMax > 0) extra.Add("운철 " + c.ironMin + "~" + c.ironMax); - extra.Add("포인트 +" + c.points); - UiKit.Label(banner.transform, string.Join(" · ", extra.ToArray()), 26, UiKit.White, TextAnchor.MiddleCenter, new Vector2(0.5f, 0f), new Vector2(0.5f, 0f), new Vector2(0f, 18f), new Vector2(540f, 50f), false); + LootChips(banner.transform, c.id, 280f, 150f, 520f); + UiKit.Label(banner.transform, LootLine(c), 26, UiKit.White, TextAnchor.MiddleCenter, new Vector2(0.5f, 0f), new Vector2(0.5f, 0f), new Vector2(0f, 18f), new Vector2(540f, 50f), false); UiKit.Btn("Prev", p, "◁", 70, new Color(0f, 0f, 0f, 0f), UiKit.Ink, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(40f, -360f), new Vector2(120f, 140f), () => Step(-1)); UiKit.Btn("Next", p, "▷", 70, new Color(0f, 0f, 0f, 0f), UiKit.Ink, new Vector2(1f, 1f), new Vector2(1f, 1f), new Vector2(-40f, -360f), new Vector2(120f, 140f), () => Step(1)); @@ -1073,27 +1061,11 @@ namespace TKS.OutGame // 이름 · 확률 칩 · 내용물 줄(금 바닥 위 = 외곽선 글자) var name = UiKit.Title(UiKit.Label(p, c.nameKo, 56, UiKit.White, TextAnchor.MiddleCenter, new Vector2(0f, 1f), new Vector2(0.5f, 0.5f), new Vector2(at.x, -rowY("name", sy - 210f)), new Vector2(700f, 80f)), true); name.horizontalOverflow = HorizontalWrapMode.Overflow; - var probs = new List(); - for (int i = 0; i < ChestDb.ProbGrades.Length; i++) - if (c.p[i] > 0f) probs.Add(i); - const float Pw = 178f, Pg = 14f; + // 내용 칩 = 그 상자의 내용 줄마다(열면 그 가운데 하나 · PD 2026-11-24) — 두 줄이 되면 아래 줄들(내용물 줄 · 열기 · 안내)을 그만큼 내린다 float py = rowY("probs", sy + 440f); - float px = at.x - (probs.Count * Pw + (probs.Count - 1) * Pg) * 0.5f; - for (int k = 0; k < probs.Count; k++) - { - int i = probs[k]; - string g = ChestDb.ProbGrades[i]; - var chip = UiKit.Skin(UiKit.At(p, "P" + i, px + k * (Pw + Pg), py - 30f, Pw, 60f), "para_orange", GradeColor(g)); - var ct = UiKit.Title(UiKit.FillLabel(chip.transform, TreasureRules.GradeKo(g) + " " + (c.p[i] * 100f).ToString("0.#") + "%", 30, UiKit.White), true); - ct.horizontalOverflow = HorizontalWrapMode.Overflow; - } - var extra = new List(); - if (c.goldMax > 0) extra.Add("골드 " + c.goldMin + "~" + c.goldMax); - if (c.gemMax > 0) extra.Add("보옥 " + c.gemMin + "~" + c.gemMax); - if (c.ironMax > 0) extra.Add("운철 " + c.ironMin + "~" + c.ironMax); - extra.Add("포인트 +" + c.points); - var eb = UiKit.Skin(UiKit.Rect("ExtraBand", p, new Vector2(0f, 1f), new Vector2(0.5f, 0.5f), new Vector2(at.x, -rowY("extra", sy + 500f)), new Vector2(720f, 52f)), "chip", UiKit.Col("chip_dark", UiKit.Dark)); - var et = UiKit.Title(UiKit.FillLabel(eb.transform, string.Join(" · ", extra.ToArray()), 26, UiKit.White, TextAnchor.MiddleCenter, true, 16f), true); + float push = Mathf.Max(0f, LootChips(p, c.id, at.x, py - LootH * 0.5f, 1000f) - LootH); + var eb = UiKit.Skin(UiKit.Rect("ExtraBand", p, new Vector2(0f, 1f), new Vector2(0.5f, 0.5f), new Vector2(at.x, -rowY("extra", sy + 500f) - push), new Vector2(720f, 52f)), "chip", UiKit.Col("chip_dark", UiKit.Dark)); + var et = UiKit.Title(UiKit.FillLabel(eb.transform, LootLine(c), 26, UiKit.White, TextAnchor.MiddleCenter, true, 16f), true); et.horizontalOverflow = HorizontalWrapMode.Overflow; // 좌우 화살표(상자 높이) @@ -1104,7 +1076,7 @@ namespace TKS.OutGame Arrow(p, "Next", "arrow_next", 1080f - ax - 100f, ay - 70f, () => Step(1)); // 열기(받침대 위 상자가 흔들린 뒤 결과) · 안내 - float oy = rowY("open", sy + 540f); + float oy = rowY("open", sy + 540f) + push; int batch = Mathf.Min(count, BatchMax); if (batch >= 2) { @@ -1121,8 +1093,9 @@ namespace TKS.OutGame open.interactable = count > 0; if (count > 0) UiKit.BtnCost(open, "chest_" + c.id, "x" + count, 56f, 34); } - var note = UiKit.Title(UiKit.Label(p, "상자는 이 탭에서만 엽니다 · 중복 = 조각 · 천기 = 적장 토벌 전용", 26, UiKit.White, TextAnchor.MiddleCenter, new Vector2(0.5f, 1f), new Vector2(0.5f, 0.5f), new Vector2(0f, -rowY("note", sy + 690f)), new Vector2(1000f, 44f), false), true); + var note = UiKit.Title(UiKit.Label(p, "상자는 이 탭에서만 엽니다 · 중복 = 조각 · 천기 = 적장 토벌 전용", 26, UiKit.White, TextAnchor.MiddleCenter, new Vector2(0.5f, 1f), new Vector2(0.5f, 0.5f), new Vector2(0f, -rowY("note", sy + 690f) - push), new Vector2(1000f, 44f), false), true); note.horizontalOverflow = HorizontalWrapMode.Overflow; + PickButton(p, 1080f - 24f - PickW, rowY("name", sy - 210f) - PickH * 0.5f); ChestRow(p, UiKit.White); } @@ -1237,30 +1210,14 @@ namespace TKS.OutGame } var ci = UiKit.Icon(card, "chest_" + c.id, new Vector2(0.5f, 1f), new Vector2(0.5f, 0.5f), new Vector2(0f, -320f), 320f); if (ci != null) UiKit.DropShadow(ci, 8f); - var probs = new List(); - for (int i = 0; i < ChestDb.ProbGrades.Length; i++) - if (c.p[i] > 0f) probs.Add(i); - const float Pw = 178f, Pg = 14f; - float px = (Cw - probs.Count * Pw - (probs.Count - 1) * Pg) * 0.5f; - for (int k = 0; k < probs.Count; k++) - { - int i = probs[k]; - string g = ChestDb.ProbGrades[i]; - var chip = UiKit.Skin(UiKit.At(card, "P" + i, px + k * (Pw + Pg), 528f, Pw, 60f), "para_orange", GradeColor(g)); - var ct = UiKit.Title(UiKit.FillLabel(chip.transform, TreasureRules.GradeKo(g) + " " + (c.p[i] * 100f).ToString("0.#") + "%", 30, UiKit.White), true); - ct.horizontalOverflow = HorizontalWrapMode.Overflow; - } - var extra = new List(); - if (c.goldMax > 0) extra.Add("골드 " + c.goldMin + "~" + c.goldMax); - if (c.gemMax > 0) extra.Add("보옥 " + c.gemMin + "~" + c.gemMax); - if (c.ironMax > 0) extra.Add("운철 " + c.ironMin + "~" + c.ironMax); - extra.Add("포인트 +" + c.points); + LootChips(card, c.id, Cw * 0.5f, 528f, Cw - 40f); // 내용물 줄 = 카드 아래 어두운 띠 위 흰 글자(검수2 결함 10) var eb = UiKit.Layer(card, "ExtraBand", "card_bottom", UiKit.Col("card_bottom", UiKit.Dark), 6f, 0f, 6f, 6f); eb.rectTransform.anchorMax = new Vector2(1f, 0f); eb.rectTransform.offsetMax = new Vector2(-6f, 76f); - var et = UiKit.Title(UiKit.FillLabel(eb.transform, string.Join(" · ", extra.ToArray()), 26, UiKit.White, TextAnchor.MiddleCenter, true, 16f), true); + var et = UiKit.Title(UiKit.FillLabel(eb.transform, LootLine(c), 26, UiKit.White, TextAnchor.MiddleCenter, true, 16f), true); et.horizontalOverflow = HorizontalWrapMode.Overflow; + PickButton(p, 1080f - 24f - PickW, Cy + 8f); // 좌우 화살표(카드 가운데 높이) Arrow(p, "Prev", "arrow_prev", 30f, Cy + Ch * 0.5f - 70f, () => Step(-1)); @@ -1391,15 +1348,100 @@ namespace TKS.OutGame Root.Toast("상자 없음"); return; } - if (list.Count == 1) ShowOpenOne(id, list[0]); - else ShowOpenMany(id, list, n); + // 고르는 줄(명장 상자의 진영 비서)이 나왔으면 결과보다 먼저 진영을 고른다 — 1개 = 바로 · 일괄 = 보관한 것(SaveData.picks)을 차례로(PD 2026-11-24 · 탑의 「받을 때 고르는 보상」과 같은 방식) + var keys = new List(); + foreach (var r in list) + foreach (var h in r.held) + if (!keys.Contains(h.key)) keys.Add(h.key); + var picked = new List(); + System.Action show = () => + { + int left = 0; + foreach (var k in keys) left += Counts.Get(S.Save.picks, k); + if (list.Count == 1) ShowOpenOne(id, list[0], picked); + else ShowOpenMany(id, list, n, picked); + if (left > 0) Root.Toast("고르지 않은 보상 " + left + "개는 보관했습니다 · 이 화면의 「선택 보상」에서 받기"); + if (keys.Count > 0) Refresh(); // 상자 화면의 「선택 보상」 버튼 · 보유 수 + }; + LastOpenPicks = keys.Count; + if (keys.Count == 0) show(); + else ShopWindow.ClaimPicks(Root, show, keys, picked); + } + + /// 최근 열기에서 나온 고르는 보상 낱말 수(테스트 · 명장 상자의 진영 비서). + public int LastOpenPicks { get; private set; } + + // ---------- 상자 내용 칩 · 내용물 줄 · 선택 보상 버튼(PD 2026-11-24 「한 번에 하나」) ---------- + + const float LootH = 60f, LootGap = 14f, LootLineGap = 8f, LootMinW = 178f; + const int LootLineMax = 4; + const float PickW = 260f, PickH = 84f; + + /// 최근에 그린 상자 내용 칩 수(테스트 = 그 상자의 chest_loot 줄 수). + public int LootChipCount { get; private set; } + + /// 보관해 둔 고르는 보상이 있을 때의 「선택 보상」 버튼(없으면 null · 테스트). + public Button PickBtn { get; private set; } + + /// 글자 폭 어림(한글 = 1 em · 숫자 · 기호 = 0.56 em) — 칩 폭을 가장 긴 글자에 맞추는 데만 쓴다. + static float TextW(string s, int size) + { + float em = 0f; + foreach (var ch in s) em += ch >= 0x1100 ? 1f : 0.56f; + return em * size; + } + + /// + /// 상자 내용 칩 = 그 상자의 내용 줄(chest_loot)마다 「이름 확률%」 — 한 줄 최대 LootLineMax 칸(넘으면 줄을 고르게 나눔) · 줄마다 가운데 정렬(cx = 부모 왼쪽 위 기준 가운데 x · top = 첫 줄 위끝 · avail = 쓸 폭) · + /// 칸 폭 = 가장 긴 글자에 맞춤(최소 LootMinW · 줄 폭을 넘으면 줄이고 글자를 자동으로 줄임) · 색 = 보물 등급 줄 = 등급 색 · 그 밖 = 테마 chip_dark. 반환 = 쓴 높이. + /// + float LootChips(Transform parent, string chestId, float cx, float top, float avail) + { + var db = S.Db; + var lines = db.Goods != null ? db.Goods.LootOf(chestId) : new List(); + LootChipCount = lines.Count; + if (lines.Count == 0) return 0f; + int rows = (lines.Count + LootLineMax - 1) / LootLineMax, per = (lines.Count + rows - 1) / rows; + float want = LootMinW; + foreach (var l in lines) want = Mathf.Max(want, TextW(TreasureRules.LootChip(db, l), 30) + 44f); + float w = Mathf.Min(want, (avail - (per - 1) * LootGap) / per); + for (int i = 0; i < lines.Count; i++) + { + int row = i / per, inRow = Mathf.Min(per, lines.Count - row * per); + float x = cx - (inRow * w + (inRow - 1) * LootGap) * 0.5f + (i % per) * (w + LootGap); + string grade = GoodsRules.TreasureGrade(lines[i].item); + var rt = UiKit.At(parent, "P" + i, x, top + row * (LootH + LootLineGap), w, LootH); + var col = grade != null ? GradeColor(grade) : UiKit.Col("chip_dark", UiKit.Dark); + if (UISkin.Has("para_orange")) UiKit.Skin(rt, "para_orange", col); + else UiKit.Paint(rt, col); + var t = UiKit.Title(UiKit.FillLabel(rt, TreasureRules.LootChip(db, lines[i]), 30, UiKit.White, TextAnchor.MiddleCenter, true, 12f), true); + t.resizeTextForBestFit = true; + t.resizeTextMinSize = 18; + t.resizeTextMaxSize = 30; + } + return rows * LootH + (rows - 1) * LootLineGap; + } + + /// 내용물 줄 = 「<컨셉> 가운데 하나 · 포인트 +n」(컨셉 = chests concept_ko). + static string LootLine(ChestDb.Chest c) + { + return c.conceptKo + " 가운데 하나 · 포인트 +" + c.points; + } + + /// 고르지 않고 보관해 둔 보상(진영 비서 등 · SaveData.picks)이 있으면 「선택 보상 n」 버튼 — 누르면 차례로 골라 받는다. + void PickButton(RectTransform p, float x, float y) + { + PickBtn = null; + int picks = GoodsRules.PendingPicks(S.Save); + if (picks <= 0) return; + PickBtn = UiKit.SkinBtn(p, "Picks", "btn_l_yellow", UiKit.White, "선택 보상 " + picks, 30, UiKit.Col("text_on_yellow", UiKit.Ink), x, y, PickW, PickH, () => ShopWindow.ClaimPicks(Root, Refresh)); } /// /// 유물 결과 팝업(PD 2026-11-16 6·7차) — 제목 = 유물 이름 + 레어도(등급 색) · 안 = 보상 타일(골드 · 상자 포인트 · 운철 · 보옥 · 조각 · 보너스 상자 = 아이콘 가운데 정렬 + 아래 수량 · 다른 화면 RewardTile 과 같음) · /// 뒤 막 = 더 어둡게(표 open_dim) · 위(바깥) = 스포트라이트(빛기둥 + 바닥 웅덩이) 아래 등급 방석 위 큰 유물(OpenRelicHighlight). /// - void ShowOpenOne(string id, ChestResult r) + void ShowOpenOne(string id, ChestResult r, List picked) { var it = r.treasureId != null ? S.Db.Treasures.Get(r.treasureId) : null; var rows = TreasureScene.Scene("open"); @@ -1413,9 +1455,8 @@ namespace TKS.OutGame var panel = (RectTransform)content.parent; OpenPopupFrame(panel, rows, it != null ? relicRow : null); var tiles = new List(); - // 얻은 것 모두(PD 2026-11-24 재화 배치) = 골드 · 상자 내용 줄(운철 · 도면 · 보옥 · 진영 비서 … · 상자 자체의 보옥 · 운철과 같은 것은 합쳐 한 칸) · 상자 포인트 - tiles.Add(new[] { "cur_gold", r.gold.ToString("N0") }); - foreach (var g in OpenGains(new List { r })) tiles.Add(new[] { GoodsUi.Icon(S.Db, g), g.n.ToString("N0") }); + // 얻은 것(PD 2026-11-24 「한 번에 하나」) = 상자에서 나온 한 가지(보물은 위 유물 · 그 밖 = 골드 · 운철 · 도면 · 보옥 · 고른 진영 비서) · 상자 포인트 + foreach (var g in OpenGains(new List { r }, picked)) tiles.Add(new[] { GoodsUi.Icon(S.Db, g), g.n.ToString("N0") }); tiles.Add(new[] { "chest_point", r.points.ToString("N0") }); if (it != null && !r.isNew && r.shards > 0) tiles.Add(new[] { "cur_shard", r.shards.ToString("N0") }); if (r.bonusChests > 0) tiles.Add(new[] { "chest_" + S.Db.Economy.ChestPointReward, r.bonusChests.ToString() }); @@ -1424,16 +1465,13 @@ namespace TKS.OutGame RewardTitle(panel.parent, DomesticScene.First(rows, "title")); // 화면 맨 위 「보상」 띠(PD 10차 「1회 획득도 포함」 · 11차 「예시와 같이 배치」) } - /// 상자 결과의 골드 · 보물 밖에 얻은 것 합계 — 상자 자체의 보옥 · 운철(chests) + 내용 줄(chest_loot) · 같은 것은 한 줄. - static List OpenGains(List list) + /// 상자 결과에서 보물 밖에 얻은 것 합계 — 바로 받은 것(chest_loot · 골드 · 운철 · 도면 · 보옥 …) + 골라 받은 것(진영 비서) · 같은 것은 한 줄. + static List OpenGains(List list, List picked) { var gains = new List(); foreach (var r in list) - { - if (r.gem > 0) GoodsRules.Add(gains, "gem", r.gem, "", "gem"); - if (r.iron > 0) GoodsRules.Add(gains, "iron", r.iron, "", "iron"); if (r.extras != null) GoodsRules.AddAll(gains, r.extras); - } + if (picked != null) GoodsRules.AddAll(gains, picked); return gains; } @@ -1447,7 +1485,7 @@ namespace TKS.OutGame /// 일괄 획득 결과(PD 2026-11-16 7차 「여러 개 열면 제목 = 일괄 획득 결과 · 위 = 아이템 아이콘만 5개씩 최대 2줄 10개 · 안 = 총 골드와 상자 포인트만」) — 표 open_batch. /// 아이콘 = 스포트라이트 아래에 한 줄 i_count 개씩 · 차례로 튀어 나옴(f_phase 시간차). /// - void ShowOpenMany(string id, List list, int n) + void ShowOpenMany(string id, List list, int n, List picked) { var rows = TreasureScene.Scene("open"); var relicRow = DomesticScene.First(rows, "relic"); @@ -1458,18 +1496,22 @@ namespace TKS.OutGame new OutGameRoot.ModalButton("확인", UiKit.Dark, null)); var panel = (RectTransform)content.parent; OpenPopupFrame(panel, rows, b != null && b.x > 0f ? b : relicRow); // 팝업을 내리는 px = open_batch f_x(아이콘 + 방석 두 줄 자리) - int gold = 0, points = 0; + int points = 0, shards = 0, bonus = 0; var items = new List(); foreach (var r in list) { - gold += r.gold; points += r.points; + shards += r.shards; + bonus += r.bonusChests; var it = r.treasureId != null ? S.Db.Treasures.Get(r.treasureId) : null; if (it != null && items.Count < BatchMax) items.Add(it); } - var batch = new List { new[] { "cur_gold", gold.ToString("N0") } }; - foreach (var g in OpenGains(list)) batch.Add(new[] { GoodsUi.Icon(S.Db, g), g.n.ToString("N0") }); // 상자 내용 줄 합계(운철 · 도면 · 보옥 · 진영 비서 … · 2026-11-24) + // 안 = 상자마다 나온 한 가지의 합계(골드 · 운철 · 도면 · 보옥 · 고른 진영 비서 · 2026-11-24 「한 번에 하나」) · 상자 포인트 · 중복 조각 · 포인트 보상 상자 + var batch = new List(); + foreach (var g in OpenGains(list, picked)) batch.Add(new[] { GoodsUi.Icon(S.Db, g), g.n.ToString("N0") }); batch.Add(new[] { "chest_point", points.ToString("N0") }); + if (shards > 0) batch.Add(new[] { "cur_shard", shards.ToString("N0") }); + if (bonus > 0) batch.Add(new[] { "chest_" + S.Db.Economy.ChestPointReward, bonus.ToString() }); RewardTiles(content, batch, rows, panelH); if (items.Count == 0) return; // 여러 개 = 빛(하이라이트) 없이 아이콘마다 등급 방석(PD 2026-11-17 8차) — 칸 = 방석 폭(f_min) · 가로 간격 f_gap_min · 줄 간격 f_gap_max · 아이콘 f_w diff --git a/Assets/Scripts/OutGame/UI/OutGameRoot.cs b/Assets/Scripts/OutGame/UI/OutGameRoot.cs index a474a26f..e2e14644 100644 --- a/Assets/Scripts/OutGame/UI/OutGameRoot.cs +++ b/Assets/Scripts/OutGame/UI/OutGameRoot.cs @@ -21,6 +21,8 @@ namespace TKS.OutGame public abstract void Build(); public virtual void Refresh() { } public virtual void OnShow() { } + /// 보이는 동안 0.5 초마다(남은 시간 글자처럼 값만 바뀌는 것 · 다시 그리지 않고 글자만 고친다). + public virtual void OnTick() { } /// 뒤로 가기를 화면 안에서 처리했으면 true. public virtual bool OnBack() { return false; } /// 자기 하단 탭을 쓰는 화면(메인 하단 탭을 끔 · 이벤트). @@ -113,8 +115,11 @@ namespace TKS.OutGame RectTransform tabBar; /// 임무(일일 · 주간 · 업적 · 2026-11-20). public MissionScreen Missions { get; private set; } + /// 공방(채굴 · 제작 · 하단 탭 5번 · PD 2026-11-24). + public WorkshopScreen Workshop { get; private set; } readonly List screens = new List(); OutGameScreen current; + Image workshopDot; RectTransform barRoot; Text goldText; @@ -269,6 +274,7 @@ namespace TKS.OutGame Arena = Add(new ArenaScreen()); Events = Add(new EventScreen()); Missions = Add(new MissionScreen()); + Workshop = Add(new WorkshopScreen()); BuildTabBar(); BuildCurrencyBar(); result = new BattleResultPanel(this, (RectTransform)resultCanvas.transform); @@ -412,6 +418,7 @@ namespace TKS.OutGame nextTick = Time.unscaledTime + 0.5f; Session.TickStamina(); RefreshBar(); + if (current != null && ScreensVisible && !inBattle) current.OnTick(); } if (toast != null && Time.unscaledTime > toastUntil) toast.SetActive(false); if (Input.GetKeyDown(KeyCode.Escape) && !inBattle) Back(); @@ -516,6 +523,12 @@ namespace TKS.OutGame staminaText.text = d.stamina + "/" + EconomyRules.StaminaMax(Session.Db, d); int left = Session.StaminaSecondsToNext(); staminaTimer.text = left > 0 ? (left / 60).ToString("00") + ":" + (left % 60).ToString("00") : UISkin.Icon("cur_stamina") != null ? "" : "군량"; + if (workshopDot != null) + { + bool news = current != Workshop && WorkshopRules.HasNews(Session.Db, d, Session.Now); // 공방 안에서는 끔(고른 탭 = 붉은 명패라 안 보임 · 안에서는 위 탭의 점이 알림) + if (workshopDot.gameObject.activeSelf != news) workshopDot.gameObject.SetActive(news); + if (news) workshopDot.transform.SetAsLastSibling(); // 아이콘 · 글자 · 명패 위에 + } } // ---------- 하단 탭 ---------- @@ -548,9 +561,11 @@ namespace TKS.OutGame bar.offsetMax = new Vector2(0f, TabBarH); if (UISkin.Has("tabbar")) UiKit.Skin(bar, "tabbar", UiKit.Col("chrome_tab", UiKit.BarColor), true); else UiKit.Paint(bar, UiKit.Dark, false, true); - string[] names = { "영웅", "보물", "내정", "동맹", "거래" }; - string[] marks = { "영", "보", "내", "잠", "거" }; - string[] icons = { "tab_hero", "tab_treasure", "tab_domestic", "tab_alliance", "tab_trade" }; + // 탭 번호 = 이 배열의 자리(화면 Tab · OnTab) — 공방 = 5번(PD 2026-11-24) · 놓는 순서는 order(공방 = 내정과 거래 사이 · 번호는 그대로) + string[] names = { "영웅", "보물", "내정", "동맹", "거래", "공방" }; + string[] marks = { "영", "보", "내", "잠", "거", "공" }; + string[] icons = { "tab_hero", "tab_treasure", "tab_domestic", "tab_alliance", "tab_trade", "tab_workshop" }; + int[] order = { 0, 1, 2, WorkshopScreen.TabId, 3, 4 }; Color off = UISkin.Col("bar_text_off", new Color(0.62f, 0.58f, 0.55f)); tabOffText = off; // 숨길 탭(표 UI/menu_hidden · tab = 탭 번호 · PD 2026-11-19 동맹 숨김) → 남은 탭이 폭을 고르게 나눔 · 탭 번호(화면 Tab)는 그대로 @@ -562,9 +577,10 @@ namespace TKS.OutGame int hi; if (int.TryParse(v.Trim(), out hi)) hidden.Add(hi); } - int shown = 0, slot = 0; - for (int i = 0; i < names.Length; i++) - if (!hidden.Contains(i)) shown++; + int shown = 0; + var slotOf = new Dictionary(); + foreach (int i in order) + if (!hidden.Contains(i)) slotOf[i] = shown++; // 칸 줄 = 띠 양끝 금 마개 안쪽(PD 2026-11-20 재설계 · Fable QA r1 F5 = 고른 명패가 띠 금테와 겹침) var row = UiKit.Rect("Cells", bar, Vector2.zero, Vector2.zero, Vector2.zero, Vector2.zero); float inset = GrowthUi.At(GrowthUi.L("tab_focus"), 4, 0f); @@ -576,7 +592,7 @@ namespace TKS.OutGame { int k = i; var cell = UiKit.Rect("Tab" + i, row, new Vector2(0f, 0f), new Vector2(0f, 0f), Vector2.zero, Vector2.zero); - int at = hidden.Contains(i) ? slot : slot++; + int at = slotOf.ContainsKey(i) ? slotOf[i] : 0; cell.anchorMin = new Vector2(at / (float)Mathf.Max(1, shown), 0f); cell.anchorMax = new Vector2((at + 1) / (float)Mathf.Max(1, shown), 1f); cell.offsetMin = cell.offsetMax = Vector2.zero; @@ -586,6 +602,13 @@ namespace TKS.OutGame var btn = cell.gameObject.AddComponent