Implement pulse rifle with explodable pulse balls

This commit is contained in:
2025-07-27 11:10:30 +01:00
parent 68a4bc7aab
commit f1fb0ee768
19 changed files with 190 additions and 108 deletions
+4 -4
View File
@@ -68,7 +68,7 @@ crUpdate f =
, checkDeath -- must be in this order 24/7/22
, updateWalkCycle
, f
, invRootItemEffs
, invItemEffs
]
-- I have changed the ordering of item/equipment effects, which may have
@@ -143,8 +143,8 @@ applyPastDamages cr w
& randGen .~ g
-- a loop going over all root inventory items
invRootItemEffs :: Creature -> World -> World
invRootItemEffs cr =
invItemEffs :: Creature -> World -> World
invItemEffs cr =
appEndo $
foldMap
(reduceLocDT (Endo . invItemLocUpdate cr) . LocDT TopDT)
@@ -235,7 +235,7 @@ tryDrawToCapacitor loc w = fromMaybe w $ do
itm <- loc ^? locDT . dtValue . _1
i <- itm ^? itLocation . ilInvID
x <- loc ^? locDT . dtValue . _1 . itConsumables . _Just
guard $ x < 250
guard $ x < 200
bat <- loc ^? locDT . dtLeft . ix 0 . dtValue . _1
j <- bat ^? itLocation . ilInvID
y <- bat ^? itConsumables . _Just