antisplice-0.17.1.1: An engine for text-based dungeons.

Safe HaskellNone
LanguageHaskell2010

Game.Antisplice.Stereos

Contents

Synopsis

Primitives

statsStereo :: ((StatKey -> Int) -> StatKey -> Int) -> PlayerStereo Source

Create a stereotype that carries a stats modifier

skillsStereo :: [Skill] -> PlayerStereo Source

Create a stereotype that carries skills

skillStereoM :: Monad m => m Skill -> m PlayerStereo Source

Create a stereotype that carries a skill from a monadic composition

Dealing with players

addStereo :: MonadPlayer m => Atom PlayerStereo -> m () Source

Add the given stereotype to the current player.

replaceStereo :: MonadPlayer m => Atom PlayerStereo -> Atom PlayerStereo -> m () Source

Remove one stereotype and add another

Registration

registerStereo :: ChAtoms m => PlayerStereo -> m (Atom PlayerStereo) Source

Register the given stereotype and return its atom.

registerStereoM :: ChAtoms m => StereoBuilderT m () -> m (Atom PlayerStereo) Source

Process the builder chain and register the resulting stereotype

Builder

newtype StereoBuilderT m a Source

For monadic stereotype construction

Constructors

StereoBuilder 

Instances

MonadTrans StereoBuilderT Source 
(MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (StereoBuilderT m) Source 
ChChannelPrinter Bool m0 => ChChannelPrinter Bool (StereoBuilderT m) Source 
ChChannelPrinter Int m0 => ChChannelPrinter Int (StereoBuilderT m) Source 
ChChannelPrinter Handle m0 => ChChannelPrinter Handle (StereoBuilderT m) Source 
ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (StereoBuilderT m) Source 
MonadError SplErr m0 => MonadError SplErr (StereoBuilderT m) Source 
Monad m => Monad (StereoBuilderT m) Source 
Functor m => Functor (StereoBuilderT m) Source 
(Functor m, Monad m) => Applicative (StereoBuilderT m) Source 
ChHistoryEnv m0 => ChHistoryEnv (StereoBuilderT m) Source 
ChExpanderEnv m0 => ChExpanderEnv (StereoBuilderT m) Source 
ChExpand m0 => ChExpand (StereoBuilderT m) Source 
ChExtendedPrinter m0 => ChExtendedPrinter (StereoBuilderT m) Source 
(ChAtoms (StereoBuilderT m0), ChFilesystem m0) => ChFilesystem (StereoBuilderT m) Source 
ChSpawn m0 => ChSpawn (StereoBuilderT m) Source 
ChPrinter m0 => ChPrinter (StereoBuilderT m) Source 
ChBufferedScanner m0 => ChBufferedScanner (StereoBuilderT m) Source 
ChScanner m0 => ChScanner (StereoBuilderT m) Source 
ChFinalizer m0 => ChFinalizer (StereoBuilderT m) Source 
ChClock m0 => ChClock (StereoBuilderT m) Source 
ChRandom m0 => ChRandom (StereoBuilderT m) Source 
ChAtoms m0 => ChAtoms (StereoBuilderT m) Source 
ChCounter m0 => ChCounter (StereoBuilderT m) Source 
MonadIO m0 => MonadIO (StereoBuilderT m) Source 
MonadVocab m0 => MonadVocab (StereoBuilderT m) Source 
MonadDungeon m0 => MonadDungeon (StereoBuilderT m) Source 
MonadPlayer m0 => MonadPlayer (StereoBuilderT m) Source 
MonadObject m0 => MonadObject (StereoBuilderT m) Source 
MonadRoom m0 => MonadRoom (StereoBuilderT m) Source 
CanLoad m0 n0 => CanLoad (StereoBuilderT m) n Source 
CanSave m0 n0 => CanSave (StereoBuilderT m) n Source 
CanMount m0 n0 => CanMount (StereoBuilderT m) n Source 

mergeStereo :: Monad m => PlayerStereo -> StereoBuilderT m () Source

Merge the given pure stereotype into the built one

mergeStereoM :: Monad m => m PlayerStereo -> StereoBuilderT m () Source

Merge the given monadic stereotype into the built one

mergeSkill :: MonadVocab m => Skill -> StereoBuilderT m () Source

Merge the given pure skill into the built stereotype

mergeRecipe :: MonadVocab m => Recipe -> StereoBuilderT m () Source

Merge the given pure recipe into the built stereotype

mergeSkillM :: MonadVocab m => m Skill -> StereoBuilderT m () Source

Merge the given monadic skill into the built stereotype

mergeRecipeM :: MonadVocab m => m Recipe -> StereoBuilderT m () Source

Merge the given monadic recipe into the built stereotype

Default stereos

defaultStereo :: MonadVocab m => m PlayerStereo Source

Default stereotype.