49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace TKS.OutGame
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// 보물 수집품(treasures.csv · 기획서 §8 · S8) — 등급 · 세트 · 기본 효과(base_stat % · ★ 강화로 커짐) · 조건 효과(cond_key 카운터 cond_every 마다 cond_pct · 최대 cond_max 번) · 중복 조각.
|
||
|
|
/// </summary>
|
||
|
|
public class TreasureDb : ScriptableObject
|
||
|
|
{
|
||
|
|
public static readonly string[] BaseStats = { "hp", "atk", "def", "crit", "range", "splash" };
|
||
|
|
|
||
|
|
[Serializable]
|
||
|
|
public class Item
|
||
|
|
{
|
||
|
|
public string id;
|
||
|
|
public string nameKo;
|
||
|
|
public string grade;
|
||
|
|
public string setId;
|
||
|
|
public string baseStat;
|
||
|
|
public float basePct;
|
||
|
|
public string condKey;
|
||
|
|
public int condEvery;
|
||
|
|
public float condPct;
|
||
|
|
public int condMax;
|
||
|
|
public int starMax;
|
||
|
|
public int shardsDup;
|
||
|
|
}
|
||
|
|
|
||
|
|
public List<Item> items = new List<Item>();
|
||
|
|
|
||
|
|
public Item Get(string id)
|
||
|
|
{
|
||
|
|
foreach (var t in items)
|
||
|
|
if (t.id == id) return t;
|
||
|
|
return null;
|
||
|
|
}
|
||
|
|
|
||
|
|
public List<Item> OfGrade(string grade)
|
||
|
|
{
|
||
|
|
var l = new List<Item>();
|
||
|
|
foreach (var t in items)
|
||
|
|
if (t.grade == grade) l.Add(t);
|
||
|
|
return l;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|