ThreeKingdomsSlingshot/Assets/Scripts/OutGame/Data/AwakenDb.cs

229 lines
6.6 KiB
C#
Raw Normal View History

성장 · 임무 · 출정 · 외형 · 정보 일괄 — 임무(미션) 메뉴 · 영웅 각성 · 진화(진영 비서) · 스킬 강화(영웅 조각 + 만능 조각) · 각성 칸 = 승급 장비 등급 · 장비 등급 7(불멸 red · 신화 rainbow) · 병종 장비 210 · 장별 드랍 · 영웅 Lv100 · 출정 = 로비 편성(학습 판 = 연의 전기만) · 보스 말풍선만 · 1장 레벨디자인 · 외형(코스튬) 꾸미기 레이어 · 영웅 정보(능력치 · 열전) - 임무: 일일 · 주간 · 업적 · 카운터 36 · 우편 · 로비 버튼(MissionTests) - 각성 · 진화: 표 11장 · 진화 = ★ 최대 레벨 + 진영 비서 + 골드 · 비서 교환 · 각성 굴림 · 잠금 · 칸 = 승급 장비 등급(AwakenTests) - 스킬 강화: skill_upgrade · skill_config(최고 Lv10 · 상한 = 영웅 레벨 10 단위) · 만능 조각 확인 팝업 - 장비: gear_grades · gear_kinds · gear_drop_chapters · gear_drop_stages · 승급 7단계 · 무지개 7색 순환(UiRainbow) · TKS/Import Gear(GearTests) - 출정: 학습 판 = 연의 전기 서장만(WantsTutorialPlan) · boss_intro_config talk_main · 1장 표 · 1-4 가시덤불 정정(MainStageTests · TutorialTests [Ignore]) - 외형: 부위 4(외형 = 추후) · 꾸미기 9 · 기준점 · 알파 경계 · 전투 · UI 레이어 · 미리보기 · 상세(CostumeTests) - 정보: 능력치(기본 + 성장 = 합계 · HeroRules 그대로) · 전투 능력치 7 · 성장 내역 · 내역 창 · 열전(HeroInfoTests) - 같은 작업 트리의 다른 세션 미커밋 변경(스킬 이펙트 · 전투 해석기 · 보급전 표 · 스킬 표 등)은 넣지 않음 PD 2026-11-20 「지금까지 본 PC에서 구현된 모든 성장 관련 기능을 다른 세션에서 확인할 수 있도록 푸시까지 진행해」 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 03:15:36 +00:00
using System;
using System.Collections.Generic;
using System.Globalization;
using UnityEngine;
namespace TKS.OutGame
{
/// <summary>
/// 각성 · 진화 · 스킬 강화 표 10장(2026-11-20 요청서 §1 · §5 2차 · 기획 tables/ 사본) — awaken_config · awaken_cost · awaken_grades · awaken_stats · awaken_slots ·
/// evolve_config · evolve_items · goods_awaken_evolve · skill_upgrade · skill_config.
/// ★ 별 재료 · 최대 레벨 = evolve_stars → EvolveTable · 각성 칸 = awaken_slots(승급 장비 등급). 임포트 = TKS/Import Awaken(또는 전체) → Resources/OutGame/AwakenDb.asset · 값은 전부 표(C45).
/// </summary>
public class AwakenDb : ScriptableObject
{
[Serializable]
public class KV
{
public string key = "";
public string value = "";
}
[Serializable]
public class Cost
{
public int locks;
public int stone;
}
[Serializable]
public class Grade
{
public string grade = "";
public int order;
public float weight;
public string color = "";
public string nameKo = "";
}
[Serializable]
public class Stat
{
public string stat = "";
public string nameKo = "";
public string unit = "";
public float weight;
[Tooltip("등급 순서(n_order) 별 최소 · 최대")]
public float[] min = new float[0];
public float[] max = new float[0];
}
[Serializable]
public class Item
{
public int id;
public string key = "";
public string nameKo = "";
public string faction = "";
public int tier;
public int priceShard;
public int pricePoint;
public int weekLimit;
}
[Serializable]
public class Good
{
public int id;
public string key = "";
public string nameKo = "";
public string kind = "";
public string wallet = "";
}
/// <summary>각성 칸 1줄(awaken_slots · 2차) — 승급 장비 6칸을 모두 gearGrade 장비로 채우면 열림 · 빈 값 = 열리지 않음.</summary>
[Serializable]
public class Slot
{
public int slot;
public string gearGrade = "";
public string nameKo = "";
}
/// <summary>스킬 강화 1단계(skill_upgrade · 2차) — from → to · 그 영웅 조각 수 · 필요한 영웅 레벨.</summary>
[Serializable]
public class SkillStep
{
public int from;
public int to;
public int shard;
public int needHeroLv;
}
public List<KV> config = new List<KV>();
public List<KV> evolveConfig = new List<KV>();
public List<KV> skillConfig = new List<KV>();
public List<Cost> costs = new List<Cost>();
public List<Grade> grades = new List<Grade>();
public List<Stat> stats = new List<Stat>();
public List<Item> items = new List<Item>();
public List<Good> goods = new List<Good>();
public List<Slot> slots = new List<Slot>();
public List<SkillStep> skillSteps = new List<SkillStep>();
static string Find(List<KV> l, string key)
{
foreach (var c in l)
if (c.key == key) return c.value;
return "";
}
public string Cfg(string key)
{
return Find(config, key);
}
public string EvCfg(string key)
{
return Find(evolveConfig, key);
}
public string SkCfg(string key)
{
return Find(skillConfig, key);
}
/// <summary>스킬 lv → lv+1 단계(없으면 null = 최고).</summary>
public SkillStep StepTo(int lv)
{
foreach (var s in skillSteps)
if (s.to == lv) return s;
return null;
}
/// <summary>만능 조각 키(skill_config substitute = goods s_key).</summary>
public string UnivKey
{
get { return SkCfg("substitute"); }
}
public static int ToInt(string s)
{
int v;
return int.TryParse(s, NumberStyles.Integer, CultureInfo.InvariantCulture, out v) ? v : 0;
}
/// <summary>각성 재화 키(awaken_config currency = goods 의 s_key).</summary>
public string StoneKey
{
get { return Cfg("currency"); }
}
/// <summary>등용 포인트 키(goods e_kind Point 의 s_key).</summary>
public string PointKey
{
get
{
foreach (var g in goods)
if (g.kind == "Point") return g.key;
return "";
}
}
public int CostFor(int locks)
{
foreach (var c in costs)
if (c.locks == locks) return c.stone;
return -1;
}
public Grade GradeOf(string g)
{
foreach (var x in grades)
if (x.grade == g) return x;
return null;
}
public Stat StatOf(string s)
{
foreach (var x in stats)
if (x.stat == s) return x;
return null;
}
public Item ItemOf(string faction, int tier)
{
foreach (var x in items)
if (x.faction == faction && x.tier == tier) return x;
return null;
}
public Item ItemByKey(string key)
{
foreach (var x in items)
if (x.key == key) return x;
return null;
}
public Good GoodOf(string key)
{
foreach (var g in goods)
if (g.key == key) return g;
return null;
}
/// <summary>등급 가중치 합(확률 % = 가중치 / 합).</summary>
public float GradeWeightSum
{
get
{
float s = 0f;
foreach (var g in grades) s += g.weight;
return s;
}
}
/// <summary>진영 순서(evolve_items 첫 등장 순 = 촉 · 위 · 오 · 군웅).</summary>
public List<string> Factions
{
get
{
var l = new List<string>();
foreach (var x in items)
if (!l.Contains(x.faction)) l.Add(x.faction);
return l;
}
}
}
}