| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Game.LambdaHack.Common.Misc
Description
Hacks that haven't found their home yet.
Synopsis
- data FactionId
- data LevelId
- data ActorId
- data Container
- data CStore
- data SLore
- data ItemDialogMode
- data GroupName a
- data Tactic
- toGroupName :: Text -> GroupName a
- describeTactic :: Tactic -> Text
- makePhrase :: [Part] -> Text
- makeSentence :: [Part] -> Text
- squashedWWandW :: [Part] -> (Part, Person)
- normalLevelBound :: (Int, Int)
- appDataDir :: IO FilePath
- xM :: Int -> Int64
- xD :: Double -> Double
- minusM :: Int64
- minusM1 :: Int64
- oneM :: Int64
- tenthM :: Int64
- workaroundOnMainThreadMVar :: MVar (IO ())
Game object identifiers
A unique identifier of a faction in a game.
Instances
| Enum FactionId # | |
Defined in Game.LambdaHack.Common.Misc Methods succ :: FactionId -> FactionId # pred :: FactionId -> FactionId # fromEnum :: FactionId -> Int # enumFrom :: FactionId -> [FactionId] # enumFromThen :: FactionId -> FactionId -> [FactionId] # enumFromTo :: FactionId -> FactionId -> [FactionId] # enumFromThenTo :: FactionId -> FactionId -> FactionId -> [FactionId] # | |
| Eq FactionId # | |
| Ord FactionId # | |
| Show FactionId # | |
| Binary FactionId # | |
| Hashable FactionId # | |
Defined in Game.LambdaHack.Common.Misc | |
Abstract level identifiers.
Instances
| Enum LevelId # | |
| Eq LevelId # | |
| Ord LevelId # | |
Defined in Game.LambdaHack.Common.Misc | |
| Show LevelId # | |
| Binary LevelId # | |
| Hashable LevelId # | |
Defined in Game.LambdaHack.Common.Misc | |
A unique identifier of an actor in the dungeon.
Instances
| Enum ActorId # | |
| Eq ActorId # | |
| Ord ActorId # | |
Defined in Game.LambdaHack.Common.Misc | |
| Show ActorId # | |
| Binary ActorId # | |
Item containers
Item container type.
Constructors
| CFloor LevelId Point | |
| CEmbed LevelId Point | |
| CActor ActorId CStore | |
| CTrunk FactionId LevelId Point | for bootstrapping actor bodies |
Instances
Actor's item stores.
Instances
| Bounded CStore # | |
| Enum CStore # | |
Defined in Game.LambdaHack.Common.Misc | |
| Eq CStore # | |
| Ord CStore # | |
| Read CStore # | |
| Show CStore # | |
| Generic CStore # | |
| Binary CStore # | |
| NFData CStore # | |
Defined in Game.LambdaHack.Common.Misc | |
| type Rep CStore # | |
Defined in Game.LambdaHack.Common.Misc type Rep CStore = D1 (MetaData "CStore" "Game.LambdaHack.Common.Misc" "LambdaHack-0.8.3.0-1NVXOytHwux3AEZcvJHaGA" 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 "CInv" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CSha" PrefixI False) (U1 :: Type -> Type)))) | |
Item slot and lore categories.
Instances
| Bounded SLore # | |
| Enum SLore # | |
Defined in Game.LambdaHack.Common.Misc | |
| Eq SLore # | |
| Ord SLore # | |
| Read SLore # | |
| Show SLore # | |
| Generic SLore # | |
| Binary SLore # | |
| NFData SLore # | |
Defined in Game.LambdaHack.Common.Misc | |
| type Rep SLore # | |
Defined in Game.LambdaHack.Common.Misc type Rep SLore = D1 (MetaData "SLore" "Game.LambdaHack.Common.Misc" "LambdaHack-0.8.3.0-1NVXOytHwux3AEZcvJHaGA" 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 "STmp" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "SBlast" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "SEmbed" PrefixI False) (U1 :: Type -> Type)))) | |
data ItemDialogMode #
Instances
Assorted
Instances
| Eq (GroupName a) # | |
| Ord (GroupName a) # | |
Defined in Game.LambdaHack.Common.Misc | |
| Read (GroupName a) # | |
| Show (GroupName a) # | |
| IsString (GroupName a) # | |
Defined in Game.LambdaHack.Common.Misc Methods fromString :: String -> GroupName a # | |
| Generic (GroupName a) # | |
| Binary (GroupName a) # | |
| NFData (GroupName a) # | |
Defined in Game.LambdaHack.Common.Misc | |
| Hashable (GroupName a) # | |
Defined in Game.LambdaHack.Common.Misc | |
| type Rep (GroupName a) # | |
Defined in Game.LambdaHack.Common.Misc | |
Tactic of non-leader actors. Apart of determining AI operation,
each tactic implies a skill modifier, that is added to the non-leader skills
defined in fskillsOther field of Player.
Constructors
| TExplore | if enemy nearby, attack, if no items, etc., explore unknown |
| TFollow | always follow leader's target or his position if no target |
| TFollowNoItems | follow but don't do any item management nor use |
| TMeleeAndRanged | only melee and do ranged combat |
| TMeleeAdjacent | only melee (or wait) |
| TBlock | always only wait, even if enemy in melee range |
| TRoam | if enemy nearby, attack, if no items, etc., roam randomly |
| TPatrol | find an open and uncrowded area, patrol it according
to sight radius and fallback temporarily to |
Instances
| Bounded Tactic # | |
| Enum Tactic # | |
Defined in Game.LambdaHack.Common.Misc | |
| Eq Tactic # | |
| Ord Tactic # | |
| Show Tactic # | |
| Generic Tactic # | |
| Binary Tactic # | |
| NFData Tactic # | |
Defined in Game.LambdaHack.Common.Misc | |
| type Rep Tactic # | |
Defined in Game.LambdaHack.Common.Misc type Rep Tactic = D1 (MetaData "Tactic" "Game.LambdaHack.Common.Misc" "LambdaHack-0.8.3.0-1NVXOytHwux3AEZcvJHaGA" False) (((C1 (MetaCons "TExplore" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TFollow" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "TFollowNoItems" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TMeleeAndRanged" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "TMeleeAdjacent" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TBlock" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "TRoam" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TPatrol" PrefixI False) (U1 :: Type -> Type)))) | |
toGroupName :: Text -> GroupName a #
describeTactic :: Tactic -> Text #
makePhrase :: [Part] -> Text #
Re-exported English phrase creation functions, applied to default irregular word sets.
makeSentence :: [Part] -> Text #
Re-exported English phrase creation functions, applied to default irregular word sets.
squashedWWandW :: [Part] -> (Part, Person) #
Apply the WWandW constructor, first representing repetitions
as CardinalWs.
The parts are not sorted, only grouped, to keep the order.
The internal structure of speech parts is compared, not their string
rendering, so some coincidental clashes are avoided (and code is simpler).
normalLevelBound :: (Int, Int) #
Level bounds.
appDataDir :: IO FilePath #
Personal data directory for the game. Depends on the OS and the game,
e.g., for LambdaHack under Linux it's ~/.LambdaHack/.
workaroundOnMainThreadMVar :: MVar (IO ()) #
Orphan instances
| Binary NominalDiffTime # | |
Methods put :: NominalDiffTime -> Put # get :: Get NominalDiffTime # putList :: [NominalDiffTime] -> Put # | |
| NFData Part # | |
| NFData Person # | |
| NFData Polarity # | |
| (Enum k, Binary k) => Binary (EnumSet k) # | |
| Enum k => Keyed (EnumMap k) # | |
| Zip (EnumMap k) # | |
| Enum k => ZipWithKey (EnumMap k) # | |
| Enum k => Indexable (EnumMap k) # | |
| Enum k => Lookup (EnumMap k) # | |
| Enum k => Adjustable (EnumMap k) # | |
| Enum k => FoldableWithKey (EnumMap k) # | |
| Enum k => TraversableWithKey (EnumMap k) # | |
Methods traverseWithKey :: Applicative f => (Key (EnumMap k) -> a -> f b) -> EnumMap k a -> f (EnumMap k b) # mapWithKeyM :: Monad m => (Key (EnumMap k) -> a -> m b) -> EnumMap k a -> m (EnumMap k b) # | |
| (Enum k, Binary k, Binary e) => Binary (EnumMap k e) # | |
| (Hashable k, Eq k, Binary k, Binary v) => Binary (HashMap k v) # | |
| (Enum k, Hashable k, Hashable e) => Hashable (EnumMap k e) # | |