From f80aae63871b4690dc999630a2d9f9b14fe7bcd3 Mon Sep 17 00:00:00 2001 From: 6d486f49 Date: Mon, 25 May 2026 17:18:16 -0400 Subject: [PATCH] Add Province Improvements data and reference page; update navigation and documentation --- AOW4/Components/Layout/NavMenu.razor | 6 + .../Pages/ProvinceImprovementsReference.razor | 70 ++++ AOW4/Data/ProvinceImprovement.cs | 43 +++ AOW4/Data/ProvinceImprovementsData.cs | 341 ++++++++++++++++++ AOW4/Data/SectionData.cs | 6 + docs/.obsidian/workspace.json | 21 +- ...nt Raw Data and Turn it into Class Data.md | 8 + docs/Province Improvement Data.md | 22 +- 8 files changed, 505 insertions(+), 12 deletions(-) create mode 100644 AOW4/Components/Pages/ProvinceImprovementsReference.razor create mode 100644 AOW4/Data/ProvinceImprovement.cs create mode 100644 AOW4/Data/ProvinceImprovementsData.cs create mode 100644 docs/Document Raw Data and Turn it into Class Data.md diff --git a/AOW4/Components/Layout/NavMenu.razor b/AOW4/Components/Layout/NavMenu.razor index f1dffab..b2c4ea8 100644 --- a/AOW4/Components/Layout/NavMenu.razor +++ b/AOW4/Components/Layout/NavMenu.razor @@ -31,6 +31,12 @@ Magic Materials + + diff --git a/AOW4/Components/Pages/ProvinceImprovementsReference.razor b/AOW4/Components/Pages/ProvinceImprovementsReference.razor new file mode 100644 index 0000000..142d8c9 --- /dev/null +++ b/AOW4/Components/Pages/ProvinceImprovementsReference.razor @@ -0,0 +1,70 @@ +@page "/references/province-improvements" +@using AOW4.Data + +
+

Province Improvements Reference

+

A reference view of the `ProvinceImprovement` data loaded from `ProvinceImprovementsData.RawData`.

+ +
+ + + + + + + + + + + + + @foreach (var improvement in ProvinceImprovementsData.RawData) + { + + + + + + + + + } + +
NameCategorySourceCost (Prod/Gold)EffectsRequirements
@improvement.Name@improvement.Category@improvement.Source@improvement.CostProduction / @improvement.CostGold
@improvement.Effects
@improvement.Requirements
+
+
+ +@code { +} + + diff --git a/AOW4/Data/ProvinceImprovement.cs b/AOW4/Data/ProvinceImprovement.cs new file mode 100644 index 0000000..d9aa9e3 --- /dev/null +++ b/AOW4/Data/ProvinceImprovement.cs @@ -0,0 +1,43 @@ +namespace AOW4.Data; + +/// +/// Represents a Province Improvement - a buildable enhancement that can be constructed in a province. +/// Each Province Improvement decreases stability by -5. +/// +public class ProvinceImprovement +{ + /// + /// The name of the province improvement. + /// + public required string Name { get; set; } + + /// + /// The base category/type (Conduit, Farm, Forester, Mine, Quarry, Research Post, Teleporter, Monument, etc.). + /// + public required string Category { get; set; } + + /// + /// A description of the effects this improvement provides (resource bonuses, adjacency bonuses, special mechanics, etc.). + /// + public required string Effects { get; set; } + + /// + /// Any requirements to build this improvement (terrain, resource nodes, Town Hall tier, etc.). + /// + public required string Requirements { get; set; } + + /// + /// The source/culture/tome that grants this improvement (General, Barbarian, Feudal, High, Mystic, etc.). + /// + public required string Source { get; set; } + + /// + /// The production cost to build this improvement. + /// + public int CostProduction { get; set; } + + /// + /// The gold cost to build this improvement. + /// + public int CostGold { get; set; } +} diff --git a/AOW4/Data/ProvinceImprovementsData.cs b/AOW4/Data/ProvinceImprovementsData.cs new file mode 100644 index 0000000..92ea9d4 --- /dev/null +++ b/AOW4/Data/ProvinceImprovementsData.cs @@ -0,0 +1,341 @@ +namespace AOW4.Data; + +/// +/// Static raw data provider for Province Improvements. +/// +public static class ProvinceImprovementsData +{ + public static List RawData => new() + { + // Basic Province Improvements + new ProvinceImprovement + { + Name = "Conduit", + Category = "Conduit", + Effects = "+5 Mana", + Requirements = "Mana node, pearl reef, or magic material", + Source = "Base", + CostProduction = 0, + CostGold = 0 + }, + new ProvinceImprovement + { + Name = "Farm", + Category = "Farm", + Effects = "+5 Food", + Requirements = "Grassland or coast terrain, fungus fields (underground)", + Source = "Base", + CostProduction = 0, + CostGold = 0 + }, + new ProvinceImprovement + { + Name = "Forester", + Category = "Forester", + Effects = "+2 Food\n+3 Production", + Requirements = "Forest or mangrove forest terrain, mushroom forest (underground)", + Source = "Base", + CostProduction = 0, + CostGold = 0 + }, + new ProvinceImprovement + { + Name = "Hut", + Category = "Hut", + Effects = "+2 Food", + Requirements = "Ashlands, sand or snow terrain", + Source = "Base", + CostProduction = 0, + CostGold = 0 + }, + new ProvinceImprovement + { + Name = "Mine", + Category = "Mine", + Effects = "+5 Gold", + Requirements = "Gold vein, iron deposit, or pearl reef resource node", + Source = "Base", + CostProduction = 0, + CostGold = 0 + }, + new ProvinceImprovement + { + Name = "Quarry", + Category = "Quarry", + Effects = "+5 Production", + Requirements = "Cliff, rocky, or sunken ruins terrain; or iron deposit resource node", + Source = "Base", + CostProduction = 0, + CostGold = 0 + }, + new ProvinceImprovement + { + Name = "Research Post", + Category = "Research Post", + Effects = "+5 Knowledge", + Requirements = "Mana node, magic material or sunken ruins terrain", + Source = "Base", + CostProduction = 0, + CostGold = 0 + }, + + // General Province Improvements + new ProvinceImprovement + { + Name = "Spell Jammer", + Category = "Conduit", + Effects = """ + Enemies cannot target World Map Spells in this Domain. + Enemy Spells cost +100% Combat Casting Points in Combat in Domain. + -10 Mana. + """, + Requirements = "Must be built on an acquired province.\nRequires Town Hall III", + Source = "General", + CostProduction = 250, + CostGold = 100 + }, + new ProvinceImprovement + { + Name = "Teleporter", + Category = "Teleporter", + Effects = """ + A Province Improvement which enables an Army to teleport from one teleporter to another. + -10 Mana. + """, + Requirements = "Must be built on an acquired province", + Source = "General", + CostProduction = 250, + CostGold = 100 + }, + + // Cultural Province Improvements - Barbarian + new ProvinceImprovement + { + Name = "Forest of Stakes", + Category = "Forester", + Effects = """ + +7 Food income. + +7 Production income. + +7 Draft per adjacent Forester. + Enemy Units in this Domain get Demoralized. + """, + Requirements = "Must be built on an acquired province.\nRequires Town Hall II: Communal Tent", + Source = "Barbarian", + CostProduction = 130, + CostGold = 60 + }, + + // Cultural Province Improvements - Dark Cult of Death + new ProvinceImprovement + { + Name = "Masoleum", + Category = "Research Post", + Effects = """ + +10 Knowledge income. + +3 Knowledge Production per adjacent Conduit. + """, + Requirements = "Must be built on an acquired province.\nRequires Town Hall II: Dread Spire", + Source = "Dark - Cult of Death", + CostProduction = 130, + CostGold = 60 + }, + + // Cultural Province Improvements - Dark Cult of Tyranny + new ProvinceImprovement + { + Name = "Dark Forge", + Category = "Mine", + Effects = """ + +10 Gold income. + +5 Production per adjacent Quarry, Mine, or Forester. + """, + Requirements = "Must be built on an acquired province.\nRequires Town Hall II: Dread Spire", + Source = "Dark - Cult of Tyranny", + CostProduction = 130, + CostGold = 60 + }, + + // Cultural Province Improvements - Feudal + new ProvinceImprovement + { + Name = "Farmstead", + Category = "Farm", + Effects = """ + +15 Food income. + +5 Food per adjacent Farm. + """, + Requirements = "Must be built on an acquired province.\nRequires Town Hall II: Castle", + Source = "Feudal", + CostProduction = 130, + CostGold = 60 + }, + + // Cultural Province Improvements - High + new ProvinceImprovement + { + Name = "Sunshrine", + Category = "Research Post", + Effects = """ + +10 Knowledge income. + +3 Knowledge per adjacent Research Post. + Friendly Units in this Domain are Encouraged. + """, + Requirements = "Must be built on an acquired province.\nRequires Town Hall II: Atrium of Light", + Source = "High", + CostProduction = 130, + CostGold = 60 + }, + + // Cultural Province Improvements - Industrious + new ProvinceImprovement + { + Name = "Builder's Quarters", + Category = "Quarry", + Effects = """ + +15 Production income. + +5 Production per adjacent Quarry. + """, + Requirements = "Must be built on an acquired province.\nRequires Town Hall II: Bulwark", + Source = "Industrious", + CostProduction = 130, + CostGold = 60 + }, + + // Cultural Province Improvements - Mystic School of Attunement + new ProvinceImprovement + { + Name = "Mystic Abbey", + Category = "Conduit", + Effects = """ + +10 Mana income. + +3 Knowledge per adjacent Conduit or Research Post. + """, + Requirements = "Must be built on an acquired province.\nRequires Town Hall II: Mage's Plaza", + Source = "Mystic - School of Attunement", + CostProduction = 130, + CostGold = 60 + }, + + // Cultural Province Improvements - Mystic School of Summoning + new ProvinceImprovement + { + Name = "Astral Manalith", + Category = "Conduit", + Effects = """ + +10 Mana income. + +5 Mana per adjacent Conduit or Research Post. + """, + Requirements = "Must be built on an acquired Province.\nRequires City Tier 2.\nRequires Town Hall II: Mage's Plaza", + Source = "Mystic - School of Summoning", + CostProduction = 130, + CostGold = 60 + }, + + // Cultural Province Improvements - Nomad Conquerors + new ProvinceImprovement + { + Name = "Warcamp", + Category = "Forester", + Effects = """ + +15 Draft. + Pillaging adjacent provinces takes -1 Turn. + Friendly units in this and adjacent provinces gain +15 Hit Point regeneration per World Map Turn. + """, + Requirements = "Must be built on an annexed Province.\nRequires Town Hall II: Council Deck", + Source = "Nomad - Conquerors", + CostProduction = 130, + CostGold = 60 + }, + + // Cultural Province Improvements - Nomad Scavengers + new ProvinceImprovement + { + Name = "Scavenging Camp", + Category = "Mine", + Effects = """ + +10 Gold. + +10 Gold for this and each adjacent province containing a Resource Node. + """, + Requirements = "Must be built on an annexed Province.\nRequires Town Hall II: Council Deck", + Source = "Nomad - Scavengers", + CostProduction = 130, + CostGold = 60 + }, + + // Primal Megalith improvements + new ProvinceImprovement + { + Name = "Ash Megalith", + Category = "Conduit", + Effects = "+6 Gold per adjacent Ashland Province", + Requirements = "Must be built on an acquired province.\nRequires Town Hall II: Clan Lodge", + Source = "Primal - Ash Sabertooth", + CostProduction = 250, + CostGold = 100 + }, + new ProvinceImprovement + { + Name = "Dune Megalith", + Category = "Conduit", + Effects = "+4 Gold per adjacent Sand Province", + Requirements = "Must be built on an acquired province.\nRequires Town Hall II: Clan Lodge", + Source = "Primal - Dune Serpent", + CostProduction = 250, + CostGold = 100 + }, + new ProvinceImprovement + { + Name = "Glacial Megalith", + Category = "Conduit", + Effects = "+6 Production per adjacent Snow Province", + Requirements = "Must be built on an acquired province.\nRequires Town Hall II: Clan Lodge", + Source = "Primal - Glacial Mammoth", + CostProduction = 250, + CostGold = 100 + }, + + // Oathsworn Schools + new ProvinceImprovement + { + Name = "School of Contemplation", + Category = "Conduit", + Effects = """ + +7 Mana. + +7 Knowledge. + +3 Knowledge per adjacent Conduit or Research Post. + """, + Requirements = "Must be built on an acquired Province.\nRequires Town Hall II: Oath Square", + Source = "Oathsworn - Oath of Harmony", + CostProduction = 250, + CostGold = 100 + }, + new ProvinceImprovement + { + Name = "School of Discipline", + Category = "Conduit", + Effects = """ + +7 Mana. + +7 Draft. + +5 Draft per adjacent Quarry. + """, + Requirements = "Must be built on an acquired Province.\nRequires Town Hall II: Oath Square", + Source = "Oathsworn - Oath of Righteousness", + CostProduction = 250, + CostGold = 100 + }, + new ProvinceImprovement + { + Name = "School of Mastery", + Category = "Conduit", + Effects = """ + +7 Mana. + +7 Draft. + Units produced in this city start with +1 Starting Rank. + """, + Requirements = "Must be built on an acquired Province.\nRequires Town Hall II: Oath Square", + Source = "Oathsworn - Oath of Strife", + CostProduction = 250, + CostGold = 100 + } + }; +} diff --git a/AOW4/Data/SectionData.cs b/AOW4/Data/SectionData.cs index 8a22184..8252d3f 100644 --- a/AOW4/Data/SectionData.cs +++ b/AOW4/Data/SectionData.cs @@ -31,6 +31,12 @@ public static class SectionsData Title = "Magic Materials Reference", Url = "/references/magic-materials", Description = "View the magic material dataset and bonuses in a reference table." + }, + new SectionLink + { + Title = "Province Improvements Reference", + Url = "/references/province-improvements", + Description = "View the province improvements dataset including costs, effects, and requirements." } } }, diff --git a/docs/.obsidian/workspace.json b/docs/.obsidian/workspace.json index 8786e45..df56a86 100644 --- a/docs/.obsidian/workspace.json +++ b/docs/.obsidian/workspace.json @@ -72,9 +72,23 @@ "icon": "lucide-file", "title": "Province Improvement Data" } + }, + { + "id": "1c5c0981268a9a26", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Document Raw Data and Turn it into Class Data.md", + "mode": "source", + "source": false + }, + "icon": "lucide-file", + "title": "Document Raw Data and Turn it into Class Data" + } } ], - "currentTab": 3 + "currentTab": 4 }, { "id": "0d0bf6ef8ed6d192", @@ -285,12 +299,13 @@ "bases:Create new base": false } }, - "active": "fd3766d6a78ed7a8", + "active": "1c5c0981268a9a26", "lastOpenFiles": [ + "Province Improvement Data.md", + "Document Raw Data and Turn it into Class Data.md", "Collect Data.md", "_Tasks Kanban.base", "_Plan.canvas", - "Province Improvement Data.md", "Overview.md", "Play Architect culture and find out what Monuments are.md", "Magic Material Data.md", diff --git a/docs/Document Raw Data and Turn it into Class Data.md b/docs/Document Raw Data and Turn it into Class Data.md new file mode 100644 index 0000000..8854edb --- /dev/null +++ b/docs/Document Raw Data and Turn it into Class Data.md @@ -0,0 +1,8 @@ +--- +type: Prompt +--- +Take Province Improvement Data.md and update the data information based on the current and newly added raw data sections. + +After this is updated, then add new C# classes and data to the AOW4/Data folder. + +Then when this is done, add a Blazor page with a table in the Reference section to show off said data. \ No newline at end of file diff --git a/docs/Province Improvement Data.md b/docs/Province Improvement Data.md index f3541cc..c5b9b28 100644 --- a/docs/Province Improvement Data.md +++ b/docs/Province Improvement Data.md @@ -7,18 +7,22 @@ Each Province Improvement decreases stability by -5. --- -See Raw Data section +# Schema -# String -- Name required: Taken from the Land improvement column. We are just going to ignore the Water improvement and Lava improvements names, because that is flavour that doesn't effect us +## String +- **Name** (required): The name of the province improvement. Taken from the Land/Water/Lava improvement column; we use only the single name (ignoring Water/Lava flavour variants). +- **Category**: The base type/category of the improvement (Conduit, Farm, Forester, Mine, Quarry, Research Post, Teleporter, Monument, etc.). +- **Effects**: A text description of the main effects. This can include resource bonuses (+X Mana, +X Gold, etc.), adjacent bonuses, terrain effects, and other special mechanics. +- **Requirements**: A text description of any build requirements (terrain, resource nodes, Town Hall tier, etc.). +- **Source**: The source/culture/tome that grants this improvement (General, Barbarian, Feudal, High, etc.). -# Int +## Int +- **CostProduction**: Production cost to build (from Cost column). +- **CostGold**: Gold cost to build (from Cost column). -- increaseMana?: from effects column if containing relevant information -- increaseFood?: from effects column if containing relevant information -- inceaseProduction?: from effects column if containing relevant information -- increaseGold?: from effects column if containing relevant information -- increaseKnowledge?: from effects column if containing relevant information +## Notes +- Base stability penalty: all improvements have -5 Stability +- See Raw Data sections below for all the improvements by category ---