From 893a116fb4de09d6ebbea6cb2847dd90e6d6ff8d Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Wed, 31 Aug 2022 18:31:23 +0300 Subject: [PATCH] Fix getting random target --- src/combat_ai.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/combat_ai.cc b/src/combat_ai.cc index c36cb52..1ceb5af 100644 --- a/src/combat_ai.cc +++ b/src/combat_ai.cc @@ -3220,7 +3220,7 @@ Object* _combat_ai_random_target(Attack* attack) if (obj != attack->attacker && obj != attack->defender && _can_see(attack->attacker, obj) - && _combat_check_bad_shot(attack->attacker, obj, attack->hitMode, false)) { + && _combat_check_bad_shot(attack->attacker, obj, attack->hitMode, false) == COMBAT_BAD_SHOT_OK) { critter = obj; break; }