Make torch use battery power
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
module Dodge.ItEffect where
|
||||
module Dodge.ItEffect
|
||||
( doInvEffect
|
||||
) where
|
||||
|
||||
import qualified IntMapHelp as IM
|
||||
import Control.Lens
|
||||
@@ -12,15 +14,11 @@ doInvEffect iie = case iie of
|
||||
ChargeIfInInventory -> chargeIfInInventory
|
||||
SetCharge i -> setItemCharge i
|
||||
EffectRootNotroot f g -> rootNotrootEff f g
|
||||
CreateHeldLight -> createHeldLight
|
||||
CreateShieldWall -> createShieldWall
|
||||
RemoveShieldWall -> removeShieldWall
|
||||
EffectWhileRoot f -> rootNotrootEff f NoInvEffect
|
||||
EffectWhileAttached f -> effectWhileAttached f
|
||||
|
||||
doFloorEffect :: ItFloorEffect -> Int -> World -> World
|
||||
doFloorEffect NoFloorEffect = const id
|
||||
|
||||
rootNotrootEff :: ItInvEffect -> ItInvEffect -> Item -> Creature -> World -> World
|
||||
rootNotrootEff f g it
|
||||
| it ^? itLocation . ilIsRoot == Just True = doInvEffect f it
|
||||
@@ -62,7 +60,3 @@ chargeIfEquipped itm cr
|
||||
invid = _ilInvID $ _itLocation itm
|
||||
ptrWpCharge = cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix invid . itUse . leftConsumption . wpCharge
|
||||
maxcharge = itm ^?! itUse . leftConsumption . wpMaxCharge
|
||||
|
||||
createHeldLight :: Item -> Creature -> World -> World
|
||||
createHeldLight itm cr = id
|
||||
--createHeldLight itm cr = createTorchLightOffset cr itm 0
|
||||
|
||||
Reference in New Issue
Block a user