Work on mouse wheel scrolling
This commit is contained in:
@@ -3,6 +3,7 @@ module Dodge.Creature.State (
|
||||
doDamage,
|
||||
) where
|
||||
|
||||
import Dodge.Creature.Test
|
||||
import Data.Foldable
|
||||
import Dodge.Base
|
||||
import Dodge.Corpse.Make
|
||||
@@ -59,8 +60,18 @@ stateUpdate f =
|
||||
, upInv -- upInv must be called before invSideEff 22.05.23
|
||||
, invSideEff
|
||||
, equipmentEffects
|
||||
, heldAimEffects
|
||||
]
|
||||
|
||||
heldAimEffects :: Creature -> World -> World
|
||||
heldAimEffects cr
|
||||
| crIsAiming cr = case cr ^? crInv . ix (cr ^. crInvSel . iselPos) of
|
||||
Just itm -> case itm ^? itEffect . ieWhileAiming of
|
||||
Just f -> doInvEffect f itm cr
|
||||
_ -> id
|
||||
_ -> id
|
||||
| otherwise = id
|
||||
|
||||
checkDeath :: Creature -> World -> World
|
||||
checkDeath cr w
|
||||
| _crHP cr > 0 = w
|
||||
|
||||
Reference in New Issue
Block a user