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
- 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
- bfidImpressed :: !FactionId
- bfidOriginal :: !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
- unoccupied :: [Actor] -> Point -> Bool
- hpTooLow :: Actor -> [ItemFull] -> Bool
- hpHuge :: Actor -> Bool
- calmEnough :: Actor -> [ItemFull] -> Bool
- calmEnough10 :: Actor -> [ItemFull] -> Bool
- hpEnough :: Actor -> [ItemFull] -> Bool
- hpEnough10 :: Actor -> [ItemFull] -> Bool
- type ActorDict = EnumMap ActorId Actor
- smellTimeout :: Delta Time
- checkAdjacent :: Actor -> Actor -> Bool
- keySelected :: (ActorId, Actor) -> (Bool, Bool, Char, Color, ActorId)
- ppContainer :: Container -> Text
- ppCStore :: CStore -> (Text, Text)
- ppCStoreIn :: CStore -> Text
- verbCStore :: CStore -> Text
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.
partPronoun :: Actor -> Part Source
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 -> Bool Source
actorTemplate :: ItemId -> Char -> Text -> Text -> Color -> Int64 -> Int64 -> Point -> LevelId -> Time -> FactionId -> Actor Source
A template for a new actor.
timeShiftFromSpeed :: Actor -> [ItemFull] -> Time -> Time Source
Add time taken by a single 1m step at the actor's current speed.
waitedLastTurn :: Actor -> Bool Source
The actor waited last turn.
actorDying :: Actor -> Bool Source
actorNewBorn :: Actor -> Bool Source
unoccupied :: [Actor] -> Point -> Bool Source
Checks for the presence of actors in a position. Does not check if the tile is walkable.
calmEnough :: Actor -> [ItemFull] -> Bool Source
calmEnough10 :: Actor -> [ItemFull] -> Bool Source
hpEnough10 :: Actor -> [ItemFull] -> Bool Source
Assorted
smellTimeout :: Delta Time Source
How long until an actor's smell vanishes from a tile.
checkAdjacent :: Actor -> Actor -> Bool Source
ppContainer :: Container -> Text Source
ppCStoreIn :: CStore -> Text Source
verbCStore :: CStore -> Text Source