This commit is contained in:
2024-09-30 12:54:31 +01:00
parent 65564c993b
commit fc5539cb38
58 changed files with 802 additions and 1255 deletions
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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