Make use hammers and item positions slightly more logical
This commit is contained in:
@@ -41,7 +41,7 @@ rewindEffect itm cr w
|
||||
| otherwise = w & rewindWorlds .~ []
|
||||
& ptrWpCharge .~ 0
|
||||
where
|
||||
invid = fromJust $ _itInvPos itm
|
||||
invid = _ipInvID $ _itPos itm
|
||||
ptrWpCharge = creatures . ix (_crID cr) . crInv . ix invid . itConsumption . wpCharge
|
||||
maxcharge = _wpMaxCharge . _itConsumption $ itm
|
||||
w' = w & rewindWorlds .~ []
|
||||
@@ -65,7 +65,6 @@ useRewindGun _ _ w = case _rewindWorlds w of
|
||||
shrinkGun :: Item
|
||||
shrinkGun = defaultLeftItem
|
||||
{_itUse = defaultlUse {_lUse = hammerCheckL useShrinkGun}
|
||||
& useHammer .~ upHammer
|
||||
-- , _itFloorPict = shrinkGunPic
|
||||
, _itAttachment = AttachBool True
|
||||
}
|
||||
@@ -82,7 +81,7 @@ useShrinkGun it cr w = if _atBool $ _itAttachment it
|
||||
then tryResize 0.5 $ stripNoItems cr . f False UndroppableIdentified . dropExcept cr invid
|
||||
else tryResize 1 $ f True Uncursed . setMinInvSize defaultInvSize cr
|
||||
where
|
||||
invid = fromJust $ _itInvPos it
|
||||
invid = _ipInvID $ _itPos it
|
||||
tryResize x g = maybe w g $ sizeSelf x cr w
|
||||
f isInUse cstatus = creatures . ix (_crID cr) . crInv . ix invid %~
|
||||
( (itAttachment . atBool .~ isInUse) . (itCurseStatus .~ cstatus) )
|
||||
@@ -92,7 +91,6 @@ blinkGun = defaultLeftItem
|
||||
{ _itInvColor = cyan
|
||||
, _itUse = defaultlUse
|
||||
& lUse .~ hammerCheckL (shootL $ const blinkAction)
|
||||
& useHammer .~ upHammer
|
||||
& eqEq . eqSite .~ GoesOnWrist
|
||||
-- , _itFloorPict = const . noPic . colorSH chartreuse $ upperPrismPoly 2 $ square 2
|
||||
}
|
||||
@@ -137,7 +135,7 @@ useForceFieldGun itm cr w = fromMaybe w $ do
|
||||
wlline = (a,b)
|
||||
return $ w
|
||||
& walls %~ IM.insertWith (\_ x -> x) i forceField {_wlID = i}
|
||||
& creatures . ix (_crID cr) . crInv . ix (fromJust (_itInvPos itm)) . itParams . paramMID ?~ i
|
||||
& creatures . ix (_crID cr) . crInv . ix (_ipInvID (_itPos itm)) . itParams . paramMID ?~ i
|
||||
& moveWallIDUnsafe i wlline
|
||||
where
|
||||
i = fromMaybe (IM.newKey (_walls w)) $ itm ^? itParams . paramMID . _Just
|
||||
|
||||
Reference in New Issue
Block a user