This commit is contained in:
cthangover committed 2026-09-10 10:58:00 +03:00
commit 27f38c6c1f
50 files changed
+3403

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
namespace Cthangover.CardBattle.StatusEffect
{
/// <summary>
/// Data-only container for a status effect's serializable fields (<see cref="Type"/> and <see cref="Turns"/>).
/// Used in <see cref="StatusEffectQueue.Copy"/> to deep-clone status effect state when a character
/// is copied for battle. Cast to <see cref="IStatusEffect"/> when added back to a queue.
/// </summary>
public class StatusEffectItem
{
/// <summary>Effect type identifier (matches <see cref="IStatusEffect.Type"/>).</summary>
public int Type { get; set; }
/// <summary>Remaining turns before expiry.</summary>
public int Turns { get; set; }
/// <summary>
/// Creates a field-by-field copy for deep-cloning during character duplication.
/// </summary>
public StatusEffectItem Copy()
{
return new StatusEffectItem
{
Type = Type,
Turns = Turns
};
}
}
}