Safe Haskell | None |
---|
- isProjectile :: State -> ActorId -> Bool
- isAHero :: State -> ActorId -> Bool
- getPlayerBody :: State -> Actor
- findActorAnyLevel :: ActorId -> State -> (LevelId, Actor, [Item])
- calculateTotal :: Ops ItemKind -> State -> ([Item], Int)
- smellTimeout :: State -> Time
- initialHeroes :: COps -> Point -> State -> State
- deletePlayer :: State -> State
- allHeroesAnyLevel :: State -> [ActorId]
- locToActor :: Point -> State -> Maybe ActorId
- deleteActor :: ActorId -> State -> State
- addHero :: COps -> Point -> State -> State
- addMonster :: Ops TileKind -> Id ActorKind -> Int -> Point -> Id FactionKind -> Bool -> State -> State
- updateAnyActorItem :: ActorId -> ([Item] -> [Item]) -> State -> State
- insertActor :: ActorId -> Actor -> State -> State
- heroList :: State -> [Actor]
- memActor :: ActorId -> State -> Bool
- getActor :: ActorId -> State -> Actor
- updateAnyActorBody :: ActorId -> (Actor -> Actor) -> State -> State
- hostileList :: State -> [Actor]
- getActorItem :: ActorId -> State -> [Item]
- getPlayerItem :: State -> [Item]
- tryFindHeroK :: State -> Int -> Maybe ActorId
- dangerousList :: State -> [Actor]
- factionList :: [Id FactionKind] -> State -> [Actor]
- addProjectile :: COps -> Item -> Point -> Id FactionKind -> [Point] -> Time -> State -> State
- foesAdjacent :: X -> Y -> Point -> [Actor] -> Bool
- targetToLoc :: IntSet -> State -> Point -> Maybe Point
- hostileAssocs :: Id FactionKind -> Level -> [(ActorId, Actor)]
Documentation
isProjectile :: State -> ActorId -> BoolSource
Checks whether an actor identifier represents a hero.
getPlayerBody :: State -> ActorSource
findActorAnyLevel :: ActorId -> State -> (LevelId, Actor, [Item])Source
Finds an actor body on any level. Fails if not found.
calculateTotal :: Ops ItemKind -> State -> ([Item], Int)Source
Calculate loot's worth for heroes on the current level.
smellTimeout :: State -> TimeSource
How long until an actor's smell vanishes from a tile.
initialHeroes :: COps -> Point -> State -> StateSource
Create a set of initial heroes on the current level, at location ploc.
deletePlayer :: State -> StateSource
Removes a player from the current level.
allHeroesAnyLevel :: State -> [ActorId]Source
The list of actors and their levels for all heroes in the dungeon.
locToActor :: Point -> State -> Maybe ActorIdSource
Finds an actor at a location on the current level. Perception irrelevant.
deleteActor :: ActorId -> State -> StateSource
Removes the actor, if present, from the current level.
addHero :: COps -> Point -> State -> StateSource
Create a new hero on the current level, close to the given location.
addMonster :: Ops TileKind -> Id ActorKind -> Int -> Point -> Id FactionKind -> Bool -> State -> StateSource
Create a new monster in the level, at a given position and with a given actor kind and HP.
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.
hostileList :: State -> [Actor]Source
getActorItem :: ActorId -> State -> [Item]Source
Gets actor's items from the current level. Empty list, if not found.
getPlayerItem :: State -> [Item]Source
dangerousList :: State -> [Actor]Source
factionList :: [Id FactionKind] -> State -> [Actor]Source
addProjectile :: COps -> Item -> Point -> Id FactionKind -> [Point] -> Time -> State -> StateSource
Create a projectile actor containing the given missile.
targetToLoc :: IntSet -> State -> Point -> Maybe PointSource
Calculate the location of player's target.
hostileAssocs :: Id FactionKind -> Level -> [(ActorId, Actor)]Source