Safe Haskell | None |
---|
Game.LambdaHack.ActorState
Description
- findActorAnyLevel :: ActorId -> State -> (LevelId, Actor, [Item])
- absentHero :: ActorId -> State -> Bool
- getPlayerBody :: State -> Actor
- getPlayerItem :: State -> [Item]
- allHeroesAnyLevel :: State -> [(ActorId, LevelId)]
- updateAnyActorBody :: ActorId -> (Actor -> Actor) -> State -> State
- updateAnyActorItem :: ActorId -> ([Item] -> [Item]) -> State -> State
- updateAnyLevel :: (Level -> Level) -> LevelId -> State -> State
- targetToLoc :: IntSet -> State -> 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
- levelHeroList :: State -> [Actor]
- levelMonsterList :: State -> [Actor]
- locToActor :: Point -> State -> Maybe ActorId
- locToActors :: Point -> State -> [ActorId]
- nearbyFreeLoc :: Ops TileKind -> Point -> State -> Point
- addHero :: COps -> Point -> State -> State
- initialHeroes :: COps -> Point -> State -> State
- addMonster :: Ops TileKind -> Id ActorKind -> Int -> Point -> State -> State
- calculateTotal :: Ops ItemKind -> State -> Int
Documentation
findActorAnyLevel :: ActorId -> State -> (LevelId, Actor, [Item])Source
Finds an actor body on any level. Fails if not found.
absentHero :: ActorId -> State -> BoolSource
Checks whether an actor is a hero, but not a member of the party.
getPlayerBody :: State -> ActorSource
getPlayerItem :: State -> [Item]Source
allHeroesAnyLevel :: State -> [(ActorId, LevelId)]Source
The list of actors and their levels for all heroes in the dungeon.
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 and party list.
levelHeroList :: State -> [Actor]Source
levelMonsterList :: 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
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.