| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Game.LambdaHack.Definition.Defs
Description
Basic types for content definitions.
Synopsis
- data GroupName c
- displayGroupName :: GroupName c -> Text
- data ContentId c
- contentIdIndex :: ContentId c -> Int
- type ContentSymbol c = Char
- displayContentSymbol :: ContentSymbol c -> Char
- type X = Int
- type Y = Int
- type Freqs c = [(GroupName c, Int)]
- renameFreqs :: (Text -> Text) -> Freqs c -> Freqs c
- type Rarity = [(Double, Int)]
- linearInterpolation :: Int -> Int -> Rarity -> Int
- data CStore
- ppCStore :: CStore -> (Text, Text)
- ppCStoreIn :: CStore -> Text
- verbCStore :: CStore -> Text
- data SLore
- data ItemDialogMode
- ppSLore :: SLore -> Text
- headingSLore :: SLore -> Text
- ppItemDialogMode :: ItemDialogMode -> (Text, Text)
- ppItemDialogModeIn :: ItemDialogMode -> Text
- ppItemDialogModeFrom :: ItemDialogMode -> Text
- loreFromMode :: ItemDialogMode -> SLore
- data Direction
Documentation
Instances
| Binary (GroupName c) Source # | |
| NFData (GroupName c) Source # | |
Defined in Game.LambdaHack.Definition.DefsInternal | |
| Show (GroupName c) Source # | |
| Eq (GroupName c) Source # | |
| Ord (GroupName c) Source # | |
Defined in Game.LambdaHack.Definition.DefsInternal Methods compare :: GroupName c -> GroupName c -> Ordering Source # (<) :: GroupName c -> GroupName c -> Bool Source # (<=) :: GroupName c -> GroupName c -> Bool Source # (>) :: GroupName c -> GroupName c -> Bool Source # (>=) :: GroupName c -> GroupName c -> Bool Source # | |
| Hashable (GroupName c) Source # | |
displayGroupName :: GroupName c -> Text Source #
This does not need to be 1-1, so should not be used in place of the
Eq instance, etc.
Content identifiers for the content type c.
Instances
contentIdIndex :: ContentId c -> Int Source #
type ContentSymbol c = Char Source #
displayContentSymbol :: ContentSymbol c -> Char Source #
type Freqs c = [(GroupName c, Int)] Source #
For each group that the kind belongs to, denoted by a GroupName
in the first component of a pair, the second component of a pair shows
how common the kind is within the group.
type Rarity = [(Double, Int)] Source #
Rarity on given depths. The first element of the pair is normally in (0, 10] interval and, e.g., if there are 20 levels, 0.5 represents the first level and 10 the last. Exceptionally, it may be larger than 10, meaning appearance in the dungeon is not possible under normal circumstances and the value remains constant above the interval bound.
Actor's item stores.
Instances
| Binary CStore Source # | |||||
| NFData CStore Source # | |||||
Defined in Game.LambdaHack.Definition.Defs | |||||
| Bounded CStore Source # | |||||
| Enum CStore Source # | |||||
Defined in Game.LambdaHack.Definition.Defs Methods succ :: CStore -> CStore Source # pred :: CStore -> CStore Source # toEnum :: Int -> CStore Source # fromEnum :: CStore -> Int Source # enumFrom :: CStore -> [CStore] Source # enumFromThen :: CStore -> CStore -> [CStore] Source # enumFromTo :: CStore -> CStore -> [CStore] Source # enumFromThenTo :: CStore -> CStore -> CStore -> [CStore] Source # | |||||
| Generic CStore Source # | |||||
Defined in Game.LambdaHack.Definition.Defs Associated Types
| |||||
| Read CStore Source # | |||||
| Show CStore Source # | |||||
| Eq CStore Source # | |||||
| Ord CStore Source # | |||||
Defined in Game.LambdaHack.Definition.Defs | |||||
| type Rep CStore Source # | |||||
Defined in Game.LambdaHack.Definition.Defs type Rep CStore = D1 ('MetaData "CStore" "Game.LambdaHack.Definition.Defs" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((C1 ('MetaCons "CGround" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "COrgan" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CEqp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CStash" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
ppCStoreIn :: CStore -> Text Source #
verbCStore :: CStore -> Text Source #
Item slot and lore categories.
Instances
| Binary SLore Source # | |||||
| NFData SLore Source # | |||||
Defined in Game.LambdaHack.Definition.Defs | |||||
| Bounded SLore Source # | |||||
| Enum SLore Source # | |||||
Defined in Game.LambdaHack.Definition.Defs Methods succ :: SLore -> SLore Source # pred :: SLore -> SLore Source # toEnum :: Int -> SLore Source # fromEnum :: SLore -> Int Source # enumFrom :: SLore -> [SLore] Source # enumFromThen :: SLore -> SLore -> [SLore] Source # enumFromTo :: SLore -> SLore -> [SLore] Source # enumFromThenTo :: SLore -> SLore -> SLore -> [SLore] Source # | |||||
| Generic SLore Source # | |||||
Defined in Game.LambdaHack.Definition.Defs Associated Types
| |||||
| Read SLore Source # | |||||
| Show SLore Source # | |||||
| Eq SLore Source # | |||||
| Ord SLore Source # | |||||
Defined in Game.LambdaHack.Definition.Defs | |||||
| type Rep SLore Source # | |||||
Defined in Game.LambdaHack.Definition.Defs type Rep SLore = D1 ('MetaData "SLore" "Game.LambdaHack.Definition.Defs" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((C1 ('MetaCons "SItem" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SOrgan" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "STrunk" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "SCondition" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SBlast" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SEmbed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SBody" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
data ItemDialogMode Source #
Constructors
| MStore CStore | a leader's store |
| MOwned | all party's items |
| MSkills | not items, but determined by leader's items |
| MLore SLore | not party's items, but all known generalized items |
| MPlaces | places; not items at all, but definitely a lore |
| MFactions | factions in this game, with some data from previous |
| MModes | scenarios; not items at all, but definitely a lore |
Instances
| Binary ItemDialogMode Source # | |||||
Defined in Game.LambdaHack.Definition.Defs Methods put :: ItemDialogMode -> Put Source # get :: Get ItemDialogMode Source # putList :: [ItemDialogMode] -> Put Source # | |||||
| NFData ItemDialogMode Source # | |||||
Defined in Game.LambdaHack.Definition.Defs Methods rnf :: ItemDialogMode -> () Source # | |||||
| Generic ItemDialogMode Source # | |||||
Defined in Game.LambdaHack.Definition.Defs Associated Types
Methods from :: ItemDialogMode -> Rep ItemDialogMode x Source # to :: Rep ItemDialogMode x -> ItemDialogMode Source # | |||||
| Read ItemDialogMode Source # | |||||
Defined in Game.LambdaHack.Definition.Defs | |||||
| Show ItemDialogMode Source # | |||||
Defined in Game.LambdaHack.Definition.Defs | |||||
| Eq ItemDialogMode Source # | |||||
Defined in Game.LambdaHack.Definition.Defs Methods (==) :: ItemDialogMode -> ItemDialogMode -> Bool Source # (/=) :: ItemDialogMode -> ItemDialogMode -> Bool Source # | |||||
| Ord ItemDialogMode Source # | |||||
Defined in Game.LambdaHack.Definition.Defs Methods compare :: ItemDialogMode -> ItemDialogMode -> Ordering Source # (<) :: ItemDialogMode -> ItemDialogMode -> Bool Source # (<=) :: ItemDialogMode -> ItemDialogMode -> Bool Source # (>) :: ItemDialogMode -> ItemDialogMode -> Bool Source # (>=) :: ItemDialogMode -> ItemDialogMode -> Bool Source # max :: ItemDialogMode -> ItemDialogMode -> ItemDialogMode Source # min :: ItemDialogMode -> ItemDialogMode -> ItemDialogMode Source # | |||||
| type Rep ItemDialogMode Source # | |||||
Defined in Game.LambdaHack.Definition.Defs type Rep ItemDialogMode = D1 ('MetaData "ItemDialogMode" "Game.LambdaHack.Definition.Defs" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((C1 ('MetaCons "MStore" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CStore)) :+: (C1 ('MetaCons "MOwned" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MSkills" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "MLore" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SLore)) :+: C1 ('MetaCons "MPlaces" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MFactions" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MModes" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
headingSLore :: SLore -> Text Source #
ppItemDialogMode :: ItemDialogMode -> (Text, Text) Source #
loreFromMode :: ItemDialogMode -> SLore Source #
Instances
| Binary Direction Source # | |||||
| NFData Direction Source # | |||||
Defined in Game.LambdaHack.Definition.Defs | |||||
| Generic Direction Source # | |||||
Defined in Game.LambdaHack.Definition.Defs Associated Types
| |||||
| Read Direction Source # | |||||
| Show Direction Source # | |||||
| Eq Direction Source # | |||||
| Ord Direction Source # | |||||
Defined in Game.LambdaHack.Definition.Defs | |||||
| type Rep Direction Source # | |||||
Defined in Game.LambdaHack.Definition.Defs | |||||