Continue tweaking sound

This commit is contained in:
2021-09-12 20:33:33 +01:00
parent 51a85bd1ec
commit 72657294d1
89 changed files with 373 additions and 517 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ followImpulse cr w imp = case imp of
(hitCr cid'
, crMvBy (10 *.* normalizeV (posFromID cid' -.- cpos)) $ cr & crMeleeCooldown .~ 20) -- randomise cooldown?
RandomTurn a -> (id, creatureTurn (rr a) cr)
MakeSound sid -> ( soundOnceOrigin sid (CrSound (_crID cr)) (_crPos cr) , cr )
MakeSound sid -> ( soundStart (CrSound (_crID cr)) (_crPos cr) sid Nothing , cr )
DropItem -> undefined
ChangeStrategy strat -> (id, cr & crActionPlan . crStrategy .~ strat)
AddGoal gl -> (id, cr & crActionPlan . crGoal %~ (gl :) )
@@ -84,5 +84,5 @@ followImpulse cr w imp = case imp of
posFromID cid' = _crPos $ _creatures w IM.! cid'
rr a = fst $ randomR (-a,a) $ _randGen w
hitCr i = over (creatures . ix i . crState . crDamage) (addDam i)
. soundFrom (CrSound cid) cpos hitS Nothing
. soundStart (CrSound cid) cpos hitS Nothing
addDam i dams = Blunt 100 cpos (posFromID i) (posFromID i) : dams