Skip to content

Commit

Permalink
Fix check_ability_knockback for non-agent targets
Browse files Browse the repository at this point in the history
  • Loading branch information
ozkriff committed Jul 10, 2021
1 parent 6b9dadc commit 12f240b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/battle/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
Expand Down

0 comments on commit 12f240b

Please sign in to comment.