Add Magic Materials reference page and update navigation links

This commit is contained in:
2026-05-25 16:58:02 -04:00
parent 0cf75d5324
commit 9eb962f852
6 changed files with 140 additions and 9 deletions
+6
View File
@@ -25,6 +25,12 @@
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather <span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
</NavLink> </NavLink>
</div> </div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="/references/magic-materials">
<span class="bi bi-book-fill-nav-menu" aria-hidden="true"></span> Magic Materials
</NavLink>
</div>
</nav> </nav>
</div> </div>
@@ -0,0 +1,98 @@
@page "/references/magic-materials"
@using AOW4.Data
<div class="page-container">
<h1>Magic Materials Reference</h1>
<p class="subtitle">A reference view of the `MagicMaterial` data loaded from `MagicMaterialsData.RawData`.</p>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Name</th>
<th>Category</th>
<th>Annex Resources</th>
<th>Global Bonus</th>
<th>Infusion 1</th>
<th>Infusion 2</th>
<th>Infusion 3</th>
</tr>
</thead>
<tbody>
@foreach (var material in MagicMaterialsData.RawData)
{
<tr>
<td>@material.Name</td>
<td>@material.Category</td>
<td>@FormatAnnexResources(material)</td>
<td>@material.GlobalBonus</td>
<td><div class="preformatted">@material.InfusionEffects1</div></td>
<td><div class="preformatted">@material.InfusionEffects2</div></td>
<td><div class="preformatted">@material.InfusionEffects3</div></td>
</tr>
}
</tbody>
</table>
</div>
</div>
@code {
private static string FormatAnnexResources(MagicMaterial material)
{
var parts = new List<string>();
void Add(string label, int? value)
{
if (value.HasValue)
{
parts.Add(value.Value < 0 ? $"{value.Value}% {label}" : $"+{value.Value} {label}");
}
}
Add("Production", material.IncreaseProduction);
Add("Gold", material.IncreaseGold);
Add("Mana", material.IncreaseMana);
Add("Draft", material.IncreaseDraft);
Add("Knowledge", material.IncreaseKnowledge);
Add("Food", material.IncreaseFood);
Add("Stability", material.IncreaseStability);
Add("Imperium", material.IncreaseImperium);
Add("Allegiance from Whispering Stones", material.IncreaseAllegianceFromWhisperingStones);
Add("Relations with Free Cities and Rulers", material.IncreaseRelationWithFreeCitiesAndRulers);
Add("Combat Casting Points", material.IncreaseCombatCastingPoints);
Add("World Map Casting Points", material.IncreaseWorldCastingPoints);
Add("HP Regeneration", material.IncreaseHPRegen);
Add("Hit Points", material.IncreaseHitPoints);
Add("Experience Percent", material.IncreaseExperiencePercent);
Add("Allegiance from Umbral Dwellings", material.IncreaseAllegianceFromUmbralDwellings);
Add("Draft Cost Reduction", material.DecreaseDraftCostPercent);
Add("Recruitment Cost Reduction", material.DecreaseRecruitmentCostPercent);
Add("Knowledge Research Cost Reduction", material.DecreaseKnowledgeResearchCostPercent);
Add("Turn Reduction to Found/Absorb/Migrate", material.DecreaseTurnsTakenToFoundAbsorbMigrateCities);
return parts.Count > 0 ? string.Join("; ", parts) : "—";
}
}
<style>
.page-container {
padding: 2rem;
max-width: 1200px;
margin: 0 auto;
}
.subtitle {
color: #666;
margin-bottom: 1.5rem;
}
.table-responsive {
overflow-x: auto;
}
.preformatted {
white-space: pre-wrap;
font-family: var(--bs-font-sans-serif);
color: #333;
}
</style>
+6 -1
View File
@@ -26,7 +26,12 @@ public static class SectionsData
Description = "Reference materials and documentation", Description = "Reference materials and documentation",
Links = new List<SectionLink> Links = new List<SectionLink>
{ {
// Add reference links here in the future new SectionLink
{
Title = "Magic Materials Reference",
Url = "/references/magic-materials",
Description = "View the magic material dataset and bonuses in a reference table."
}
} }
}, },
new Section new Section
+7 -7
View File
@@ -51,12 +51,12 @@
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "Magic Material Data.md", "file": "Collect Data.md",
"mode": "source", "mode": "source",
"source": false "source": false
}, },
"icon": "lucide-file", "icon": "lucide-file",
"title": "Magic Material Data" "title": "Collect Data"
} }
}, },
{ {
@@ -170,7 +170,7 @@
} }
], ],
"direction": "horizontal", "direction": "horizontal",
"width": 332.5 "width": 200
}, },
"right": { "right": {
"id": "bfd5504e61304ea1", "id": "bfd5504e61304ea1",
@@ -287,18 +287,19 @@
}, },
"active": "303f63f445fc3254", "active": "303f63f445fc3254",
"lastOpenFiles": [ "lastOpenFiles": [
"_Tasks Kanban.base",
"_Plan.canvas", "_Plan.canvas",
"Magic Material Data.md",
"Magic Materials Reference.md",
"Mobile App.md", "Mobile App.md",
"Desktop App.md", "Desktop App.md",
"Server App.md", "Server App.md",
"Client App.md", "Client App.md",
"agent.md.md", "agent.md.md",
"Magic Material Data.md",
"Basic Province Improvement Data.md", "Basic Province Improvement Data.md",
"Collect Data.md", "Collect Data.md",
"Resource Node Data.md", "Resource Node Data.md",
"Load Game Data Into Build Calculator.md", "Load Game Data Into Build Calculator.md",
"_Tasks Kanban.base",
"Province.md", "Province.md",
"Overview.md", "Overview.md",
"Forge.md", "Forge.md",
@@ -312,7 +313,6 @@
"Learning Pages.md", "Learning Pages.md",
"Home Page.md", "Home Page.md",
"Plan Basic Pages.md", "Plan Basic Pages.md",
"Reference Pages.md", "Reference Pages.md"
"Resources.md"
] ]
} }
+2 -1
View File
@@ -4,10 +4,11 @@ status: Working On
--- ---
- [[Terrain Data]] - [[Terrain Data]]
- [[Basic Province Improvement Data]] - [[Basic Province Improvement Data]]
- Province Improvement Data (add to basic then delete this line)
- [[Resource Node Data]] - [[Resource Node Data]]
- [[Magic Material Data]] - [[Magic Material Data]]
- Building Data - Building Data
- Province Improvement Data
- Tome Data - Tome Data
+21
View File
@@ -0,0 +1,21 @@
# Magic Materials Reference
This page shows the new `MagicMaterial` data captured by `AOW4/Data/MagicMaterial.cs` and populated in `AOW4/Data/MagicMaterialsData.cs`.
The table below summarizes each material, its category, annex resources, global bonus, and the first infusion effect block.
| Name | Category | Annex Resources | Global Bonus | Infusion 1 |
|---|---|---|---|---|
| Arcanum Ore | Ore | +10 Production<br>+10 Mana | -25% Hurry Recruitment Cost | Inflict Sundered Defense<br>Power Cleave<br>Support - Bolstered Defense<br>Reinforced<br>+2 Defense |
| Focus Crystals | Ore | +10 Gold<br>+10 Knowledge | +10% Unit Experience Gain | Retaliator +50%<br>+1 Range<br>Inflict Marked<br>Damage Reflection 30%<br>+20% Accuracy |
| Fireforge Stone | Ore | +20 Production | -20% Unit Draft Cost | Fire Damage<br>+20% Critical Damage<br>Inflict Burning<br>Support - Strengthened<br>Lesser Fire Shield |
| Blood Glass | SunlessOre | +20 Draft | +5 HP regeneration (on the world map) | Greater Inflict Bleed<br>Lifedrinker<br>Blood Sigil |
| Archon Blood | Liquid | +20 Mana | +15 Combat Casting Points | Frost Damage<br>Infecting<br>Assassinate<br>Life Steal<br>Lesser Frost Shield |
| Astral Dew | Liquid | +10 Mana<br>+10 Knowledge | +15 World Map Casting Points | Lightning Damage<br>Inflict Status Vulnerability<br>Inflict Sundered Resistance<br>Support - Bolstered Resistance<br>Lesser Lightning Shield |
| Tranquility Pool | Liquid | +20 Knowledge | -10% Knowledge research cost for spells | Inflict Slowed<br>Inflict Weakened<br>Inflict Wet<br>Support - Status Protection<br>Lesser Spirit Shield |
| Haste Berries | Plant | +20 Draft | -2 turns to found, absorb or migrate cities | Frenzy<br>Inflict Distracted<br>Swift<br>Wind Barrier<br>Conjure Animal |
| Silvertongue Fruit | Plant | +10 Food<br>+10 Draft | +1 Allegiance from Whispering Stones | Blight Damage<br>Inflict Condemned<br>Inflict Poisoned<br>Support - Regeneration<br>Lesser Blight Shield |
| Rainbow Clover | Plant | +10 Food<br>+10 Stability | +100 Relations with Free Cities and Rulers | Spirit Damage<br>+2 Spirit Resistance<br>Zeal<br>Army Recuperation |
| Void Stones | VoidStone | +30 Mana | +2 Allegiance per turn with discovered Umbral Dwellings | Boon Stealing<br>Cleansing Fire<br>Army: Umbral Malady Immunity |
> For the full data model and raw source values, see `docs/Magic Material Data.md`.