Skip to content

Commit

Permalink
Help henchmen shoot, if they are able to
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikolaj committed Oct 29, 2021
1 parent a338a81 commit a6404e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine-src/Game/LambdaHack/Client/AI/PickTargetM.hs
Expand Up @@ -465,6 +465,10 @@ computeTarget foeAssocs friendAssocs aid = do
| bpos b == pos -> tellOthersNothingHere
| recentlyFled -> pickNewTarget
-- forget enemy positions to prevent attacking them again soon
| not (couldMoveLastTurn || null nearbyFoes) -> pickNewTarget
-- if only, possibly, shooting, forget hotspots, target foes;
-- this results in only pointman humans chasing old foes
-- in preference of new visible ones, but it's fine
| otherwise -> do
-- Here pick the closer enemy, the remembered or seen, to avoid
-- loops when approaching new enemy obscures him behind obstacle
Expand Down

0 comments on commit a6404e4

Please sign in to comment.