diff --git a/Chrono/Shared/Generated/Docs.g.cs b/Chrono/Shared/Generated/Docs.g.cs index c41d388..50b389b 100644 --- a/Chrono/Shared/Generated/Docs.g.cs +++ b/Chrono/Shared/Generated/Docs.g.cs @@ -154,7 +154,7 @@ public static class DocDatabase { Title = "Lifeblood", Category = "Faction", - Content = "Concepts:\n- Wide Boards\n- Overpower", + Content = "Concepts:\r\n- Wide Boards\r\n- Overpower", Frontmatter = new() { { "category", "Faction" }, @@ -164,7 +164,7 @@ public static class DocDatabase { Title = "Phasetide", Category = "Faction", - Content = "Concepts:\n- Healing\n-", + Content = "Concepts:\r\n- Healing\r\n-", Frontmatter = new() { { "category", "Faction" }, @@ -174,7 +174,7 @@ public static class DocDatabase { Title = "Silence", Category = "Faction", - Content = "Concepts:\n- Activatable Agents\n-", + Content = "Concepts:\r\n- Activatable Agents\r\n-", Frontmatter = new() { { "category", "Faction" }, @@ -184,7 +184,7 @@ public static class DocDatabase { Title = "Singularity", Category = "Faction", - Content = "Concepts:\n- Discard", + Content = "Concepts:\r\n- Discard", Frontmatter = new() { { "category", "Faction" }, @@ -194,7 +194,7 @@ public static class DocDatabase { Title = "Splintergleam", Category = "Faction", - Content = "# Self Damage\n\nCan hurt it's own units for power. Has [[Bleed]] to make reoccurring damage on units very easy.\n\n# Core Damage \n\nCan hurt both cores easily. Has [[Breakdown]] to take advantage of having an injured core for more damage.", + Content = "# Self Damage\r\n\r\nCan hurt it's own units for power. Has [[Bleed]] to make reoccurring damage on units very easy.\r\n\r\n# Core Damage \r\n\r\nCan hurt both cores easily. Has [[Breakdown]] to take advantage of having an injured core for more damage.", Frontmatter = new() { { "category", "Faction" }, @@ -204,7 +204,7 @@ public static class DocDatabase { Title = "Sungrace", Category = "Faction", - Content = "# Energy Reserves\n\nCare about always having banked energy. Spells can refund themselves when using [[Energy Reserves]], or get stronger is you [[Overflow]] your energy reserve.\n\nConcepts:\n- Ramp\n- Using and Replenishing Reserved Energy\n-", + Content = "# Energy Reserves\r\n\r\nCare about always having banked energy. Spells can refund themselves when using [[Energy Reserves]], or get stronger is you [[Overflow]] your energy reserve.\r\n\r\nConcepts:\r\n- Ramp\r\n- Using and Replenishing Reserved Energy\r\n-", Frontmatter = new() { { "category", "Faction" }, @@ -479,7 +479,7 @@ public static class DocDatabase { Title = "Onboarding Track", Category = "Pass", - Content = "| Tier | Reward |\n| ---- | -------------------------------- |\n| 1 | Sprouts Record |\n| 2 | 120 Core Charges |\n| 3 | Burn Precon |\n| 4 | 120 Core Charges, 25 Flux |\n| 5 | Profile Pictures |\n| 6 | Emotes |\n| 7 | 120 Core Charges |\n| 8 | Profile Pictures |\n| 9 | 60 Core Charges, 50 Flux |\n| 10 | 240 Core Charges, 1 Draft Ticket |\n\n| Core Charges | Flux |\n| ------------ | ---- |\n| 660 | 75 |", + Content = "| Tier | Reward |\r\n| ---- | -------------------------------- |\r\n| 1 | Sprouts Record |\r\n| 2 | 120 Core Charges |\r\n| 3 | Burn Precon |\r\n| 4 | 120 Core Charges, 25 Flux |\r\n| 5 | Profile Pictures |\r\n| 6 | Emotes |\r\n| 7 | 120 Core Charges |\r\n| 8 | Profile Pictures |\r\n| 9 | 60 Core Charges, 50 Flux |\r\n| 10 | 240 Core Charges, 1 Draft Ticket |\r\n\r\n| Core Charges | Flux |\r\n| ------------ | ---- |\r\n| 660 | 75 |", Frontmatter = new() { { "expPer", "30" }, diff --git a/Chrono/Shared/Pages/DeckDetail.razor b/Chrono/Shared/Pages/DeckDetail.razor index fc28057..caaa6e9 100644 --- a/Chrono/Shared/Pages/DeckDetail.razor +++ b/Chrono/Shared/Pages/DeckDetail.razor @@ -38,6 +38,22 @@ @deck.ValidationMessage } + + @{ + var distribution = GetManaDistribution(); + var maxCount = distribution.Max(x => x.Count); + } +
+ @foreach (var entry in distribution) + { + var height = maxCount > 0 ? (entry.Count * 100 / maxCount) : 0; +
+
@entry.Count
+
+
@(entry.Cost >= 10 ? "10+" : entry.Cost.ToString())
+
+ } +
@if (deck.Keycards.Count > 0) @@ -274,6 +290,26 @@ selectedCard = null; } + private List<(int Cost, int Count)> GetManaDistribution() + { + if (deck == null) return []; + var counts = new Dictionary(); + for (int i = 0; i <= 10; i++) counts[i] = 0; + + foreach (var cardName in deck.Cards) + { + var card = LookupCard(cardName); + if (card?.Cost != null) + { + var cost = card.Cost.Value; + if (cost >= 10) cost = 10; + counts[cost]++; + } + } + + return counts.OrderBy(x => x.Key).Select(x => (x.Key, x.Value)).ToList(); + } + private RenderFragment RenderDescription(string description) { return builder => diff --git a/Chrono/Shared/Pages/DeckDetail.razor.css b/Chrono/Shared/Pages/DeckDetail.razor.css index ecfec05..474a9e3 100644 --- a/Chrono/Shared/Pages/DeckDetail.razor.css +++ b/Chrono/Shared/Pages/DeckDetail.razor.css @@ -59,7 +59,51 @@ .deck-card-count { font-size: 0.85rem; color: var(--text-muted); - margin: 0; + margin: 0 0 1.5rem; +} + +.mana-curve { + display: flex; + align-items: flex-end; + gap: 0.5rem; + height: 80px; + margin-top: 1rem; + padding: 0 0.5rem; +} + +.mana-bar-container { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + height: 100%; + justify-content: flex-end; +} + +.mana-bar-label { + font-size: 0.7rem; + color: var(--text-muted); + margin-bottom: 0.2rem; +} + +.mana-bar { + width: 100%; + background: var(--accent); + border-radius: 4px 4px 0 0; + min-height: 4px; + transition: height 0.3s ease; +} + +.mana-cost { + font-size: 0.75rem; + font-weight: 600; + color: var(--text-secondary); + margin-top: 0.4rem; + background: var(--bg-elevated); + width: 100%; + text-align: center; + border-radius: 4px; + padding: 0.1rem 0; } .deck-section {