Add IntMapHelper, locate wall cutting bug
This commit is contained in:
@@ -22,14 +22,15 @@ tryMeleeAttack cr tcr
|
||||
| _crMeleeCooldown cr == Just 0
|
||||
&& dist (_crPos tcr) cpos < _crRad cr + _crRad tcr + 5
|
||||
&& abs (_crDir cr - argV (_crPos tcr -.- cpos)) < pi/4
|
||||
= cr & crActionPlan . crStrategy .~ StrategyActions MeleeStrike meleeActions
|
||||
-- = cr & crActionPlan . crStrategy .~ StrategyActions MeleeStrike meleeActions
|
||||
= cr & crActionPlan . crImpulse .~ [Melee $ _crID tcr]
|
||||
| otherwise = cr
|
||||
where
|
||||
cpos = _crPos cr
|
||||
meleeActions =
|
||||
[DoImpulses [Melee (_crID tcr)]
|
||||
`DoActionThen` DoImpulses [ChangeStrategy WatchAndWait]
|
||||
]
|
||||
--meleeActions =
|
||||
-- [DoImpulses [Melee (_crID tcr)]
|
||||
-- `DoActionThen` DoImpulses [ChangeStrategy WatchAndWait]
|
||||
-- ]
|
||||
|
||||
chaseTargetR
|
||||
:: (Creature -> World -> Maybe Creature) -- ^ Function for determining target
|
||||
|
||||
Reference in New Issue
Block a user