Tweak chaseCrit melee striking

This commit is contained in:
2023-05-01 10:21:03 +01:00
parent ba12a73842
commit 06608c60bf
3 changed files with 11 additions and 2 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ followImpulse cr w imp = case imp of
SwitchToItem i -> crup $ cr & crManipulation . manObject .~ InInventory (SelItem i NoInvSelAction)
Melee cid' ->
( hitCr cid'
, crMvBy (10 *.* normalizeV (posFromID cid' -.- cpos)) $ cr & crMeleeCooldown .~ 20
, crMvAbsolute (10 *.* normalizeV (posFromID cid' -.- cpos)) $ cr & crMeleeCooldown .~ 20
)
RandomTurn a -> (randGen .~ snd (rr a), creatureTurn (fst $ rr a) cr)
MakeSound sid -> (soundStart (CrSound (_crID cr)) (_crPos cr) sid Nothing, cr)
@@ -83,6 +83,6 @@ followImpulse cr w imp = case imp of
rr a = randomR (- a, a) $ _randGen w
hitCr i =
( cWorld . lWorld . creatures . ix i . crState . csDamage
.:~ Damage BLUNT 100 cpos (posFromID i) (posFromID i) NoDamageEffect
.:~ Damage BLUNT 100 cpos (posFromID i) (posFromID i) (PushBackDamage 3)
)
. soundStart (CrSound cid) cpos hitS Nothing