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 Source # | |
Defined in Game.LambdaHack.Common.Misc Methods succ :: FactionId -> FactionId Source # pred :: FactionId -> FactionId Source # toEnum :: Int -> FactionId Source # fromEnum :: FactionId -> Int Source # enumFrom :: FactionId -> [FactionId] Source # enumFromThen :: FactionId -> FactionId -> [FactionId] Source # enumFromTo :: FactionId -> FactionId -> [FactionId] Source # enumFromThenTo :: FactionId -> FactionId -> FactionId -> [FactionId] Source # | |
Eq FactionId Source # | |
Ord FactionId Source # | |
Defined in Game.LambdaHack.Common.Misc | |
Show FactionId Source # | |
Binary FactionId Source # | |
Hashable FactionId Source # | |
Abstract level identifiers.
Instances
Enum LevelId Source # | |
Defined in Game.LambdaHack.Common.Misc Methods succ :: LevelId -> LevelId Source # pred :: LevelId -> LevelId Source # toEnum :: Int -> LevelId Source # fromEnum :: LevelId -> Int Source # enumFrom :: LevelId -> [LevelId] Source # enumFromThen :: LevelId -> LevelId -> [LevelId] Source # enumFromTo :: LevelId -> LevelId -> [LevelId] Source # enumFromThenTo :: LevelId -> LevelId -> LevelId -> [LevelId] Source # | |
Eq LevelId Source # | |
Ord LevelId Source # | |
Defined in Game.LambdaHack.Common.Misc | |
Show LevelId Source # | |
Binary LevelId Source # | |
Hashable LevelId Source # | |
A unique identifier of an actor in the dungeon.
Instances
Enum ActorId Source # | |
Defined in Game.LambdaHack.Common.Misc Methods succ :: ActorId -> ActorId Source # pred :: ActorId -> ActorId Source # toEnum :: Int -> ActorId Source # fromEnum :: ActorId -> Int Source # enumFrom :: ActorId -> [ActorId] Source # enumFromThen :: ActorId -> ActorId -> [ActorId] Source # enumFromTo :: ActorId -> ActorId -> [ActorId] Source # enumFromThenTo :: ActorId -> ActorId -> ActorId -> [ActorId] Source # | |
Eq ActorId Source # | |
Ord ActorId Source # | |
Defined in Game.LambdaHack.Common.Misc | |
Show ActorId Source # | |
Binary ActorId Source # | |
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
Item slot and lore categories.
Instances
data ItemDialogMode Source #
Instances
Assorted
Instances
Eq (GroupName a) Source # | |
Ord (GroupName a) Source # | |
Defined in Game.LambdaHack.Common.Misc Methods compare :: GroupName a -> GroupName a -> Ordering Source # (<) :: GroupName a -> GroupName a -> Bool Source # (<=) :: GroupName a -> GroupName a -> Bool Source # (>) :: GroupName a -> GroupName a -> Bool Source # (>=) :: GroupName a -> GroupName a -> Bool Source # | |
Read (GroupName a) Source # | |
Show (GroupName a) Source # | |
IsString (GroupName a) Source # | |
Defined in Game.LambdaHack.Common.Misc Methods fromString :: String -> GroupName a Source # | |
Generic (GroupName a) Source # | |
Binary (GroupName a) Source # | |
NFData (GroupName a) Source # | |
Defined in Game.LambdaHack.Common.Misc | |
Hashable (GroupName a) Source # | |
type Rep (GroupName a) Source # | |
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
toGroupName :: Text -> GroupName a Source #
describeTactic :: Tactic -> Text Source #
makePhrase :: [Part] -> Text Source #
Re-exported English phrase creation functions, applied to default irregular word sets.
makeSentence :: [Part] -> Text Source #
Re-exported English phrase creation functions, applied to default irregular word sets.
squashedWWandW :: [Part] -> (Part, Person) Source #
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) Source #
Level bounds.
appDataDir :: IO FilePath Source #
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 ()) Source #