Safe Haskell | None |
---|
Common client monad operations.
- getPerFid :: MonadClient m => LevelId -> m Perception
- aidTgtToPos :: MonadClient m => ActorId -> LevelId -> Maybe Target -> m (Maybe Point)
- aidTgtAims :: MonadClient m => ActorId -> LevelId -> Maybe Target -> m (Either Text Int)
- makeLine :: MonadClient m => Actor -> Point -> Int -> m (Maybe Int)
- partAidLeader :: MonadClient m => ActorId -> m Part
- partActorLeader :: MonadClient m => ActorId -> Actor -> m Part
- partPronounLeader :: MonadClient m => ActorId -> Actor -> m Part
- actorSkillsClient :: MonadClient m => ActorId -> Maybe ActorId -> m Skills
- maxActorSkillsClient :: MonadClient m => ActorId -> m Skills
- updateItemSlot :: MonadClient m => Maybe ActorId -> ItemId -> m ()
- fullAssocsClient :: MonadClient m => ActorId -> [CStore] -> m [(ItemId, ItemFull)]
- activeItemsClient :: MonadClient m => ActorId -> m [ItemFull]
- itemToFullClient :: MonadClient m => m (ItemId -> Int -> ItemFull)
- pickWeaponClient :: MonadClient m => ActorId -> ActorId -> m [RequestTimed AbMelee]
- sumOrganEqpClient :: MonadClient m => EqpSlot -> ActorId -> m Int
- getModeClient :: MonadClient m => m ModeKind
Documentation
getPerFid :: MonadClient m => LevelId -> m PerceptionSource
Get the current perception of a client.
aidTgtToPos :: MonadClient m => ActorId -> LevelId -> Maybe Target -> m (Maybe Point)Source
Calculate the position of an actor's target.
aidTgtAims :: MonadClient m => ActorId -> LevelId -> Maybe Target -> m (Either Text Int)Source
Check whether one is permitted to aim at a target
(this is only checked for actors; positions let player
shoot at obstacles, e.g., to destroy them).
This assumes aidTgtToPos
does not return Nothing
.
Returns a different seps
, if needed to reach the target actor.
Note: Perception is not enough for the check, because the target actor can be obscured by a glass wall or be out of sight range, but in weapon range.
makeLine :: MonadClient m => Actor -> Point -> Int -> m (Maybe Int)Source
Counts the number of steps until the projectile would hit an actor or obstacle. Starts searching with the given eps and returns the first found eps for which the number reaches the distance between actor and target position, or Nothing if none can be found.
partAidLeader :: MonadClient m => ActorId -> m PartSource
The part of speech describing the actor (designated by actor id and present in the dungeon) or a special name if a leader of the observer's faction.
partActorLeader :: MonadClient m => ActorId -> Actor -> m PartSource
The part of speech describing the actor or you if a leader of the client's faction. The actor may be not present in the dungeon.
partPronounLeader :: MonadClient m => ActorId -> Actor -> m PartSource
The part of speech with the actor's pronoun or you if a leader of the client's faction. The actor may be not present in the dungeon.
actorSkillsClient :: MonadClient m => ActorId -> Maybe ActorId -> m SkillsSource
maxActorSkillsClient :: MonadClient m => ActorId -> m SkillsSource
updateItemSlot :: MonadClient m => Maybe ActorId -> ItemId -> m ()Source
fullAssocsClient :: MonadClient m => ActorId -> [CStore] -> m [(ItemId, ItemFull)]Source
activeItemsClient :: MonadClient m => ActorId -> m [ItemFull]Source
itemToFullClient :: MonadClient m => m (ItemId -> Int -> ItemFull)Source
pickWeaponClient :: MonadClient m => ActorId -> ActorId -> m [RequestTimed AbMelee]Source
sumOrganEqpClient :: MonadClient m => EqpSlot -> ActorId -> m IntSource
getModeClient :: MonadClient m => m ModeKindSource