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

Safe HaskellNone

Game.Antisplice.Stats

Description

Provides utility functions for dealing with stats and stereotypes

Synopsis

Documentation

class HasStats s whereSource

Typeclass for every pure data that saves stats

Methods

setStat :: StatKey -> Int -> s -> sSource

Set the given key to the given value

getStat :: StatKey -> s -> IntSource

Lookup the given key

class HasStatsM m whereSource

Typeclass for every monad that saves stats

Methods

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

Set the given key to the given value

getStatM :: StatKey -> m IntSource

Lookup the given key

Instances

calcStat :: (MonadPlayer m, MonadAtoms m, MonadRoom m) => StatKey -> m IntSource

Calculates the stats of the objects the player carries

totalStereo :: (MonadAtoms m, MonadPlayer m, MonadRoom m) => m PlayerStereoSource

Calculates the total stereotype the player carries