Safe Haskell | None |
---|
Semantics of HumanCmd
client commands that do not return
server commands. None of such commands takes game time.
TODO: document
- moveCursor :: MonadClientUI m => Vector -> Int -> WriterT Slideshow m ()
- retargetLeader :: MonadClientUI m => WriterT Slideshow m ()
- selectHeroHuman :: (MonadClientAbort m, MonadClientUI m) => Int -> m ()
- memberCycleHuman :: (MonadClientAbort m, MonadClientUI m) => m ()
- memberBackHuman :: (MonadClientAbort m, MonadClientUI m) => m ()
- inventoryHuman :: (MonadClientAbort m, MonadClientUI m) => WriterT Slideshow m ()
- tgtFloorLeader :: MonadClientUI m => TgtMode -> WriterT Slideshow m ()
- tgtEnemyLeader :: MonadClientUI m => TgtMode -> WriterT Slideshow m ()
- tgtAscendHuman :: (MonadClientAbort m, MonadClientUI m) => Int -> WriterT Slideshow m ()
- epsIncrHuman :: MonadClientAbort m => Bool -> m ()
- cancelHuman :: MonadClientUI m => WriterT Slideshow m () -> WriterT Slideshow m ()
- displayMainMenu :: MonadClientUI m => WriterT Slideshow m ()
- acceptHuman :: MonadClientUI m => WriterT Slideshow m () -> WriterT Slideshow m ()
- clearHuman :: Monad m => m ()
- historyHuman :: MonadClientUI m => WriterT Slideshow m ()
- humanMarkVision :: MonadClientUI m => m ()
- humanMarkSmell :: MonadClientUI m => m ()
- humanMarkSuspect :: MonadClientUI m => m ()
- helpHuman :: MonadClientUI m => WriterT Slideshow m ()
- endTargeting :: MonadClientUI m => Bool -> m ()
- floorItemOverlay :: MonadClient m => ItemBag -> m Overlay
- itemOverlay :: MonadClient m => ItemBag -> ItemInv -> m Overlay
- viewedLevel :: MonadClientUI m => m (LevelId, Level)
- selectLeader :: MonadClientUI m => ActorId -> m Bool
- stopRunning :: MonadClient m => m ()
- lookAt :: MonadClientUI m => Bool -> Bool -> Point -> ActorId -> Text -> m Text
Semantics of serverl-less human commands
moveCursor :: MonadClientUI m => Vector -> Int -> WriterT Slideshow m ()Source
retargetLeader :: MonadClientUI m => WriterT Slideshow m ()Source
selectHeroHuman :: (MonadClientAbort m, MonadClientUI m) => Int -> m ()Source
memberCycleHuman :: (MonadClientAbort m, MonadClientUI m) => m ()Source
Switches current member to the next on the level, if any, wrapping.
memberBackHuman :: (MonadClientAbort m, MonadClientUI m) => m ()Source
Switches current member to the previous in the whole dungeon, wrapping.
inventoryHuman :: (MonadClientAbort m, MonadClientUI m) => WriterT Slideshow m ()Source
Display inventory
tgtFloorLeader :: MonadClientUI m => TgtMode -> WriterT Slideshow m ()Source
Start floor targeting mode or reset the cursor position to the leader. Note that the origin of a command (the hero that performs it) is unaffected by targeting. For example, not the targeted door, but one adjacent to the selected hero is closed by him.
tgtEnemyLeader :: MonadClientUI m => TgtMode -> WriterT Slideshow m ()Source
Start the enemy targeting mode. Cycle between enemy targets.
tgtAscendHuman :: (MonadClientAbort m, MonadClientUI m) => Int -> WriterT Slideshow m ()Source
Change the displayed level in targeting mode to (at most) k levels shallower. Enters targeting mode, if not already in one.
epsIncrHuman :: MonadClientAbort m => Bool -> m ()Source
Tweak the eps
parameter of the targeting digital line.
cancelHuman :: MonadClientUI m => WriterT Slideshow m () -> WriterT Slideshow m ()Source
Cancel something, e.g., targeting mode, resetting the cursor to the position of the leader. Chosen target is not invalidated.
displayMainMenu :: MonadClientUI m => WriterT Slideshow m ()Source
Display the main menu.
acceptHuman :: MonadClientUI m => WriterT Slideshow m () -> WriterT Slideshow m ()Source
Accept something, e.g., targeting mode, keeping cursor where it was. Or perform the default action, if nothing needs accepting.
clearHuman :: Monad m => m ()Source
Clear current messages, show the next screen if any.
historyHuman :: MonadClientUI m => WriterT Slideshow m ()Source
humanMarkVision :: MonadClientUI m => m ()Source
humanMarkSmell :: MonadClientUI m => m ()Source
humanMarkSuspect :: MonadClientUI m => m ()Source
helpHuman :: MonadClientUI m => WriterT Slideshow m ()Source
Display command help.
Helper functions useful also elsewhere
endTargeting :: MonadClientUI m => Bool -> m ()Source
End targeting mode, accepting the current position or not.
floorItemOverlay :: MonadClient m => ItemBag -> m OverlaySource
Create a list of item names.
itemOverlay :: MonadClient m => ItemBag -> ItemInv -> m OverlaySource
Create a list of item names.
viewedLevel :: MonadClientUI m => m (LevelId, Level)Source
selectLeader :: MonadClientUI m => ActorId -> m BoolSource
Select a faction leader. False, if nothing to do.
stopRunning :: MonadClient m => m ()Source
:: MonadClientUI m | |
=> Bool | detailed? |
-> Bool | can be seen right now? |
-> Point | position to describe |
-> ActorId | the actor that looks |
-> Text | an extra sentence to print |
-> m Text |
Produces a textual description of the terrain and items at an already explored position. Mute for unknown positions. The detailed variant is for use in the targeting mode.