public sealed class TalentTreeA compiled talent tree, and the thing that says whether an allocation is legal.
Remarks
Validated whole, not click by click, and doc 28 § Progression is explicit about why: "a client-built talent tree is a client-chosen power level". The client sends an allocation and the server checks it from scratch. That is one pass over a few dozen nodes, it happens when somebody respecs rather than every frame, and it is the only form of the check that survives a patch changing what a node costs.
⚠ Validating a final allocation forces every rule to be a property of the allocation. A row gate — "five points anywhere in this tree" — is a total and checks fine. "You must have taken A before B" is a property of a sequence, is not expressible here, and is not missed: it is unverifiable after a respec anyway.
Fields and properties (3)
public TalentTreeDefinition DefinitionWhat it was compiled from.
public DefId IdIts id.
public ReadOnlySpan<TalentNode> NodesIts nodes, in the order they were authored.
Methods (5)
public TalentNode? Find(string id)Finds a node.
public int CostOf(TalentAllocation allocation)What an allocation costs.
public TalentVerdict Validate(TalentAllocation allocation, int points)Whether an allocation is legal for somebody with this many points.
public int Modifiers(TalentAllocation allocation, ModifierSource source, ICollection<Modifier> into)What an allocation does to a character's stats.
public void Tags(TalentAllocation allocation, ICollection<GameplayTag> into)What an allocation grants, as tags.
Used by (3)
- ProgressionLibraryVixen.Gameplay.Progression
- ProgressionStateVixen.Gameplay.Progression
- TalentTreeTestsVixen.Gameplay.Progression.Tests