49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace TKS.OutGame
|
||
|
|
{
|
||
|
|
/// <summary>보물 세트(treasure_sets.csv · 기획서 §8) — 세트당 단계 행(set = 전원 보유 · Nstar = 전원 ★N 이상) · 효과 hp_pct|atk_pct|def_pct.</summary>
|
||
|
|
public class TreasureSetDb : ScriptableObject
|
||
|
|
{
|
||
|
|
[Serializable]
|
||
|
|
public class Tier
|
||
|
|
{
|
||
|
|
public string setId;
|
||
|
|
public string nameKo;
|
||
|
|
public List<string> members = new List<string>();
|
||
|
|
[Tooltip("set | 3star | 6star | 10star")]
|
||
|
|
public string tierCond;
|
||
|
|
[Tooltip("tier_cond 의 ★ 수(set = 0)")]
|
||
|
|
public int stars;
|
||
|
|
public string effectKey;
|
||
|
|
public float pct;
|
||
|
|
}
|
||
|
|
|
||
|
|
public List<Tier> tiers = new List<Tier>();
|
||
|
|
|
||
|
|
/// <summary>세트 id 순서(표에 처음 나온 순서).</summary>
|
||
|
|
public List<string> SetIds
|
||
|
|
{
|
||
|
|
get
|
||
|
|
{
|
||
|
|
var l = new List<string>();
|
||
|
|
foreach (var t in tiers)
|
||
|
|
if (!l.Contains(t.setId)) l.Add(t.setId);
|
||
|
|
return l;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>세트의 단계 행(★ 낮은 순).</summary>
|
||
|
|
public List<Tier> TiersOf(string setId)
|
||
|
|
{
|
||
|
|
var l = new List<Tier>();
|
||
|
|
foreach (var t in tiers)
|
||
|
|
if (t.setId == setId) l.Add(t);
|
||
|
|
l.Sort((a, b) => a.stars.CompareTo(b.stars));
|
||
|
|
return l;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|