| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Game.LambdaHack.Common.Actor
Description
Actors in the game: heroes, monsters, etc.
Synopsis
- 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.
Instances
| Enum ActorId # | |
| Eq ActorId # | |
| Ord ActorId # | |
Defined in Game.LambdaHack.Common.Misc | |
| Show ActorId # | |
| Binary ActorId # | |
The Actor 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
| |
Instances
Constructors
| ResDelta | |
Fields
| |
Instances
| Eq ResDelta # | |
| Show ResDelta # | |
| Generic ResDelta # | |
| Binary ResDelta # | |
| type Rep ResDelta # | |
Defined in Game.LambdaHack.Common.Actor type Rep ResDelta = D1 (MetaData "ResDelta" "Game.LambdaHack.Common.Actor" "LambdaHack-0.8.3.0-1NVXOytHwux3AEZcvJHaGA" 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)))) | |
type ActorAspect = EnumMap ActorId AspectRecord #
deltaSerious :: ResDelta -> Bool #
actorCanMelee :: ActorAspect -> ActorId -> Actor -> Bool #
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.
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 #
Assorted
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.