LambdaHack-0.2.0: A roguelike game engine in early and very active development

Safe HaskellNone

Game.LambdaHack.EffectAction

Description

The effectToAction function and all it depends on. This file should not depend on Actions.hs nor ItemAction.hs. TODO: Add an export list and document after it's rewritten according to #17.

Synopsis

Documentation

effectToAction :: Effect -> Int -> ActorId -> ActorId -> Int -> Action (Bool, String)Source

The source actor affects the target actor, with a given effect and power. The second argument is verbosity of the resulting message. Both actors are on the current level and can be the same actor. The bool result indicates if the actors identify the effect.

fleeDungeon :: Action ()Source

The player leaves the dungeon.

itemEffectAction :: Int -> ActorId -> ActorId -> Item -> Action BoolSource

The source actor affects the target actor, with a given item. If the event is seen, the item may get identified.

discover :: Item -> Action ()Source

Make the item known to the player.

selectPlayer :: ActorId -> Action BoolSource

Make the actor controlled by the player. Focus on the actor if level changes. False, if nothing to do.

remember :: Action ()Source

Update player memory.

checkPartyDeath :: Action ()Source

Remove dead heroes (or dead dominated monsters). Check if game is over. For now we only check the selected hero and at current level, but if poison, etc. is implemented, we'd need to check all heroes on any level.

gameOver :: Bool -> Action ()Source

End game, showing the ending screens, if requested.

handleScores :: Bool -> Status -> Int -> Action BoolSource

Handle current score and display it with the high scores. False if display of the scores was void or interrupted by the user.

Warning: scores are shown during the game, so we should be careful not to leak secret information through them (e.g., the nature of the items through the total worth of inventory).

history :: Action ()Source

Store current msg in the history and reset current msg.

doLook :: Action ()Source

Perform look around in the current location of the cursor.