45 lines
1.6 KiB
C#
45 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace TKS.OutGame
|
|
{
|
|
/// <summary>
|
|
/// 보물 상자(chests.csv · 기획서 §8 · S8·S15) — 상자 포인트 · 컨셉(무엇이 나오는 상자인가 · 화면 글자) · 획득처 ·
|
|
/// 거래 구매 가격(buy_gold · buy_gem · buy_points · 0 = 판매 안 함 · C 단계 추가 열).
|
|
/// 내용물 = chest_loot.csv(GoodsDb.chestLoots) — 상자 1개를 열면 그 상자의 줄 가운데 하나만(PD 2026-11-24 「한 번에 하나」).
|
|
/// </summary>
|
|
public class ChestDb : ScriptableObject
|
|
{
|
|
/// <summary>상자에서 나오는 보물 등급 순서(chest_loot 낱말 treasure_<등급> · 내정 「상위 확률」 = 이 순서의 다음 등급 · 천기 = 적장 토벌 전용이라 없음).</summary>
|
|
public static readonly string[] ProbGrades = { "rare", "epic", "legend", "myth" };
|
|
|
|
[Serializable]
|
|
public class Chest
|
|
{
|
|
public string id;
|
|
public string nameKo;
|
|
public string conceptKo;
|
|
public int points;
|
|
public string source;
|
|
public int buyGold, buyGem, buyPoints;
|
|
}
|
|
|
|
public List<Chest> chests = new List<Chest>();
|
|
|
|
public Chest Get(string id)
|
|
{
|
|
foreach (var c in chests)
|
|
if (c.id == id) return c;
|
|
return null;
|
|
}
|
|
|
|
public int IndexOf(string id)
|
|
{
|
|
for (int i = 0; i < chests.Count; i++)
|
|
if (chests[i].id == id) return i;
|
|
return -1;
|
|
}
|
|
}
|
|
}
|