AI refactor
This commit is contained in:
@@ -22,8 +22,9 @@ basicCrPict col cr = pictures [ onLayer CrLayer . piercingMod $ bluntScale naked
|
||||
where
|
||||
cdir = _crDir cr
|
||||
naked
|
||||
| strikeMelee = color white $ circleSolid $ _crRad cr
|
||||
| pdam > 200 = color red $ circleSolid $ _crRad cr
|
||||
| pdam > 100 = color white $ circleSolid $ _crRad cr
|
||||
| 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
|
||||
@@ -41,6 +42,9 @@ basicCrPict col cr = pictures [ onLayer CrLayer . piercingMod $ bluntScale naked
|
||||
piercingMod = case fmap argV piercingDam of
|
||||
Just a -> rotate (a + cdir) . scale 0.8 1.2 . rotate (negate $ cdir + a)
|
||||
_ -> id
|
||||
strikeMelee = case _crMeleeCooldown cr of
|
||||
Nothing -> False
|
||||
Just x -> x > 5
|
||||
|
||||
drawEquipment
|
||||
:: Creature
|
||||
|
||||
Reference in New Issue
Block a user