Delete cruft, add Reader monad to some internal ai
This commit is contained in:
@@ -33,17 +33,17 @@ basicCrPict col cr = pictures
|
||||
| pdam > 99 = color white $ circleSolid $ _crRad cr
|
||||
| otherwise = pictures [color col' $ circleSolid $ _crRad cr, circLine $ _crRad cr]
|
||||
pastDams = _crPastDamage $ _crState cr
|
||||
pdam = sum $ concatMap (map _dmAmount) $ pastDams
|
||||
pdam = sum $ concatMap (map _dmAmount) pastDams
|
||||
col' = light . light . light $ light col
|
||||
bluntDam :: Maybe Point2
|
||||
bluntDam = find isBluntDam (concat pastDams) >>= (\dm -> (-.-) <$> dm ^? dmFrom <*> dm ^? dmTo)
|
||||
bluntScale = case fmap argV bluntDam of
|
||||
Just a -> rotate (a + cdir) . scale 0.8 1.2 . rotate (negate $ cdir + a)
|
||||
_ -> id
|
||||
isBluntDam (Blunt {}) = True
|
||||
isBluntDam Blunt{} = True
|
||||
isBluntDam _ = False
|
||||
piercingDam = find isPiercingDam (concat pastDams) >>= (\dm -> (-.-) <$> dm ^? dmFrom <*> dm ^? dmTo)
|
||||
isPiercingDam (Piercing {}) = True
|
||||
isPiercingDam Piercing{} = True
|
||||
isPiercingDam _ = False
|
||||
piercingMod = case fmap argV piercingDam of
|
||||
Just a -> rotate (a + cdir) . scale 0.8 1.2 . rotate (negate $ cdir + a)
|
||||
|
||||
Reference in New Issue
Block a user