Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Common.ActorState
Description
- fidActorNotProjAssocs :: FactionId -> State -> [(ActorId, Actor)]
- fidActorNotProjList :: FactionId -> State -> [Actor]
- actorAssocsLvl :: (FactionId -> Bool) -> Level -> ActorDict -> [(ActorId, Actor)]
- actorAssocs :: (FactionId -> Bool) -> LevelId -> State -> [(ActorId, Actor)]
- actorList :: (FactionId -> Bool) -> LevelId -> State -> [Actor]
- actorRegularAssocsLvl :: (FactionId -> Bool) -> Level -> ActorDict -> [(ActorId, Actor)]
- actorRegularAssocs :: (FactionId -> Bool) -> LevelId -> State -> [(ActorId, Actor)]
- actorRegularList :: (FactionId -> Bool) -> LevelId -> State -> [Actor]
- bagAssocs :: State -> ItemBag -> [(ItemId, Item)]
- bagAssocsK :: State -> ItemBag -> [(ItemId, (Item, ItemQuant))]
- calculateTotal :: Actor -> State -> (ItemBag, Int)
- mergeItemQuant :: ItemQuant -> ItemQuant -> ItemQuant
- sharedAllOwnedFid :: Bool -> FactionId -> State -> ItemBag
- findIid :: ActorId -> FactionId -> ItemId -> State -> [(Actor, CStore)]
- getCBag :: Container -> State -> ItemBag
- getActorBag :: ActorId -> CStore -> State -> ItemBag
- getBodyActorBag :: Actor -> CStore -> State -> ItemBag
- mapActorItems_ :: Monad m => (CStore -> ItemId -> ItemQuant -> m a) -> Actor -> State -> m ()
- getActorAssocs :: ActorId -> CStore -> State -> [(ItemId, Item)]
- nearbyFreePoints :: (Id TileKind -> Bool) -> Point -> LevelId -> State -> [Point]
- whereTo :: LevelId -> Point -> Int -> Dungeon -> (LevelId, Point)
- getCarriedAssocs :: Actor -> State -> [(ItemId, Item)]
- getCarriedIidCStore :: Actor -> [(ItemId, CStore)]
- posToActors :: Point -> LevelId -> State -> [(ActorId, Actor)]
- getItemBody :: ItemId -> State -> Item
- memActor :: ActorId -> LevelId -> State -> Bool
- getActorBody :: ActorId -> State -> Actor
- tryFindHeroK :: FactionId -> Int -> State -> Maybe (ActorId, Actor)
- getLocalTime :: LevelId -> State -> Time
- itemPrice :: (Item, Int) -> Int
- regenCalmDelta :: Actor -> [ItemFull] -> State -> Int64
- actorInAmbient :: Actor -> State -> Bool
- actorSkills :: Maybe ActorId -> ActorId -> [ItemFull] -> State -> Skills
- dispEnemy :: ActorId -> ActorId -> [ItemFull] -> State -> Bool
- fullAssocs :: COps -> DiscoveryKind -> DiscoveryEffect -> ActorId -> [CStore] -> State -> [(ItemId, ItemFull)]
- itemToFull :: COps -> DiscoveryKind -> DiscoveryEffect -> ItemId -> Item -> ItemQuant -> ItemFull
- goesIntoEqp :: ItemFull -> Bool
- goesIntoInv :: ItemFull -> Bool
- goesIntoSha :: ItemFull -> Bool
- eqpOverfull :: Actor -> Int -> Bool
- eqpFreeN :: Actor -> Int
- storeFromC :: Container -> CStore
- lidFromC :: Container -> State -> LevelId
- aidFromC :: Container -> Maybe ActorId
- hasCharge :: Time -> ItemFull -> Bool
- strongestMelee :: Bool -> Time -> [(ItemId, ItemFull)] -> [(Int, (ItemId, ItemFull))]
- isMelee :: ItemFull -> Bool
- isMeleeEqp :: ItemFull -> Bool
Documentation
calculateTotal :: Actor -> State -> (ItemBag, Int) Source #
Calculate loot's worth for a faction of a given actor.
mapActorItems_ :: Monad m => (CStore -> ItemId -> ItemQuant -> m a) -> Actor -> State -> m () Source #
Arguments
:: LevelId | level of the stairs |
-> Point | position of the stairs |
-> Int | jump up this many levels |
-> Dungeon | current game dungeon |
-> (LevelId, Point) | target level and the position of its receiving stairs |
Compute the level identifier and starting position on the level, after a level change.
posToActors :: Point -> LevelId -> State -> [(ActorId, Actor)] Source #
Finds all actors at a position on the current level.
memActor :: ActorId -> LevelId -> State -> Bool Source #
Checks if the actor is present on the current level. The order of argument here and in other functions is set to allow
b <- getsState (memActor a)
getActorBody :: ActorId -> State -> Actor Source #
Gets actor body from the current level. Error if not found.
fullAssocs :: COps -> DiscoveryKind -> DiscoveryEffect -> ActorId -> [CStore] -> State -> [(ItemId, ItemFull)] Source #
itemToFull :: COps -> DiscoveryKind -> DiscoveryEffect -> ItemId -> Item -> ItemQuant -> ItemFull Source #
goesIntoEqp :: ItemFull -> Bool Source #
goesIntoInv :: ItemFull -> Bool Source #
goesIntoSha :: ItemFull -> Bool Source #
storeFromC :: Container -> CStore Source #
lidFromC :: Container -> State -> LevelId Source #
Determine the dungeon level of the container. If the item is in a shared stash, the level depends on which actor asks.
isMeleeEqp :: ItemFull -> Bool Source #