Documentation ¶
Index ¶
- type AppearanceKey
- type Archive
- func (a *Archive) Appearance(profession string, sex game.CharacterSex, hair string, skin string) *game.Appearance
- func (a *Archive) GetAnimation(name string) game.FrameAnimation
- func (a *Archive) GetCombatMap() *game.CombatMapRecipe
- func (a *Archive) GetImage(name string) (val image.Image, ok bool)
- func (a *Archive) GetOverworldBaseTiles() map[procedural.Code]hbg.BaseTile
- func (a *Archive) GetOverworldEncroachments() hbg.EncroachmentsCollection
- func (a *Archive) GetPedestal(pedestalAppearance int) *game.Sprite
- func (a *Archive) GetRecipes() []*overworld.Recipe
- func (a *Archive) HairVariations() []string
- func (a *Archive) Load(r io.Reader) error
- func (a *Archive) Names() map[string][]string
- func (a *Archive) PedestalAppearances(sinister bool) []int
- func (a *Archive) Profession(profession string) *game.ProfessionDetails
- func (a *Archive) Skill(id skill.ID) *skill.Description
- func (a *Archive) SkillsByProfession(prof string) []*skill.Description
- func (a *Archive) SkillsByWeaponClass(weap item.Class) []*skill.Description
- func (a *Archive) SkinVariations() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppearanceKey ¶
type AppearanceKey struct { Sex game.CharacterSex Profession string Hair string Skin string }
AppearanceKey uniquely identifies a Profession and Sex.
type Archive ¶
type Archive struct {
// contains filtered or unexported fields
}
Archive is a store of game data.
func (*Archive) Appearance ¶
func (a *Archive) Appearance(profession string, sex game.CharacterSex, hair string, skin string) *game.Appearance
Appearance retrieves an appropriate Appearance object to use for a character in combat.
func (*Archive) GetAnimation ¶
func (a *Archive) GetAnimation(name string) game.FrameAnimation
func (*Archive) GetCombatMap ¶
func (a *Archive) GetCombatMap() *game.CombatMapRecipe
GetCombatMap for use in a combat.
func (*Archive) GetImage ¶
GetImage returns an image that has been loaded dynamically into the archive.
func (*Archive) GetOverworldBaseTiles ¶
func (a *Archive) GetOverworldBaseTiles() map[procedural.Code]hbg.BaseTile
func (*Archive) GetOverworldEncroachments ¶
func (a *Archive) GetOverworldEncroachments() hbg.EncroachmentsCollection
func (*Archive) GetRecipes ¶
GetRecipes returns overworld recipes.
func (*Archive) HairVariations ¶
HairVariations returns the list of available hair colors.
func (*Archive) Load ¶
Load data into the Archive from a tar.gz archive, replacing data already in the Archive if the provided files share the same filenames.
func (*Archive) PedestalAppearances ¶
func (*Archive) Profession ¶
func (a *Archive) Profession(profession string) *game.ProfessionDetails
Profession returns the details of a profession.
func (*Archive) Skill ¶
func (a *Archive) Skill(id skill.ID) *skill.Description
Skill retrieves a skill by its ID.
func (*Archive) SkillsByProfession ¶
func (a *Archive) SkillsByProfession(prof string) []*skill.Description
SkillsByProfession gets the skills for a profession.
func (*Archive) SkillsByWeaponClass ¶
func (a *Archive) SkillsByWeaponClass(weap item.Class) []*skill.Description
SkillsByWeaponClass provides the skills of a weapon class. FIXME: the skills should be provided by the instance of a class instead, so that a rapier can have different skills to a broadsword and to a scimitar.
func (*Archive) SkinVariations ¶
SkinVariations returns the list of available skin colors.