Work on crab crit hammers

This commit is contained in:
2026-04-08 23:03:28 +01:00
parent 707ccae971
commit 68eaf84ec2
3 changed files with 18 additions and 4 deletions
+14 -1
View File
@@ -84,13 +84,26 @@ drawChaseCrit w cr = mconcat
rotmdir = rotateSH (_crMvDir cr - _crDir cr)
crabUpperBody :: World -> Creature -> Shape
crabUpperBody _ cr = colorSH (_skinUpper cskin)
crabUpperBody w cr = colorSH (_skinUpper cskin)
$
(overPosSH (Q.apply torsoq) (upperPrismPolyHalfMI 5 $ polyCirc 4 12
& each . _x *~ 0.6)
)
<> overPosSH (Q.apply lclawq) (upperPrismPolyHalfMI 4 $ rectNSWE 20 0 (-2) 2)
<> overPosSH (Q.apply rclawq) (upperPrismPolyHalfMI 4 $ rectNSWE 0 (-20) (-2) 2)
where
-- i = fromIntegral (mod (w ^. cWorld . cClock) 100) / 100
torsoq = (V3 0 0 10,Q.qid)
--lclawq = torsoq `Q.comp` (V3 0 9 0, Q.axisAngle (V3 1 0 0) 1)
lclawq = torsoq `Q.comp` (V3 2 8 1, Q.slerp latck lrest lcool)
latck = Q.axisAngle (V3 0 0 1) (-0.5 * pi)
lrest = Q.axisAngle (V3 1 0 0) 1
cskin = crShape $ _crType cr
lcool = 1 - min 10 (fromIntegral . _meleeCooldownL $ _crType cr) / 10
rclawq = torsoq `Q.comp` (V3 2 (-8) 1, Q.slerp ratck rrest rcool)
ratck = Q.axisAngle (V3 0 0 1) (0.5 * pi)
rrest = Q.axisAngle (V3 1 0 0) (-1)
rcool = 1 - min 10 (fromIntegral . _meleeCooldownR $ _crType cr) / 10
chaseUpperBody :: World -> Creature -> Shape
+2 -1
View File
@@ -153,7 +153,8 @@ crabCritMv w cr = case _apStrategy (_crActionPlan cr) of
&& dist tpos cpos < crRad (cr ^. crType) + crRad (tcr ^. crType) + 5
&& abs (_crDir cr - argV (tpos -.- cpos)) < pi / 4
return tid
dc = fst $ randomR (15,25) (w ^. randGen)
--dc = fst $ randomR (15,25) (w ^. randGen)
dc = fst $ randomR (15,50) (w ^. randGen)
notpath = \case
Just NoAction -> False
Just PathTo {} -> False
+2 -2
View File
@@ -343,10 +343,10 @@ chasmSpitTerminal = do
tToBTree "chasmTerm" $
Node
(addDoorToggleTerminal' i1 (PS 150 0) y')
[ treePost [triggerDoorRoom i1, deadEndPSType (PutCrit crabCrit)]
[ treePost [triggerDoorRoom i1, deadEndPSType (PutCrit chaseCrit)]
--[ treePost [triggerDoorRoom i1, deadEndPSType (PutCrit hoverCrit)]
--[ treePost [triggerDoorRoom i1, deadEndRoom]
, treePost [triggerDoorRoom i1, deadEndPSType (PutCrit crabCrit)]
, treePost [triggerDoorRoom i1, deadEndPSType (PutCrit chaseCrit)]
, return $ cleatOnward $ triggerDoorRoom i1
]
where