Improve detector equipment, various cleanup

This commit is contained in:
2022-05-27 18:49:54 +01:00
parent 60fc2d44e8
commit 79b3a86520
15 changed files with 180 additions and 138 deletions
+8
View File
@@ -1,5 +1,6 @@
module Dodge.Creature.ChaseCrit
(smallChaseCrit
,invisibleChaseCrit
,chaseCrit
) where
import Dodge.Data
@@ -10,6 +11,7 @@ import Dodge.Creature.ReaderUpdate
import Dodge.Creature.Action
import Dodge.Creature.Perception
import Dodge.Item.Consumable
import Dodge.Item.Equipment
import Dodge.SoundLogic
--import Geometry
import Picture
@@ -28,6 +30,12 @@ smallChaseCrit = chaseCrit
, _crInv = IM.fromList [(0,medkit 200)]
, _crCorpse = setDepth 5 $ color (greyN 0.5) $ circleSolid 4
}
invisibleChaseCrit :: Creature
invisibleChaseCrit = chaseCrit
& crCamouflage .~ Invisible
& crInv . at 0 ?~ wristInvisibility
& crEquipment . at OnLeftWrist ?~ 0
& crInvEquipped . at 0 ?~ OnLeftWrist
chaseCrit :: Creature
chaseCrit = defaultCreature
{ _crUpdate = defaultImpulsive
+8 -6
View File
@@ -61,12 +61,14 @@ basicCrShape
:: Color -- ^ Creature color
-> Creature
-> Shape
basicCrShape col cr = tr . scaleSH (V3 crsize crsize crsize) $ mconcat
[ --rotdir . _spShape $ drawEquipment cr
rotdir . dm . translateSHz 20 $ scalp cr
, rotdir . dm $ upperBody col cr
, dm . rotmdir $ feet cr
]
basicCrShape col cr
| _crCamouflage cr == Invisible = mempty
| otherwise = tr . scaleSH (V3 crsize crsize crsize) $ mconcat
[ --rotdir . _spShape $ drawEquipment cr
rotdir . dm . translateSHz 20 $ scalp cr
, rotdir . dm $ upperBody col cr
, dm . rotmdir $ feet cr
]
where
crsize = 0.1 * _crRad cr
dm = damageModSH cr