Make creature update an external function

This commit is contained in:
2022-07-20 01:22:17 +01:00
parent db44d5d6ce
commit 1f79fe157f
31 changed files with 562 additions and 462 deletions
+1 -2
View File
@@ -62,8 +62,7 @@ checkDeath cr w
& corpseOrGib cr
where
removecr
| _crID cr == 0 = (creatures . ix (_crID cr) . crUpdate .~ const id)
. (creatures . ix (_crID cr) . crType .~ NonDrawnCreature)
| _crID cr == 0 = (creatures . ix (_crID cr) . crType .~ NonDrawnCreature)
. (creatures . ix (_crID cr) . crHP .~ 0)
-- hack to get around player creature being killed but left with more than 0 hp
| otherwise = creatures . at (_crID cr) .~ Nothing