Refactor sound
This commit is contained in:
@@ -6,7 +6,7 @@ import Dodge.Item.Data
|
||||
import Dodge.Picture.Layer
|
||||
import Dodge.Default
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.SoundLogic.Synonyms
|
||||
import Dodge.SoundLogic.LoadSound
|
||||
|
||||
import Dodge.Item.Draw
|
||||
|
||||
@@ -32,7 +32,7 @@ heal25 :: Int -> World -> Maybe World
|
||||
heal25 = heal 25
|
||||
heal :: Int -> Int -> World -> Maybe World
|
||||
heal hp n w | _crHP (_creatures w IM.! n) >= 10000 = Nothing
|
||||
| otherwise = Just $ soundFrom (CrSound $ _crID cr) (_crPos cr) healSound Nothing w
|
||||
| otherwise = Just $ soundFrom (CrSound $ _crID cr) (_crPos cr) healS Nothing w
|
||||
& creatures . ix n . crHP %~ min 10000 . (+ hp)
|
||||
where
|
||||
cr = _creatures w IM.! n
|
||||
|
||||
Reference in New Issue
Block a user