36 lines
1.4 KiB
C#
36 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace TKS.OutGame
|
|
{
|
|
/// <summary>내정 순찰(patrol.csv · 기획서 §7) — 마지막 클리어 챕터별 시간당 골드 · 병사 경험 · 승급 장비 등급 · 구리 상자 수.</summary>
|
|
public class PatrolTable : ScriptableObject
|
|
{
|
|
[Serializable]
|
|
public class Row
|
|
{
|
|
public int chapter;
|
|
public int goldPerHour;
|
|
public int expPerHour;
|
|
[Tooltip("가장 잘 나오는 장비 등급(l_gear_weight 가 가장 큰 것 · 화면 그림 · 임포터가 채운다)")]
|
|
public string gearGrade;
|
|
[Tooltip("순찰 장비 등급과 가중치(patrol.csv l_gear_grade · l_gear_weight · PD 2026-11-24 「10장 기준 확률에 따라 최대 전설까지」)")]
|
|
public string[] gearGrades = new string[0];
|
|
public float[] gearWeights = new float[0];
|
|
public float chestPerHour;
|
|
}
|
|
|
|
public List<Row> rows = new List<Row>();
|
|
|
|
/// <summary>챕터 no 의 행(없으면 가장 가까운 아래 챕터 · 그것도 없으면 첫 행).</summary>
|
|
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);
|
|
}
|
|
}
|
|
}
|