LambdaHack-0.2.10: A roguelike game engine in early and active development

Safe HaskellNone

Game.LambdaHack.Client.HumanLocal

Contents

Description

Semantics of HumanCmd client commands that do not return server commands. None of such commands takes game time. TODO: document

Synopsis

Semantics of serverl-less human commands

moveCursor :: MonadClientUI m => Vector -> Int -> WriterT Slideshow m ()

memberCycleHuman :: (MonadClientAbort m, MonadClientUI m) => m ()

Switches current member to the next on the level, if any, wrapping.

memberBackHuman :: (MonadClientAbort m, MonadClientUI m) => m ()

Switches current member to the previous in the whole dungeon, wrapping.

inventoryHuman :: (MonadClientAbort m, MonadClientUI m) => WriterT Slideshow m ()

Display inventory

tgtFloorLeader :: MonadClientUI m => TgtMode -> WriterT Slideshow m ()

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 ()

Start the enemy targeting mode. Cycle between enemy targets.

tgtAscendHuman :: (MonadClientAbort m, MonadClientUI m) => Int -> WriterT Slideshow m ()

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 ()

Tweak the eps parameter of the targeting digital line.

cancelHuman :: MonadClientUI m => WriterT Slideshow m () -> WriterT Slideshow m ()

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 ()

Display the main menu.

acceptHuman :: MonadClientUI m => WriterT Slideshow m () -> WriterT Slideshow m ()

Accept something, e.g., targeting mode, keeping cursor where it was. Or perform the default action, if nothing needs accepting.

clearHuman :: Monad m => m ()

Clear current messages, show the next screen if any.

helpHuman :: MonadClientUI m => WriterT Slideshow m ()

Display command help.

Helper functions useful also elsewhere

endTargeting :: MonadClientUI m => Bool -> m ()

End targeting mode, accepting the current position or not.

floorItemOverlay :: MonadClient m => ItemBag -> m Overlay

Create a list of item names.

itemOverlay :: MonadClient m => ItemBag -> ItemInv -> m Overlay

Create a list of item names.

selectLeader :: MonadClientUI m => ActorId -> m Bool

Select a faction leader. False, if nothing to do.

lookAt

Arguments

:: 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.