Add debug to copy to clipboard any clicked-on creature

This commit is contained in:
2026-05-04 21:17:22 +01:00
parent 6b3d75cbb2
commit 5d5d0a539b
13 changed files with 212 additions and 207 deletions
+2 -6
View File
@@ -29,7 +29,6 @@ import Dodge.Creature.Radius
import Dodge.Data.Equipment.Misc
import Dodge.Data.AimStance
import Control.Lens
import Data.List (find)
import Data.Maybe
import Dodge.Base.Collide
import Dodge.Data.World
@@ -81,12 +80,9 @@ crStratConMatches strat cr = strat == _apStrategy (_crActionPlan cr)
-- this equality check might be slow...
crAwayFromPost :: Creature -> Bool
crAwayFromPost cr = case find sentinelGoal . _apGoal $ _crActionPlan cr of
Just (SentinelAt p _) -> dist p (cr ^. crPos . _xy) > 15
crAwayFromPost cr = case _apGoal $ _crActionPlan cr of
SentinelAt p _ -> dist p (cr ^. crPos . _xy) > 15
_ -> False
where
sentinelGoal (SentinelAt _ _) = True
sentinelGoal _ = False
crInAimStance :: AimStance -> Creature -> Bool
crInAimStance as cr = cr ^? crStance . posture == Just Aiming