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 ()
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. Focus on the actor if level changes. False, if nothing to do.
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.