Add more debug info for selected creatures
This commit is contained in:
@@ -11,6 +11,3 @@ chainCreatureUpdates ::
|
||||
chainCreatureUpdates ls w cr = foldl' unf cr ls
|
||||
where
|
||||
unf cr' g = g w cr'
|
||||
--chainCreatureUpdates ls w cr = foldr unf cr ls
|
||||
-- where
|
||||
-- unf g cr' = g w cr'
|
||||
|
||||
@@ -45,7 +45,7 @@ translatePointToRightHand' cr
|
||||
f i = negate 2 + negate 6 * fromIntegral (sLen - i) / fromIntegral sLen
|
||||
|
||||
translateToRightHand :: Creature -> SPic -> SPic
|
||||
translateToRightHand cr = translateToRightHand' cr -- . mirrorSPxz
|
||||
translateToRightHand = translateToRightHand' -- . mirrorSPxz
|
||||
|
||||
translateToRightHand' :: Creature -> SPic -> SPic
|
||||
translateToRightHand' cr
|
||||
@@ -61,7 +61,7 @@ translateToRightHand' cr
|
||||
f i = negate 2 + negate 6 * fromIntegral (sLen - i) / fromIntegral sLen
|
||||
|
||||
translateToRightWrist :: Creature -> SPic -> SPic
|
||||
translateToRightWrist cr = translateToRightWrist' cr -- . mirrorSPxz
|
||||
translateToRightWrist = translateToRightWrist' -- . mirrorSPxz
|
||||
|
||||
translateToRightWrist' :: Creature -> SPic -> SPic
|
||||
translateToRightWrist' cr
|
||||
|
||||
@@ -197,8 +197,8 @@ targetYouWhenCognizant w cr = case cr ^? crPerception . cpAwareness . ix 0 of
|
||||
|
||||
searchIfDamaged :: Creature -> Creature
|
||||
searchIfDamaged cr
|
||||
| _crPastDamage cr > 0 = case _apStrategy (_crActionPlan cr) of
|
||||
WatchAndWait ->
|
||||
| _crPastDamage cr > 0 &&
|
||||
_apStrategy (_crActionPlan cr) == WatchAndWait =
|
||||
cr & crPerception . cpVigilance .~ Vigilant
|
||||
& crActionPlan . apStrategy
|
||||
.~ StrategyActions
|
||||
@@ -206,7 +206,6 @@ searchIfDamaged cr
|
||||
[ TurnToPoint (_crPos cr -.- unitVectorAtAngle (_crDir cr))
|
||||
`DoActionThen` 40 `WaitThen` bfsThenReturn 500
|
||||
]
|
||||
_ -> cr
|
||||
| otherwise = cr
|
||||
|
||||
bfsThenReturn :: Int -> Action
|
||||
|
||||
@@ -12,5 +12,5 @@ targetYouWhenCognizant ::
|
||||
Creature
|
||||
targetYouWhenCognizant w cr = case cr ^? crPerception . cpAwareness . ix 0 of
|
||||
--Just (Cognizant _) -> cr & crIntention . targetCr ?~ _creatures (_cWorld w) IM.! 0
|
||||
Just (Cognizant _) -> cr & crIntention . targetCr .~ Just (w ^?! cWorld . lWorld . creatures . ix 0)
|
||||
Just (Cognizant _) -> cr & crIntention . targetCr ?~ (w ^?! cWorld . lWorld . creatures . ix 0)
|
||||
_ -> cr & crIntention . targetCr .~ Nothing
|
||||
|
||||
Reference in New Issue
Block a user