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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Common.Actor

Contents

Description

Actors in the game: heroes, monsters, etc.

Synopsis

Actor identifiers

The Actor type, its components and operations on them

data Actor Source #

Actor properties that are changing throughout the game. If they appear dublets of properties of actor kinds, e.g. HP, they may be results of casting the dice specified in their respective actor kind and/or may be modified temporarily, but return to the original value from their respective kind over time.

Constructors

Actor 

Fields

Instances

Eq Actor Source # 

Methods

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

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

Show Actor Source # 

Methods

showsPrec :: Int -> Actor -> ShowS #

show :: Actor -> String #

showList :: [Actor] -> ShowS #

Generic Actor Source # 

Associated Types

type Rep Actor :: * -> * #

Methods

from :: Actor -> Rep Actor x #

to :: Rep Actor x -> Actor #

Binary Actor Source # 

Methods

put :: Actor -> Put #

get :: Get Actor #

putList :: [Actor] -> Put #

type Rep Actor Source # 
type Rep Actor = D1 * (MetaData "Actor" "Game.LambdaHack.Common.Actor" "LambdaHack-0.8.3.0-7BJnKAztOSt10pFm84xYR4" False) (C1 * (MetaCons "Actor" PrefixI True) ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "btrunk") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * ItemId)) (S1 * (MetaSel (Just Symbol "bhp") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int64))) ((:*:) * (S1 * (MetaSel (Just Symbol "bhpDelta") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * ResDelta)) (S1 * (MetaSel (Just Symbol "bcalm") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int64)))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "bcalmDelta") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * ResDelta)) (S1 * (MetaSel (Just Symbol "bpos") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Point))) ((:*:) * (S1 * (MetaSel (Just Symbol "boldpos") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (Maybe Point))) (S1 * (MetaSel (Just Symbol "blid") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * LevelId))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "bfid") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * FactionId)) (S1 * (MetaSel (Just Symbol "btrajectory") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (Maybe ([Vector], Speed))))) ((:*:) * (S1 * (MetaSel (Just Symbol "borgan") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * ItemBag)) (S1 * (MetaSel (Just Symbol "beqp") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * ItemBag)))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "binv") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * ItemBag)) (S1 * (MetaSel (Just Symbol "bweapon") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int))) ((:*:) * (S1 * (MetaSel (Just Symbol "bwait") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "bproj") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Bool)))))))

data ResDelta Source #

Constructors

ResDelta 

Fields

Instances

Eq ResDelta Source # 
Show ResDelta Source # 
Generic ResDelta Source # 

Associated Types

type Rep ResDelta :: * -> * #

Methods

from :: ResDelta -> Rep ResDelta x #

to :: Rep ResDelta x -> ResDelta #

Binary ResDelta Source # 

Methods

put :: ResDelta -> Put #

get :: Get ResDelta #

putList :: [ResDelta] -> Put #

type Rep ResDelta Source # 
type Rep ResDelta = D1 * (MetaData "ResDelta" "Game.LambdaHack.Common.Actor" "LambdaHack-0.8.3.0-7BJnKAztOSt10pFm84xYR4" False) (C1 * (MetaCons "ResDelta" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "resCurrentTurn") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (Int64, Int64))) (S1 * (MetaSel (Just Symbol "resPreviousTurn") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * (Int64, Int64)))))

momentarySpeed :: Actor -> AspectRecord -> Speed Source #

Current physical speed, whether from being pushed or from organs and gear.

gearSpeed :: AspectRecord -> Speed Source #

The speed from organs and gear; being pushed is ignored.

braced :: Actor -> Bool Source #

Whether an actor is braced for combat this clip.

Assorted

type ActorDict = EnumMap ActorId Actor Source #

All actors on the level, indexed by actor identifier.

monsterGenChance :: AbsDepth -> AbsDepth -> Int -> Int -> Rnd Bool Source #

Chance that a new monster is generated. Depends on the number of monsters already present, and on the level depth and its cave kind.

smellTimeout :: Delta Time Source #

How long until an actor's smell vanishes from a tile.