Cleanup
This commit is contained in:
@@ -207,7 +207,7 @@ movementSideEff cr w
|
||||
_ -> w
|
||||
| otherwise = footstepSideEffect cr w
|
||||
where
|
||||
hasJetPack = any (\it -> it ^? itType . iyBase == Just (EQUIP JETPACK)) $ _crInv cr
|
||||
hasJetPack = any (\it -> it ^? itType == Just (EQUIP JETPACK)) $ _crInv cr
|
||||
oldPos = _crOldPos cr
|
||||
momentum' = 0.97 *.* (_crPos cr -.- _crOldPos cr)
|
||||
momentum''
|
||||
@@ -252,7 +252,7 @@ invSideEff cr w =
|
||||
w' & maybe id (\g -> doInvEffect g it cr) (it ^? itEffect . ieInv)
|
||||
|
||||
itemInvSideEffect :: Creature -> Item -> World -> World
|
||||
itemInvSideEffect cr itm = case _iyBase $ _itType itm of
|
||||
itemInvSideEffect cr itm = case _itType itm of
|
||||
TARGETING tt -> updateItemTargeting tt cr itm
|
||||
_ -> id
|
||||
--itemInvSideEffect cr it
|
||||
|
||||
@@ -20,7 +20,7 @@ strFromEquipment :: Creature -> Int
|
||||
strFromEquipment = sum . fmap equipmentStrValue . crCurrentEquipment
|
||||
|
||||
equipmentStrValue :: Item -> Int
|
||||
equipmentStrValue itm = case _iyBase $ _itType itm of
|
||||
equipmentStrValue itm = case _itType itm of
|
||||
EQUIP FRONTARMOUR -> negate 3
|
||||
EQUIP POWERLEGS -> 3
|
||||
_ -> 0
|
||||
|
||||
@@ -112,7 +112,7 @@ crIsArmouredFrom = hasFrontArmour
|
||||
hasFrontArmour :: Point2 -> Creature -> Bool
|
||||
hasFrontArmour p cr = fromMaybe False $ do
|
||||
invid <- cr ^? crEquipment . ix OnChest
|
||||
ittype <- cr ^? crInv . ix invid . itType . iyBase
|
||||
ittype <- cr ^? crInv . ix invid . itType
|
||||
return $
|
||||
EQUIP FRONTARMOUR == ittype
|
||||
&& p /= _crOldPos cr
|
||||
|
||||
Reference in New Issue
Block a user