Refactor creature zoning
This commit is contained in:
@@ -18,6 +18,8 @@ module Dodge.Item.Weapon.ExtraEffect
|
||||
, targetCursorUpdate
|
||||
-- , rbSetTarget
|
||||
) where
|
||||
import Dodge.Zoning.Creature
|
||||
import FoldableHelp
|
||||
import Dodge.Data
|
||||
import Dodge.Base
|
||||
import Dodge.Zone
|
||||
@@ -93,9 +95,9 @@ targetRBCreatureUp it cr w t
|
||||
& tgActive .~ False
|
||||
)
|
||||
where
|
||||
newtarg = minStreamOn (dist mwp . _crPos)
|
||||
. S.filter (canseepos . _crPos)
|
||||
$ crsInsideCirc mwp 40 w
|
||||
newtarg = safeMinimumOn (dist mwp . _crPos)
|
||||
. filter (canseepos . _crPos)
|
||||
$ crsNearCirc mwp 40 w
|
||||
canseepos p = hasLOS (_crPos cr) p w
|
||||
mwp = mouseWorldPos w
|
||||
updatePos t' = t' & tgPos .~ posFromMaybeID (_tgID t')
|
||||
|
||||
Reference in New Issue
Block a user