dungeons

package
v0.7.32 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 9 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 dungeons picks the dungeons that fit a captured character from the dataset's instances, instance_bosses and loot_sources tables, and lists the boss drops that gear.Upgrades scores as upgrades for the character's spec. The rules are in docs/dungeons.md.

Index

Constants

View Source
const LevelWindow = 3

LevelWindow is how far below the character a dungeon's range may top out and still fit. A dungeon is open from its minimum level, so none fits a character under it.

Variables

This section is empty.

Functions

func Render

func Render(c character.Character, r Result, limit int) string

Render is the plain-text plan, showing at most limit ranked picks (all when limit <= 0). It leads with the answer and never narrates where the data came from.

Types

type Drop

type Drop struct {
	Boss   string
	ItemID int64
	Item   string
	Slot   string
	Delta  float64
	Empty  bool     // the slot is empty
	Chance *float64 // percent of loot windows
}

Drop is one upgrade a boss drops. Chance is nil when the dataset has no kill count.

func (Drop) String

func (d Drop) String() string

type DungeonPick

type DungeonPick struct {
	MapID      int64
	Name       string
	MinLevel   *int
	MaxLevel   *int
	MaxPlayers *int
	// EntranceZone is where the dungeon's entrance is; empty when not known.
	EntranceZone string
	// Curated is true when the level range is the advisor's typical range (level_source curated).
	Curated bool
	// Faction is "Horde" or "Alliance" when the dungeon is one side's; empty for both.
	Faction string
	// Pickups are the dungeon quests to take first, with their givers.
	Pickups []Pickup
	// LevelUnknown is true when the dataset holds no level range; such picks are unranked.
	LevelUnknown bool
	// Fit is how many levels the character is above the range (0 inside it).
	Fit int
	// Upgrades counts the distinct items among Drops.
	Upgrades int
	Drops    []Drop
	Quests   []Quest
	// UnlinkedBosses are the encounters the dataset cannot tie to a creature, so their drops are
	// unknown.
	UnlinkedBosses []string
}

DungeonPick is one dungeon and what it offers the character.

type Pickup added in v0.7.32

type Pickup struct {
	ID    int64
	Title string
	Giver string
}

Pickup is a dungeon quest worth taking before going in.

type Quest

type Quest struct {
	ID    int
	Title string
}

Quest is an open quest of the capture linked to a dungeon.

type Result

type Result struct {
	Picks   []DungeonPick
	Unknown []DungeonPick
	Spec    string
	// First is set when the character is below every dungeon's range: the lowest one, which they
	// reach in LevelsToGo levels. Meanwhile is one useful thing to do in the meantime.
	First      *DungeonPick
	LevelsToGo int
	Meanwhile  string
	// ItemLevelOnly is true when upgrades were scored without stat weights.
	ItemLevelOnly bool
	Reason        string // why scoring fell back to item level, when it did
}

Result is a plan: ranked picks, then the dungeons with no level range.

func Plan

Plan finds the dungeons whose level range comes within LevelWindow of the character's level, ranked by upgrade count then level fit, with the unranked level-unknown ones after.

Jump to

Keyboard shortcuts

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