Add alteRifle
This commit is contained in:
@@ -99,6 +99,10 @@ doHeldUseEffect t cr w = case t ^? ldtValue . itUse . heldUseEffect of
|
||||
(is,g') = runState (shuffle [0..x-1]) g
|
||||
return $ w & cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix i . itUse . heldAim . aimMuzzles %~ zipWith (\j mz -> mz & mzFrame .~ j) is
|
||||
& randGen .~ g'
|
||||
Just SwitchAlteRifle -> fromMaybe w $ do
|
||||
i <- t ^? ldtValue . itLocation . ilInvID
|
||||
return $ w & cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix i
|
||||
. itUse . heldAim . aimMuzzles . ix 0 . mzAmmoSlot %~ ((`mod` 2) . (+1))
|
||||
Just NoHeldUseEffect -> w
|
||||
Nothing -> w
|
||||
|
||||
|
||||
Reference in New Issue
Block a user