Safe Haskell | None |
---|
Game.LambdaHack.Actions
Description
The game action stuff that is independent from ItemAction.hs (both depend on EffectAction.hs). TODO: Add an export list and document after it's rewritten according to #17.
- displayHistory :: Action ()
- dumpConfig :: Action ()
- saveGame :: Action ()
- quitGame :: Action ()
- moveCursor :: Vector -> Int -> Action ()
- move :: Vector -> Action ()
- ifRunning :: ((Vector, Int) -> Action a) -> Action a -> Action a
- guessBump :: Ops TileKind -> Feature -> Id TileKind -> Action ()
- bumpTile :: Point -> Feature -> Action ()
- triggerTile :: Point -> Action ()
- playerTriggerDir :: Feature -> Action ()
- playerBumpDir :: Feature -> Vector -> Action ()
- playerTriggerTile :: Feature -> Action ()
- actorOpenDoor :: ActorId -> Vector -> Action ()
- tgtAscend :: Int -> Action ()
- cycleHero :: Action ()
- search :: Action ()
- moveOrAttack :: Bool -> ActorId -> Vector -> Action ()
- actorAttackActor :: ActorId -> ActorId -> Action ()
- actorRunActor :: ActorId -> ActorId -> Action ()
- rollMonster :: COps -> Perception -> State -> Rnd State
- generateMonster :: Action ()
- regenerateLevelHP :: Action ()
Documentation
displayHistory :: Action ()Source
dumpConfig :: Action ()Source
moveCursor :: Vector -> Int -> Action ()Source
guessBump :: Ops TileKind -> Feature -> Id TileKind -> Action ()Source
Guess and report why the bump command failed.
triggerTile :: Point -> Action ()Source
Perform the action specified for the tile in case it's triggered.
playerTriggerDir :: Feature -> Action ()Source
Ask for a direction and trigger a tile, if possible.
playerBumpDir :: Feature -> Vector -> Action ()Source
Player tries to trigger a tile in a given direction.
playerTriggerTile :: Feature -> Action ()Source
Player tries to trigger the tile he's standing on.
actorOpenDoor :: ActorId -> Vector -> Action ()Source
An actor opens a door. Player (hero or controlled monster) or enemy.
tgtAscend :: Int -> Action ()Source
Change the displayed level in targeting mode to (at most) k levels shallower. Enters targeting mode, if not already in one.
This function performs a move (or attack) by any actor, i.e., it can handle monsters, heroes and both.
actorAttackActor :: ActorId -> ActorId -> Action ()Source
Resolves the result of an actor moving into another. Usually this involves melee attack, but with two heroes it just changes focus. Actors on blocked locations can be attacked without any restrictions. For instance, an actor embedded in a wall can be attacked from an adjacent position. This function is analogous to projectGroupItem, but for melee and not using up the weapon.
actorRunActor :: ActorId -> ActorId -> Action ()Source
Resolves the result of an actor running (not walking) into another. This involves switching positions of the two actors.
rollMonster :: COps -> Perception -> State -> Rnd StateSource
Create a new monster in the level, at a random position.
generateMonster :: Action ()Source
Generate a monster, possibly.
regenerateLevelHP :: Action ()Source
Possibly regenerate HP for all actors on the current level.