davewx7 / citadel

A turn based strategy game based on the Anura engine
Other
97 stars 25 forks source link

Mad Theorist suite of bugs #222

Open sapientN3T opened 6 years ago

sapientN3T commented 6 years ago

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.

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.