Add jitter on chase crit bark

This commit is contained in:
2022-05-19 10:58:13 +01:00
parent 565a71a5a2
commit 41e5538eb7
5 changed files with 45 additions and 10 deletions
+11 -1
View File
@@ -911,6 +911,7 @@ data Impulse
| MoveForward Float
| Turn Float
| RandomTurn Float
| RandomImpulse (State StdGen Impulse)
| TurnToward Point2 Float
| MvTurnToward Point2
| MvForward
@@ -961,6 +962,7 @@ instance Show Impulse where
ImpulseUseTargetCID {} -> "ImpulseUseTargetCID"
ImpulseUseTarget {} -> "ImpulseUseTarget"
ImpulseUseAheadPos {} -> "ImpulseUseAheadPos"
RandomImpulse {} -> "RandomImpulse"
-- deriving (Eq,Ord,Show)
infixr 9 `WaitThen`
infixr 9 `DoActionThen`
@@ -968,7 +970,11 @@ infixr 9 `DoActionWhile`
infixr 9 `DoReplicate`
infixr 9 `DoImpulsesAlongside`
data Action
= AimAt
= LabelAction
{_actLabel :: String
,_actAction :: Action
}
| AimAt
{_targetID :: Int
,_targetSeenAt :: Point2
}
@@ -1060,6 +1066,10 @@ data Action
deriving (Generic)
instance Show Action where
show act = case act of
LabelAction
{_actLabel = str
,_actAction = subAct
} -> str++":"++show subAct
AimAt
{_targetID = tid
,_targetSeenAt = p