Safe Haskell | Safe-Infered |
---|
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, Bool)
- eff :: Effect -> Int -> ActorId -> ActorId -> Int -> Action (Bool, String)
- nullEffect :: Action (Bool, String)
- squashActor :: ActorId -> ActorId -> Action ()
- effLvlGoUp :: Int -> Action ()
- switchLevel :: LevelId -> Action ()
- fleeDungeon :: Action ()
- itemEffectAction :: Int -> ActorId -> ActorId -> Item -> Action ()
- discover :: Item -> Action ()
- selectPlayer :: ActorId -> Action Bool
- focusIfOurs :: ActorId -> Action Bool
- summonHeroes :: Int -> Point -> Action ()
- summonMonsters :: Int -> Point -> Action ()
- checkPartyDeath :: Action ()
- gameOver :: Bool -> Action ()
- itemOverlay :: Bool -> Bool -> [Item] -> Action [Overlay]
- stopRunning :: Action ()
- doLook :: ActionFrame ()
- gameVersion :: Action ()
Documentation
effectToAction :: Effect -> Int -> ActorId -> ActorId -> Int -> Action (Bool, Bool)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 first bool result indicates if the effect was spectacular enough for the actors to identify it (and the item that caused it, if any). The second bool tells if the effect was seen by or affected the party.
eff :: Effect -> Int -> ActorId -> ActorId -> Int -> Action (Bool, String)Source
The boolean part of the result says if the ation was interesting and the string part describes how the target reacted (not what the source did).
nullEffect :: Action (Bool, String)Source
effLvlGoUp :: Int -> Action ()Source
switchLevel :: LevelId -> Action ()Source
Change level and reset it's time and update the times of all actors.
The player may be added to lactor
of the new level only after
this operation is executed.
fleeDungeon :: Action ()Source
The player leaves the dungeon.
itemEffectAction :: Int -> ActorId -> ActorId -> Item -> Action ()Source
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.
focusIfOurs :: ActorId -> Action BoolSource
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.
itemOverlay :: Bool -> Bool -> [Item] -> Action [Overlay]Source
Create a list of item names, split into many overlays.
doLook :: ActionFrame ()Source
Perform look around in the current location of the cursor.