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

Handle off-pitch push against Fend breaking blitz #15

Closed
IBBoard opened this issue Oct 24, 2021 · 1 comment
Closed

Handle off-pitch push against Fend breaking blitz #15

IBBoard opened this issue Oct 24, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@IBBoard
Copy link
Owner

IBBoard commented Oct 24, 2021

Replay_2020-08-16_10-12-51.db has a blitz against someone with Fend who is in the end zone. It currently exceptions with:

Traceback (most recent call last):
  File "dump-data.py", line 74, in <module>
    for event in replay.events():
  File "/home/ibboard/Projects/bbreplay/bbreplay/replay.py", line 180, in events
    for event in self._process_turn(cmds, log_entries, board):
  File "/home/ibboard/Projects/bbreplay/bbreplay/replay.py", line 353, in _process_turn
    yield from self._process_block(targeting_player, target_by_idx, cmds,
  File "/home/ibboard/Projects/bbreplay/bbreplay/replay.py", line 642, in _process_block
    yield from self.__process_block_rolls(targeting_player, target_by_idx, cmd, cmds, moved,
  File "/home/ibboard/Projects/bbreplay/bbreplay/replay.py", line 766, in __process_block_rolls
    yield from self._process_movement(pushing_player, cmd, cmds,
  File "/home/ibboard/Projects/bbreplay/bbreplay/replay.py", line 1028, in _process_movement
    result = log_entry.result
AttributeError: 'SkillEntry' object has no attribute 'result'

This appears to be because the player continues moving after the blitz and the push off the pitch means that there isn't a PushbackCommand, which causes the code to jump to movement instead of fending.

@IBBoard IBBoard added the bug Something isn't working label Oct 24, 2021
IBBoard added a commit that referenced this issue Nov 2, 2021
By using `peek()` we resolve the immediate exception but we now
hit #11 so we might still have remaining issues.

Note: We needed to update a blitz test because we don't actually
get a Pushback command when there's only one space (with
or without Frenzy)
@IBBoard
Copy link
Owner Author

IBBoard commented Nov 9, 2021

Works fine after #11 was resolved

@IBBoard IBBoard closed this as completed Nov 9, 2021
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

1 participant