Documentation
¶
Index ¶
- Constants
- func GetStartingSpells(wizard *WizardCustom, allSpells spellbook.Spells) spellbook.Spells
- func JoinAbilities(abilities []data.Retort) string
- func SatisifiedDependencies(retort data.Retort, wizard *WizardCustom) bool
- type ChooseSpellInfo
- type NewGameScreen
- type NewGameSettings
- func (settings *NewGameSettings) DifficultyNext()
- func (settings *NewGameSettings) DifficultyString() string
- func (settings *NewGameSettings) LandSizeNext()
- func (settings *NewGameSettings) LandSizeString() string
- func (settings *NewGameSettings) MagicNext()
- func (settings *NewGameSettings) MagicString() string
- func (settings *NewGameSettings) OpponentsNext()
- func (settings *NewGameSettings) OpponentsString() string
- type NewGameState
- type NewWizardFonts
- type NewWizardScreen
- func (screen *NewWizardScreen) BooksOrderRandom() *rand.Rand
- func (screen *NewWizardScreen) Draw(window *ebiten.Image)
- func (screen *NewWizardScreen) Load(cache *lbx.LbxCache) error
- func (screen *NewWizardScreen) LoadHelp(cache *lbx.LbxCache) error
- func (screen *NewWizardScreen) MakeCustomNameUI() *uilib.UI
- func (screen *NewWizardScreen) MakeCustomPictureUI() *uilib.UI
- func (screen *NewWizardScreen) MakeCustomWizardBooksUI() *uilib.UI
- func (screen *NewWizardScreen) MakeSelectBannerUI() *uilib.UI
- func (screen *NewWizardScreen) MakeSelectRaceUI() *uilib.UI
- func (screen *NewWizardScreen) MakeSelectSpellsUI() *uilib.UI
- func (screen *NewWizardScreen) MakeSelectWizardUI() *uilib.UI
- func (screen *NewWizardScreen) MakeWizardUIElements(clickFunc func(wizard int), insideFunc func(wizard int)) []*uilib.UIElement
- func (screen *NewWizardScreen) Update() NewWizardScreenState
- type NewWizardScreenState
- type RaceFonts
- type WizardCustom
- func (wizard *WizardCustom) AddMagicLevel(kind data.MagicType, count int)
- func (wizard *WizardCustom) EnableRetort(retort data.Retort)
- func (wizard *WizardCustom) MagicLevel(kind data.MagicType) int
- func (wizard *WizardCustom) MostBooks() data.MagicType
- func (wizard *WizardCustom) RetortEnabled(ability data.Retort) bool
- func (wizard *WizardCustom) SetMagicLevel(kind data.MagicType, count int)
- func (wizard *WizardCustom) ToggleRetort(retort data.Retort, picksLeft int)
- func (wizard *WizardCustom) TotalBooks() int
- type WizardSlot
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 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 ¶
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) 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 ¶
func MakeRaceFonts ¶
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
Click to show internal directories.
Click to hide internal directories.