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 ¶
- func Action(verb, text string) string
- func Count(n int, one, many string) string
- func CutWords(s string, n int) string
- func Fit(level, mine int) string
- func Levels(n int) string
- func Plural(n int, one, many string) string
- func Slot(slot string) string
- func SlotName(slot string, invType int) string
- func Source(kind, name string) string
- func StartsWithAction(s string) bool
- func Trip(finisher, place, instance, zone string) string
- func Upper(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Action ¶ added in v0.7.79
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 Fit ¶
Fit says how a level compares to the player's in words; "" when either is unknown (<= 0).
func SlotName ¶ added in v0.7.10
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 ¶
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
StartsWithAction reports whether s opens with an action verb ("Kill Wolf", "Turn in Quest").
func Trip ¶ added in v0.7.93
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.
Types ¶
This section is empty.