diff --git a/src/Dodge/Creature/LookupStatus.hs b/src/Dodge/Creature/LookupStatus.hs new file mode 100644 index 000000000..0144993bd --- /dev/null +++ b/src/Dodge/Creature/LookupStatus.hs @@ -0,0 +1,14 @@ +module Dodge.Creature.LookupStatus + where +import Dodge.Data + +import Geometry + +import Control.Lens + +-- isArmouredFrom :: Point2 -> Creature -> Bool +-- isArmouredFrom p cr +-- = p /= _crPos cr +-- && any (\it -> it ^? itIdentity == Just FrontArmour) (_crInv cr) +-- && angleVV (unitVectorAtAngle $ _crDir cr) (p -.- _crPos cr) < pi/2 +-- even though angleVV can generate NaN, the comparison seems to deal with it