Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Client.UI.HandleHumanLocalM
Description
Semantics of Game.LambdaHack.Client.UI.HumanCmd client commands that do not return server requests,, but only change internal client state. None of such commands takes game time.
Synopsis
- macroHuman :: MonadClientUI m => [String] -> m ()
- macroHumanTransition :: [KM] -> KeyMacroFrame -> [KeyMacroFrame] -> (KeyMacroFrame, [KeyMacroFrame])
- chooseItemHuman :: MonadClientUI m => ActorId -> ItemDialogMode -> m MError
- chooseItemDialogMode :: forall m. MonadClientUI m => ActorId -> Bool -> ItemDialogMode -> m (FailOrCmd ActorId)
- chooseItemProjectHuman :: forall m. (MonadClient m, MonadClientUI m) => ActorId -> [TriggerItem] -> m MError
- chooseItemApplyHuman :: forall m. MonadClientUI m => ActorId -> [TriggerItem] -> m MError
- psuitReq :: (MonadClient m, MonadClientUI m) => ActorId -> m (Either Text (ItemFull -> Either ReqFailure (Point, Bool)))
- triggerSymbols :: [TriggerItem] -> [ContentSymbol ItemKind]
- pickLeaderHuman :: MonadClientUI m => Int -> m MError
- pickLeaderWithPointerHuman :: MonadClientUI m => ActorId -> m MError
- pointmanCycleHuman :: MonadClientUI m => ActorId -> Direction -> m MError
- pointmanCycleLevelHuman :: MonadClientUI m => ActorId -> Direction -> m MError
- selectActorHuman :: MonadClientUI m => ActorId -> m ()
- selectNoneHuman :: MonadClientUI m => m ()
- selectWithPointerHuman :: MonadClientUI m => m MError
- repeatHuman :: MonadClientUI m => Int -> m ()
- repeatHumanTransition :: Int -> KeyMacroFrame -> [KeyMacroFrame] -> (KeyMacroFrame, [KeyMacroFrame])
- repeatLastHuman :: MonadClientUI m => Int -> m ()
- repeatLastHumanTransition :: Int -> KeyMacroFrame -> KeyMacroFrame
- recordHuman :: MonadClientUI m => m ()
- recordHumanTransition :: KeyMacroFrame -> (KeyMacroFrame, Text)
- allHistoryHuman :: forall m. MonadClientUI m => m ()
- markVisionHuman :: MonadClientUI m => Int -> m ()
- markSmellHuman :: MonadClientUI m => m ()
- markSuspectHuman :: MonadClient m => Int -> m ()
- markAnimHuman :: MonadClient m => m ()
- overrideTutHuman :: MonadClientUI m => Int -> m ()
- printScreenHuman :: MonadClientUI m => m ()
- cancelHuman :: MonadClientUI m => m ()
- acceptHuman :: (MonadClient m, MonadClientUI m) => ActorId -> m ()
- detailCycleHuman :: MonadClientUI m => m ()
- clearTargetIfItemClearHuman :: (MonadClient m, MonadClientUI m) => ActorId -> m ()
- itemClearHuman :: MonadClientUI m => m ()
- moveXhairHuman :: MonadClientUI m => Vector -> Int -> m MError
- aimTgtHuman :: MonadClientUI m => m ()
- aimFloorHuman :: MonadClientUI m => m ()
- aimEnemyHuman :: MonadClientUI m => m ()
- aimItemHuman :: MonadClientUI m => m ()
- aimAscendHuman :: MonadClientUI m => Int -> m MError
- epsIncrHuman :: (MonadClient m, MonadClientUI m) => Direction -> m ()
- xhairUnknownHuman :: (MonadClient m, MonadClientUI m) => ActorId -> m MError
- xhairItemHuman :: (MonadClient m, MonadClientUI m) => ActorId -> m MError
- xhairStairHuman :: (MonadClient m, MonadClientUI m) => ActorId -> Bool -> m MError
- xhairPointerFloorHuman :: MonadClientUI m => m ()
- xhairPointerMuteHuman :: MonadClientUI m => m ()
- xhairPointerEnemyHuman :: MonadClientUI m => m ()
- aimPointerFloorHuman :: MonadClientUI m => m ()
- aimPointerEnemyHuman :: MonadClientUI m => m ()
- chooseItemDialogModeLore :: forall m. MonadClientUI m => m (Maybe ResultItemDialogMode)
- projectCheck :: MonadClientUI m => ActorId -> Point -> m (Maybe ReqFailure)
- posFromXhair :: (MonadClient m, MonadClientUI m) => ActorId -> m (Either Text Point)
- permittedApplyClient :: MonadClientUI m => ActorId -> m (Maybe CStore -> ItemFull -> ItemQuant -> Either ReqFailure Bool)
- endAiming :: (MonadClient m, MonadClientUI m) => ActorId -> m ()
- endAimingMsg :: MonadClientUI m => ActorId -> m ()
- flashAiming :: MonadClientUI m => m ()
- permittedProjectClient :: MonadClientUI m => ActorId -> m (ItemFull -> Either ReqFailure Bool)
- xhairLegalEps :: MonadClientUI m => ActorId -> m (Either Text Int)
Meta commands
macroHuman :: MonadClientUI m => [String] -> m () Source #
macroHumanTransition :: [KM] -> KeyMacroFrame -> [KeyMacroFrame] -> (KeyMacroFrame, [KeyMacroFrame]) Source #
Push a new macro frame to the stack whenever repeating a macro.
Local commands
chooseItemHuman :: MonadClientUI m => ActorId -> ItemDialogMode -> m MError Source #
Display items from a given container store and possibly let the user chose one.
chooseItemDialogMode :: forall m. MonadClientUI m => ActorId -> Bool -> ItemDialogMode -> m (FailOrCmd ActorId) Source #
chooseItemProjectHuman :: forall m. (MonadClient m, MonadClientUI m) => ActorId -> [TriggerItem] -> m MError Source #
chooseItemApplyHuman :: forall m. MonadClientUI m => ActorId -> [TriggerItem] -> m MError Source #
psuitReq :: (MonadClient m, MonadClientUI m) => ActorId -> m (Either Text (ItemFull -> Either ReqFailure (Point, Bool))) Source #
On top of permittedProjectClient
, it also checks legality
of aiming at the target and projection range. It also modifies eps
.
triggerSymbols :: [TriggerItem] -> [ContentSymbol ItemKind] Source #
>>>
let trigger1 = HumanCmd.TriggerItem{tiverb="verb", tiobject="object", tisymbols=[toContentSymbol 'a', toContentSymbol 'b']}
>>>
let trigger2 = HumanCmd.TriggerItem{tiverb="verb2", tiobject="object2", tisymbols=[toContentSymbol 'c']}
>>>
triggerSymbols [trigger1, trigger2]
"abc"
>>>
triggerSymbols []
""
pickLeaderHuman :: MonadClientUI m => Int -> m MError Source #
pickLeaderWithPointerHuman :: MonadClientUI m => ActorId -> m MError Source #
pointmanCycleHuman :: MonadClientUI m => ActorId -> Direction -> m MError Source #
Switch current pointman to the previous in the whole dungeon, wrapping.
pointmanCycleLevelHuman :: MonadClientUI m => ActorId -> Direction -> m MError Source #
Switch current pointman to the next on the viewed level, if any, wrapping.
selectActorHuman :: MonadClientUI m => ActorId -> m () Source #
selectNoneHuman :: MonadClientUI m => m () Source #
selectWithPointerHuman :: MonadClientUI m => m MError Source #
repeatHuman :: MonadClientUI m => Int -> m () Source #
repeatHumanTransition :: Int -> KeyMacroFrame -> [KeyMacroFrame] -> (KeyMacroFrame, [KeyMacroFrame]) Source #
repeatLastHuman :: MonadClientUI m => Int -> m () Source #
recordHuman :: MonadClientUI m => m () Source #
Starts and stops recording of macros.
allHistoryHuman :: forall m. MonadClientUI m => m () Source #
markVisionHuman :: MonadClientUI m => Int -> m () Source #
markSmellHuman :: MonadClientUI m => m () Source #
markSuspectHuman :: MonadClient m => Int -> m () Source #
markAnimHuman :: MonadClient m => m () Source #
overrideTutHuman :: MonadClientUI m => Int -> m () Source #
printScreenHuman :: MonadClientUI m => m () Source #
Commands specific to aiming
cancelHuman :: MonadClientUI m => m () Source #
End aiming mode, rejecting the current position, unless when on remote level, in which case, return to our level.
acceptHuman :: (MonadClient m, MonadClientUI m) => ActorId -> m () Source #
Accept the current crosshair position as target, ending aiming mode, if active.
detailCycleHuman :: MonadClientUI m => m () Source #
Cycle detail level of aiming mode descriptions, starting up.
clearTargetIfItemClearHuman :: (MonadClient m, MonadClientUI m) => ActorId -> m () Source #
itemClearHuman :: MonadClientUI m => m () Source #
moveXhairHuman :: MonadClientUI m => Vector -> Int -> m MError Source #
Move the xhair. Assumes aiming mode.
aimTgtHuman :: MonadClientUI m => m () Source #
Start aiming.
aimFloorHuman :: MonadClientUI m => m () Source #
Cycle aiming mode. Do not change position of the xhair, switch target to point at different things at that position.
aimEnemyHuman :: MonadClientUI m => m () Source #
aimItemHuman :: MonadClientUI m => m () Source #
aimAscendHuman :: MonadClientUI m => Int -> m MError Source #
Change the displayed level in aiming mode to (at most) k levels shallower. Enters aiming mode, if not already in one.
epsIncrHuman :: (MonadClient m, MonadClientUI m) => Direction -> m () Source #
Tweak the eps
parameter of the aiming digital line.
xhairUnknownHuman :: (MonadClient m, MonadClientUI m) => ActorId -> m MError Source #
xhairItemHuman :: (MonadClient m, MonadClientUI m) => ActorId -> m MError Source #
xhairStairHuman :: (MonadClient m, MonadClientUI m) => ActorId -> Bool -> m MError Source #
xhairPointerFloorHuman :: MonadClientUI m => m () Source #
xhairPointerMuteHuman :: MonadClientUI m => m () Source #
xhairPointerEnemyHuman :: MonadClientUI m => m () Source #
aimPointerFloorHuman :: MonadClientUI m => m () Source #
aimPointerEnemyHuman :: MonadClientUI m => m () Source #
Internal operations
chooseItemDialogModeLore :: forall m. MonadClientUI m => m (Maybe ResultItemDialogMode) Source #
projectCheck :: MonadClientUI m => ActorId -> Point -> m (Maybe ReqFailure) Source #
posFromXhair :: (MonadClient m, MonadClientUI m) => ActorId -> m (Either Text Point) Source #
permittedApplyClient :: MonadClientUI m => ActorId -> m (Maybe CStore -> ItemFull -> ItemQuant -> Either ReqFailure Bool) Source #
endAiming :: (MonadClient m, MonadClientUI m) => ActorId -> m () Source #
End aiming mode, accepting the current position.
endAimingMsg :: MonadClientUI m => ActorId -> m () Source #
flashAiming :: MonadClientUI m => m () Source #
Operations both internal and used in unit tests
permittedProjectClient :: MonadClientUI m => ActorId -> m (ItemFull -> Either ReqFailure Bool) Source #
xhairLegalEps :: MonadClientUI m => ActorId -> m (Either Text Int) Source #
Check whether one is permitted to aim (for projecting) at a target.
The check is stricter for actor targets, assuming the player simply wants
to hit a single actor. In order to fine tune trick-shots, e.g., piercing
many actors, other aiming modes should be used.
Returns a different seps
if needed to reach the target.
Note: Simple Perception check is not enough for the check, e.g., because the target actor can be obscured by a glass wall.