Implement basic structure for combat system and refactor code

This commit is contained in:
2026-07-03 13:14:36 +02:00
parent 754f81eb4c
commit d98d34ec3f
78 changed files with 1212 additions and 13 deletions
+26
View File
@@ -0,0 +1,26 @@
namespace KernelPanic.Meta
{
/// <summary>
/// Tracks the player's persistent entropy currency balance.
/// </summary>
public sealed class EntropyWallet
{
public int Balance { get; private set; }
public void Add(int amount)
{
Balance += amount;
}
public bool Spend(int amount)
{
if (Balance < amount)
{
return false;
}
Balance -= amount;
return true;
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 8b77d0de67282ca4181a7c53feec4343
+30
View File
@@ -0,0 +1,30 @@
using System;
namespace KernelPanic.Meta
{
/// <summary>
/// Provides the contract for spending entropy on persistent unlock pulls.
/// </summary>
public sealed class GachaService
{
public GachaPullResult PerformPull(EntropyWallet wallet, int cost)
{
throw new NotImplementedException();
}
}
/// <summary>
/// Represents the result of a persistent unlock pull.
/// </summary>
public readonly struct GachaPullResult
{
public GachaPullResult(bool success, string unlockId)
{
Success = success;
UnlockId = unlockId;
}
public bool Success { get; }
public string UnlockId { get; }
}
}
+2
View File
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f62e697e985a8a44ca26ccb8e853ee66
+28
View File
@@ -0,0 +1,28 @@
using System;
namespace KernelPanic.Meta
{
/// <summary>
/// Provides save and load contracts for persistent meta progression.
/// </summary>
public sealed class SaveService
{
public void Save(SaveData data)
{
throw new NotImplementedException();
}
public SaveData Load()
{
throw new NotImplementedException();
}
}
/// <summary>
/// Stores persistent progression data for serialization.
/// </summary>
public sealed class SaveData
{
public int EntropyBalance { get; set; }
}
}
+2
View File
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 752a83f338afd024b8e728a1921e38ee