refactor: pass creature to weapon use function, as opposed to just id
This commit is contained in:
@@ -84,7 +84,7 @@ autoRadarEffect :: ItEffect
|
||||
autoRadarEffect = ItInvEffect {_itInvEffect = f 50 ,_itEffectCounter = 0 }
|
||||
where
|
||||
f :: Int -> Creature -> Int -> World -> World
|
||||
f 0 cr i w = aRadarPulse (_crID cr) w
|
||||
f 0 cr i w = aRadarPulse cr w
|
||||
& creatures . ix (_crID cr) . crInv . ix i
|
||||
. itEffect . itInvEffect .~ f 100
|
||||
f t cr i w = w
|
||||
@@ -96,7 +96,7 @@ autoSonarEffect :: ItEffect
|
||||
autoSonarEffect = ItInvEffect {_itInvEffect = f 50 ,_itEffectCounter = 0 }
|
||||
where
|
||||
f :: Int -> Creature -> Int -> World -> World
|
||||
f 0 cr i w = aSonarPulse (_crID cr)
|
||||
f 0 cr i w = aSonarPulse cr
|
||||
w & creatures . ix (_crID cr) . crInv . ix i
|
||||
. itEffect . itInvEffect .~ f 140
|
||||
f t cr i w = w & creatures . ix (_crID cr) . crInv . ix i
|
||||
|
||||
Reference in New Issue
Block a user