Add key card item lock/key system
This commit is contained in:
@@ -17,6 +17,7 @@ import Dodge.RandomHelp
|
||||
import Dodge.WorldEvent
|
||||
--import Dodge.WallCreatureCollisions
|
||||
import Dodge.Creature.Action
|
||||
--import Dodge.Hammer
|
||||
import Geometry
|
||||
import Picture
|
||||
import qualified IntMapHelp as IM
|
||||
@@ -51,9 +52,10 @@ stateUpdateDamage :: (Creature -> Creature)
|
||||
-- -> CRUpdate
|
||||
-> Creature -> World -> World
|
||||
stateUpdateDamage damageupdate u cr w = case u (updateMovement cr) w of
|
||||
(f, upcr) -> invSideEff upcr . movementSideEff cr . deathEff . f $ w
|
||||
(f, upcr) -> mvcrhammerup . invSideEff upcr . movementSideEff cr . deathEff . f $ w
|
||||
& creatures . at (_crID cr) .~ (stepReloading . damageupdate <$> crOrCorpse upcr)
|
||||
where
|
||||
where
|
||||
mvcrhammerup = creatures . ix (_crID cr) . crHammerPosition %~ moveHammerUp
|
||||
crOrCorpse cr'
|
||||
| cr' ^. crHP > 0 = Just cr'
|
||||
| otherwise = Nothing
|
||||
|
||||
Reference in New Issue
Block a user