18 lines
502 B
Haskell
18 lines
502 B
Haskell
module Dodge.Creature.Stance where
|
|
import Dodge.Data
|
|
import Dodge.Creature.Test
|
|
import LensHelp
|
|
|
|
crInAimStance :: AimStance -> Creature -> Bool
|
|
crInAimStance as cr = crIsAiming cr -- || (_posture (_crStance cr) == Reloading && hasAmmo cr)
|
|
&& cr ^? crInv . ix (_crInvSel cr) . itUse . useAim . aimStance == Just as
|
|
|
|
oneH :: Creature -> Bool
|
|
oneH = crInAimStance OneHand
|
|
|
|
twoFlat :: Creature -> Bool
|
|
twoFlat = crInAimStance TwoHandFlat
|
|
|
|
twists :: Creature -> Bool
|
|
twists = crInAimStance TwoHandTwist
|