Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Common.Actor
Description
Actors in the game: heroes, monsters, etc.
- data ActorId
- data Actor = Actor {}
- data ResDelta = ResDelta {
- resCurrentTurn :: (Int64, Int64)
- resPreviousTurn :: (Int64, Int64)
- type ActorAspect = EnumMap ActorId AspectRecord
- deltaSerious :: ResDelta -> Bool
- deltaMild :: ResDelta -> Bool
- actorCanMelee :: ActorAspect -> ActorId -> Actor -> Bool
- momentarySpeed :: Actor -> AspectRecord -> Speed
- gearSpeed :: AspectRecord -> Speed
- braced :: Actor -> Bool
- actorTemplate :: ItemId -> Int64 -> Int64 -> Point -> LevelId -> FactionId -> Bool -> Actor
- waitedLastTurn :: Actor -> Bool
- actorDying :: Actor -> Bool
- hpTooLow :: Actor -> AspectRecord -> Bool
- calmEnough :: Actor -> AspectRecord -> Bool
- hpEnough :: Actor -> AspectRecord -> Bool
- checkAdjacent :: Actor -> Actor -> Bool
- eqpOverfull :: Actor -> Int -> Bool
- eqpFreeN :: Actor -> Int
- type ActorDict = EnumMap ActorId Actor
- monsterGenChance :: AbsDepth -> AbsDepth -> Int -> Int -> Rnd Bool
- smellTimeout :: Delta Time
Actor identifiers
A unique identifier of an actor in the dungeon.
The Acto
r type, its components and operations on them
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
|
Constructors
ResDelta | |
Fields
|
type ActorAspect = EnumMap ActorId AspectRecord Source #
deltaSerious :: ResDelta -> Bool Source #
actorCanMelee :: ActorAspect -> ActorId -> Actor -> Bool Source #
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.
actorTemplate :: ItemId -> Int64 -> Int64 -> Point -> LevelId -> FactionId -> Bool -> Actor Source #
waitedLastTurn :: Actor -> Bool Source #
actorDying :: Actor -> Bool Source #
calmEnough :: Actor -> AspectRecord -> Bool Source #
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.