Revamp UI a whole lot

This commit is contained in:
2026-11-18 19:42:44 +01:00
parent 260abc2c98
commit fdde7f9d80
57 changed files with 2667 additions and 935 deletions
@@ -102,6 +102,53 @@ public class GentooProgressionTests
Assert.That(DistroRarity.Stars(Asset<DistroDefinition>("Assets/Data/Distros/Ubuntu.asset")),Is.EqualTo(4));
}
[Test]
public void FeatureBranchHasIndependentPityAndGuaranteesNixOsAfterAnOffBannerDistro()
{
var service=Service();
var standard=service.PerformStandardPull(1,null,PullPaymentSource.Commits);
Assert.That(standard.Success,Is.True);
Assert.That(service.StandardState.totalPulls,Is.EqualTo(1));
Assert.That(service.LimitedState.totalPulls,Is.Zero);
var offBanner=service.PerformLimitedPull(1,null,PullPaymentSource.Commits);
Assert.That(offBanner.Success,Is.True);
Assert.That(offBanner.Rewards.Single().Distro?.Id,Is.Not.EqualTo(GachaService.LimitedFeaturedFiveStarDistroId));
Assert.That(service.LimitedState.featuredFiveStarGuaranteed,Is.True);
Assert.That(service.StandardState.totalPulls,Is.EqualTo(1));
var guaranteed=service.PerformLimitedPull(1,null,PullPaymentSource.Commits);
Assert.That(guaranteed.Rewards.Single().Distro?.Id,Is.EqualTo(GachaService.LimitedFeaturedFiveStarDistroId));
Assert.That(guaranteed.Rewards.Single().Guaranteed,Is.True);
Assert.That(service.LimitedState.featuredFiveStarGuaranteed,Is.False);
}
[Test]
public void PullHistoryIsNewestFirstBoundedAndRoundTripsWithBannerState()
{
var service=Service();
for(int i=0;i<GachaService.MaxPullHistoryEntries+3;i++)
{
var pull=service.PerformLimitedPull(1,null,PullPaymentSource.Commits);
if(!pull.Success)
{
service.AddCurrency(GachaCurrencyType.StandardPull,100);
pull=service.PerformLimitedPull(1,null,PullPaymentSource.Commits);
}
var reward=pull.Rewards[0];
var completed=new CompletedGachaReward(1,reward.StarRating,$"reward-{i}",reward.RewardType,
PullOutcomeKind.Granted,0,null,reward.Guaranteed,reward.PityTriggered);
service.RecordPullHistory(pull,new[]{completed},new DateTime(2026,1,1,0,i%60,0,DateTimeKind.Utc).AddHours(i/60));
}
Assert.That(service.PullHistory.Count,Is.EqualTo(GachaService.MaxPullHistoryEntries));
Assert.That(service.PullHistory[0].rewards[0].displayName,Is.EqualTo("reward-102"));
var save=SaveData.CreateDefault(); service.WriteProgress(save);
var restored=new GachaService(); restored.LoadProgress(save);
Assert.That(restored.PullHistory.Count,Is.EqualTo(GachaService.MaxPullHistoryEntries));
Assert.That(restored.PullHistory[0].bannerId,Is.EqualTo(GachaService.LimitedBannerId));
Assert.That(restored.LimitedState.totalPulls,Is.EqualTo(service.LimitedState.totalPulls));
}
[Test]
public void BeginnerGuaranteedFifthTenPullRemainsFiveStarDistribution()
{