LambdaHack-0.8.3.0: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Common.Misc

Contents

Description

Hacks that haven't found their home yet.

Synopsis

Game object identifiers

data FactionId #

A unique identifier of a faction in a game.

data LevelId #

Abstract level identifiers.

Instances
Enum LevelId # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Eq LevelId # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

(==) :: LevelId -> LevelId -> Bool #

(/=) :: LevelId -> LevelId -> Bool #

Ord LevelId # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Show LevelId # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Binary LevelId # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

put :: LevelId -> Put #

get :: Get LevelId #

putList :: [LevelId] -> Put #

Hashable LevelId # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

hashWithSalt :: Int -> LevelId -> Int #

hash :: LevelId -> Int #

data ActorId #

A unique identifier of an actor in the dungeon.

Item containers

data Container #

Item container type.

Constructors

CFloor LevelId Point 
CEmbed LevelId Point 
CActor ActorId CStore 
CTrunk FactionId LevelId Point

for bootstrapping actor bodies

Instances
Eq Container # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Ord Container # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Show Container # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Generic Container # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Associated Types

type Rep Container :: * -> * #

Binary Container # 
Instance details

Defined in Game.LambdaHack.Common.Misc

type Rep Container # 
Instance details

Defined in Game.LambdaHack.Common.Misc

data CStore #

Actor's item stores.

Constructors

CGround 
COrgan 
CEqp 
CInv 
CSha 
Instances
Bounded CStore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Enum CStore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Eq CStore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

(==) :: CStore -> CStore -> Bool #

(/=) :: CStore -> CStore -> Bool #

Ord CStore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Read CStore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Show CStore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Generic CStore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Associated Types

type Rep CStore :: * -> * #

Methods

from :: CStore -> Rep CStore x #

to :: Rep CStore x -> CStore #

Binary CStore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

put :: CStore -> Put #

get :: Get CStore #

putList :: [CStore] -> Put #

NFData CStore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

rnf :: CStore -> () #

type Rep CStore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

type Rep CStore = D1 (MetaData "CStore" "Game.LambdaHack.Common.Misc" "LambdaHack-0.8.3.0-1hn0NFDS4ux6qD3ggO7yse" False) ((C1 (MetaCons "CGround" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "COrgan" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "CEqp" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "CInv" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "CSha" PrefixI False) (U1 :: * -> *))))

data SLore #

Item slot and lore categories.

Constructors

SItem 
SOrgan 
STrunk 
STmp 
SBlast 
SEmbed 
Instances
Bounded SLore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Enum SLore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Eq SLore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

(==) :: SLore -> SLore -> Bool #

(/=) :: SLore -> SLore -> Bool #

Ord SLore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

compare :: SLore -> SLore -> Ordering #

(<) :: SLore -> SLore -> Bool #

(<=) :: SLore -> SLore -> Bool #

(>) :: SLore -> SLore -> Bool #

(>=) :: SLore -> SLore -> Bool #

max :: SLore -> SLore -> SLore #

min :: SLore -> SLore -> SLore #

Read SLore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Show SLore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

showsPrec :: Int -> SLore -> ShowS #

show :: SLore -> String #

showList :: [SLore] -> ShowS #

Generic SLore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Associated Types

type Rep SLore :: * -> * #

Methods

from :: SLore -> Rep SLore x #

to :: Rep SLore x -> SLore #

Binary SLore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

put :: SLore -> Put #

get :: Get SLore #

putList :: [SLore] -> Put #

NFData SLore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

rnf :: SLore -> () #

type Rep SLore # 
Instance details

Defined in Game.LambdaHack.Common.Misc

type Rep SLore = D1 (MetaData "SLore" "Game.LambdaHack.Common.Misc" "LambdaHack-0.8.3.0-1hn0NFDS4ux6qD3ggO7yse" False) ((C1 (MetaCons "SItem" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "SOrgan" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "STrunk" PrefixI False) (U1 :: * -> *))) :+: (C1 (MetaCons "STmp" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "SBlast" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "SEmbed" PrefixI False) (U1 :: * -> *))))

data ItemDialogMode #

Instances
Eq ItemDialogMode # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Ord ItemDialogMode # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Read ItemDialogMode # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Show ItemDialogMode # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Generic ItemDialogMode # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Associated Types

type Rep ItemDialogMode :: * -> * #

Binary ItemDialogMode # 
Instance details

Defined in Game.LambdaHack.Common.Misc

NFData ItemDialogMode # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

rnf :: ItemDialogMode -> () #

type Rep ItemDialogMode # 
Instance details

Defined in Game.LambdaHack.Common.Misc

type Rep ItemDialogMode = D1 (MetaData "ItemDialogMode" "Game.LambdaHack.Common.Misc" "LambdaHack-0.8.3.0-1hn0NFDS4ux6qD3ggO7yse" False) ((C1 (MetaCons "MStore" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 CStore)) :+: C1 (MetaCons "MOrgans" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "MOwned" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "MStats" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "MLore" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 SLore)))))

Assorted

data GroupName a #

Instances
Eq (GroupName a) # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

(==) :: GroupName a -> GroupName a -> Bool #

(/=) :: GroupName a -> GroupName a -> Bool #

Ord (GroupName a) # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Read (GroupName a) # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Show (GroupName a) # 
Instance details

Defined in Game.LambdaHack.Common.Misc

IsString (GroupName a) # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

