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.
76 lines
2.1 KiB
C#
76 lines
2.1 KiB
C#
using UnityEngine;
|
|
|
|
namespace Wizard;
|
|
|
|
public class PremiumCardConversionDialogParts : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private UILabel _text2;
|
|
|
|
[SerializeField]
|
|
private UILabel _textWarning;
|
|
|
|
[SerializeField]
|
|
private UILabel _beforeOrbNum;
|
|
|
|
[SerializeField]
|
|
private UILabel _afterOrbNum;
|
|
|
|
public void Initialize(CardParameter cardData)
|
|
{
|
|
SystemText systemText = Data.SystemText;
|
|
_text2.text = systemText.Get("Card_0162_3", cardData.CardName);
|
|
_beforeOrbNum.text = PlayerStaticData.UserOrbNum.ToString();
|
|
_afterOrbNum.text = systemText.Get("Card_0162_6", (PlayerStaticData.UserOrbNum - 1).ToString());
|
|
SetWarningText(cardData);
|
|
}
|
|
|
|
private void SetWarningText(CardParameter cardData)
|
|
{
|
|
if (cardData.IsPreReleaseCard)
|
|
{
|
|
_textWarning.gameObject.SetActive(value: false);
|
|
return;
|
|
}
|
|
SystemText systemText = Data.SystemText;
|
|
if (cardData.IsResurgentCard)
|
|
{
|
|
_textWarning.gameObject.SetActive(value: true);
|
|
_textWarning.text = systemText.Get("Card_0300");
|
|
}
|
|
else if (!cardData.IsAvailableFormat(Format.Unlimited, ClassType.None))
|
|
{
|
|
_textWarning.gameObject.SetActive(value: true);
|
|
_textWarning.text = systemText.Get("Card_0204");
|
|
}
|
|
else if (cardData.SameKindNumMaxInUnlimited == 1)
|
|
{
|
|
_textWarning.gameObject.SetActive(value: true);
|
|
_textWarning.text = systemText.Get("Card_0205");
|
|
}
|
|
else if (cardData.SameKindNumMaxInUnlimited == 2)
|
|
{
|
|
_textWarning.gameObject.SetActive(value: true);
|
|
_textWarning.text = systemText.Get("Card_0206");
|
|
}
|
|
else if (Data.Crossover.IsWithinPracticePeriod)
|
|
{
|
|
int num = Mathf.Min(cardData.SameKindNumMaxInCrossoverMainClass, cardData.SameKindNumMaxInCrossoverSubClass);
|
|
if (num == 0)
|
|
{
|
|
_textWarning.gameObject.SetActive(value: true);
|
|
_textWarning.text = systemText.Get("Card_0277");
|
|
}
|
|
else if (num < FormatBehaviorManager.GetDefaultBehaviour(Format.Crossover).DeckSameKindCardNumMax)
|
|
{
|
|
_textWarning.gameObject.SetActive(value: true);
|
|
_textWarning.text = systemText.Get("Card_0278", num.ToString());
|
|
}
|
|
}
|
|
else
|
|
{
|
|
_textWarning.gameObject.SetActive(value: false);
|
|
}
|
|
}
|
|
}
|