Safe Haskell | None |
---|
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
- partActor :: Actor -> Part
- partPronoun :: Actor -> Part
- data Actor = Actor {
- btrunk :: !ItemId
- bsymbol :: !Char
- bname :: !Text
- bpronoun :: !Text
- bcolor :: !Color
- btime :: !Time
- bhp :: !Int64
- bhpDelta :: !ResDelta
- bcalm :: !Int64
- bcalmDelta :: !ResDelta
- bpos :: !Point
- boldpos :: !Point
- blid :: !LevelId
- boldlid :: !LevelId
- bfid :: !FactionId
- boldfid :: !FactionId
- btrajectory :: !(Maybe ([Vector], Speed))
- borgan :: !ItemBag
- beqp :: !ItemBag
- binv :: !ItemBag
- bwait :: !Bool
- bproj :: !Bool
- data ResDelta = ResDelta {
- resCurrentTurn :: !Int64
- resPreviousTurn :: !Int64
- deltaSerious :: ResDelta -> Bool
- deltaMild :: ResDelta -> Bool
- xM :: Int -> Int64
- minusM :: Int64
- minusTwoM :: Int64
- oneM :: Int64
- bspeed :: Actor -> [ItemFull] -> Speed
- actorTemplate :: ItemId -> Char -> Text -> Text -> Color -> Int64 -> Int64 -> Point -> LevelId -> Time -> FactionId -> Actor
- timeShiftFromSpeed :: Actor -> [ItemFull] -> Time -> Time
- braced :: Actor -> Bool
- waitedLastTurn :: Actor -> Bool
- actorDying :: Actor -> Bool
- actorNewBorn :: Actor -> Bool
- hpTooLow :: Actor -> [ItemFull] -> Bool
- unoccupied :: [Actor] -> Point -> Bool
- type ActorDict = EnumMap ActorId Actor
- smellTimeout :: Delta Time
- checkAdjacent :: Actor -> Actor -> Bool
- mapActorItems_ :: Monad m => (ItemId -> Int -> m a) -> Actor -> m ()
- ppCStore :: CStore -> Text
- ppContainer :: Container -> Text
Actor identifiers and related operations
A unique identifier of an actor in the dungeon.
monsterGenChance :: AbsDepth -> AbsDepth -> Int -> Int -> Rnd BoolSource
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.
partPronoun :: Actor -> PartSource
The part of speech containing the actor pronoun.
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 | |
|
deltaSerious :: ResDelta -> BoolSource
actorTemplate :: ItemId -> Char -> Text -> Text -> Color -> Int64 -> Int64 -> Point -> LevelId -> Time -> FactionId -> ActorSource
A template for a new actor.
timeShiftFromSpeed :: Actor -> [ItemFull] -> Time -> TimeSource
Add time taken by a single step at the actor's current speed.
waitedLastTurn :: Actor -> BoolSource
The actor waited last turn.
actorDying :: Actor -> BoolSource
actorNewBorn :: Actor -> BoolSource
unoccupied :: [Actor] -> Point -> BoolSource
Checks for the presence of actors in a position. Does not check if the tile is walkable.
Assorted
smellTimeout :: Delta TimeSource
How long until an actor's smell vanishes from a tile.
checkAdjacent :: Actor -> Actor -> BoolSource
ppContainer :: Container -> TextSource