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

data ActorId #

A unique identifier of an actor in the dungeon.

The Actor type, its components and operations on them

data Actor #

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

Defined in Game.LambdaHack.Common.Actor

Methods

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

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

Show Actor # 
Instance details

Defined in Game.LambdaHack.Common.Actor

Methods

showsPrec :: Int -> Actor -> ShowS #

show :: Actor -> String #

showList :: [Actor] -> ShowS #

Generic Actor # 
Instance details

Defined in Game.LambdaHack.Common.Actor

Associated Types

type Rep Actor :: * -> * #

Methods

from :: Actor -> Rep Actor x #

to :: Rep Actor x -> Actor #

Binary Actor # 
Instance details

Defined in Game.LambdaHack.Common.Actor

Methods

put :: Actor -> Put #

get :: Get Actor #

putList :: [Actor] -> Put #

type Rep Actor # 
Instance details

Defined in Game.LambdaHack.Common.Actor

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

data ResDelta #

Constructors

ResDelta 

Fields

Instances
Eq ResDelta # 
Instance details

Defined in Game.LambdaHack.Common.Actor

Show ResDelta # 
Instance details

Defined in Game.LambdaHack.Common.Actor

Generic ResDelta # 
Instance details

Defined in Game.LambdaHack.Common.Actor

Associated Types

type Rep ResDelta :: * -> * #

Methods

from :: ResDelta -> Rep ResDelta x #

to :: Rep ResDelta x -> ResDelta #

Binary ResDelta # 
Instance details

Defined in Game.LambdaHack.Common.Actor

Methods

put :: ResDelta -> Put #

get :: Get ResDelta #

putList :: [ResDelta] -> Put #

type Rep ResDelta # 
Instance details

Defined in Game.LambdaHack.Common.Actor

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

momentarySpeed :: Actor -> AspectRecord -> Speed #

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

gearSpeed :: AspectRecord -> Speed #

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

braced :: Actor -> Bool #

Whether an actor is braced for combat this clip.

Assorted

type ActorDict = EnumMap ActorId Actor #

All actors on the level, indexed by actor identifier.

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

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 #

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