Safe Haskell | None |
---|---|
Language | Haskell2010 |
Actors in the game: heroes, monsters, etc. No operation in this module
involves the State
or Action
type.
- data ActorId
- monsterGenChance :: AbsDepth -> AbsDepth -> Int -> Int -> Rnd Bool
- 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
- bspeed :: Actor -> AspectRecord -> Speed
- actorTemplate :: ItemId -> Int64 -> Int64 -> Point -> LevelId -> FactionId -> Actor
- braced :: Actor -> Bool
- waitedLastTurn :: Actor -> Bool
- actorDying :: Actor -> Bool
- actorTrunkIsBlast :: Item -> Bool
- hpTooLow :: Actor -> AspectRecord -> Bool
- calmEnough :: Actor -> AspectRecord -> Bool
- hpEnough :: Actor -> AspectRecord -> Bool
- type ActorDict = EnumMap ActorId Actor
- smellTimeout :: Delta Time
- checkAdjacent :: Actor -> Actor -> Bool
- eqpOverfull :: Actor -> Int -> Bool
- eqpFreeN :: Actor -> Int
Actor identifiers and related operations
A unique identifier of an actor in the dungeon.
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.
The Acto
r type
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.
Actor | |
|
ResDelta | |
|
type ActorAspect = EnumMap ActorId AspectRecord Source #
deltaSerious :: ResDelta -> Bool Source #
actorCanMelee :: ActorAspect -> ActorId -> Actor -> Bool Source #
actorTemplate :: ItemId -> Int64 -> Int64 -> Point -> LevelId -> FactionId -> Actor Source #
A template for a new actor.
waitedLastTurn :: Actor -> Bool Source #
The actor waited last turn.
actorDying :: Actor -> Bool Source #
actorTrunkIsBlast :: Item -> Bool Source #
calmEnough :: Actor -> AspectRecord -> Bool Source #
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.