Fix bee slime mounting
This commit is contained in:
@@ -67,10 +67,6 @@ drawSlimeCrit cr =
|
||||
guard $ length qs == 12
|
||||
return $ zipWith (+) (fmap (0.1 * (10 - x) *^) so) (fmap (0.1 * x *^) qs)
|
||||
|
||||
-- assumes d is a unit vector
|
||||
scaleAlong :: Point2 -> Float -> Point2 -> Point2
|
||||
scaleAlong d s p = ((s - 1) * dot d p) *^ d + p
|
||||
|
||||
basicCrPict :: IM.IntMap Item -> Creature -> SPic
|
||||
basicCrPict m cr = drawEquipment m cr <> noPic (basicCrShape cr)
|
||||
|
||||
@@ -122,20 +118,17 @@ drawBeeCrit cr =
|
||||
colorSH
|
||||
col
|
||||
(f . upperPrismPolyHalfMI 3 $ polyCirc 6 r)
|
||||
<> colorSH (dark col) (overPosSH (Q.apply (beakpos)) $ upperPrismPolyHalfST 1 $ [V2 0 (-2), V2 4 0, V2 0 2])
|
||||
<> colorSH (dark col) (overPosSH (Q.apply beakpos) $ upperPrismPolyHalfST 1 [V2 0 (-2), V2 4 0, V2 0 2])
|
||||
where
|
||||
r = cr ^. crType . to crRad
|
||||
beakpos = (V3 (r - 1) 0 0, Q.qid)
|
||||
col
|
||||
| cr ^?! crType . beeAggro > 0 = red
|
||||
col | cr ^?! crType . beeAggro > 0 = red
|
||||
| otherwise = yellow
|
||||
f
|
||||
| Mounted{} <- cr ^. crStance . carriage =
|
||||
each . sfVs . each . _xy %~ scaleAlong (V2 0 1) (1 + g (modTo 1 (cr ^?! crType . beeSlime . to ((/ 100) . fromIntegral))))
|
||||
f | Mounted{} <- cr ^. crStance . carriage =
|
||||
each.sfVs.each._y *~ g (modTo 1 $ cr ^?! crType . beeSlime . to ((/ 100) . fromIntegral))
|
||||
| otherwise = id
|
||||
g x
|
||||
| x > 0.5 = 1 - x
|
||||
| otherwise = x
|
||||
g x | x > 0.5 = 2 - x
|
||||
| otherwise = 1 + x
|
||||
|
||||
drawCrabCrit :: World -> Creature -> Shape
|
||||
drawCrabCrit w cr =
|
||||
|
||||
Reference in New Issue
Block a user