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

Safe HaskellNone
LanguageHaskell2010

Game.Antisplice.Stats

Description

Provides utility functions for dealing with stats and stereotypes

Synopsis

Documentation

class HasStats s where Source

Typeclass for every pure data that saves stats

Methods

setStat :: StatKey -> Int -> s -> s Source

Set the given key to the given value

getStat :: StatKey -> s -> Int Source

Lookup the given key

class HasStatsM m where Source

Typeclass for every monad that saves stats

Methods

setStatM :: StatKey -> Int -> m () Source

Set the given key to the given value

getStatM :: StatKey -> m Int Source

Lookup the given key

Instances

calcStat :: (MonadPlayer m, ChAtoms m, MonadRoom m) => StatKey -> m Int Source

Calculates the stats of the objects the player carries

totalStereo :: (ChAtoms m, MonadPlayer m, MonadRoom m) => m PlayerStereo Source

Calculates the total stereotype the player carries