setup

package
v0.0.0-...-2124bf5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DifficultyMax = 4
View Source
const LandSizeMax = 2
View Source
const MagicMax = 2
View Source
const MaxNameLength = 18
View Source
const MaxPicks = 11
View Source
const OpponentsMax = 4

Variables

This section is empty.

Functions

func GetStartingSpells

func GetStartingSpells(wizard *WizardCustom, allSpells spellbook.Spells) spellbook.Spells

func JoinAbilities

func JoinAbilities(abilities []data.Retort) string

func SatisifiedDependencies

func SatisifiedDependencies(retort data.Retort, wizard *WizardCustom) bool

some abilities can only be selected if other properties of the wizard are set

Types

type ChooseSpellInfo

type ChooseSpellInfo struct {
	CommonMax   int
	UncommonMax int
	RareMax     int

	CommonSpells   spellbook.Spells
	UncommonSpells spellbook.Spells
	RareSpells     spellbook.Spells
}

a struct that stores how many spells the user can choose from each rarity

func MakeChooseSpellInfo

func MakeChooseSpellInfo(allSpells spellbook.Spells, magic data.MagicType, books int) ChooseSpellInfo

type NewGameScreen

type NewGameScreen struct {
	Cache      *lbx.LbxCache
	ImageCache util.ImageCache

	State NewGameState

	Settings NewGameSettings

	UI *uilib.UI
}

func MakeNewGameScreen

func MakeNewGameScreen(cache *lbx.LbxCache) *NewGameScreen

func (*NewGameScreen) Draw

func (newGameScreen *NewGameScreen) Draw(screen *ebiten.Image)

func (*NewGameScreen) MakeUI

func (newGameScreen *NewGameScreen) MakeUI() *uilib.UI

func (*NewGameScreen) Update

func (newGameScreen *NewGameScreen) Update() NewGameState

type NewGameSettings

type NewGameSettings struct {
	Difficulty data.DifficultySetting
	Opponents  int
	LandSize   int
	Magic      data.MagicSetting
}

func (*NewGameSettings) DifficultyNext

func (settings *NewGameSettings) DifficultyNext()

func (*NewGameSettings) DifficultyString

func (settings *NewGameSettings) DifficultyString() string

func (*NewGameSettings) LandSizeNext

func (settings *NewGameSettings) LandSizeNext()

func (*NewGameSettings) LandSizeString

func (settings *NewGameSettings) LandSizeString() string

func (*NewGameSettings) MagicNext

func (settings *NewGameSettings) MagicNext()

func (*NewGameSettings) MagicString

func (settings *NewGameSettings) MagicString() string

func (*NewGameSettings) OpponentsNext

func (settings *NewGameSettings) OpponentsNext()

func (*NewGameSettings) OpponentsString

func (settings *NewGameSettings) OpponentsString() string

type NewGameState

type NewGameState int
const (
	NewGameStateRunning NewGameState = iota
	NewGameStateOk
	NewGameStateCancel
)

type NewWizardFonts

type NewWizardFonts struct {
	Font                 *font.Font
	AbilityFont          *font.Font
	AbilityFontSelected  *font.Font
	AbilityFontAvailable *font.Font
	ErrorFont            *font.Font
	NameFont             *font.Font
	NameFontBright       *font.Font
	SelectFont           *font.Font
}

func MakeNewWizardFonts

func MakeNewWizardFonts(cache *lbx.LbxCache) NewWizardFonts

type NewWizardScreen

type NewWizardScreen struct {
	LbxCache *lbx.LbxCache

	LbxFonts []*font.LbxFont
	Fonts    NewWizardFonts

	WizardSlots []WizardSlot
	ImageCache  util.ImageCache

	Spells spellbook.Spells

	Help helplib.Help

	UI *uilib.UI

	BooksOrderSeed1 uint64
	BooksOrderSeed2 uint64

	State NewWizardScreenState

	CustomWizard WizardCustom

	CurrentWizard int
	Active        bool
	// contains filtered or unexported fields
}

func MakeNewWizardScreen

func MakeNewWizardScreen(cache *lbx.LbxCache) *NewWizardScreen

func (*NewWizardScreen) BooksOrderRandom

func (screen *NewWizardScreen) BooksOrderRandom() *rand.Rand

func (*NewWizardScreen) Draw

