Make aiming speed be gouverned by strength
This commit is contained in:
@@ -3,7 +3,7 @@ import Dodge.Data
|
||||
import Dodge.Creature.Statistics
|
||||
import Geometry
|
||||
|
||||
import Data.Maybe
|
||||
--import Data.Maybe
|
||||
--import qualified Data.IntMap.Strict as IM
|
||||
import Control.Lens
|
||||
{- | Creature attempts to moves under its own steam.
|
||||
@@ -23,16 +23,7 @@ crMvAbsolute p' cr = advanceStepCounter (magV p) cr
|
||||
& crPos %~ (+.+ p)
|
||||
& crMvDir .~ argV p
|
||||
where
|
||||
--p = (equipFactor * aimingFactor) *.* p'
|
||||
p = (strengthFactor (getCrStrength cr) * aimingFactor) *.* p'
|
||||
isAiming = _posture (_crStance cr) == Aiming || _posture (_crStance cr) == Reloading
|
||||
invItSpeed
|
||||
| isAiming = equipAimSpeed
|
||||
| otherwise = equipSpeed
|
||||
equipFactor = product $ invItSpeed <$> _crInv cr
|
||||
aimingFactor
|
||||
| isAiming = fromMaybe 1 $ cr ^? crInv . ix (_crInvSel cr) . itUse . useAim . aimSpeed
|
||||
| otherwise = 1
|
||||
p = strengthFactor (getCrStrength cr) *.* p'
|
||||
|
||||
strengthFactor :: Int -> Float
|
||||
strengthFactor i
|
||||
|
||||
Reference in New Issue
Block a user