Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/CardSetNameMgr.cs
gamer147 0d9d8acae0 feat(battle-engine): M1 auto-copy closure (782 battle-logic files)
Compile-driven bulk-copy loop (tools/engine-port/m1_copy_loop.py) pulled the precise reference closure of the battle-core roots, stopping at the classify god-object/View-VFX-UI boundary. 782 files; no re-explosion (M0 had estimated ~order 1000). Residual frontier = 52 shim-classified + 80 external (Unity/BCL) types to author next.
2026-06-05 16:57:20 -04:00

106 lines
2.0 KiB
C#

using System.Collections.Generic;
namespace Wizard;
public class CardSetNameMgr
{
public const int BASIC_CARD_SET_ID = 10000;
private const int MIN_STANDARD_PACK_ID = 10001;
private const int MAX_STANDARD_PACK_ID = 14999;
private const int MIN_COLLABO_PACK_ID = 20001;
private const int MAX_COLLABO_PACK_ID = 24999;
private const int TOKEN_CARD_SET_ID = 90000;
public const int SPECIAL_CARD_PACK_ID = 90002;
private const int MIN_PRIZE_SET_ID = 70000;
private const int MAX_PRIZE_SET_ID = 79999;
private List<CardSetName> _list = new List<CardSetName>();
private List<CardSetName> _listBasicAndPack;
public static bool IsPrizeSetId(int setId)
{
if (70000 <= setId)
{
return setId <= 79999;
}
return false;
}
public static bool IsBasicSetId(int setId)
{
return setId == 10000;
}
public static bool IsStandardPackSetId(int setId)
{
if (10001 <= setId)
{
return setId <= 14999;
}
return false;
}
public static bool IsTokenSetId(int setId)
{
return setId == 90000;
}
public static bool IsCollaboSetId(int setId)
{
if (20001 <= setId)
{
return setId <= 24999;
}
return false;
}
public void Add(CardSetName cardSetName)
{
_list.Add(cardSetName);
}
public void Setup()
{
_list.Sort((CardSetName a, CardSetName b) => a.ID.CompareTo(b.ID));
_listBasicAndPack = _list.FindAll((CardSetName cardSetName) => int.TryParse(cardSetName.ID, out var result) && IsBasicAndStandardPack(result));
}
public List<CardSetName> GetList()
{
return _list;
}
public List<CardSetName> GetListBasicAndPack()
{
return _listBasicAndPack;
}
public CardSetName Get(string id)
{
CardSetName cardSetName = _list.Find((CardSetName x) => x.ID == id);
if (cardSetName == null)
{
return new CardSetName(id, string.Empty, string.Empty);
}
return cardSetName;
}
private bool IsBasicAndStandardPack(int setId)
{
if (!IsBasicSetId(setId))
{
return IsStandardPackSetId(setId);
}
return true;
}
}