--{-# LANGUAGE LambdaCase #-} module Dodge.Distortion (updateDistortion) where import Dodge.Data.Distortion import Control.Lens updateDistortion :: Distortion -> Maybe Distortion updateDistortion rd | rd ^. rdTime > 0 = Just $ rd & rdTime -~ 1 | otherwise = Nothing