module Dodge.Creature.Vocalization where
import Dodge.Data
import Sound.Data

import Control.Lens

vocalizationTest :: Creature -> Maybe SoundID
vocalizationTest cr = case cr ^? crVocalization . vcCoolDown of
    Just 0 -> Just $ _vcSound $ _crVocalization cr
    _      -> Nothing

resetCrVocCoolDown :: Creature -> Creature
resetCrVocCoolDown cr = case cr ^? crVocalization . vcMaxCoolDown of
    Just i  -> cr & crVocalization . vcCoolDown .~ i
    Nothing -> cr
