From 12f240b9fb378edae5c4bc3e30b151aeab350688 Mon Sep 17 00:00:00 2001 From: Andrey Lesnikov Date: Sat, 10 Jul 2021 20:42:31 +0300 Subject: [PATCH] Fix check_ability_knockback for non-agent targets --- src/core/battle/check.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/battle/check.rs b/src/core/battle/check.rs index 0563994..80c2480 100644 --- a/src/core/battle/check.rs +++ b/src/core/battle/check.rs @@ -130,7 +130,7 @@ fn check_ability_knockback(state: &State, id: Id, pos: PosHex) -> Result<(), Err let selected_pos = state.parts().pos.get(id).0; check_min_distance(selected_pos, pos, Distance(1))?; check_max_distance(selected_pos, pos, Distance(1))?; - let target_id = match state::agent_id_at_opt(state, pos) { + let target_id = match state::blocker_id_at_opt(state, pos) { Some(id) => id, None => return Err(Error::NoTarget), };