LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Client.UI.HandleHumanM

Contents

- Internal operations

Description

Semantics of human player commands.

Synopsis

- cmdSemInCxtOfKM :: (MonadClient m, MonadClientUI m) => KM -> HumanCmd -> m (Either MError ReqUI)
- updateKeyLast :: KM -> HumanCmd -> KeyMacroFrame -> KeyMacroFrame
- noRemoteHumanCmd :: HumanCmd -> Bool
- data CmdLeaderNeed (m :: Type -> Type)
- cmdSemantics :: (MonadClient m, MonadClientUI m) => HumanCmd -> m (Either MError ReqUI)
- cmdSemanticsLeader :: forall (m :: Type -> Type). (MonadClient m, MonadClientUI m) => HumanCmd -> CmdLeaderNeed m
- addNoError :: Monad m => m () -> CmdLeaderNeed m
- addLeader :: Monad m => (ActorId -> m ()) -> CmdLeaderNeed m
- weaveLeader :: Monad m => (ActorId -> m (FailOrCmd ReqUI)) -> CmdLeaderNeed m

# Documentation

cmdSemInCxtOfKM :: (MonadClient m, MonadClientUI m) => KM -> HumanCmd -> m (Either MError ReqUI) Source #

The semantics of human player commands in terms of the client monad, in context of the given `km` as the last action.

Some time cosuming commands are enabled even in aiming mode, but cannot be invoked in aiming mode on a remote level (level different than the level of the leader). Commands that require a pointman fail when no leader is designated.

updateKeyLast :: KM -> HumanCmd -> KeyMacroFrame -> KeyMacroFrame Source #

# Internal operations

noRemoteHumanCmd :: HumanCmd -> Bool Source #

Commands that are forbidden on a remote level, because they would usually take time when invoked on one, but not necessarily do what the player expects. Note that some commands that normally take time are not included, because they don't take time in aiming mode or their individual sanity conditions include a remote level check.

data CmdLeaderNeed (m :: Type -> Type) Source #

cmdSemantics :: (MonadClient m, MonadClientUI m) => HumanCmd -> m (Either MError ReqUI) Source #

cmdSemanticsLeader :: forall (m :: Type -> Type). (MonadClient m, MonadClientUI m) => HumanCmd -> CmdLeaderNeed m Source #

addNoError :: Monad m => m () -> CmdLeaderNeed m Source #

addLeader :: Monad m => (ActorId -> m ()) -> CmdLeaderNeed m Source #

weaveLeader :: Monad m => (ActorId -> m (FailOrCmd ReqUI)) -> CmdLeaderNeed m Source #