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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Common.Ability

Description

AI strategy abilities.

Synopsis

Documentation

data Ability #

Actor and faction abilities corresponding to client-server requests.

Instances
Bounded Ability # 
Instance details

Defined in Game.LambdaHack.Common.Ability

Enum Ability # 
Instance details

Defined in Game.LambdaHack.Common.Ability

Eq Ability # 
Instance details

Defined in Game.LambdaHack.Common.Ability

Methods

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

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

Ord Ability # 
Instance details

Defined in Game.LambdaHack.Common.Ability

Show Ability # 
Instance details

Defined in Game.LambdaHack.Common.Ability

Generic Ability # 
Instance details

Defined in Game.LambdaHack.Common.Ability

Associated Types

type Rep Ability :: Type -> Type #

Methods

from :: Ability -> Rep Ability x #

to :: Rep Ability x -> Ability #

Binary Ability # 
Instance details

Defined in Game.LambdaHack.Common.Ability

Methods

put :: Ability -> Put #

get :: Get Ability #

putList :: [Ability] -> Put #

NFData Ability # 
Instance details

Defined in Game.LambdaHack.Common.Ability

Methods

rnf :: Ability -> () #

Hashable Ability # 
Instance details

Defined in Game.LambdaHack.Common.Ability

Methods

hashWithSalt :: Int -> Ability -> Int #

hash :: Ability -> Int #

type Rep Ability # 
Instance details

Defined in Game.LambdaHack.Common.Ability

type Rep Ability = D1 (MetaData "Ability" "Game.LambdaHack.Common.Ability" "LambdaHack-0.8.3.0-1NVXOytHwux3AEZcvJHaGA" False) (((C1 (MetaCons "AbMove" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "AbMelee" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "AbDisplace" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "AbAlter" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "AbWait" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "AbMoveItem" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "AbProject" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "AbApply" PrefixI False) (U1 :: Type -> Type))))

type Skills = EnumMap Ability Int #

Skill level in particular abilities.

This representation is sparse, so better than a record when there are more item kinds (with few abilities) than actors (with many abilities), especially if the number of abilities grows as the engine is developed. It's also easier to code and maintain.