Adding StatEfficiency

This commit is contained in:
2026-06-18 00:26:29 -04:00
parent 4ec6c84b4c
commit 2a6bc4542e
2 changed files with 15 additions and 6 deletions
+9
View File
@@ -7,6 +7,15 @@ public class CardData
public int? Cost { get; init; }
public int? Attack { get; init; }
public int? Health { get; init; }
public float StatEfficiency()
{
if(Cost == 0) return 0;
if (Attack != null && Cost != null && Health != null) return MathF.Round((float)((Health + Attack) / (float)Cost),2);
return 0;
}
public string? Description { get; init; }
public string? Faction { get; init; }
public string? Set { get; init; }