Add Read instances
This commit is contained in:
@@ -1 +1,25 @@
|
||||
module Dodge.Tweak where
|
||||
import Dodge.Data.Item
|
||||
|
||||
import Control.Lens
|
||||
|
||||
|
||||
doTweak :: TweakType -> Int -> Item -> Item
|
||||
doTweak tt = case tt of
|
||||
TweakPhaseV -> tweakPhaseV
|
||||
TweakTractionPower -> tweakTractionPower
|
||||
TweakSpinDrag -> \i -> itParams . shellSpinDrag .~ i
|
||||
TweakSpinAmount -> \i -> itParams . shellSpinAmount .~ i
|
||||
TweakThrustDelay -> \i -> itParams . shellThrustDelay .~ i
|
||||
tweakTractionPower :: Int -> Item -> Item
|
||||
tweakTractionPower 0 = itParams . attractionPower .~ 1
|
||||
tweakTractionPower 1 = itParams . attractionPower .~ -1
|
||||
tweakTractionPower 2 = itParams . attractionPower .~ -10
|
||||
tweakTractionPower 3 = itParams . attractionPower .~ 0
|
||||
tweakTractionPower _ = id
|
||||
|
||||
tweakPhaseV :: Int -> Item -> Item
|
||||
tweakPhaseV 0 = itParams . phaseV .~ 0.2
|
||||
tweakPhaseV 1 = itParams . phaseV .~ 1
|
||||
tweakPhaseV 2 = itParams . phaseV .~ 5
|
||||
tweakPhaseV _ = id
|
||||
|
||||
Reference in New Issue
Block a user