47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace TKS.OutGame
|
|
{
|
|
/// <summary>일일 던전(dungeons.csv · 기획서 §9 · S13) — 요일 · 하루 입장 수 · 적 템플릿 + hp 배율 · 보상 종류(gold|gear|iron|skill_book|shards)와 수량(reward_amount · C 단계 추가 열).</summary>
|
|
public class DungeonDb : ScriptableObject
|
|
{
|
|
public static readonly string[] Weekdays = { "sun", "mon", "tue", "wed", "thu", "fri", "sat" }; // DayOfWeek 순서
|
|
public static readonly string[] RewardKinds = { "gold", "gear", "iron", "skill_book", "shards" };
|
|
|
|
[Serializable]
|
|
public class Dungeon
|
|
{
|
|
public string id;
|
|
public string nameKo;
|
|
public List<string> rewardKinds = new List<string>();
|
|
public List<string> weekdays = new List<string>();
|
|
public int entriesPerDay;
|
|
public string templateStage;
|
|
public float hpMult = 1f;
|
|
public List<int> rewardAmounts = new List<int>();
|
|
|
|
public bool OpenOn(DayOfWeek d)
|
|
{
|
|
return weekdays.Contains(Weekdays[(int)d]);
|
|
}
|
|
|
|
public int Amount(string kind)
|
|
{
|
|
int i = rewardKinds.IndexOf(kind);
|
|
return i >= 0 && i < rewardAmounts.Count ? rewardAmounts[i] : 0;
|
|
}
|
|
}
|
|
|
|
public List<Dungeon> dungeons = new List<Dungeon>();
|
|
|
|
public Dungeon Get(string id)
|
|
{
|
|
foreach (var d in dungeons)
|
|
if (d.id == id) return d;
|
|
return null;
|
|
}
|
|
}
|
|
}
|