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.
- actorVerb :: Ops ActorKind -> Actor -> Text -> Text
- rndToAction :: Rnd a -> Action a
- updateAnyActor :: ActorId -> (Actor -> Actor) -> Action ()
- updatePlayerBody :: (Actor -> Actor) -> Action ()
- effectToAction :: Effect -> Int -> ActorId -> ActorId -> Int -> Bool -> Action (Bool, Bool)
- eff :: Effect -> Int -> ActorId -> ActorId -> Int -> Action (Bool, Text)
- nullEffect :: Action (Bool, Text)
- squashActor :: ActorId -> ActorId -> Action ()
- effLvlGoUp :: Int -> Action ()
- switchLevel :: LevelId -> Action ()
- fleeDungeon :: Action ()
- itemEffectAction :: Int -> ActorId -> ActorId -> Item -> Bool -> 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 ()
Invoke pseudo-random computation with the generator kept in the state.
Update actor stats. Works for actors on other levels, too.
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.
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).
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.
The source actor affects the target actor, with a given item. If the event is seen, the item may get identified.
Make the actor controlled by the player. Switch level, if needed. False, if nothing to do. Should only be invoked as a direct result of a player action or the selected player actor death.
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.
Create a list of item names, split into many overlays.