func (screen *NewWizardScreen) Draw(window *ebiten.Image)

func (*NewWizardScreen) Load

func (screen *NewWizardScreen) Load(cache *lbx.LbxCache) error

func (*NewWizardScreen) LoadHelp

func (screen *NewWizardScreen) LoadHelp(cache *lbx.LbxCache) error

func (*NewWizardScreen) MakeCustomNameUI

func (screen *NewWizardScreen) MakeCustomNameUI() *uilib.UI

func (*NewWizardScreen) MakeCustomPictureUI

func (screen *NewWizardScreen) MakeCustomPictureUI() *uilib.UI

func (*NewWizardScreen) MakeCustomWizardBooksUI

func (screen *NewWizardScreen) MakeCustomWizardBooksUI() *uilib.UI

func (*NewWizardScreen) MakeSelectBannerUI

func (screen *NewWizardScreen) MakeSelectBannerUI() *uilib.UI

func (*NewWizardScreen) MakeSelectRaceUI

func (screen *NewWizardScreen) MakeSelectRaceUI() *uilib.UI

func (*NewWizardScreen) MakeSelectSpellsUI

func (screen *NewWizardScreen) MakeSelectSpellsUI() *uilib.UI

func (*NewWizardScreen) MakeSelectWizardUI

func (screen *NewWizardScreen) MakeSelectWizardUI() *uilib.UI

func (*NewWizardScreen) MakeWizardUIElements

func (screen *NewWizardScreen) MakeWizardUIElements(clickFunc func(wizard int), insideFunc func(wizard int)) []*uilib.UIElement

func (*NewWizardScreen) Update

func (screen *NewWizardScreen) Update() NewWizardScreenState

type NewWizardScreenState

type NewWizardScreenState int
const (
	NewWizardScreenStateSelectWizard NewWizardScreenState = iota
	NewWizardScreenStateCustomPicture
	NewWizardScreenStateCustomName
	NewWizardScreenStateCustomBooks
	NewWizardScreenStateSelectSpells
	NewWizardScreenStateSelectRace
	NewWizardScreenStateSelectBanner
	NewWizardScreenStateFinished
	NewWizardScreenStateCanceled
)

func (NewWizardScreenState) String

func (state NewWizardScreenState) String() string

type RaceFonts

type RaceFonts struct {
	Race        *font.Font
	Available   *font.Font
	Unavailable *font.Font
	Select      *font.Font
}

func MakeRaceFonts

func MakeRaceFonts(cache *lbx.LbxCache) RaceFonts

type WizardCustom

type WizardCustom struct {
	Name string
	// FIXME: remove portrait
	Portrait       int
	Base           data.WizardBase
	Retorts        []data.Retort
	Books          []data.WizardBook
	StartingSpells spellbook.Spells
	Race           data.Race
	Banner         data.BannerType
}

func (*WizardCustom) AddMagicLevel

func (wizard *WizardCustom) AddMagicLevel(kind data.MagicType, count int)

func (*WizardCustom) EnableRetort

func (wizard *WizardCustom) EnableRetort(retort data.Retort)

func (*WizardCustom) MagicLevel

func (wizard *WizardCustom) MagicLevel(kind data.MagicType) int

number of books for the given magic type

func (*WizardCustom) MostBooks

func (wizard *WizardCustom) MostBooks() data.MagicType

func (*WizardCustom) RetortEnabled

func (wizard *WizardCustom) RetortEnabled(ability data.Retort) bool

func (*WizardCustom) SetMagicLevel

func (wizard *WizardCustom) SetMagicLevel(kind data.MagicType, count int)

func (*WizardCustom) ToggleRetort

func (wizard *WizardCustom) ToggleRetort(retort data.Retort, picksLeft int)

func (*WizardCustom) TotalBooks

func (wizard *WizardCustom) TotalBooks() int

total number of all magic books combined

type WizardSlot

type WizardSlot struct {
	Name string
	// the block that the wizard's name is printed on in the ui
	Background int
	Base       data.WizardBase
	// the portrait of the wizard shown when the user's cursor is on top of their name
	Portrait    int
	Books       []data.WizardBook
	ExtraRetort data.Retort
}

func DefaultWizardSlots

func DefaultWizardSlots() []WizardSlot

Jump to

Keyboard shortcuts

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