LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Server.StartM

Contents

- Internal operations

Description

Operations for starting and restarting the game.

Synopsis

- initPer :: MonadServer m => m ()
- reinitGame :: MonadServerAtomic m => FactionDict -> m ()
- gameReset :: MonadServer m => ServerOptions -> Maybe (GroupName ModeKind) -> Maybe SMGen -> m State
- applyDebug :: MonadServer m => m ()
- sampleTrunks :: MonadServerAtomic m => Dungeon -> m GenerationAnalytics
- sampleItems :: MonadServerAtomic m => Dungeon -> m GenerationAnalytics
- mapFromFuns :: Ord b => [a] -> [a -> b] -> Map b a
- resetFactions :: ContentData FactionKind -> AbsDepth -> ModeKind -> Bool -> Rnd FactionDict
- populateDungeon :: MonadServerAtomic m => m ()
- findEntryPoss :: COps -> Level -> Int -> Rnd [Point]

# Documentation

initPer :: MonadServer m => m () Source #

reinitGame :: MonadServerAtomic m => FactionDict -> m () Source #

gameReset :: MonadServer m => ServerOptions -> Maybe (GroupName ModeKind) -> Maybe SMGen -> m State Source #

applyDebug :: MonadServer m => m () Source #

Apply options that don't need a new game.

# Internal operations

sampleTrunks :: MonadServerAtomic m => Dungeon -> m GenerationAnalytics Source #

sampleItems :: MonadServerAtomic m => Dungeon -> m GenerationAnalytics Source #

mapFromFuns :: Ord b => [a] -> [a -> b] -> Map b a Source #

resetFactions :: ContentData FactionKind -> AbsDepth -> ModeKind -> Bool -> Rnd FactionDict Source #

populateDungeon :: MonadServerAtomic m => m () Source #

findEntryPoss :: COps -> Level -> Int -> Rnd [Point] Source #

Find starting postions for all factions. Try to make them distant from each other. Place as many of the factions, as possible, over stairs. Place the first faction(s) over escape(s) (we assume they are guardians of the escapes). This implies the inital factions (if any) start far from escapes.