Partially refactor ammo extraction, work on pulse rifle

This commit is contained in:
2025-07-26 23:17:14 +01:00
parent 190068737d
commit 68a4bc7aab
16 changed files with 753 additions and 733 deletions
+1 -7
View File
@@ -1,6 +1,5 @@
module Dodge.IsPulseLaser (
isPulseLaser,
isPulseCapacitor,
) where
import Control.Lens
@@ -11,9 +10,4 @@ import Dodge.Data.Item
isPulseLaser :: LocationDT OItem -> Bool
isPulseLaser loc =
loc ^. locDT . dtValue . _1 . itType == HELD LASER
&& (loc ^? locDT . dtLeft . ix 0 . dtValue . _1 . itType == Just (CRAFT CAPACITOR))
isPulseCapacitor :: LocationDT OItem -> Bool
isPulseCapacitor loc =
loc ^. locDT . dtValue . _1 . itType == HELD LASER
&& (loc ^? locDT . dtLeft . ix 0 . dtValue . _1 . itType == Just (CRAFT CAPACITOR))
&& (loc ^? locDT . dtLeft . ix 0 . dtValue . _1 . itType == Just (ATTACH CAPACITOR))