Cleanup creatures somewhat, fix LOS to LOSIndirect
This commit is contained in:
@@ -198,7 +198,7 @@ flockPointTarget
|
||||
-> Creature
|
||||
flockPointTarget f targFunc w cr = case targFunc cr w of
|
||||
Nothing -> cr
|
||||
Just crTarg -> cr & crActionPlan . crImpulse .~ mvPointMeleeTarg p cr crTarg
|
||||
Just crTarg -> cr & crActionPlan . apImpulse .~ mvPointMeleeTarg p cr crTarg
|
||||
where
|
||||
is = _swarm $ _crGroup cr
|
||||
crs = IM.restrictKeys (_creatures w) is
|
||||
@@ -211,7 +211,7 @@ flockToPointUsing
|
||||
-> Reader World Creature
|
||||
flockToPointUsing pf mvf cr = reader $ \w -> case _targetCr $ _crIntention cr of
|
||||
Nothing -> cr
|
||||
Just tcr -> cr & crActionPlan . crImpulse .~ mvf ptarg cr tcr
|
||||
Just tcr -> cr & crActionPlan . apImpulse .~ mvf ptarg cr tcr
|
||||
where
|
||||
cenp = _crGroupCenter $ _creatureGroups w IM.! _crGroupID (_crGroup cr)
|
||||
ptarg = pf tcr cenp cr
|
||||
@@ -223,7 +223,7 @@ flockToPointUsing'
|
||||
-> Creature
|
||||
flockToPointUsing' pf mvf w cr = case _targetCr $ _crIntention cr of
|
||||
Nothing -> cr
|
||||
Just tcr -> cr & crActionPlan . crImpulse .~ mvf ptarg cr tcr
|
||||
Just tcr -> cr & crActionPlan . apImpulse .~ mvf ptarg cr tcr
|
||||
where
|
||||
cenp = _crGroupCenter $ _creatureGroups w IM.! _crGroupID (_crGroup cr)
|
||||
ptarg = pf tcr cenp cr
|
||||
@@ -235,7 +235,7 @@ flockFunc
|
||||
-> Reader World Creature
|
||||
flockFunc f targFunc cr = reader $ \w -> case targFunc cr w of
|
||||
Nothing -> cr
|
||||
Just crTarg -> cr & crActionPlan . crImpulse .~ mvPointMeleeTarg p cr crTarg
|
||||
Just crTarg -> cr & crActionPlan . apImpulse .~ mvPointMeleeTarg p cr crTarg
|
||||
where
|
||||
cenp = _crGroupCenter $ _creatureGroups w IM.! _crGroupID (_crGroup cr)
|
||||
p = f crTarg cenp cr
|
||||
@@ -247,7 +247,7 @@ flockCenterFunc
|
||||
-> Reader World Creature
|
||||
flockCenterFunc f targFunc cr = reader $ \w -> case targFunc cr w of
|
||||
Nothing -> cr
|
||||
Just crTarg -> cr & crActionPlan . crImpulse .~ mvPointMeleeTarg p cr crTarg
|
||||
Just crTarg -> cr & crActionPlan . apImpulse .~ mvPointMeleeTarg p cr crTarg
|
||||
where
|
||||
cenp = _crGroupCenter $ _creatureGroups w IM.! _crGroupID (_crGroup cr)
|
||||
p = f crTarg cenp cr
|
||||
@@ -259,7 +259,7 @@ flockPointTargetR
|
||||
-> Reader World Creature
|
||||
flockPointTargetR f targFunc cr = reader $ \w -> case targFunc cr w of
|
||||
Nothing -> cr
|
||||
Just crTarg -> cr & crActionPlan . crImpulse .~ mvPointMeleeTarg p cr crTarg
|
||||
Just crTarg -> cr & crActionPlan . apImpulse .~ mvPointMeleeTarg p cr crTarg
|
||||
where
|
||||
is = _swarm $ _crGroup cr
|
||||
crs = IM.restrictKeys (_creatures w) is
|
||||
|
||||
Reference in New Issue
Block a user