LambdaHack-0.2.10.5: 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

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.

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.

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.

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

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

lookAtSource

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.