LambdaHack-0.7.0.0: A game engine library for roguelike dungeon crawlers

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

# Local commands

clearHuman :: MonadClientUI m => m () Source #

Clear current messages, cycle key hints mode.

Display items from a given container store and possibly let the user chose one.

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

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

historyHuman :: forall m. MonadClientUI m => m () Source #

# Commands specific to aiming

cancelHuman :: MonadClientUI m => m () Source #

End aiming mode, rejecting the current position.

acceptHuman :: MonadClientUI m => m () Source #

Accept the current x-hair position as target, ending aiming mode, if active.

Move the xhair. Assumes aiming mode.

Start aiming.

aimFloorHuman :: MonadClientUI m => m () Source #

Cycle aiming mode. Do not change position of the xhair, switch among things at that position.

Change the displayed level in aiming mode to (at most) k levels shallower. Enters aiming mode, if not already in one.

epsIncrHuman :: MonadClientUI m => Bool -> m () Source #

Tweak the eps parameter of the aiming digital line.

# Internal operations

Check whether one is permitted to aim (for projecting) at a target (this is only checked for actor targets so that the player doesn't miss enemy getting out of sight; but for positions we let player shoot at obstacles, e.g., to destroy them, and shoot at a lying item and then at its posision, after enemy picked up the item). Returns a different seps if needed to reach the target actor.

Note: Perception is not enough for the check, because the target actor can be obscured by a glass wall or be out of sight range, but in weapon range.

endAiming :: MonadClientUI m => m () Source #

End aiming mode, accepting the current position.

doLook :: MonadClientUI m => m () Source #

Perform look around in the current position of the xhair. Does nothing outside aiming mode.