Chase crit suspicion increases more when you are closer
This commit is contained in:
+17
-5
@@ -1,5 +1,6 @@
|
||||
module Dodge.Debug where
|
||||
|
||||
import Data.Aeson.Types
|
||||
import AesonHelp
|
||||
import Control.Lens
|
||||
import Data.List (sortOn)
|
||||
@@ -55,16 +56,27 @@ debugSelectCreatureMessage u = fromMaybe
|
||||
cid <- u ^? uvDebug . ix Select_creature . debugInfo . debugMInt . _Just
|
||||
i <- u ^? uvDebug . ix Select_creature . debugInfo . debugInt
|
||||
cap <- debugSelectCreatureList cid u !! i
|
||||
return $ show cid : getPretty cap
|
||||
return $ show cid : cap
|
||||
|
||||
debugSelectCreatureList :: Int -> Universe -> [Maybe [String]]
|
||||
debugSelectCreatureList cid u =
|
||||
[ fmap getPretty $ u ^? uvWorld . cWorld . lWorld . creatures . ix cid . crActionPlan
|
||||
, fmap getPretty $ u ^? uvWorld . cWorld . lWorld . creatures . ix cid . crPerception
|
||||
, fmap getPretty $ u ^? uvWorld . cWorld . lWorld . creatures . ix cid . crIntention
|
||||
, fmap getPretty $ u ^? uvWorld . cWorld . lWorld . creatures . ix cid . crMemory
|
||||
[ debugList "ActionPlan"
|
||||
(u ^? uvWorld . cWorld . lWorld . creatures . ix cid . crActionPlan)
|
||||
, debugList "Perception"
|
||||
(u ^? uvWorld . cWorld . lWorld . creatures . ix cid . crPerception)
|
||||
, debugList "Intention"
|
||||
(u ^? uvWorld . cWorld . lWorld . creatures . ix cid . crIntention)
|
||||
, debugList "Memory"
|
||||
(u ^? uvWorld . cWorld . lWorld . creatures . ix cid . crMemory)
|
||||
, debugList "Strategy"
|
||||
(u ^? uvWorld . cWorld . lWorld . creatures . ix cid . crActionPlan . apStrategy)
|
||||
]
|
||||
|
||||
|
||||
debugList :: (Functor f, ToJSON a) => String -> f a -> f [String]
|
||||
debugList str = fmap (([str] ++) . getPrettyShort )
|
||||
|
||||
|
||||
clickGetCreature :: Universe -> DebugInfo
|
||||
clickGetCreature u
|
||||
| SDL.ButtonLeft `M.member` (u ^. uvWorld . input . mouseButtons)
|
||||
|
||||
Reference in New Issue
Block a user