Add bullet damages field, move bullet data into own file
This commit is contained in:
@@ -74,10 +74,11 @@ mvShockwave is w pt
|
||||
damCr cr
|
||||
| _crID cr `elem` is || dist (_crPos cr) p >= rad + _crRad cr = cr
|
||||
| otherwise = cr & crState . csDamage .:~
|
||||
Damage PUSHDAM dam cpos cpos cpos
|
||||
(PushBackDamage (25 * push *.* squashNormalizeV (_crPos cr -.- p)))
|
||||
Damage PUSHDAM dam (cpos -.- v) cpos (cpos +.+ v)
|
||||
(PushBackDamage (25 * push))
|
||||
where
|
||||
cpos = _crPos cr
|
||||
v = normalizeV (cpos -.- p)
|
||||
{- Create a shockwave going from an outside circle into a center point. -}
|
||||
inverseShockwaveAt
|
||||
:: Point2 -- Center position
|
||||
@@ -113,7 +114,8 @@ moveInverseShockwave w pt
|
||||
damCr cr
|
||||
| dist (_crPos cr) p >= rad + _crRad cr = cr
|
||||
| otherwise = cr & crState . csDamage .:~
|
||||
Damage PUSHDAM 1 cpos cpos cpos (PushBackDamage $ 25 *.* squashNormalizeV (p -.- cpos))
|
||||
Damage PUSHDAM 1 (cpos +.+ v) cpos (cpos -.- v) (PushBackDamage 25)
|
||||
where
|
||||
cpos = _crPos cr
|
||||
v = normalizeV (cpos -.- p)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user