Safe Haskell | None |
---|
Provides utility functions for dealing with stats and stereotypes
- class HasStats s where
- class HasStatsM m where
- sumStat :: MonadPlayer m => StatKey -> m Int
- calcStat :: (Functor m, MonadPlayer m, MonadAtoms m, MonadRoom m, MonadPrinter m) => StatKey -> m Int
- defaultStereo :: PlayerStereo
- registerStereo :: MonadAtoms m => PlayerStereo -> m (Atom PlayerStereo)
- addStereo :: MonadPlayer m => Atom PlayerStereo -> m ()
- replaceStereo :: MonadPlayer m => Atom PlayerStereo -> Atom PlayerStereo -> m ()
Documentation
Typeclass for every pure data that saves stats
Typeclass for every monad that saves stats
sumStat :: MonadPlayer m => StatKey -> m IntSource
Sum the stats of the objects the player carries (ignoring base stats and boni)
calcStat :: (Functor m, MonadPlayer m, MonadAtoms m, MonadRoom m, MonadPrinter m) => StatKey -> m IntSource
Calculates the stats of the objects the player carries
defaultStereo :: PlayerStereoSource
Default stereotype.
registerStereo :: MonadAtoms m => PlayerStereo -> m (Atom PlayerStereo)Source
Register the given stereotype and return its atom.
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