Refactor damages in circles
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
module Dodge.Zoning.Creature where
|
||||
|
||||
import Dodge.Creature.Radius
|
||||
import Control.Lens
|
||||
import qualified Data.IntSet as IS
|
||||
import Data.Maybe
|
||||
import Dodge.Creature.Radius
|
||||
import Dodge.Data.World
|
||||
import Dodge.Zoning.Base
|
||||
import Dodge.Zoning.Common
|
||||
@@ -16,7 +16,10 @@ crIXsNearPoint :: Point2 -> World -> IS.IntSet
|
||||
crIXsNearPoint = nearPoint crZoneSize _crZoning
|
||||
|
||||
crsNearPoint :: Point2 -> World -> [Creature]
|
||||
crsNearPoint p w = mapMaybe (\cid -> w ^? cWorld . lWorld . creatures . ix cid) . IS.toList $ crIXsNearPoint p w
|
||||
crsNearPoint p w =
|
||||
mapMaybe (\cid -> w ^? cWorld . lWorld . creatures . ix cid)
|
||||
. IS.toList
|
||||
$ crIXsNearPoint p w
|
||||
|
||||
crsNearSeg :: Point2 -> Point2 -> World -> [Creature]
|
||||
crsNearSeg sp ep w =
|
||||
|
||||
Reference in New Issue
Block a user