Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hacks that haven't found their home yet.
- data FactionId
- data LevelId
- newtype AbsDepth = AbsDepth Int
- data ActorId
- data Container
- data CStore
- data ItemDialogMode
- normalLevelBound :: (Int, Int)
- divUp :: Integral a => a -> a -> a
- data GroupName a
- toGroupName :: Text -> GroupName a
- type Freqs a = [(GroupName a, Int)]
- breturn :: MonadPlus m => Bool -> a -> m a
- serverSaveName :: String
- type Rarity = [(Double, Int)]
- validateRarity :: Rarity -> [Text]
- data Tactic
- isRight :: Either a b -> Bool
Game object identifiers
A unique identifier of a faction in a game.
Abstract level identifiers.
Absolute depth in the dungeon. When used for the maximum depth of the whole dungeon, this can be different than dungeon size, e.g., when the dungeon is branched, and it can even be different than the length of the longest branch, if levels at some depths are missing.
A unique identifier of an actor in the dungeon.
Item containers
Item container type.
data ItemDialogMode Source
Assorted
normalLevelBound :: (Int, Int) Source
Level bounds. TODO: query terminal size instead and scroll view.
toGroupName :: Text -> GroupName a Source
type Freqs a = [(GroupName a, Int)] Source
For each group that the kind belongs to, denoted by a GroupName
in the first component of a pair, the second component of a pair shows
how common the kind is within the group.
validateRarity :: Rarity -> [Text] Source
TBlock | always only wait, even if enemy in melee range |
TFollow | always follow leader's target or his position if no target |
TExplore | if enemy nearby, attack, if no items, etc., explore unknown |
TRoam | if enemy nearby, attack, if no items, etc., roam randomly |
TPatrol | find an open and uncrowded area, patrol it according
to sight radius and fallback temporarily to |