Implement more QoL features and rebalances

This commit is contained in:
2026-10-25 02:16:30 +02:00
parent 0578913451
commit 53f831d91e
220 changed files with 14700 additions and 420 deletions
+6 -5
View File
@@ -8,11 +8,11 @@ namespace KernelPanic.Run
{
public static class TutorialCampaign
{
public const int LessonCount = 2;
public const int LessonCount = 3;
public const int BandwidthReward = 1000;
public const int EntropyReward = GachaService.StandardTenPullCost * GachaService.EntropyPerCommit;
public static bool Required(SaveData save) => save != null && save.starterChosen && save.tutorialRequired;
public static int Lesson(SaveData save) => save?.tutorialCheckpoint != null ? 2 : 1;
public static int Lesson(SaveData save) => save?.tutorialCheckpoint?.wave ?? 1;
public static void Enroll(SaveData save, string distroId)
{
@@ -23,8 +23,8 @@ namespace KernelPanic.Run
// Commit balances and the claimed flag together. Re-enrollment never grants a second payout.
public static void Complete(SaveData save)
{
if (!Required(save) || save.tutorialLesson != 2)
throw new InvalidOperationException("Complete both training waves before claiming the reward.");
if (!Required(save) || save.tutorialLesson != LessonCount)
throw new InvalidOperationException("Complete all three training waves before claiming the reward.");
if (!save.tutorialRewardClaimed)
{
save.bandwidthBalance = checked(Math.Max(0, save.bandwidthBalance) + BandwidthReward);
@@ -37,7 +37,8 @@ namespace KernelPanic.Run
public static EncounterPlan Plan(int wave) => wave switch
{
1 => new("Targeting and revival", "", 0, "zombie_process", "orphan_process"),
2 => new("Queue, stack and finish", "", 0, "memory_leak", "firewalld"),
2 => new("Queue and stack", "", 0, "memory_leak", "firewalld"),
3 => new("Countdown and miniboss", "", 0, "cron_job", "daemon"),
_ => throw new ArgumentOutOfRangeException(nameof(wave))
};