This commit is contained in:
2022-06-08 22:14:50 +01:00
parent b90e8a2118
commit 970858e129
9 changed files with 41 additions and 40 deletions
+3 -3
View File
@@ -49,7 +49,7 @@ boostSelfL x itm cr w = case boostPoint x cr w of
(crPos .~ p)
. (crInv . ix invid %~
ammoEff
. (itEffect . itEffectCounter .~ 1)
. (itEffect . ieCounter .~ 1)
. (itAttachment .~ ItInt pid)
)
@@ -124,8 +124,8 @@ resetAttachmentID :: ItEffect
resetAttachmentID = ItInvEffect f 0
where
f itm cr w
| _itEffectCounter iteff < 0 = w & pointToIt . itAttachment .~ NoItAttachment
| otherwise = w & pointToIt . itEffect . itEffectCounter -~ 1
| _ieCounter iteff < 0 = w & pointToIt . itAttachment .~ NoItAttachment
| otherwise = w & pointToIt . itEffect . ieCounter -~ 1
where
iteff = _itEffect itm
invid = fromJust $ _itInvPos itm
+3 -3
View File
@@ -117,16 +117,16 @@ throwGrenade thePayload cr w = setWp $ removePict $ over props addG w
fuseTime = _itFuseTime $ _itAttachment $ _crInv cr IM.! j
throwArmReset :: Int -> ItEffect
throwArmReset x = ItInvEffect {_itInvEffect = f ,_itEffectCounter = x }
throwArmReset x = ItInvEffect {_ieInv = f ,_ieCounter = x }
where
f itm cr = creatures . ix (_crID cr) . crInv %~ IM.adjust counterDown i
where
i = fromJust $ _itInvPos itm
counterDown it
| _itEffectCounter (_itEffect it) == 0 = it
| _ieCounter (_itEffect it) == 0 = it
& itUse . useHammer . hammerPosition .~ HammerUp
& itEquipPict .~ pictureWeaponAim (\_ -> grenadePic 50)
| otherwise = it & itEffect . itEffectCounter -~ 1
| otherwise = it & itEffect . ieCounter -~ 1
--flameGrenade :: Item
--flameGrenade = grenade {
+1 -1
View File
@@ -324,7 +324,7 @@ moveRemoteShell cid itid pj w
newPos = oldPos +.+ vel
newdir
| SDL.ButtonRight `S.member` _mouseButtons w
&& w ^? creatures . ix cid . crInvSel == w ^? itemPositions . ix itid . itInvId
&& w ^? creatures . ix cid . crInvSel == w ^? itemPositions . ix itid . ipInvId
= _cameraRot w + argV (_mousePos w)
| otherwise = _pjDir pj
accel = rotateV newdir (V2 2 0)