using System;
using System.Collections.Generic;
using UnityEngine;
namespace TKS.OutGame
{
/// 영웅·유닛 뽑기(gacha.csv key,value + gacha_pool.csv · 기획서 §4). 병사 유닛 = ★ 풀(§4).
public class GachaConfig : ScriptableObject
{
[Serializable]
public class PoolEntry
{
public string heroId;
public bool inPool = true;
public bool pickup;
}
public KeyValueList values = new KeyValueList();
public List pool = new List();
public int CostSingle { get { return values.I("cost_single"); } }
public int CostTen { get { return values.I("cost_ten"); } }
public int Pity { get { return values.I("pity"); } }
public float PickupShare { get { return values.F("pickup_share"); } }
public bool FreeFirstTen { get { return values.I("free_first_ten") > 0; } }
public int TenCount { get { return values.I("ten_count"); } }
public int TenGuaranteeRarity { get { return values.I("ten_guarantee_rarity"); } }
/// 희귀도 등급(1~3) 확률 p_r1~p_r3.
public float P(int rarity)
{
return values.F("p_r" + rarity);
}
public static readonly string[] RequiredKeys =
{
"cost_single", "cost_ten", "p_r3", "p_r2", "p_r1", "pity", "pickup_share", "free_first_ten", "ten_count", "ten_guarantee_rarity",
};
}
}