Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- fidActorNotProjAssocs :: FactionId -> State -> [(ActorId, Actor)]
- actorAssocs :: (FactionId -> Bool) -> LevelId -> State -> [(ActorId, Actor)]
- fidActorRegularAssocs :: FactionId -> LevelId -> State -> [(ActorId, Actor)]
- fidActorRegularIds :: FactionId -> LevelId -> State -> [ActorId]
- foeRegularAssocs :: FactionId -> LevelId -> State -> [(ActorId, Actor)]
- foeRegularList :: FactionId -> LevelId -> State -> [Actor]
- friendRegularAssocs :: FactionId -> LevelId -> State -> [(ActorId, Actor)]
- friendRegularList :: FactionId -> LevelId -> State -> [Actor]
- bagAssocs :: State -> ItemBag -> [(ItemId, Item)]
- bagAssocsK :: State -> ItemBag -> [(ItemId, (Item, ItemQuant))]
- posToAidsLvl :: Point -> Level -> [ActorId]
- posToAids :: Point -> LevelId -> State -> [ActorId]
- posToAssocs :: Point -> LevelId -> State -> [(ActorId, Actor)]
- nearbyFreePoints :: (ContentId TileKind -> Bool) -> Point -> LevelId -> State -> [Point]
- calculateTotal :: FactionId -> State -> (ItemBag, Int)
- itemPrice :: Int -> ItemKind -> Int
- mergeItemQuant :: ItemQuant -> ItemQuant -> ItemQuant
- findIid :: ActorId -> FactionId -> ItemId -> State -> [(ActorId, (Actor, CStore))]
- combinedInv :: FactionId -> State -> ItemBag
- combinedEqp :: FactionId -> State -> ItemBag
- combinedOrgan :: FactionId -> State -> ItemBag
- combinedItems :: FactionId -> State -> ItemBag
- combinedFromLore :: SLore -> FactionId -> State -> ItemBag
- getActorBody :: ActorId -> State -> Actor
- getActorAspect :: ActorId -> State -> AspectRecord
- canTraverse :: ActorId -> State -> Bool
- getCarriedAssocsAndTrunk :: Actor -> State -> [(ItemId, Item)]
- getCarriedIidCStore :: Actor -> [(ItemId, CStore)]
- getContainerBag :: Container -> State -> ItemBag
- getFloorBag :: LevelId -> Point -> State -> ItemBag
- getEmbedBag :: LevelId -> Point -> State -> ItemBag
- getBodyStoreBag :: Actor -> CStore -> State -> ItemBag
- mapActorItems_ :: Monad m => (CStore -> ItemId -> ItemQuant -> m a) -> Actor -> State -> m ()
- getActorAssocs :: ActorId -> CStore -> State -> [(ItemId, Item)]
- getActorAssocsK :: ActorId -> CStore -> State -> [(ItemId, (Item, ItemQuant))]
- memActor :: ActorId -> LevelId -> State -> Bool
- getLocalTime :: LevelId -> State -> Time
- regenCalmDelta :: ActorId -> Actor -> State -> Int64
- actorInAmbient :: Actor -> State -> Bool
- canDeAmbientList :: Actor -> State -> [Point]
- actorSkills :: Maybe ActorId -> ActorId -> State -> Skills
- dispEnemy :: ActorId -> ActorId -> Skills -> State -> Bool
- itemToFull :: ItemId -> State -> ItemFull
- fullAssocs :: ActorId -> [CStore] -> State -> [(ItemId, ItemFull)]
- kitAssocs :: ActorId -> [CStore] -> State -> [(ItemId, ItemFullKit)]
- getItemKindId :: Item -> State -> ContentId ItemKind
- getIidKindId :: ItemId -> State -> ContentId ItemKind
- getItemKind :: Item -> State -> ItemKind
- getIidKind :: ItemId -> State -> ItemKind
- getItemKindIdServer :: Item -> State -> ContentId ItemKind
- getIidKindIdServer :: ItemId -> State -> ContentId ItemKind
- getItemKindServer :: Item -> State -> ItemKind
- getIidKindServer :: ItemId -> State -> ItemKind
- storeFromC :: Container -> CStore
- aidFromC :: Container -> Maybe ActorId
- lidFromC :: Container -> State -> LevelId
- posFromC :: Container -> State -> Point
- isStair :: LevelId -> Point -> State -> Bool
- anyFoeAdj :: ActorId -> State -> Bool
- actorAdjacentAssocs :: Actor -> State -> [(ActorId, Actor)]
- armorHurtBonus :: ActorId -> ActorId -> State -> Int
- inMelee :: FactionId -> LevelId -> State -> Bool
Documentation
calculateTotal :: FactionId -> State -> (ItemBag, Int) Source #
Calculate loot's worth for a given faction.
getActorAspect :: ActorId -> State -> AspectRecord Source #
mapActorItems_ :: Monad m => (CStore -> ItemId -> ItemQuant -> m a) -> Actor -> State -> m () Source #
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)
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.
anyFoeAdj :: ActorId -> State -> Bool Source #
Require that any non-dying foe is adjacent. We include even projectiles that explode when stricken down, because they can be caught and then they don't explode, so it makes sense to focus on handling them. If there are many projectiles in a single adjacent position, we only test the first one, the one that would be hit in melee (this is not optimal if the actor would need to flee instead of meleeing, but fleeing with *many* projectiles adjacent is a possible waste of a move anyway).
inMelee :: FactionId -> LevelId -> State -> Bool Source #
Check if any non-dying foe (projectile or not) is adjacent to any of our normal actors (whether they can melee or just need to flee, in which case alert is needed so that they are not slowed down by others). This is needed only by AI and computed as lazily as possible.