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

Mad Theorist suite of bugs #222

Open
3 tasks
sapientN3T opened this issue Jun 9, 2018 · 0 comments
Open
3 tasks

Mad Theorist suite of bugs #222

sapientN3T opened this issue Jun 9, 2018 · 0 comments
Labels
bug type: bug

Comments

@sapientN3T
Copy link
Collaborator

sapientN3T commented Jun 9, 2018

  • The original bug

If you use this earlier version of the Mad Theorist, it exposes the original bug which I tried to workaround 8d99e77 -- in that version, when the human or AI moved two units at once they were discarding only once. Meaning that multiples of delayed_command are broken.

Steps to reproduce:

  1. Roll back Mad Theorist to the linked commit
  2. Run the play_test("chrono")
  3. Click Move All
  4. Observe that you are only asked to Discard once

Other steps taken:

I speculated that this line in tbs_game was the problem:
add(delayed_commands, [state.delayed_commands]),
it looks like it should just be add(delayed_commands, state.delayed_commands), . However when I changed that the behavior seemed to get even worse (assert fails on choice, overlapping choice controllers), so I didn't change it.

  • Bug number two

Bug number two was discovered when I attempted to workaround bug number one by allowing multiple discards to be consolidated in the same delayed_command. You can witness this bug in current version in master, but here is the relevant commit: 986f853

After that change, the human player is able to discard two cards as intended (when two Mad Theorists move simultaneously). However believe it or not, the AI only discards one card.

Steps to reproduce:

  1. Run the play_test("chrono")
  2. End turn without killing the AI units
  3. Observe that the AI only discarded one card
  4. You may also observe that the value of state.players[1].creature_avatar.effects_tracking['Mad Theorist'] is 1, when it should be 0. This variable was added to track the number of forced discards remaining, which were to be consolidated.

Other steps taken:

I wrestled with the code for several hours trying some more workarounds but couldn’t get the AI discarding two cards.

  • Bug number 3

Bug number 3 discovered by the Mad Theorist is that I can get a current_choice null assert fail if I end turn with remaining movement. It seems there are some situations where you are allowed to click End Turn where you probably shouldn't be allowed to End Turn, and this is one of the consequences. I have attached log files for Bug 3. You can see the assert fail in the server log.
20180608 current_choice assert.zip

@sapientN3T sapientN3T added the bug type: bug label Jun 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type: bug
Projects
None yet
Development

No branches or pull requests

1 participant