Safe Haskell | None |
---|
Actors perceiving other actors and the dungeon level.
- data Perception = Perception {}
- newtype PerceptionVisible = PerceptionVisible {}
- type PerActor = EnumMap ActorId PerceptionVisible
- totalVisible :: Perception -> EnumSet Point
- smellVisible :: Perception -> EnumSet Point
- actorSeesLoc :: Perception -> ActorId -> Point -> Bool
- nullPer :: Perception -> Bool
- addPer :: Perception -> Perception -> Perception
- diffPer :: Perception -> Perception -> Perception
- smellFromActors :: COps -> State -> PerActor -> PerceptionVisible
- type FactionPers = EnumMap LevelId Perception
- type Pers = EnumMap FactionId FactionPers
Documentation
data Perception Source
The type representing the perception of a faction on a level. The total visibility holds the sum of FOVs of all actors of a given faction on the level and serves only as a speedup. The fields are not strict because often not all are used.
Perception | |
|
newtype PerceptionVisible Source
totalVisible :: Perception -> EnumSet PointSource
The set of tiles visible by at least one hero.
smellVisible :: Perception -> EnumSet PointSource
The set of tiles smelled by at least one hero.
actorSeesLoc :: Perception -> ActorId -> Point -> BoolSource
Whether an actor can see a position.
nullPer :: Perception -> BoolSource
addPer :: Perception -> Perception -> PerceptionSource
diffPer :: Perception -> Perception -> PerceptionSource
smellFromActors :: COps -> State -> PerActor -> PerceptionVisibleSource
type FactionPers = EnumMap LevelId PerceptionSource
Perception of a single faction, indexed by level identifier.
type Pers = EnumMap FactionId FactionPersSource
Perception indexed by faction identifier.
This can't be added to FactionDict
, because clients can't see it.