wording

package
v0.7.95 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 3 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 wording is the one place that phrases counts, level fit and item sources for players, so digest lines, card details and prompts cannot drift apart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action added in v0.7.79

func Action(verb, text string) string

Action makes an objective's text read as an instruction: text that already opens with a verb is kept, "Western vial placed" becomes "Place Western vial", and anything else gets verb ("Complete" when verb is empty) in front.

func Count

func Count(n int, one, many string) string

Count is "1 talent point" or "2 talent points".

func CutWords

func CutWords(s string, n int) string

CutWords shortens s to at most n characters at a word boundary, with no ellipsis.

func Fit

func Fit(level, mine int) string

Fit says how a level compares to the player's in words; "" when either is unknown (<= 0).

func Levels

func Levels(n int) string

Levels is "a level", "2 levels".

func Plural

func Plural(n int, one, many string) string

Plural is one when n is 1, else many.

func Slot

func Slot(slot string) string

Slot is an equipment slot in words: "finger1" is "ring", "mainhand" is "main hand".

func SlotName added in v0.7.10

func SlotName(slot string, invType int) string

SlotName is a capture slot as a player says it, capitalized: "back" is "Cloak", "wrist" is "Wrists". invType is the item's inventory type when known (13 one-hand, 17 two-hand, 14 shield), else 0.

func Source

func Source(kind, name string) string

Source phrases where an item comes from, by the kind the dataset records and the source's name. Without a name it is "": a bare kind or an id is never shown.

func StartsWithAction added in v0.7.79

func StartsWithAction(s string) bool

StartsWithAction reports whether s opens with an action verb ("Kill Wolf", "Turn in Quest").

func Trip added in v0.7.93

func Trip(finisher, place, instance, zone string) string

Trip says where a quest with nothing to do is handed in, as a trip: "Find Vincent inside Shadowfang Keep (Silverpine Forest)" for a finisher inside a dungeon, "Deliver to Sputtervalve in Ratchet (The Barrens)" otherwise. place is the finisher's place in words; zone is the dungeon's zone.

func Upper

func Upper(s string) string

Upper capitalizes the first letter of s.

Types

This section is empty.

Jump to

Keyboard shortcuts

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