using System.Collections.Generic; using ProjectI.Builds; namespace ProjectI.Menu { public sealed class GuidedBuildRecipe { public string Name { get; } public string CombatLoop { get; } public string TradeOff { get; } public IReadOnlyList<(string Title,string Description)> Steps { get; } public BuildLoadout Loadout { get; } public GuidedBuildRecipe(string name,string loop,string tradeOff,BuildLoadout loadout,params (string Title,string Description)[] steps) { Name=name;CombatLoop=loop;TradeOff=tradeOff;Loadout=loadout;Steps=System.Array.AsReadOnly(steps); } } public static class GuidedBuildCatalog { public static IReadOnlyList All { get; } = System.Array.AsReadOnly(new[] { new GuidedBuildRecipe("Mobile marksman","Reposition, mark, then burst with your guns.","Aerostep reduces HP and gun damage; Overcharge trades movement for gun damage. Enhanced triggers are consumed on misses.",new BuildLoadout(1,2,114,108,111,304,201), ("Reposition","Slipstream Step creates distance and a short speed window."),("Mark","Scan Pulse marks visible targets and enables Marked Rounds offers."),("Burst","Focus Window enhances 3 gun triggers. Overcharge rewards active use.")), new GuidedBuildRecipe("Field support","Hold a position and replenish the team’s shields.","Less movement and gun damage. Normal slots provide no direct damage. Fields require line of sight; overlapping Ward Beacons do not add their rates.",new BuildLoadout(3,7,113,106,107,302,201), ("Set a position","Ward Beacon restores normal shields in a shared field."),("Protect allies","Shield Pulse provides an immediate shield grant."),("Control pressure","Gravity Snare slows threats; Tactician extends slow duration.")), new GuidedBuildRecipe("Ability striker","Aim headshots to cycle damaging abilities.","Lower HP and gun damage. Ability bonuses do not improve fixed healing or shield grants.",new BuildLoadout(5,8,105,109,112,301,201), ("Earn recharge","Catalyst rewards weapon headshots with normal cooldown refunds."),("Control lanes","Arc Lance pierces enemies; Arc Anchor pressures a small group."),("Clear a cluster","Shard Grenade and Starfall cover enemy groups.")) }); public static bool IsAvailable(GuidedBuildRecipe recipe,IReadOnlyDictionary catalog,AbilityUnlockState unlocks,out string reason) { foreach(LibrarySlot slot in System.Enum.GetValues(typeof(LibrarySlot))) {int id=AbilityLibraryState.EquippedId(recipe.Loadout,slot);if(!catalog.ContainsKey(id)||!unlocks.IsUnlocked(id)){reason=$"{slot}: ability {id} is unavailable or locked.";return false;}} reason="";if(new PlayerBuildState(catalog,unlocks).TryEquip(recipe.Loadout,false))return true; reason="This example cannot fill all slots.";return false; } } }