fromString :: String -> GroupName a #

Generic (GroupName a) # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Associated Types

type Rep (GroupName a) :: * -> * #

Methods

from :: GroupName a -> Rep (GroupName a) x #

to :: Rep (GroupName a) x -> GroupName a #

Binary (GroupName a) # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

put :: GroupName a -> Put #

get :: Get (GroupName a) #

putList :: [GroupName a] -> Put #

NFData (GroupName a) # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

rnf :: GroupName a -> () #

Hashable (GroupName a) # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

hashWithSalt :: Int -> GroupName a -> Int #

hash :: GroupName a -> Int #

type Rep (GroupName a) # 
Instance details

Defined in Game.LambdaHack.Common.Misc

type Rep (GroupName a) = D1 (MetaData "GroupName" "Game.LambdaHack.Common.Misc" "LambdaHack-0.8.3.0-1hn0NFDS4ux6qD3ggO7yse" True) (C1 (MetaCons "GroupName" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

data Tactic #

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 TRoam when enemy is seen by the faction and is within the actor's sight radius

Instances
Bounded Tactic # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Enum Tactic # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Eq Tactic # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

(==) :: Tactic -> Tactic -> Bool #

(/=) :: Tactic -> Tactic -> Bool #

Ord Tactic # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Show Tactic # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Generic Tactic # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Associated Types

type Rep Tactic :: * -> * #

Methods

from :: Tactic -> Rep Tactic x #

to :: Rep Tactic x -> Tactic #

Binary Tactic # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

put :: Tactic -> Put #

get :: Get Tactic #

putList :: [Tactic] -> Put #

NFData Tactic # 
Instance details

Defined in Game.LambdaHack.Common.Misc

Methods

rnf :: Tactic -> () #

type Rep Tactic # 
Instance details

Defined in Game.LambdaHack.Common.Misc

type Rep Tactic = D1 (MetaData "Tactic" "Game.LambdaHack.Common.Misc" "LambdaHack-0.8.3.0-1hn0NFDS4ux6qD3ggO7yse" False) (((C1 (MetaCons "TExplore" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "TFollow" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "TFollowNoItems" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "TMeleeAndRanged" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "TMeleeAdjacent" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "TBlock" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "TRoam" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "TPatrol" PrefixI False) (U1 :: * -> *))))

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/.

xM :: Int -> Int64 #

Orphan instances

Binary NominalDiffTime # 
Instance details

NFData Part # 
Instance details

Methods

rnf :: Part -> () #

NFData Person # 
Instance details

Methods

rnf :: Person -> () #

NFData Polarity # 
Instance details

Methods

rnf :: Polarity -> () #

(Enum k, Binary k) => Binary (EnumSet k) # 
Instance details

Methods

put :: EnumSet k -> Put #

get :: Get (EnumSet k) #

putList :: [EnumSet k] -> Put #

Enum k => Keyed (EnumMap k) # 
Instance details

Methods

mapWithKey :: (Key (EnumMap k) -> a -> b) -> EnumMap k a -> EnumMap k b #

Zip (EnumMap k) # 
Instance details

Methods

zipWith :: (a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c #

zip :: EnumMap k a -> EnumMap k b -> EnumMap k (a, b) #

zap :: EnumMap k (a -> b) -> EnumMap k a -> EnumMap k b #

Enum k => ZipWithKey (EnumMap k) # 
Instance details

Methods

zipWithKey :: (Key (EnumMap k) -> a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c #

zapWithKey :: EnumMap k (Key (EnumMap k) -> a -> b) -> EnumMap k a -> EnumMap k b #

Enum k => Indexable (EnumMap k) # 
Instance details

Methods

index :: EnumMap k a -> Key (EnumMap k) -> a #

Enum k => Lookup (EnumMap k) # 
Instance details

Methods

lookup :: Key (EnumMap k) -> EnumMap k a -> Maybe a #

Enum k => Adjustable (EnumMap k) # 
Instance details

Methods

adjust :: (a -> a) -> Key (EnumMap k) -> EnumMap k a -> EnumMap k a #

replace :: Key (EnumMap k) -> a -> EnumMap k a -> EnumMap k a #

Enum k => FoldableWithKey (EnumMap k) # 
Instance details

Methods

toKeyedList :: EnumMap k a -> [(Key (EnumMap k), a)] #

foldMapWithKey :: Monoid m => (Key (EnumMap k) -> a -> m) -> EnumMap k a -> m #

foldrWithKey :: (Key (EnumMap k) -> a -> b -> b) -> b -> EnumMap k a -> b #

foldlWithKey :: (b -> Key (EnumMap k) -> a -> b) -> b -> EnumMap k a -> b #

Enum k => TraversableWithKey (EnumMap k) # 
Instance details

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) # 
Instance details

Methods

put :: EnumMap k e -> Put #

get :: Get (EnumMap k e) #

putList :: [EnumMap k e] -> Put #

(Hashable k, Eq k, Binary k, Binary v) => Binary (HashMap k v) # 
Instance details

Methods

put :: HashMap k v -> Put #

get :: Get (HashMap k v) #

putList :: [HashMap k v] -> Put #

(Enum k, Hashable k, Hashable e) => Hashable (EnumMap k e) # 
Instance details

Methods

hashWithSalt :: Int -> EnumMap k e -> Int #

hash :: EnumMap k e -> Int #