Add shrinkability and cursed items

This commit is contained in:
2021-11-18 18:30:22 +00:00
parent 147d6098ab
commit a546d070f0
82 changed files with 273 additions and 233 deletions
+10
View File
@@ -0,0 +1,10 @@
module Dodge.Distortion where
import Dodge.Distortion.Data
updateDistortion :: Distortion -> Maybe Distortion
updateDistortion dt = case dt of
RadialDistortion a b c v
| v > 1 -> Just $ RadialDistortion a b c $ max 1 (v - 0.05)
| v < 1 -> Just $ RadialDistortion a b c $ min 1 (v + 0.05)
| otherwise -> Nothing