64 lines
1.6 KiB
C#
64 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace KernelPanic.Meta
|
|
{
|
|
/// <summary>
|
|
/// Stores per-banner counters that must persist between sessions.
|
|
/// </summary>
|
|
[Serializable]
|
|
public sealed class GachaBannerState
|
|
{
|
|
public string bannerId;
|
|
public int totalPulls;
|
|
public int pityCounter;
|
|
public int fiveStarPityCounter;
|
|
public bool exhausted;
|
|
public bool featuredFiveStarGuaranteed;
|
|
public int fiveStarSelectorsClaimed;
|
|
public List<string> guaranteedDistroIds = new();
|
|
|
|
public GachaBannerState()
|
|
{
|
|
}
|
|
|
|
public GachaBannerState(string bannerId)
|
|
{
|
|
this.bannerId = bannerId;
|
|
}
|
|
|
|
public void EnsureLists()
|
|
{
|
|
guaranteedDistroIds ??= new List<string>();
|
|
}
|
|
}
|
|
|
|
/// <summary>Persistent, bounded receipt rendered by <c>git log --pulls</c>.</summary>
|
|
[Serializable]
|
|
public sealed class GachaPullHistoryEntry
|
|
{
|
|
public string pulledUtc;
|
|
public string bannerId;
|
|
public int currencySpent;
|
|
public int entropySpent;
|
|
public List<GachaPullHistoryRewardEntry> rewards = new();
|
|
|
|
public void EnsureLists()
|
|
{
|
|
rewards ??= new List<GachaPullHistoryRewardEntry>();
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public sealed class GachaPullHistoryRewardEntry
|
|
{
|
|
public int stars;
|
|
public string displayName;
|
|
public GachaRewardType rewardType;
|
|
public PullOutcomeKind outcomeKind;
|
|
public int duplicateValue;
|
|
public bool guaranteed;
|
|
public bool pityTriggered;
|
|
}
|
|
}
|