LambdaHack-0.5.0.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Common.Actor

Contents

Description

Actors in the game: heroes, monsters, etc. No operation in this module involves the State or Action type.

Synopsis

Actor identifiers and related operations

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

Chance that a new monster is generated. Currently depends on the number of monsters already present, and on the level. In the future, the strength of the character and the strength of the monsters present could further influence the chance, and the chance could also affect which monster is generated. How many and which monsters are generated will also depend on the cave kind used to build the level.

partActor :: Actor -> Part Source #

The part of speech describing the actor.

partPronoun :: Actor -> Part Source #

The part of speech containing the actor pronoun.

The Actor type

data Actor Source #

Actor properties that are changing throughout the game. If they are dublets of properties from ActorKind, they are usually modified temporarily, but tend to return to the original value from ActorKind over time. E.g., HP.

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 #

Binary Actor Source # 

Methods

put :: Actor -> Put #

get :: Get Actor #

putList :: [Actor] -> Put #

data ResDelta Source #

Constructors

ResDelta 

Fields

actorTemplate :: ItemId -> Char -> Text -> Text -> Color -> Int64 -> Int64 -> Point -> LevelId -> Time -> FactionId -> Actor Source #

A template for a new actor.

braced :: Actor -> Bool Source #

Whether an actor is braced for combat this clip.

waitedLastTurn :: Actor -> Bool Source #

The actor waited last turn.

unoccupied :: [Actor] -> Point -> Bool Source #

Checks for the presence of actors in a position. Does not check if the tile is walkable.

Assorted

type ActorDict = EnumMap ActorId Actor Source #

All actors on the level, indexed by actor identifier.

smellTimeout :: Delta Time Source #

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

ppCStore :: CStore -> (Text, Text) Source #