Safe Haskell | Safe-Infered |
---|
- isAHero :: State -> ActorId -> Bool
- isAMonster :: State -> ActorId -> Bool
- smellTimeout :: State -> Time
- findActorAnyLevel :: ActorId -> State -> (LevelId, Actor, [Item])
- tryFindActor :: State -> (Actor -> Bool) -> Maybe (ActorId, Actor)
- getPlayerBody :: State -> Actor
- getPlayerItem :: State -> [Item]
- allHeroesAnyLevel :: State -> [ActorId]
- updateAnyActorBody :: ActorId -> (Actor -> Actor) -> State -> State
- updateAnyActorItem :: ActorId -> ([Item] -> [Item]) -> State -> State
- updateAnyLevel :: (Level -> Level) -> LevelId -> State -> State
- targetToLoc :: IntSet -> State -> Point -> Maybe Point
- memActor :: ActorId -> State -> Bool
- getActor :: ActorId -> State -> Actor
- getActorItem :: ActorId -> State -> [Item]
- deleteActor :: ActorId -> State -> State
- insertActor :: ActorId -> Actor -> State -> State
- deletePlayer :: State -> State
- heroAssocs, allButHeroesAssocs, friendlyAssocs, dangerousAssocs, hostileAssocs :: Level -> [(ActorId, Actor)]
- heroList, friendlyList, dangerousList, hostileList :: State -> [Actor]
- locToActor :: Point -> State -> Maybe ActorId
- locToActors :: Point -> State -> [ActorId]
- nearbyFreeLoc :: Ops TileKind -> Point -> State -> Point
- calculateTotal :: Ops ItemKind -> State -> ([Item], Int)
- tryFindHeroK :: State -> Int -> Maybe ActorId
- addHero :: COps -> Point -> State -> State
- initialHeroes :: COps -> Point -> State -> State
- addMonster :: Ops TileKind -> Id ActorKind -> Int -> Point -> State -> State
- addProjectile :: COps -> Item -> Point -> PartyId -> [Point] -> Time -> State -> State
Documentation
isAMonster :: State -> ActorId -> BoolSource
Checks whether an actor identifier represents a monster.
smellTimeout :: State -> TimeSource
How long until an actor's smell vanishes from a tile.
findActorAnyLevel :: ActorId -> State -> (LevelId, Actor, [Item])Source
Finds an actor body on any level. Fails if not found.
tryFindActor :: State -> (Actor -> Bool) -> Maybe (ActorId, Actor)Source
Tries to finds an actor body satisfying a predicate on any level.
getPlayerBody :: State -> ActorSource
getPlayerItem :: State -> [Item]Source
allHeroesAnyLevel :: State -> [ActorId]Source
The list of actors and their levels for all heroes in the dungeon.
targetToLoc :: IntSet -> State -> Point -> Maybe PointSource
Calculate the location of player's target.
memActor :: ActorId -> State -> BoolSource
Checks if the actor is present on the current level. The order of argument here and in other functions is set to allow
b <- gets (memActor a)
getActor :: ActorId -> State -> ActorSource
Gets actor body from the current level. Error if not found.
getActorItem :: ActorId -> State -> [Item]Source
Gets actor's items from the current level. Empty list, if not found.
deleteActor :: ActorId -> State -> StateSource
Removes the actor, if present, from the current level.
deletePlayer :: State -> StateSource
Removes a player from the current level.
heroAssocs, allButHeroesAssocs, friendlyAssocs, dangerousAssocs, hostileAssocs :: Level -> [(ActorId, Actor)]Source
heroList, friendlyList, dangerousList, hostileList :: State -> [Actor]Source
locToActor :: Point -> State -> Maybe ActorIdSource
Finds an actor at a location on the current level. Perception irrelevant.
locToActors :: Point -> State -> [ActorId]Source
calculateTotal :: Ops ItemKind -> State -> ([Item], Int)Source
Calculate loot's worth for heroes on the current level.
addHero :: COps -> Point -> State -> StateSource
Create a new hero on the current level, close to the given location.
initialHeroes :: COps -> Point -> State -> StateSource
Create a set of initial heroes on the current level, at location ploc.