Skip to content

Commit 4409750

Browse files
committed
Implement Cadence completion tracking with counters and checkmarks
1 parent 32b06db commit 4409750

5 files changed

Lines changed: 53 additions & 3 deletions

File tree

Mythril.Blazor/Components/CadenceDragExpander.razor

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@
44

55
<div class="expander shadow-theme">
66
<div class="expander-header" @onclick="Toggle">
7-
<div class="inventory-item cadence-draggable" draggable="true" @ondragstart="HandleDragStart" @onclick:stopPropagation="true">
7+
<div class="inventory-item cadence-draggable flex-grow-1" draggable="true" @ondragstart="HandleDragStart" @onclick:stopPropagation="true">
88
<div class="d-flex flex-column text-start">
9-
<span class="item-name">@Cadence.Name</span>
9+
<div class="d-flex align-items-center gap-2">
10+
<span class="item-name">@Cadence.Name</span>
11+
@if (TotalCount > 0)
12+
{
13+
<span class="completion-counter small text-muted">(@CompletedCount/@TotalCount)</span>
14+
@if (CompletedCount >= TotalCount)
15+
{
16+
<span class="text-success small">✔</span>
17+
}
18+
}
19+
</div>
1020
<span class="small text-muted">@Cadence.Description</span>
1121
</div>
1222
</div>
@@ -23,6 +33,12 @@
2333
[Parameter]
2434
public Cadence Cadence { get; set; }
2535

36+
[Parameter]
37+
public int CompletedCount { get; set; }
38+
39+
[Parameter]
40+
public int TotalCount { get; set; }
41+
2642
[Parameter]
2743
public RenderFragment? ChildContent { get; set; }
2844

Mythril.Blazor/Components/CadenceDragExpander.razor.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,18 @@
6969
transform: translateY(-2px);
7070
box-shadow: var(--shadow-md);
7171
}
72+
73+
.item-name {
74+
font-weight: bold;
75+
color: var(--text-color);
76+
}
77+
78+
.completion-counter {
79+
font-variant-numeric: tabular-nums;
80+
font-weight: normal;
81+
}
82+
83+
.text-success {
84+
color: #28a745;
85+
font-weight: bold;
86+
}

Mythril.Blazor/Components/CadencePanel.razor

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
@using Mythril.Data
22
@using Mythril.Blazor.Services
33
@inject DragDropService DragDropService
4+
@inject ResourceManager resourceManager
45

56
<div class="cadence-panel d-flex flex-column h-100">
67
<div class="flex-grow-1 overflow-auto mt-2">
78
@if (UnlockedCadences is not null && UnlockedCadences.Any())
89
{
910
@foreach (var cadence in UnlockedCadences)
1011
{
11-
<CadenceDragExpander Cadence="cadence" @key="@cadence.Name">
12+
var stats = GetCompletionStats(cadence);
13+
<CadenceDragExpander Cadence="cadence"
14+
@key="@cadence.Name"
15+
CompletedCount="@stats.Completed"
16+
TotalCount="@stats.Total">
1217
<CadenceTree CadenceData="cadence" />
1318
</CadenceDragExpander>
1419
}
@@ -39,4 +44,14 @@
3944
await OnUnequip.InvokeAsync(cadence);
4045
}
4146
}
47+
48+
private (int Completed, int Total) GetCompletionStats(Cadence cadence)
49+
{
50+
if (cadence.Abilities == null) return (0, 0);
51+
52+
int total = cadence.Abilities.Length;
53+
int completed = cadence.Abilities.Count(a => resourceManager.UnlockedAbilities.Contains($"{cadence.Name}:{a.Ability.Name}"));
54+
55+
return (completed, total);
56+
}
4257
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Mythril is an RPG-inspired web application built with **.NET 10** and **Blazor W
3333
- **CI/CD**: GitHub Actions for automated deployment and health monitoring.
3434

3535
## 🚀 Recent Updates (March 4, 2026)
36+
- **Cadence Completion Tracking**: Implemented a progress counter and checkmark system for Cadences, similar to Location tracking. Users can now see how many abilities have been unlocked for each job at a glance.
3637
- **Location Completion Tracking**: Added a quest counter to location expanders, showing progress on one-time quests. A green checkmark now appears when all unique tasks in a region are finished.
3738
- **Logistics I Ability**: Implemented a new progression tier allowing characters to perform two tasks simultaneously. Features automated task cancellation and cost refunding when the ability is lost.
3839
- **Location Gating System**: Refactored the world map to gate major biomes (Whispering Woods, Ancient Ruins, etc.) behind prerequisite story quests, improving early-game focus and sense of discovery.

docs/instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ Advanced quests in regions like the **Iron Mines** or **Sun-Drenched Desert** re
5656
### Location Completion
5757
You can track your progress in each region by checking the counter on the location expanders. It shows how many **one-time quests** (Single or Unlock types) you have completed out of the total available in that area. Once you've cleared everything unique in a region, a green checkmark will appear!
5858

59+
### Cadence Completion
60+
Similarly, you can track your research progress for each job in the **Cadence** tab. The counter shows how many abilities you have unlocked out of the total available for that Cadence. A green checkmark indicates you have mastered that job!
61+
5962
## 💡 Tips for Success
6063
- **Specialization**: Differentiate your characters! Give one high Magic for fast research and another high Strength for resource farming.
6164

0 commit comments

Comments
 (0)