antisplice-0.17.1.0: 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 
(MonadDungeon m0, ChChannelPrinter PlayerId m0) => ChBroadcaster PlayerId (StereoBuilderT m) 
ChChannelPrinter Bool m0 => ChChannelPrinter Bool (StereoBuilderT m) 
ChChannelPrinter Int m0 => ChChannelPrinter Int (StereoBuilderT m) 
ChChannelPrinter Handle m0 => ChChannelPrinter Handle (StereoBuilderT m) 
ChChannelPrinter PlayerId m0 => ChChannelPrinter PlayerId (StereoBuilderT m) 
MonadError SplErr m0 => MonadError SplErr (StereoBuilderT m) 
Monad m => Monad (StereoBuilderT m) 
Functor m => Functor (StereoBuilderT m) 
(Functor m, Monad m) => Applicative (StereoBuilderT m) 
ChHistoryEnv m0 => ChHistoryEnv (StereoBuilderT m) 
ChExpanderEnv m0 => ChExpanderEnv (StereoBuilderT m) 
ChExpand m0 => ChExpand (StereoBuilderT m) 
ChExtendedPrinter m0 => ChExtendedPrinter (StereoBuilderT m) 
(ChAtoms (StereoBuilderT m0), ChFilesystem m0) => ChFilesystem (StereoBuilderT m) 
ChSpawn m0 => ChSpawn (StereoBuilderT m) 
ChPrinter m0 => ChPrinter (StereoBuilderT m) 
ChBufferedScanner m0 => ChBufferedScanner (StereoBuilderT m) 
ChScanner m0 => ChScanner (StereoBuilderT m) 
ChFinalizer m0 => ChFinalizer (StereoBuilderT m) 
ChClock m0 => ChClock (StereoBuilderT m) 
ChRandom m0 => ChRandom (StereoBuilderT m) 
ChAtoms m0 => ChAtoms (StereoBuilderT m) 
ChCounter m0 => ChCounter (StereoBuilderT m) 
MonadIO m0 => MonadIO (StereoBuilderT m) 
MonadVocab m0 => MonadVocab (StereoBuilderT m) 
MonadDungeon m0 => MonadDungeon (StereoBuilderT m) 
MonadPlayer m0 => MonadPlayer (StereoBuilderT m) 
MonadObject m0 => MonadObject (StereoBuilderT m) 
MonadRoom m0 => MonadRoom (StereoBuilderT m) 
CanLoad m0 n0 => CanLoad (StereoBuilderT m) n 
CanSave m0 n0 => CanSave (StereoBuilderT m) n 
CanMount m0 n0 => CanMount (StereoBuilderT m) n 

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.