Refactor weapon usages
This commit is contained in:
@@ -52,6 +52,19 @@ charFiringStrat strats cr w = case w ^? creatures . ix cid . crInv
|
||||
_ -> w
|
||||
where
|
||||
cid = _crID cr
|
||||
charFiringStratI
|
||||
:: [(Char, (Item -> Creature -> World -> World) -> Item -> Creature -> World -> World)] -- ^ Different firing effects for different characters
|
||||
-> (Item -> Creature -> World -> World)
|
||||
-> Item
|
||||
-> Creature
|
||||
-> World
|
||||
-> World
|
||||
charFiringStratI strats eff item cr w = case w ^? creatures . ix cid . crInv
|
||||
. ix (_crInvSel $ _creatures w IM.! cid) . itAttachment . _Just . itCharMode of
|
||||
Just (c :<| _) -> fromJust (Prelude.lookup c strats) eff item cr w
|
||||
_ -> w
|
||||
where
|
||||
cid = _crID cr
|
||||
|
||||
increaseFuse
|
||||
:: Int -- ^ Old fuse time
|
||||
|
||||
Reference in New Issue
Block a user