Safe Haskell | None |
---|
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.
- effectToAction :: Effect -> Int -> ActorId -> ActorId -> Int -> Action (Bool, String)
- nullEffect :: Action (Bool, String)
- squashActor :: ActorId -> ActorId -> Action ()
- effLvlGoUp :: Int -> Action ()
- fleeDungeon :: Action ()
- itemEffectAction :: Int -> ActorId -> ActorId -> Item -> Action Bool
- discover :: Item -> Action ()
- selectPlayer :: ActorId -> Action Bool
- focusIfAHero :: ActorId -> Action ()
- summonHeroes :: Int -> Point -> Action ()
- summonMonsters :: Int -> Point -> Action ()
- remember :: Action ()
- rememberList :: [Point] -> Action ()
- checkPartyDeath :: Action ()
- gameOver :: Bool -> Action ()
- handleScores :: Bool -> Status -> Int -> Action Bool
- displayItems :: Msg -> Bool -> [Item] -> Action Bool
- stopRunning :: Action ()
- history :: Action ()
- doLook :: Action ()
- gameVersion :: Action ()
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.
nullEffect :: Action (Bool, String)Source
squashActor :: ActorId -> ActorId -> Action ()Source
effLvlGoUp :: Int -> Action ()Source
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.
selectPlayer :: ActorId -> Action BoolSource
Make the actor controlled by the player. Focus on the actor if level changes. False, if nothing to do.
focusIfAHero :: ActorId -> Action ()Source
summonHeroes :: Int -> Point -> Action ()Source
summonMonsters :: Int -> Point -> Action ()Source
rememberList :: [Point] -> Action ()Source
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.
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).
stopRunning :: Action ()Source
gameVersion :: Action ()Source