Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in get_block_probs with Skill Side_Step #243

Open
Drefsante opened this issue Jun 18, 2022 · 0 comments
Open

Problem in get_block_probs with Skill Side_Step #243

Drefsante opened this issue Jun 18, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Drefsante
Copy link

Drefsante commented Jun 18, 2022

In game::get_block_probs we have:

push_squares = self.get_push_squares(attacker.position, defender.position)
crowd_push = self.arena.board[push_squares[0].y][push_squares[0].x] == Tile.CROWD and not defender.has_skill(Skill.STAND_FIRM)

But push_squares can be empty because in method get_push_squares we have:

if defender.has_skill(Skill.SIDE_STEP) and not attacker.has_skill(Skill.GRAB):
     return self.get_adjacent_squares(to_position, out=True, occupied=False)

If defender has Side_Step and is surrounded by other units on each adjacent square, there is no empty square to return and push_squares is then empty -> we get an exception when calculating crowd_push due to push_squares[0].

@njustesen njustesen added the bug Something isn't working label Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants