This commit is contained in:
2026-04-01 11:45:25 +01:00
parent 09fc2bb48e
commit 579d5296b1
5 changed files with 62 additions and 62 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ module Dodge.WorldEffect (
doTmWdWd,
) where
import Dodge.Item.MaxAmmo
import ShortShow
import Data.Traversable (mapAccumR)
import Dodge.Item.MagAmmoType
@@ -148,7 +149,7 @@ distributeAmmoToYou atype x w = fromMaybe (0,w) $ do
distributeAmmoToItem :: Int -> Item -> (Int,Int)
distributeAmmoToItem x itm = fromMaybe (x,0) $ do
m <- magMax itm
m <- maxAmmo itm
cur <- itm ^. itConsumables
let d = m - cur
t = max 0 $ min x d