talents

package
v0.7.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package talents says where a character's next talent points go, from the dataset's curated talent_builds table and the captured points. The rules are in docs/talents.md.

A build is never invented: with no build for the spec and level band the plan says so and lists the builds the dataset does have. Points spent off-build are listed, not judged.

Index

Constants

View Source
const DefaultLimit = 5

DefaultLimit is how many points a plan lists when none is asked for.

Variables

This section is empty.

Functions

func MatchSpec added in v0.7.13

func MatchSpec(specs []string, free string) string

MatchSpec is the spec in specs that free text names (case-insensitively), or "" when none does: an old free-text play style migrates to the matching spec, else to "Not sure yet".

func Render

func Render(p Result) string

Render is the plain-text form of a plan.

func RenderTree added in v0.7.0

func RenderTree(c character.Character) string

RenderTree lists the captured class tree nodes, one per line, by branch: the captured nodes.

func Specs added in v0.7.13

func Specs(ds store.DataStore, c character.Character) []string

Specs lists a class's spec names (for example Arms, Fury and Protection for a warrior) for the play-style spec dropdown. They come from the dataset's talent_trees table; without it (or without rows for the class) from the curated talent_builds, then from the trees the character's own capture holds. The result is sorted and has no repeats; empty when nothing names a spec.

Types

type OffBuild

type OffBuild struct {
	Name  string
	Rank  int
	Build int // ranks the build gives the node over the character's bands; 0 when not in it
}

OffBuild is a node with points spent that the build does not give (or not that many).

type Options

type Options struct {
	Spec  string // overrides the spec inferred from the most points spent
	Limit int
}

Options are the caller's choices; the zero value infers the spec and lists DefaultLimit points.

type Point

type Point struct {
	NodeID    int64
	Name      string
	Rank      int
	Band      string // the build band that adds it
	Rationale string
}

Point is one talent point to spend: Rank is the node's rank once it is spent.

type Result

type Result struct {
	Class        string
	Spec         string
	SpecInferred bool
	Level        *int
	Band         string
	Unspent      *int
	Next         []Point
	OffBuild     []OffBuild
	Remaining    int      // points the build still adds, through the character's band
	Missing      string   // why no plan could be made; empty when there is one
	Options      []string // with Missing: talents open now (rank below max, can be bought), as options, not a recommendation
	Available    []string // builds in the dataset, for Missing
	Notes        []string
}

Result is the result of Plan.

func Plan

func Plan(c character.Character, ds store.DataStore, opt Options) (p Result)

Plan compares the build for the character's spec and level band with the captured points and lists the next points to spend.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL