Remove creature records
This commit is contained in:
@@ -129,10 +129,11 @@ internalCreatureUpdate cr = cWorld . lWorld . creatures . ix (_crID cr) %~ updat
|
||||
TODO make sure this doesn't mess up any ItemPosition
|
||||
-}
|
||||
dropByState :: Creature -> World -> World
|
||||
dropByState cr w = foldl' (flip (dropItem cr)) w $ case cr ^. crState . csDropsOnDeath of
|
||||
DropAll -> IM.keys $ _crInv cr
|
||||
DropSpecific xs -> xs
|
||||
DropAmount n -> take n $ evalState (shuffle $ IM.keys $ _crInv cr) (_randGen w)
|
||||
dropByState cr w = foldl' (flip (dropItem cr)) w $ IM.keys $ _crInv cr
|
||||
-- case cr ^. crState . csDropsOnDeath of
|
||||
-- DropAll -> IM.keys $ _crInv cr
|
||||
-- DropSpecific xs -> xs
|
||||
-- DropAmount n -> take n $ evalState (shuffle $ IM.keys $ _crInv cr) (_randGen w)
|
||||
|
||||
doDamage :: Creature -> World -> World
|
||||
doDamage cr = applyPastDamages cr . applyCreatureDamage dams cr
|
||||
|
||||
Reference in New Issue
Block a user