using System; using System.Collections.Generic; using UnityEngine; namespace TKS.OutGame { /// 내정 순찰(patrol.csv · 기획서 §7) — 마지막 클리어 챕터별 시간당 골드 · 병사 경험 · 승급 장비 등급 · 청동 상자 수. public class PatrolTable : ScriptableObject { [Serializable] public class Row { public int chapter; public int goldPerHour; public int expPerHour; public string gearGrade; public float chestPerHour; } public List rows = new List(); /// 챕터 no 의 행(없으면 가장 가까운 아래 챕터 · 그것도 없으면 첫 행). public Row For(int chapter) { Row best = null; foreach (var r in rows) if (r.chapter <= chapter && (best == null || r.chapter > best.chapter)) best = r; return best ?? (rows.Count > 0 ? rows[0] : null); } } }